Search is not available for this dataset
query
stringlengths
7
355k
document
stringlengths
9
341k
metadata
dict
negatives
listlengths
0
101
negative_scores
listlengths
0
101
document_score
stringlengths
3
10
document_rank
stringclasses
102 values
Calculate seg.forwardCoord and seg.backwardCoord for the segment, where both values range from 0 to 1. If the calendar is lefttoright, the seg.backwardCoord maps to "left" and seg.forwardCoord maps to "right" (via percentage). Viceversa if the calendar is righttoleft. The segment might be part of a "series", which means consecutive segments with the same pressure who's width is unknown until an edge has been hit. `seriesBackwardPressure` is the number of segments behind this one in the current series, and `seriesBackwardCoord` is the starting coordinate of the first segment in the series.
function computeSlotSegCoords(seg, seriesBackwardPressure, seriesBackwardCoord) { var forwardSegs = seg.forwardSegs; var i; if (seg.forwardCoord === undefined) { // not already computed if (!forwardSegs.length) { // if there are no forward segments, this segment should butt up against the edge seg.forwardCoord = 1; } else { // sort highest pressure first forwardSegs.sort(compareForwardSlotSegs); // this segment's forwardCoord will be calculated from the backwardCoord of the // highest-pressure forward segment. computeSlotSegCoords(forwardSegs[0], seriesBackwardPressure + 1, seriesBackwardCoord); seg.forwardCoord = forwardSegs[0].backwardCoord; } // calculate the backwardCoord from the forwardCoord. consider the series seg.backwardCoord = seg.forwardCoord - (seg.forwardCoord - seriesBackwardCoord) / // available width for series (seriesBackwardPressure + 1); // # of segments in the series // use this segment's coordinates to computed the coordinates of the less-pressurized // forward segments for (i=0; i<forwardSegs.length; i++) { computeSlotSegCoords(forwardSegs[i], 0, seg.forwardCoord); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function computeSlotSegCoords(seg, seriesBackwardPressure, seriesBackwardCoord) {\n var forwardSegs = seg.forwardSegs;\n var i;\n\n if (seg.forwardCoord === undefined) { // not already computed\n\n if (!forwardSegs.length) {\n\n // if there are no forward segments, this segment should butt up against the edge\n seg.forwardCoord = 1;\n }\n else {\n\n // sort highest pressure first\n forwardSegs.sort(compareForwardSlotSegs);\n\n // this segment's forwardCoord will be calculated from the backwardCoord of the\n // highest-pressure forward segment.\n computeSlotSegCoords(forwardSegs[0], seriesBackwardPressure + 1, seriesBackwardCoord);\n seg.forwardCoord = forwardSegs[0].backwardCoord;\n }\n\n // calculate the backwardCoord from the forwardCoord. consider the series\n seg.backwardCoord = seg.forwardCoord -\n (seg.forwardCoord - seriesBackwardCoord) / // available width for series\n (seriesBackwardPressure + 1); // # of segments in the series\n\n // use this segment's coordinates to computed the coordinates of the less-pressurized\n // forward segments\n for (i = 0; i < forwardSegs.length; i++) {\n computeSlotSegCoords(forwardSegs[i], 0, seg.forwardCoord);\n }\n }\n }", "function computeSegForwardBack(seg, seriesBackwardPressure, seriesBackwardCoord, eventOrderSpecs) {\n var forwardSegs = seg.forwardSegs;\n var i;\n\n if (seg.forwardCoord == null) {\n // not already computed\n if (!forwardSegs.length) {\n // if there are no forward segments, this segment should butt up against the edge\n seg.forwardCoord = 1;\n } else {\n // sort highest pressure first\n sortForwardSegs(forwardSegs, eventOrderSpecs); // this segment's forwardCoord will be calculated from the backwardCoord of the\n // highest-pressure forward segment.\n\n computeSegForwardBack(forwardSegs[0], seriesBackwardPressure + 1, seriesBackwardCoord, eventOrderSpecs);\n seg.forwardCoord = forwardSegs[0].backwardCoord;\n } // calculate the backwardCoord from the forwardCoord. consider the series\n\n\n seg.backwardCoord = seg.forwardCoord - (seg.forwardCoord - seriesBackwardCoord) / ( // available width for series\n seriesBackwardPressure + 1); // # of segments in the series\n // use this segment's coordinates to computed the coordinates of the less-pressurized\n // forward segments\n\n for (i = 0; i < forwardSegs.length; i++) {\n computeSegForwardBack(forwardSegs[i], 0, seg.forwardCoord, eventOrderSpecs);\n }\n }\n }", "function computeSegForwardBack(seg, seriesBackwardPressure, seriesBackwardCoord, eventOrderSpecs) {\n var forwardSegs = seg.forwardSegs;\n var i;\n if (seg.forwardCoord == null) { // not already computed\n if (!forwardSegs.length) {\n // if there are no forward segments, this segment should butt up against the edge\n seg.forwardCoord = 1;\n }\n else {\n // sort highest pressure first\n sortForwardSegs(forwardSegs, eventOrderSpecs);\n // this segment's forwardCoord will be calculated from the backwardCoord of the\n // highest-pressure forward segment.\n computeSegForwardBack(forwardSegs[0], seriesBackwardPressure + 1, seriesBackwardCoord, eventOrderSpecs);\n seg.forwardCoord = forwardSegs[0].backwardCoord;\n }\n // calculate the backwardCoord from the forwardCoord. consider the series\n seg.backwardCoord = seg.forwardCoord -\n (seg.forwardCoord - seriesBackwardCoord) / // available width for series\n (seriesBackwardPressure + 1); // # of segments in the series\n // use this segment's coordinates to computed the coordinates of the less-pressurized\n // forward segments\n for (i = 0; i < forwardSegs.length; i += 1) {\n computeSegForwardBack(forwardSegs[i], 0, seg.forwardCoord, eventOrderSpecs);\n }\n }\n }", "function computeSlotSegPressures(seg) {\n var forwardSegs = seg.forwardSegs;\n var forwardPressure = 0;\n var i;\n var forwardSeg;\n\n if (seg.forwardPressure == null) {\n // not already computed\n for (i = 0; i < forwardSegs.length; i++) {\n forwardSeg = forwardSegs[i]; // figure out the child's maximum forward path\n\n computeSlotSegPressures(forwardSeg); // either use the existing maximum, or use the child's forward pressure\n // plus one (for the forwardSeg itself)\n\n forwardPressure = Math.max(forwardPressure, 1 + forwardSeg.forwardPressure);\n }\n\n seg.forwardPressure = forwardPressure;\n }\n } // Calculate seg.forwardCoord and seg.backwardCoord for the segment, where both values range", "resolveSegmentSegment(ax1, ay1, ax2, ay2, bx1, by1, bx2, by2) {\n const result = [];\n const isHorizontal1 = ax2 - ax1 > ay2 - ay1;\n const isHorizontal2 = bx2 - bx1 > by2 - by1;\n\n if (isHorizontal1 && isHorizontal2 &&\n by1 === ay1 &&\n ((ax1 <= bx2 && ax1 >= bx1) || (ax2 <= bx2 && ax2 >= bx1) || (bx1 <= ax2 && bx1 >= ax1) || (bx2 <= ax2 && bx2 >= ax1))) {\n\n if (bx1 < ax1) result.push(bx1, by1, ax1, by1);\n if (bx2 > ax2) result.push(ax2, by2, bx2, by2);\n\n } else if (!isHorizontal1 && isHorizontal2 &&\n by1 >= ay1 && by1 < ay2 &&\n ((ax1 <= bx2 && ax1 >= bx1) || (ax2 <= bx2 && ax2 >= bx1) || (bx1 <= ax2 && bx1 >= ax1) || (bx2 <= ax2 && bx2 >= ax1))) {\n\n if (bx1 < ax1) result.push(bx1, by1, ax1, by1);\n if (bx2 > ax2) result.push(ax2 + 1, by2, bx2, by2);\n\n } else if (!isHorizontal1 && !isHorizontal2 &&\n ax1 === bx2 &&\n ((by1 <= ay2 && by1 >= ay1) || (by2 <= ay2 && by2 >= ay1) || (ay1 <= by2 && ay1 >= by1) || (ay2 <= by2 && ay2 >= by1))) {\n\n if (by1 < ay1) result.push(bx1, by1, bx1, ay1);\n if (by2 > ay2) result.push(bx2, ay2, bx2, by2);\n\n } else if (isHorizontal1 && !isHorizontal2 &&\n bx1 >= ax1 && bx1 < ax2 &&\n ((ay2 <= by2 && ay2 >= by1) || (ay1 <= by2 && ay1 >= by1) || (by2 <= ay2 && by2 >= ay1) || (by1 <= ay2 && by1 >= ay1))) {\n\n if (by1 < ay1) result.push(bx1, by1, bx1, ay1);\n if (by2 > ay2) result.push(bx2, ay2 + 1, bx2, by2);\n\n } else { // segments do not intersect\n result.push(bx1, by1, bx2, by2);\n }\n\n return result;\n }", "function segments_union(segment_1, segment_2){\n var max_segment_1, min_segment_1, max_segment_2, min_segment_2, absolute_max, absolute_min;\n //Case 1: vertical segments\n var vertical = is_vertical_or_quasi_vertical(segment_1); //equivalently is_vertical_or_quasi_vertical(segment_2)\n if(vertical){\n\n if(parseFloat(segment_1[0][1]) >= parseFloat(segment_1[1][1])){\n max_segment_1 = segment_1[0]; min_segment_1 = segment_1[1];\n }\n else{\n max_segment_1 = segment_1[1]; min_segment_1 = segment_1[0];\n }\n if(parseFloat(segment_2[0][1]) >= parseFloat(segment_2[1][1])){\n max_segment_2 = segment_2[0]; min_segment_2 = segment_2[1];\n }\n else{\n max_segment_2 = segment_2[1]; min_segment_2 = segment_2[0];\n }\n\n if(parseFloat(max_segment_1[1]) >= parseFloat(max_segment_2[1])){\n absolute_max = max_segment_1;\n }\n else{\n absolute_max = max_segment_2;\n }\n if(parseFloat(min_segment_1[1]) < parseFloat(min_segment_2[1])){\n absolute_min = min_segment_1;\n }\n else{\n absolute_min = min_segment_2;\n }\n\n return [absolute_min, absolute_max];\n }\n\n //Case 2: non vertical segments\n if(parseFloat(segment_1[0][0]) >= parseFloat(segment_1[1][0])){\n max_segment_1 = segment_1[0]; min_segment_1 = segment_1[1];\n }\n else{\n max_segment_1 = segment_1[1]; min_segment_1 = segment_1[0];\n }\n if(parseFloat(segment_2[0][0]) >= parseFloat(segment_2[1][0])){\n max_segment_2 = segment_2[0]; min_segment_2 = segment_2[1];\n }\n else{\n max_segment_2 = segment_2[1]; min_segment_2 = segment_2[0];\n }\n\n if(parseFloat(max_segment_1[0]) >= parseFloat(max_segment_2[0])){\n absolute_max = max_segment_1;\n }\n else{\n absolute_max = max_segment_2;\n }\n if(parseFloat(min_segment_1[0]) < parseFloat(min_segment_2[0])){\n absolute_min = min_segment_1;\n }\n else{\n absolute_min = min_segment_2;\n }\n\n return [absolute_min, absolute_max];\n}", "function la(a,b,c){var d,e=a.forwardSegs;if(void 0===a.forwardCoord)// # of segments in the series\n// use this segment's coordinates to computed the coordinates of the less-pressurized\n// forward segments\nfor(// not already computed\ne.length?(\n// sort highest pressure first\ne.sort(pa),\n// this segment's forwardCoord will be calculated from the backwardCoord of the\n// highest-pressure forward segment.\nla(e[0],b+1,c),a.forwardCoord=e[0].backwardCoord):\n// if there are no forward segments, this segment should butt up against the edge\na.forwardCoord=1,\n// calculate the backwardCoord from the forwardCoord. consider the series\na.backwardCoord=a.forwardCoord-(a.forwardCoord-c)/(// available width for series\nb+1),d=0;d<e.length;d++)la(e[d],0,a.forwardCoord)}", "function computeSlotSegPressures(seg) {\n var forwardSegs = seg.forwardSegs;\n var forwardPressure = 0;\n var i;\n var forwardSeg;\n\n if (seg.forwardPressure === undefined) {\n // not already computed\n for (i = 0; i < forwardSegs.length; i++) {\n forwardSeg = forwardSegs[i]; // figure out the child's maximum forward path\n\n computeSlotSegPressures(forwardSeg); // either use the existing maximum, or use the child's forward pressure\n // plus one (for the forwardSeg itself)\n\n forwardPressure = Math.max(forwardPressure, 1 + forwardSeg.forwardPressure);\n }\n\n seg.forwardPressure = forwardPressure;\n }\n } // Find all the segments in `otherSegs` that vertically collide with `seg`.", "function computeSlotSegPressures(seg){var forwardSegs=seg.forwardSegs;var forwardPressure=0;var i;var forwardSeg;if(seg.forwardPressure===undefined){// not already computed\nfor(i=0;i<forwardSegs.length;i++){forwardSeg=forwardSegs[i];// figure out the child's maximum forward path\ncomputeSlotSegPressures(forwardSeg);// either use the existing maximum, or use the child's forward pressure\n// plus one (for the forwardSeg itself)\nforwardPressure=Math.max(forwardPressure,1+forwardSeg.forwardPressure);}seg.forwardPressure=forwardPressure;}}// Find all the segments in `otherSegs` that vertically collide with `seg`.", "function computeSegVerticals(segs, dayDate, slatCoords, eventMinHeight) {\n for (var _i = 0, segs_1 = segs; _i < segs_1.length; _i++) {\n var seg = segs_1[_i];\n seg.top = slatCoords.computeDateTop(seg.start, dayDate);\n seg.bottom = Math.max(seg.top + (eventMinHeight || 0), // yuck\n slatCoords.computeDateTop(seg.end, dayDate));\n }\n }", "getCardinalStickDirection(vertical, horizontal) {\n let horizontalDir = '';\n let verticalDir = '';\n\n if (applyDeadzone(this.gamepad.axes[vertical], deadzone) > 0)\n verticalDir = 'S';\n if (applyDeadzone(this.gamepad.axes[vertical], deadzone) < 0)\n verticalDir = 'N';\n if (applyDeadzone(this.gamepad.axes[horizontal], deadzone) > 0)\n horizontalDir = 'E';\n if (applyDeadzone(this.gamepad.axes[horizontal], deadzone) < 0)\n horizontalDir = 'W';\n\n return verticalDir + horizontalDir;\n }", "function calculateSlope(segment){\r\n\tvar slope = (segment.b.y - segment.a.y)/(segment.b.x - segment.a.x);\r\n\treturn slope;\r\n}", "function computeSegCoords(segs, dayDate, slatCoords, eventMinHeight, eventOrderSpecs) {\n computeSegVerticals(segs, dayDate, slatCoords, eventMinHeight);\n return computeSegHorizontals(segs, eventOrderSpecs); // requires top/bottom from computeSegVerticals\n } // For each segment in an array, computes and assigns its top and bottom properties", "function computeSlotSegPressures(seg) {\n var forwardSegs = seg.forwardSegs;\n var forwardPressure = 0;\n var i, forwardSeg;\n\n if (seg.forwardPressure === undefined) { // not already computed\n\n for (i = 0; i < forwardSegs.length; i++) {\n forwardSeg = forwardSegs[i];\n\n // figure out the child's maximum forward path\n computeSlotSegPressures(forwardSeg);\n\n // either use the existing maximum, or use the child's forward pressure\n // plus one (for the forwardSeg itself)\n forwardPressure = Math.max(\n forwardPressure,\n 1 + forwardSeg.forwardPressure\n );\n }\n\n seg.forwardPressure = forwardPressure;\n }\n }", "function computeSegHorizontals(segs, eventOrderSpecs) {\n // IMPORTANT TO CLEAR OLD RESULTS :(\n for (var _i = 0, segs_2 = segs; _i < segs_2.length; _i++) {\n var seg = segs_2[_i];\n seg.level = null;\n seg.forwardCoord = null;\n seg.backwardCoord = null;\n seg.forwardPressure = null;\n }\n\n segs = Object(_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__[\"sortEventSegs\"])(segs, eventOrderSpecs);\n var level0;\n var levels = buildSlotSegLevels(segs);\n computeForwardSlotSegs(levels);\n\n if (level0 = levels[0]) {\n for (var _a = 0, level0_1 = level0; _a < level0_1.length; _a++) {\n var seg = level0_1[_a];\n computeSlotSegPressures(seg);\n }\n\n for (var _b = 0, level0_2 = level0; _b < level0_2.length; _b++) {\n var seg = level0_2[_b];\n computeSegForwardBack(seg, 0, 0, eventOrderSpecs);\n }\n }\n\n return segs;\n } // Builds an array of segments \"levels\". The first level will be the leftmost tier of segments if the calendar is", "function computeSlotSegPressures(seg) {\n var forwardSegs = seg.forwardSegs;\n var forwardPressure = 0;\n var i;\n var forwardSeg;\n if (seg.forwardPressure === undefined) { // not already computed\n for (i = 0; i < forwardSegs.length; i++) {\n forwardSeg = forwardSegs[i];\n // figure out the child's maximum forward path\n computeSlotSegPressures(forwardSeg);\n // either use the existing maximum, or use the child's forward pressure\n // plus one (for the forwardSeg itself)\n forwardPressure = Math.max(forwardPressure, 1 + forwardSeg.forwardPressure);\n }\n seg.forwardPressure = forwardPressure;\n }\n}", "function computeSlotSegPressures(seg) {\n var forwardSegs = seg.forwardSegs;\n var forwardPressure = 0;\n var i;\n var forwardSeg;\n if (seg.forwardPressure === undefined) { // not already computed\n for (i = 0; i < forwardSegs.length; i++) {\n forwardSeg = forwardSegs[i];\n // figure out the child's maximum forward path\n computeSlotSegPressures(forwardSeg);\n // either use the existing maximum, or use the child's forward pressure\n // plus one (for the forwardSeg itself)\n forwardPressure = Math.max(forwardPressure, 1 + forwardSeg.forwardPressure);\n }\n seg.forwardPressure = forwardPressure;\n }\n}", "function computeSlotSegPressures(seg) {\n var forwardSegs = seg.forwardSegs;\n var forwardPressure = 0;\n var i;\n var forwardSeg;\n if (seg.forwardPressure === undefined) { // not already computed\n for (i = 0; i < forwardSegs.length; i++) {\n forwardSeg = forwardSegs[i];\n // figure out the child's maximum forward path\n computeSlotSegPressures(forwardSeg);\n // either use the existing maximum, or use the child's forward pressure\n // plus one (for the forwardSeg itself)\n forwardPressure = Math.max(forwardPressure, 1 + forwardSeg.forwardPressure);\n }\n seg.forwardPressure = forwardPressure;\n }\n }", "function computeSlotSegPressures(seg) {\n var forwardSegs = seg.forwardSegs;\n var forwardPressure = 0;\n var i;\n var forwardSeg;\n if (seg.forwardPressure === undefined) { // not already computed\n for (i = 0; i < forwardSegs.length; i++) {\n forwardSeg = forwardSegs[i];\n // figure out the child's maximum forward path\n computeSlotSegPressures(forwardSeg);\n // either use the existing maximum, or use the child's forward pressure\n // plus one (for the forwardSeg itself)\n forwardPressure = Math.max(forwardPressure, 1 + forwardSeg.forwardPressure);\n }\n seg.forwardPressure = forwardPressure;\n }\n }", "function computeSlotSegPressures(seg) {\n var forwardSegs = seg.forwardSegs;\n var forwardPressure = 0;\n var i;\n var forwardSeg;\n if (seg.forwardPressure === undefined) { // not already computed\n for (i = 0; i < forwardSegs.length; i++) {\n forwardSeg = forwardSegs[i];\n // figure out the child's maximum forward path\n computeSlotSegPressures(forwardSeg);\n // either use the existing maximum, or use the child's forward pressure\n // plus one (for the forwardSeg itself)\n forwardPressure = Math.max(forwardPressure, 1 + forwardSeg.forwardPressure);\n }\n seg.forwardPressure = forwardPressure;\n }\n }", "function computeSlotSegPressures(seg) {\n var forwardSegs = seg.forwardSegs;\n var forwardPressure = 0;\n var i;\n var forwardSeg;\n if (seg.forwardPressure === undefined) {\n for (i = 0; i < forwardSegs.length; i++) {\n forwardSeg = forwardSegs[i];\n // figure out the child's maximum forward path\n computeSlotSegPressures(forwardSeg);\n // either use the existing maximum, or use the child's forward pressure\n // plus one (for the forwardSeg itself)\n forwardPressure = Math.max(forwardPressure, 1 + forwardSeg.forwardPressure);\n }\n seg.forwardPressure = forwardPressure;\n }\n}", "function computeSlotSegPressures(seg) {\n var forwardSegs = seg.forwardSegs;\n var forwardPressure = 0;\n var i;\n var forwardSeg;\n if (seg.forwardPressure === undefined) {\n for (i = 0; i < forwardSegs.length; i++) {\n forwardSeg = forwardSegs[i];\n // figure out the child's maximum forward path\n computeSlotSegPressures(forwardSeg);\n // either use the existing maximum, or use the child's forward pressure\n // plus one (for the forwardSeg itself)\n forwardPressure = Math.max(forwardPressure, 1 + forwardSeg.forwardPressure);\n }\n seg.forwardPressure = forwardPressure;\n }\n}", "function computeSlotSegPressures(seg) {\n var forwardSegs = seg.forwardSegs;\n var forwardPressure = 0;\n var i;\n var forwardSeg;\n if (seg.forwardPressure === undefined) {\n for (i = 0; i < forwardSegs.length; i++) {\n forwardSeg = forwardSegs[i];\n // figure out the child's maximum forward path\n computeSlotSegPressures(forwardSeg);\n // either use the existing maximum, or use the child's forward pressure\n // plus one (for the forwardSeg itself)\n forwardPressure = Math.max(forwardPressure, 1 + forwardSeg.forwardPressure);\n }\n seg.forwardPressure = forwardPressure;\n }\n}", "function computeSlotSegPressures(seg) {\n\tvar forwardSegs = seg.forwardSegs;\n\tvar forwardPressure = 0;\n\tvar i, forwardSeg;\n\n\tif (seg.forwardPressure === undefined) { // not already computed\n\n\t\tfor (i=0; i<forwardSegs.length; i++) {\n\t\t\tforwardSeg = forwardSegs[i];\n\n\t\t\t// figure out the child's maximum forward path\n\t\t\tcomputeSlotSegPressures(forwardSeg);\n\n\t\t\t// either use the existing maximum, or use the child's forward pressure\n\t\t\t// plus one (for the forwardSeg itself)\n\t\t\tforwardPressure = Math.max(\n\t\t\t\tforwardPressure,\n\t\t\t\t1 + forwardSeg.forwardPressure\n\t\t\t);\n\t\t}\n\n\t\tseg.forwardPressure = forwardPressure;\n\t}\n}", "function computeSlotSegPressures(seg) {\n\tvar forwardSegs = seg.forwardSegs;\n\tvar forwardPressure = 0;\n\tvar i, forwardSeg;\n\n\tif (seg.forwardPressure === undefined) { // not already computed\n\n\t\tfor (i=0; i<forwardSegs.length; i++) {\n\t\t\tforwardSeg = forwardSegs[i];\n\n\t\t\t// figure out the child's maximum forward path\n\t\t\tcomputeSlotSegPressures(forwardSeg);\n\n\t\t\t// either use the existing maximum, or use the child's forward pressure\n\t\t\t// plus one (for the forwardSeg itself)\n\t\t\tforwardPressure = Math.max(\n\t\t\t\tforwardPressure,\n\t\t\t\t1 + forwardSeg.forwardPressure\n\t\t\t);\n\t\t}\n\n\t\tseg.forwardPressure = forwardPressure;\n\t}\n}", "function computeSlotSegPressures(seg) {\n\tvar forwardSegs = seg.forwardSegs;\n\tvar forwardPressure = 0;\n\tvar i, forwardSeg;\n\n\tif (seg.forwardPressure === undefined) { // not already computed\n\n\t\tfor (i=0; i<forwardSegs.length; i++) {\n\t\t\tforwardSeg = forwardSegs[i];\n\n\t\t\t// figure out the child's maximum forward path\n\t\t\tcomputeSlotSegPressures(forwardSeg);\n\n\t\t\t// either use the existing maximum, or use the child's forward pressure\n\t\t\t// plus one (for the forwardSeg itself)\n\t\t\tforwardPressure = Math.max(\n\t\t\t\tforwardPressure,\n\t\t\t\t1 + forwardSeg.forwardPressure\n\t\t\t);\n\t\t}\n\n\t\tseg.forwardPressure = forwardPressure;\n\t}\n}", "function computeSlotSegPressures(seg) {\n\tvar forwardSegs = seg.forwardSegs;\n\tvar forwardPressure = 0;\n\tvar i, forwardSeg;\n\n\tif (seg.forwardPressure === undefined) { // not already computed\n\n\t\tfor (i=0; i<forwardSegs.length; i++) {\n\t\t\tforwardSeg = forwardSegs[i];\n\n\t\t\t// figure out the child's maximum forward path\n\t\t\tcomputeSlotSegPressures(forwardSeg);\n\n\t\t\t// either use the existing maximum, or use the child's forward pressure\n\t\t\t// plus one (for the forwardSeg itself)\n\t\t\tforwardPressure = Math.max(\n\t\t\t\tforwardPressure,\n\t\t\t\t1 + forwardSeg.forwardPressure\n\t\t\t);\n\t\t}\n\n\t\tseg.forwardPressure = forwardPressure;\n\t}\n}", "function computeSlotSegPressures(seg) {\n\tvar forwardSegs = seg.forwardSegs;\n\tvar forwardPressure = 0;\n\tvar i, forwardSeg;\n\n\tif (seg.forwardPressure === undefined) { // not already computed\n\n\t\tfor (i=0; i<forwardSegs.length; i++) {\n\t\t\tforwardSeg = forwardSegs[i];\n\n\t\t\t// figure out the child's maximum forward path\n\t\t\tcomputeSlotSegPressures(forwardSeg);\n\n\t\t\t// either use the existing maximum, or use the child's forward pressure\n\t\t\t// plus one (for the forwardSeg itself)\n\t\t\tforwardPressure = Math.max(\n\t\t\t\tforwardPressure,\n\t\t\t\t1 + forwardSeg.forwardPressure\n\t\t\t);\n\t\t}\n\n\t\tseg.forwardPressure = forwardPressure;\n\t}\n}", "function computeSlotSegPressures(seg) {\n\tvar forwardSegs = seg.forwardSegs;\n\tvar forwardPressure = 0;\n\tvar i, forwardSeg;\n\n\tif (seg.forwardPressure === undefined) { // not already computed\n\n\t\tfor (i=0; i<forwardSegs.length; i++) {\n\t\t\tforwardSeg = forwardSegs[i];\n\n\t\t\t// figure out the child's maximum forward path\n\t\t\tcomputeSlotSegPressures(forwardSeg);\n\n\t\t\t// either use the existing maximum, or use the child's forward pressure\n\t\t\t// plus one (for the forwardSeg itself)\n\t\t\tforwardPressure = Math.max(\n\t\t\t\tforwardPressure,\n\t\t\t\t1 + forwardSeg.forwardPressure\n\t\t\t);\n\t\t}\n\n\t\tseg.forwardPressure = forwardPressure;\n\t}\n}", "function computeSlotSegPressures(seg) {\n\tvar forwardSegs = seg.forwardSegs;\n\tvar forwardPressure = 0;\n\tvar i, forwardSeg;\n\n\tif (seg.forwardPressure === undefined) { // not already computed\n\n\t\tfor (i=0; i<forwardSegs.length; i++) {\n\t\t\tforwardSeg = forwardSegs[i];\n\n\t\t\t// figure out the child's maximum forward path\n\t\t\tcomputeSlotSegPressures(forwardSeg);\n\n\t\t\t// either use the existing maximum, or use the child's forward pressure\n\t\t\t// plus one (for the forwardSeg itself)\n\t\t\tforwardPressure = Math.max(\n\t\t\t\tforwardPressure,\n\t\t\t\t1 + forwardSeg.forwardPressure\n\t\t\t);\n\t\t}\n\n\t\tseg.forwardPressure = forwardPressure;\n\t}\n}", "function computeSlotSegPressures(seg) {\n\tvar forwardSegs = seg.forwardSegs;\n\tvar forwardPressure = 0;\n\tvar i, forwardSeg;\n\n\tif (seg.forwardPressure === undefined) { // not already computed\n\n\t\tfor (i=0; i<forwardSegs.length; i++) {\n\t\t\tforwardSeg = forwardSegs[i];\n\n\t\t\t// figure out the child's maximum forward path\n\t\t\tcomputeSlotSegPressures(forwardSeg);\n\n\t\t\t// either use the existing maximum, or use the child's forward pressure\n\t\t\t// plus one (for the forwardSeg itself)\n\t\t\tforwardPressure = Math.max(\n\t\t\t\tforwardPressure,\n\t\t\t\t1 + forwardSeg.forwardPressure\n\t\t\t);\n\t\t}\n\n\t\tseg.forwardPressure = forwardPressure;\n\t}\n}", "function computeSlotSegPressures(seg) {\n\tvar forwardSegs = seg.forwardSegs;\n\tvar forwardPressure = 0;\n\tvar i, forwardSeg;\n\n\tif (seg.forwardPressure === undefined) { // not already computed\n\n\t\tfor (i=0; i<forwardSegs.length; i++) {\n\t\t\tforwardSeg = forwardSegs[i];\n\n\t\t\t// figure out the child's maximum forward path\n\t\t\tcomputeSlotSegPressures(forwardSeg);\n\n\t\t\t// either use the existing maximum, or use the child's forward pressure\n\t\t\t// plus one (for the forwardSeg itself)\n\t\t\tforwardPressure = Math.max(\n\t\t\t\tforwardPressure,\n\t\t\t\t1 + forwardSeg.forwardPressure\n\t\t\t);\n\t\t}\n\n\t\tseg.forwardPressure = forwardPressure;\n\t}\n}", "function computeSlotSegPressures(seg) {\n\tvar forwardSegs = seg.forwardSegs;\n\tvar forwardPressure = 0;\n\tvar i, forwardSeg;\n\n\tif (seg.forwardPressure === undefined) { // not already computed\n\n\t\tfor (i=0; i<forwardSegs.length; i++) {\n\t\t\tforwardSeg = forwardSegs[i];\n\n\t\t\t// figure out the child's maximum forward path\n\t\t\tcomputeSlotSegPressures(forwardSeg);\n\n\t\t\t// either use the existing maximum, or use the child's forward pressure\n\t\t\t// plus one (for the forwardSeg itself)\n\t\t\tforwardPressure = Math.max(\n\t\t\t\tforwardPressure,\n\t\t\t\t1 + forwardSeg.forwardPressure\n\t\t\t);\n\t\t}\n\n\t\tseg.forwardPressure = forwardPressure;\n\t}\n}", "function computeSlotSegPressures(seg) {\n\tvar forwardSegs = seg.forwardSegs;\n\tvar forwardPressure = 0;\n\tvar i, forwardSeg;\n\n\tif (seg.forwardPressure === undefined) { // not already computed\n\n\t\tfor (i=0; i<forwardSegs.length; i++) {\n\t\t\tforwardSeg = forwardSegs[i];\n\n\t\t\t// figure out the child's maximum forward path\n\t\t\tcomputeSlotSegPressures(forwardSeg);\n\n\t\t\t// either use the existing maximum, or use the child's forward pressure\n\t\t\t// plus one (for the forwardSeg itself)\n\t\t\tforwardPressure = Math.max(\n\t\t\t\tforwardPressure,\n\t\t\t\t1 + forwardSeg.forwardPressure\n\t\t\t);\n\t\t}\n\n\t\tseg.forwardPressure = forwardPressure;\n\t}\n}", "function computeSlotSegPressures(seg) {\n\tvar forwardSegs = seg.forwardSegs;\n\tvar forwardPressure = 0;\n\tvar i, forwardSeg;\n\n\tif (seg.forwardPressure === undefined) { // not already computed\n\n\t\tfor (i=0; i<forwardSegs.length; i++) {\n\t\t\tforwardSeg = forwardSegs[i];\n\n\t\t\t// figure out the child's maximum forward path\n\t\t\tcomputeSlotSegPressures(forwardSeg);\n\n\t\t\t// either use the existing maximum, or use the child's forward pressure\n\t\t\t// plus one (for the forwardSeg itself)\n\t\t\tforwardPressure = Math.max(\n\t\t\t\tforwardPressure,\n\t\t\t\t1 + forwardSeg.forwardPressure\n\t\t\t);\n\t\t}\n\n\t\tseg.forwardPressure = forwardPressure;\n\t}\n}", "function computeSlotSegPressures(seg) {\n\tvar forwardSegs = seg.forwardSegs;\n\tvar forwardPressure = 0;\n\tvar i, forwardSeg;\n\n\tif (seg.forwardPressure === undefined) { // not already computed\n\n\t\tfor (i=0; i<forwardSegs.length; i++) {\n\t\t\tforwardSeg = forwardSegs[i];\n\n\t\t\t// figure out the child's maximum forward path\n\t\t\tcomputeSlotSegPressures(forwardSeg);\n\n\t\t\t// either use the existing maximum, or use the child's forward pressure\n\t\t\t// plus one (for the forwardSeg itself)\n\t\t\tforwardPressure = Math.max(\n\t\t\t\tforwardPressure,\n\t\t\t\t1 + forwardSeg.forwardPressure\n\t\t\t);\n\t\t}\n\n\t\tseg.forwardPressure = forwardPressure;\n\t}\n}", "function computeSlotSegPressures(seg) {\n\t\tvar forwardSegs = seg.forwardSegs;\n\t\tvar forwardPressure = 0;\n\t\tvar i, forwardSeg;\n\n\t\tif (seg.forwardPressure === undefined) { // not already computed\n\n\t\t\tfor (i=0; i<forwardSegs.length; i++) {\n\t\t\t\tforwardSeg = forwardSegs[i];\n\n\t\t\t\t// figure out the child's maximum forward path\n\t\t\t\tcomputeSlotSegPressures(forwardSeg);\n\n\t\t\t\t// either use the existing maximum, or use the child's forward pressure\n\t\t\t\t// plus one (for the forwardSeg itself)\n\t\t\t\tforwardPressure = Math.max(\n\t\t\t\t\tforwardPressure,\n\t\t\t\t\t1 + forwardSeg.forwardPressure\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tseg.forwardPressure = forwardPressure;\n\t\t}\n\t}", "function computeSlotSegPressures(seg) {\n var forwardSegs = seg.forwardSegs;\n var forwardPressure = 0;\n var i;\n var forwardSeg;\n if (seg.forwardPressure == null) { // not already computed\n for (i = 0; i < forwardSegs.length; i += 1) {\n forwardSeg = forwardSegs[i];\n // figure out the child's maximum forward path\n computeSlotSegPressures(forwardSeg);\n // either use the existing maximum, or use the child's forward pressure\n // plus one (for the forwardSeg itself)\n forwardPressure = Math.max(forwardPressure, 1 + forwardSeg.forwardPressure);\n }\n seg.forwardPressure = forwardPressure;\n }\n }", "function getPositions ( a, b, delimit ) {\n\t\n\t\t\t// Add movement to current position.\n\t\t\tvar c = a + b[0], d = a + b[1];\n\t\n\t\t\t// Only alter the other position on drag,\n\t\t\t// not on standard sliding.\n\t\t\tif ( delimit ) {\n\t\t\t\tif ( c < 0 ) {\n\t\t\t\t\td += Math.abs(c);\n\t\t\t\t}\n\t\t\t\tif ( d > 100 ) {\n\t\t\t\t\tc -= ( d - 100 );\n\t\t\t\t}\n\t\n\t\t\t\t// Limit values to 0 and 100.\n\t\t\t\treturn [limit(c), limit(d)];\n\t\t\t}\n\t\n\t\t\treturn [c,d];\n\t\t}", "function findDotsAtSegment(p1x, p1y, c1x, c1y, c2x, c2y, p2x, p2y, t) {\n\n var t1 = 1 - t, t13 = Math.pow(t1, 3), t12 = Math.pow(t1, 2), t2 = t * t,\n t3 = t2 * t, x = t13 * p1x + t12 * 3 * t * c1x + t1 * 3 * t * t * c2x +\n t3 * p2x, y = t13 * p1y + t12 * 3 * t * c1y + t1 * 3 * t * t * c2y +\n t3 * p2y, mx = p1x + 2 * t * (c1x - p1x) + t2 * (c2x - 2 * c1x + p1x),\n my = p1y + 2 * t * (c1y - p1y) + t2 * (c2y - 2 * c1y + p1y),\n nx = c1x + 2 * t * (c2x - c1x) + t2 * (p2x - 2 * c2x + c1x),\n ny = c1y + 2 * t * (c2y - c1y) + t2 * (p2y - 2 * c2y + c1y),\n ax = t1 * p1x + t * c1x, ay = t1 * p1y + t * c1y,\n cx = t1 * c2x + t * p2x, cy = t1 * c2y + t * p2y,\n alpha = (90 - Math.atan2(mx - nx, my - ny) * 180 / Math.PI);\n\n if (mx > nx || my < ny) { alpha += 180; }\n\n return { x: x, y: y, m: { x: mx, y: my }, n: { x: nx, y: ny },\n start: { x: ax, y: ay }, end: { x: cx, y: cy }, alpha: alpha\n };\n}", "function rangeToSegments(startDate, endDate) {\n\t\tvar rowCnt = t.getRowCnt();\n\t\tvar colCnt = t.getColCnt();\n\t\tvar segments = []; // array of segments to return\n\n\t\t// day offset for given date range\n\t\tvar rangeDayOffsetStart = dateToDayOffset(startDate);\n\t\tvar rangeDayOffsetEnd = dateToDayOffset(endDate); // exclusive\n\n\t\t// first and last cell offset for the given date range\n\t\t// \"last\" implies inclusivity\n\t\tvar rangeCellOffsetFirst = dayOffsetToCellOffset(rangeDayOffsetStart);\n\t\tvar rangeCellOffsetLast = dayOffsetToCellOffset(rangeDayOffsetEnd) - 1;\n\n\t\t// loop through all the rows in the view\n\t\tfor (var row=0; row<rowCnt; row++) {\n\n\t\t\t// first and last cell offset for the row\n\t\t\tvar rowCellOffsetFirst = row * colCnt;\n\t\t\tvar rowCellOffsetLast = rowCellOffsetFirst + colCnt - 1;\n\n\t\t\t// get the segment's cell offsets by constraining the range's cell offsets to the bounds of the row\n\t\t\tvar segmentCellOffsetFirst = Math.max(rangeCellOffsetFirst, rowCellOffsetFirst);\n\t\t\tvar segmentCellOffsetLast = Math.min(rangeCellOffsetLast, rowCellOffsetLast);\n\n\t\t\t// make sure segment's offsets are valid and in view\n\t\t\tif (segmentCellOffsetFirst <= segmentCellOffsetLast) {\n\n\t\t\t\t// translate to cells\n\t\t\t\tvar segmentCellFirst = cellOffsetToCell(segmentCellOffsetFirst);\n\t\t\t\tvar segmentCellLast = cellOffsetToCell(segmentCellOffsetLast);\n\n\t\t\t\t// view might be RTL, so order by leftmost column\n\t\t\t\tvar cols = [ segmentCellFirst.col, segmentCellLast.col ].sort();\n\n\t\t\t\t// Determine if segment's first/last cell is the beginning/end of the date range.\n\t\t\t\t// We need to compare \"day offset\" because \"cell offsets\" are often ambiguous and\n\t\t\t\t// can translate to multiple days, and an edge case reveals itself when we the\n\t\t\t\t// range's first cell is hidden (we don't want isStart to be true).\n\t\t\t\tvar isStart = cellOffsetToDayOffset(segmentCellOffsetFirst) == rangeDayOffsetStart;\n\t\t\t\tvar isEnd = cellOffsetToDayOffset(segmentCellOffsetLast) + 1 == rangeDayOffsetEnd; // +1 for comparing exclusively\n\n\t\t\t\tsegments.push({\n\t\t\t\t\trow: row,\n\t\t\t\t\tleftCol: cols[0],\n\t\t\t\t\trightCol: cols[1],\n\t\t\t\t\tisStart: isStart,\n\t\t\t\t\tisEnd: isEnd\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\n\t\treturn segments;\n\t}", "function rangeToSegments(startDate, endDate) {\n\t\tvar rowCnt = t.getRowCnt();\n\t\tvar colCnt = t.getColCnt();\n\t\tvar segments = []; // array of segments to return\n\n\t\t// day offset for given date range\n\t\tvar rangeDayOffsetStart = dateToDayOffset(startDate);\n\t\tvar rangeDayOffsetEnd = dateToDayOffset(endDate); // exclusive\n\n\t\t// first and last cell offset for the given date range\n\t\t// \"last\" implies inclusivity\n\t\tvar rangeCellOffsetFirst = dayOffsetToCellOffset(rangeDayOffsetStart);\n\t\tvar rangeCellOffsetLast = dayOffsetToCellOffset(rangeDayOffsetEnd) - 1;\n\n\t\t// loop through all the rows in the view\n\t\tfor (var row=0; row<rowCnt; row++) {\n\n\t\t\t// first and last cell offset for the row\n\t\t\tvar rowCellOffsetFirst = row * colCnt;\n\t\t\tvar rowCellOffsetLast = rowCellOffsetFirst + colCnt - 1;\n\n\t\t\t// get the segment's cell offsets by constraining the range's cell offsets to the bounds of the row\n\t\t\tvar segmentCellOffsetFirst = Math.max(rangeCellOffsetFirst, rowCellOffsetFirst);\n\t\t\tvar segmentCellOffsetLast = Math.min(rangeCellOffsetLast, rowCellOffsetLast);\n\n\t\t\t// make sure segment's offsets are valid and in view\n\t\t\tif (segmentCellOffsetFirst <= segmentCellOffsetLast) {\n\n\t\t\t\t// translate to cells\n\t\t\t\tvar segmentCellFirst = cellOffsetToCell(segmentCellOffsetFirst);\n\t\t\t\tvar segmentCellLast = cellOffsetToCell(segmentCellOffsetLast);\n\n\t\t\t\t// view might be RTL, so order by leftmost column\n\t\t\t\tvar cols = [ segmentCellFirst.col, segmentCellLast.col ].sort();\n\n\t\t\t\t// Determine if segment's first/last cell is the beginning/end of the date range.\n\t\t\t\t// We need to compare \"day offset\" because \"cell offsets\" are often ambiguous and\n\t\t\t\t// can translate to multiple days, and an edge case reveals itself when we the\n\t\t\t\t// range's first cell is hidden (we don't want isStart to be true).\n\t\t\t\tvar isStart = cellOffsetToDayOffset(segmentCellOffsetFirst) == rangeDayOffsetStart;\n\t\t\t\tvar isEnd = cellOffsetToDayOffset(segmentCellOffsetLast) + 1 == rangeDayOffsetEnd; // +1 for comparing exclusively\n\n\t\t\t\tsegments.push({\n\t\t\t\t\trow: row,\n\t\t\t\t\tleftCol: cols[0],\n\t\t\t\t\trightCol: cols[1],\n\t\t\t\t\tisStart: isStart,\n\t\t\t\t\tisEnd: isEnd\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\n\t\treturn segments;\n\t}", "function rangeToSegments(startDate, endDate) {\n\t\tvar rowCnt = t.getRowCnt();\n\t\tvar colCnt = t.getColCnt();\n\t\tvar segments = []; // array of segments to return\n\n\t\t// day offset for given date range\n\t\tvar rangeDayOffsetStart = dateToDayOffset(startDate);\n\t\tvar rangeDayOffsetEnd = dateToDayOffset(endDate); // exclusive\n\n\t\t// first and last cell offset for the given date range\n\t\t// \"last\" implies inclusivity\n\t\tvar rangeCellOffsetFirst = dayOffsetToCellOffset(rangeDayOffsetStart);\n\t\tvar rangeCellOffsetLast = dayOffsetToCellOffset(rangeDayOffsetEnd) - 1;\n\n\t\t// loop through all the rows in the view\n\t\tfor (var row=0; row<rowCnt; row++) {\n\n\t\t\t// first and last cell offset for the row\n\t\t\tvar rowCellOffsetFirst = row * colCnt;\n\t\t\tvar rowCellOffsetLast = rowCellOffsetFirst + colCnt - 1;\n\n\t\t\t// get the segment's cell offsets by constraining the range's cell offsets to the bounds of the row\n\t\t\tvar segmentCellOffsetFirst = Math.max(rangeCellOffsetFirst, rowCellOffsetFirst);\n\t\t\tvar segmentCellOffsetLast = Math.min(rangeCellOffsetLast, rowCellOffsetLast);\n\n\t\t\t// make sure segment's offsets are valid and in view\n\t\t\tif (segmentCellOffsetFirst <= segmentCellOffsetLast) {\n\n\t\t\t\t// translate to cells\n\t\t\t\tvar segmentCellFirst = cellOffsetToCell(segmentCellOffsetFirst);\n\t\t\t\tvar segmentCellLast = cellOffsetToCell(segmentCellOffsetLast);\n\n\t\t\t\t// view might be RTL, so order by leftmost column\n\t\t\t\tvar cols = [ segmentCellFirst.col, segmentCellLast.col ].sort();\n\n\t\t\t\t// Determine if segment's first/last cell is the beginning/end of the date range.\n\t\t\t\t// We need to compare \"day offset\" because \"cell offsets\" are often ambiguous and\n\t\t\t\t// can translate to multiple days, and an edge case reveals itself when we the\n\t\t\t\t// range's first cell is hidden (we don't want isStart to be true).\n\t\t\t\tvar isStart = cellOffsetToDayOffset(segmentCellOffsetFirst) == rangeDayOffsetStart;\n\t\t\t\tvar isEnd = cellOffsetToDayOffset(segmentCellOffsetLast) + 1 == rangeDayOffsetEnd; // +1 for comparing exclusively\n\n\t\t\t\tsegments.push({\n\t\t\t\t\trow: row,\n\t\t\t\t\tleftCol: cols[0],\n\t\t\t\t\trightCol: cols[1],\n\t\t\t\t\tisStart: isStart,\n\t\t\t\t\tisEnd: isEnd\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\n\t\treturn segments;\n\t}", "function getDirectionOfCircularPath() {\n\n const isBearingChangeSmall = (thisB, lastB) => Math.abs(thisB - lastB) > Math.PI\n const nSkip = Math.ceil(path.length / 20);\n let clockWiseSum = 0;\n let lastBearing = geoFunctions.bearing(this.firstPoint, this.getPoint(nSkip));\n let thisBearing;\n\n for ( let i = 2 * nSkip; i < path.length; i += nSkip ) {\n\n thisBearing = geoFunctions.bearing(this.getPoint(i - nSkip), this.getPoint(i));\n if (isBearingChangeSmall(thisBearing, lastBearing)) { // ignore point if delta is > 180deg (assume moved across 0degs)\n clockWiseSum += Math.sign(deltaBrg); // increment if bearing is increasing, decrement if decreasing\n }\n\n lastBearing = thisBearing;\n }\n\n if ( clockWiseSum > 0 ) { return 'Clockwise'; }\n if ( clockWiseSum < 0 ) { return 'Anti-Clockwise'; }\n if ( clockWiseSum === 0 ) { return 'Unknown Direction'; }\n\n}", "function calculateGradient(nrSteps, startColor, endColor) {\n // Get RGB values\n startRGB = hexToDec(startColor);\n endRGB = hexToDec(endColor);\n \n // Return steps\n return Array((endRGB[0] - startRGB[0])/nrSteps, (endRGB[1] - startRGB[1])/nrSteps, (endRGB[2] - startRGB[2])/nrSteps);\n }", "function distanceFromPointToSegment(eventPoint, startPoint, endPoint) {\n\t\t \t// The segment.\n\t\t \tvar startEndVector = toVector(startPoint, endPoint);\n\t\t \t// Line from the start of the segment to the event - V(P0, E).\n\t\t \tvar startEventVector = toVector(startPoint, eventPoint);\n\t\t \t\n\t\t \t// If the angle of the V(P0, E) with the segment is greater than 90° it means that the\n\t\t \t// closest point to the event point is the start point of the segment.\n\t\t \tvar dotEventSegment = dotProduct(startEndVector, startEventVector);\n\t\t \tif(dotEventSegment <= 0)\n\t\t \t\treturn vectorDistance(startEventVector);\n\t\t \t\n\t\t \t// The angle of the end point is verified.\n\t\t \tvar dotSegmentItself = dotProduct(startEndVector, startEndVector);\n\t\t \tif(dotSegmentItself <= dotEventSegment)\n\t\t \t\treturn vectorDistance(toVector(endPoint, eventPoint));\n\t\t \t\n\t\t \t// This amount will scale the vector to become the displacement from the\n\t\t \t// start point of the segment to the closest one to the event point.\n\t\t \tvar scale = dotEventSegment / dotSegmentItself;\n\t\t \tvar closestPoint = {\n\t\t \t\t\tx: startPoint.x + (scale * startEndVector.x),\n\t\t \t\t\ty: startPoint.y + (scale * startEndVector.y),\n\t\t \t\t\tz: startPoint.z + (scale * startEndVector.z)\n\t\t \t};\n\t\t \t\n\t\t \treturn vectorDistance(toVector(eventPoint, closestPoint));\n\t\t }", "function CalculateTransition(parameter, destinyParameter, TransitionSpeed){\n\tif (parameter == destinyParameter) // If the parameter was in the same position of its destiny, return it\n\t\treturn parameter;\n\telse {\n\t\t\n\t\tif (parameter < destinyParameter) // If the parameter is minor than destiny, calculate the half of the track to the front\n\t\t\treturn parameter + Math.ceil((destinyParameter - parameter) / 5);\t\n\t\telse // And if the parameter is minor than destiny, calculate the half of the track to the back\n\t\t\treturn parameter - Math.ceil((parameter - destinyParameter) / 5);\t\n\t}\n\t\n}", "function rangeToSegments(start, end) {\n\n\t\tvar rowCnt = t.getRowCnt();\n\t\tvar colCnt = t.getColCnt();\n\t\tvar segments = []; // array of segments to return\n\n\t\t// day offset for given date range\n\t\tvar rangeDayOffsetStart = dateToDayOffset(start);\n\t\tvar rangeDayOffsetEnd = dateToDayOffset(end); // an exclusive value\n\t\tvar endTimeMS = +end.time();\n\t\tif (endTimeMS && endTimeMS >= nextDayThreshold) {\n\t\t\trangeDayOffsetEnd++;\n\t\t}\n\t\trangeDayOffsetEnd = Math.max(rangeDayOffsetEnd, rangeDayOffsetStart + 1);\n\n\t\t// first and last cell offset for the given date range\n\t\t// \"last\" implies inclusivity\n\t\tvar rangeCellOffsetFirst = dayOffsetToCellOffset(rangeDayOffsetStart);\n\t\tvar rangeCellOffsetLast = dayOffsetToCellOffset(rangeDayOffsetEnd) - 1;\n\n\t\t// loop through all the rows in the view\n\t\tfor (var row=0; row<rowCnt; row++) {\n\n\t\t\t// first and last cell offset for the row\n\t\t\tvar rowCellOffsetFirst = row * colCnt;\n\t\t\tvar rowCellOffsetLast = rowCellOffsetFirst + colCnt - 1;\n\n\t\t\t// get the segment's cell offsets by constraining the range's cell offsets to the bounds of the row\n\t\t\tvar segmentCellOffsetFirst = Math.max(rangeCellOffsetFirst, rowCellOffsetFirst);\n\t\t\tvar segmentCellOffsetLast = Math.min(rangeCellOffsetLast, rowCellOffsetLast);\n\n\t\t\t// make sure segment's offsets are valid and in view\n\t\t\tif (segmentCellOffsetFirst <= segmentCellOffsetLast) {\n\n\t\t\t\t// translate to cells\n\t\t\t\tvar segmentCellFirst = cellOffsetToCell(segmentCellOffsetFirst);\n\t\t\t\tvar segmentCellLast = cellOffsetToCell(segmentCellOffsetLast);\n\n\t\t\t\t// view might be RTL, so order by leftmost column\n\t\t\t\tvar cols = [ segmentCellFirst.col, segmentCellLast.col ].sort();\n\n\t\t\t\t// Determine if segment's first/last cell is the beginning/end of the date range.\n\t\t\t\t// We need to compare \"day offset\" because \"cell offsets\" are often ambiguous and\n\t\t\t\t// can translate to multiple days, and an edge case reveals itself when we the\n\t\t\t\t// range's first cell is hidden (we don't want isStart to be true).\n\t\t\t\tvar isStart = cellOffsetToDayOffset(segmentCellOffsetFirst) == rangeDayOffsetStart;\n\t\t\t\tvar isEnd = cellOffsetToDayOffset(segmentCellOffsetLast) + 1 == rangeDayOffsetEnd; // +1 for comparing exclusively\n\n\t\t\t\tsegments.push({\n\t\t\t\t\trow: row,\n\t\t\t\t\tleftCol: cols[0],\n\t\t\t\t\trightCol: cols[1],\n\t\t\t\t\tisStart: isStart,\n\t\t\t\t\tisEnd: isEnd\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\n\t\treturn segments;\n\t}", "function rangeToSegments(start, end) {\n\n\t\tvar rowCnt = t.getRowCnt();\n\t\tvar colCnt = t.getColCnt();\n\t\tvar segments = []; // array of segments to return\n\n\t\t// day offset for given date range\n\t\tvar rangeDayOffsetStart = dateToDayOffset(start);\n\t\tvar rangeDayOffsetEnd = dateToDayOffset(end); // an exclusive value\n\t\tvar endTimeMS = +end.time();\n\t\tif (endTimeMS && endTimeMS >= nextDayThreshold) {\n\t\t\trangeDayOffsetEnd++;\n\t\t}\n\t\trangeDayOffsetEnd = Math.max(rangeDayOffsetEnd, rangeDayOffsetStart + 1);\n\n\t\t// first and last cell offset for the given date range\n\t\t// \"last\" implies inclusivity\n\t\tvar rangeCellOffsetFirst = dayOffsetToCellOffset(rangeDayOffsetStart);\n\t\tvar rangeCellOffsetLast = dayOffsetToCellOffset(rangeDayOffsetEnd) - 1;\n\n\t\t// loop through all the rows in the view\n\t\tfor (var row=0; row<rowCnt; row++) {\n\n\t\t\t// first and last cell offset for the row\n\t\t\tvar rowCellOffsetFirst = row * colCnt;\n\t\t\tvar rowCellOffsetLast = rowCellOffsetFirst + colCnt - 1;\n\n\t\t\t// get the segment's cell offsets by constraining the range's cell offsets to the bounds of the row\n\t\t\tvar segmentCellOffsetFirst = Math.max(rangeCellOffsetFirst, rowCellOffsetFirst);\n\t\t\tvar segmentCellOffsetLast = Math.min(rangeCellOffsetLast, rowCellOffsetLast);\n\n\t\t\t// make sure segment's offsets are valid and in view\n\t\t\tif (segmentCellOffsetFirst <= segmentCellOffsetLast) {\n\n\t\t\t\t// translate to cells\n\t\t\t\tvar segmentCellFirst = cellOffsetToCell(segmentCellOffsetFirst);\n\t\t\t\tvar segmentCellLast = cellOffsetToCell(segmentCellOffsetLast);\n\n\t\t\t\t// view might be RTL, so order by leftmost column\n\t\t\t\tvar cols = [ segmentCellFirst.col, segmentCellLast.col ].sort();\n\n\t\t\t\t// Determine if segment's first/last cell is the beginning/end of the date range.\n\t\t\t\t// We need to compare \"day offset\" because \"cell offsets\" are often ambiguous and\n\t\t\t\t// can translate to multiple days, and an edge case reveals itself when we the\n\t\t\t\t// range's first cell is hidden (we don't want isStart to be true).\n\t\t\t\tvar isStart = cellOffsetToDayOffset(segmentCellOffsetFirst) == rangeDayOffsetStart;\n\t\t\t\tvar isEnd = cellOffsetToDayOffset(segmentCellOffsetLast) + 1 == rangeDayOffsetEnd; // +1 for comparing exclusively\n\n\t\t\t\tsegments.push({\n\t\t\t\t\trow: row,\n\t\t\t\t\tleftCol: cols[0],\n\t\t\t\t\trightCol: cols[1],\n\t\t\t\t\tisStart: isStart,\n\t\t\t\t\tisEnd: isEnd\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\n\t\treturn segments;\n\t}", "function getPositions ( a, b, delimit ) {\r\n\r\n\t\t\t// Add movement to current position.\r\n\t\t\tvar c = a + b[0], d = a + b[1];\r\n\r\n\t\t\t// Only alter the other position on drag,\r\n\t\t\t// not on standard sliding.\r\n\t\t\tif ( delimit ) {\r\n\t\t\t\tif ( c < 0 ) {\r\n\t\t\t\t\td += Math.abs(c);\r\n\t\t\t\t}\r\n\t\t\t\tif ( d > 100 ) {\r\n\t\t\t\t\tc -= ( d - 100 );\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// Limit values to 0 and 100.\r\n\t\t\t\treturn [limit(c), limit(d)];\r\n\t\t\t}\r\n\r\n\t\t\treturn [c,d];\r\n\t\t}", "function getPositions ( a, b, delimit ) {\n\n\t\t// Add movement to current position.\n\t\tvar c = a + b[0], d = a + b[1];\n\n\t\t// Only alter the other position on drag,\n\t\t// not on standard sliding.\n\t\tif ( delimit ) {\n\t\t\tif ( c < 0 ) {\n\t\t\t\td += Math.abs(c);\n\t\t\t}\n\t\t\tif ( d > 100 ) {\n\t\t\t\tc -= ( d - 100 );\n\t\t\t}\n\n\t\t\t// Limit values to 0 and 100.\n\t\t\treturn [limit(c), limit(d)];\n\t\t}\n\n\t\treturn [c,d];\n\t}", "function getPositions ( a, b, delimit ) {\n\n\t\t// Add movement to current position.\n\t\tvar c = a + b[0], d = a + b[1];\n\n\t\t// Only alter the other position on drag,\n\t\t// not on standard sliding.\n\t\tif ( delimit ) {\n\t\t\tif ( c < 0 ) {\n\t\t\t\td += Math.abs(c);\n\t\t\t}\n\t\t\tif ( d > 100 ) {\n\t\t\t\tc -= ( d - 100 );\n\t\t\t}\n\n\t\t\t// Limit values to 0 and 100.\n\t\t\treturn [limit(c), limit(d)];\n\t\t}\n\n\t\treturn [c,d];\n\t}", "function getPositions ( a, b, delimit ) {\n\n\t\t// Add movement to current position.\n\t\tvar c = a + b[0], d = a + b[1];\n\n\t\t// Only alter the other position on drag,\n\t\t// not on standard sliding.\n\t\tif ( delimit ) {\n\t\t\tif ( c < 0 ) {\n\t\t\t\td += Math.abs(c);\n\t\t\t}\n\t\t\tif ( d > 100 ) {\n\t\t\t\tc -= ( d - 100 );\n\t\t\t}\n\n\t\t\t// Limit values to 0 and 100.\n\t\t\treturn [limit(c), limit(d)];\n\t\t}\n\n\t\treturn [c,d];\n\t}", "function getPositions ( a, b, delimit ) {\r\n\r\n\t\t// Add movement to current position.\r\n\t\tvar c = a + b[0], d = a + b[1];\r\n\r\n\t\t// Only alter the other position on drag,\r\n\t\t// not on standard sliding.\r\n\t\tif ( delimit ) {\r\n\t\t\tif ( c < 0 ) {\r\n\t\t\t\td += Math.abs(c);\r\n\t\t\t}\r\n\t\t\tif ( d > 100 ) {\r\n\t\t\t\tc -= ( d - 100 );\r\n\t\t\t}\r\n\r\n\t\t\t// Limit values to 0 and 100.\r\n\t\t\treturn [limit(c), limit(d)];\r\n\t\t}\r\n\r\n\t\treturn [c,d];\r\n\t}", "function _winding(point,vs) {\n\n //Is a line from v1 to v2 entirely left of point p, entirely right of it, or neither?\n //A = difference in X from v1 to v2\n //B = difference in in Y from v1 to p\n //C = difference in X from v1 to p\n //D = difference in Y from v1 to v2\n //If AB > CD, it's strictly to the left of p in the direction v1->v2\n //If AB < CD, it's strictly to the right of p in the direction v1->v2\n function dir(v1,v2,p) {\n return (v2[0] - v1[0]) * (p[1] - v1[1]) - (p[0] - v1[0]) * (v2[1] - v1[1])\n }\n\n function isLeft(v1,v2,p) {\n return dir(v1,v2,p) > 0;\n }\n\n function isRight(v1,v2,p) {\n return dir(v1,v2,p) < 0;\n }\n\n var w = 0;\n\n //Need to compare last point connecting back to first\n if (vs[vs.length-1][0] !== vs[0][0] || vs[vs.length-1][1] !== vs[0][1]) {\n vs = vs.slice(0);\n vs.push(vs[0]);\n }\n\n //For each segment\n for (var i = 0, l = vs.length - 1; i < l; i++) {\n\n //Check upward\n if (vs[i][1] <= point[1]) {\n if (vs[i+1][1] > point[1] && isLeft(vs[i],vs[i+1],point)) {\n w++;\n }\n // Check downward\n } else if (vs[i+1][1] <= point[1] && isRight(vs[i],vs[i+1],point)) {\n w--;\n }\n\n }\n\n return w !== 0;\n\n }", "function findDotsAtSegment(p1x, p1y, c1x, c1y, c2x, c2y, p2x, p2y, t) {\n var t1 = 1 - t;\n var t13 = Math.pow(t1, 3);\n var t12 = Math.pow(t1, 2);\n var t2 = t * t;\n var t3 = t2 * t;\n var x = t13 * p1x + t12 * 3 * t * c1x + t1 * 3 * t * t * c2x + t3 * p2x;\n var y = t13 * p1y + t12 * 3 * t * c1y + t1 * 3 * t * t * c2y + t3 * p2y;\n var mx = p1x + 2 * t * (c1x - p1x) + t2 * (c2x - 2 * c1x + p1x);\n var my = p1y + 2 * t * (c1y - p1y) + t2 * (c2y - 2 * c1y + p1y);\n var nx = c1x + 2 * t * (c2x - c1x) + t2 * (p2x - 2 * c2x + c1x);\n var ny = c1y + 2 * t * (c2y - c1y) + t2 * (p2y - 2 * c2y + c1y);\n var ax = t1 * p1x + t * c1x;\n var ay = t1 * p1y + t * c1y;\n var cx = t1 * c2x + t * p2x;\n var cy = t1 * c2y + t * p2y;\n var alpha = 90 - Math.atan2(mx - nx, my - ny) * 180 / Math.PI;\n\n if (mx > nx || my < ny) {\n alpha += 180;\n }\n\n return {\n x: x,\n y: y,\n m: { x: mx, y: my },\n n: { x: nx, y: ny },\n start: { x: ax, y: ay },\n end: { x: cx, y: cy },\n alpha: alpha\n };\n }", "function calculateRange(upperOrLower, series) {\n if (upperOrLower === 'upper') {\n highestPoint = _.max(_.pluck(series, 'y'))\n return Math.ceil(highestPoint/5)*5;\n }\n else if (upperOrLower === 'lower') {\n lowestPoint = _.min(_.pluck(series, 'y'))\n return Math.floor(lowestPoint/5)*5;\n }\n else {\n return 0;\n }\n }", "function lastY() { return (segments.length == 0) ? 0 : segments[segments.length-1].p2.w.y; }", "function circularLayout(seriesModel) {\n var coordSys = seriesModel.coordinateSystem;\n\n if (coordSys && coordSys.type !== 'view') {\n return;\n }\n\n var rect = coordSys.getBoundingRect();\n var nodeData = seriesModel.getData();\n var graph = nodeData.graph;\n var angle = 0;\n var sum = nodeData.getSum('value');\n var unitAngle = Math.PI * 2 / (sum || nodeData.count());\n var cx = rect.width / 2 + rect.x;\n var cy = rect.height / 2 + rect.y;\n var r = Math.min(rect.width, rect.height) / 2;\n graph.eachNode(function (node) {\n var value = node.getValue('value');\n angle += unitAngle * (sum ? value : 1) / 2;\n node.setLayout([r * Math.cos(angle) + cx, r * Math.sin(angle) + cy]);\n angle += unitAngle * (sum ? value : 1) / 2;\n });\n nodeData.setLayout({\n cx: cx,\n cy: cy\n });\n graph.eachEdge(function (edge) {\n var curveness = edge.getModel().get('lineStyle.curveness') || 0;\n var p1 = vec2.clone(edge.node1.getLayout());\n var p2 = vec2.clone(edge.node2.getLayout());\n var cp1;\n var x12 = (p1[0] + p2[0]) / 2;\n var y12 = (p1[1] + p2[1]) / 2;\n\n if (+curveness) {\n curveness *= 3;\n cp1 = [cx * curveness + x12 * (1 - curveness), cy * curveness + y12 * (1 - curveness)];\n }\n\n edge.setLayout([p1, p2, cp1]);\n });\n}", "function pa(a,b){\n// put higher-pressure first\n// put segments that are closer to initial edge first (and favor ones with no coords yet)\n// do normal sorting...\nreturn b.forwardPressure-a.forwardPressure||(a.backwardCoord||0)-(b.backwardCoord||0)||qa(a,b)}", "readjustForChangedEndpoint() {\n const head = this.head;\n const tail = this.tail;\n const controlIsForward = this.controlIsForward;\n let controlDistanceFromMid = this.controlDistanceFromMid;\n const tailIsAboveHead = head.y > tail.y || (head.y === tail.y && head.x < tail.x);\n if ((controlIsForward && tailIsAboveHead) ||\n !(controlIsForward || tailIsAboveHead)) {\n controlDistanceFromMid *= -1;\n }\n const midPt = this.startPt.ptBetween(this.endPt);\n const m = this.axisOfSymmetrySlope();\n this.controlPt = midPt.ptAlongSlope(m, controlDistanceFromMid);\n this.calculateEndspointsArrowAndLabel();\n }", "edges(range) {\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n var {\n reverse = false\n } = options;\n var {\n anchor,\n focus\n } = range;\n return Range.isBackward(range) === reverse ? [anchor, focus] : [focus, anchor];\n }", "edges(range) {\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n var {\n reverse = false\n } = options;\n var {\n anchor,\n focus\n } = range;\n return Range.isBackward(range) === reverse ? [anchor, focus] : [focus, anchor];\n }", "function getDiffOffsets(prev, next) {\n if (prev === next) return null;\n var start = getDiffStart(prev, next);\n if (start === null) return null;\n var maxEnd = Math.min(prev.length - start, next.length - start);\n var end = getDiffEnd(prev, next, maxEnd);\n if (end === null) return null;\n return {\n start,\n end\n };\n}", "function getPositions(a, b, delimit) {\n // Add movement to current position.\n var c = a + b[0],\n d = a + b[1];\n // Only alter the other position on drag,\n // not on standard sliding.\n if (delimit) {\n if (c < 0) {\n d += Math.abs(c);\n }\n if (d > 100) {\n c -= (d - 100);\n }\n // Limit values to 0 and 100.\n return [limit(c), limit(d)];\n }\n return [c, d];\n }", "fillSegment(segment, oldSegment) {\n let oldTemperature = 35;\n if (oldSegment != null)\n oldTemperature = oldSegment.targetTemperature;\n\n if (segment.targetTemperature == null) {\n segment.targetTemperature = oldTemperature + segment.slope * segment.duration;\n }\n\n const deltaTemp = segment.targetTemperature - oldTemperature;\n if (segment.slope == null) {\n segment.slope = deltaTemp / segment.duration;\n }\n\n if (segment.duration == null) {\n\n segment.duration = deltaTemp / segment.slope;\n }\n\n return segment;\n }", "function drawSegment(ctx, points, start, segLen, allLen, dir, smooth, smoothMonotone, connectNulls) {\n\t var prevX;\n\t var prevY;\n\t var cpx0;\n\t var cpy0;\n\t var cpx1;\n\t var cpy1;\n\t var idx = start;\n\t var k = 0;\n\t\n\t for (; k < segLen; k++) {\n\t var x = points[idx * 2];\n\t var y = points[idx * 2 + 1];\n\t\n\t if (idx >= allLen || idx < 0) {\n\t break;\n\t }\n\t\n\t if (isPointNull(x, y)) {\n\t if (connectNulls) {\n\t idx += dir;\n\t continue;\n\t }\n\t\n\t break;\n\t }\n\t\n\t if (idx === start) {\n\t ctx[dir > 0 ? 'moveTo' : 'lineTo'](x, y);\n\t cpx0 = x;\n\t cpy0 = y;\n\t } else {\n\t var dx = x - prevX;\n\t var dy = y - prevY; // Ignore tiny segment.\n\t\n\t if (dx * dx + dy * dy < 0.5) {\n\t idx += dir;\n\t continue;\n\t }\n\t\n\t if (smooth > 0) {\n\t var nextIdx = idx + dir;\n\t var nextX = points[nextIdx * 2];\n\t var nextY = points[nextIdx * 2 + 1];\n\t var tmpK = k + 1;\n\t\n\t if (connectNulls) {\n\t // Find next point not null\n\t while (isPointNull(nextX, nextY) && tmpK < segLen) {\n\t tmpK++;\n\t nextIdx += dir;\n\t nextX = points[nextIdx * 2];\n\t nextY = points[nextIdx * 2 + 1];\n\t }\n\t }\n\t\n\t var ratioNextSeg = 0.5;\n\t var vx = 0;\n\t var vy = 0;\n\t var nextCpx0 = void 0;\n\t var nextCpy0 = void 0; // Is last point\n\t\n\t if (tmpK >= segLen || isPointNull(nextX, nextY)) {\n\t cpx1 = x;\n\t cpy1 = y;\n\t } else {\n\t vx = nextX - prevX;\n\t vy = nextY - prevY;\n\t var dx0 = x - prevX;\n\t var dx1 = nextX - x;\n\t var dy0 = y - prevY;\n\t var dy1 = nextY - y;\n\t var lenPrevSeg = void 0;\n\t var lenNextSeg = void 0;\n\t\n\t if (smoothMonotone === 'x') {\n\t lenPrevSeg = Math.abs(dx0);\n\t lenNextSeg = Math.abs(dx1);\n\t cpx1 = x - lenPrevSeg * smooth;\n\t cpy1 = y;\n\t nextCpx0 = x + lenPrevSeg * smooth;\n\t nextCpy0 = y;\n\t } else if (smoothMonotone === 'y') {\n\t lenPrevSeg = Math.abs(dy0);\n\t lenNextSeg = Math.abs(dy1);\n\t cpx1 = x;\n\t cpy1 = y - lenPrevSeg * smooth;\n\t nextCpx0 = x;\n\t nextCpy0 = y + lenPrevSeg * smooth;\n\t } else {\n\t lenPrevSeg = Math.sqrt(dx0 * dx0 + dy0 * dy0);\n\t lenNextSeg = Math.sqrt(dx1 * dx1 + dy1 * dy1); // Use ratio of seg length\n\t\n\t ratioNextSeg = lenNextSeg / (lenNextSeg + lenPrevSeg);\n\t cpx1 = x - vx * smooth * (1 - ratioNextSeg);\n\t cpy1 = y - vy * smooth * (1 - ratioNextSeg); // cp0 of next segment\n\t\n\t nextCpx0 = x + vx * smooth * ratioNextSeg;\n\t nextCpy0 = y + vy * smooth * ratioNextSeg; // Smooth constraint between point and next point.\n\t // Avoid exceeding extreme after smoothing.\n\t\n\t nextCpx0 = mathMin$5(nextCpx0, mathMax$5(nextX, x));\n\t nextCpy0 = mathMin$5(nextCpy0, mathMax$5(nextY, y));\n\t nextCpx0 = mathMax$5(nextCpx0, mathMin$5(nextX, x));\n\t nextCpy0 = mathMax$5(nextCpy0, mathMin$5(nextY, y)); // Reclaculate cp1 based on the adjusted cp0 of next seg.\n\t\n\t vx = nextCpx0 - x;\n\t vy = nextCpy0 - y;\n\t cpx1 = x - vx * lenPrevSeg / lenNextSeg;\n\t cpy1 = y - vy * lenPrevSeg / lenNextSeg; // Smooth constraint between point and prev point.\n\t // Avoid exceeding extreme after smoothing.\n\t\n\t cpx1 = mathMin$5(cpx1, mathMax$5(prevX, x));\n\t cpy1 = mathMin$5(cpy1, mathMax$5(prevY, y));\n\t cpx1 = mathMax$5(cpx1, mathMin$5(prevX, x));\n\t cpy1 = mathMax$5(cpy1, mathMin$5(prevY, y)); // Adjust next cp0 again.\n\t\n\t vx = x - cpx1;\n\t vy = y - cpy1;\n\t nextCpx0 = x + vx * lenNextSeg / lenPrevSeg;\n\t nextCpy0 = y + vy * lenNextSeg / lenPrevSeg;\n\t }\n\t }\n\t\n\t ctx.bezierCurveTo(cpx0, cpy0, cpx1, cpy1, x, y);\n\t cpx0 = nextCpx0;\n\t cpy0 = nextCpy0;\n\t } else {\n\t ctx.lineTo(x, y);\n\t }\n\t }\n\t\n\t prevX = x;\n\t prevY = y;\n\t idx += dir;\n\t }\n\t\n\t return k;\n\t }", "function compareForwardSlotSegs(seg1, seg2) {\n // put higher-pressure first\n return seg2.forwardPressure - seg1.forwardPressure ||\n // put segments that are closer to initial edge first (and favor ones with no coords yet)\n (seg1.backwardCoord || 0) - (seg2.backwardCoord || 0) ||\n // do normal sorting...\n compareSegs(seg1, seg2);\n }", "function compareForwardSlotSegs(seg1, seg2) {\n\t// put higher-pressure first\n\treturn seg2.forwardPressure - seg1.forwardPressure ||\n\t\t// put segments that are closer to initial edge first (and favor ones with no coords yet)\n\t\t(seg1.backwardCoord || 0) - (seg2.backwardCoord || 0) ||\n\t\t// do normal sorting...\n\t\tcompareSlotSegs(seg1, seg2);\n}", "function compareForwardSlotSegs(seg1, seg2) {\n\t// put higher-pressure first\n\treturn seg2.forwardPressure - seg1.forwardPressure ||\n\t\t// put segments that are closer to initial edge first (and favor ones with no coords yet)\n\t\t(seg1.backwardCoord || 0) - (seg2.backwardCoord || 0) ||\n\t\t// do normal sorting...\n\t\tcompareSlotSegs(seg1, seg2);\n}", "function compareForwardSlotSegs(seg1, seg2) {\n\t// put higher-pressure first\n\treturn seg2.forwardPressure - seg1.forwardPressure ||\n\t\t// put segments that are closer to initial edge first (and favor ones with no coords yet)\n\t\t(seg1.backwardCoord || 0) - (seg2.backwardCoord || 0) ||\n\t\t// do normal sorting...\n\t\tcompareSlotSegs(seg1, seg2);\n}", "function compareForwardSlotSegs(seg1, seg2) {\n\t// put higher-pressure first\n\treturn seg2.forwardPressure - seg1.forwardPressure ||\n\t\t// put segments that are closer to initial edge first (and favor ones with no coords yet)\n\t\t(seg1.backwardCoord || 0) - (seg2.backwardCoord || 0) ||\n\t\t// do normal sorting...\n\t\tcompareSlotSegs(seg1, seg2);\n}", "function compareForwardSlotSegs(seg1, seg2) {\n\t// put higher-pressure first\n\treturn seg2.forwardPressure - seg1.forwardPressure ||\n\t\t// put segments that are closer to initial edge first (and favor ones with no coords yet)\n\t\t(seg1.backwardCoord || 0) - (seg2.backwardCoord || 0) ||\n\t\t// do normal sorting...\n\t\tcompareSlotSegs(seg1, seg2);\n}", "function calculateHorizontals(segments) {\n\t\tvar isRTL = opt('isRTL');\n\t\tfor (var i=0; i<segments.length; i++) {\n\t\t\tvar segment = segments[i];\n\n\t\t\t// Determine functions used for calulating the elements left/right coordinates,\n\t\t\t// depending on whether the view is RTL or not.\n\t\t\t// NOTE:\n\t\t\t// colLeft/colRight returns the coordinate butting up the edge of the cell.\n\t\t\t// colContentLeft/colContentRight is indented a little bit from the edge.\n\t\t\tvar leftFunc = (isRTL ? segment.isEnd : segment.isStart) ? colContentLeft : colLeft;\n\t\t\tvar rightFunc = (isRTL ? segment.isStart : segment.isEnd) ? colContentRight : colRight;\n\n\t\t\tvar left = leftFunc(segment.leftCol);\n\t\t\tvar right = rightFunc(segment.rightCol);\n\t\t\tsegment.left = left;\n\t\t\tsegment.outerWidth = right - left;\n\t\t}\n\t}", "function calculateHorizontals(segments) {\n\t\tvar isRTL = opt('isRTL');\n\t\tfor (var i=0; i<segments.length; i++) {\n\t\t\tvar segment = segments[i];\n\n\t\t\t// Determine functions used for calulating the elements left/right coordinates,\n\t\t\t// depending on whether the view is RTL or not.\n\t\t\t// NOTE:\n\t\t\t// colLeft/colRight returns the coordinate butting up the edge of the cell.\n\t\t\t// colContentLeft/colContentRight is indented a little bit from the edge.\n\t\t\tvar leftFunc = (isRTL ? segment.isEnd : segment.isStart) ? colContentLeft : colLeft;\n\t\t\tvar rightFunc = (isRTL ? segment.isStart : segment.isEnd) ? colContentRight : colRight;\n\n\t\t\tvar left = leftFunc(segment.leftCol);\n\t\t\tvar right = rightFunc(segment.rightCol);\n\t\t\tsegment.left = left;\n\t\t\tsegment.outerWidth = right - left;\n\t\t}\n\t}", "function calculateHorizontals(segments) {\n\t\tvar isRTL = opt('isRTL');\n\t\tfor (var i=0; i<segments.length; i++) {\n\t\t\tvar segment = segments[i];\n\n\t\t\t// Determine functions used for calulating the elements left/right coordinates,\n\t\t\t// depending on whether the view is RTL or not.\n\t\t\t// NOTE:\n\t\t\t// colLeft/colRight returns the coordinate butting up the edge of the cell.\n\t\t\t// colContentLeft/colContentRight is indented a little bit from the edge.\n\t\t\tvar leftFunc = (isRTL ? segment.isEnd : segment.isStart) ? colContentLeft : colLeft;\n\t\t\tvar rightFunc = (isRTL ? segment.isStart : segment.isEnd) ? colContentRight : colRight;\n\n\t\t\tvar left = leftFunc(segment.leftCol);\n\t\t\tvar right = rightFunc(segment.rightCol);\n\t\t\tsegment.left = left;\n\t\t\tsegment.outerWidth = right - left;\n\t\t}\n\t}", "function calculateHorizontals(segments) {\n\t\tvar isRTL = opt('isRTL');\n\t\tfor (var i=0; i<segments.length; i++) {\n\t\t\tvar segment = segments[i];\n\n\t\t\t// Determine functions used for calulating the elements left/right coordinates,\n\t\t\t// depending on whether the view is RTL or not.\n\t\t\t// NOTE:\n\t\t\t// colLeft/colRight returns the coordinate butting up the edge of the cell.\n\t\t\t// colContentLeft/colContentRight is indented a little bit from the edge.\n\t\t\tvar leftFunc = (isRTL ? segment.isEnd : segment.isStart) ? colContentLeft : colLeft;\n\t\t\tvar rightFunc = (isRTL ? segment.isStart : segment.isEnd) ? colContentRight : colRight;\n\n\t\t\tvar left = leftFunc(segment.leftCol);\n\t\t\tvar right = rightFunc(segment.rightCol);\n\t\t\tsegment.left = left;\n\t\t\tsegment.outerWidth = right - left;\n\t\t}\n\t}", "function calculateHorizontals(segments) {\n\t\tvar isRTL = opt('isRTL');\n\t\tfor (var i=0; i<segments.length; i++) {\n\t\t\tvar segment = segments[i];\n\n\t\t\t// Determine functions used for calulating the elements left/right coordinates,\n\t\t\t// depending on whether the view is RTL or not.\n\t\t\t// NOTE:\n\t\t\t// colLeft/colRight returns the coordinate butting up the edge of the cell.\n\t\t\t// colContentLeft/colContentRight is indented a little bit from the edge.\n\t\t\tvar leftFunc = (isRTL ? segment.isEnd : segment.isStart) ? colContentLeft : colLeft;\n\t\t\tvar rightFunc = (isRTL ? segment.isStart : segment.isEnd) ? colContentRight : colRight;\n\n\t\t\tvar left = leftFunc(segment.leftCol);\n\t\t\tvar right = rightFunc(segment.rightCol);\n\t\t\tsegment.left = left;\n\t\t\tsegment.outerWidth = right - left;\n\t\t}\n\t}", "computeControlSegments() {\n if (this.controlSteps.length) {\n this.controlSegments = [];\n let segment = { start : 0, end : 0, human : this.controlSteps[0] }\n for (let i = 0; i < this.controlSteps.length; ++i) {\n const humanStep = this.controlSteps[i];\n if (humanStep != segment.human) {\n this.controlSegments.push(segment);\n segment = { start : i, end : i, human : humanStep };\n } else {\n segment.end = i;\n }\n }\n this.controlSegments.push(segment);\n }\n }", "function calculateDrawingDirection(p1, p2) {\n var deltaY = p1.y - p2.y;\n var deltaX = p1.x - p2.x;\n var angle = Math.atan2(deltaY, deltaX) * 180 / Math.PI;\n /*\n ANGLES:\n N 90\n W 0\n E (180, -180)\n S (-90)\n */\n if (angle >= 112 && angle < 157) {\n return 'NE';\n } else if (angle >= 67 && angle < 112) {\n return 'N';\n } else if (angle >= 22 && angle < 67) {\n return 'NW';\n } else if (angle >= -22 && angle < 22) {\n return 'W';\n } else if (angle >= -67 && angle < -22) {\n return 'SW';\n } else if (angle >= -112 && angle < -67) {\n return 'S';\n } else if (angle >= -157 && angle < -112) {\n return 'SE';\n } else {\n return 'E';\n }\n\n return false;\n }", "function compareForwardSlotSegs(seg1, seg2) {\n\t// put higher-pressure first\n\treturn seg2.forwardPressure - seg1.forwardPressure ||\n\t\t// put segments that are closer to initial edge first (and favor ones with no coords yet)\n\t\t(seg1.backwardCoord || 0) - (seg2.backwardCoord || 0) ||\n\t\t// do normal sorting...\n\t\tcompareSegs(seg1, seg2);\n}", "function getDirection(x1, y1, x2, y2) {\n var dx = x2 - x1;\n var dy = y2 - y1;\n if (dx < 0) {\n if (dy < 0) return 7;\n else if (dy == 0) return 6;\n else return 5;\n }\n else if (dx == 0) {\n if (dy < 0) return 0;\n else if (dy == 0) return -1;\n else return 4;\n }\n else {\n if (dy < 0) return 1;\n else if (dy == 0) return 2;\n else return 3;\n }\n}", "calc(lindenmayer_string, segment_length) {\n\n // Initialize shape path array\n // This stores the x,y coordinates for each step\n var path = new Array();\n\n var pos = 0;\n\n let x = 0;\n let y = 0;\n\n var current_angle = 0;\n\n while (pos < lindenmayer_string.length-1) {\n\n if (lindenmayer_string[pos] == 'F') {\n\n // Draw forward\n\n // polar to cartesian based on step and current_angle:\n let x1 = x + segment_length * cos(radians(current_angle));\n let y1 = y + segment_length * sin(radians(current_angle));\n\n path.push([x1, y1]);\n\n // update the turtle's position:\n x = x1;\n y = y1;\n\n } else if (lindenmayer_string[pos] == '+') {\n\n // Turn left\n current_angle += this.curve.draw.angle;\n\n } else if (lindenmayer_string[pos] == '-') {\n\n // Turn right\n current_angle -= this.curve.draw.angle;\n }\n\n pos++;\n }\n\n // Translate path to center of drawing area\n path = this.translate_to_center(path);\n\n // Rotate path around the center of drawing area\n if (this.config.rotate.value > 0) {\n path = this.rotate_around_center(path);\n path = this.translate_to_center(path);\n }\n\n return path;\n }", "function getDotPos(moduleNumber) {\n //find whether module is reversible\n //find module start and end positions\n //if irreversible:\n //semicircular path\n //else:\n //if startX == endX:\n //vertical path\n //else:\n //if startY == endY:\n //horizontal path\n //else:\n //weird path\n var startX = xCoords[moduleNumber];\n var startY = yCoords[moduleNumber];\n var endX;\n var endY;\n var x;\n var y;\n if (moduleNumber === xCoords.length - 1) {\n endX = xCoords[moduleNumber];\n endY = yCoords[moduleNumber] + 1;\n } else {\n endX = xCoords[moduleNumber + 1];\n endY = yCoords[moduleNumber + 1];\n }\n var revMod = revList[moduleNumber];\n if (revMod.toLowerCase() === \"irreversible\") {\n var currSlider = document.getElementById(enzymeList[moduleNumber]);\n var irrPositionChange = positionChange * (parseInt(currSlider.value) / 50) * (Math.PI / 2);\n checkRatio(moduleNumber);\n if (rxnDir[moduleNumber] === 1) {\n directions[moduleNumber] = 1;\n }\n if (dotPositions[moduleNumber][0] <= (startX * 75 + canvas.clientWidth / 2 + 50)) {\n if (dotPositions[moduleNumber][1] === startY * 100) {\n dotPositions[moduleNumber][0] += directions[moduleNumber] * irrPositionChange;\n } else {\n dotPositions[moduleNumber][0] -= directions[moduleNumber] * irrPositionChange;\n }\n } else {\n dotPositions[moduleNumber][1] += directions[moduleNumber] * irrPositionChange;\n dotPositions[moduleNumber][0] = calculateX(dotPositions[moduleNumber][1],\n (startX * 75 + canvas.clientWidth / 2 + 50), startY * 100 + 50);\n }\n if (dotPositions[moduleNumber][1] >= endY * 100 && dotPositions[moduleNumber][0] <\n (endX * 75) + canvas.clientWidth / 2) { //if reaches end of reaction\n prodSubValues[moduleNumber][0] += 1;\n prodSubValues[moduleNumber][1] -= 1;\n if (moduleNumber != prodSubValues.length - 1) {\n prodSubValues[moduleNumber + 1][1] += 1;\n }\n if (moduleNumber != 0) {\n prodSubValues[moduleNumber - 1][0] -= 1;\n }\n \n dotPositions[moduleNumber] = [startX*75+canvas.clientWidth/2, startY*100];\n checkRatio(moduleNumber);\n if (rxnDir[moduleNumber] != 1) {\n directions[moduleNumber] = 0;\n }\n }\n } else {\n if (startX === endX) { //vertical\n dotPositions[moduleNumber][1] += directions[moduleNumber] * positionChange;\n if (dotPositions[moduleNumber][1] >= endY * 100) {\n prodSubValues[moduleNumber][0] += 1;\n prodSubValues[moduleNumber][1] -= 1;\n if (moduleNumber != prodSubValues.length - 1) {\n prodSubValues[moduleNumber + 1][1] += 1;\n }\n if (moduleNumber != 0) {\n prodSubValues[moduleNumber - 1][0] -= 1;\n }\n checkRatio(moduleNumber);\n if (rxnDir[moduleNumber] === 0 || rxnDir[moduleNumber] === -1) {\n directions[moduleNumber] = -1;\n } else {\n dotPositions[moduleNumber][0] = startX * 75 + canvas.clientWidth / 2;\n dotPositions[moduleNumber][1] = startY * 100;\n directions[moduleNumber] = 1;\n }\n } else if (dotPositions[moduleNumber][1] <= startY * 100) {\n prodSubValues[moduleNumber][0] -= 1;\n prodSubValues[moduleNumber][1] += 1;\n if (moduleNumber != prodSubValues.length - 1) {\n prodSubValues[moduleNumber + 1][1] -= 1;\n }\n if (moduleNumber != 0) {\n prodSubValues[moduleNumber - 1][0] += 1;\n }\n checkRatio(moduleNumber);\n if (rxnDir[moduleNumber] === 0 || rxnDir[moduleNumber] === 1) {\n directions[moduleNumber] = 1;\n } else {\n dotPositions[moduleNumber][0] = endX * 75 + canvas.clientWidth / 2;\n dotPositions[moduleNumber][1] = endY * 100;\n directions[moduleNumber] = -1;\n }\n }\n } else {\n if (startY === endY) { //horizontal\n var currPosChange = (3/2) * positionChange\n dotPositions[moduleNumber][0] += directions[moduleNumber] * currPosChange;\n if (dotPositions[moduleNumber][0] >= (endX * 75) + canvas.clientWidth / 2) {\n prodSubValues[moduleNumber][0] += 1;\n prodSubValues[moduleNumber][1] -= 1;\n if (moduleNumber != prodSubValues.length - 1) {\n prodSubValues[moduleNumber + 1][1] += 1;\n }\n if (moduleNumber != 0) {\n prodSubValues[moduleNumber - 1][0] -= 1;\n }checkRatio(moduleNumber);\n if (rxnDir[moduleNumber] === 0 || rxnDir[moduleNumber] === -1) {\n directions[moduleNumber] = -1;\n } else {\n dotPositions[moduleNumber][0] = startX * 75 + canvas.clientWidth / 2;\n dotPositions[moduleNumber][1] = startY * 100;\n directions[moduleNumber] = 1;\n }\n } else if (dotPositions[moduleNumber][0] <= (startX * 75) +\n canvas.clientWidth / 2) {\n prodSubValues[moduleNumber][0] -= 1;\n prodSubValues[moduleNumber][1] += 1;\n if (moduleNumber != prodSubValues.length - 1) {\n prodSubValues[moduleNumber + 1][1] -= 1;\n }\n if (moduleNumber != 0) {\n prodSubValues[moduleNumber - 1][0] += 1;\n }\n checkRatio(moduleNumber);\n if (rxnDir[moduleNumber] === 0 || rxnDir[moduleNumber] === 1) {\n directions[moduleNumber] = 1;\n } else {\n dotPositions[moduleNumber][0] = endX * 75 + canvas.clientWidth / 2;\n dotPositions[moduleNumber][1] = endY * 100;\n directions[moduleNumber] = -1;\n }\n }\n } else { //weird\n var midPoint = (yCoords[moduleNumber] * 100) + 50;\n var botMidPoint = midPoint + 25;\n if (dotPositions[moduleNumber][2] === 'undefined') { //If the reaction has not reached the midpoint before\n dotPositions[moduleNumber].append(0);\n dotPositions[moduleNumber].append(0);\n }\n if (dotPositions[moduleNumber][1] >= midPoint) {\n dotPositions[moduleNumber][1] += directions[moduleNumber] * positionChange;\n if (dotPositions[moduleNumber][1] < botMidPoint) {\n dotPositions[moduleNumber][0] = (startX*75+canvas.clientWidth/2) +\n directions[moduleNumber] * 3 * (dotPositions[moduleNumber][1] -\n midPoint);\n }\n dotPositions[moduleNumber][3] = dotPositions[moduleNumber][1];\n if (dotPositions[moduleNumber][3] < botMidPoint) {\n dotPositions[moduleNumber][2] = (startX*75+canvas.clientWidth/2) -\n directions[moduleNumber] * 3 * (dotPositions[moduleNumber][1] -\n midPoint);\n }\n } else {\n dotPositions[moduleNumber][0] = startX*75+canvas.clientWidth/2;\n dotPositions[moduleNumber][1] += directions[moduleNumber] * positionChange;\n dotPositions[moduleNumber][2] = startX*75+canvas.clientWidth/2;\n dotPositions[moduleNumber][3] = dotPositions[moduleNumber][1];\n }\n if (dotPositions[moduleNumber][1] >= endY * 100 && dotPositions[moduleNumber][0] >=\n (endX * 75) + canvas.clientWidth / 2) {\n prodSubValues[moduleNumber][0] += 1;\n prodSubValues[moduleNumber][1] -= 1;\n if (moduleNumber != prodSubValues.length - 1) {\n prodSubValues[moduleNumber + 1][1] += 1;\n }\n if (moduleNumber != 0) {\n prodSubValues[moduleNumber - 1][0] -= 1;\n }\n checkRatio(moduleNumber);\n if (rxnDir[moduleNumber] === 0 || rxnDir[moduleNumber] === -1) {\n directions[moduleNumber] = -1;\n } else {\n dotPositions[moduleNumber][0] = startX * 75 + canvas.clientWidth / 2;\n dotPositions[moduleNumber][1] = startY * 100;\n dotPositions[moduleNumber][2] = startX * 75 + canvas.clientWidth / 2;\n dotPositions[moduleNumber][3] = startY * 100;\n directions[moduleNumber] = 1;\n }\n } else if (dotPositions[moduleNumber][1] <= startY * 100 &&\n dotPositions[moduleNumber][0] <= (startX * 75) +\n canvas.clientWidth / 2) {\n prodSubValues[moduleNumber][0] -= 1;\n prodSubValues[moduleNumber][1] += 1;\n if (moduleNumber != prodSubValues.length - 1) {\n prodSubValues[moduleNumber + 1][1] -= 1;\n }\n if (moduleNumber != 0) {\n prodSubValues[moduleNumber - 1][0] += 1;\n }\n checkRatio(moduleNumber);\n if (rxnDir[moduleNumber] === 0 || rxnDir[moduleNumber] === 1) {\n directions[moduleNumber] = 1;\n } else {\n dotPositions[moduleNumber][0] = endX * 75 + canvas.clientWidth / 2;\n dotPositions[moduleNumber][1] = endY * 100;\n dotPositions[moduleNumber][2] = startX * 75 + canvas.clientWidth / 2;\n dotPositions[moduleNumber][3] = startY * 100;\n directions[moduleNumber] = -1;\n }\n }\n }\n }\n }\n if (moduleNumber === 0) {\n prodSubValues[moduleNumber][1] += 1;\n if (prodSubValues[moduleNumber][1] >= 5) {\n prodSubValues[moduleNumber][1] = 5;\n }\n }\n if (moduleNumber === prodSubValues.length - 1) {\n prodSubValues[moduleNumber][0] -= 1;\n if (prodSubValues[moduleNumber][0] <= 1) {\n prodSubValues[moduleNumber][0] = 1;\n }\n }\n}", "function fresh_seg_or_upward_cusp() {\r\n\t\t\t// trCurrent has at most 1 upper neighbor\r\n\t\t\t//\tand should also have at least 1, since the high-point trapezoid\r\n\t\t\t//\thas been split off another one, which is now above\r\n\t\t\tvar trUpper = trCurrent.uL || trCurrent.uR;\r\n\r\n\t\t\t// trNewLeft and trNewRight CANNOT have been extended from above\r\n\t\t\tif ( trUpper.dL && trUpper.dR ) {\r\n\t\t\t\t// upward cusp: top forms a triangle\r\n\r\n\t\t\t\t// ATTENTION: the decision whether trNewLeft or trNewRight is the\r\n\t\t\t\t//\ttriangle trapezoid formed by the two segments has already been taken\r\n\t\t\t\t//\twhen selecting trCurrent as the left or right lower neighbor to trUpper !!\r\n\r\n\t\t\t\tif ( trCurrent == trUpper.dL ) {\r\n\t\t\t\t\t//\t*** Case: FUC_UC_LEFT; prev: ----\r\n\t\t\t\t\t// console.log( \"fresh_seg_or_upward_cusp: upward cusp, new seg to the left!\" );\r\n\t\t\t\t\t//\t\t upper\r\n\t\t\t\t\t// -------*-------\r\n\t\t\t\t\t//\t\t + \\\r\n\t\t\t\t\t//\t NL + \\\r\n\t\t\t\t\t//\t\t +\tNR \\\r\n\t\t\t\t\t//\t\t+\t\t\\\r\n\t\t\t\t\ttrNewRight.uL\t= null;\t\t\t// setAbove; trNewRight.uR, trNewLeft unchanged\r\n\t\t\t\t\ttrUpper.dL\t\t= trNewLeft;\t// setBelow; dR: unchanged, NEVER null\r\n\t\t\t\t} else {\r\n\t\t\t\t\t//\t*** Case: FUC_UC_RIGHT; prev: ----\r\n\t\t\t\t\t// console.log( \"fresh_seg_or_upward_cusp: upward cusp, new seg from the right!\" );\r\n\t\t\t\t\t//\t\t upper\r\n\t\t\t\t\t// -------*-------\r\n\t\t\t\t\t//\t\t / +\r\n\t\t\t\t\t//\t\t / +\t NR\r\n\t\t\t\t\t//\t\t /\tNL +\r\n\t\t\t\t\t//\t\t/\t\t+\r\n\t\t\t\t\ttrNewLeft.uR\t= null;\t\t\t// setAbove; trNewLeft.uL, trNewRight unchanged\r\n\t\t\t\t\ttrUpper.dR\t\t= trNewRight;\t// setBelow; dL: unchanged, NEVER null\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\t//\t*** Case: FUC_FS; prev: \"splitOffLower\"\r\n\t\t\t\t// console.log( \"fresh_seg_or_upward_cusp: fresh segment, high adjacent segment still missing\" );\r\n\t\t\t\t//\t\t upper\r\n\t\t\t\t// -------*-------\r\n\t\t\t\t//\t\t +\r\n\t\t\t\t//\t NL +\r\n\t\t\t\t//\t\t +\tNR\r\n\t\t\t\t//\t\t+\r\n\t\t\t\ttrNewRight.uL = null;\t\t\t// setAbove; trNewLeft unchanged, set by \"splitOffLower\"\r\n\t\t\t\ttrNewRight.uR = trUpper;\r\n\t\t\t\ttrUpper.dR = trNewRight;\t\t// setBelow; trUpper.dL unchanged, set by \"splitOffLower\"\r\n\t\t\t}\r\n \t\t}", "function fresh_seg_or_upward_cusp() {\r\n\t\t\t// trCurrent has at most 1 upper neighbor\r\n\t\t\t//\tand should also have at least 1, since the high-point trapezoid\r\n\t\t\t//\thas been split off another one, which is now above\r\n\t\t\tvar trUpper = trCurrent.uL || trCurrent.uR;\r\n\r\n\t\t\t// trNewLeft and trNewRight CANNOT have been extended from above\r\n\t\t\tif ( trUpper.dL && trUpper.dR ) {\r\n\t\t\t\t// upward cusp: top forms a triangle\r\n\r\n\t\t\t\t// ATTENTION: the decision whether trNewLeft or trNewRight is the\r\n\t\t\t\t//\ttriangle trapezoid formed by the two segments has already been taken\r\n\t\t\t\t//\twhen selecting trCurrent as the left or right lower neighbor to trUpper !!\r\n\r\n\t\t\t\tif ( trCurrent == trUpper.dL ) {\r\n\t\t\t\t\t//\t*** Case: FUC_UC_LEFT; prev: ----\r\n\t\t\t\t\t// console.log( \"fresh_seg_or_upward_cusp: upward cusp, new seg to the left!\" );\r\n\t\t\t\t\t//\t\t upper\r\n\t\t\t\t\t// -------*-------\r\n\t\t\t\t\t//\t\t + \\\r\n\t\t\t\t\t//\t NL + \\\r\n\t\t\t\t\t//\t\t +\tNR \\\r\n\t\t\t\t\t//\t\t+\t\t\\\r\n\t\t\t\t\ttrNewRight.uL\t= null;\t\t\t// setAbove; trNewRight.uR, trNewLeft unchanged\r\n\t\t\t\t\ttrUpper.dL\t\t= trNewLeft;\t// setBelow; dR: unchanged, NEVER null\r\n\t\t\t\t} else {\r\n\t\t\t\t\t//\t*** Case: FUC_UC_RIGHT; prev: ----\r\n\t\t\t\t\t// console.log( \"fresh_seg_or_upward_cusp: upward cusp, new seg from the right!\" );\r\n\t\t\t\t\t//\t\t upper\r\n\t\t\t\t\t// -------*-------\r\n\t\t\t\t\t//\t\t / +\r\n\t\t\t\t\t//\t\t / +\t NR\r\n\t\t\t\t\t//\t\t /\tNL +\r\n\t\t\t\t\t//\t\t/\t\t+\r\n\t\t\t\t\ttrNewLeft.uR\t= null;\t\t\t// setAbove; trNewLeft.uL, trNewRight unchanged\r\n\t\t\t\t\ttrUpper.dR\t\t= trNewRight;\t// setBelow; dL: unchanged, NEVER null\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\t//\t*** Case: FUC_FS; prev: \"splitOffLower\"\r\n\t\t\t\t// console.log( \"fresh_seg_or_upward_cusp: fresh segment, high adjacent segment still missing\" );\r\n\t\t\t\t//\t\t upper\r\n\t\t\t\t// -------*-------\r\n\t\t\t\t//\t\t +\r\n\t\t\t\t//\t NL +\r\n\t\t\t\t//\t\t +\tNR\r\n\t\t\t\t//\t\t+\r\n\t\t\t\ttrNewRight.uL = null;\t\t\t// setAbove; trNewLeft unchanged, set by \"splitOffLower\"\r\n\t\t\t\ttrNewRight.uR = trUpper;\r\n\t\t\t\ttrUpper.dR = trNewRight;\t\t// setBelow; trUpper.dL unchanged, set by \"splitOffLower\"\r\n\t\t\t}\r\n \t\t}", "layoutEventsInBands(events) {\n let verticalPosition = 0;\n\n do {\n let eventIndex = 0,\n event = events[0];\n\n while (event) {\n // Apply band height to the event cfg\n event.top = this.bandIndexToPxConvertFn.call(this.bandIndexToPxConvertThisObj || this, verticalPosition, event.eventRecord); // Remove it from the array and continue searching\n\n events.splice(eventIndex, 1);\n eventIndex = this.findClosestSuccessor(event, events);\n event = events[eventIndex];\n }\n\n verticalPosition++;\n } while (events.length > 0); // Done!\n\n return verticalPosition;\n }", "function getGradient( startColor, endColor, steps ) {\n var gradient = [];\n\n var startColorRgb = hexToRgb( startColor );\n var endColorRgb = hexToRgb( endColor );\n\n ramp.push( [ startColorRgb.r, startColorRgb.g, startColorRgb.b ] );\n\n var rInc = Math.round( ( endColorRgb.r - startColorRgb.r ) / ( steps + 1 ) );\n var gInc = Math.round( ( endColorRgb.g - startColorRgb.g ) / ( steps + 1 ) );\n var bInc = Math.round( ( endColorRgb.b - startColorRgb.b ) / ( steps + 1 ) );\n\n for ( var i = 0; i < steps; i++ ) {\n startColorRgb.r += rInc;\n startColorRgb.g += gInc;\n startColorRgb.b += bInc;\n\n ramp.push( [ startColorRgb.r, startColorRgb.g, startColorRgb.b ] );\n }\n\n ramp.push( [ endColorRgb.r, endColorRgb.g, endColorRgb.b ] );\n console.log( 'ramp', ramp );\n\n return ramp;\n}", "calcRisingPositons() {\n this.risingPositions = []\n let max = 120; //Per my decision: \"Highest\" point should be at 70 + buffer 50 for gradient\n let min = 500;\n let interval = (min - max) / this.risingSunColors.length - 1;\n let nextPosition = min - interval;\n while(nextPosition >= max) {\n this.risingPositions.push(nextPosition);\n nextPosition -= interval * 1;\n } \n }", "function computeSegCoords(segs, dayDate, slatCoords, eventMinHeight, eventOrderSpecs) {\n computeSegVerticals(segs, dayDate, slatCoords, eventMinHeight);\n return computeSegHorizontals(segs, eventOrderSpecs); // requires top/bottom from computeSegVerticals\n }", "function fresh_seg_or_upward_cusp() {\n\t\t\t// trCurrent has at most 1 upper neighbor\n\t\t\t//\tand should also have at least 1, since the high-point trapezoid\n\t\t\t//\thas been split off another one, which is now above\n\t\t\tvar trUpper = trCurrent.uL || trCurrent.uR;\n\n\t\t\t// trNewLeft and trNewRight CANNOT have been extended from above\n\t\t\tif ( trUpper.dL && trUpper.dR ) {\n\t\t\t\t// upward cusp: top forms a triangle\n\n\t\t\t\t// ATTENTION: the decision whether trNewLeft or trNewRight is the\n\t\t\t\t//\ttriangle trapezoid formed by the two segments has already been taken\n\t\t\t\t//\twhen selecting trCurrent as the left or right lower neighbor to trUpper !!\n\n\t\t\t\tif ( trCurrent == trUpper.dL ) {\n\t\t\t\t\t//\t*** Case: FUC_UC_LEFT; prev: ----\n\t\t\t\t\t// console.log( \"fresh_seg_or_upward_cusp: upward cusp, new seg to the left!\" );\n\t\t\t\t\t//\t\t upper\n\t\t\t\t\t// -------*-------\n\t\t\t\t\t//\t\t + \\\n\t\t\t\t\t//\t NL + \\\n\t\t\t\t\t//\t\t +\tNR \\\n\t\t\t\t\t//\t\t+\t\t\\\n\t\t\t\t\ttrNewRight.uL\t= null;\t\t\t// setAbove; trNewRight.uR, trNewLeft unchanged\n\t\t\t\t\ttrUpper.dL\t\t= trNewLeft;\t// setBelow; dR: unchanged, NEVER null\n\t\t\t\t} else {\n\t\t\t\t\t//\t*** Case: FUC_UC_RIGHT; prev: ----\n\t\t\t\t\t// console.log( \"fresh_seg_or_upward_cusp: upward cusp, new seg from the right!\" );\n\t\t\t\t\t//\t\t upper\n\t\t\t\t\t// -------*-------\n\t\t\t\t\t//\t\t / +\n\t\t\t\t\t//\t\t / +\t NR\n\t\t\t\t\t//\t\t /\tNL +\n\t\t\t\t\t//\t\t/\t\t+\n\t\t\t\t\ttrNewLeft.uR\t= null;\t\t\t// setAbove; trNewLeft.uL, trNewRight unchanged\n\t\t\t\t\ttrUpper.dR\t\t= trNewRight;\t// setBelow; dL: unchanged, NEVER null\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t//\t*** Case: FUC_FS; prev: \"splitOffLower\"\n\t\t\t\t// console.log( \"fresh_seg_or_upward_cusp: fresh segment, high adjacent segment still missing\" );\n\t\t\t\t//\t\t upper\n\t\t\t\t// -------*-------\n\t\t\t\t//\t\t +\n\t\t\t\t//\t NL +\n\t\t\t\t//\t\t +\tNR\n\t\t\t\t//\t\t+\n\t\t\t\ttrNewRight.uL = null;\t\t\t// setAbove; trNewLeft unchanged, set by \"splitOffLower\"\n\t\t\t\ttrNewRight.uR = trUpper;\n\t\t\t\ttrUpper.dR = trNewRight;\t\t// setBelow; trUpper.dL unchanged, set by \"splitOffLower\"\n\t\t\t}\n \t\t}", "slideVertex(pt) {\n const slope = this.axisOfSymmetrySlope();\n const vertex = new Pt();\n vertex.x = Math.abs(slope) < 1 ? pt.x : this.axisOfSymmetry(pt.y, true);\n vertex.y = Math.abs(slope) < 1 ? this.axisOfSymmetry(pt.x) : pt.y;\n const midPt = this.startPt.ptBetween(this.endPt);\n let vertexHeight = vertex.distanceTo(midPt);\n if (vertex.distanceTo(this.head.ptBetween(this.tail)) < 10) {\n this.controlPt = this.head.ptBetween(this.tail);\n vertexHeight = 0;\n } else {\n const c1 = midPt.ptAlongSlope(slope, vertexHeight * 2);\n const c2 = midPt.ptAlongSlope(slope, vertexHeight * -2);\n this.controlPt = vertex.closestTo(c1, c2);\n }\n this.controlDistanceFromMid = vertexHeight * 2;\n const head = this.head;\n const tail = this.tail;\n if (head.y < tail.y) {\n this.controlIsForward = this.controlPt.x >= midPt.x;\n } else if (head.y === tail.y && head.x > tail.x) {\n this.controlIsForward = this.controlPt.y >= midPt.y;\n } else if (head.y === tail.y && head.x < tail.x) {\n this.controlIsForward = this.controlPt.y < midPt.y;\n } else {\n this.controlIsForward = this.controlPt.x <= midPt.x;\n }\n this.calculateEndspointsArrowAndLabel();\n }", "function barra() {\n var contenedor = document.getElementsByClassName(\"barraSlider\")[0];\n var control = document.getElementsByClassName(\"controlBarraSlider\")[0];\n var activo = false;\n var xInicio = 0;\n var limite = (document.getElementsByClassName(\"lineaBarraSlider\")[0].offsetWidth) - document.getElementsByClassName(\"controlBarraSlider\")[0].offsetWidth;\n var banderaSegmentos = 0;\n var banderaSegmentosFin = 0;\n var contadorSegmentos = 1;\n\n //eventos para interactuar con el drag\n contenedor.addEventListener(\"touchstart\", dragStart, false);\n contenedor.addEventListener(\"touchend\", dragEnd, false);\n contenedor.addEventListener(\"touchmove\", drag, false);\n contenedor.addEventListener(\"mousedown\", dragStart, false);\n contenedor.addEventListener(\"mouseup\", dragEnd, false);\n contenedor.addEventListener(\"mousemove\", drag, false);\n\n //inicia el drag\n function dragStart(e) {\n if (e.type === \"touchstart\") {\n xInicio = e.touches[0].clientX - xOffset;\n } else {\n xInicio = e.clientX - xOffset;\n }\n\n if (e.target === control) {\n activo = true;\n }\n }\n\n //termina el drag\n function dragEnd() {\n xInicio = xActual;\n activo = false;\n }\n\n //en el momento que se esta haciendo el drag\n function drag(e) {\n if (activo) {\n \n e.preventDefault();\n if (e.type === \"touchmove\") {\n if (xActual <= limite && xActual >= 0) {\n xActual = e.touches[0].clientX - xInicio;\n } else {\n if (xActual >= limite) {\n xActual = limite;\n } else if(xActual <= 0) {\n xActual = 0;\n }\n }\n if (xActual > limite) {\n xActual = limite;\n } else if (xActual <= 0) {\n xActual = 0;\n }\n\n } else {\n if (xActual <= limite && xActual >= 0) {\n xActual = e.clientX - xInicio;\n\n } else {\n if (xActual >= limite) {\n xActual = limite;\n } else if (xActual <= 0) {\n xActual = 0;\n }\n }\n\n }\n xOffset = xActual;\n\n actualizarPosicion(xActual, control);\n }\n }\n\n function actualizarPosicion(posicionX, elemento) {\n elemento.style.transform = \"translate3d(\" + posicionX + \"px,\" + 0 + \"px, 0)\";\n calcularMovimientos(posicionX);\n }\n\n //esto se usa en calcularMovimientos();\n var limites = [];\n for (var i = 0; i < cantidadElementos; i++) {\n limites.push(Math.round(segmento * (i + 1))); \n }\n\n var banderaFor = 0;\n function calcularMovimientos(posicionX) {\n\n //segmento, es el espacio asignado dentro de la barra de control para cada slide \n if (posicionX < (segmento * contadorSegmentos) && posicionX >= (segmento * banderaSegmentos)) {\n } else {\n if (posicionX > (segmento * contadorSegmentos)) {\n\n contadorSegmentos = contadorSegmentos + 1;\n banderaSegmentos = banderaSegmentos + 1; \n controles(\"derechaSlider\", 1, \"slide\");\n } else {\n\n contadorSegmentos = contadorSegmentos - 1;\n banderaSegmentos = banderaSegmentos - 1;\n controles(\"izquierdaSlider\", 1, \"slide\");\n\n } \n }\n\n }\n}", "get endB() { return Math.max(this.fromB, this.toB - 1); }", "function lastY() { return (segments.length == 0) ? 0 : segments[segments.length-1].p2.world.y; }" ]
[ "0.72145176", "0.6889387", "0.68076193", "0.5324146", "0.50055045", "0.4932794", "0.48299918", "0.4652368", "0.46401173", "0.46400362", "0.45985082", "0.45467505", "0.454511", "0.45049733", "0.4497851", "0.4469056", "0.4469056", "0.44521376", "0.44521376", "0.44521376", "0.44322932", "0.44322932", "0.44322932", "0.44176462", "0.44176462", "0.44176462", "0.44176462", "0.44176462", "0.44176462", "0.44176462", "0.44176462", "0.44176462", "0.44176462", "0.44176462", "0.44176462", "0.44176462", "0.44133556", "0.44041264", "0.4389809", "0.43893325", "0.43805438", "0.43805438", "0.43805438", "0.43636993", "0.43410134", "0.43376473", "0.43313485", "0.4312133", "0.4312133", "0.4307135", "0.42976305", "0.42976305", "0.42976305", "0.4279145", "0.42761922", "0.42621654", "0.4253032", "0.42255768", "0.41889727", "0.4182025", "0.41660982", "0.4165591", "0.4165591", "0.4165276", "0.41426098", "0.41252267", "0.41249472", "0.41249362", "0.41193208", "0.41193208", "0.41193208", "0.41193208", "0.41193208", "0.4118771", "0.4118771", "0.4118771", "0.4118771", "0.4118771", "0.4115983", "0.41105223", "0.40913063", "0.40896904", "0.40844864", "0.40765712", "0.40625602", "0.40625602", "0.40622514", "0.40584177", "0.40551662", "0.40457416", "0.40443712", "0.40358183", "0.40326604", "0.4031027", "0.40209702" ]
0.7148721
6
Outputs a flat array of segments, from lowest to highest level
function flattenSlotSegLevels(levels) { var segs = []; var i, level; var j; for (i=0; i<levels.length; i++) { level = levels[i]; for (j=0; j<level.length; j++) { segs.push(level[j]); } } return segs; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function n(a){var b,c,d,e=M(),f=[];\n// group segments by row\nfor(b=0;b<a.length;b++)c=a[b],d=c.row,c.element&&(// was rendered?\nf[d]?\n// already other segments. append to array\nf[d].push(c):\n// first segment in row. create new array\nf[d]=[c]);\n// sort each row\nfor(d=0;d<e;d++)f[d]=o(f[d]||[]);return f}", "function buildSegments(events) {\n\t\tvar segments = [];\n\t\tfor (var i=0; i<events.length; i++) {\n\t\t\tvar eventSegments = buildSegmentsForEvent(events[i]);\n\t\t\tsegments.push.apply(segments, eventSegments); // append an array to an array\n\t\t}\n\t\treturn segments;\n\t}", "function buildSegments(events) {\n\t\tvar segments = [];\n\t\tfor (var i=0; i<events.length; i++) {\n\t\t\tvar eventSegments = buildSegmentsForEvent(events[i]);\n\t\t\tsegments.push.apply(segments, eventSegments); // append an array to an array\n\t\t}\n\t\treturn segments;\n\t}", "function buildSegments(events) {\n\t\tvar segments = [];\n\t\tfor (var i=0; i<events.length; i++) {\n\t\t\tvar eventSegments = buildSegmentsForEvent(events[i]);\n\t\t\tsegments.push.apply(segments, eventSegments); // append an array to an array\n\t\t}\n\t\treturn segments;\n\t}", "function buildSegments(events) {\n\t\tvar segments = [];\n\t\tfor (var i=0; i<events.length; i++) {\n\t\t\tvar eventSegments = buildSegmentsForEvent(events[i]);\n\t\t\tsegments.push.apply(segments, eventSegments); // append an array to an array\n\t\t}\n\t\treturn segments;\n\t}", "function buildSegments(events) {\n\t\tvar segments = [];\n\t\tfor (var i=0; i<events.length; i++) {\n\t\t\tvar eventSegments = buildSegmentsForEvent(events[i]);\n\t\t\tsegments.push.apply(segments, eventSegments); // append an array to an array\n\t\t}\n\t\treturn segments;\n\t}", "function split(array, segments) {\n segments = segments || 2;\n\n var output = [],\n segmentLength = Math.floor(array.length / segments),\n remainder = array.length % segments,\n start = 0,\n i = 0,\n n = array.length,\n len;\n\n while (start < n) {\n len = i++ < remainder ? segmentLength + 1 : segmentLength;\n output.push(array.slice(start, start + len));\n start += len;\n }\n\n return output;\n }", "function createSegmentsArray(subPolygon) {\n // Q1. Declare the \"segments\" multidimensional array\n segments = [];\n // Q2. Create \"points\" array consisting of anchor points comprising the subPolygon polygon\n points = [];\n for (var j = 0; j < subPolygon.pathPoints.length; j++) {\n points.push(subPolygon.pathPoints[j].anchor);\n }\n var n = points.length;\n // Q3. Append first segment\n P0 = points[n-1];\n P1 = points[0]; // First point of line segment\n P2 = points[1]; // Second point of line segment\n P3 = points[2];\n appendSegmentsArray(P0, P1, P2, P3);\n // Q4. Append middle segments\n for (var j = 1; j < n-2; j++) {\n P0 = points[j-1];\n P1 = points[j]; // First point of line segment\n P2 = points[j+1]; // Second point of line segment\n P3 = points[j+2];\n appendSegmentsArray(P0, P1, P2, P3);\n }\n // Q5. Append second to last segment\n P0 = points[n-3];\n P1 = points[n-2]; // First point of line segment\n P2 = points[n-1]; // Second point of line segment\n P3 = points[0];\n appendSegmentsArray(P0, P1, P2, P3);\n // Q6. Append last segment \n P0 = points[n-2];\n P1 = points[n-1]; // First point of line segment\n P2 = points[0]; // Second point of line segment\n P3 = points[1];\n appendSegmentsArray(P0, P1, P2, P3); \n}", "function buildSegmentRows(segments) {\n\t\tvar rowCnt = getRowCnt();\n\t\tvar segmentRows = [];\n\t\tvar segmentI;\n\t\tvar segment;\n\t\tvar rowI;\n\n\t\t// group segments by row\n\t\tfor (segmentI=0; segmentI<segments.length; segmentI++) {\n\t\t\tsegment = segments[segmentI];\n\t\t\trowI = segment.row;\n\t\t\tif (segment.element) { // was rendered?\n\t\t\t\tif (segmentRows[rowI]) {\n\t\t\t\t\t// already other segments. append to array\n\t\t\t\t\tsegmentRows[rowI].push(segment);\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t// first segment in row. create new array\n\t\t\t\t\tsegmentRows[rowI] = [ segment ];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// sort each row\n\t\tfor (rowI=0; rowI<rowCnt; rowI++) {\n\t\t\tsegmentRows[rowI] = sortSegmentRow(\n\t\t\t\tsegmentRows[rowI] || [] // guarantee an array, even if no segments\n\t\t\t);\n\t\t}\n\n\t\treturn segmentRows;\n\t}", "function buildSegmentRows(segments) {\n\t\tvar rowCnt = getRowCnt();\n\t\tvar segmentRows = [];\n\t\tvar segmentI;\n\t\tvar segment;\n\t\tvar rowI;\n\n\t\t// group segments by row\n\t\tfor (segmentI=0; segmentI<segments.length; segmentI++) {\n\t\t\tsegment = segments[segmentI];\n\t\t\trowI = segment.row;\n\t\t\tif (segment.element) { // was rendered?\n\t\t\t\tif (segmentRows[rowI]) {\n\t\t\t\t\t// already other segments. append to array\n\t\t\t\t\tsegmentRows[rowI].push(segment);\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t// first segment in row. create new array\n\t\t\t\t\tsegmentRows[rowI] = [ segment ];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// sort each row\n\t\tfor (rowI=0; rowI<rowCnt; rowI++) {\n\t\t\tsegmentRows[rowI] = sortSegmentRow(\n\t\t\t\tsegmentRows[rowI] || [] // guarantee an array, even if no segments\n\t\t\t);\n\t\t}\n\n\t\treturn segmentRows;\n\t}", "function buildSegmentRows(segments) {\n\t\tvar rowCnt = getRowCnt();\n\t\tvar segmentRows = [];\n\t\tvar segmentI;\n\t\tvar segment;\n\t\tvar rowI;\n\n\t\t// group segments by row\n\t\tfor (segmentI=0; segmentI<segments.length; segmentI++) {\n\t\t\tsegment = segments[segmentI];\n\t\t\trowI = segment.row;\n\t\t\tif (segment.element) { // was rendered?\n\t\t\t\tif (segmentRows[rowI]) {\n\t\t\t\t\t// already other segments. append to array\n\t\t\t\t\tsegmentRows[rowI].push(segment);\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t// first segment in row. create new array\n\t\t\t\t\tsegmentRows[rowI] = [ segment ];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// sort each row\n\t\tfor (rowI=0; rowI<rowCnt; rowI++) {\n\t\t\tsegmentRows[rowI] = sortSegmentRow(\n\t\t\t\tsegmentRows[rowI] || [] // guarantee an array, even if no segments\n\t\t\t);\n\t\t}\n\n\t\treturn segmentRows;\n\t}", "function buildSegmentRows(segments) {\n\t\tvar rowCnt = getRowCnt();\n\t\tvar segmentRows = [];\n\t\tvar segmentI;\n\t\tvar segment;\n\t\tvar rowI;\n\n\t\t// group segments by row\n\t\tfor (segmentI=0; segmentI<segments.length; segmentI++) {\n\t\t\tsegment = segments[segmentI];\n\t\t\trowI = segment.row;\n\t\t\tif (segment.element) { // was rendered?\n\t\t\t\tif (segmentRows[rowI]) {\n\t\t\t\t\t// already other segments. append to array\n\t\t\t\t\tsegmentRows[rowI].push(segment);\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t// first segment in row. create new array\n\t\t\t\t\tsegmentRows[rowI] = [ segment ];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// sort each row\n\t\tfor (rowI=0; rowI<rowCnt; rowI++) {\n\t\t\tsegmentRows[rowI] = sortSegmentRow(\n\t\t\t\tsegmentRows[rowI] || [] // guarantee an array, even if no segments\n\t\t\t);\n\t\t}\n\n\t\treturn segmentRows;\n\t}", "function buildSegmentRows(segments) {\n\t\tvar rowCnt = getRowCnt();\n\t\tvar segmentRows = [];\n\t\tvar segmentI;\n\t\tvar segment;\n\t\tvar rowI;\n\n\t\t// group segments by row\n\t\tfor (segmentI=0; segmentI<segments.length; segmentI++) {\n\t\t\tsegment = segments[segmentI];\n\t\t\trowI = segment.row;\n\t\t\tif (segment.element) { // was rendered?\n\t\t\t\tif (segmentRows[rowI]) {\n\t\t\t\t\t// already other segments. append to array\n\t\t\t\t\tsegmentRows[rowI].push(segment);\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t// first segment in row. create new array\n\t\t\t\t\tsegmentRows[rowI] = [ segment ];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// sort each row\n\t\tfor (rowI=0; rowI<rowCnt; rowI++) {\n\t\t\tsegmentRows[rowI] = sortSegmentRow(\n\t\t\t\tsegmentRows[rowI] || [] // guarantee an array, even if no segments\n\t\t\t);\n\t\t}\n\n\t\treturn segmentRows;\n\t}", "function segments(n, segSize) {\n return range(segSize, n, segSize).map(min => [min + 1, Math.min(min + segSize, n)]);\n}", "function buildSegmentSubrows(segments) {\n\n\t\t// Give preference to elements with certain criteria, so they have\n\t\t// a chance to be closer to the top.\n\t\tsegments.sort(compareDaySegments);\n\n\t\tvar subrows = [];\n\t\tfor (var i=0; i<segments.length; i++) {\n\t\t\tvar segment = segments[i];\n\n\t\t\t// loop through subrows, starting with the topmost, until the segment\n\t\t\t// doesn't collide with other segments.\n\t\t\tfor (var j=0; j<subrows.length; j++) {\n\t\t\t\tif (!isDaySegmentCollision(segment, subrows[j])) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\t// `j` now holds the desired subrow index\n\t\t\tif (subrows[j]) {\n\t\t\t\tsubrows[j].push(segment);\n\t\t\t}\n\t\t\telse {\n\t\t\t\tsubrows[j] = [ segment ];\n\t\t\t}\n\t\t}\n\n\t\treturn subrows;\n\t}", "function buildSegmentSubrows(segments) {\n\n\t\t// Give preference to elements with certain criteria, so they have\n\t\t// a chance to be closer to the top.\n\t\tsegments.sort(compareDaySegments);\n\n\t\tvar subrows = [];\n\t\tfor (var i=0; i<segments.length; i++) {\n\t\t\tvar segment = segments[i];\n\n\t\t\t// loop through subrows, starting with the topmost, until the segment\n\t\t\t// doesn't collide with other segments.\n\t\t\tfor (var j=0; j<subrows.length; j++) {\n\t\t\t\tif (!isDaySegmentCollision(segment, subrows[j])) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\t// `j` now holds the desired subrow index\n\t\t\tif (subrows[j]) {\n\t\t\t\tsubrows[j].push(segment);\n\t\t\t}\n\t\t\telse {\n\t\t\t\tsubrows[j] = [ segment ];\n\t\t\t}\n\t\t}\n\n\t\treturn subrows;\n\t}", "function buildSegmentSubrows(segments) {\n\n\t\t// Give preference to elements with certain criteria, so they have\n\t\t// a chance to be closer to the top.\n\t\tsegments.sort(compareDaySegments);\n\n\t\tvar subrows = [];\n\t\tfor (var i=0; i<segments.length; i++) {\n\t\t\tvar segment = segments[i];\n\n\t\t\t// loop through subrows, starting with the topmost, until the segment\n\t\t\t// doesn't collide with other segments.\n\t\t\tfor (var j=0; j<subrows.length; j++) {\n\t\t\t\tif (!isDaySegmentCollision(segment, subrows[j])) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\t// `j` now holds the desired subrow index\n\t\t\tif (subrows[j]) {\n\t\t\t\tsubrows[j].push(segment);\n\t\t\t}\n\t\t\telse {\n\t\t\t\tsubrows[j] = [ segment ];\n\t\t\t}\n\t\t}\n\n\t\treturn subrows;\n\t}", "function buildSegmentSubrows(segments) {\n\n\t\t// Give preference to elements with certain criteria, so they have\n\t\t// a chance to be closer to the top.\n\t\tsegments.sort(compareDaySegments);\n\n\t\tvar subrows = [];\n\t\tfor (var i=0; i<segments.length; i++) {\n\t\t\tvar segment = segments[i];\n\n\t\t\t// loop through subrows, starting with the topmost, until the segment\n\t\t\t// doesn't collide with other segments.\n\t\t\tfor (var j=0; j<subrows.length; j++) {\n\t\t\t\tif (!isDaySegmentCollision(segment, subrows[j])) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\t// `j` now holds the desired subrow index\n\t\t\tif (subrows[j]) {\n\t\t\t\tsubrows[j].push(segment);\n\t\t\t}\n\t\t\telse {\n\t\t\t\tsubrows[j] = [ segment ];\n\t\t\t}\n\t\t}\n\n\t\treturn subrows;\n\t}", "function buildSegmentSubrows(segments) {\n\n\t\t// Give preference to elements with certain criteria, so they have\n\t\t// a chance to be closer to the top.\n\t\tsegments.sort(compareDaySegments);\n\n\t\tvar subrows = [];\n\t\tfor (var i=0; i<segments.length; i++) {\n\t\t\tvar segment = segments[i];\n\n\t\t\t// loop through subrows, starting with the topmost, until the segment\n\t\t\t// doesn't collide with other segments.\n\t\t\tfor (var j=0; j<subrows.length; j++) {\n\t\t\t\tif (!isDaySegmentCollision(segment, subrows[j])) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\t// `j` now holds the desired subrow index\n\t\t\tif (subrows[j]) {\n\t\t\t\tsubrows[j].push(segment);\n\t\t\t}\n\t\t\telse {\n\t\t\t\tsubrows[j] = [ segment ];\n\t\t\t}\n\t\t}\n\n\t\treturn subrows;\n\t}", "computeControlSegments() {\n if (this.controlSteps.length) {\n this.controlSegments = [];\n let segment = { start : 0, end : 0, human : this.controlSteps[0] }\n for (let i = 0; i < this.controlSteps.length; ++i) {\n const humanStep = this.controlSteps[i];\n if (humanStep != segment.human) {\n this.controlSegments.push(segment);\n segment = { start : i, end : i, human : humanStep };\n } else {\n segment.end = i;\n }\n }\n this.controlSegments.push(segment);\n }\n }", "function computeSegHorizontals(segs, eventOrderSpecs) {\n // IMPORTANT TO CLEAR OLD RESULTS :(\n for (var _i = 0, segs_2 = segs; _i < segs_2.length; _i++) {\n var seg = segs_2[_i];\n seg.level = null;\n seg.forwardCoord = null;\n seg.backwardCoord = null;\n seg.forwardPressure = null;\n }\n\n segs = Object(_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__[\"sortEventSegs\"])(segs, eventOrderSpecs);\n var level0;\n var levels = buildSlotSegLevels(segs);\n computeForwardSlotSegs(levels);\n\n if (level0 = levels[0]) {\n for (var _a = 0, level0_1 = level0; _a < level0_1.length; _a++) {\n var seg = level0_1[_a];\n computeSlotSegPressures(seg);\n }\n\n for (var _b = 0, level0_2 = level0; _b < level0_2.length; _b++) {\n var seg = level0_2[_b];\n computeSegForwardBack(seg, 0, 0, eventOrderSpecs);\n }\n }\n\n return segs;\n } // Builds an array of segments \"levels\". The first level will be the leftmost tier of segments if the calendar is", "formatSegments (isProtein) {\n\t\tvar variants = isProtein ? this.attributes.variantDataProtein : this.attributes.variantDataDna;\n\t\tvar sequences = isProtein ? this.attributes.alignedProteinSequences : this.attributes.alignedDnaSequences;\n\t\t// make sure they're sorted by start\n\t\tvariants = _.sortBy(variants, d => {\n\t\t\treturn d.start;\n\t\t});\n\n\t\t// merge segments\n\t\tvar mergedSegments = _.reduce(variants, (memo, d) => {\n\t\t\treturn this._mergeOrAddSegment(memo, d);\n\t\t}, []);\n\n\t\t// add in needed summarized segments\n\t\t// first one\n\t\tif (mergedSegments[0].start > 1) {\n\t\t\tmergedSegments.push({\n\t\t\t\tvisible: false,\n\t\t\t\tstart: 1,\n\t\t\t\tend: mergedSegments[0].start\n\t\t\t});\n\t\t}\n\t\t// loop through and connect visible segments with summarized segments\n\t\tvar _visibleSegments = _.where(mergedSegments, { visible: true });\n\t\t_visibleSegments.forEach( (d, i) => {\n\t\t\t// must not be last or visible\n\t\t\tif (d.visible && i < _visibleSegments.length - 1) {\n\t\t\t\tmergedSegments.push({\n\t\t\t\t\tvisible: false,\n\t\t\t\t\tstart: d.end,\n\t\t\t\t\tend: _visibleSegments[i + 1].start\n\t\t\t\t});\n\t\t\t}\n\t\t});\n\t\t\n\t\tvar _last = _.max(mergedSegments, d => { return d.end; });\n\t\tvar _maxLength = _.max(sequences, d => { return d.sequence.length; }).sequence.length;\n\t\t// add last if last segment is visible and not at the end\n\t\tif (_last.end < _maxLength) {\n\t\t\tmergedSegments.push({\n\t\t\t\tstart: _last.end,\n\t\t\t\tend: _maxLength,\n\t\t\t\tvisible: false\n\t\t\t});\n\t\t// add last if visible\n\t\t} else {\n\t\t\tmergedSegments.push({\n\t\t\t\tstart: _last.end,\n\t\t\t\tend: _maxLength + 1,\n\t\t\t\tvisible: true\n\t\t\t});\n\t\t}\n\t\t\n\t\t// change starts and ends to domains\n\t\tmergedSegments = _.map(mergedSegments, d => {\n\t\t\td.domain = [d.start, d.end];\n\t\t\treturn d;\n\t\t});\n\t\t// sort\n\t\tmergedSegments = _.sortBy(mergedSegments, d => {\n\t\t\treturn d.start;\n\t\t});\n\t\treturn mergedSegments;\n\t}", "function split(array, segments) {\n\t segments = segments || 2;\n\t var results = [];\n\t if (array == null) {\n\t return results;\n\t }\n\n\t var minLength = Math.floor(array.length / segments),\n\t remainder = array.length % segments,\n\t i = 0,\n\t len = array.length,\n\t segmentIndex = 0,\n\t segmentLength;\n\n\t while (i < len) {\n\t segmentLength = minLength;\n\t if (segmentIndex < remainder) {\n\t segmentLength++;\n\t }\n\n\t results.push(array.slice(i, i + segmentLength));\n\n\t segmentIndex++;\n\t i += segmentLength;\n\t }\n\n\t return results;\n\t }", "toJSON() {\n let parts = [];\n for (let i = 0; i < this.sections.length; i += 2) {\n let len = this.sections[i], ins = this.sections[i + 1];\n if (ins < 0)\n parts.push(len);\n else if (ins == 0)\n parts.push([len]);\n else\n parts.push([len].concat(this.inserted[i >> 1].toJSON()));\n }\n return parts;\n }", "function addSegEndsFromSequences(){\n //Add all the starting segEnds and internal segJoins\n for(var i=0;i<seqArr.length;i++){\n var length=parseInt(seqArr[i]['length']),\n seqId=seqArr[i]['id'];\n segEndArr[segEndArr.length]=[seqId,0,'POS_STRAND']\n segEndArr[segEndArr.length]=[seqId,length-1,'NEG_STRAND']\n segJoinArr[segJoinArr.length]=[[seqId,0,'POS_STRAND'],[seqId,length-1,'NEG_STRAND'],'internal',length]\n }\n segmentize();\n}", "function buildSlotSegLevels(segs){var levels=[];var i;var seg;var j;for(i=0;i<segs.length;i++){seg=segs[i];// go through all the levels and stop on the first level where there are no collisions\nfor(j=0;j<levels.length;j++){if(!computeSlotSegCollisions(seg,levels[j]).length){break;}}seg.level=j;(levels[j]||(levels[j]=[])).push(seg);}return levels;}// For every segment, figure out the other segments that are in subsequent", "function descendent_sections(max_slice) { // → [[section_t]]\n const root = [[0,0],[0,0],[0,0],[0,0]]\n if (!(0 <= max_slice && max_slice <= 18))\n throw Error('invalid max_slice ' + max_slice)\n\n // Recursively compute all sections that root depends on\n const slices = []\n for (let s = 0; s <= max_slice; s++)\n slices.push([])\n const seen = new Set()\n const stack = [root]\n while (stack.length) {\n const s = standardize_section(stack.pop())[0]\n if (!seen.has('' + s)) {\n seen.add('' + s)\n const n = section_sum(s)\n slices[n].push(s)\n if (n < max_slice) {\n for (let q = 0; q < 4; q++) {\n if (s[q][0] + s[q][1] < 9) {\n const child = s.map(c => c.slice())\n child[q][n & 1]++\n stack.push(child)\n }\n }\n }\n }\n }\n\n // Sort each slice\n for (const slice of slices)\n slice.sort((a,b) => section_sig(a) - section_sig(b))\n return slices\n}", "function GetClipSegments(clip_intervals, block_size, hop_size, x_length) {\n var clip_segments = [];\n var num_clip_segments = 0;\n\n var in_segment = false;\n var start_idx = 0;\n var stop_idx = start_idx + block_size - 1;\n var block_idx = 0;\n\n var segment_start_idx = -1;\n var segment_stop_idx = -1;\n while(stop_idx < x_length) {\n // We are in a segment.\n if(in_segment) {\n // We leave the segment. Store it and move on.\n if(!AreOverlapping(clip_intervals, start_idx, stop_idx)) {\n in_segment = false;\n segment_stop_idx = block_idx - 1;\n\n var new_segment = { start:segment_start_idx , stop:segment_stop_idx };\n clip_segments[num_clip_segments] = new_segment;\n num_clip_segments++;\n\n segment_start_idx = -1;\n segment_stop_idx = -1;\n }\n }\n // We are not in a segment.\n else {\n // We have entered a segment.\n if(AreOverlapping(clip_intervals, start_idx, stop_idx)) {\n in_segment = true;\n segment_start_idx = block_idx;\n }\n }\n\n block_idx++;\n start_idx = start_idx + hop_size;\n stop_idx = start_idx + block_size - 1;\n }\n\n // If we end while in a segment, we need to leave the segment and push the segment.\n if(in_segment) {\n in_segment = false;\n segment_stop_idx = block_idx - 1;\n\n var new_segment = { start:segment_start_idx , stop:segment_stop_idx };\n clip_segments[num_clip_segments] = new_segment;\n num_clip_segments++;\n\n segment_start_idx = -1;\n segment_stop_idx = -1;\n }\n\n return clip_segments;\n }", "function p(a){\n// Give preference to elements with certain criteria, so they have\n// a chance to be closer to the top.\na.sort(ya);for(var b=[],c=0;c<a.length;c++){\n// loop through subrows, starting with the topmost, until the segment\n// doesn't collide with other segments.\nfor(var d=a[c],e=0;e<b.length&&wa(d,b[e]);e++);\n// `j` now holds the desired subrow index\nb[e]?b[e].push(d):b[e]=[d]}return b}", "function __WEBPACK_DEFAULT_EXPORT__(segments, compareIntersection, startInside, interpolate, stream) {\n var subject = [],\n clip = [],\n i,\n n;\n\n segments.forEach(function(segment) {\n if ((n = segment.length - 1) <= 0) return;\n var n, p0 = segment[0], p1 = segment[n], x;\n\n // If the first and last points of a segment are coincident, then treat as a\n // closed ring. TODO if all rings are closed, then the winding order of the\n // exterior ring should be checked.\n if ((0,_pointEqual_js__WEBPACK_IMPORTED_MODULE_0__.default)(p0, p1)) {\n stream.lineStart();\n for (i = 0; i < n; ++i) stream.point((p0 = segment[i])[0], p0[1]);\n stream.lineEnd();\n return;\n }\n\n subject.push(x = new Intersection(p0, segment, null, true));\n clip.push(x.o = new Intersection(p0, null, x, false));\n subject.push(x = new Intersection(p1, segment, null, false));\n clip.push(x.o = new Intersection(p1, null, x, true));\n });\n\n if (!subject.length) return;\n\n clip.sort(compareIntersection);\n link(subject);\n link(clip);\n\n for (i = 0, n = clip.length; i < n; ++i) {\n clip[i].e = startInside = !startInside;\n }\n\n var start = subject[0],\n points,\n point;\n\n while (1) {\n // Find first unvisited intersection.\n var current = start,\n isSubject = true;\n while (current.v) if ((current = current.n) === start) return;\n points = current.z;\n stream.lineStart();\n do {\n current.v = current.o.v = true;\n if (current.e) {\n if (isSubject) {\n for (i = 0, n = points.length; i < n; ++i) stream.point((point = points[i])[0], point[1]);\n } else {\n interpolate(current.x, current.n.x, 1, stream);\n }\n current = current.n;\n } else {\n if (isSubject) {\n points = current.p.z;\n for (i = points.length - 1; i >= 0; --i) stream.point((point = points[i])[0], point[1]);\n } else {\n interpolate(current.x, current.p.x, -1, stream);\n }\n current = current.p;\n }\n current = current.o;\n points = current.z;\n isSubject = !isSubject;\n } while (!current.v);\n stream.lineEnd();\n }\n}", "function getSection(start, angle, length, width) {\n var pThere = start + new Point(width/2, 0);\n var pBack = start + new Point(-width/2, 0);\n markPoint(pThere);\n markPoint(pBack);\n var hInThere = new Point(length*0.5, length*0.3);\n var hOutBack = new Point(length*-0.7, length*0.2);\n var hOutThere = new Point(length*0.5, -length*0.3);\n var hInBack = new Point(length*-0.7, -length*0.2);\n var segmentThere = new Segment(pThere, hInThere, hOutThere);\n var segmentBack = new Segment(pBack, hInBack, hOutBack);\n return [segmentThere, segmentBack, (start + new Point(0, -length))]\n }", "function buildSegmentsForEvent(event) {\n\t\tvar segments = rangeToSegments(event.start, getEventEnd(event));\n\t\tfor (var i=0; i<segments.length; i++) {\n\t\t\tsegments[i].event = event;\n\t\t}\n\t\treturn segments;\n\t}", "function buildSegmentsForEvent(event) {\n\t\tvar segments = rangeToSegments(event.start, getEventEnd(event));\n\t\tfor (var i=0; i<segments.length; i++) {\n\t\t\tsegments[i].event = event;\n\t\t}\n\t\treturn segments;\n\t}", "function rangeToSegments(startDate, endDate) {\n\t\tvar rowCnt = t.getRowCnt();\n\t\tvar colCnt = t.getColCnt();\n\t\tvar segments = []; // array of segments to return\n\n\t\t// day offset for given date range\n\t\tvar rangeDayOffsetStart = dateToDayOffset(startDate);\n\t\tvar rangeDayOffsetEnd = dateToDayOffset(endDate); // exclusive\n\n\t\t// first and last cell offset for the given date range\n\t\t// \"last\" implies inclusivity\n\t\tvar rangeCellOffsetFirst = dayOffsetToCellOffset(rangeDayOffsetStart);\n\t\tvar rangeCellOffsetLast = dayOffsetToCellOffset(rangeDayOffsetEnd) - 1;\n\n\t\t// loop through all the rows in the view\n\t\tfor (var row=0; row<rowCnt; row++) {\n\n\t\t\t// first and last cell offset for the row\n\t\t\tvar rowCellOffsetFirst = row * colCnt;\n\t\t\tvar rowCellOffsetLast = rowCellOffsetFirst + colCnt - 1;\n\n\t\t\t// get the segment's cell offsets by constraining the range's cell offsets to the bounds of the row\n\t\t\tvar segmentCellOffsetFirst = Math.max(rangeCellOffsetFirst, rowCellOffsetFirst);\n\t\t\tvar segmentCellOffsetLast = Math.min(rangeCellOffsetLast, rowCellOffsetLast);\n\n\t\t\t// make sure segment's offsets are valid and in view\n\t\t\tif (segmentCellOffsetFirst <= segmentCellOffsetLast) {\n\n\t\t\t\t// translate to cells\n\t\t\t\tvar segmentCellFirst = cellOffsetToCell(segmentCellOffsetFirst);\n\t\t\t\tvar segmentCellLast = cellOffsetToCell(segmentCellOffsetLast);\n\n\t\t\t\t// view might be RTL, so order by leftmost column\n\t\t\t\tvar cols = [ segmentCellFirst.col, segmentCellLast.col ].sort();\n\n\t\t\t\t// Determine if segment's first/last cell is the beginning/end of the date range.\n\t\t\t\t// We need to compare \"day offset\" because \"cell offsets\" are often ambiguous and\n\t\t\t\t// can translate to multiple days, and an edge case reveals itself when we the\n\t\t\t\t// range's first cell is hidden (we don't want isStart to be true).\n\t\t\t\tvar isStart = cellOffsetToDayOffset(segmentCellOffsetFirst) == rangeDayOffsetStart;\n\t\t\t\tvar isEnd = cellOffsetToDayOffset(segmentCellOffsetLast) + 1 == rangeDayOffsetEnd; // +1 for comparing exclusively\n\n\t\t\t\tsegments.push({\n\t\t\t\t\trow: row,\n\t\t\t\t\tleftCol: cols[0],\n\t\t\t\t\trightCol: cols[1],\n\t\t\t\t\tisStart: isStart,\n\t\t\t\t\tisEnd: isEnd\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\n\t\treturn segments;\n\t}", "function rangeToSegments(startDate, endDate) {\n\t\tvar rowCnt = t.getRowCnt();\n\t\tvar colCnt = t.getColCnt();\n\t\tvar segments = []; // array of segments to return\n\n\t\t// day offset for given date range\n\t\tvar rangeDayOffsetStart = dateToDayOffset(startDate);\n\t\tvar rangeDayOffsetEnd = dateToDayOffset(endDate); // exclusive\n\n\t\t// first and last cell offset for the given date range\n\t\t// \"last\" implies inclusivity\n\t\tvar rangeCellOffsetFirst = dayOffsetToCellOffset(rangeDayOffsetStart);\n\t\tvar rangeCellOffsetLast = dayOffsetToCellOffset(rangeDayOffsetEnd) - 1;\n\n\t\t// loop through all the rows in the view\n\t\tfor (var row=0; row<rowCnt; row++) {\n\n\t\t\t// first and last cell offset for the row\n\t\t\tvar rowCellOffsetFirst = row * colCnt;\n\t\t\tvar rowCellOffsetLast = rowCellOffsetFirst + colCnt - 1;\n\n\t\t\t// get the segment's cell offsets by constraining the range's cell offsets to the bounds of the row\n\t\t\tvar segmentCellOffsetFirst = Math.max(rangeCellOffsetFirst, rowCellOffsetFirst);\n\t\t\tvar segmentCellOffsetLast = Math.min(rangeCellOffsetLast, rowCellOffsetLast);\n\n\t\t\t// make sure segment's offsets are valid and in view\n\t\t\tif (segmentCellOffsetFirst <= segmentCellOffsetLast) {\n\n\t\t\t\t// translate to cells\n\t\t\t\tvar segmentCellFirst = cellOffsetToCell(segmentCellOffsetFirst);\n\t\t\t\tvar segmentCellLast = cellOffsetToCell(segmentCellOffsetLast);\n\n\t\t\t\t// view might be RTL, so order by leftmost column\n\t\t\t\tvar cols = [ segmentCellFirst.col, segmentCellLast.col ].sort();\n\n\t\t\t\t// Determine if segment's first/last cell is the beginning/end of the date range.\n\t\t\t\t// We need to compare \"day offset\" because \"cell offsets\" are often ambiguous and\n\t\t\t\t// can translate to multiple days, and an edge case reveals itself when we the\n\t\t\t\t// range's first cell is hidden (we don't want isStart to be true).\n\t\t\t\tvar isStart = cellOffsetToDayOffset(segmentCellOffsetFirst) == rangeDayOffsetStart;\n\t\t\t\tvar isEnd = cellOffsetToDayOffset(segmentCellOffsetLast) + 1 == rangeDayOffsetEnd; // +1 for comparing exclusively\n\n\t\t\t\tsegments.push({\n\t\t\t\t\trow: row,\n\t\t\t\t\tleftCol: cols[0],\n\t\t\t\t\trightCol: cols[1],\n\t\t\t\t\tisStart: isStart,\n\t\t\t\t\tisEnd: isEnd\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\n\t\treturn segments;\n\t}", "function rangeToSegments(startDate, endDate) {\n\t\tvar rowCnt = t.getRowCnt();\n\t\tvar colCnt = t.getColCnt();\n\t\tvar segments = []; // array of segments to return\n\n\t\t// day offset for given date range\n\t\tvar rangeDayOffsetStart = dateToDayOffset(startDate);\n\t\tvar rangeDayOffsetEnd = dateToDayOffset(endDate); // exclusive\n\n\t\t// first and last cell offset for the given date range\n\t\t// \"last\" implies inclusivity\n\t\tvar rangeCellOffsetFirst = dayOffsetToCellOffset(rangeDayOffsetStart);\n\t\tvar rangeCellOffsetLast = dayOffsetToCellOffset(rangeDayOffsetEnd) - 1;\n\n\t\t// loop through all the rows in the view\n\t\tfor (var row=0; row<rowCnt; row++) {\n\n\t\t\t// first and last cell offset for the row\n\t\t\tvar rowCellOffsetFirst = row * colCnt;\n\t\t\tvar rowCellOffsetLast = rowCellOffsetFirst + colCnt - 1;\n\n\t\t\t// get the segment's cell offsets by constraining the range's cell offsets to the bounds of the row\n\t\t\tvar segmentCellOffsetFirst = Math.max(rangeCellOffsetFirst, rowCellOffsetFirst);\n\t\t\tvar segmentCellOffsetLast = Math.min(rangeCellOffsetLast, rowCellOffsetLast);\n\n\t\t\t// make sure segment's offsets are valid and in view\n\t\t\tif (segmentCellOffsetFirst <= segmentCellOffsetLast) {\n\n\t\t\t\t// translate to cells\n\t\t\t\tvar segmentCellFirst = cellOffsetToCell(segmentCellOffsetFirst);\n\t\t\t\tvar segmentCellLast = cellOffsetToCell(segmentCellOffsetLast);\n\n\t\t\t\t// view might be RTL, so order by leftmost column\n\t\t\t\tvar cols = [ segmentCellFirst.col, segmentCellLast.col ].sort();\n\n\t\t\t\t// Determine if segment's first/last cell is the beginning/end of the date range.\n\t\t\t\t// We need to compare \"day offset\" because \"cell offsets\" are often ambiguous and\n\t\t\t\t// can translate to multiple days, and an edge case reveals itself when we the\n\t\t\t\t// range's first cell is hidden (we don't want isStart to be true).\n\t\t\t\tvar isStart = cellOffsetToDayOffset(segmentCellOffsetFirst) == rangeDayOffsetStart;\n\t\t\t\tvar isEnd = cellOffsetToDayOffset(segmentCellOffsetLast) + 1 == rangeDayOffsetEnd; // +1 for comparing exclusively\n\n\t\t\t\tsegments.push({\n\t\t\t\t\trow: row,\n\t\t\t\t\tleftCol: cols[0],\n\t\t\t\t\trightCol: cols[1],\n\t\t\t\t\tisStart: isStart,\n\t\t\t\t\tisEnd: isEnd\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\n\t\treturn segments;\n\t}", "function rangeToSegments(start, end) {\n\n\t\tvar rowCnt = t.getRowCnt();\n\t\tvar colCnt = t.getColCnt();\n\t\tvar segments = []; // array of segments to return\n\n\t\t// day offset for given date range\n\t\tvar rangeDayOffsetStart = dateToDayOffset(start);\n\t\tvar rangeDayOffsetEnd = dateToDayOffset(end); // an exclusive value\n\t\tvar endTimeMS = +end.time();\n\t\tif (endTimeMS && endTimeMS >= nextDayThreshold) {\n\t\t\trangeDayOffsetEnd++;\n\t\t}\n\t\trangeDayOffsetEnd = Math.max(rangeDayOffsetEnd, rangeDayOffsetStart + 1);\n\n\t\t// first and last cell offset for the given date range\n\t\t// \"last\" implies inclusivity\n\t\tvar rangeCellOffsetFirst = dayOffsetToCellOffset(rangeDayOffsetStart);\n\t\tvar rangeCellOffsetLast = dayOffsetToCellOffset(rangeDayOffsetEnd) - 1;\n\n\t\t// loop through all the rows in the view\n\t\tfor (var row=0; row<rowCnt; row++) {\n\n\t\t\t// first and last cell offset for the row\n\t\t\tvar rowCellOffsetFirst = row * colCnt;\n\t\t\tvar rowCellOffsetLast = rowCellOffsetFirst + colCnt - 1;\n\n\t\t\t// get the segment's cell offsets by constraining the range's cell offsets to the bounds of the row\n\t\t\tvar segmentCellOffsetFirst = Math.max(rangeCellOffsetFirst, rowCellOffsetFirst);\n\t\t\tvar segmentCellOffsetLast = Math.min(rangeCellOffsetLast, rowCellOffsetLast);\n\n\t\t\t// make sure segment's offsets are valid and in view\n\t\t\tif (segmentCellOffsetFirst <= segmentCellOffsetLast) {\n\n\t\t\t\t// translate to cells\n\t\t\t\tvar segmentCellFirst = cellOffsetToCell(segmentCellOffsetFirst);\n\t\t\t\tvar segmentCellLast = cellOffsetToCell(segmentCellOffsetLast);\n\n\t\t\t\t// view might be RTL, so order by leftmost column\n\t\t\t\tvar cols = [ segmentCellFirst.col, segmentCellLast.col ].sort();\n\n\t\t\t\t// Determine if segment's first/last cell is the beginning/end of the date range.\n\t\t\t\t// We need to compare \"day offset\" because \"cell offsets\" are often ambiguous and\n\t\t\t\t// can translate to multiple days, and an edge case reveals itself when we the\n\t\t\t\t// range's first cell is hidden (we don't want isStart to be true).\n\t\t\t\tvar isStart = cellOffsetToDayOffset(segmentCellOffsetFirst) == rangeDayOffsetStart;\n\t\t\t\tvar isEnd = cellOffsetToDayOffset(segmentCellOffsetLast) + 1 == rangeDayOffsetEnd; // +1 for comparing exclusively\n\n\t\t\t\tsegments.push({\n\t\t\t\t\trow: row,\n\t\t\t\t\tleftCol: cols[0],\n\t\t\t\t\trightCol: cols[1],\n\t\t\t\t\tisStart: isStart,\n\t\t\t\t\tisEnd: isEnd\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\n\t\treturn segments;\n\t}", "function rangeToSegments(start, end) {\n\n\t\tvar rowCnt = t.getRowCnt();\n\t\tvar colCnt = t.getColCnt();\n\t\tvar segments = []; // array of segments to return\n\n\t\t// day offset for given date range\n\t\tvar rangeDayOffsetStart = dateToDayOffset(start);\n\t\tvar rangeDayOffsetEnd = dateToDayOffset(end); // an exclusive value\n\t\tvar endTimeMS = +end.time();\n\t\tif (endTimeMS && endTimeMS >= nextDayThreshold) {\n\t\t\trangeDayOffsetEnd++;\n\t\t}\n\t\trangeDayOffsetEnd = Math.max(rangeDayOffsetEnd, rangeDayOffsetStart + 1);\n\n\t\t// first and last cell offset for the given date range\n\t\t// \"last\" implies inclusivity\n\t\tvar rangeCellOffsetFirst = dayOffsetToCellOffset(rangeDayOffsetStart);\n\t\tvar rangeCellOffsetLast = dayOffsetToCellOffset(rangeDayOffsetEnd) - 1;\n\n\t\t// loop through all the rows in the view\n\t\tfor (var row=0; row<rowCnt; row++) {\n\n\t\t\t// first and last cell offset for the row\n\t\t\tvar rowCellOffsetFirst = row * colCnt;\n\t\t\tvar rowCellOffsetLast = rowCellOffsetFirst + colCnt - 1;\n\n\t\t\t// get the segment's cell offsets by constraining the range's cell offsets to the bounds of the row\n\t\t\tvar segmentCellOffsetFirst = Math.max(rangeCellOffsetFirst, rowCellOffsetFirst);\n\t\t\tvar segmentCellOffsetLast = Math.min(rangeCellOffsetLast, rowCellOffsetLast);\n\n\t\t\t// make sure segment's offsets are valid and in view\n\t\t\tif (segmentCellOffsetFirst <= segmentCellOffsetLast) {\n\n\t\t\t\t// translate to cells\n\t\t\t\tvar segmentCellFirst = cellOffsetToCell(segmentCellOffsetFirst);\n\t\t\t\tvar segmentCellLast = cellOffsetToCell(segmentCellOffsetLast);\n\n\t\t\t\t// view might be RTL, so order by leftmost column\n\t\t\t\tvar cols = [ segmentCellFirst.col, segmentCellLast.col ].sort();\n\n\t\t\t\t// Determine if segment's first/last cell is the beginning/end of the date range.\n\t\t\t\t// We need to compare \"day offset\" because \"cell offsets\" are often ambiguous and\n\t\t\t\t// can translate to multiple days, and an edge case reveals itself when we the\n\t\t\t\t// range's first cell is hidden (we don't want isStart to be true).\n\t\t\t\tvar isStart = cellOffsetToDayOffset(segmentCellOffsetFirst) == rangeDayOffsetStart;\n\t\t\t\tvar isEnd = cellOffsetToDayOffset(segmentCellOffsetLast) + 1 == rangeDayOffsetEnd; // +1 for comparing exclusively\n\n\t\t\t\tsegments.push({\n\t\t\t\t\trow: row,\n\t\t\t\t\tleftCol: cols[0],\n\t\t\t\t\trightCol: cols[1],\n\t\t\t\t\tisStart: isStart,\n\t\t\t\t\tisEnd: isEnd\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\n\t\treturn segments;\n\t}", "function sortSegmentRow(segments) {\n\t\tvar sortedSegments = [];\n\n\t\t// build the subrow array\n\t\tvar subrows = buildSegmentSubrows(segments);\n\n\t\t// flatten it\n\t\tfor (var i=0; i<subrows.length; i++) {\n\t\t\tsortedSegments.push.apply(sortedSegments, subrows[i]); // append an array to an array\n\t\t}\n\n\t\treturn sortedSegments;\n\t}", "function sortSegmentRow(segments) {\n\t\tvar sortedSegments = [];\n\n\t\t// build the subrow array\n\t\tvar subrows = buildSegmentSubrows(segments);\n\n\t\t// flatten it\n\t\tfor (var i=0; i<subrows.length; i++) {\n\t\t\tsortedSegments.push.apply(sortedSegments, subrows[i]); // append an array to an array\n\t\t}\n\n\t\treturn sortedSegments;\n\t}", "function sortSegmentRow(segments) {\n\t\tvar sortedSegments = [];\n\n\t\t// build the subrow array\n\t\tvar subrows = buildSegmentSubrows(segments);\n\n\t\t// flatten it\n\t\tfor (var i=0; i<subrows.length; i++) {\n\t\t\tsortedSegments.push.apply(sortedSegments, subrows[i]); // append an array to an array\n\t\t}\n\n\t\treturn sortedSegments;\n\t}", "function sortSegmentRow(segments) {\n\t\tvar sortedSegments = [];\n\n\t\t// build the subrow array\n\t\tvar subrows = buildSegmentSubrows(segments);\n\n\t\t// flatten it\n\t\tfor (var i=0; i<subrows.length; i++) {\n\t\t\tsortedSegments.push.apply(sortedSegments, subrows[i]); // append an array to an array\n\t\t}\n\n\t\treturn sortedSegments;\n\t}", "function sortSegmentRow(segments) {\n\t\tvar sortedSegments = [];\n\n\t\t// build the subrow array\n\t\tvar subrows = buildSegmentSubrows(segments);\n\n\t\t// flatten it\n\t\tfor (var i=0; i<subrows.length; i++) {\n\t\t\tsortedSegments.push.apply(sortedSegments, subrows[i]); // append an array to an array\n\t\t}\n\n\t\treturn sortedSegments;\n\t}", "function combineSegments() {\n\t\tvar result = '';\n\t\ttotalSegments = segments.length;\n\t\tfor (var i = 0; i < segments.length; i++) {\n\t\t\tif (segments[i].isEmpty()) {\n\t\t\t\ttotalSegments--;\n\t\t\t\tcontinue;\n\t\t\t\t\n\t\t\t}\n\t\t\tresult += segments[i].asText();\n\t\t}\n\t\treturn result;\n\t}", "resolveSegmentSegment(ax1, ay1, ax2, ay2, bx1, by1, bx2, by2) {\n const result = [];\n const isHorizontal1 = ax2 - ax1 > ay2 - ay1;\n const isHorizontal2 = bx2 - bx1 > by2 - by1;\n\n if (isHorizontal1 && isHorizontal2 &&\n by1 === ay1 &&\n ((ax1 <= bx2 && ax1 >= bx1) || (ax2 <= bx2 && ax2 >= bx1) || (bx1 <= ax2 && bx1 >= ax1) || (bx2 <= ax2 && bx2 >= ax1))) {\n\n if (bx1 < ax1) result.push(bx1, by1, ax1, by1);\n if (bx2 > ax2) result.push(ax2, by2, bx2, by2);\n\n } else if (!isHorizontal1 && isHorizontal2 &&\n by1 >= ay1 && by1 < ay2 &&\n ((ax1 <= bx2 && ax1 >= bx1) || (ax2 <= bx2 && ax2 >= bx1) || (bx1 <= ax2 && bx1 >= ax1) || (bx2 <= ax2 && bx2 >= ax1))) {\n\n if (bx1 < ax1) result.push(bx1, by1, ax1, by1);\n if (bx2 > ax2) result.push(ax2 + 1, by2, bx2, by2);\n\n } else if (!isHorizontal1 && !isHorizontal2 &&\n ax1 === bx2 &&\n ((by1 <= ay2 && by1 >= ay1) || (by2 <= ay2 && by2 >= ay1) || (ay1 <= by2 && ay1 >= by1) || (ay2 <= by2 && ay2 >= by1))) {\n\n if (by1 < ay1) result.push(bx1, by1, bx1, ay1);\n if (by2 > ay2) result.push(bx2, ay2, bx2, by2);\n\n } else if (isHorizontal1 && !isHorizontal2 &&\n bx1 >= ax1 && bx1 < ax2 &&\n ((ay2 <= by2 && ay2 >= by1) || (ay1 <= by2 && ay1 >= by1) || (by2 <= ay2 && by2 >= ay1) || (by1 <= ay2 && by1 >= ay1))) {\n\n if (by1 < ay1) result.push(bx1, by1, bx1, ay1);\n if (by2 > ay2) result.push(bx2, ay2 + 1, bx2, by2);\n\n } else { // segments do not intersect\n result.push(bx1, by1, bx2, by2);\n }\n\n return result;\n }", "function buildSlotSegLevels(segs) {\n var levels = [];\n var i;\n var seg;\n var j;\n\n for (i = 0; i < segs.length; i++) {\n seg = segs[i]; // go through all the levels and stop on the first level where there are no collisions\n\n for (j = 0; j < levels.length; j++) {\n if (!computeSlotSegCollisions(seg, levels[j]).length) {\n break;\n }\n }\n\n seg.level = j;\n (levels[j] || (levels[j] = [])).push(seg);\n }\n\n return levels;\n } // For every segment, figure out the other segments that are in subsequent", "function buildSegmentsForEvent(event) {\n\t\tvar startDate = event.start;\n\t\tvar endDate = exclEndDay(event);\n\t\tvar segments = rangeToSegments(startDate, endDate);\n\t\tfor (var i=0; i<segments.length; i++) {\n\t\t\tsegments[i].event = event;\n\t\t}\n\t\treturn segments;\n\t}", "function buildSegmentsForEvent(event) {\n\t\tvar startDate = event.start;\n\t\tvar endDate = exclEndDay(event);\n\t\tvar segments = rangeToSegments(startDate, endDate);\n\t\tfor (var i=0; i<segments.length; i++) {\n\t\t\tsegments[i].event = event;\n\t\t}\n\t\treturn segments;\n\t}", "function buildSegmentsForEvent(event) {\n\t\tvar startDate = event.start;\n\t\tvar endDate = exclEndDay(event);\n\t\tvar segments = rangeToSegments(startDate, endDate);\n\t\tfor (var i=0; i<segments.length; i++) {\n\t\t\tsegments[i].event = event;\n\t\t}\n\t\treturn segments;\n\t}", "function m(a){for(var b,c=M(),d=N(),e=[],f=n(a),g=0;g<c;g++){var h=f[g],i=[];for(b=0;b<d;b++)i.push(0);\n// loop through every segment\nfor(var j=0;j<h.length;j++){var k=h[j];\n// adjust the columns to account for the segment's height\nfor(\n// find the segment's top coordinate by looking at the max height\n// of all the columns the segment will be in.\nk.top=D(i.slice(k.leftCol,k.rightCol+1)),b=k.leftCol;b<=k.rightCol;b++)i[b]=k.top+k.outerHeight}\n// the tallest column in the row should be the \"content height\"\ne.push(D(i))}return e}", "function Segments(props) {\n var value = props.value,\n children = props.children,\n name = props.name,\n size = props.size,\n onChange = props.onChange,\n className = props.className;\n var classes = (0,_node_modules_classnames_index_js__WEBPACK_IMPORTED_MODULE_2__.default)('kt-segments', className);\n var contextValue = (0,react__WEBPACK_IMPORTED_MODULE_0__.useMemo)(function () {\n return {\n value: value,\n name: name,\n onChange: onChange,\n size: size\n };\n }, [value, name, onChange, size]);\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_context_js__WEBPACK_IMPORTED_MODULE_3__.SegmentsContext.Provider, {\n value: contextValue\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(\"div\", {\n className: classes\n }, children));\n}", "function opgave7(start, end){\n var arrayen = [];\n while(start<end){\n arrayen.push(start);\n start++;\n }\n arrayen.push(start);\n return arrayen;\n \n}", "get excludeCollinear(){\n\t\tlet list = this.segList2D;\n\t\tlet newlist = [];\n\t\tfor (let i=0; i<list.length; i++){\n\t\t\tlet thisseg = list[i];\n\t\t\tlet x0 = thisseg.a[0];\n\t\t\tlet y0 = thisseg.a[1];\n\t\t\tlet x1 = thisseg.b[0];\n\t\t\tlet y1 = thisseg.b[1];\n\t\t\tlet nextseg\n\t\t\tif (i === list.length-1){\n\t\t\t\tnextseg = list[0];\n\t\t\t}\n\t\t\telse{\n\t\t\t\tnextseg = list[i+1];\n\t\t\t}\n\t\t\tlet a0 = nextseg.a[0];\n\t\t\tlet b0 = nextseg.a[1];\n\t\t\tlet a1 = nextseg.b[0];\n\t\t\tlet b1 = nextseg.b[1];\n\t\t\tlet xy = Math.round((y1-y0)/(x1-x0)*1000000)/1000000;\n\t\t\tlet ab = Math.round((b1-b0)/(a1-a0)*1000000)/1000000;\n\t\t\tif (xy !== ab){\n\t\t\t\tnewlist.push(thisseg);\n\t\t\t}\n\t\t\telse{\n\t\t\t\tif (i===list.length-1){\n\t\t\t\t\tnewlist.shift();\n\t\t\t\t}\n\t\t\t\tnewlist.push({a:[x0,y0],b:[a1,b1]})\n\t\t\t}\n\t\t}\n\t\treturn newlist;\n\t}", "function spiralTraverse(array) {\n\tlet startRow = 0;\n\tlet endRow = array.length-1;\n\tlet startCol = 0;\n\tlet endCol = array[0].length-1;\n\tlet newArr = [];\n\t\n\twhile (startRow <= endRow && startCol <= endCol) {\n\t\tfor (let i = startCol; i <= endCol; i++) {\n\t\t\tnewArr.push(array[startRow][i])\n\t\t}\n\t\t\n\t\tfor (let i = startRow+1; i <= endRow; i++) {\n\t\t\tnewArr.push(array[i][endCol]);\n\t\t}\n\t\t\n\t\tfor (let i = endCol-1; i >= startCol; i--) {\n\t\t\tif (startRow === endRow) break;\n\t\t\tnewArr.push(array[endRow][i]);\n\t\t}\n\t\t\n\t\tfor (let i = endRow-1; i > startRow; i--) {\n\t\t\tif (startCol === endCol) break;\n\t\t\tnewArr.push(array[i][startCol]);\n\t\t}\n\t\t\n\t\tstartRow++;\n\t\tendRow--;\n\t\tstartCol++;\n\t\tendCol--\n\t}\n\treturn newArr\n }", "function buildSlotSegLevels(segs) {\n\tvar levels = [];\n\tvar i, seg;\n\tvar j;\n\n\tfor (i=0; i<segs.length; i++) {\n\t\tseg = segs[i];\n\n\t\t// go through all the levels and stop on the first level where there are no collisions\n\t\tfor (j=0; j<levels.length; j++) {\n\t\t\tif (!computeSlotSegCollisions(seg, levels[j]).length) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\t(levels[j] || (levels[j] = [])).push(seg);\n\t}\n\n\treturn levels;\n}", "function buildSlotSegLevels(segs) {\n\tvar levels = [];\n\tvar i, seg;\n\tvar j;\n\n\tfor (i=0; i<segs.length; i++) {\n\t\tseg = segs[i];\n\n\t\t// go through all the levels and stop on the first level where there are no collisions\n\t\tfor (j=0; j<levels.length; j++) {\n\t\t\tif (!computeSlotSegCollisions(seg, levels[j]).length) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\t(levels[j] || (levels[j] = [])).push(seg);\n\t}\n\n\treturn levels;\n}", "function buildSlotSegLevels(segs) {\n\tvar levels = [];\n\tvar i, seg;\n\tvar j;\n\n\tfor (i=0; i<segs.length; i++) {\n\t\tseg = segs[i];\n\n\t\t// go through all the levels and stop on the first level where there are no collisions\n\t\tfor (j=0; j<levels.length; j++) {\n\t\t\tif (!computeSlotSegCollisions(seg, levels[j]).length) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\t(levels[j] || (levels[j] = [])).push(seg);\n\t}\n\n\treturn levels;\n}", "function buildSlotSegLevels(segs) {\n\tvar levels = [];\n\tvar i, seg;\n\tvar j;\n\n\tfor (i=0; i<segs.length; i++) {\n\t\tseg = segs[i];\n\n\t\t// go through all the levels and stop on the first level where there are no collisions\n\t\tfor (j=0; j<levels.length; j++) {\n\t\t\tif (!computeSlotSegCollisions(seg, levels[j]).length) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\t(levels[j] || (levels[j] = [])).push(seg);\n\t}\n\n\treturn levels;\n}", "function buildSlotSegLevels(segs) {\n\tvar levels = [];\n\tvar i, seg;\n\tvar j;\n\n\tfor (i=0; i<segs.length; i++) {\n\t\tseg = segs[i];\n\n\t\t// go through all the levels and stop on the first level where there are no collisions\n\t\tfor (j=0; j<levels.length; j++) {\n\t\t\tif (!computeSlotSegCollisions(seg, levels[j]).length) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\t(levels[j] || (levels[j] = [])).push(seg);\n\t}\n\n\treturn levels;\n}", "function buildSlotSegLevels(segs) {\n\t\tvar levels = [];\n\t\tvar i, seg;\n\t\tvar j;\n\n\t\tfor (i=0; i<segs.length; i++) {\n\t\t\tseg = segs[i];\n\n\t\t\t// go through all the levels and stop on the first level where there are no collisions\n\t\t\tfor (j=0; j<levels.length; j++) {\n\t\t\t\tif (!computeSlotSegCollisions(seg, levels[j]).length) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tseg.level = j;\n\n\t\t\t(levels[j] || (levels[j] = [])).push(seg);\n\t\t}\n\n\t\treturn levels;\n\t}", "function getSegmentVertices(seg, zlim, xx, yy, zz) {\n var start, end, prev, ids = [];\n if (seg[0] <= seg[1]) {\n start = seg[0];\n end = seg[1];\n } else {\n start = seg[1];\n end = seg[0];\n }\n prev = start;\n for (var i=start+1; i<=end; i++) {\n if (zz[i] >= zlim) {\n if (xx[prev] < xx[i]) {\n ids.push(prev, i);\n } else {\n ids.push(i, prev);\n }\n prev = i;\n }\n }\n return ids;\n }", "function buildSlotSegLevels(segs) {\n\tvar levels = [];\n\tvar i, seg;\n\tvar j;\n\n\tfor (i=0; i<segs.length; i++) {\n\t\tseg = segs[i];\n\n\t\t// go through all the levels and stop on the first level where there are no collisions\n\t\tfor (j=0; j<levels.length; j++) {\n\t\t\tif (!computeSlotSegCollisions(seg, levels[j]).length) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\tseg.level = j;\n\n\t\t(levels[j] || (levels[j] = [])).push(seg);\n\t}\n\n\treturn levels;\n}", "function buildSlotSegLevels(segs) {\n\tvar levels = [];\n\tvar i, seg;\n\tvar j;\n\n\tfor (i=0; i<segs.length; i++) {\n\t\tseg = segs[i];\n\n\t\t// go through all the levels and stop on the first level where there are no collisions\n\t\tfor (j=0; j<levels.length; j++) {\n\t\t\tif (!computeSlotSegCollisions(seg, levels[j]).length) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\tseg.level = j;\n\n\t\t(levels[j] || (levels[j] = [])).push(seg);\n\t}\n\n\treturn levels;\n}", "function buildSlotSegLevels(segs) {\n\tvar levels = [];\n\tvar i, seg;\n\tvar j;\n\n\tfor (i=0; i<segs.length; i++) {\n\t\tseg = segs[i];\n\n\t\t// go through all the levels and stop on the first level where there are no collisions\n\t\tfor (j=0; j<levels.length; j++) {\n\t\t\tif (!computeSlotSegCollisions(seg, levels[j]).length) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\tseg.level = j;\n\n\t\t(levels[j] || (levels[j] = [])).push(seg);\n\t}\n\n\treturn levels;\n}", "function buildSlotSegLevels(segs) {\n\tvar levels = [];\n\tvar i, seg;\n\tvar j;\n\n\tfor (i=0; i<segs.length; i++) {\n\t\tseg = segs[i];\n\n\t\t// go through all the levels and stop on the first level where there are no collisions\n\t\tfor (j=0; j<levels.length; j++) {\n\t\t\tif (!computeSlotSegCollisions(seg, levels[j]).length) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\tseg.level = j;\n\n\t\t(levels[j] || (levels[j] = [])).push(seg);\n\t}\n\n\treturn levels;\n}", "function buildSlotSegLevels(segs) {\n\tvar levels = [];\n\tvar i, seg;\n\tvar j;\n\n\tfor (i=0; i<segs.length; i++) {\n\t\tseg = segs[i];\n\n\t\t// go through all the levels and stop on the first level where there are no collisions\n\t\tfor (j=0; j<levels.length; j++) {\n\t\t\tif (!computeSlotSegCollisions(seg, levels[j]).length) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\tseg.level = j;\n\n\t\t(levels[j] || (levels[j] = [])).push(seg);\n\t}\n\n\treturn levels;\n}", "function buildSlotSegLevels(segs) {\n\tvar levels = [];\n\tvar i, seg;\n\tvar j;\n\n\tfor (i=0; i<segs.length; i++) {\n\t\tseg = segs[i];\n\n\t\t// go through all the levels and stop on the first level where there are no collisions\n\t\tfor (j=0; j<levels.length; j++) {\n\t\t\tif (!computeSlotSegCollisions(seg, levels[j]).length) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\tseg.level = j;\n\n\t\t(levels[j] || (levels[j] = [])).push(seg);\n\t}\n\n\treturn levels;\n}", "function buildSlotSegLevels(segs) {\n\tvar levels = [];\n\tvar i, seg;\n\tvar j;\n\n\tfor (i=0; i<segs.length; i++) {\n\t\tseg = segs[i];\n\n\t\t// go through all the levels and stop on the first level where there are no collisions\n\t\tfor (j=0; j<levels.length; j++) {\n\t\t\tif (!computeSlotSegCollisions(seg, levels[j]).length) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\tseg.level = j;\n\n\t\t(levels[j] || (levels[j] = [])).push(seg);\n\t}\n\n\treturn levels;\n}", "function buildSlotSegLevels(segs) {\n\tvar levels = [];\n\tvar i, seg;\n\tvar j;\n\n\tfor (i=0; i<segs.length; i++) {\n\t\tseg = segs[i];\n\n\t\t// go through all the levels and stop on the first level where there are no collisions\n\t\tfor (j=0; j<levels.length; j++) {\n\t\t\tif (!computeSlotSegCollisions(seg, levels[j]).length) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\tseg.level = j;\n\n\t\t(levels[j] || (levels[j] = [])).push(seg);\n\t}\n\n\treturn levels;\n}", "function print_segment_at_depth(s, segments, file) {\n var output = '',\n indent_with = ' ',\n suffix = '',\n start_indenting_at = 2,\n spaces_added = 0,\n ext = _.last(file.name.split('.')),\n is_folder = false;\n\n // Is this a folder or a file?\n is_folder = segments[s].indexOf('.') > -1 ? false : true;\n\n if (folder_history[s] !== segments[s]) {\n // Set a / suffix on folders\n suffix = is_folder ? '/' : '';\n\n // Set the folder at this depth to be the current segment\n folder_history[s] = segments[s];\n\n // Is this the base folder?\n if (s == 0) {\n output += segments[s] + suffix + '\\n';\n } else {\n // If this is a folder, add newline before it\n if (is_folder) {\n output += '|' + '\\n';\n }\n\n // If we are indenting, add a pipe on the left edge\n if (s >= start_indenting_at) {\n output += '|';\n }\n\n // Add the indentation appropriate to the level\n for (var i = start_indenting_at; i <= s; i++) {\n output += indent_with;\n spaces_added += 2;\n }\n\n // Append comments?\n if (is_folder == false) {\n // Pass in existing indentation\n suffix += parse_comments(file, ext, spaces_added);\n }\n\n // Finally append the file/folder name to the output\n output += '|- ' + segments[s] + suffix + '\\n';\n }\n }\n\n return output;\n}", "function groupSegsByDay(segs) {\n var segsByDay = []; // sparse array\n var i;\n var seg;\n for (i = 0; i < segs.length; i += 1) {\n seg = segs[i];\n (segsByDay[seg.dayIndex] || (segsByDay[seg.dayIndex] = []))\n .push(seg);\n }\n return segsByDay;\n }", "function spiralTraverse(array) {\n const res = [];\n let start_row = 0;\n let end_row = array.length;\n let start_col = 0;\n let end_col = array[0].length;\n\n while (start_col < end_col && start_row < end_row) {\n // right\n for (let i = start_col; i < end_col; ++i) {\n res.push(array[start_row][i]);\n console.log(\"r\", res);\n console.log({ start_row, end_row, start_col, end_col });\n }\n\n // down\n for (let i = start_row + 1; i < end_row; ++i) {\n res.push(array[i][end_col - 1]);\n console.log(\"d\", res);\n console.log({ start_row, end_row, start_col, end_col });\n }\n\n // left\n for (let i = end_col - 2; i >= start_col; --i) {\n if (start_row === end_row - 1) break;\n res.push(array[end_row - 1][i]);\n console.log(\"l\", res);\n console.log({ start_row, end_row, start_col, end_col });\n }\n\n // up\n for (let i = end_row - 2; i > start_row; --i) {\n if (start_col === end_col - 1) break;\n res.push(array[i][start_col]);\n console.log(\"u\", res);\n console.log({ start_row, end_row, start_col, end_col });\n }\n\n ++start_row;\n --end_row;\n ++start_col;\n --end_col;\n }\n\n return res;\n}", "function buildSlotSegLevels(segs) {\n var levels = [];\n var i;\n var seg;\n var j;\n for (i = 0; i < segs.length; i += 1) {\n seg = segs[i];\n // go through all the levels and stop on the first level where there are no collisions\n for (j = 0; j < levels.length; j += 1) {\n if (!computeSlotSegCollisions(seg, levels[j]).length) {\n break;\n }\n }\n seg.level = j;\n (levels[j] || (levels[j] = [])).push(seg);\n }\n return levels;\n }", "function buildSlotSegLevels(segs) {\n var levels = [];\n var i, seg;\n var j;\n\n for (i = 0; i < segs.length; i++) {\n seg = segs[i];\n\n // go through all the levels and stop on the first level where there are no collisions\n for (j = 0; j < levels.length; j++) {\n if (!computeSlotSegCollisions(seg, levels[j]).length) {\n break;\n }\n }\n\n seg.level = j;\n\n (levels[j] || (levels[j] = [])).push(seg);\n }\n\n return levels;\n }", "function buildSlotSegLevels(segs) {\n var levels = [];\n var i;\n var seg;\n var j;\n for (i = 0; i < segs.length; i++) {\n seg = segs[i];\n // go through all the levels and stop on the first level where there are no collisions\n for (j = 0; j < levels.length; j++) {\n if (!computeSlotSegCollisions(seg, levels[j]).length) {\n break;\n }\n }\n seg.level = j;\n (levels[j] || (levels[j] = [])).push(seg);\n }\n return levels;\n }", "function buildSlotSegLevels(segs) {\n var levels = [];\n var i;\n var seg;\n var j;\n for (i = 0; i < segs.length; i++) {\n seg = segs[i];\n // go through all the levels and stop on the first level where there are no collisions\n for (j = 0; j < levels.length; j++) {\n if (!computeSlotSegCollisions(seg, levels[j]).length) {\n break;\n }\n }\n seg.level = j;\n (levels[j] || (levels[j] = [])).push(seg);\n }\n return levels;\n }", "function buildSlotSegLevels(segs) {\n var levels = [];\n var i;\n var seg;\n var j;\n for (i = 0; i < segs.length; i++) {\n seg = segs[i];\n // go through all the levels and stop on the first level where there are no collisions\n for (j = 0; j < levels.length; j++) {\n if (!computeSlotSegCollisions(seg, levels[j]).length) {\n break;\n }\n }\n seg.level = j;\n (levels[j] || (levels[j] = [])).push(seg);\n }\n return levels;\n }", "function unionSegments(segment1, segment2) {\n return [\n Math.min(segment1[0], segment2[0]),\n Math.max(segment1[1], segment2[1]),\n ];\n}", "function lhseg(r,c) {\n if(c-1<0){\n return(null)\n } else {\n return([r,c-1])\n }\n}", "function buildSlotSegLevels(segs) {\n var levels = [];\n var i;\n var seg;\n var j;\n for (i = 0; i < segs.length; i++) {\n seg = segs[i];\n // go through all the levels and stop on the first level where there are no collisions\n for (j = 0; j < levels.length; j++) {\n if (!computeSlotSegCollisions(seg, levels[j]).length) {\n break;\n }\n }\n seg.level = j;\n (levels[j] || (levels[j] = [])).push(seg);\n }\n return levels;\n}", "function buildSlotSegLevels(segs) {\n var levels = [];\n var i;\n var seg;\n var j;\n for (i = 0; i < segs.length; i++) {\n seg = segs[i];\n // go through all the levels and stop on the first level where there are no collisions\n for (j = 0; j < levels.length; j++) {\n if (!computeSlotSegCollisions(seg, levels[j]).length) {\n break;\n }\n }\n seg.level = j;\n (levels[j] || (levels[j] = [])).push(seg);\n }\n return levels;\n}", "function buildSlotSegLevels(segs) {\n var levels = [];\n var i;\n var seg;\n var j;\n for (i = 0; i < segs.length; i++) {\n seg = segs[i];\n // go through all the levels and stop on the first level where there are no collisions\n for (j = 0; j < levels.length; j++) {\n if (!computeSlotSegCollisions(seg, levels[j]).length) {\n break;\n }\n }\n seg.level = j;\n (levels[j] || (levels[j] = [])).push(seg);\n }\n return levels;\n}", "function buildSlotSegLevels(segs) {\n var levels = [];\n var i;\n var seg;\n var j;\n for (i = 0; i < segs.length; i++) {\n seg = segs[i];\n // go through all the levels and stop on the first level where there are no collisions\n for (j = 0; j < levels.length; j++) {\n if (!computeSlotSegCollisions(seg, levels[j]).length) {\n break;\n }\n }\n seg.level = j;\n (levels[j] || (levels[j] = [])).push(seg);\n }\n return levels;\n}", "function buildSlotSegLevels(segs) {\n var levels = [];\n var i;\n var seg;\n var j;\n for (i = 0; i < segs.length; i++) {\n seg = segs[i];\n // go through all the levels and stop on the first level where there are no collisions\n for (j = 0; j < levels.length; j++) {\n if (!computeSlotSegCollisions(seg, levels[j]).length) {\n break;\n }\n }\n seg.level = j;\n (levels[j] || (levels[j] = [])).push(seg);\n }\n return levels;\n}", "function chunkPathArr(a, n, balanced) {\n if (n < 2)\n return [a];\n\n var len = a.length,\n out = [],\n i = 0,\n size;\n\n if (len % n === 0) {\n size = Math.floor(len / n);\n while (i < len) {\n out.push(a.slice(i, i += size));\n }\n } else if (balanced) {\n while (i < len) {\n size = Math.ceil((len - i) / n--);\n out.push(a.slice(i, i += size));\n }\n } else {\n n--;\n size = Math.floor(len / n);\n if (len % size === 0)\n size--;\n while (i < size * n) {\n out.push(a.slice(i, i += size));\n }\n out.push(a.slice(size * n));\n }\n return out;\n }", "listSegments(marker, options = {}) {\n return tslib.__asyncGenerator(this, arguments, function* listSegments_1() {\n let listBlobsFlatSegmentResponse;\n if (!!marker || marker === undefined) {\n do {\n listBlobsFlatSegmentResponse = yield tslib.__await(this.listBlobFlatSegment(marker, options));\n marker = listBlobsFlatSegmentResponse.continuationToken;\n yield yield tslib.__await(yield tslib.__await(listBlobsFlatSegmentResponse));\n } while (marker);\n }\n });\n }", "listSegments(marker, options = {}) {\n return tslib.__asyncGenerator(this, arguments, function* listSegments_1() {\n let listBlobsFlatSegmentResponse;\n if (!!marker || marker === undefined) {\n do {\n listBlobsFlatSegmentResponse = yield tslib.__await(this.listBlobFlatSegment(marker, options));\n marker = listBlobsFlatSegmentResponse.continuationToken;\n yield yield tslib.__await(yield tslib.__await(listBlobsFlatSegmentResponse));\n } while (marker);\n }\n });\n }", "function spiral() {\n var arr = [];\n var count = 100;\n for(let i = 1; i <= 10; i ++) {\n let subArr = [];\n for(let j = 1; j <= 10; j++) {\n subArr.push(count);\n count--;\n }\n if ( i % 2 == 0 ) {\n subArr = subArr.reverse();\n }\n arr.push(subArr);\n }\n console.table(arr);\n}", "function rangeset(array, callback, halfopen = false) {\n if (!callback) {\n callback = (start, end) =>\n start === end ? `${start}` : `${start}-${end}`;\n }\n const sequence = array.sort().map((v) => Number.parseInt(v));\n const ranges = [];\n for (let i = 0; i < sequence.length; i += 1) {\n const rstart = sequence[i];\n let rend = rstart;\n while (sequence[i + 1] - sequence[i] === 1) {\n rend = sequence[i + 1]; // sequential...\n i += 1;\n }\n ranges.push(callback(rstart, halfopen ? rend + 1 : rend));\n }\n\n return ranges;\n}", "function build_list_of_lines(){\n var count = 0;\n\n if (edges.length > 0){\n do {\n showArray(edges[count]);\n count++;\n }while (count != edges.length);\n }\n}", "levelTraversal () {\n let elements = [];\n let agenda = [this];\n while(agenda.length > 0) {\n let curElem = agenda.shift();\n if(curElem.height == 0) continue;\n elements.push(curElem);\n agenda.push(curElem.left);\n agenda.push(curElem.right);\n }\n return elements;\n }", "function chunk(array, size) {\n\tvar arr = [];\n\tvar subArr = [];\n\tvar increment = 0;\n\tconsole.log(\"Starting ########### \" + size);\n\n\tfor (let index = 0; index < array.length; index++) {\n\t\tif (increment < size) {\n\t\t\tsubArr.push(array[index]);\n\t\t\tincrement++;\n\t\t} else {\n\t\t\tarr.push(subArr);\n\t\t\tsubArr = [];\n\t\t\tsubArr.push(array[index]);\n\t\t\tincrement = 1;\n\t\t}\n\t\t// Endgame if only 1 case last check\n\t\tif (array.length - 1 === index) {\n\t\t\tarr.push(subArr);\n\t\t}\n\t}\n\n\t/*\n\tarray.forEach((element) => {\n\t\tconsole.log(\"Printing element: \" + element);\n\t\tif (increment < size) {\n\t\t\tsubArr.push(element);\n\t\t\tincrement++;\n\t\t} else {\n\t\t\tarr.push(subArr);\n\t\t\tsubArr = [];\n\t\t\tsubArr.push(element);\n\t\t\tincrement = 1;\n\t\t}\n\t});\n\t*/\n\n\t/*\n\tfor (const index of array) {\n\t\tconsole.log(\"Printing index: \" + index);\n\t\tconsole.log(\"Printing element: \" + array[index]);\n\t\tconsole.log(\"Length of array: \" + array.length);\n\t\tif (increment < size) {\n\t\t\tsubArr.push(element);\n\t\t\tincrement++;\n\t\t\tif (array.length - 1 === index + 1) {\n\t\t\t\tarr.push(subArr);\n\t\t\t}\n\t\t} else {\n\t\t\tarr.push(subArr);\n\t\t\tsubArr = [];\n\t\t\tsubArr.push(element);\n\t\t\tincrement = 1;\n\t\t}\n\t}\n\n\t*/\n\n\treturn arr;\n}", "function genStartArray() {\n var array = [];\n for (var i = 0; i < backGr.totalTiles; i++) {\n array.push(i);\n }\n return array;\n }", "function spiral2() {\n var arr = [];\n var count = 100;\n for(let i = 10; i >= 1; i--) {\n let subArr = [];\n for(let j = 10; j >= 1; j--) {\n if ( i % 2 == 1 ) {\n subArr.push( (i * 10) - j + 1);\n } else {\n subArr.push(count);\n }\n count--;\n }\n arr.push(subArr);\n }\n console.table(arr);\n}", "function buildSlotSegLevels(segs) {\n var levels = [];\n var i;\n var seg;\n var j;\n\n for (i = 0; i < segs.length; i++) {\n seg = segs[i]; // go through all the levels and stop on the first level where there are no collisions\n\n for (j = 0; j < levels.length; j++) {\n if (!computeSlotSegCollisions(seg, levels[j]).length) {\n break;\n }\n }\n\n seg.level = j;\n (levels[j] || (levels[j] = [])).push(seg);\n }\n\n return levels;\n } // Find all the segments in `otherSegs` that vertically collide with `seg`.", "function getSegment(radius, offset) {\n const x = Math.sqrt(radius * radius / 2);\n const y = radius - x;\n const array = [\n \"M\", 0, offset,\n \"A\", radius, radius, 0, 0, 1, x, y + offset,\n \"L\", 0, radius + offset,\n \"Z\"\n ];\n return array.join(\" \");\n}" ]
[ "0.65865535", "0.6370189", "0.6370189", "0.6370189", "0.6370189", "0.6370189", "0.6002403", "0.59722155", "0.59133196", "0.59133196", "0.59133196", "0.59133196", "0.59133196", "0.5782829", "0.576825", "0.576825", "0.576825", "0.576825", "0.576825", "0.57671696", "0.5751859", "0.57045716", "0.5701217", "0.56671745", "0.5572276", "0.5553938", "0.550481", "0.5500256", "0.54147905", "0.5387412", "0.53734744", "0.53702414", "0.53702414", "0.5359068", "0.5359068", "0.5359068", "0.53435147", "0.53435147", "0.5331569", "0.5331569", "0.5331569", "0.5331569", "0.5331569", "0.53191316", "0.53185236", "0.52875894", "0.52709246", "0.52709246", "0.52709246", "0.52628833", "0.52360255", "0.5233648", "0.5186791", "0.51848274", "0.5168928", "0.5168928", "0.5168928", "0.5168928", "0.5168928", "0.5165048", "0.5164958", "0.51526", "0.51526", "0.51526", "0.51526", "0.51526", "0.51526", "0.51526", "0.51526", "0.5148378", "0.51442623", "0.5142657", "0.51415557", "0.5132154", "0.51292086", "0.51292086", "0.51292086", "0.5122351", "0.5120826", "0.5117426", "0.5117426", "0.5117426", "0.5117426", "0.5117426", "0.51137257", "0.5112701", "0.5112701", "0.51011574", "0.5096182", "0.5066665", "0.50296444", "0.50294775", "0.50231206", "0.50137", "0.500872", "0.50075036" ]
0.5949408
12
Find all the segments in `otherSegs` that vertically collide with `seg`. Append into an optionallysupplied `results` array and return.
function computeSlotSegCollisions(seg, otherSegs, results) { results = results || []; for (var i=0; i<otherSegs.length; i++) { if (isSlotSegCollision(seg, otherSegs[i])) { results.push(otherSegs[i]); } } return results; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function computeSlotSegCollisions(seg, otherSegs, results) {\n if (results === void 0) {\n results = [];\n }\n\n for (var i = 0; i < otherSegs.length; i++) {\n if (isSlotSegCollision(seg, otherSegs[i])) {\n results.push(otherSegs[i]);\n }\n }\n\n return results;\n } // Do these segments occupy the same vertical space?", "function computeSlotSegCollisions(seg, otherSegs, results) {\n if (results === void 0) {\n results = [];\n }\n\n for (var i = 0; i < otherSegs.length; i++) {\n if (isSlotSegCollision(seg, otherSegs[i])) {\n results.push(otherSegs[i]);\n }\n }\n\n return results;\n } // Do these segments occupy the same vertical space?", "function computeSlotSegCollisions(seg,otherSegs,results){if(results===void 0){results=[];}for(var i=0;i<otherSegs.length;i++){if(isSlotSegCollision(seg,otherSegs[i])){results.push(otherSegs[i]);}}return results;}// Do these segments occupy the same vertical space?", "function computeSlotSegCollisions(seg, otherSegs, results) {\n results = results || [];\n\n for (var i = 0; i < otherSegs.length; i++) {\n if (isSlotSegCollision(seg, otherSegs[i])) {\n results.push(otherSegs[i]);\n }\n }\n\n return results;\n }", "function computeSlotSegCollisions(seg, otherSegs, results) {\n if (results === void 0) { results = []; }\n for (var i = 0; i < otherSegs.length; i++) {\n if (isSlotSegCollision(seg, otherSegs[i])) {\n results.push(otherSegs[i]);\n }\n }\n return results;\n }", "function computeSlotSegCollisions(seg, otherSegs, results) {\n if (results === void 0) { results = []; }\n for (var i = 0; i < otherSegs.length; i++) {\n if (isSlotSegCollision(seg, otherSegs[i])) {\n results.push(otherSegs[i]);\n }\n }\n return results;\n }", "function computeSlotSegCollisions(seg, otherSegs, results) {\n if (results === void 0) { results = []; }\n for (var i = 0; i < otherSegs.length; i++) {\n if (isSlotSegCollision(seg, otherSegs[i])) {\n results.push(otherSegs[i]);\n }\n }\n return results;\n }", "function computeSlotSegCollisions(seg, otherSegs, results) {\n if (results === void 0) { results = []; }\n for (var i = 0; i < otherSegs.length; i++) {\n if (isSlotSegCollision(seg, otherSegs[i])) {\n results.push(otherSegs[i]);\n }\n }\n return results;\n}", "function computeSlotSegCollisions(seg, otherSegs, results) {\n if (results === void 0) { results = []; }\n for (var i = 0; i < otherSegs.length; i++) {\n if (isSlotSegCollision(seg, otherSegs[i])) {\n results.push(otherSegs[i]);\n }\n }\n return results;\n}", "function computeSlotSegCollisions(seg, otherSegs, results) {\n if (results === void 0) { results = []; }\n for (var i = 0; i < otherSegs.length; i++) {\n if (isSlotSegCollision(seg, otherSegs[i])) {\n results.push(otherSegs[i]);\n }\n }\n return results;\n}", "function computeSlotSegCollisions(seg, otherSegs, results) {\n if (results === void 0) { results = []; }\n for (var i = 0; i < otherSegs.length; i++) {\n if (isSlotSegCollision(seg, otherSegs[i])) {\n results.push(otherSegs[i]);\n }\n }\n return results;\n}", "function computeSlotSegCollisions(seg, otherSegs, results) {\n if (results === void 0) { results = []; }\n for (var i = 0; i < otherSegs.length; i++) {\n if (isSlotSegCollision(seg, otherSegs[i])) {\n results.push(otherSegs[i]);\n }\n }\n return results;\n}", "function computeSlotSegCollisions(seg, otherSegs, results) {\n if (results === void 0) { results = []; }\n for (var i = 0; i < otherSegs.length; i += 1) {\n if (isSlotSegCollision(seg, otherSegs[i])) {\n results.push(otherSegs[i]);\n }\n }\n return results;\n }", "function computeSlotSegCollisions(seg, otherSegs, results) {\n\t\tresults = results || [];\n\n\t\tfor (var i=0; i<otherSegs.length; i++) {\n\t\t\tif (isSlotSegCollision(seg, otherSegs[i])) {\n\t\t\t\tresults.push(otherSegs[i]);\n\t\t\t}\n\t\t}\n\n\t\treturn results;\n\t}", "function buildSlotSegLevels(segs) {\n var levels = [];\n var i;\n var seg;\n var j;\n\n for (i = 0; i < segs.length; i++) {\n seg = segs[i]; // go through all the levels and stop on the first level where there are no collisions\n\n for (j = 0; j < levels.length; j++) {\n if (!computeSlotSegCollisions(seg, levels[j]).length) {\n break;\n }\n }\n\n seg.level = j;\n (levels[j] || (levels[j] = [])).push(seg);\n }\n\n return levels;\n } // Find all the segments in `otherSegs` that vertically collide with `seg`.", "function computeSlotSegPressures(seg){var forwardSegs=seg.forwardSegs;var forwardPressure=0;var i;var forwardSeg;if(seg.forwardPressure===undefined){// not already computed\nfor(i=0;i<forwardSegs.length;i++){forwardSeg=forwardSegs[i];// figure out the child's maximum forward path\ncomputeSlotSegPressures(forwardSeg);// either use the existing maximum, or use the child's forward pressure\n// plus one (for the forwardSeg itself)\nforwardPressure=Math.max(forwardPressure,1+forwardSeg.forwardPressure);}seg.forwardPressure=forwardPressure;}}// Find all the segments in `otherSegs` that vertically collide with `seg`.", "function placeRects(allRects, segs, cells) {\n let rectsByEachCol = groupRectsByEachCol(allRects, cells.length);\n let singleColPlacements = [];\n let multiColPlacements = [];\n let leftoverMargins = [];\n for (let col = 0; col < cells.length; col += 1) {\n let rects = rectsByEachCol[col];\n // compute all static segs in singlePlacements\n let singlePlacements = [];\n let currentHeight = 0;\n let currentMarginTop = 0;\n for (let rect of rects) {\n let seg = segs[rect.index];\n singlePlacements.push({\n seg: resliceSeg(seg, col, col + 1, cells),\n isVisible: true,\n isAbsolute: false,\n absoluteTop: rect.levelCoord,\n marginTop: rect.levelCoord - currentHeight,\n });\n currentHeight = rect.levelCoord + rect.thickness;\n }\n // compute mixed static/absolute segs in multiPlacements\n let multiPlacements = [];\n currentHeight = 0;\n currentMarginTop = 0;\n for (let rect of rects) {\n let seg = segs[rect.index];\n let isAbsolute = rect.span.end - rect.span.start > 1; // multi-column?\n let isFirstCol = rect.span.start === col;\n currentMarginTop += rect.levelCoord - currentHeight; // amount of space since bottom of previous seg\n currentHeight = rect.levelCoord + rect.thickness; // height will now be bottom of current seg\n if (isAbsolute) {\n currentMarginTop += rect.thickness;\n if (isFirstCol) {\n multiPlacements.push({\n seg: resliceSeg(seg, rect.span.start, rect.span.end, cells),\n isVisible: true,\n isAbsolute: true,\n absoluteTop: rect.levelCoord,\n marginTop: 0,\n });\n }\n }\n else if (isFirstCol) {\n multiPlacements.push({\n seg: resliceSeg(seg, rect.span.start, rect.span.end, cells),\n isVisible: true,\n isAbsolute: false,\n absoluteTop: rect.levelCoord,\n marginTop: currentMarginTop, // claim the margin\n });\n currentMarginTop = 0;\n }\n }\n singleColPlacements.push(singlePlacements);\n multiColPlacements.push(multiPlacements);\n leftoverMargins.push(currentMarginTop);\n }\n return { singleColPlacements, multiColPlacements, leftoverMargins };\n }", "get excludeCollinear(){\n\t\tlet list = this.segList2D;\n\t\tlet newlist = [];\n\t\tfor (let i=0; i<list.length; i++){\n\t\t\tlet thisseg = list[i];\n\t\t\tlet x0 = thisseg.a[0];\n\t\t\tlet y0 = thisseg.a[1];\n\t\t\tlet x1 = thisseg.b[0];\n\t\t\tlet y1 = thisseg.b[1];\n\t\t\tlet nextseg\n\t\t\tif (i === list.length-1){\n\t\t\t\tnextseg = list[0];\n\t\t\t}\n\t\t\telse{\n\t\t\t\tnextseg = list[i+1];\n\t\t\t}\n\t\t\tlet a0 = nextseg.a[0];\n\t\t\tlet b0 = nextseg.a[1];\n\t\t\tlet a1 = nextseg.b[0];\n\t\t\tlet b1 = nextseg.b[1];\n\t\t\tlet xy = Math.round((y1-y0)/(x1-x0)*1000000)/1000000;\n\t\t\tlet ab = Math.round((b1-b0)/(a1-a0)*1000000)/1000000;\n\t\t\tif (xy !== ab){\n\t\t\t\tnewlist.push(thisseg);\n\t\t\t}\n\t\t\telse{\n\t\t\t\tif (i===list.length-1){\n\t\t\t\t\tnewlist.shift();\n\t\t\t\t}\n\t\t\t\tnewlist.push({a:[x0,y0],b:[a1,b1]})\n\t\t\t}\n\t\t}\n\t\treturn newlist;\n\t}", "function testSegmentCollision(segment) {\n var i;\n var numcollisions = 0;\n for (i = 0; i < alledges.length; i += 1) { //Iterate through all edges and make sure it's not overlapping any of them.\n if (alledges[i].points !== undefined && alledges[i].points !== null) {\n if (isOverlappingEE(segment, alledges[i])) { //overlaps are automatically rejected\n if (segment.sourceObject !== alledges[i].sourceObject || segment.color !== alledges[i].color) { //if they share the same source, it's OK, but if their colors are different, it's not. NOTE: CANNOT BE SOURCE OR TARGET SHARED OR WEIRD STUFF HAPPENS\n numcollisions = Number.MAX_VALUE;\n break; //stop bothering with this multiple\n }\n } else if (isCollidingEE(segment, alledges[i], false, false)) {\n numcollisions += 1;\n }\n }\n }\n for (i = 0; i < allquestions.length; i += 1) { //Iterate through all nodes\n if (isCollidingNE(allquestions[i], segment)) {\n numcollisions = Number.MAX_VALUE;\n break; //stop bothering with this multiple\n }\n }\n return numcollisions;\n}", "function intersectSegments(ids, xx, yy, optsArg) {\n var lim = ids.length - 2,\n opts = optsArg || {},\n intersections = [],\n tolerance = opts.tolerance, // may be undefined\n s1p1, s1p2, s2p1, s2p2,\n s1p1x, s1p2x, s2p1x, s2p2x,\n s1p1y, s1p2y, s2p1y, s2p2y,\n hit, seg1, seg2, i, j;\n\n // Sort segments by xmin, to allow efficient exclusion of segments with\n // non-overlapping x extents.\n sortSegmentIds(xx, ids); // sort by ascending xmin\n\n i = 0;\n while (i < lim) {\n s1p1 = ids[i];\n s1p2 = ids[i+1];\n s1p1x = xx[s1p1];\n s1p2x = xx[s1p2];\n s1p1y = yy[s1p1];\n s1p2y = yy[s1p2];\n // count++;\n\n j = i;\n while (j < lim) {\n j += 2;\n s2p1 = ids[j];\n s2p1x = xx[s2p1];\n\n if (s1p2x < s2p1x) break; // x extent of seg 2 is greater than seg 1: done with seg 1\n //if (s1p2x <= s2p1x) break; // this misses point-segment intersections when s1 or s2 is vertical\n\n s2p1y = yy[s2p1];\n s2p2 = ids[j+1];\n s2p2x = xx[s2p2];\n s2p2y = yy[s2p2];\n\n // skip segments with non-overlapping y ranges\n if (s1p1y >= s2p1y) {\n if (s1p1y > s2p2y && s1p2y > s2p1y && s1p2y > s2p2y) continue;\n } else {\n if (s1p1y < s2p2y && s1p2y < s2p1y && s1p2y < s2p2y) continue;\n }\n\n // skip segments that are adjacent in a path (optimization)\n // TODO: consider if this eliminates some cases that should\n // be detected, e.g. spikes formed by unequal segments\n if (s1p1 == s2p1 || s1p1 == s2p2 || s1p2 == s2p1 || s1p2 == s2p2) {\n continue;\n }\n\n // test two candidate segments for intersection\n hit = geom.segmentIntersection(s1p1x, s1p1y, s1p2x, s1p2y,\n s2p1x, s2p1y, s2p2x, s2p2y, tolerance);\n if (hit) {\n seg1 = [s1p1, s1p2];\n seg2 = [s2p1, s2p2];\n intersections.push(formatIntersection(hit, seg1, seg2, xx, yy));\n if (hit.length == 4) {\n // two collinear segments may have two endpoint intersections\n intersections.push(formatIntersection(hit.slice(2), seg1, seg2, xx, yy));\n }\n }\n }\n i += 2;\n }\n return intersections;\n\n // @p is an [x, y] location along a segment defined by ids @id1 and @id2\n // return array [i, j] where i and j are the same endpoint ids with i <= j\n // if @p coincides with an endpoint, return the id of that endpoint twice\n function getEndpointIds(id1, id2, p) {\n var i = id1 < id2 ? id1 : id2,\n j = i === id1 ? id2 : id1;\n if (xx[i] == p[0] && yy[i] == p[1]) {\n j = i;\n } else if (xx[j] == p[0] && yy[j] == p[1]) {\n i = j;\n }\n return [i, j];\n }\n }", "function computeSlotSegPressures(seg) {\n var forwardSegs = seg.forwardSegs;\n var forwardPressure = 0;\n var i;\n var forwardSeg;\n\n if (seg.forwardPressure === undefined) {\n // not already computed\n for (i = 0; i < forwardSegs.length; i++) {\n forwardSeg = forwardSegs[i]; // figure out the child's maximum forward path\n\n computeSlotSegPressures(forwardSeg); // either use the existing maximum, or use the child's forward pressure\n // plus one (for the forwardSeg itself)\n\n forwardPressure = Math.max(forwardPressure, 1 + forwardSeg.forwardPressure);\n }\n\n seg.forwardPressure = forwardPressure;\n }\n } // Find all the segments in `otherSegs` that vertically collide with `seg`.", "function getPositions() {\n \n var rects;\n var nRects;\n var rect;\n \n var top;\n var left;\n var width;\n var right;\n \n var textXY;\n \n var currentLine = -1;\n \n for (var i = 0; i < nSegs; i++) {\n \n rects = segs[i].getClientRects();\n nRects = rects.length;\n \n segRanges[i] = {};\n \n for (var j = 0; j < nRects; j++) {\n \n rect = rects[j];\n textXY = getTextXY(rect.left, rect.top);\n top = textXY.y - segBoxPadY;\n left = textXY.x - segBoxPadX;\n width = rect.width + segBoxPadX * 2;\n \n if (j !== nRects - 1) {\n \n width += extensionWidth;\n }\n \n right = left + width;\n \n if (isNewLine(top)) {\n \n currentLine++;\n \n lines[currentLine] = {\n top: top,\n left: left,\n width: width\n };\n \n segBoxesByLine[currentLine] = [];\n \n } else {\n \n lines[currentLine].width += width;\n }\n \n segBoxesByLine[currentLine].push({\n left: left,\n right: left + width,\n segIndex: i\n });\n \n if (j === 0) {\n \n segRanges[i].startLine = currentLine;\n segRanges[i].startLeft = left;\n }\n \n if (j === nRects - 1) {\n \n segRanges[i].endLine = currentLine;\n segRanges[i].endRight = right;\n }\n }\n }\n \n function isNewLine(top) {\n \n if (lines.length === 0 || lines[lines.length - 1].top !== top) {\n \n return true;\n }\n }\n}", "function formatIntersectingSegment(x, y, i, j, xx, yy) {\n if (xx[i] == x && yy[i] == y) {\n return [i, i];\n }\n if (xx[j] == x && yy[j] == y) {\n return [j, j];\n }\n return i < j ? [i, j] : [j, i];\n }", "function isDaySegCollision(seg, otherSegs) {\n var i;\n var otherSeg;\n\n for (i = 0; i < otherSegs.length; i++) {\n otherSeg = otherSegs[i];\n\n if (otherSeg.firstCol <= seg.lastCol && otherSeg.lastCol >= seg.firstCol) {\n return true;\n }\n }\n\n return false;\n } // A cmp function for determining the leftmost event", "function computeSegVerticals(segs, dayDate, slatCoords, eventMinHeight) {\n for (var _i = 0, segs_1 = segs; _i < segs_1.length; _i++) {\n var seg = segs_1[_i];\n seg.top = slatCoords.computeDateTop(seg.start, dayDate);\n seg.bottom = Math.max(seg.top + (eventMinHeight || 0), // yuck\n slatCoords.computeDateTop(seg.end, dayDate));\n }\n }", "function matchSegment(seg1, seg2, r, result) {\n var a = seg1[0],\n b = seg1[1],\n c = seg2[0],\n d = seg2[1],\n len = result.length;\n\n var ap = closePoint(a, c, d, r),\n bp = closePoint(b, c, d, r);\n\n // a----b\n // c---ap---bp---d\n if (ap !== null && bp !== null) return true; // fully covered\n\n var cp = closePoint(c, a, b, r),\n dp = closePoint(d, a, b, r);\n\n if (cp !== null && cp === dp) return false; // degenerate case, no overlap\n\n if (cp !== null && dp !== null) {\n var cpp = segPoint(a, b, cp);\n var dpp = segPoint(a, b, dp);\n\n if (equals(cpp, dpp)) return false; // degenerate case\n\n // a---cp---dp---b\n // c----d\n if (cp < dp) {\n if (!equals(a, cpp)) result.push([a, cpp]);\n if (!equals(dpp, b)) result.push([dpp, b]);\n\n // a---dp---cp---b\n // d----c\n } else {\n if (!equals(a, dpp)) result.push([a, dpp]);\n if (!equals(cpp, b)) result.push([cpp, b]);\n }\n\n } else if (cp !== null) {\n var cpp = segPoint(a, b, cp);\n\n // a----cp---b\n // d---ap---c\n if (ap !== null && !equals(a, cpp)) result.push([cpp, b]);\n\n // a---cp---b\n // c----bp---d\n else if (bp !== null && !equals(cpp, b)) result.push([a, cpp]);\n\n } else if (dp !== null) {\n var dpp = segPoint(a, b, dp);\n\n // a---dp---b\n // d----bp---c\n if (bp !== null && !equals(dpp, b)) result.push([a, dpp]);\n\n // a----dp---b\n // c---ap---d\n else if (ap !== null && !equals(a, dpp)) result.push([dpp, b]);\n }\n\n return result.length !== len; // segment processed\n}", "function calculateVerticals(segments) {\n\t\tvar rowCnt = getRowCnt();\n\t\tvar colCnt = getColCnt();\n\t\tvar rowContentHeights = []; // content height for each row\n\t\tvar segmentRows = buildSegmentRows(segments); // an array of segment arrays, one for each row\n\t\tvar colI;\n\n\t\tfor (var rowI=0; rowI<rowCnt; rowI++) {\n\t\t\tvar segmentRow = segmentRows[rowI];\n\n\t\t\t// an array of running total heights for each column.\n\t\t\t// initialize with all zeros.\n\t\t\tvar colHeights = [];\n\t\t\tfor (colI=0; colI<colCnt; colI++) {\n\t\t\t\tcolHeights.push(0);\n\t\t\t}\n\n\t\t\t// loop through every segment\n\t\t\tfor (var segmentI=0; segmentI<segmentRow.length; segmentI++) {\n\t\t\t\tvar segment = segmentRow[segmentI];\n\n\t\t\t\t// find the segment's top coordinate by looking at the max height\n\t\t\t\t// of all the columns the segment will be in.\n\t\t\t\tsegment.top = arrayMax(\n\t\t\t\t\tcolHeights.slice(\n\t\t\t\t\t\tsegment.leftCol,\n\t\t\t\t\t\tsegment.rightCol + 1 // make exclusive for slice\n\t\t\t\t\t)\n\t\t\t\t);\n\n\t\t\t\t// adjust the columns to account for the segment's height\n\t\t\t\tfor (colI=segment.leftCol; colI<=segment.rightCol; colI++) {\n\t\t\t\t\tcolHeights[colI] = segment.top + segment.outerHeight;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// the tallest column in the row should be the \"content height\"\n\t\t\trowContentHeights.push(arrayMax(colHeights));\n\t\t}\n\n\t\treturn rowContentHeights;\n\t}", "function calculateVerticals(segments) {\n\t\tvar rowCnt = getRowCnt();\n\t\tvar colCnt = getColCnt();\n\t\tvar rowContentHeights = []; // content height for each row\n\t\tvar segmentRows = buildSegmentRows(segments); // an array of segment arrays, one for each row\n\t\tvar colI;\n\n\t\tfor (var rowI=0; rowI<rowCnt; rowI++) {\n\t\t\tvar segmentRow = segmentRows[rowI];\n\n\t\t\t// an array of running total heights for each column.\n\t\t\t// initialize with all zeros.\n\t\t\tvar colHeights = [];\n\t\t\tfor (colI=0; colI<colCnt; colI++) {\n\t\t\t\tcolHeights.push(0);\n\t\t\t}\n\n\t\t\t// loop through every segment\n\t\t\tfor (var segmentI=0; segmentI<segmentRow.length; segmentI++) {\n\t\t\t\tvar segment = segmentRow[segmentI];\n\n\t\t\t\t// find the segment's top coordinate by looking at the max height\n\t\t\t\t// of all the columns the segment will be in.\n\t\t\t\tsegment.top = arrayMax(\n\t\t\t\t\tcolHeights.slice(\n\t\t\t\t\t\tsegment.leftCol,\n\t\t\t\t\t\tsegment.rightCol + 1 // make exclusive for slice\n\t\t\t\t\t)\n\t\t\t\t);\n\n\t\t\t\t// adjust the columns to account for the segment's height\n\t\t\t\tfor (colI=segment.leftCol; colI<=segment.rightCol; colI++) {\n\t\t\t\t\tcolHeights[colI] = segment.top + segment.outerHeight;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// the tallest column in the row should be the \"content height\"\n\t\t\trowContentHeights.push(arrayMax(colHeights));\n\t\t}\n\n\t\treturn rowContentHeights;\n\t}", "getSeams() {\n var used = new Set();\n var seams = [];\n var nbEdges = this.getNonBoundaryEdges(); //interior edges\n console.log(\"nb edges\", nbEdges)\n for (var i = 0; i < nbEdges.length; i++) {\n for (var j = i + 1; j < nbEdges.length; j++) {\n var edge = nbEdges[i];\n var otherEdge = nbEdges[j];\n if (edge.collinear(otherEdge)) {\n if (used.has(edge) || used.has(otherEdge)) {\n //set of collinear edges already exists\n for (var k = 0; k < seams.length; k++) {\n //need to add new edge to this set\n if (seams[k].has(edge)) {\n seams[k].add(otherEdge);\n used.add(otherEdge);\n } else {\n if (seams[k].has(otherEdge)) {\n seams[k].add(edge);\n used.add(edge);\n }\n }\n }\n } else {\n //need to create new collinear set of two seams\n seams.push(new Set([edge, otherEdge]));\n used.add(edge);\n used.add(otherEdge);\n }\n }\n }\n }\n for (var i = 0; i < nbEdges.length; i++) {\n // now we need to add binary edges\n var edge = nbEdges[i];\n if (!used.has(edge)) {\n var binEdge = new Set();\n binEdge.add(edge);\n used.add(edge);\n seams.push(binEdge);\n }\n }\n this.seams = seams;\n }", "function calculateVerticals(segments) {\n\t\tvar rowCnt = getRowCnt();\n\t\tvar colCnt = getColCnt();\n\t\tvar rowContentHeights = []; // content height for each row\n\t\tvar segmentRows = buildSegmentRows(segments); // an array of segment arrays, one for each row\n\n\t\tfor (var rowI=0; rowI<rowCnt; rowI++) {\n\t\t\tvar segmentRow = segmentRows[rowI];\n\n\t\t\t// an array of running total heights for each column.\n\t\t\t// initialize with all zeros.\n\t\t\tvar colHeights = [];\n\t\t\tfor (var colI=0; colI<colCnt; colI++) {\n\t\t\t\tcolHeights.push(0);\n\t\t\t}\n\n\t\t\t// loop through every segment\n\t\t\tfor (var segmentI=0; segmentI<segmentRow.length; segmentI++) {\n\t\t\t\tvar segment = segmentRow[segmentI];\n\n\t\t\t\t// find the segment's top coordinate by looking at the max height\n\t\t\t\t// of all the columns the segment will be in.\n\t\t\t\tsegment.top = arrayMax(\n\t\t\t\t\tcolHeights.slice(\n\t\t\t\t\t\tsegment.leftCol,\n\t\t\t\t\t\tsegment.rightCol + 1 // make exclusive for slice\n\t\t\t\t\t)\n\t\t\t\t);\n\n\t\t\t\t// adjust the columns to account for the segment's height\n\t\t\t\tfor (var colI=segment.leftCol; colI<=segment.rightCol; colI++) {\n\t\t\t\t\tcolHeights[colI] = segment.top + segment.outerHeight;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// the tallest column in the row should be the \"content height\"\n\t\t\trowContentHeights.push(arrayMax(colHeights));\n\t\t}\n\n\t\treturn rowContentHeights;\n\t}", "function calculateVerticals(segments) {\n\t\tvar rowCnt = getRowCnt();\n\t\tvar colCnt = getColCnt();\n\t\tvar rowContentHeights = []; // content height for each row\n\t\tvar segmentRows = buildSegmentRows(segments); // an array of segment arrays, one for each row\n\n\t\tfor (var rowI=0; rowI<rowCnt; rowI++) {\n\t\t\tvar segmentRow = segmentRows[rowI];\n\n\t\t\t// an array of running total heights for each column.\n\t\t\t// initialize with all zeros.\n\t\t\tvar colHeights = [];\n\t\t\tfor (var colI=0; colI<colCnt; colI++) {\n\t\t\t\tcolHeights.push(0);\n\t\t\t}\n\n\t\t\t// loop through every segment\n\t\t\tfor (var segmentI=0; segmentI<segmentRow.length; segmentI++) {\n\t\t\t\tvar segment = segmentRow[segmentI];\n\n\t\t\t\t// find the segment's top coordinate by looking at the max height\n\t\t\t\t// of all the columns the segment will be in.\n\t\t\t\tsegment.top = arrayMax(\n\t\t\t\t\tcolHeights.slice(\n\t\t\t\t\t\tsegment.leftCol,\n\t\t\t\t\t\tsegment.rightCol + 1 // make exclusive for slice\n\t\t\t\t\t)\n\t\t\t\t);\n\n\t\t\t\t// adjust the columns to account for the segment's height\n\t\t\t\tfor (var colI=segment.leftCol; colI<=segment.rightCol; colI++) {\n\t\t\t\t\tcolHeights[colI] = segment.top + segment.outerHeight;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// the tallest column in the row should be the \"content height\"\n\t\t\trowContentHeights.push(arrayMax(colHeights));\n\t\t}\n\n\t\treturn rowContentHeights;\n\t}", "function calculateVerticals(segments) {\n\t\tvar rowCnt = getRowCnt();\n\t\tvar colCnt = getColCnt();\n\t\tvar rowContentHeights = []; // content height for each row\n\t\tvar segmentRows = buildSegmentRows(segments); // an array of segment arrays, one for each row\n\n\t\tfor (var rowI=0; rowI<rowCnt; rowI++) {\n\t\t\tvar segmentRow = segmentRows[rowI];\n\n\t\t\t// an array of running total heights for each column.\n\t\t\t// initialize with all zeros.\n\t\t\tvar colHeights = [];\n\t\t\tfor (var colI=0; colI<colCnt; colI++) {\n\t\t\t\tcolHeights.push(0);\n\t\t\t}\n\n\t\t\t// loop through every segment\n\t\t\tfor (var segmentI=0; segmentI<segmentRow.length; segmentI++) {\n\t\t\t\tvar segment = segmentRow[segmentI];\n\n\t\t\t\t// find the segment's top coordinate by looking at the max height\n\t\t\t\t// of all the columns the segment will be in.\n\t\t\t\tsegment.top = arrayMax(\n\t\t\t\t\tcolHeights.slice(\n\t\t\t\t\t\tsegment.leftCol,\n\t\t\t\t\t\tsegment.rightCol + 1 // make exclusive for slice\n\t\t\t\t\t)\n\t\t\t\t);\n\n\t\t\t\t// adjust the columns to account for the segment's height\n\t\t\t\tfor (var colI=segment.leftCol; colI<=segment.rightCol; colI++) {\n\t\t\t\t\tcolHeights[colI] = segment.top + segment.outerHeight;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// the tallest column in the row should be the \"content height\"\n\t\t\trowContentHeights.push(arrayMax(colHeights));\n\t\t}\n\n\t\treturn rowContentHeights;\n\t}", "function isDaySegCollision(seg, otherSegs) {\n var i;\n var otherSeg;\n for (i = 0; i < otherSegs.length; i++) {\n otherSeg = otherSegs[i];\n if (otherSeg.firstCol <= seg.lastCol &&\n otherSeg.lastCol >= seg.firstCol) {\n return true;\n }\n }\n return false;\n}", "function buildSegmentSubrows(segments) {\n\n\t\t// Give preference to elements with certain criteria, so they have\n\t\t// a chance to be closer to the top.\n\t\tsegments.sort(compareDaySegments);\n\n\t\tvar subrows = [];\n\t\tfor (var i=0; i<segments.length; i++) {\n\t\t\tvar segment = segments[i];\n\n\t\t\t// loop through subrows, starting with the topmost, until the segment\n\t\t\t// doesn't collide with other segments.\n\t\t\tfor (var j=0; j<subrows.length; j++) {\n\t\t\t\tif (!isDaySegmentCollision(segment, subrows[j])) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\t// `j` now holds the desired subrow index\n\t\t\tif (subrows[j]) {\n\t\t\t\tsubrows[j].push(segment);\n\t\t\t}\n\t\t\telse {\n\t\t\t\tsubrows[j] = [ segment ];\n\t\t\t}\n\t\t}\n\n\t\treturn subrows;\n\t}", "function buildSegmentSubrows(segments) {\n\n\t\t// Give preference to elements with certain criteria, so they have\n\t\t// a chance to be closer to the top.\n\t\tsegments.sort(compareDaySegments);\n\n\t\tvar subrows = [];\n\t\tfor (var i=0; i<segments.length; i++) {\n\t\t\tvar segment = segments[i];\n\n\t\t\t// loop through subrows, starting with the topmost, until the segment\n\t\t\t// doesn't collide with other segments.\n\t\t\tfor (var j=0; j<subrows.length; j++) {\n\t\t\t\tif (!isDaySegmentCollision(segment, subrows[j])) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\t// `j` now holds the desired subrow index\n\t\t\tif (subrows[j]) {\n\t\t\t\tsubrows[j].push(segment);\n\t\t\t}\n\t\t\telse {\n\t\t\t\tsubrows[j] = [ segment ];\n\t\t\t}\n\t\t}\n\n\t\treturn subrows;\n\t}", "function buildSegmentSubrows(segments) {\n\n\t\t// Give preference to elements with certain criteria, so they have\n\t\t// a chance to be closer to the top.\n\t\tsegments.sort(compareDaySegments);\n\n\t\tvar subrows = [];\n\t\tfor (var i=0; i<segments.length; i++) {\n\t\t\tvar segment = segments[i];\n\n\t\t\t// loop through subrows, starting with the topmost, until the segment\n\t\t\t// doesn't collide with other segments.\n\t\t\tfor (var j=0; j<subrows.length; j++) {\n\t\t\t\tif (!isDaySegmentCollision(segment, subrows[j])) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\t// `j` now holds the desired subrow index\n\t\t\tif (subrows[j]) {\n\t\t\t\tsubrows[j].push(segment);\n\t\t\t}\n\t\t\telse {\n\t\t\t\tsubrows[j] = [ segment ];\n\t\t\t}\n\t\t}\n\n\t\treturn subrows;\n\t}", "function buildSegmentSubrows(segments) {\n\n\t\t// Give preference to elements with certain criteria, so they have\n\t\t// a chance to be closer to the top.\n\t\tsegments.sort(compareDaySegments);\n\n\t\tvar subrows = [];\n\t\tfor (var i=0; i<segments.length; i++) {\n\t\t\tvar segment = segments[i];\n\n\t\t\t// loop through subrows, starting with the topmost, until the segment\n\t\t\t// doesn't collide with other segments.\n\t\t\tfor (var j=0; j<subrows.length; j++) {\n\t\t\t\tif (!isDaySegmentCollision(segment, subrows[j])) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\t// `j` now holds the desired subrow index\n\t\t\tif (subrows[j]) {\n\t\t\t\tsubrows[j].push(segment);\n\t\t\t}\n\t\t\telse {\n\t\t\t\tsubrows[j] = [ segment ];\n\t\t\t}\n\t\t}\n\n\t\treturn subrows;\n\t}", "function buildSegmentSubrows(segments) {\n\n\t\t// Give preference to elements with certain criteria, so they have\n\t\t// a chance to be closer to the top.\n\t\tsegments.sort(compareDaySegments);\n\n\t\tvar subrows = [];\n\t\tfor (var i=0; i<segments.length; i++) {\n\t\t\tvar segment = segments[i];\n\n\t\t\t// loop through subrows, starting with the topmost, until the segment\n\t\t\t// doesn't collide with other segments.\n\t\t\tfor (var j=0; j<subrows.length; j++) {\n\t\t\t\tif (!isDaySegmentCollision(segment, subrows[j])) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\t// `j` now holds the desired subrow index\n\t\t\tif (subrows[j]) {\n\t\t\t\tsubrows[j].push(segment);\n\t\t\t}\n\t\t\telse {\n\t\t\t\tsubrows[j] = [ segment ];\n\t\t\t}\n\t\t}\n\n\t\treturn subrows;\n\t}", "function addSegEndsFromSequences(){\n //Add all the starting segEnds and internal segJoins\n for(var i=0;i<seqArr.length;i++){\n var length=parseInt(seqArr[i]['length']),\n seqId=seqArr[i]['id'];\n segEndArr[segEndArr.length]=[seqId,0,'POS_STRAND']\n segEndArr[segEndArr.length]=[seqId,length-1,'NEG_STRAND']\n segJoinArr[segJoinArr.length]=[[seqId,0,'POS_STRAND'],[seqId,length-1,'NEG_STRAND'],'internal',length]\n }\n segmentize();\n}", "function isDaySegCollision(seg, otherSegs) {\n var i;\n var otherSeg;\n for (i = 0; i < otherSegs.length; i++) {\n otherSeg = otherSegs[i];\n if (otherSeg.firstCol <= seg.lastCol &&\n otherSeg.lastCol >= seg.firstCol) {\n return true;\n }\n }\n return false;\n }", "function isDaySegCollision(seg, otherSegs) {\n var i;\n var otherSeg;\n for (i = 0; i < otherSegs.length; i++) {\n otherSeg = otherSegs[i];\n if (otherSeg.firstCol <= seg.lastCol &&\n otherSeg.lastCol >= seg.firstCol) {\n return true;\n }\n }\n return false;\n }", "function isDaySegCollision(seg, otherSegs) {\n var i;\n var otherSeg;\n for (i = 0; i < otherSegs.length; i++) {\n otherSeg = otherSegs[i];\n if (otherSeg.firstCol <= seg.lastCol &&\n otherSeg.lastCol >= seg.firstCol) {\n return true;\n }\n }\n return false;\n }", "function findHitCandidates(x, y, shp, arcs) {\n var yy = findRayShapeIntersections(x, y, shp, arcs);\n var cands = [], y1, y2, interval;\n\n // sorting by y-coord organizes y-intercepts into interior segments\n utils.genericSort(yy);\n for (var i=0; i<yy.length; i+=2) {\n y1 = yy[i];\n y2 = yy[i+1];\n interval = (y2 - y1) / 2;\n if (interval > 0) {\n cands.push({\n y: (y1 + y2) / 2,\n x: x,\n interval: interval\n });\n }\n }\n return cands;\n }", "function isDaySegCollision(seg,otherSegs){var i;var otherSeg;for(i=0;i<otherSegs.length;i++){otherSeg=otherSegs[i];if(otherSeg.leftCol<=seg.rightCol&&otherSeg.rightCol>=seg.leftCol){return true;}}return false;}// A cmp function for determining the leftmost event", "function isDaySegCollision(seg, otherSegs) {\n var i;\n var otherSeg;\n for (i = 0; i < otherSegs.length; i++) {\n otherSeg = otherSegs[i];\n if (otherSeg.leftCol <= seg.rightCol &&\n otherSeg.rightCol >= seg.leftCol) {\n return true;\n }\n }\n return false;\n}", "function isDaySegCollision(seg, otherSegs) {\n var i;\n var otherSeg;\n for (i = 0; i < otherSegs.length; i++) {\n otherSeg = otherSegs[i];\n if (otherSeg.leftCol <= seg.rightCol &&\n otherSeg.rightCol >= seg.leftCol) {\n return true;\n }\n }\n return false;\n}", "function isDaySegCollision(seg, otherSegs) {\n var i;\n var otherSeg;\n for (i = 0; i < otherSegs.length; i++) {\n otherSeg = otherSegs[i];\n if (otherSeg.leftCol <= seg.rightCol &&\n otherSeg.rightCol >= seg.leftCol) {\n return true;\n }\n }\n return false;\n}", "function isDaySegCollision(seg, otherSegs) {\n var i;\n var otherSeg;\n for (i = 0; i < otherSegs.length; i++) {\n otherSeg = otherSegs[i];\n if (otherSeg.leftCol <= seg.rightCol &&\n otherSeg.rightCol >= seg.leftCol) {\n return true;\n }\n }\n return false;\n}", "removeSegmentsIntersections(tunnels, isWalls) {\n const walls = this.walls;\n let startWallsLength = 0;\n let newWallsAmount = walls.length - startWallsLength;\n\n while (newWallsAmount > 0) {\n startWallsLength = walls.length;\n for (let j = 0; j < walls.length; j += 4) {\n for (let i = 0; i < (isWalls ? j : tunnels.length); i += 4) {\n const pieces = this.resolveSegmentSegment(\n tunnels[i], tunnels[i + 1], tunnels[i + 2], tunnels[i + 3],\n walls[j], walls[j + 1], walls[j + 2], walls[j + 3]\n );\n if (pieces.length < 4) { // empty walls will be removed in removeZeroLengthWalls()\n walls[j] = 0;\n walls[j + 1] = 0;\n walls[j + 2] = 0;\n walls[j + 3] = 0;\n } else {\n walls[j] = pieces[0];\n walls[j + 1] = pieces[1];\n walls[j + 2] = pieces[2];\n walls[j + 3] = pieces[3];\n\n if (pieces.length > 4) {\n walls.push(pieces[4]);\n walls.push(pieces[5]);\n walls.push(pieces[6]);\n walls.push(pieces[7]);\n }\n }\n }\n }\n newWallsAmount = walls.length - startWallsLength;\n }\n }", "function _testRectPolyCollision_clipRectSegs(mRect, moveBox) {\n return _.chain(mRect.toSegments())\n .filter(seg => {\n let u = VecMath.sub(seg[1], seg[0]);\n let testPt = [seg[0][0], moveBox.height*2, 1];\n let v = VecMath.sub(testPt, seg[0]);\n let cross = VecMath.cross(u, v);\n\n // Keep the segment if the test point is on its \"left\" side.\n return cross[2] < 0;\n })\n .map(seg => {\n let p = seg[0];\n let q = seg[1];\n\n // let p be the leftmost point.\n if(p[0] > q[0]) {\n let swap = q;\n q = p;\n p = swap;\n }\n\n // Get the segment's line equation data.\n let dx = q[0] - p[0];\n let dy = q[1] - p[1];\n let m = dy/dx;\n let b = p[1] - m*p[0];\n let newSeg = [p, q];\n newSeg.m = m;\n newSeg.b = b;\n return newSeg;\n })\n .value();\n }", "function getCrossings(points, edges, edgeBounds) {\n var result = []\n boxIntersect(edgeBounds, function(i, j) {\n var e = edges[i]\n var f = edges[j]\n if(e[0] === f[0] || e[0] === f[1] ||\n e[1] === f[0] || e[1] === f[1]) {\n return\n }\n var a = points[e[0]]\n var b = points[e[1]]\n var c = points[f[0]]\n var d = points[f[1]]\n if(segseg(a, b, c, d)) {\n result.push([i, j])\n }\n })\n return result\n}", "function getCrossings(points, edges, edgeBounds) {\n\t var result = []\n\t boxIntersect(edgeBounds, function(i, j) {\n\t var e = edges[i]\n\t var f = edges[j]\n\t if(e[0] === f[0] || e[0] === f[1] ||\n\t e[1] === f[0] || e[1] === f[1]) {\n\t return\n\t }\n\t var a = points[e[0]]\n\t var b = points[e[1]]\n\t var c = points[f[0]]\n\t var d = points[f[1]]\n\t if(segseg(a, b, c, d)) {\n\t result.push([i, j])\n\t }\n\t })\n\t return result\n\t}", "function getCrossings(points, edges, edgeBounds) {\n\t var result = []\n\t boxIntersect(edgeBounds, function(i, j) {\n\t var e = edges[i]\n\t var f = edges[j]\n\t if(e[0] === f[0] || e[0] === f[1] ||\n\t e[1] === f[0] || e[1] === f[1]) {\n\t return\n\t }\n\t var a = points[e[0]]\n\t var b = points[e[1]]\n\t var c = points[f[0]]\n\t var d = points[f[1]]\n\t if(segseg(a, b, c, d)) {\n\t result.push([i, j])\n\t }\n\t })\n\t return result\n\t}", "function segments_union(segment_1, segment_2){\n var max_segment_1, min_segment_1, max_segment_2, min_segment_2, absolute_max, absolute_min;\n //Case 1: vertical segments\n var vertical = is_vertical_or_quasi_vertical(segment_1); //equivalently is_vertical_or_quasi_vertical(segment_2)\n if(vertical){\n\n if(parseFloat(segment_1[0][1]) >= parseFloat(segment_1[1][1])){\n max_segment_1 = segment_1[0]; min_segment_1 = segment_1[1];\n }\n else{\n max_segment_1 = segment_1[1]; min_segment_1 = segment_1[0];\n }\n if(parseFloat(segment_2[0][1]) >= parseFloat(segment_2[1][1])){\n max_segment_2 = segment_2[0]; min_segment_2 = segment_2[1];\n }\n else{\n max_segment_2 = segment_2[1]; min_segment_2 = segment_2[0];\n }\n\n if(parseFloat(max_segment_1[1]) >= parseFloat(max_segment_2[1])){\n absolute_max = max_segment_1;\n }\n else{\n absolute_max = max_segment_2;\n }\n if(parseFloat(min_segment_1[1]) < parseFloat(min_segment_2[1])){\n absolute_min = min_segment_1;\n }\n else{\n absolute_min = min_segment_2;\n }\n\n return [absolute_min, absolute_max];\n }\n\n //Case 2: non vertical segments\n if(parseFloat(segment_1[0][0]) >= parseFloat(segment_1[1][0])){\n max_segment_1 = segment_1[0]; min_segment_1 = segment_1[1];\n }\n else{\n max_segment_1 = segment_1[1]; min_segment_1 = segment_1[0];\n }\n if(parseFloat(segment_2[0][0]) >= parseFloat(segment_2[1][0])){\n max_segment_2 = segment_2[0]; min_segment_2 = segment_2[1];\n }\n else{\n max_segment_2 = segment_2[1]; min_segment_2 = segment_2[0];\n }\n\n if(parseFloat(max_segment_1[0]) >= parseFloat(max_segment_2[0])){\n absolute_max = max_segment_1;\n }\n else{\n absolute_max = max_segment_2;\n }\n if(parseFloat(min_segment_1[0]) < parseFloat(min_segment_2[0])){\n absolute_min = min_segment_1;\n }\n else{\n absolute_min = min_segment_2;\n }\n\n return [absolute_min, absolute_max];\n}", "clipEar(listofseg){\n\t\tlet copypoint = listofseg.map(function(e){\n\t\t\treturn e.a\n\t\t})\n\t\tfor (let i=0; i<listofseg.length;i++){\n\t\t\tlet sega = listofseg[i];\n\t\t\tlet segb;\n\t\t\tlet copy = copypoint.map((x=>x));\n\t\t\tif (i=== listofseg.length-1){\n\t\t\t\tsegb = listofseg[0]\n\t\t\t\tcopy.splice(i,1)\n\t\t\t\tcopy.splice(0,1)\n\t\t\t\tcopy.splice(0,1)\n\t\t\t}\n\t\t\telse {\n\t\t\t\tsegb = listofseg[i+1]\n\t\t\t\tcopy.splice(i,1)\n\t\t\t\tcopy.splice(i,1)\n\t\t\t\tcopy.splice(i,1)\n\t\t\t}\n\t\t\tlet notfound = true;\n\t\t\tfor (let j=0; j<copy.length;j++){\n\t\t\t\tif (this.checkTriangle(sega, segb, copy[j])){\n\t\t\t\t\tnotfound = false\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (notfound){\n\t\t\t\tthis.segList.push([sega, segb])\n\t\t\t\tif (i=== listofseg.length-1){\n\t\t\t\t\tlistofseg.pop();\n\t\t\t\t\tlistofseg.shift();\n\t\t\t\t\treturn listofseg.splice(0,0,{a:sega.a,b:segb.b})\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\treturn listofseg.splice(i,2,{a:sega.a,b:segb.b})\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "function getCrossings (points, edges, edgeBounds) {\n var result = []\n boxIntersect(edgeBounds, function (i, j) {\n var e = edges[i]\n var f = edges[j]\n if (e[0] === f[0] || e[0] === f[1] ||\n e[1] === f[0] || e[1] === f[1]) {\n return\n }\n var a = points[e[0]]\n var b = points[e[1]]\n var c = points[f[0]]\n var d = points[f[1]]\n if (segseg(a, b, c, d)) {\n result.push([i, j])\n }\n })\n return result\n}", "function sub_compute_intersection() {\n for (var i = sidx; i < (sidx + size) && i < biglen; i++) {\n for (var j = 0; j < smlen; j++) {\n if (bigger[i] === smaller[j]) {\n results.push(smaller[j]);\n break;\n }\n }\n }\n if (i >= biglen) {\n callback(null, results);\n } else {\n sidx += size;\n process.nextTick(sub_compute_intersection);\n }\n }", "function getTJunctions (points, edges, edgeBounds, vertBounds) {\n var result = []\n boxIntersect(edgeBounds, vertBounds, function (i, v) {\n var e = edges[i]\n if (e[0] === v || e[1] === v) {\n return\n }\n var p = points[v]\n var a = points[e[0]]\n var b = points[e[1]]\n if (segseg(a, b, p, p)) {\n result.push([i, v])\n }\n })\n return result\n}", "function getTJunctions(points, edges, edgeBounds, vertBounds) {\n\t var result = []\n\t boxIntersect(edgeBounds, vertBounds, function(i, v) {\n\t var e = edges[i]\n\t if(e[0] === v || e[1] === v) {\n\t return\n\t }\n\t var p = points[v]\n\t var a = points[e[0]]\n\t var b = points[e[1]]\n\t if(segseg(a, b, p, p)) {\n\t result.push([i, v])\n\t }\n\t })\n\t return result\n\t}", "function getTJunctions(points, edges, edgeBounds, vertBounds) {\n\t var result = []\n\t boxIntersect(edgeBounds, vertBounds, function(i, v) {\n\t var e = edges[i]\n\t if(e[0] === v || e[1] === v) {\n\t return\n\t }\n\t var p = points[v]\n\t var a = points[e[0]]\n\t var b = points[e[1]]\n\t if(segseg(a, b, p, p)) {\n\t result.push([i, v])\n\t }\n\t })\n\t return result\n\t}", "@computed\n get textIntersections() {\n if (this.annotations.length == 0) {\n return [];\n }\n // split annotation in parts to create spans\n\n const offsets = {};\n\n // helper functions\n const addOffset = (start, end, annotations) => {\n if (offsets[`${start}-${end}`] == undefined) {\n offsets[`${start}-${end}`] = {\n startOffset: start,\n endOffset: end,\n annotations: annotations,\n };\n } else {\n for (const annotation of annotations) {\n if (!includes(offsets[`${start}-${end}`].annotations, annotation)) {\n offsets[`${start}-${end}`].annotations.push(annotation);\n }\n }\n }\n };\n\n const intersects = (x1, x2, y1, y2) => x2 > y1 && y2 > x1;\n\n // go through the annotation and split them\n const annotationCount = this.annotations.length;\n\n for (let i = 0; i < annotationCount; i++) {\n const annotation = this.annotations[i];\n let hasIntersections = false;\n let lastMiddleOffset = undefined;\n\n if (!isEmpty(offsets)) {\n // offset exists\n map(\n orderBy(\n values(offsets),\n ['startOffset', 'endOffset'],\n ['asc', 'desc'],\n ),\n offset => {\n if (\n intersects(\n annotation.startOffset,\n annotation.endOffset,\n offset.startOffset,\n offset.endOffset - 1,\n )\n ) {\n if (!hasIntersections) {\n hasIntersections = true;\n }\n\n // found intersection\n const startOffset = annotation.startOffset - offset.startOffset;\n const endOffset = annotation.endOffset - offset.endOffset;\n const offsetAnnotations = offset.annotations;\n\n // front part\n\n if (startOffset > 0) {\n addOffset(\n offset.startOffset,\n annotation.startOffset,\n offsetAnnotations,\n );\n } else if (\n startOffset < 0 &&\n lastMiddleOffset < annotation.startOffset // dont add thing that there before\n ) {\n addOffset(annotation.startOffset, offset.startOffset, [\n annotation.id,\n ]);\n }\n\n // middle part\n\n addOffset(\n Math.max(annotation.startOffset, offset.startOffset),\n Math.min(annotation.endOffset, offset.endOffset),\n offsetAnnotations.concat(annotation.id),\n );\n\n lastMiddleOffset = Math.min(\n annotation.endOffset,\n offset.endOffset,\n );\n\n // back part\n\n if (endOffset > 0) {\n addOffset(offset.endOffset, annotation.endOffset, [\n annotation.id,\n ]);\n } else if (endOffset < 0) {\n addOffset(\n annotation.endOffset,\n offset.endOffset,\n offsetAnnotations,\n );\n }\n\n // delete pre existing offset if not in there\n if (\n (startOffset != 0 || endOffset != 0) &&\n offsets[\n `${offset.startOffset}-${offset.endOffset}`\n ].annotations.find(d => {\n return d == annotation.id;\n }) == undefined\n ) {\n delete offsets[`${offset.startOffset}-${offset.endOffset}`];\n }\n }\n },\n );\n } else {\n // offset is empty > init\n addOffset(annotation.startOffset, annotation.endOffset, [\n annotation.id,\n ]);\n }\n // no intersections found\n if (!hasIntersections) {\n // didn't found intersection\n addOffset(annotation.startOffset, annotation.endOffset, [\n annotation.id,\n ]);\n }\n }\n return orderBy(values(offsets), ['startOffset'], 'asc');\n }", "function isDaySegCollision(seg, otherSegs) {\n var i, otherSeg;\n\n for (i = 0; i < otherSegs.length; i++) {\n otherSeg = otherSegs[i];\n\n if (\n otherSeg.leftCol <= seg.rightCol &&\n otherSeg.rightCol >= seg.leftCol\n ) {\n return true;\n }\n }\n\n return false;\n }", "function getTJunctions(points, edges, edgeBounds, vertBounds) {\n var result = []\n boxIntersect(edgeBounds, vertBounds, function(i, v) {\n var e = edges[i]\n if(e[0] === v || e[1] === v) {\n return\n }\n var p = points[v]\n var a = points[e[0]]\n var b = points[e[1]]\n if(segseg(a, b, p, p)) {\n result.push([i, v])\n }\n })\n return result\n}", "resolveSegmentSegment(ax1, ay1, ax2, ay2, bx1, by1, bx2, by2) {\n const result = [];\n const isHorizontal1 = ax2 - ax1 > ay2 - ay1;\n const isHorizontal2 = bx2 - bx1 > by2 - by1;\n\n if (isHorizontal1 && isHorizontal2 &&\n by1 === ay1 &&\n ((ax1 <= bx2 && ax1 >= bx1) || (ax2 <= bx2 && ax2 >= bx1) || (bx1 <= ax2 && bx1 >= ax1) || (bx2 <= ax2 && bx2 >= ax1))) {\n\n if (bx1 < ax1) result.push(bx1, by1, ax1, by1);\n if (bx2 > ax2) result.push(ax2, by2, bx2, by2);\n\n } else if (!isHorizontal1 && isHorizontal2 &&\n by1 >= ay1 && by1 < ay2 &&\n ((ax1 <= bx2 && ax1 >= bx1) || (ax2 <= bx2 && ax2 >= bx1) || (bx1 <= ax2 && bx1 >= ax1) || (bx2 <= ax2 && bx2 >= ax1))) {\n\n if (bx1 < ax1) result.push(bx1, by1, ax1, by1);\n if (bx2 > ax2) result.push(ax2 + 1, by2, bx2, by2);\n\n } else if (!isHorizontal1 && !isHorizontal2 &&\n ax1 === bx2 &&\n ((by1 <= ay2 && by1 >= ay1) || (by2 <= ay2 && by2 >= ay1) || (ay1 <= by2 && ay1 >= by1) || (ay2 <= by2 && ay2 >= by1))) {\n\n if (by1 < ay1) result.push(bx1, by1, bx1, ay1);\n if (by2 > ay2) result.push(bx2, ay2, bx2, by2);\n\n } else if (isHorizontal1 && !isHorizontal2 &&\n bx1 >= ax1 && bx1 < ax2 &&\n ((ay2 <= by2 && ay2 >= by1) || (ay1 <= by2 && ay1 >= by1) || (by2 <= ay2 && by2 >= ay1) || (by1 <= ay2 && by1 >= ay1))) {\n\n if (by1 < ay1) result.push(bx1, by1, bx1, ay1);\n if (by2 > ay2) result.push(bx2, ay2 + 1, bx2, by2);\n\n } else { // segments do not intersect\n result.push(bx1, by1, bx2, by2);\n }\n\n return result;\n }", "function renderSlotSegs(segs, modifiedEventId) {\n\t\n\t\tvar i, segCnt=segs.length, seg,\n\t\t\tevent,\n\t\t\ttop,\n\t\t\tbottom,\n\t\t\tcolumnLeft,\n\t\t\tcolumnRight,\n\t\t\tcolumnWidth,\n\t\t\twidth,\n\t\t\tleft,\n\t\t\tright,\n\t\t\thtml = '',\n\t\t\teventElements,\n\t\t\teventElement,\n\t\t\ttriggerRes,\n\t\t\ttitleElement,\n\t\t\theight,\n\t\t\tslotSegmentContainer = getSlotSegmentContainer(),\n\t\t\tisRTL = opt('isRTL');\n\t\t\t\n\t\t// calculate position/dimensions, create html\n\t\tfor (i=0; i<segCnt; i++) {\n\t\t\tseg = segs[i];\n\t\t\tevent = seg.event;\n\t\t\ttop = timePosition(seg.start, seg.start);\n\t\t\tbottom = timePosition(seg.start, seg.end);\n\t\t\tcolumnLeft = colContentLeft(seg.col);\n\t\t\tcolumnRight = colContentRight(seg.col);\n\t\t\tcolumnWidth = columnRight - columnLeft;\n\n\t\t\t// shave off space on right near scrollbars (2.5%)\n\t\t\t// TODO: move this to CSS somehow\n\t\t\tcolumnRight -= columnWidth * .025;\n\t\t\tcolumnWidth = columnRight - columnLeft;\n\n\t\t\twidth = columnWidth * (seg.forwardCoord - seg.backwardCoord);\n\n\t\t\tif (opt('slotEventOverlap')) {\n\t\t\t\t// double the width while making sure resize handle is visible\n\t\t\t\t// (assumed to be 20px wide)\n\t\t\t\twidth = Math.max(\n\t\t\t\t\t(width - (20/2)) * 2,\n\t\t\t\t\twidth // narrow columns will want to make the segment smaller than\n\t\t\t\t\t\t// the natural width. don't allow it\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tif (isRTL) {\n\t\t\t\tright = columnRight - seg.backwardCoord * columnWidth;\n\t\t\t\tleft = right - width;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tleft = columnLeft + seg.backwardCoord * columnWidth;\n\t\t\t\tright = left + width;\n\t\t\t}\n\n\t\t\t// make sure horizontal coordinates are in bounds\n\t\t\tleft = Math.max(left, columnLeft);\n\t\t\tright = Math.min(right, columnRight);\n\t\t\twidth = right - left;\n\n\t\t\tseg.top = top;\n\t\t\tseg.left = left;\n\t\t\tseg.outerWidth = width;\n\t\t\tseg.outerHeight = bottom - top;\n\t\t\thtml += slotSegHtml(event, seg);\n\t\t}\n\n\t\tslotSegmentContainer[0].innerHTML = html; // faster than html()\n\t\teventElements = slotSegmentContainer.children();\n\t\t\n\t\t// retrieve elements, run through eventRender callback, bind event handlers\n\t\tfor (i=0; i<segCnt; i++) {\n\t\t\tseg = segs[i];\n\t\t\tevent = seg.event;\n\t\t\teventElement = $(eventElements[i]); // faster than eq()\n\t\t\ttriggerRes = trigger('eventRender', event, event, eventElement);\n\t\t\tif (triggerRes === false) {\n\t\t\t\teventElement.remove();\n\t\t\t}else{\n\t\t\t\tif (triggerRes && triggerRes !== true) {\n\t\t\t\t\teventElement.remove();\n\t\t\t\t\teventElement = $(triggerRes)\n\t\t\t\t\t\t.css({\n\t\t\t\t\t\t\tposition: 'absolute',\n\t\t\t\t\t\t\ttop: seg.top,\n\t\t\t\t\t\t\tleft: seg.left\n\t\t\t\t\t\t})\n\t\t\t\t\t\t.appendTo(slotSegmentContainer);\n\t\t\t\t}\n\t\t\t\tseg.element = eventElement;\n\t\t\t\tif (event._id === modifiedEventId) {\n\t\t\t\t\tbindSlotSeg(event, eventElement, seg);\n\t\t\t\t}else{\n\t\t\t\t\teventElement[0]._fci = i; // for lazySegBind\n\t\t\t\t}\n\t\t\t\treportEventElement(event, eventElement);\n\t\t\t}\n\t\t}\n\t\t\n\t\tlazySegBind(slotSegmentContainer, segs, bindSlotSeg);\n\t\t\n\t\t// record event sides and title positions\n\t\tfor (i=0; i<segCnt; i++) {\n\t\t\tseg = segs[i];\n\t\t\tif (eventElement = seg.element) {\n\t\t\t\tseg.vsides = vsides(eventElement, true);\n\t\t\t\tseg.hsides = hsides(eventElement, true);\n\t\t\t\ttitleElement = eventElement.find('.fc-event-title');\n\t\t\t\tif (titleElement.length) {\n\t\t\t\t\tseg.contentTop = titleElement[0].offsetTop;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t// set all positions/dimensions at once\n\t\tfor (i=0; i<segCnt; i++) {\n\t\t\tseg = segs[i];\n\t\t\tif (eventElement = seg.element) {\n\t\t\t\teventElement[0].style.width = Math.max(0, seg.outerWidth - seg.hsides) + 'px';\n\t\t\t\theight = Math.max(0, seg.outerHeight - seg.vsides);\n\t\t\t\teventElement[0].style.height = height + 'px';\n\t\t\t\tevent = seg.event;\n\t\t\t\tif (seg.contentTop !== undefined && height - seg.contentTop < 10) {\n\t\t\t\t\t// not enough room for title, put it in the time (TODO: maybe make both display:inline instead)\n\t\t\t\t\teventElement.find('div.fc-event-time')\n\t\t\t\t\t\t.text(formatDate(event.start, opt('timeFormat')) + ' - ' + event.title);\n\t\t\t\t\teventElement.find('div.fc-event-title')\n\t\t\t\t\t\t.remove();\n\t\t\t\t}\n\t\t\t\ttrigger('eventAfterRender', event, event, eventElement);\n\t\t\t}\n\t\t}\n\t\t\t\t\t\n\t}", "function renderSlotSegs(segs, modifiedEventId) {\n\t\n\t\tvar i, segCnt=segs.length, seg,\n\t\t\tevent,\n\t\t\ttop,\n\t\t\tbottom,\n\t\t\tcolumnLeft,\n\t\t\tcolumnRight,\n\t\t\tcolumnWidth,\n\t\t\twidth,\n\t\t\tleft,\n\t\t\tright,\n\t\t\thtml = '',\n\t\t\teventElements,\n\t\t\teventElement,\n\t\t\ttriggerRes,\n\t\t\ttitleElement,\n\t\t\theight,\n\t\t\tslotSegmentContainer = getSlotSegmentContainer(),\n\t\t\tisRTL = opt('isRTL');\n\t\t\t\n\t\t// calculate position/dimensions, create html\n\t\tfor (i=0; i<segCnt; i++) {\n\t\t\tseg = segs[i];\n\t\t\tevent = seg.event;\n\t\t\ttop = timePosition(seg.start, seg.start);\n\t\t\tbottom = timePosition(seg.start, seg.end);\n\t\t\tcolumnLeft = colContentLeft(seg.col);\n\t\t\tcolumnRight = colContentRight(seg.col);\n\t\t\tcolumnWidth = columnRight - columnLeft;\n\n\t\t\t// shave off space on right near scrollbars (2.5%)\n\t\t\t// TODO: move this to CSS somehow\n\t\t\tcolumnRight -= columnWidth * .025;\n\t\t\tcolumnWidth = columnRight - columnLeft;\n\n\t\t\twidth = columnWidth * (seg.forwardCoord - seg.backwardCoord);\n\n\t\t\tif (opt('slotEventOverlap')) {\n\t\t\t\t// double the width while making sure resize handle is visible\n\t\t\t\t// (assumed to be 20px wide)\n\t\t\t\twidth = Math.max(\n\t\t\t\t\t(width - (20/2)) * 2,\n\t\t\t\t\twidth // narrow columns will want to make the segment smaller than\n\t\t\t\t\t\t// the natural width. don't allow it\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tif (isRTL) {\n\t\t\t\tright = columnRight - seg.backwardCoord * columnWidth;\n\t\t\t\tleft = right - width;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tleft = columnLeft + seg.backwardCoord * columnWidth;\n\t\t\t\tright = left + width;\n\t\t\t}\n\n\t\t\t// make sure horizontal coordinates are in bounds\n\t\t\tleft = Math.max(left, columnLeft);\n\t\t\tright = Math.min(right, columnRight);\n\t\t\twidth = right - left;\n\n\t\t\tseg.top = top;\n\t\t\tseg.left = left;\n\t\t\tseg.outerWidth = width;\n\t\t\tseg.outerHeight = bottom - top;\n\t\t\thtml += slotSegHtml(event, seg);\n\t\t}\n\n\t\tslotSegmentContainer[0].innerHTML = html; // faster than html()\n\t\teventElements = slotSegmentContainer.children();\n\t\t\n\t\t// retrieve elements, run through eventRender callback, bind event handlers\n\t\tfor (i=0; i<segCnt; i++) {\n\t\t\tseg = segs[i];\n\t\t\tevent = seg.event;\n\t\t\teventElement = $(eventElements[i]); // faster than eq()\n\t\t\ttriggerRes = trigger('eventRender', event, event, eventElement);\n\t\t\tif (triggerRes === false) {\n\t\t\t\teventElement.remove();\n\t\t\t}else{\n\t\t\t\tif (triggerRes && triggerRes !== true) {\n\t\t\t\t\teventElement.remove();\n\t\t\t\t\teventElement = $(triggerRes)\n\t\t\t\t\t\t.css({\n\t\t\t\t\t\t\tposition: 'absolute',\n\t\t\t\t\t\t\ttop: seg.top,\n\t\t\t\t\t\t\tleft: seg.left\n\t\t\t\t\t\t})\n\t\t\t\t\t\t.appendTo(slotSegmentContainer);\n\t\t\t\t}\n\t\t\t\tseg.element = eventElement;\n\t\t\t\tif (event._id === modifiedEventId) {\n\t\t\t\t\tbindSlotSeg(event, eventElement, seg);\n\t\t\t\t}else{\n\t\t\t\t\teventElement[0]._fci = i; // for lazySegBind\n\t\t\t\t}\n\t\t\t\treportEventElement(event, eventElement);\n\t\t\t}\n\t\t}\n\t\t\n\t\tlazySegBind(slotSegmentContainer, segs, bindSlotSeg);\n\t\t\n\t\t// record event sides and title positions\n\t\tfor (i=0; i<segCnt; i++) {\n\t\t\tseg = segs[i];\n\t\t\tif (eventElement = seg.element) {\n\t\t\t\tseg.vsides = vsides(eventElement, true);\n\t\t\t\tseg.hsides = hsides(eventElement, true);\n\t\t\t\ttitleElement = eventElement.find('.fc-event-title');\n\t\t\t\tif (titleElement.length) {\n\t\t\t\t\tseg.contentTop = titleElement[0].offsetTop;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t// set all positions/dimensions at once\n\t\tfor (i=0; i<segCnt; i++) {\n\t\t\tseg = segs[i];\n\t\t\tif (eventElement = seg.element) {\n\t\t\t\teventElement[0].style.width = Math.max(0, seg.outerWidth - seg.hsides) + 'px';\n\t\t\t\theight = Math.max(0, seg.outerHeight - seg.vsides);\n\t\t\t\teventElement[0].style.height = height + 'px';\n\t\t\t\tevent = seg.event;\n\t\t\t\tif (seg.contentTop !== undefined && height - seg.contentTop < 10) {\n\t\t\t\t\t// not enough room for title, put it in the time (TODO: maybe make both display:inline instead)\n\t\t\t\t\teventElement.find('div.fc-event-time')\n\t\t\t\t\t\t.text(formatDate(event.start, opt('timeFormat')) + ' - ' + event.title);\n\t\t\t\t\teventElement.find('div.fc-event-title')\n\t\t\t\t\t\t.remove();\n\t\t\t\t}\n\t\t\t\ttrigger('eventAfterRender', event, event, eventElement);\n\t\t\t}\n\t\t}\n\t\t\t\t\t\n\t}", "function renderSlotSegs(segs, modifiedEventId) {\n\t\n\t\tvar i, segCnt=segs.length, seg,\n\t\t\tevent,\n\t\t\ttop,\n\t\t\tbottom,\n\t\t\tcolumnLeft,\n\t\t\tcolumnRight,\n\t\t\tcolumnWidth,\n\t\t\twidth,\n\t\t\tleft,\n\t\t\tright,\n\t\t\thtml = '',\n\t\t\teventElements,\n\t\t\teventElement,\n\t\t\ttriggerRes,\n\t\t\ttitleElement,\n\t\t\theight,\n\t\t\tslotSegmentContainer = getSlotSegmentContainer(),\n\t\t\tisRTL = opt('isRTL');\n\t\t\t\n\t\t// calculate position/dimensions, create html\n\t\tfor (i=0; i<segCnt; i++) {\n\t\t\tseg = segs[i];\n\t\t\tevent = seg.event;\n\t\t\ttop = timePosition(seg.start, seg.start);\n\t\t\tbottom = timePosition(seg.start, seg.end);\n\t\t\tcolumnLeft = colContentLeft(seg.col);\n\t\t\tcolumnRight = colContentRight(seg.col);\n\t\t\tcolumnWidth = columnRight - columnLeft;\n\n\t\t\t// shave off space on right near scrollbars (2.5%)\n\t\t\t// TODO: move this to CSS somehow\n\t\t\tcolumnRight -= columnWidth * .025;\n\t\t\tcolumnWidth = columnRight - columnLeft;\n\n\t\t\twidth = columnWidth * (seg.forwardCoord - seg.backwardCoord);\n\n\t\t\tif (opt('slotEventOverlap')) {\n\t\t\t\t// double the width while making sure resize handle is visible\n\t\t\t\t// (assumed to be 20px wide)\n\t\t\t\twidth = Math.max(\n\t\t\t\t\t(width - (20/2)) * 2,\n\t\t\t\t\twidth // narrow columns will want to make the segment smaller than\n\t\t\t\t\t\t// the natural width. don't allow it\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tif (isRTL) {\n\t\t\t\tright = columnRight - seg.backwardCoord * columnWidth;\n\t\t\t\tleft = right - width;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tleft = columnLeft + seg.backwardCoord * columnWidth;\n\t\t\t\tright = left + width;\n\t\t\t}\n\n\t\t\t// make sure horizontal coordinates are in bounds\n\t\t\tleft = Math.max(left, columnLeft);\n\t\t\tright = Math.min(right, columnRight);\n\t\t\twidth = right - left;\n\n\t\t\tseg.top = top;\n\t\t\tseg.left = left;\n\t\t\tseg.outerWidth = width;\n\t\t\tseg.outerHeight = bottom - top;\n\t\t\thtml += slotSegHtml(event, seg);\n\t\t}\n\n\t\tslotSegmentContainer[0].innerHTML = html; // faster than html()\n\t\teventElements = slotSegmentContainer.children();\n\t\t\n\t\t// retrieve elements, run through eventRender callback, bind event handlers\n\t\tfor (i=0; i<segCnt; i++) {\n\t\t\tseg = segs[i];\n\t\t\tevent = seg.event;\n\t\t\teventElement = $(eventElements[i]); // faster than eq()\n\t\t\ttriggerRes = trigger('eventRender', event, event, eventElement);\n\t\t\tif (triggerRes === false) {\n\t\t\t\teventElement.remove();\n\t\t\t}else{\n\t\t\t\tif (triggerRes && triggerRes !== true) {\n\t\t\t\t\teventElement.remove();\n\t\t\t\t\teventElement = $(triggerRes)\n\t\t\t\t\t\t.css({\n\t\t\t\t\t\t\tposition: 'absolute',\n\t\t\t\t\t\t\ttop: seg.top,\n\t\t\t\t\t\t\tleft: seg.left\n\t\t\t\t\t\t})\n\t\t\t\t\t\t.appendTo(slotSegmentContainer);\n\t\t\t\t}\n\t\t\t\tseg.element = eventElement;\n\t\t\t\tif (event._id === modifiedEventId) {\n\t\t\t\t\tbindSlotSeg(event, eventElement, seg);\n\t\t\t\t}else{\n\t\t\t\t\teventElement[0]._fci = i; // for lazySegBind\n\t\t\t\t}\n\t\t\t\treportEventElement(event, eventElement);\n\t\t\t}\n\t\t}\n\t\t\n\t\tlazySegBind(slotSegmentContainer, segs, bindSlotSeg);\n\t\t\n\t\t// record event sides and title positions\n\t\tfor (i=0; i<segCnt; i++) {\n\t\t\tseg = segs[i];\n\t\t\tif (eventElement = seg.element) {\n\t\t\t\tseg.vsides = vsides(eventElement, true);\n\t\t\t\tseg.hsides = hsides(eventElement, true);\n\t\t\t\ttitleElement = eventElement.find('.fc-event-title');\n\t\t\t\tif (titleElement.length) {\n\t\t\t\t\tseg.contentTop = titleElement[0].offsetTop;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t// set all positions/dimensions at once\n\t\tfor (i=0; i<segCnt; i++) {\n\t\t\tseg = segs[i];\n\t\t\tif (eventElement = seg.element) {\n\t\t\t\teventElement[0].style.width = Math.max(0, seg.outerWidth - seg.hsides) + 'px';\n\t\t\t\theight = Math.max(0, seg.outerHeight - seg.vsides);\n\t\t\t\teventElement[0].style.height = height + 'px';\n\t\t\t\tevent = seg.event;\n\t\t\t\tif (seg.contentTop !== undefined && height - seg.contentTop < 10) {\n\t\t\t\t\t// not enough room for title, put it in the time (TODO: maybe make both display:inline instead)\n\t\t\t\t\teventElement.find('div.fc-event-time')\n\t\t\t\t\t\t.text(formatDate(event.start, opt('timeFormat')) + ' - ' + event.title);\n\t\t\t\t\teventElement.find('div.fc-event-title')\n\t\t\t\t\t\t.remove();\n\t\t\t\t}\n\t\t\t\ttrigger('eventAfterRender', event, event, eventElement);\n\t\t\t}\n\t\t}\n\t\t\t\t\t\n\t}", "function renderSlotSegs(segs, modifiedEventId) {\n\t\n\t\tvar i, segCnt=segs.length, seg,\n\t\t\tevent,\n\t\t\ttop,\n\t\t\tbottom,\n\t\t\tcolumnLeft,\n\t\t\tcolumnRight,\n\t\t\tcolumnWidth,\n\t\t\twidth,\n\t\t\tleft,\n\t\t\tright,\n\t\t\thtml = '',\n\t\t\teventElements,\n\t\t\teventElement,\n\t\t\ttriggerRes,\n\t\t\ttitleElement,\n\t\t\theight,\n\t\t\tslotSegmentContainer = getSlotSegmentContainer(),\n\t\t\tisRTL = opt('isRTL');\n\t\t\t\n\t\t// calculate position/dimensions, create html\n\t\tfor (i=0; i<segCnt; i++) {\n\t\t\tseg = segs[i];\n\t\t\tevent = seg.event;\n\t\t\ttop = computeDateTop(seg.start, seg.start);\n\t\t\tbottom = computeDateTop(seg.end, seg.start);\n\t\t\tcolumnLeft = colContentLeft(seg.col);\n\t\t\tcolumnRight = colContentRight(seg.col);\n\t\t\tcolumnWidth = columnRight - columnLeft;\n\n\t\t\t// shave off space on right near scrollbars (2.5%)\n\t\t\t// TODO: move this to CSS somehow\n\t\t\tcolumnRight -= columnWidth * .025;\n\t\t\tcolumnWidth = columnRight - columnLeft;\n\n\t\t\twidth = columnWidth * (seg.forwardCoord - seg.backwardCoord);\n\n\t\t\tif (opt('slotEventOverlap')) {\n\t\t\t\t// double the width while making sure resize handle is visible\n\t\t\t\t// (assumed to be 20px wide)\n\t\t\t\twidth = Math.max(\n\t\t\t\t\t(width - (20/2)) * 2,\n\t\t\t\t\twidth // narrow columns will want to make the segment smaller than\n\t\t\t\t\t\t// the natural width. don't allow it\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tif (isRTL) {\n\t\t\t\tright = columnRight - seg.backwardCoord * columnWidth;\n\t\t\t\tleft = right - width;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tleft = columnLeft + seg.backwardCoord * columnWidth;\n\t\t\t\tright = left + width;\n\t\t\t}\n\n\t\t\t// make sure horizontal coordinates are in bounds\n\t\t\tleft = Math.max(left, columnLeft);\n\t\t\tright = Math.min(right, columnRight);\n\t\t\twidth = right - left;\n\n\t\t\tseg.top = top;\n\t\t\tseg.left = left;\n\t\t\tseg.outerWidth = width;\n\t\t\tseg.outerHeight = bottom - top;\n\t\t\thtml += slotSegHtml(event, seg);\n\t\t}\n\n\t\tslotSegmentContainer[0].innerHTML = html; // faster than html()\n\t\teventElements = slotSegmentContainer.children();\n\t\t\n\t\t// retrieve elements, run through eventRender callback, bind event handlers\n\t\tfor (i=0; i<segCnt; i++) {\n\t\t\tseg = segs[i];\n\t\t\tevent = seg.event;\n\t\t\teventElement = $(eventElements[i]); // faster than eq()\n\t\t\ttriggerRes = trigger('eventRender', event, event, eventElement);\n\t\t\tif (triggerRes === false) {\n\t\t\t\teventElement.remove();\n\t\t\t}else{\n\t\t\t\tif (triggerRes && triggerRes !== true) {\n\t\t\t\t\teventElement.remove();\n\t\t\t\t\teventElement = $(triggerRes)\n\t\t\t\t\t\t.css({\n\t\t\t\t\t\t\tposition: 'absolute',\n\t\t\t\t\t\t\ttop: seg.top,\n\t\t\t\t\t\t\tleft: seg.left\n\t\t\t\t\t\t})\n\t\t\t\t\t\t.appendTo(slotSegmentContainer);\n\t\t\t\t}\n\t\t\t\tseg.element = eventElement;\n\t\t\t\tif (event._id === modifiedEventId) {\n\t\t\t\t\tbindSlotSeg(event, eventElement, seg);\n\t\t\t\t}else{\n\t\t\t\t\teventElement[0]._fci = i; // for lazySegBind\n\t\t\t\t}\n\t\t\t\treportEventElement(event, eventElement);\n\t\t\t}\n\t\t}\n\t\t\n\t\tlazySegBind(slotSegmentContainer, segs, bindSlotSeg);\n\t\t\n\t\t// record event sides and title positions\n\t\tfor (i=0; i<segCnt; i++) {\n\t\t\tseg = segs[i];\n\t\t\tif ((eventElement = seg.element)) {\n\t\t\t\tseg.vsides = vsides(eventElement, true);\n\t\t\t\tseg.hsides = hsides(eventElement, true);\n\t\t\t\ttitleElement = eventElement.find('.fc-event-title');\n\t\t\t\tif (titleElement.length) {\n\t\t\t\t\tseg.contentTop = titleElement[0].offsetTop;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t// set all positions/dimensions at once\n\t\tfor (i=0; i<segCnt; i++) {\n\t\t\tseg = segs[i];\n\t\t\tif ((eventElement = seg.element)) {\n\t\t\t\teventElement[0].style.width = Math.max(0, seg.outerWidth - seg.hsides) + 'px';\n\t\t\t\theight = Math.max(0, seg.outerHeight - seg.vsides);\n\t\t\t\teventElement[0].style.height = height + 'px';\n\t\t\t\tevent = seg.event;\n\t\t\t\tif (seg.contentTop !== undefined && height - seg.contentTop < 10) {\n\t\t\t\t\t// not enough room for title, put it in the time (TODO: maybe make both display:inline instead)\n\t\t\t\t\teventElement.find('div.fc-event-time')\n\t\t\t\t\t\t.text(\n\t\t\t\t\t\t\tformatDate(event.start, opt('timeFormat')) + ' - ' + event.title\n\t\t\t\t\t\t);\n\t\t\t\t\teventElement.find('div.fc-event-title')\n\t\t\t\t\t\t.remove();\n\t\t\t\t}\n\t\t\t\ttrigger('eventAfterRender', event, event, eventElement);\n\t\t\t}\n\t\t}\n\t\t\t\t\t\n\t}", "function renderSlotSegs(segs, modifiedEventId) {\n\t\n\t\tvar i, segCnt=segs.length, seg,\n\t\t\tevent,\n\t\t\ttop,\n\t\t\tbottom,\n\t\t\tcolumnLeft,\n\t\t\tcolumnRight,\n\t\t\tcolumnWidth,\n\t\t\twidth,\n\t\t\tleft,\n\t\t\tright,\n\t\t\thtml = '',\n\t\t\teventElements,\n\t\t\teventElement,\n\t\t\ttriggerRes,\n\t\t\ttitleElement,\n\t\t\theight,\n\t\t\tslotSegmentContainer = getSlotSegmentContainer(),\n\t\t\tisRTL = opt('isRTL');\n\t\t\t\n\t\t// calculate position/dimensions, create html\n\t\tfor (i=0; i<segCnt; i++) {\n\t\t\tseg = segs[i];\n\t\t\tevent = seg.event;\n\t\t\ttop = computeDateTop(seg.start, seg.start);\n\t\t\tbottom = computeDateTop(seg.end, seg.start);\n\t\t\tcolumnLeft = colContentLeft(seg.col);\n\t\t\tcolumnRight = colContentRight(seg.col);\n\t\t\tcolumnWidth = columnRight - columnLeft;\n\n\t\t\t// shave off space on right near scrollbars (2.5%)\n\t\t\t// TODO: move this to CSS somehow\n\t\t\tcolumnRight -= columnWidth * .025;\n\t\t\tcolumnWidth = columnRight - columnLeft;\n\n\t\t\twidth = columnWidth * (seg.forwardCoord - seg.backwardCoord);\n\n\t\t\tif (opt('slotEventOverlap')) {\n\t\t\t\t// double the width while making sure resize handle is visible\n\t\t\t\t// (assumed to be 20px wide)\n\t\t\t\twidth = Math.max(\n\t\t\t\t\t(width - (20/2)) * 2,\n\t\t\t\t\twidth // narrow columns will want to make the segment smaller than\n\t\t\t\t\t\t// the natural width. don't allow it\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tif (isRTL) {\n\t\t\t\tright = columnRight - seg.backwardCoord * columnWidth;\n\t\t\t\tleft = right - width;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tleft = columnLeft + seg.backwardCoord * columnWidth;\n\t\t\t\tright = left + width;\n\t\t\t}\n\n\t\t\t// make sure horizontal coordinates are in bounds\n\t\t\tleft = Math.max(left, columnLeft);\n\t\t\tright = Math.min(right, columnRight);\n\t\t\twidth = right - left;\n\n\t\t\tseg.top = top;\n\t\t\tseg.left = left;\n\t\t\tseg.outerWidth = width;\n\t\t\tseg.outerHeight = bottom - top;\n\t\t\thtml += slotSegHtml(event, seg);\n\t\t}\n\n\t\tslotSegmentContainer[0].innerHTML = html; // faster than html()\n\t\teventElements = slotSegmentContainer.children();\n\t\t\n\t\t// retrieve elements, run through eventRender callback, bind event handlers\n\t\tfor (i=0; i<segCnt; i++) {\n\t\t\tseg = segs[i];\n\t\t\tevent = seg.event;\n\t\t\teventElement = $(eventElements[i]); // faster than eq()\n\t\t\ttriggerRes = trigger('eventRender', event, event, eventElement);\n\t\t\tif (triggerRes === false) {\n\t\t\t\teventElement.remove();\n\t\t\t}else{\n\t\t\t\tif (triggerRes && triggerRes !== true) {\n\t\t\t\t\teventElement.remove();\n\t\t\t\t\teventElement = $(triggerRes)\n\t\t\t\t\t\t.css({\n\t\t\t\t\t\t\tposition: 'absolute',\n\t\t\t\t\t\t\ttop: seg.top,\n\t\t\t\t\t\t\tleft: seg.left\n\t\t\t\t\t\t})\n\t\t\t\t\t\t.appendTo(slotSegmentContainer);\n\t\t\t\t}\n\t\t\t\tseg.element = eventElement;\n\t\t\t\tif (event._id === modifiedEventId) {\n\t\t\t\t\tbindSlotSeg(event, eventElement, seg);\n\t\t\t\t}else{\n\t\t\t\t\teventElement[0]._fci = i; // for lazySegBind\n\t\t\t\t}\n\t\t\t\treportEventElement(event, eventElement);\n\t\t\t}\n\t\t}\n\t\t\n\t\tlazySegBind(slotSegmentContainer, segs, bindSlotSeg);\n\t\t\n\t\t// record event sides and title positions\n\t\tfor (i=0; i<segCnt; i++) {\n\t\t\tseg = segs[i];\n\t\t\tif ((eventElement = seg.element)) {\n\t\t\t\tseg.vsides = vsides(eventElement, true);\n\t\t\t\tseg.hsides = hsides(eventElement, true);\n\t\t\t\ttitleElement = eventElement.find('.fc-event-title');\n\t\t\t\tif (titleElement.length) {\n\t\t\t\t\tseg.contentTop = titleElement[0].offsetTop;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t// set all positions/dimensions at once\n\t\tfor (i=0; i<segCnt; i++) {\n\t\t\tseg = segs[i];\n\t\t\tif ((eventElement = seg.element)) {\n\t\t\t\teventElement[0].style.width = Math.max(0, seg.outerWidth - seg.hsides) + 'px';\n\t\t\t\theight = Math.max(0, seg.outerHeight - seg.vsides);\n\t\t\t\teventElement[0].style.height = height + 'px';\n\t\t\t\tevent = seg.event;\n\t\t\t\tif (seg.contentTop !== undefined && height - seg.contentTop < 10) {\n\t\t\t\t\t// not enough room for title, put it in the time (TODO: maybe make both display:inline instead)\n\t\t\t\t\teventElement.find('div.fc-event-time')\n\t\t\t\t\t\t.text(\n\t\t\t\t\t\t\tformatDate(event.start, opt('timeFormat')) + ' - ' + event.title\n\t\t\t\t\t\t);\n\t\t\t\t\teventElement.find('div.fc-event-title')\n\t\t\t\t\t\t.remove();\n\t\t\t\t}\n\t\t\t\ttrigger('eventAfterRender', event, event, eventElement);\n\t\t\t}\n\t\t}\n\t\t\t\t\t\n\t}", "function renderSlotSegs(segs, modifiedEventId) {\n\t\n\t\tvar i, segCnt=segs.length, seg,\n\t\t\tevent,\n\t\t\ttop,\n\t\t\tbottom,\n\t\t\tcolumnLeft,\n\t\t\tcolumnRight,\n\t\t\tcolumnWidth,\n\t\t\twidth,\n\t\t\tleft,\n\t\t\tright,\n\t\t\thtml = '',\n\t\t\teventElements,\n\t\t\teventElement,\n\t\t\ttriggerRes,\n\t\t\ttitleElement,\n\t\t\theight,\n\t\t\tslotSegmentContainer = getSlotSegmentContainer(),\n\t\t\tisRTL = opt('isRTL');\n\t\t\t\n\t\t// calculate position/dimensions, create html\n\t\tfor (i=0; i<segCnt; i++) {\n\t\t\tseg = segs[i];\n\t\t\tevent = seg.event;\n\t\t\ttop = computeDateTop(seg.start, seg.start);\n\t\t\tbottom = computeDateTop(seg.end, seg.start);\n\t\t\tcolumnLeft = colContentLeft(seg.col);\n\t\t\tcolumnRight = colContentRight(seg.col);\n\t\t\tcolumnWidth = columnRight - columnLeft;\n\n\t\t\t// shave off space on right near scrollbars (2.5%)\n\t\t\t// TODO: move this to CSS somehow\n\t\t\tcolumnRight -= columnWidth * .025;\n\t\t\tcolumnWidth = columnRight - columnLeft;\n\n\t\t\twidth = columnWidth * (seg.forwardCoord - seg.backwardCoord);\n\n\t\t\tif (opt('slotEventOverlap')) {\n\t\t\t\t// double the width while making sure resize handle is visible\n\t\t\t\t// (assumed to be 20px wide)\n\t\t\t\twidth = Math.max(\n\t\t\t\t\t(width - (20/2)) * 2,\n\t\t\t\t\twidth // narrow columns will want to make the segment smaller than\n\t\t\t\t\t\t// the natural width. don't allow it\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tif (isRTL) {\n\t\t\t\tright = columnRight - seg.backwardCoord * columnWidth;\n\t\t\t\tleft = right - width;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tleft = columnLeft + seg.backwardCoord * columnWidth;\n\t\t\t\tright = left + width;\n\t\t\t}\n\n\t\t\t// make sure horizontal coordinates are in bounds\n\t\t\tleft = Math.max(left, columnLeft);\n\t\t\tright = Math.min(right, columnRight);\n\t\t\twidth = right - left;\n\n\t\t\tseg.top = top;\n\t\t\tseg.left = left;\n\t\t\tseg.outerWidth = width;\n\t\t\tseg.outerHeight = bottom - top;\n\t\t\thtml += slotSegHtml(event, seg);\n\t\t}\n\n\t\tslotSegmentContainer[0].innerHTML = html; // faster than html()\n\t\teventElements = slotSegmentContainer.children();\n\t\t\n\t\t// retrieve elements, run through eventRender callback, bind event handlers\n\t\tfor (i=0; i<segCnt; i++) {\n\t\t\tseg = segs[i];\n\t\t\tevent = seg.event;\n\t\t\teventElement = $(eventElements[i]); // faster than eq()\n\t\t\ttriggerRes = trigger('eventRender', event, event, eventElement);\n\t\t\tif (triggerRes === false) {\n\t\t\t\teventElement.remove();\n\t\t\t}else{\n\t\t\t\tif (triggerRes && triggerRes !== true) {\n\t\t\t\t\teventElement.remove();\n\t\t\t\t\teventElement = $(triggerRes)\n\t\t\t\t\t\t.css({\n\t\t\t\t\t\t\tposition: 'absolute',\n\t\t\t\t\t\t\ttop: seg.top,\n\t\t\t\t\t\t\tleft: seg.left\n\t\t\t\t\t\t})\n\t\t\t\t\t\t.appendTo(slotSegmentContainer);\n\t\t\t\t}\n\t\t\t\tseg.element = eventElement;\n\t\t\t\tif (event._id === modifiedEventId) {\n\t\t\t\t\tbindSlotSeg(event, eventElement, seg);\n\t\t\t\t}else{\n\t\t\t\t\teventElement[0]._fci = i; // for lazySegBind\n\t\t\t\t}\n\t\t\t\treportEventElement(event, eventElement);\n\t\t\t}\n\t\t}\n\t\t\n\t\tlazySegBind(slotSegmentContainer, segs, bindSlotSeg);\n\t\t\n\t\t// record event sides and title positions\n\t\tfor (i=0; i<segCnt; i++) {\n\t\t\tseg = segs[i];\n\t\t\tif ((eventElement = seg.element)) {\n\t\t\t\tseg.vsides = vsides(eventElement, true);\n\t\t\t\tseg.hsides = hsides(eventElement, true);\n\t\t\t\ttitleElement = eventElement.find('.fc-event-title');\n\t\t\t\tif (titleElement.length) {\n\t\t\t\t\tseg.contentTop = titleElement[0].offsetTop;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t// set all positions/dimensions at once\n\t\tfor (i=0; i<segCnt; i++) {\n\t\t\tseg = segs[i];\n\t\t\tif ((eventElement = seg.element)) {\n\t\t\t\teventElement[0].style.width = Math.max(0, seg.outerWidth - seg.hsides) + 'px';\n\t\t\t\theight = Math.max(0, seg.outerHeight - seg.vsides);\n\t\t\t\teventElement[0].style.height = height + 'px';\n\t\t\t\tevent = seg.event;\n\t\t\t\tif (seg.contentTop !== undefined && height - seg.contentTop < 10) {\n\t\t\t\t\t// not enough room for title, put it in the time (TODO: maybe make both display:inline instead)\n\t\t\t\t\teventElement.find('div.fc-event-time')\n\t\t\t\t\t\t.text(\n\t\t\t\t\t\t\tformatDate(event.start, opt('timeFormat')) + ' - ' + event.title\n\t\t\t\t\t\t);\n\t\t\t\t\teventElement.find('div.fc-event-title')\n\t\t\t\t\t\t.remove();\n\t\t\t\t}\n\t\t\t\ttrigger('eventAfterRender', event, event, eventElement);\n\t\t\t}\n\t\t}\n\t\t\t\t\t\n\t}", "find_lv_segments(patient_data, id) {\n let graph = this.g.set_graph();\n for (let i = 0; i < patient_data.length; i++) {\n let native = patient_data[i];\n\n /////////\n graph.forEachNode((native, attributes) => {\n let group_aha = attributes['vessel_group_aha'];\n let native_id = attributes['id'];\n\n if (native_id == id) {\n for (let j = 0; j < vessel_lv_territories_aha.length; j++) {\n let lv_t_group = vessel_lv_territories_aha[j];\n\n if (lv_t_group['vessel_group_aha'] == group_aha) {\n this.color_lv_segments(lv_t_group);\n }\n }\n }\n });\n } //for i\n /////////////////////\n }", "function ifIsectAddToOutput(ring0, edge0, ring1, edge1) {\n var start0 = coord[ring0][edge0];\n var end0 = coord[ring0][edge0+1];\n var start1 = coord[ring1][edge1];\n var end1 = coord[ring1][edge1+1];\n\n var isect = intersect(start0, end0, start1, end1);\n\n if (isect == null) return; // discard parallels and coincidence\n frac0, frac1;\n if (end0[0] != start0[0]) {\n var frac0 = (isect[0]-start0[0])/(end0[0]-start0[0]);\n } else {\n var frac0 = (isect[1]-start0[1])/(end0[1]-start0[1]);\n };\n if (end1[0] != start1[0]) {\n var frac1 = (isect[0]-start1[0])/(end1[0]-start1[0]);\n } else {\n var frac1 = (isect[1]-start1[1])/(end1[1]-start1[1]);\n };\n if (frac0 >= 1 || frac0 <= 0 || frac1 >= 1 || frac1 <= 0) return; // require segment intersection\n\n var key = isect;\n var unique = !seen[key];\n if (unique) {\n seen[key] = true;\n }\n\n if (filterFn) {\n output.push(filterFn(isect, ring0, edge0, start0, end0, frac0, ring1, edge1, start1, end1, frac1, unique));\n } else {\n output.push(isect);\n }\n }", "function segmentStringsByMatch(segments, match)\n\t{\n\t\tvar newValues = [];\n\n\t\tfor (var i = 0; i < segments.length; i++)\n\t\t{\n\t\t\tvar value = segments[i];\n\t\t\tvar pos = value.indexOf(match);\n\t\t\tvar len = match.length;\n\t\t\tvar beforeText = value.substr(0, pos);\n\t\t\tvar afterText = value.substr(pos + len);\n\n\t\t\tif (pos === -1)\n\t\t\t{\n\t\t\t\tnewValues.push(value);\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tif (beforeText.length !== 0) newValues.push(beforeText);\n\n\t\t\tnewValues.push(match);\n\n\t\t\tif (afterText.length !== 0) newValues.push(afterText);\n\t\t}\n\n\t\treturn newValues;\n\t}", "function computeSegCoords(segs, dayDate, slatCoords, eventMinHeight, eventOrderSpecs) {\n computeSegVerticals(segs, dayDate, slatCoords, eventMinHeight);\n return computeSegHorizontals(segs, eventOrderSpecs); // requires top/bottom from computeSegVerticals\n } // For each segment in an array, computes and assigns its top and bottom properties", "function buildSlotSegLevels(segs){var levels=[];var i;var seg;var j;for(i=0;i<segs.length;i++){seg=segs[i];// go through all the levels and stop on the first level where there are no collisions\nfor(j=0;j<levels.length;j++){if(!computeSlotSegCollisions(seg,levels[j]).length){break;}}seg.level=j;(levels[j]||(levels[j]=[])).push(seg);}return levels;}// For every segment, figure out the other segments that are in subsequent", "function placeSlotSegs(segs) {\n var levels;\n var level0;\n var i;\n\n segs.sort(compareSegs); // order by date\n levels = buildSlotSegLevels(segs);\n computeForwardSlotSegs(levels);\n\n if ((level0 = levels[0])) {\n\n for (i = 0; i < level0.length; i++) {\n computeSlotSegPressures(level0[i]);\n }\n\n for (i = 0; i < level0.length; i++) {\n computeSlotSegCoords(level0[i], 0, 0);\n }\n }\n }", "function _testCirclePolyCollision_clipSegments(segments, circle) {\n let radius = circle.radius;\n return _.chain(segments)\n .map(seg => {\n let p = seg[0];\n let q = seg[1];\n\n // Keep vertical segments that lie within the radius.\n if(p[0] === q[0]) {\n if(p[0] > -radius && p[0] < radius) {\n seg.m = undefined;\n seg.b = undefined;\n return seg;\n }\n }\n\n // Let p be the leftmost point.\n if(p[0] > q[0]) {\n let swap = q;\n q = p;\n p = swap;\n }\n\n // Get the line equation info.\n let dx = q[0] - p[0];\n let dy = q[1] - p[1];\n let m = dy/dx;\n let b = p[1] - m*p[0];\n\n // Clip the segment if it intersects the starting circle.\n if(circle.segmentIntersection(seg))\n return;\n\n // Clip the segment if both points are under the circle.\n if(p[1] < 0 && q[1] < 0)\n return;\n\n // Clip the segment if both points are on the same side beyond the radius.\n if(p[0] < -radius && q[0] < -radius)\n return;\n else if(p[0] > radius && q[0] > radius)\n return;\n\n // Clip at intersections with the left and right radius pillars.\n else {\n if(p[0] < -radius)\n p = [-radius, -m*radius + b, 1];\n if(q[0] > radius)\n q = [radius, m*radius + b, 1];\n }\n\n let clippedSeg = [p, q];\n clippedSeg.m = m;\n clippedSeg.b = b;\n return clippedSeg;\n })\n .compact()\n .value();\n }", "function findIntersections(testData) {\n var keys = Object.keys(testData);\n var intersections = [];\n var botName = keys[0];\n var range = testData[botName];\n intersections.push([range, [botName]]);\n for (var i = 1; i < keys.length; ++i) {\n botName = keys[i];\n range = testData[botName];\n var intersectedSome = false;\n for (var j = 0; j < intersections.length; ++j) {\n var intersect = rangeIntersection(intersections[j][0], range);\n if (intersect) {\n intersections[j][0] = intersect;\n intersections[j][1].push(botName);\n intersectedSome = true;\n break;\n }\n }\n if (!intersectedSome) {\n intersections.push([range, [botName]]);\n }\n }\n\n return intersections;\n}", "function getHVEdgeIntersections(pt1, pt2) {\n var out = [];\n var ptInt1 = onlyConstrainedPoint(pt1);\n var ptInt2 = onlyConstrainedPoint(pt2);\n if(ptInt1 && ptInt2 && sameEdge(ptInt1, ptInt2)) return out;\n\n if(ptInt1) out.push(ptInt1);\n if(ptInt2) out.push(ptInt2);\n return out;\n }", "function getHVEdgeIntersections(pt1, pt2) {\n var out = [];\n var ptInt1 = onlyConstrainedPoint(pt1);\n var ptInt2 = onlyConstrainedPoint(pt2);\n if (ptInt1 && ptInt2 && sameEdge(ptInt1, ptInt2)) return out;\n if (ptInt1) out.push(ptInt1);\n if (ptInt2) out.push(ptInt2);\n return out;\n }", "function isDaySegCollision(seg, otherSegs) {\n\tvar i, otherSeg;\n\n\tfor (i = 0; i < otherSegs.length; i++) {\n\t\totherSeg = otherSegs[i];\n\n\t\tif (\n\t\t\totherSeg.leftCol <= seg.rightCol &&\n\t\t\totherSeg.rightCol >= seg.leftCol\n\t\t) {\n\t\t\treturn true;\n\t\t}\n\t}\n\n\treturn false;\n}", "function isDaySegCollision(seg, otherSegs) {\n\tvar i, otherSeg;\n\n\tfor (i = 0; i < otherSegs.length; i++) {\n\t\totherSeg = otherSegs[i];\n\n\t\tif (\n\t\t\totherSeg.leftCol <= seg.rightCol &&\n\t\t\totherSeg.rightCol >= seg.leftCol\n\t\t) {\n\t\t\treturn true;\n\t\t}\n\t}\n\n\treturn false;\n}", "function isDaySegCollision(seg, otherSegs) {\n\tvar i, otherSeg;\n\n\tfor (i = 0; i < otherSegs.length; i++) {\n\t\totherSeg = otherSegs[i];\n\n\t\tif (\n\t\t\totherSeg.leftCol <= seg.rightCol &&\n\t\t\totherSeg.rightCol >= seg.leftCol\n\t\t) {\n\t\t\treturn true;\n\t\t}\n\t}\n\n\treturn false;\n}", "function isDaySegCollision(seg, otherSegs) {\n\tvar i, otherSeg;\n\n\tfor (i = 0; i < otherSegs.length; i++) {\n\t\totherSeg = otherSegs[i];\n\n\t\tif (\n\t\t\totherSeg.leftCol <= seg.rightCol &&\n\t\t\totherSeg.rightCol >= seg.leftCol\n\t\t) {\n\t\t\treturn true;\n\t\t}\n\t}\n\n\treturn false;\n}", "function isDaySegCollision(seg, otherSegs) {\n\tvar i, otherSeg;\n\n\tfor (i = 0; i < otherSegs.length; i++) {\n\t\totherSeg = otherSegs[i];\n\n\t\tif (\n\t\t\totherSeg.leftCol <= seg.rightCol &&\n\t\t\totherSeg.rightCol >= seg.leftCol\n\t\t) {\n\t\t\treturn true;\n\t\t}\n\t}\n\n\treturn false;\n}", "function isDaySegCollision(seg, otherSegs) {\n\tvar i, otherSeg;\n\n\tfor (i = 0; i < otherSegs.length; i++) {\n\t\totherSeg = otherSegs[i];\n\n\t\tif (\n\t\t\totherSeg.leftCol <= seg.rightCol &&\n\t\t\totherSeg.rightCol >= seg.leftCol\n\t\t) {\n\t\t\treturn true;\n\t\t}\n\t}\n\n\treturn false;\n}", "function isDaySegCollision(seg, otherSegs) {\n\tvar i, otherSeg;\n\n\tfor (i = 0; i < otherSegs.length; i++) {\n\t\totherSeg = otherSegs[i];\n\n\t\tif (\n\t\t\totherSeg.leftCol <= seg.rightCol &&\n\t\t\totherSeg.rightCol >= seg.leftCol\n\t\t) {\n\t\t\treturn true;\n\t\t}\n\t}\n\n\treturn false;\n}", "function isDaySegCollision(seg, otherSegs) {\n\tvar i, otherSeg;\n\n\tfor (i = 0; i < otherSegs.length; i++) {\n\t\totherSeg = otherSegs[i];\n\n\t\tif (\n\t\t\totherSeg.leftCol <= seg.rightCol &&\n\t\t\totherSeg.rightCol >= seg.leftCol\n\t\t) {\n\t\t\treturn true;\n\t\t}\n\t}\n\n\treturn false;\n}" ]
[ "0.75552076", "0.7554956", "0.73930985", "0.7213072", "0.7176824", "0.7176824", "0.7176824", "0.7161462", "0.7161462", "0.7161462", "0.7161462", "0.7161462", "0.7153454", "0.7063159", "0.60005367", "0.59429127", "0.5453077", "0.5362018", "0.52311957", "0.52272135", "0.51978254", "0.51264316", "0.5094617", "0.5086554", "0.50800496", "0.5067198", "0.49935833", "0.49935833", "0.49884295", "0.49866602", "0.49866602", "0.49866602", "0.49856657", "0.49604973", "0.49604973", "0.49604973", "0.49604973", "0.49604973", "0.4924176", "0.49078965", "0.49078965", "0.49078965", "0.4896395", "0.48895118", "0.4881157", "0.4881157", "0.4881157", "0.4881157", "0.48569897", "0.48355922", "0.48336595", "0.48116907", "0.48116907", "0.4802117", "0.47979918", "0.47926715", "0.47752112", "0.47410056", "0.4739458", "0.4739458", "0.47371727", "0.47324994", "0.47289214", "0.47248214", "0.47210178", "0.47210178", "0.47210178", "0.47167182", "0.47167182", "0.47167182", "0.4712908", "0.46826062", "0.4678734", "0.46697438", "0.46383858", "0.4638214", "0.46218872", "0.46205154", "0.46003217", "0.46003118", "0.4573135", "0.4573135", "0.4573135", "0.4573135", "0.4573135", "0.4573135", "0.4573135", "0.4573135" ]
0.7108713
25
Do these segments occupy the same vertical space?
function isSlotSegCollision(seg1, seg2) { return seg1.end > seg2.start && seg1.start < seg2.end; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "resolveSegmentSegment(ax1, ay1, ax2, ay2, bx1, by1, bx2, by2) {\n const result = [];\n const isHorizontal1 = ax2 - ax1 > ay2 - ay1;\n const isHorizontal2 = bx2 - bx1 > by2 - by1;\n\n if (isHorizontal1 && isHorizontal2 &&\n by1 === ay1 &&\n ((ax1 <= bx2 && ax1 >= bx1) || (ax2 <= bx2 && ax2 >= bx1) || (bx1 <= ax2 && bx1 >= ax1) || (bx2 <= ax2 && bx2 >= ax1))) {\n\n if (bx1 < ax1) result.push(bx1, by1, ax1, by1);\n if (bx2 > ax2) result.push(ax2, by2, bx2, by2);\n\n } else if (!isHorizontal1 && isHorizontal2 &&\n by1 >= ay1 && by1 < ay2 &&\n ((ax1 <= bx2 && ax1 >= bx1) || (ax2 <= bx2 && ax2 >= bx1) || (bx1 <= ax2 && bx1 >= ax1) || (bx2 <= ax2 && bx2 >= ax1))) {\n\n if (bx1 < ax1) result.push(bx1, by1, ax1, by1);\n if (bx2 > ax2) result.push(ax2 + 1, by2, bx2, by2);\n\n } else if (!isHorizontal1 && !isHorizontal2 &&\n ax1 === bx2 &&\n ((by1 <= ay2 && by1 >= ay1) || (by2 <= ay2 && by2 >= ay1) || (ay1 <= by2 && ay1 >= by1) || (ay2 <= by2 && ay2 >= by1))) {\n\n if (by1 < ay1) result.push(bx1, by1, bx1, ay1);\n if (by2 > ay2) result.push(bx2, ay2, bx2, by2);\n\n } else if (isHorizontal1 && !isHorizontal2 &&\n bx1 >= ax1 && bx1 < ax2 &&\n ((ay2 <= by2 && ay2 >= by1) || (ay1 <= by2 && ay1 >= by1) || (by2 <= ay2 && by2 >= ay1) || (by1 <= ay2 && by1 >= ay1))) {\n\n if (by1 < ay1) result.push(bx1, by1, bx1, ay1);\n if (by2 > ay2) result.push(bx2, ay2 + 1, bx2, by2);\n\n } else { // segments do not intersect\n result.push(bx1, by1, bx2, by2);\n }\n\n return result;\n }", "function segments_union(segment_1, segment_2){\n var max_segment_1, min_segment_1, max_segment_2, min_segment_2, absolute_max, absolute_min;\n //Case 1: vertical segments\n var vertical = is_vertical_or_quasi_vertical(segment_1); //equivalently is_vertical_or_quasi_vertical(segment_2)\n if(vertical){\n\n if(parseFloat(segment_1[0][1]) >= parseFloat(segment_1[1][1])){\n max_segment_1 = segment_1[0]; min_segment_1 = segment_1[1];\n }\n else{\n max_segment_1 = segment_1[1]; min_segment_1 = segment_1[0];\n }\n if(parseFloat(segment_2[0][1]) >= parseFloat(segment_2[1][1])){\n max_segment_2 = segment_2[0]; min_segment_2 = segment_2[1];\n }\n else{\n max_segment_2 = segment_2[1]; min_segment_2 = segment_2[0];\n }\n\n if(parseFloat(max_segment_1[1]) >= parseFloat(max_segment_2[1])){\n absolute_max = max_segment_1;\n }\n else{\n absolute_max = max_segment_2;\n }\n if(parseFloat(min_segment_1[1]) < parseFloat(min_segment_2[1])){\n absolute_min = min_segment_1;\n }\n else{\n absolute_min = min_segment_2;\n }\n\n return [absolute_min, absolute_max];\n }\n\n //Case 2: non vertical segments\n if(parseFloat(segment_1[0][0]) >= parseFloat(segment_1[1][0])){\n max_segment_1 = segment_1[0]; min_segment_1 = segment_1[1];\n }\n else{\n max_segment_1 = segment_1[1]; min_segment_1 = segment_1[0];\n }\n if(parseFloat(segment_2[0][0]) >= parseFloat(segment_2[1][0])){\n max_segment_2 = segment_2[0]; min_segment_2 = segment_2[1];\n }\n else{\n max_segment_2 = segment_2[1]; min_segment_2 = segment_2[0];\n }\n\n if(parseFloat(max_segment_1[0]) >= parseFloat(max_segment_2[0])){\n absolute_max = max_segment_1;\n }\n else{\n absolute_max = max_segment_2;\n }\n if(parseFloat(min_segment_1[0]) < parseFloat(min_segment_2[0])){\n absolute_min = min_segment_1;\n }\n else{\n absolute_min = min_segment_2;\n }\n\n return [absolute_min, absolute_max];\n}", "function computeSegVerticals(segs, dayDate, slatCoords, eventMinHeight) {\n for (var _i = 0, segs_1 = segs; _i < segs_1.length; _i++) {\n var seg = segs_1[_i];\n seg.top = slatCoords.computeDateTop(seg.start, dayDate);\n seg.bottom = Math.max(seg.top + (eventMinHeight || 0), // yuck\n slatCoords.computeDateTop(seg.end, dayDate));\n }\n }", "function drawSegment(ctx, points, start, segLen, allLen, dir, smooth, smoothMonotone, connectNulls) {\n\t var prevX;\n\t var prevY;\n\t var cpx0;\n\t var cpy0;\n\t var cpx1;\n\t var cpy1;\n\t var idx = start;\n\t var k = 0;\n\t\n\t for (; k < segLen; k++) {\n\t var x = points[idx * 2];\n\t var y = points[idx * 2 + 1];\n\t\n\t if (idx >= allLen || idx < 0) {\n\t break;\n\t }\n\t\n\t if (isPointNull(x, y)) {\n\t if (connectNulls) {\n\t idx += dir;\n\t continue;\n\t }\n\t\n\t break;\n\t }\n\t\n\t if (idx === start) {\n\t ctx[dir > 0 ? 'moveTo' : 'lineTo'](x, y);\n\t cpx0 = x;\n\t cpy0 = y;\n\t } else {\n\t var dx = x - prevX;\n\t var dy = y - prevY; // Ignore tiny segment.\n\t\n\t if (dx * dx + dy * dy < 0.5) {\n\t idx += dir;\n\t continue;\n\t }\n\t\n\t if (smooth > 0) {\n\t var nextIdx = idx + dir;\n\t var nextX = points[nextIdx * 2];\n\t var nextY = points[nextIdx * 2 + 1];\n\t var tmpK = k + 1;\n\t\n\t if (connectNulls) {\n\t // Find next point not null\n\t while (isPointNull(nextX, nextY) && tmpK < segLen) {\n\t tmpK++;\n\t nextIdx += dir;\n\t nextX = points[nextIdx * 2];\n\t nextY = points[nextIdx * 2 + 1];\n\t }\n\t }\n\t\n\t var ratioNextSeg = 0.5;\n\t var vx = 0;\n\t var vy = 0;\n\t var nextCpx0 = void 0;\n\t var nextCpy0 = void 0; // Is last point\n\t\n\t if (tmpK >= segLen || isPointNull(nextX, nextY)) {\n\t cpx1 = x;\n\t cpy1 = y;\n\t } else {\n\t vx = nextX - prevX;\n\t vy = nextY - prevY;\n\t var dx0 = x - prevX;\n\t var dx1 = nextX - x;\n\t var dy0 = y - prevY;\n\t var dy1 = nextY - y;\n\t var lenPrevSeg = void 0;\n\t var lenNextSeg = void 0;\n\t\n\t if (smoothMonotone === 'x') {\n\t lenPrevSeg = Math.abs(dx0);\n\t lenNextSeg = Math.abs(dx1);\n\t cpx1 = x - lenPrevSeg * smooth;\n\t cpy1 = y;\n\t nextCpx0 = x + lenPrevSeg * smooth;\n\t nextCpy0 = y;\n\t } else if (smoothMonotone === 'y') {\n\t lenPrevSeg = Math.abs(dy0);\n\t lenNextSeg = Math.abs(dy1);\n\t cpx1 = x;\n\t cpy1 = y - lenPrevSeg * smooth;\n\t nextCpx0 = x;\n\t nextCpy0 = y + lenPrevSeg * smooth;\n\t } else {\n\t lenPrevSeg = Math.sqrt(dx0 * dx0 + dy0 * dy0);\n\t lenNextSeg = Math.sqrt(dx1 * dx1 + dy1 * dy1); // Use ratio of seg length\n\t\n\t ratioNextSeg = lenNextSeg / (lenNextSeg + lenPrevSeg);\n\t cpx1 = x - vx * smooth * (1 - ratioNextSeg);\n\t cpy1 = y - vy * smooth * (1 - ratioNextSeg); // cp0 of next segment\n\t\n\t nextCpx0 = x + vx * smooth * ratioNextSeg;\n\t nextCpy0 = y + vy * smooth * ratioNextSeg; // Smooth constraint between point and next point.\n\t // Avoid exceeding extreme after smoothing.\n\t\n\t nextCpx0 = mathMin$5(nextCpx0, mathMax$5(nextX, x));\n\t nextCpy0 = mathMin$5(nextCpy0, mathMax$5(nextY, y));\n\t nextCpx0 = mathMax$5(nextCpx0, mathMin$5(nextX, x));\n\t nextCpy0 = mathMax$5(nextCpy0, mathMin$5(nextY, y)); // Reclaculate cp1 based on the adjusted cp0 of next seg.\n\t\n\t vx = nextCpx0 - x;\n\t vy = nextCpy0 - y;\n\t cpx1 = x - vx * lenPrevSeg / lenNextSeg;\n\t cpy1 = y - vy * lenPrevSeg / lenNextSeg; // Smooth constraint between point and prev point.\n\t // Avoid exceeding extreme after smoothing.\n\t\n\t cpx1 = mathMin$5(cpx1, mathMax$5(prevX, x));\n\t cpy1 = mathMin$5(cpy1, mathMax$5(prevY, y));\n\t cpx1 = mathMax$5(cpx1, mathMin$5(prevX, x));\n\t cpy1 = mathMax$5(cpy1, mathMin$5(prevY, y)); // Adjust next cp0 again.\n\t\n\t vx = x - cpx1;\n\t vy = y - cpy1;\n\t nextCpx0 = x + vx * lenNextSeg / lenPrevSeg;\n\t nextCpy0 = y + vy * lenNextSeg / lenPrevSeg;\n\t }\n\t }\n\t\n\t ctx.bezierCurveTo(cpx0, cpy0, cpx1, cpy1, x, y);\n\t cpx0 = nextCpx0;\n\t cpy0 = nextCpy0;\n\t } else {\n\t ctx.lineTo(x, y);\n\t }\n\t }\n\t\n\t prevX = x;\n\t prevY = y;\n\t idx += dir;\n\t }\n\t\n\t return k;\n\t }", "function computeSlotSegCollisions(seg,otherSegs,results){if(results===void 0){results=[];}for(var i=0;i<otherSegs.length;i++){if(isSlotSegCollision(seg,otherSegs[i])){results.push(otherSegs[i]);}}return results;}// Do these segments occupy the same vertical space?", "formatSegments (isProtein) {\n\t\tvar variants = isProtein ? this.attributes.variantDataProtein : this.attributes.variantDataDna;\n\t\tvar sequences = isProtein ? this.attributes.alignedProteinSequences : this.attributes.alignedDnaSequences;\n\t\t// make sure they're sorted by start\n\t\tvariants = _.sortBy(variants, d => {\n\t\t\treturn d.start;\n\t\t});\n\n\t\t// merge segments\n\t\tvar mergedSegments = _.reduce(variants, (memo, d) => {\n\t\t\treturn this._mergeOrAddSegment(memo, d);\n\t\t}, []);\n\n\t\t// add in needed summarized segments\n\t\t// first one\n\t\tif (mergedSegments[0].start > 1) {\n\t\t\tmergedSegments.push({\n\t\t\t\tvisible: false,\n\t\t\t\tstart: 1,\n\t\t\t\tend: mergedSegments[0].start\n\t\t\t});\n\t\t}\n\t\t// loop through and connect visible segments with summarized segments\n\t\tvar _visibleSegments = _.where(mergedSegments, { visible: true });\n\t\t_visibleSegments.forEach( (d, i) => {\n\t\t\t// must not be last or visible\n\t\t\tif (d.visible && i < _visibleSegments.length - 1) {\n\t\t\t\tmergedSegments.push({\n\t\t\t\t\tvisible: false,\n\t\t\t\t\tstart: d.end,\n\t\t\t\t\tend: _visibleSegments[i + 1].start\n\t\t\t\t});\n\t\t\t}\n\t\t});\n\t\t\n\t\tvar _last = _.max(mergedSegments, d => { return d.end; });\n\t\tvar _maxLength = _.max(sequences, d => { return d.sequence.length; }).sequence.length;\n\t\t// add last if last segment is visible and not at the end\n\t\tif (_last.end < _maxLength) {\n\t\t\tmergedSegments.push({\n\t\t\t\tstart: _last.end,\n\t\t\t\tend: _maxLength,\n\t\t\t\tvisible: false\n\t\t\t});\n\t\t// add last if visible\n\t\t} else {\n\t\t\tmergedSegments.push({\n\t\t\t\tstart: _last.end,\n\t\t\t\tend: _maxLength + 1,\n\t\t\t\tvisible: true\n\t\t\t});\n\t\t}\n\t\t\n\t\t// change starts and ends to domains\n\t\tmergedSegments = _.map(mergedSegments, d => {\n\t\t\td.domain = [d.start, d.end];\n\t\t\treturn d;\n\t\t});\n\t\t// sort\n\t\tmergedSegments = _.sortBy(mergedSegments, d => {\n\t\t\treturn d.start;\n\t\t});\n\t\treturn mergedSegments;\n\t}", "function drawSegment(ctx, points, start, segLen, allLen, dir, smooth, smoothMonotone, connectNulls) {\n var prevX;\n var prevY;\n var cpx0;\n var cpy0;\n var cpx1;\n var cpy1;\n var idx = start;\n var k = 0;\n\n for (; k < segLen; k++) {\n var x = points[idx * 2];\n var y = points[idx * 2 + 1];\n\n if (idx >= allLen || idx < 0) {\n break;\n }\n\n if (isPointNull(x, y)) {\n if (connectNulls) {\n idx += dir;\n continue;\n }\n\n break;\n }\n\n if (idx === start) {\n ctx[dir > 0 ? 'moveTo' : 'lineTo'](x, y);\n cpx0 = x;\n cpy0 = y;\n } else {\n var dx = x - prevX;\n var dy = y - prevY; // Ignore tiny segment.\n\n if (dx * dx + dy * dy < 0.5) {\n idx += dir;\n continue;\n }\n\n if (smooth > 0) {\n var nextIdx = idx + dir;\n var nextX = points[nextIdx * 2];\n var nextY = points[nextIdx * 2 + 1]; // Ignore duplicate point\n\n while (nextX === x && nextY === y && k < segLen) {\n k++;\n nextIdx += dir;\n idx += dir;\n nextX = points[nextIdx * 2];\n nextY = points[nextIdx * 2 + 1];\n x = points[idx * 2];\n y = points[idx * 2 + 1];\n dx = x - prevX;\n dy = y - prevY;\n }\n\n var tmpK = k + 1;\n\n if (connectNulls) {\n // Find next point not null\n while (isPointNull(nextX, nextY) && tmpK < segLen) {\n tmpK++;\n nextIdx += dir;\n nextX = points[nextIdx * 2];\n nextY = points[nextIdx * 2 + 1];\n }\n }\n\n var ratioNextSeg = 0.5;\n var vx = 0;\n var vy = 0;\n var nextCpx0 = void 0;\n var nextCpy0 = void 0; // Is last point\n\n if (tmpK >= segLen || isPointNull(nextX, nextY)) {\n cpx1 = x;\n cpy1 = y;\n } else {\n vx = nextX - prevX;\n vy = nextY - prevY;\n var dx0 = x - prevX;\n var dx1 = nextX - x;\n var dy0 = y - prevY;\n var dy1 = nextY - y;\n var lenPrevSeg = void 0;\n var lenNextSeg = void 0;\n\n if (smoothMonotone === 'x') {\n lenPrevSeg = Math.abs(dx0);\n lenNextSeg = Math.abs(dx1);\n var dir_1 = vx > 0 ? 1 : -1;\n cpx1 = x - dir_1 * lenPrevSeg * smooth;\n cpy1 = y;\n nextCpx0 = x + dir_1 * lenNextSeg * smooth;\n nextCpy0 = y;\n } else if (smoothMonotone === 'y') {\n lenPrevSeg = Math.abs(dy0);\n lenNextSeg = Math.abs(dy1);\n var dir_2 = vy > 0 ? 1 : -1;\n cpx1 = x;\n cpy1 = y - dir_2 * lenPrevSeg * smooth;\n nextCpx0 = x;\n nextCpy0 = y + dir_2 * lenNextSeg * smooth;\n } else {\n lenPrevSeg = Math.sqrt(dx0 * dx0 + dy0 * dy0);\n lenNextSeg = Math.sqrt(dx1 * dx1 + dy1 * dy1); // Use ratio of seg length\n\n ratioNextSeg = lenNextSeg / (lenNextSeg + lenPrevSeg);\n cpx1 = x - vx * smooth * (1 - ratioNextSeg);\n cpy1 = y - vy * smooth * (1 - ratioNextSeg); // cp0 of next segment\n\n nextCpx0 = x + vx * smooth * ratioNextSeg;\n nextCpy0 = y + vy * smooth * ratioNextSeg; // Smooth constraint between point and next point.\n // Avoid exceeding extreme after smoothing.\n\n nextCpx0 = mathMin(nextCpx0, mathMax(nextX, x));\n nextCpy0 = mathMin(nextCpy0, mathMax(nextY, y));\n nextCpx0 = mathMax(nextCpx0, mathMin(nextX, x));\n nextCpy0 = mathMax(nextCpy0, mathMin(nextY, y)); // Reclaculate cp1 based on the adjusted cp0 of next seg.\n\n vx = nextCpx0 - x;\n vy = nextCpy0 - y;\n cpx1 = x - vx * lenPrevSeg / lenNextSeg;\n cpy1 = y - vy * lenPrevSeg / lenNextSeg; // Smooth constraint between point and prev point.\n // Avoid exceeding extreme after smoothing.\n\n cpx1 = mathMin(cpx1, mathMax(prevX, x));\n cpy1 = mathMin(cpy1, mathMax(prevY, y));\n cpx1 = mathMax(cpx1, mathMin(prevX, x));\n cpy1 = mathMax(cpy1, mathMin(prevY, y)); // Adjust next cp0 again.\n\n vx = x - cpx1;\n vy = y - cpy1;\n nextCpx0 = x + vx * lenNextSeg / lenPrevSeg;\n nextCpy0 = y + vy * lenNextSeg / lenPrevSeg;\n }\n }\n\n ctx.bezierCurveTo(cpx0, cpy0, cpx1, cpy1, x, y);\n cpx0 = nextCpx0;\n cpy0 = nextCpy0;\n } else {\n ctx.lineTo(x, y);\n }\n }\n\n prevX = x;\n prevY = y;\n idx += dir;\n }\n\n return k;\n}", "function getPositions() {\n \n var rects;\n var nRects;\n var rect;\n \n var top;\n var left;\n var width;\n var right;\n \n var textXY;\n \n var currentLine = -1;\n \n for (var i = 0; i < nSegs; i++) {\n \n rects = segs[i].getClientRects();\n nRects = rects.length;\n \n segRanges[i] = {};\n \n for (var j = 0; j < nRects; j++) {\n \n rect = rects[j];\n textXY = getTextXY(rect.left, rect.top);\n top = textXY.y - segBoxPadY;\n left = textXY.x - segBoxPadX;\n width = rect.width + segBoxPadX * 2;\n \n if (j !== nRects - 1) {\n \n width += extensionWidth;\n }\n \n right = left + width;\n \n if (isNewLine(top)) {\n \n currentLine++;\n \n lines[currentLine] = {\n top: top,\n left: left,\n width: width\n };\n \n segBoxesByLine[currentLine] = [];\n \n } else {\n \n lines[currentLine].width += width;\n }\n \n segBoxesByLine[currentLine].push({\n left: left,\n right: left + width,\n segIndex: i\n });\n \n if (j === 0) {\n \n segRanges[i].startLine = currentLine;\n segRanges[i].startLeft = left;\n }\n \n if (j === nRects - 1) {\n \n segRanges[i].endLine = currentLine;\n segRanges[i].endRight = right;\n }\n }\n }\n \n function isNewLine(top) {\n \n if (lines.length === 0 || lines[lines.length - 1].top !== top) {\n \n return true;\n }\n }\n}", "function addSegEndsFromSequences(){\n //Add all the starting segEnds and internal segJoins\n for(var i=0;i<seqArr.length;i++){\n var length=parseInt(seqArr[i]['length']),\n seqId=seqArr[i]['id'];\n segEndArr[segEndArr.length]=[seqId,0,'POS_STRAND']\n segEndArr[segEndArr.length]=[seqId,length-1,'NEG_STRAND']\n segJoinArr[segJoinArr.length]=[[seqId,0,'POS_STRAND'],[seqId,length-1,'NEG_STRAND'],'internal',length]\n }\n segmentize();\n}", "function l(a,b){var c,d=m(a),e=r(),f=[];\n// Set each row's height by setting height of first inner div\nif(b)for(c=0;c<e.length;c++)e[c].height(d[c]);\n// Get each row's top, relative to the views's origin.\n// Important to do this after setting each row's height.\nfor(c=0;c<e.length;c++)f.push(e[c].position().top);\n// Set each segment element's CSS \"top\" property.\n// Each segment object has a \"top\" property, which is relative to the row's top, but...\nxa(a,function(a,b){b.css(\"top\",f[a.row]+a.top)})}", "function drawSegment(ctx, points, start, segLen, allLen, dir, smooth, smoothMonotone, connectNulls) {\n var prevX;\n var prevY;\n var cpx0;\n var cpy0;\n var cpx1;\n var cpy1;\n var idx = start;\n var k = 0;\n\n for (; k < segLen; k++) {\n var x = points[idx * 2];\n var y = points[idx * 2 + 1];\n\n if (idx >= allLen || idx < 0) {\n break;\n }\n\n if (isPointNull(x, y)) {\n if (connectNulls) {\n idx += dir;\n continue;\n }\n\n break;\n }\n\n if (idx === start) {\n ctx[dir > 0 ? 'moveTo' : 'lineTo'](x, y);\n cpx0 = x;\n cpy0 = y;\n } else {\n var dx = x - prevX;\n var dy = y - prevY; // Ignore tiny segment.\n\n if (dx * dx + dy * dy < 0.5) {\n idx += dir;\n continue;\n }\n\n if (smooth > 0) {\n var nextIdx = idx + dir;\n var nextX = points[nextIdx * 2];\n var nextY = points[nextIdx * 2 + 1];\n var tmpK = k + 1;\n\n if (connectNulls) {\n // Find next point not null\n while (isPointNull(nextX, nextY) && tmpK < segLen) {\n tmpK++;\n nextIdx += dir;\n nextX = points[nextIdx * 2];\n nextY = points[nextIdx * 2 + 1];\n }\n }\n\n var ratioNextSeg = 0.5;\n var vx = 0;\n var vy = 0;\n var nextCpx0 = void 0;\n var nextCpy0 = void 0; // Is last point\n\n if (tmpK >= segLen || isPointNull(nextX, nextY)) {\n cpx1 = x;\n cpy1 = y;\n } else {\n vx = nextX - prevX;\n vy = nextY - prevY;\n var dx0 = x - prevX;\n var dx1 = nextX - x;\n var dy0 = y - prevY;\n var dy1 = nextY - y;\n var lenPrevSeg = void 0;\n var lenNextSeg = void 0;\n\n if (smoothMonotone === 'x') {\n lenPrevSeg = Math.abs(dx0);\n lenNextSeg = Math.abs(dx1);\n cpx1 = x - lenPrevSeg * smooth;\n cpy1 = y;\n nextCpx0 = x + lenPrevSeg * smooth;\n nextCpy0 = y;\n } else if (smoothMonotone === 'y') {\n lenPrevSeg = Math.abs(dy0);\n lenNextSeg = Math.abs(dy1);\n cpx1 = x;\n cpy1 = y - lenPrevSeg * smooth;\n nextCpx0 = x;\n nextCpy0 = y + lenPrevSeg * smooth;\n } else {\n lenPrevSeg = Math.sqrt(dx0 * dx0 + dy0 * dy0);\n lenNextSeg = Math.sqrt(dx1 * dx1 + dy1 * dy1); // Use ratio of seg length\n\n ratioNextSeg = lenNextSeg / (lenNextSeg + lenPrevSeg);\n cpx1 = x - vx * smooth * (1 - ratioNextSeg);\n cpy1 = y - vy * smooth * (1 - ratioNextSeg); // cp0 of next segment\n\n nextCpx0 = x + vx * smooth * ratioNextSeg;\n nextCpy0 = y + vy * smooth * ratioNextSeg; // Smooth constraint between point and next point.\n // Avoid exceeding extreme after smoothing.\n\n nextCpx0 = mathMin(nextCpx0, mathMax(nextX, x));\n nextCpy0 = mathMin(nextCpy0, mathMax(nextY, y));\n nextCpx0 = mathMax(nextCpx0, mathMin(nextX, x));\n nextCpy0 = mathMax(nextCpy0, mathMin(nextY, y)); // Reclaculate cp1 based on the adjusted cp0 of next seg.\n\n vx = nextCpx0 - x;\n vy = nextCpy0 - y;\n cpx1 = x - vx * lenPrevSeg / lenNextSeg;\n cpy1 = y - vy * lenPrevSeg / lenNextSeg; // Smooth constraint between point and prev point.\n // Avoid exceeding extreme after smoothing.\n\n cpx1 = mathMin(cpx1, mathMax(prevX, x));\n cpy1 = mathMin(cpy1, mathMax(prevY, y));\n cpx1 = mathMax(cpx1, mathMin(prevX, x));\n cpy1 = mathMax(cpy1, mathMin(prevY, y)); // Adjust next cp0 again.\n\n vx = x - cpx1;\n vy = y - cpy1;\n nextCpx0 = x + vx * lenNextSeg / lenPrevSeg;\n nextCpy0 = y + vy * lenNextSeg / lenPrevSeg;\n }\n }\n\n ctx.bezierCurveTo(cpx0, cpy0, cpx1, cpy1, x, y);\n cpx0 = nextCpx0;\n cpy0 = nextCpy0;\n } else {\n ctx.lineTo(x, y);\n }\n }\n\n prevX = x;\n prevY = y;\n idx += dir;\n }\n\n return k;\n}", "function repaintSegments() {\n\t\tupdateDescriptions();\n\t\tfor (var i = 0; i < segments.length; i++) {\n\t\t\tremoveSegment(segments[i]);\n\t\t}\n\t\tfor (var i = 0; i < segments.length; i++) {\n\t\t\taddSegment(segments[i]);\n\t\t}\n\t}", "function inSegment(xP, yP) {\r\n }", "numberOfSegments() {\n return this.segments.length;\n }", "split() {\n let w = this.range.Width / 2;\n let h = this.range.Height / 2;\n this.LL = new RectQuadTree(\n new Rect(this.range.x1, this.range.y1, this.range.x1 + w, this.range.y1 + h));\n this.LH = new RectQuadTree(\n new Rect(this.range.x1 + w, this.range.y1, this.range.x2, this.range.y1 + h));\n this.HL = new RectQuadTree(\n new Rect(this.range.x1, this.range.y1 + h, this.range.x1 + w, this.range.y2));\n this.HH = new RectQuadTree(\n new Rect(this.range.x1 + w, this.range.y1 + h, this.range.x2, this.range.y2));\n\n this._isSplit = true;\n }", "function calculateVerticals(segments) {\n\t\tvar rowCnt = getRowCnt();\n\t\tvar colCnt = getColCnt();\n\t\tvar rowContentHeights = []; // content height for each row\n\t\tvar segmentRows = buildSegmentRows(segments); // an array of segment arrays, one for each row\n\t\tvar colI;\n\n\t\tfor (var rowI=0; rowI<rowCnt; rowI++) {\n\t\t\tvar segmentRow = segmentRows[rowI];\n\n\t\t\t// an array of running total heights for each column.\n\t\t\t// initialize with all zeros.\n\t\t\tvar colHeights = [];\n\t\t\tfor (colI=0; colI<colCnt; colI++) {\n\t\t\t\tcolHeights.push(0);\n\t\t\t}\n\n\t\t\t// loop through every segment\n\t\t\tfor (var segmentI=0; segmentI<segmentRow.length; segmentI++) {\n\t\t\t\tvar segment = segmentRow[segmentI];\n\n\t\t\t\t// find the segment's top coordinate by looking at the max height\n\t\t\t\t// of all the columns the segment will be in.\n\t\t\t\tsegment.top = arrayMax(\n\t\t\t\t\tcolHeights.slice(\n\t\t\t\t\t\tsegment.leftCol,\n\t\t\t\t\t\tsegment.rightCol + 1 // make exclusive for slice\n\t\t\t\t\t)\n\t\t\t\t);\n\n\t\t\t\t// adjust the columns to account for the segment's height\n\t\t\t\tfor (colI=segment.leftCol; colI<=segment.rightCol; colI++) {\n\t\t\t\t\tcolHeights[colI] = segment.top + segment.outerHeight;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// the tallest column in the row should be the \"content height\"\n\t\t\trowContentHeights.push(arrayMax(colHeights));\n\t\t}\n\n\t\treturn rowContentHeights;\n\t}", "function calculateVerticals(segments) {\n\t\tvar rowCnt = getRowCnt();\n\t\tvar colCnt = getColCnt();\n\t\tvar rowContentHeights = []; // content height for each row\n\t\tvar segmentRows = buildSegmentRows(segments); // an array of segment arrays, one for each row\n\t\tvar colI;\n\n\t\tfor (var rowI=0; rowI<rowCnt; rowI++) {\n\t\t\tvar segmentRow = segmentRows[rowI];\n\n\t\t\t// an array of running total heights for each column.\n\t\t\t// initialize with all zeros.\n\t\t\tvar colHeights = [];\n\t\t\tfor (colI=0; colI<colCnt; colI++) {\n\t\t\t\tcolHeights.push(0);\n\t\t\t}\n\n\t\t\t// loop through every segment\n\t\t\tfor (var segmentI=0; segmentI<segmentRow.length; segmentI++) {\n\t\t\t\tvar segment = segmentRow[segmentI];\n\n\t\t\t\t// find the segment's top coordinate by looking at the max height\n\t\t\t\t// of all the columns the segment will be in.\n\t\t\t\tsegment.top = arrayMax(\n\t\t\t\t\tcolHeights.slice(\n\t\t\t\t\t\tsegment.leftCol,\n\t\t\t\t\t\tsegment.rightCol + 1 // make exclusive for slice\n\t\t\t\t\t)\n\t\t\t\t);\n\n\t\t\t\t// adjust the columns to account for the segment's height\n\t\t\t\tfor (colI=segment.leftCol; colI<=segment.rightCol; colI++) {\n\t\t\t\t\tcolHeights[colI] = segment.top + segment.outerHeight;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// the tallest column in the row should be the \"content height\"\n\t\t\trowContentHeights.push(arrayMax(colHeights));\n\t\t}\n\n\t\treturn rowContentHeights;\n\t}", "function calculateVerticals(segments) {\n\t\tvar rowCnt = getRowCnt();\n\t\tvar colCnt = getColCnt();\n\t\tvar rowContentHeights = []; // content height for each row\n\t\tvar segmentRows = buildSegmentRows(segments); // an array of segment arrays, one for each row\n\n\t\tfor (var rowI=0; rowI<rowCnt; rowI++) {\n\t\t\tvar segmentRow = segmentRows[rowI];\n\n\t\t\t// an array of running total heights for each column.\n\t\t\t// initialize with all zeros.\n\t\t\tvar colHeights = [];\n\t\t\tfor (var colI=0; colI<colCnt; colI++) {\n\t\t\t\tcolHeights.push(0);\n\t\t\t}\n\n\t\t\t// loop through every segment\n\t\t\tfor (var segmentI=0; segmentI<segmentRow.length; segmentI++) {\n\t\t\t\tvar segment = segmentRow[segmentI];\n\n\t\t\t\t// find the segment's top coordinate by looking at the max height\n\t\t\t\t// of all the columns the segment will be in.\n\t\t\t\tsegment.top = arrayMax(\n\t\t\t\t\tcolHeights.slice(\n\t\t\t\t\t\tsegment.leftCol,\n\t\t\t\t\t\tsegment.rightCol + 1 // make exclusive for slice\n\t\t\t\t\t)\n\t\t\t\t);\n\n\t\t\t\t// adjust the columns to account for the segment's height\n\t\t\t\tfor (var colI=segment.leftCol; colI<=segment.rightCol; colI++) {\n\t\t\t\t\tcolHeights[colI] = segment.top + segment.outerHeight;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// the tallest column in the row should be the \"content height\"\n\t\t\trowContentHeights.push(arrayMax(colHeights));\n\t\t}\n\n\t\treturn rowContentHeights;\n\t}", "function calculateVerticals(segments) {\n\t\tvar rowCnt = getRowCnt();\n\t\tvar colCnt = getColCnt();\n\t\tvar rowContentHeights = []; // content height for each row\n\t\tvar segmentRows = buildSegmentRows(segments); // an array of segment arrays, one for each row\n\n\t\tfor (var rowI=0; rowI<rowCnt; rowI++) {\n\t\t\tvar segmentRow = segmentRows[rowI];\n\n\t\t\t// an array of running total heights for each column.\n\t\t\t// initialize with all zeros.\n\t\t\tvar colHeights = [];\n\t\t\tfor (var colI=0; colI<colCnt; colI++) {\n\t\t\t\tcolHeights.push(0);\n\t\t\t}\n\n\t\t\t// loop through every segment\n\t\t\tfor (var segmentI=0; segmentI<segmentRow.length; segmentI++) {\n\t\t\t\tvar segment = segmentRow[segmentI];\n\n\t\t\t\t// find the segment's top coordinate by looking at the max height\n\t\t\t\t// of all the columns the segment will be in.\n\t\t\t\tsegment.top = arrayMax(\n\t\t\t\t\tcolHeights.slice(\n\t\t\t\t\t\tsegment.leftCol,\n\t\t\t\t\t\tsegment.rightCol + 1 // make exclusive for slice\n\t\t\t\t\t)\n\t\t\t\t);\n\n\t\t\t\t// adjust the columns to account for the segment's height\n\t\t\t\tfor (var colI=segment.leftCol; colI<=segment.rightCol; colI++) {\n\t\t\t\t\tcolHeights[colI] = segment.top + segment.outerHeight;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// the tallest column in the row should be the \"content height\"\n\t\t\trowContentHeights.push(arrayMax(colHeights));\n\t\t}\n\n\t\treturn rowContentHeights;\n\t}", "function calculateVerticals(segments) {\n\t\tvar rowCnt = getRowCnt();\n\t\tvar colCnt = getColCnt();\n\t\tvar rowContentHeights = []; // content height for each row\n\t\tvar segmentRows = buildSegmentRows(segments); // an array of segment arrays, one for each row\n\n\t\tfor (var rowI=0; rowI<rowCnt; rowI++) {\n\t\t\tvar segmentRow = segmentRows[rowI];\n\n\t\t\t// an array of running total heights for each column.\n\t\t\t// initialize with all zeros.\n\t\t\tvar colHeights = [];\n\t\t\tfor (var colI=0; colI<colCnt; colI++) {\n\t\t\t\tcolHeights.push(0);\n\t\t\t}\n\n\t\t\t// loop through every segment\n\t\t\tfor (var segmentI=0; segmentI<segmentRow.length; segmentI++) {\n\t\t\t\tvar segment = segmentRow[segmentI];\n\n\t\t\t\t// find the segment's top coordinate by looking at the max height\n\t\t\t\t// of all the columns the segment will be in.\n\t\t\t\tsegment.top = arrayMax(\n\t\t\t\t\tcolHeights.slice(\n\t\t\t\t\t\tsegment.leftCol,\n\t\t\t\t\t\tsegment.rightCol + 1 // make exclusive for slice\n\t\t\t\t\t)\n\t\t\t\t);\n\n\t\t\t\t// adjust the columns to account for the segment's height\n\t\t\t\tfor (var colI=segment.leftCol; colI<=segment.rightCol; colI++) {\n\t\t\t\t\tcolHeights[colI] = segment.top + segment.outerHeight;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// the tallest column in the row should be the \"content height\"\n\t\t\trowContentHeights.push(arrayMax(colHeights));\n\t\t}\n\n\t\treturn rowContentHeights;\n\t}", "function computeSlotSegPressures(seg){var forwardSegs=seg.forwardSegs;var forwardPressure=0;var i;var forwardSeg;if(seg.forwardPressure===undefined){// not already computed\nfor(i=0;i<forwardSegs.length;i++){forwardSeg=forwardSegs[i];// figure out the child's maximum forward path\ncomputeSlotSegPressures(forwardSeg);// either use the existing maximum, or use the child's forward pressure\n// plus one (for the forwardSeg itself)\nforwardPressure=Math.max(forwardPressure,1+forwardSeg.forwardPressure);}seg.forwardPressure=forwardPressure;}}// Find all the segments in `otherSegs` that vertically collide with `seg`.", "computeControlSegments() {\n if (this.controlSteps.length) {\n this.controlSegments = [];\n let segment = { start : 0, end : 0, human : this.controlSteps[0] }\n for (let i = 0; i < this.controlSteps.length; ++i) {\n const humanStep = this.controlSteps[i];\n if (humanStep != segment.human) {\n this.controlSegments.push(segment);\n segment = { start : i, end : i, human : humanStep };\n } else {\n segment.end = i;\n }\n }\n this.controlSegments.push(segment);\n }\n }", "function segmentSizesValid(segments){\r\n var totsize=0;\r\n for(var j=0; j<segments.length; j++){\r\n totsize+=segments[j];\r\n }\r\n if(totsize>mainMemorySize){\r\n return false;\r\n }else{\r\n return true;\r\n }\r\n}", "function drawDescriptionSpace(timeStart, timeFinished, videoDuration,segmentsWidth, segmentsHeight){\n var startPercentage = timeStart / videoDuration ;\n var endPercentage = timeFinished / videoDuration ;\n var descriptionWidth = (endPercentage - startPercentage) * segmentsWidth;\n var descriptionStartPoint = startPercentage * segmentsWidth;\n \n var canvas = document.getElementById('segments');\n var context = canvas.getContext('2d');\n\n drawRect(descriptionStartPoint,32,descriptionWidth, segmentsHeight,context); \n}", "function segmentsOverlap(segment1, segment2) {\n return (\n (\n segment1[0] <= segment2[0] &&\n segment1[1] >= segment2[0]\n ) || (\n segment2[0] <= segment1[0] &&\n segment2[1] >= segment1[0]\n )\n );\n}", "function Segment(p0,p1,p2,i0,i1,i2) {\n this.tri = new THREE.Triangle(p0,p1,p2);\n this.indices = new THREE.Vector3(i0,i1,i2);\n this.height = Math.max(p0.y,p1.y,p2.y);\n treeHeight = Math.max(treeHeight,this.height);\n}", "function m(a){for(var b,c=M(),d=N(),e=[],f=n(a),g=0;g<c;g++){var h=f[g],i=[];for(b=0;b<d;b++)i.push(0);\n// loop through every segment\nfor(var j=0;j<h.length;j++){var k=h[j];\n// adjust the columns to account for the segment's height\nfor(\n// find the segment's top coordinate by looking at the max height\n// of all the columns the segment will be in.\nk.top=D(i.slice(k.leftCol,k.rightCol+1)),b=k.leftCol;b<=k.rightCol;b++)i[b]=k.top+k.outerHeight}\n// the tallest column in the row should be the \"content height\"\ne.push(D(i))}return e}", "function segment(x, y, a) {\n translate(x, y);\n rotate(a);\n line(0, 0, segLength, 0);\n}", "constructor(left, top) {\n this.top = top;\n this.left = left;\n this.numSegments = LATCH_WIDTH / SEGMENT_WIDTH;\n this.segments = [];\n }", "function drawSegmentValues(myPie) {\n\n //document.getElementById(\"doughnut-chart\").getContext(\"2d\");\n \n // var test = myPie.segments.length;\n // alert('drawSegmentValues' + test );\n //alert('width chart test== '+ test.width);\n //var test2 = test.getContext(\"2d\").segments.length;\n //alert('drow chart test 2==++== ' + test2);\n}", "function matchSegment(seg1, seg2, r, result) {\n var a = seg1[0],\n b = seg1[1],\n c = seg2[0],\n d = seg2[1],\n len = result.length;\n\n var ap = closePoint(a, c, d, r),\n bp = closePoint(b, c, d, r);\n\n // a----b\n // c---ap---bp---d\n if (ap !== null && bp !== null) return true; // fully covered\n\n var cp = closePoint(c, a, b, r),\n dp = closePoint(d, a, b, r);\n\n if (cp !== null && cp === dp) return false; // degenerate case, no overlap\n\n if (cp !== null && dp !== null) {\n var cpp = segPoint(a, b, cp);\n var dpp = segPoint(a, b, dp);\n\n if (equals(cpp, dpp)) return false; // degenerate case\n\n // a---cp---dp---b\n // c----d\n if (cp < dp) {\n if (!equals(a, cpp)) result.push([a, cpp]);\n if (!equals(dpp, b)) result.push([dpp, b]);\n\n // a---dp---cp---b\n // d----c\n } else {\n if (!equals(a, dpp)) result.push([a, dpp]);\n if (!equals(cpp, b)) result.push([cpp, b]);\n }\n\n } else if (cp !== null) {\n var cpp = segPoint(a, b, cp);\n\n // a----cp---b\n // d---ap---c\n if (ap !== null && !equals(a, cpp)) result.push([cpp, b]);\n\n // a---cp---b\n // c----bp---d\n else if (bp !== null && !equals(cpp, b)) result.push([a, cpp]);\n\n } else if (dp !== null) {\n var dpp = segPoint(a, b, dp);\n\n // a---dp---b\n // d----bp---c\n if (bp !== null && !equals(dpp, b)) result.push([a, dpp]);\n\n // a----dp---b\n // c---ap---d\n else if (ap !== null && !equals(a, dpp)) result.push([dpp, b]);\n }\n\n return result.length !== len; // segment processed\n}", "addZigZag(endPoint1, endPoint2, width) {\n let pointA = endPoint1.interpolate(endPoint2,0.25);\n let pointB = endPoint1.interpolate(endPoint2, 0.75);\n let phi = endPoint1.getPerpendicularAngle(endPoint2);\n pointA.translate(width * Math.cos(phi), width * Math.sin(phi));\n pointB.translate(width * Math.cos(phi + Math.PI), width * Math.sin(phi + Math.PI));\n\n super.addSegment(endPoint1, pointA);\n super.addSegment(pointA, pointB);\n super.addSegment(pointB, endPoint2);\n }", "clipSegment(start, end) {\n const quadrantStart = this.pointLocation(start)\n const quadrantEnd = this.pointLocation(end)\n\n if (quadrantStart === 0b0000 && quadrantEnd === 0b0000) {\n // The line is inside the boundaries\n return [start, end]\n }\n\n if (quadrantStart === quadrantEnd) {\n // We are in the same box, and we are out of bounds.\n return [this.nearestVertex(start), this.nearestVertex(end)]\n }\n\n if (quadrantStart & quadrantEnd) {\n // These points are all on one side of the box.\n return [this.nearestVertex(start), this.nearestVertex(end)]\n }\n\n if (quadrantStart === 0b000) {\n // We are exiting the box. Return the start, the intersection with the boundary, and the closest\n // boundary point to the exited point.\n let line = [start]\n line.push(this.boundPoint(start, end))\n line.push(this.nearestVertex(end))\n return line\n }\n\n if (quadrantEnd === 0b000) {\n // We are re-entering the box.\n return [this.boundPoint(end, start), end]\n }\n\n // We have reached a terrible place, where both points are oob, but it might intersect with the\n // work area. First, define the boundaries as lines.\n const sides = [\n // left\n [Victor(-this.sizeX, -this.sizeY), new Victor(-this.sizeX, this.sizeY)],\n // right\n [new Victor(this.sizeX, -this.sizeY), new Victor(this.sizeX, this.sizeY)],\n // bottom\n [new Victor(-this.sizeX, -this.sizeY), new Victor(this.sizeX, -this.sizeY)],\n // top\n [new Victor(-this.sizeX, this.sizeY), new Victor(this.sizeX, this.sizeY)],\n ]\n\n // Count up the number of boundary lines intersect with our line segment.\n let intersections = []\n for (let s=0; s<sides.length; s++) {\n const intPoint = this.intersection(start,\n end,\n sides[s][0],\n sides[s][1])\n if (intPoint) {\n intersections.push(new Victor(intPoint.x, intPoint.y))\n }\n }\n\n if (intersections.length !== 0) {\n if (intersections.length !== 2) {\n // We should never get here. How would we have something other than 2 or 0 intersections with\n // a box?\n console.log(intersections)\n throw Error(\"Software Geometry Error\")\n }\n\n // The intersections are tested in some normal order, but the line could be going through them\n // in any direction. This check will flip the intersections if they are reversed somehow.\n if (Victor.fromObject(intersections[0]).subtract(start).lengthSq() >\n Victor.fromObject(intersections[1]).subtract(start).lengthSq()) {\n let temp = intersections[0]\n intersections[0] = intersections[1]\n intersections[1] = temp\n }\n\n return [...intersections, this.nearestVertex(end)]\n }\n\n // Damn. We got here because we have a start and end that are failing different boundary checks,\n // and the line segment doesn't intersect the box. We have to crawl around the outside of the\n // box until we reach the other point.\n // Here, I'm going to split this line into two parts, and send each half line segment back\n // through the clipSegment algorithm. Eventually, that should result in only one of the other cases.\n const midpoint = Victor.fromObject(start).add(end).multiply(new Victor(0.5, 0.5))\n\n // recurse, and find smaller segments until we don't end up in this place again.\n return [...this.clipSegment(start, midpoint),\n ...this.clipSegment(midpoint, end)]\n }", "didSwitchToSegmentsLayout() {\n this.controllerState.viewMode = ViewMode.segments;\n this.didSwitchLayout();\n }", "function createSegment(x1, y1, x2, y2, color){\n\tvar p1 = createPoint(x1, y1, color);\n\tvar p2 = createPoint(x2, y2, color);\n\tboard.create('segment', [p1, p2], {fixed:true, fillColor: color, strokeColor: color});\n}", "function formatIntersectingSegment(x, y, i, j, xx, yy) {\n if (xx[i] == x && yy[i] == y) {\n return [i, i];\n }\n if (xx[j] == x && yy[j] == y) {\n return [j, j];\n }\n return i < j ? [i, j] : [j, i];\n }", "function drawSegment([ax, ay], [bx, by], color, scale, ctx) {\r\n ctx.beginPath();\r\n ctx.moveTo(ax * scale, ay * scale);\r\n ctx.lineTo(bx * scale, by * scale);\r\n ctx.lineWidth = 2;\r\n ctx.strokeStyle = color;\r\n ctx.stroke();\r\n}", "function onSegment(p, q, r)\n{\n if (q.x <= Math.max(p.x, r.x) && q.x >= Math.min(p.x, r.x) &&\n q.y <= Math.max(p.y, r.y) && q.y >= Math.min(p.y, r.y))\n return true;\n\n return false;\n}", "size(){ return this.end-this.start }", "function drawSegment([ay, ax], [by, bx], color, scale, ctx) {\n ctx.beginPath();\n ctx.moveTo(ax * scale, ay * scale);\n ctx.lineTo(bx * scale, by * scale);\n ctx.lineWidth = lineWidth;\n ctx.strokeStyle = color;\n ctx.stroke();\n}", "function onSegment(p, q, r) {\n return q.x <= Math.max(p.x, r.x) && q.x >= Math.min(p.x, r.x) && q.y <= Math.max(p.y, r.y) && q.y >= Math.min(p.y, r.y);\n}", "function onSegment(p, q, r) {\n return q.x <= Math.max(p.x, r.x) && q.x >= Math.min(p.x, r.x) && q.y <= Math.max(p.y, r.y) && q.y >= Math.min(p.y, r.y);\n}", "function onSegment(p, q, r) {\n return q.x <= Math.max(p.x, r.x) && q.x >= Math.min(p.x, r.x) && q.y <= Math.max(p.y, r.y) && q.y >= Math.min(p.y, r.y);\n}", "function onSegment(p, q, r) {\n return q.x <= Math.max(p.x, r.x) && q.x >= Math.min(p.x, r.x) && q.y <= Math.max(p.y, r.y) && q.y >= Math.min(p.y, r.y);\n}", "function computeSegHorizontals(segs, eventOrderSpecs) {\n // IMPORTANT TO CLEAR OLD RESULTS :(\n for (var _i = 0, segs_2 = segs; _i < segs_2.length; _i++) {\n var seg = segs_2[_i];\n seg.level = null;\n seg.forwardCoord = null;\n seg.backwardCoord = null;\n seg.forwardPressure = null;\n }\n\n segs = Object(_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__[\"sortEventSegs\"])(segs, eventOrderSpecs);\n var level0;\n var levels = buildSlotSegLevels(segs);\n computeForwardSlotSegs(levels);\n\n if (level0 = levels[0]) {\n for (var _a = 0, level0_1 = level0; _a < level0_1.length; _a++) {\n var seg = level0_1[_a];\n computeSlotSegPressures(seg);\n }\n\n for (var _b = 0, level0_2 = level0; _b < level0_2.length; _b++) {\n var seg = level0_2[_b];\n computeSegForwardBack(seg, 0, 0, eventOrderSpecs);\n }\n }\n\n return segs;\n } // Builds an array of segments \"levels\". The first level will be the leftmost tier of segments if the calendar is", "function computeSegCoords(segs, dayDate, slatCoords, eventMinHeight, eventOrderSpecs) {\n computeSegVerticals(segs, dayDate, slatCoords, eventMinHeight);\n return computeSegHorizontals(segs, eventOrderSpecs); // requires top/bottom from computeSegVerticals\n } // For each segment in an array, computes and assigns its top and bottom properties", "function F(a,b){var c=G.getRowCnt(),d=G.getColCnt(),e=[],f=B(a),g=B(b),h=+b.time();h&&h>=M&&g++,g=Math.max(g,f+1);\n// loop through all the rows in the view\nfor(var i=C(f),j=C(g)-1,k=0;k<c;k++){\n// first and last cell offset for the row\nvar l=k*d,m=l+d-1,n=Math.max(i,l),o=Math.min(j,m);\n// make sure segment's offsets are valid and in view\nif(n<=o){\n// translate to cells\nvar p=D(n),q=D(o),r=[p.col,q.col].sort(),s=y(n)==f,t=y(o)+1==g;// +1 for comparing exclusively\ne.push({row:k,leftCol:r[0],rightCol:r[1],isStart:s,isEnd:t})}}return e}", "function onSegment( p, q, r ) {\n\n\treturn q.x <= Math.max( p.x, r.x ) && q.x >= Math.min( p.x, r.x ) && q.y <= Math.max( p.y, r.y ) && q.y >= Math.min( p.y, r.y );\n\n}", "edges() {\r\n if (this.pos.x > width) {\r\n this.pos.x = 0;\r\n this.updatePrev();\r\n }\r\n if (this.pos.x < 0) {\r\n this.pos.x = width;\r\n this.updatePrev();\r\n }\r\n if (this.pos.y > height) {\r\n this.pos.y = 0;\r\n this.updatePrev();\r\n }\r\n if (this.pos.y < 0) {\r\n this.pos.y = height;\r\n this.updatePrev();\r\n }\r\n\r\n }", "function onSegment(p, q, r) {\n if (\n q.x <= Math.max(p.x, r.x) &&\n q.x >= Math.min(p.x, r.x) &&\n q.y <= Math.max(p.y, r.y) &&\n q.y >= Math.min(p.y, r.y)\n )\n return true\n\n return false\n}", "function Segment(x1, y1, x2, y2){\r\n\tthis.x1 = x1;\r\n\tthis.y1 = y1;\r\n\tthis.x2 = x2;\r\n\tthis.y2 = y2;\r\n}", "function placeRects(allRects, segs, cells) {\n let rectsByEachCol = groupRectsByEachCol(allRects, cells.length);\n let singleColPlacements = [];\n let multiColPlacements = [];\n let leftoverMargins = [];\n for (let col = 0; col < cells.length; col += 1) {\n let rects = rectsByEachCol[col];\n // compute all static segs in singlePlacements\n let singlePlacements = [];\n let currentHeight = 0;\n let currentMarginTop = 0;\n for (let rect of rects) {\n let seg = segs[rect.index];\n singlePlacements.push({\n seg: resliceSeg(seg, col, col + 1, cells),\n isVisible: true,\n isAbsolute: false,\n absoluteTop: rect.levelCoord,\n marginTop: rect.levelCoord - currentHeight,\n });\n currentHeight = rect.levelCoord + rect.thickness;\n }\n // compute mixed static/absolute segs in multiPlacements\n let multiPlacements = [];\n currentHeight = 0;\n currentMarginTop = 0;\n for (let rect of rects) {\n let seg = segs[rect.index];\n let isAbsolute = rect.span.end - rect.span.start > 1; // multi-column?\n let isFirstCol = rect.span.start === col;\n currentMarginTop += rect.levelCoord - currentHeight; // amount of space since bottom of previous seg\n currentHeight = rect.levelCoord + rect.thickness; // height will now be bottom of current seg\n if (isAbsolute) {\n currentMarginTop += rect.thickness;\n if (isFirstCol) {\n multiPlacements.push({\n seg: resliceSeg(seg, rect.span.start, rect.span.end, cells),\n isVisible: true,\n isAbsolute: true,\n absoluteTop: rect.levelCoord,\n marginTop: 0,\n });\n }\n }\n else if (isFirstCol) {\n multiPlacements.push({\n seg: resliceSeg(seg, rect.span.start, rect.span.end, cells),\n isVisible: true,\n isAbsolute: false,\n absoluteTop: rect.levelCoord,\n marginTop: currentMarginTop, // claim the margin\n });\n currentMarginTop = 0;\n }\n }\n singleColPlacements.push(singlePlacements);\n multiColPlacements.push(multiPlacements);\n leftoverMargins.push(currentMarginTop);\n }\n return { singleColPlacements, multiColPlacements, leftoverMargins };\n }", "static calc_draw_aabb(ctx : Context, td : TransData, minmax : MinMax) {\r\n var vset = {};\r\n var sset = {};\r\n var hset = {};\r\n\r\n for (var i=0; i<td.data.length; i++) {\r\n var d = td.data[i];\r\n if (d.type != TransSplineVert)\r\n continue;\r\n\r\n if (d.data.type == SplineTypes.HANDLE)\r\n hset[d.data.eid] = 1;\r\n }\r\n\r\n function rec_walk(v : SplineVertex, depth : number) {\r\n if (depth > 2) return;\r\n if (v == undefined) return;\r\n if (v.eid in vset) return;\r\n\r\n vset[v.eid] = 1;\r\n minmax.minmax(v);\r\n\r\n for (var i=0; i<v.segments.length; i++) {\r\n var seg = v.segments[i];\r\n\r\n if (!(seg.eid in sset)) {\r\n sset[seg.eid] = 1;\r\n seg.update_aabb();\r\n\r\n minmax.minmax(seg._aabb[0]);\r\n minmax.minmax(seg._aabb[1]);\r\n }\r\n\r\n var v2 = seg.other_vert(v);\r\n\r\n //don't override roots\r\n if (v2 != undefined && (v2.flag & SplineFlags.SELECT))\r\n continue;\r\n\r\n if (v.type == SplineTypes.HANDLE && !(v.eid in hset)) {\r\n vset[v.eid] = 1;\r\n } else {\r\n rec_walk(seg.other_vert(v), depth+1);\r\n }\r\n }\r\n }\r\n\r\n for (var i=0; i<td.data.length; i++) {\r\n var d = td.data[i];\r\n if (d.type != TransSplineVert)\r\n continue;\r\n\r\n if (d.w <= 0.0) continue;\r\n\r\n var v = d.data;\r\n if (v.eid in vset) continue;\r\n\r\n if (v.type == SplineTypes.HANDLE)\r\n v = v.owning_vertex;\r\n\r\n for (var j=0; j<v.segments.length; j++) {\r\n var seg = v.segments[j];\r\n if (!seg.l)\r\n continue;\r\n\r\n var _i1=0, l = seg.l;\r\n\r\n do {\r\n var faabb = l.f._aabb;\r\n\r\n minmax.minmax(faabb[0]);\r\n minmax.minmax(faabb[1]);\r\n\r\n if (_i1++ > 100) {\r\n console.log(\"infinite loop!\");\r\n break;\r\n }\r\n l = l.radial_next;\r\n } while (l != seg.l);\r\n }\r\n\r\n rec_walk(v, 0);\r\n }\r\n }", "function _segseg (out, p1, p2, p3, p4) {\n let x1 = p1[0]\n let y1 = p1[1]\n let x2 = p2[0]\n let y2 = p2[1]\n let x3 = p3[0]\n let y3 = p3[1]\n let x4 = p4[0]\n let y4 = p4[1]\n\n let a1, a2, b1, b2, c1, c2 // Coefficients of line eqns.\n let r1, r2, r3, r4 // 'Sign' values\n let denom, offset // Intermediate values\n let x, y // Intermediate return values\n\n // Compute a1, b1, c1, where line joining points 1 and 2\n // is \"a1 x + b1 y + c1 = 0\".\n a1 = y2 - y1\n b1 = x1 - x2\n c1 = x2 * y1 - x1 * y2\n\n // Compute r3 and r4.\n r3 = a1 * x3 + b1 * y3 + c1\n r4 = a1 * x4 + b1 * y4 + c1\n\n // Check signs of r3 and r4. If both point 3 and point 4 lie on\n // same side of line 1, the line segments do not intersect.\n if ( r3 !== 0 && r4 !== 0 && ((r3 >= 0 && r4 >= 0) || (r3 < 0 && r4 < 0)))\n return DONT_INTERSECT\n\n // Compute a2, b2, c2\n a2 = y4 - y3\n b2 = x3 - x4\n c2 = x4 * y3 - x3 * y4\n\n // Compute r1 and r2\n r1 = a2 * x1 + b2 * y1 + c2\n r2 = a2 * x2 + b2 * y2 + c2\n\n // Check signs of r1 and r2. If both point 1 and point 2 lie\n // on same side of second line segment, the line segments do\n // not intersect.\n if (r1 !== 0 && r2 !== 0 && ((r1 >= 0 && r2 >= 0) || (r1 < 0 && r2 < 0)))\n return DONT_INTERSECT\n\n // Line segments intersect: compute intersection point.\n denom = a1 * b2 - a2 * b1\n\n if (denom === 0)\n return COLINEAR\n\n offset = denom < 0 ? - denom / 2 : denom / 2\n\n x = b1 * c2 - b2 * c1\n y = a2 * c1 - a1 * c2\n\n out[0] = ( x < 0 ? x : x ) / denom\n out[1] = ( y < 0 ? y : y ) / denom\n \n return DO_INTERSECT\n}", "function getSection(start, angle, length, width) {\n var pThere = start + new Point(width/2, 0);\n var pBack = start + new Point(-width/2, 0);\n markPoint(pThere);\n markPoint(pBack);\n var hInThere = new Point(length*0.5, length*0.3);\n var hOutBack = new Point(length*-0.7, length*0.2);\n var hOutThere = new Point(length*0.5, -length*0.3);\n var hInBack = new Point(length*-0.7, -length*0.2);\n var segmentThere = new Segment(pThere, hInThere, hOutThere);\n var segmentBack = new Segment(pBack, hInBack, hOutBack);\n return [segmentThere, segmentBack, (start + new Point(0, -length))]\n }", "function n(a){var b,c,d,e=M(),f=[];\n// group segments by row\nfor(b=0;b<a.length;b++)c=a[b],d=c.row,c.element&&(// was rendered?\nf[d]?\n// already other segments. append to array\nf[d].push(c):\n// first segment in row. create new array\nf[d]=[c]);\n// sort each row\nfor(d=0;d<e;d++)f[d]=o(f[d]||[]);return f}", "function midline()\r\n{\r\nfor(i=0;i<480;i+=10)\r\n{\r\nvar y = 0;\r\nfill(\"white\");\r\nstroke(0);\r\nrect(width/2,y+i,10,480);\r\n}\r\n}", "function unionSegments(segment1, segment2) {\n return [\n Math.min(segment1[0], segment2[0]),\n Math.max(segment1[1], segment2[1]),\n ];\n}", "get excludeCollinear(){\n\t\tlet list = this.segList2D;\n\t\tlet newlist = [];\n\t\tfor (let i=0; i<list.length; i++){\n\t\t\tlet thisseg = list[i];\n\t\t\tlet x0 = thisseg.a[0];\n\t\t\tlet y0 = thisseg.a[1];\n\t\t\tlet x1 = thisseg.b[0];\n\t\t\tlet y1 = thisseg.b[1];\n\t\t\tlet nextseg\n\t\t\tif (i === list.length-1){\n\t\t\t\tnextseg = list[0];\n\t\t\t}\n\t\t\telse{\n\t\t\t\tnextseg = list[i+1];\n\t\t\t}\n\t\t\tlet a0 = nextseg.a[0];\n\t\t\tlet b0 = nextseg.a[1];\n\t\t\tlet a1 = nextseg.b[0];\n\t\t\tlet b1 = nextseg.b[1];\n\t\t\tlet xy = Math.round((y1-y0)/(x1-x0)*1000000)/1000000;\n\t\t\tlet ab = Math.round((b1-b0)/(a1-a0)*1000000)/1000000;\n\t\t\tif (xy !== ab){\n\t\t\t\tnewlist.push(thisseg);\n\t\t\t}\n\t\t\telse{\n\t\t\t\tif (i===list.length-1){\n\t\t\t\t\tnewlist.shift();\n\t\t\t\t}\n\t\t\t\tnewlist.push({a:[x0,y0],b:[a1,b1]})\n\t\t\t}\n\t\t}\n\t\treturn newlist;\n\t}", "function setVerticals(segments, doRowHeights) {\n\t\tvar rowContentHeights = calculateVerticals(segments); // also sets segment.top\n\t\tvar rowContentElements = getRowContentElements(); // returns 1 inner div per row\n\t\tvar rowContentTops = [];\n\n\t\t// Set each row's height by setting height of first inner div\n\t\tif (doRowHeights) {\n\t\t\tfor (var i=0; i<rowContentElements.length; i++) {\n\t\t\t\trowContentElements[i].height(rowContentHeights[i]);\n\t\t\t}\n\t\t}\n\n\t\t// Get each row's top, relative to the views's origin.\n\t\t// Important to do this after setting each row's height.\n\t\tfor (var i=0; i<rowContentElements.length; i++) {\n\t\t\trowContentTops.push(\n\t\t\t\trowContentElements[i].position().top\n\t\t\t);\n\t\t}\n\n\t\t// Set each segment element's CSS \"top\" property.\n\t\t// Each segment object has a \"top\" property, which is relative to the row's top, but...\n\t\tsegmentElementEach(segments, function(segment, element) {\n\t\t\telement.css(\n\t\t\t\t'top',\n\t\t\t\trowContentTops[segment.row] + segment.top // ...now, relative to views's origin\n\t\t\t);\n\t\t});\n\t}", "function setVerticals(segments, doRowHeights) {\n\t\tvar rowContentHeights = calculateVerticals(segments); // also sets segment.top\n\t\tvar rowContentElements = getRowContentElements(); // returns 1 inner div per row\n\t\tvar rowContentTops = [];\n\n\t\t// Set each row's height by setting height of first inner div\n\t\tif (doRowHeights) {\n\t\t\tfor (var i=0; i<rowContentElements.length; i++) {\n\t\t\t\trowContentElements[i].height(rowContentHeights[i]);\n\t\t\t}\n\t\t}\n\n\t\t// Get each row's top, relative to the views's origin.\n\t\t// Important to do this after setting each row's height.\n\t\tfor (var i=0; i<rowContentElements.length; i++) {\n\t\t\trowContentTops.push(\n\t\t\t\trowContentElements[i].position().top\n\t\t\t);\n\t\t}\n\n\t\t// Set each segment element's CSS \"top\" property.\n\t\t// Each segment object has a \"top\" property, which is relative to the row's top, but...\n\t\tsegmentElementEach(segments, function(segment, element) {\n\t\t\telement.css(\n\t\t\t\t'top',\n\t\t\t\trowContentTops[segment.row] + segment.top // ...now, relative to views's origin\n\t\t\t);\n\t\t});\n\t}", "function setVerticals(segments, doRowHeights) {\n\t\tvar rowContentHeights = calculateVerticals(segments); // also sets segment.top\n\t\tvar rowContentElements = getRowContentElements(); // returns 1 inner div per row\n\t\tvar rowContentTops = [];\n\n\t\t// Set each row's height by setting height of first inner div\n\t\tif (doRowHeights) {\n\t\t\tfor (var i=0; i<rowContentElements.length; i++) {\n\t\t\t\trowContentElements[i].height(rowContentHeights[i]);\n\t\t\t}\n\t\t}\n\n\t\t// Get each row's top, relative to the views's origin.\n\t\t// Important to do this after setting each row's height.\n\t\tfor (var i=0; i<rowContentElements.length; i++) {\n\t\t\trowContentTops.push(\n\t\t\t\trowContentElements[i].position().top\n\t\t\t);\n\t\t}\n\n\t\t// Set each segment element's CSS \"top\" property.\n\t\t// Each segment object has a \"top\" property, which is relative to the row's top, but...\n\t\tsegmentElementEach(segments, function(segment, element) {\n\t\t\telement.css(\n\t\t\t\t'top',\n\t\t\t\trowContentTops[segment.row] + segment.top // ...now, relative to views's origin\n\t\t\t);\n\t\t});\n\t}", "function onSegment( p, q, r ) {\n\n\t\treturn q.x <= Math.max( p.x, r.x ) && q.x >= Math.min( p.x, r.x ) && q.y <= Math.max( p.y, r.y ) && q.y >= Math.min( p.y, r.y );\n\n\t}", "function onSegment(p, q, r) {\n if (\n q[0] <= Math.max(p[0], r[0]) &&\n q[0] >= Math.min(p[0], r[0]) &&\n q[1] <= Math.max(p[1], r[1]) &&\n q[1] >= Math.min(p[1], r[1])\n ) {\n return true;\n }\n\n return false;\n}", "display(){\n\n push();\n\n fill(this.color);\n noStroke();\n\n for(let i = 0; i < this.numOfSegs; i++){\n ellipse(this.segments[i].x,this.segments[i].y,this.segments[i].width);\n }\n pop();\n\n }", "drawSegment(graphics, color) {\n if (color) graphics.setForeground(color)\n graphics.drawLine(this.x1, this.y1, this.x2, this.y2)\n }", "edgeCheck() {\n\n // check if the selected segment has hit a vertical wall (left or right walls)\n if (this.segments[this.select].x + (this.segments[this.select].width /2) >= width || this.segments[this.select].x - (this.segments[this.select].width /2) <= 0) {\n this.segments[this.select].deltaX *= -1;\n }\n // check if the selected segment has hit a horizontal wall (top or bottom walls)\n if (this.segments[this.select].y + (this.segments[this.select].width /2) >= height || this.segments[this.select].y - (this.segments[this.select].width /2) <= 0) {\n this.segments[this.select].deltaY *= -1;\n }\n }", "function setVerticals(segments, doRowHeights) {\n\t\tvar rowContentHeights = calculateVerticals(segments); // also sets segment.top\n\t\tvar rowContentElements = getRowContentElements(); // returns 1 inner div per row\n\t\tvar rowContentTops = [];\n\t\tvar i;\n\n\t\t// Set each row's height by setting height of first inner div\n\t\tif (doRowHeights) {\n\t\t\tfor (i=0; i<rowContentElements.length; i++) {\n\t\t\t\trowContentElements[i].height(rowContentHeights[i]);\n\t\t\t}\n\t\t}\n\n\t\t// Get each row's top, relative to the views's origin.\n\t\t// Important to do this after setting each row's height.\n\t\tfor (i=0; i<rowContentElements.length; i++) {\n\t\t\trowContentTops.push(\n\t\t\t\trowContentElements[i].position().top\n\t\t\t);\n\t\t}\n\n\t\t// Set each segment element's CSS \"top\" property.\n\t\t// Each segment object has a \"top\" property, which is relative to the row's top, but...\n\t\tsegmentElementEach(segments, function(segment, element) {\n\t\t\telement.css(\n\t\t\t\t'top',\n\t\t\t\trowContentTops[segment.row] + segment.top // ...now, relative to views's origin\n\t\t\t);\n\t\t});\n\t}", "function setVerticals(segments, doRowHeights) {\n\t\tvar rowContentHeights = calculateVerticals(segments); // also sets segment.top\n\t\tvar rowContentElements = getRowContentElements(); // returns 1 inner div per row\n\t\tvar rowContentTops = [];\n\t\tvar i;\n\n\t\t// Set each row's height by setting height of first inner div\n\t\tif (doRowHeights) {\n\t\t\tfor (i=0; i<rowContentElements.length; i++) {\n\t\t\t\trowContentElements[i].height(rowContentHeights[i]);\n\t\t\t}\n\t\t}\n\n\t\t// Get each row's top, relative to the views's origin.\n\t\t// Important to do this after setting each row's height.\n\t\tfor (i=0; i<rowContentElements.length; i++) {\n\t\t\trowContentTops.push(\n\t\t\t\trowContentElements[i].position().top\n\t\t\t);\n\t\t}\n\n\t\t// Set each segment element's CSS \"top\" property.\n\t\t// Each segment object has a \"top\" property, which is relative to the row's top, but...\n\t\tsegmentElementEach(segments, function(segment, element) {\n\t\t\telement.css(\n\t\t\t\t'top',\n\t\t\t\trowContentTops[segment.row] + segment.top // ...now, relative to views's origin\n\t\t\t);\n\t\t});\n\t}", "function size_of(segments, bindings) {\n var size = 0;\n for (var i=0, len = segments.length; i < len; i++) {\n size += size_of_segment(segments[i], bindings);\n }\n return size;\n}", "function ArmSegment(shader, name, xPivot, yPivot) {\r\n SceneNode.call(this, shader, name, true); // calling super class constructor\r\n\r\n var xf = this.getXform();\r\n xf.setPosition(xPivot, yPivot);\r\n\r\n // now create the children shapes\r\n var obj = new CircleRenderable(shader); // The purple circle base\r\n this.addToSet(obj);\r\n obj.setColor([0.75, 0.5, 1, 1]);\r\n xf = obj.getXform();\r\n xf.setSize(1, 2);\r\n // xf.setPosition(xPivot, 1 + yPivot);\r\n xf.setPosition(0, 0);\r\n\r\n obj = new SquareRenderable(shader); // The right green\r\n this.addToSet(obj);\r\n obj.setColor([0, 1, 0, 1]);\r\n xf = obj.getXform();\r\n xf.setSize(0.25, 0.25); // so that we can see the connecting point\r\n // xf.setPosition(xPivot, 1.75 + yPivot);\r\n xf.setPosition(0.375, 0);\r\n\r\n obj = new SquareRenderable(shader); // The left green\r\n this.addToSet(obj);\r\n obj.setColor([0, 1, 0, 1]);\r\n xf = obj.getXform();\r\n xf.setSize(0.25, 0.25); // so that we can see the connecting point\r\n // xf.setPosition(xPivot, 1.75 + yPivot);\r\n xf.setPosition(-0.375, 0);\r\n\r\n obj = new SquareRenderable(shader); // The top green\r\n this.addToSet(obj);\r\n obj.setColor([0, 0.85, 0.15, 1]);\r\n xf = obj.getXform();\r\n xf.setSize(0.25, 0.25); // so that we can see the connecting point\r\n // xf.setPosition(xPivot+0.5-0.125, yPivot+0.125);\r\n xf.setPosition(0, 0.375);\r\n\r\n obj = new SquareRenderable(shader); // The bottom green\r\n this.addToSet(obj);\r\n obj.setColor([0, 0.85, 0.15, 1]);\r\n xf = obj.getXform();\r\n xf.setSize(0.25, 0.25); // so that we can see the connecting point\r\n // xf.setPosition(xPivot-0.5+0.125, yPivot+0.125);\r\n xf.setPosition(0, -0.375);\r\n\r\n obj = new CircleRenderable(shader); // The middle red circle\r\n this.addToSet(obj);\r\n obj.setColor([1, 0.75, 1, 1]);\r\n xf = obj.getXform();\r\n xf.setSize(0.5, 0.5); // so that we can see the connecting point\r\n xf.setPosition(0, 0);\r\n\r\n this.mPulseRate = 0.005;\r\n this.mRotateRate = -2;\r\n}", "function Segment(props) {\n var attached = props.attached,\n basic = props.basic,\n children = props.children,\n circular = props.circular,\n className = props.className,\n clearing = props.clearing,\n color = props.color,\n compact = props.compact,\n content = props.content,\n disabled = props.disabled,\n floated = props.floated,\n inverted = props.inverted,\n loading = props.loading,\n placeholder = props.placeholder,\n padded = props.padded,\n piled = props.piled,\n raised = props.raised,\n secondary = props.secondary,\n size = props.size,\n stacked = props.stacked,\n tertiary = props.tertiary,\n textAlign = props.textAlign,\n vertical = props.vertical;\n var classes = (0, _classnames[\"default\"])('ui', color, size, (0, _lib.useKeyOnly)(basic, 'basic'), (0, _lib.useKeyOnly)(circular, 'circular'), (0, _lib.useKeyOnly)(clearing, 'clearing'), (0, _lib.useKeyOnly)(compact, 'compact'), (0, _lib.useKeyOnly)(disabled, 'disabled'), (0, _lib.useKeyOnly)(inverted, 'inverted'), (0, _lib.useKeyOnly)(loading, 'loading'), (0, _lib.useKeyOnly)(placeholder, 'placeholder'), (0, _lib.useKeyOnly)(piled, 'piled'), (0, _lib.useKeyOnly)(raised, 'raised'), (0, _lib.useKeyOnly)(secondary, 'secondary'), (0, _lib.useKeyOnly)(stacked, 'stacked'), (0, _lib.useKeyOnly)(tertiary, 'tertiary'), (0, _lib.useKeyOnly)(vertical, 'vertical'), (0, _lib.useKeyOrValueAndKey)(attached, 'attached'), (0, _lib.useKeyOrValueAndKey)(padded, 'padded'), (0, _lib.useTextAlignProp)(textAlign), (0, _lib.useValueAndKey)(floated, 'floated'), 'segment', className);\n var rest = (0, _lib.getUnhandledProps)(Segment, props);\n var ElementType = (0, _lib.getElementType)(Segment, props);\n return _react[\"default\"].createElement(ElementType, (0, _extends2[\"default\"])({}, rest, {\n className: classes\n }), _lib.childrenUtils.isNil(children) ? content : children);\n}", "function Segment(props) {\n var attached = props.attached,\n basic = props.basic,\n children = props.children,\n circular = props.circular,\n className = props.className,\n clearing = props.clearing,\n color = props.color,\n compact = props.compact,\n content = props.content,\n disabled = props.disabled,\n floated = props.floated,\n inverted = props.inverted,\n loading = props.loading,\n placeholder = props.placeholder,\n padded = props.padded,\n piled = props.piled,\n raised = props.raised,\n secondary = props.secondary,\n size = props.size,\n stacked = props.stacked,\n tertiary = props.tertiary,\n textAlign = props.textAlign,\n vertical = props.vertical;\n var classes = (0, _classnames[\"default\"])('ui', color, size, (0, _lib.useKeyOnly)(basic, 'basic'), (0, _lib.useKeyOnly)(circular, 'circular'), (0, _lib.useKeyOnly)(clearing, 'clearing'), (0, _lib.useKeyOnly)(compact, 'compact'), (0, _lib.useKeyOnly)(disabled, 'disabled'), (0, _lib.useKeyOnly)(inverted, 'inverted'), (0, _lib.useKeyOnly)(loading, 'loading'), (0, _lib.useKeyOnly)(placeholder, 'placeholder'), (0, _lib.useKeyOnly)(piled, 'piled'), (0, _lib.useKeyOnly)(raised, 'raised'), (0, _lib.useKeyOnly)(secondary, 'secondary'), (0, _lib.useKeyOnly)(stacked, 'stacked'), (0, _lib.useKeyOnly)(tertiary, 'tertiary'), (0, _lib.useKeyOnly)(vertical, 'vertical'), (0, _lib.useKeyOrValueAndKey)(attached, 'attached'), (0, _lib.useKeyOrValueAndKey)(padded, 'padded'), (0, _lib.useTextAlignProp)(textAlign), (0, _lib.useValueAndKey)(floated, 'floated'), 'segment', className);\n var rest = (0, _lib.getUnhandledProps)(Segment, props);\n var ElementType = (0, _lib.getElementType)(Segment, props);\n return _react[\"default\"].createElement(ElementType, (0, _extends2[\"default\"])({}, rest, {\n className: classes\n }), _lib.childrenUtils.isNil(children) ? content : children);\n}", "function isSlotSegCollision(seg1, seg2) {\n return seg1.bottom > seg2.top && seg1.top < seg2.bottom;\n}", "function isSlotSegCollision(seg1, seg2) {\n return seg1.bottom > seg2.top && seg1.top < seg2.bottom;\n}", "function isSlotSegCollision(seg1, seg2) {\n return seg1.bottom > seg2.top && seg1.top < seg2.bottom;\n}", "function isSlotSegCollision(seg1, seg2) {\n return seg1.bottom > seg2.top && seg1.top < seg2.bottom;\n}", "function isSlotSegCollision(seg1, seg2) {\n return seg1.bottom > seg2.top && seg1.top < seg2.bottom;\n}", "function add_segments() {\r\n for (let i = 0; i < new_segments; i++) {\r\n the_snake_square_on_the_grid_board_game.push({\r\n ...the_snake_square_on_the_grid_board_game[the_snake_square_on_the_grid_board_game.length - 1]\r\n });\r\n }\r\n\r\n new_segments = 0;\r\n}", "static DistancePointToLineSegment() {}", "function _onSegment(A,B,p, tolerance){\n\t\tif(!tolerance){\n\t\t\ttolerance = TOL;\n\t\t}\n\t\t\t\t\n\t\t// vertical line\n\t\tif(_almostEqual(A.x, B.x, tolerance) && _almostEqual(p.x, A.x, tolerance)){\n\t\t\tif(!_almostEqual(p.y, B.y, tolerance) && !_almostEqual(p.y, A.y, tolerance) && p.y < Math.max(B.y, A.y, tolerance) && p.y > Math.min(B.y, A.y, tolerance)){\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\telse{\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\t// horizontal line\n\t\tif(_almostEqual(A.y, B.y, tolerance) && _almostEqual(p.y, A.y, tolerance)){\n\t\t\tif(!_almostEqual(p.x, B.x, tolerance) && !_almostEqual(p.x, A.x, tolerance) && p.x < Math.max(B.x, A.x) && p.x > Math.min(B.x, A.x)){\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\telse{\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\t\t\n\t\t\n\t\t//range check\n\t\tif((p.x < A.x && p.x < B.x) || (p.x > A.x && p.x > B.x) || (p.y < A.y && p.y < B.y) || (p.y > A.y && p.y > B.y)){\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\t\n\t\t// exclude end points\n\t\tif((_almostEqual(p.x, A.x, tolerance) && _almostEqual(p.y, A.y, tolerance)) || (_almostEqual(p.x, B.x, tolerance) && _almostEqual(p.y, B.y, tolerance))){\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\tvar cross = (p.y - A.y) * (B.x - A.x) - (p.x - A.x) * (B.y - A.y);\n\t\t\n\t\tif(Math.abs(cross) > tolerance){\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\tvar dot = (p.x - A.x) * (B.x - A.x) + (p.y - A.y)*(B.y - A.y);\n\t\t\n\t\t\n\t\t\n\t\tif(dot < 0 || _almostEqual(dot, 0, tolerance)){\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\tvar len2 = (B.x - A.x)*(B.x - A.x) + (B.y - A.y)*(B.y - A.y);\n\t\t\n\t\t\n\t\t\n\t\tif(dot > len2 || _almostEqual(dot, len2, tolerance)){\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\treturn true;\n\t}", "function drawSegment(_ref2, _ref3, color, scale, ctx) {\n var _ref4 = _slicedToArray(_ref2, 2),\n ay = _ref4[0],\n ax = _ref4[1];\n\n var _ref5 = _slicedToArray(_ref3, 2),\n by = _ref5[0],\n bx = _ref5[1];\n\n ctx.beginPath();\n ctx.moveTo(ax * scale, ay * scale);\n ctx.lineTo(bx * scale, by * scale);\n ctx.lineWidth = lineWidth;\n ctx.strokeStyle = color;\n ctx.stroke();\n}", "function R(){var e=s.getBoundingClientRect(),n=\"offset\"+[\"Width\",\"Height\"][t.ort];return 0===t.ort?e.width||s[n]:e.height||s[n]}", "function addSegment(segment) {\n\t\t\t\n\t\t// create canvas element used to visualize the frames of \n\t\t// the given segment + its timecodes\n\t\tvar item = document.createElement('canvas');\n\t\titem.width = 1000;\n\t\titem.height = 200;\n\t\t\n\t\t// input field for description of a segment\n\t\tvar input = document.createElement('input');\n\t\tinput.type = 'text';\n\t\tinput.placeholder = 'description';\n\t\tinput.className = 'description';\n\t\tinput.value = segment.description;\n\t\tinput.id = '' + segment.id;\n\t\tinput.width = 500;\n\t\t\n\t\t// draw segment frames of the video\n\t\tvar context = item.getContext(\"2d\");\n\t\tcontext.drawImage(segment.startFrame.image, 10, 10, 150, 150);\n\t\tcontext.drawImage(segment.endFrame.image, 170, 10, 150, 150);\n\t\t\n\t\t// draw timecode as text\n\t\tcontext.font = \"20px Arial\";\n\t\tcontext.fillStyle = 'Black';\n\t\tcontext.fillText(segment.startFrame.asText() + ' - ' + segment.endFrame.asText(), 10, 190);\n\t\t\n\t\tvar div = document.createElement('div');\n\t\tdiv.className = 'element';\n\t\tdiv.setAttribute('data-start', segment.startFrame.second);\n\t\tdiv.setAttribute('data-end', segment.endFrame.second);\n\t\tdiv.id = 'div' + segment.id;\n\t\t\n\t\t// logic for button showing the up arrow\n\t\tvar up_arrow = document.createElement('button');\n\t\tup_arrow.type = 'button';\n\t\tup_arrow.innerHTML = '&uarr;'\n\t\tup_arrow.setAttribute('data-id', segment.id);\n\t\tvar index = segments.indexOf(segment);\n\t\tup_arrow.disabled = index == 0;\n\t\tup_arrow.addEventListener('click', \n\t\tfunction() {\n\t\t\tvar segment_id = this.getAttribute('data-id');\n\t\t\tvar se = getSegmentById(segment_id);\n\t\t\tvar index_se = segments.indexOf(se);\n\t\t\tif (index_se <= 0) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tswapSegments(index_se, index_se - 1);\n\t\t\trepaintSegments();\n\t\t},\n\t\tfalse);\n\t\t\n\t\t// logic for button showing the down arrow\n\t\tvar down_arrow = document.createElement('button');\n\t\tdown_arrow.type = 'button';\n\t\tdown_arrow.innerHTML = '&darr;'\n\t\tdown_arrow.setAttribute('data-id', segment.id);\n\t\tdown_arrow.disabled = index == segments.length - 1;\n\t\tdown_arrow.addEventListener('click', \n\t\tfunction() {\n\t\t\tvar segment_id = this.getAttribute('data-id');\n\t\t\tvar se = getSegmentById(segment_id);\n\t\t\tvar index_se = segments.indexOf(se);\n\t\t\tif (index_se >= segments.length - 1) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tswapSegments(index_se, index_se + 1);\n\t\t\trepaintSegments();\n\t\t},\n\t\tfalse);\n\t\t\n\t\t// logic for remove button -> removes a segment\n\t\tvar remove = document.createElement('button');\n\t\tremove.type = 'button';\n\t\tremove.innerHTML = '-';\n\t\tremove.setAttribute('data-id', segment.id);\n\t\tremove.style.color = 'red',\n\t\tremove.addEventListener('click', \n\t\tfunction() {\n\t\t\tvar segment_id = this.getAttribute('data-id');\n\t\t\tvar se = getSegmentById(segment_id);\n\t\t\tvar index_se = segments.indexOf(se);\n\t\t\t// Find and remove item from an array\n\t\t\tif(index_se >= 0 && index_se < segments.length) {\n\t\t\t\tsegments.splice(index_se, 1);\n\t\t\t\tavailable_ids.push(se.id);\n\t\t\t\tremoveSegment(se);\n\t\t\t\trepaintSegments();\n\t\t\t}\n\t\t},\n\t\tfalse);\n\t\t\n\t\tdiv.appendChild(item);\n\t\tdiv.appendChild(input);\n\t\tdiv.appendChild(up_arrow);\n\t\tdiv.appendChild(down_arrow);\n\t\tdiv.appendChild(remove);\n\t\t\n\t\t// add the new segment div to the list of div objects\n\t\tcontainer.appendChild(div);\n\t}", "function insertSeparatorSegments (segments) {\n // first, let's define what is a lane that will likely need adajcent striping?\n function isLaneIsh (typeString) {\n return (typeString.slice(typeString.length - 4) == 'lane' || typeString == 'light-rail' || typeString == 'streetcar');\n }\n\n // then let's go through the segments array and build a new one with inserted separators\n const newValues = segments.reduce((newArray, currentValue, currentIndex, arr) => {\n // don't insert a lane marker before the first segment\n if (currentIndex == 0) { return newArray.concat(currentValue); }\n\n const previousValue = arr[currentIndex - 1];\n\n // if both adjacent lanes are \"laneish\"\n if (isLaneIsh(currentValue.type) && isLaneIsh(previousValue.type)) {\n // if in doubt start with a solid line\n var variantString = 'solid';\n\n // if adjacent lane types are identical, then used dashed lines\n if (currentValue.type == previousValue.type) { variantString = 'dashed'; }\n\n // Or, if either is a drive lane or turn lane then use dashed\n // Using dash vs solid for turn lanes along approach to intersections may need to be user defined\n if ((currentValue.type == 'drive-lane' && previousValue.type == 'turn-lane') || (previousValue.type == 'drive-lane' && currentValue.type == 'turn-lane')) { variantString = 'dashed'; }\n\n // if adjacent segments in opposite directions then use double yellow\n if (currentValue.variantString.split('|')[0] !== previousValue.variantString.split('|')[0]) {\n variantString = 'doubleyellow';\n // if adjacenet segments are both bike lanes, then use yellow short dash\n if (currentValue.type == 'bike-lane' && previousValue.type == 'bike-lane') {\n variantString = 'shortdashedyellow';\n }\n }\n\n // special case -- if either lanes are turn lane shared, then use solid and long dash\n if (currentValue.type == 'turn-lane' && currentValue.variantString.split('|')[1] == 'shared') {\n variantString = 'soliddashedyellow';\n } else if (previousValue.type == 'turn-lane' && previousValue.variantString.split('|')[1] == 'shared') {\n variantString = 'soliddashedyellowinverted';\n }\n\n newArray.push({ type: 'separator', variantString: variantString, width: 0 });\n }\n\n // if a *lane segment and divider are adjacent, use a solid separator\n if ((isLaneIsh(currentValue.type) && previousValue.type == 'divider') || (isLaneIsh(previousValue.type) && currentValue.type == 'divider')) {\n newArray.push({ type: 'separator', variantString: 'solid', width: 0 });\n }\n\n newArray.push(currentValue);\n return newArray;\n }, []);\n\n // console.log('newValues =', newValues)\n // console.log(segments);\n\n return newValues;\n}", "function lastY() { return (segments.length == 0) ? 0 : segments[segments.length-1].p2.w.y; }", "function computeSlotSegCollisions(seg, otherSegs, results) {\n if (results === void 0) {\n results = [];\n }\n\n for (var i = 0; i < otherSegs.length; i++) {\n if (isSlotSegCollision(seg, otherSegs[i])) {\n results.push(otherSegs[i]);\n }\n }\n\n return results;\n } // Do these segments occupy the same vertical space?", "function segment(x, y, a) { //left arm\r\n translate(x, y);\r\n rotate(a);\r\n line(0, 0, segLength, 0);\r\n }", "function getRange() {\n\t if (__.nullValueSeparator == 'bottom') {\n\t return [h() + 1 - __.nullValueSeparatorPadding.bottom - __.nullValueSeparatorPadding.top, 1];\n\t } else if (__.nullValueSeparator == 'top') {\n\t return [h() + 1, 1 + __.nullValueSeparatorPadding.bottom + __.nullValueSeparatorPadding.top];\n\t }\n\t return [h() + 1, 1];\n\t }", "function segments(x, y, rx, ry, large, sweep, rotateX, ox, oy) {\n var key = join.call(arguments);\n if (segmentCache[key]) {\n return segmentCache[key];\n }\n\n var th = rotateX * (Math.PI/180);\n var sin_th = Math.sin(th);\n var cos_th = Math.cos(th);\n rx = Math.abs(rx);\n ry = Math.abs(ry);\n var px = cos_th * (ox - x) * 0.5 + sin_th * (oy - y) * 0.5;\n var py = cos_th * (oy - y) * 0.5 - sin_th * (ox - x) * 0.5;\n var pl = (px*px) / (rx*rx) + (py*py) / (ry*ry);\n if (pl > 1) {\n pl = Math.sqrt(pl);\n rx *= pl;\n ry *= pl;\n }\n\n var a00 = cos_th / rx;\n var a01 = sin_th / rx;\n var a10 = (-sin_th) / ry;\n var a11 = (cos_th) / ry;\n var x0 = a00 * ox + a01 * oy;\n var y0 = a10 * ox + a11 * oy;\n var x1 = a00 * x + a01 * y;\n var y1 = a10 * x + a11 * y;\n\n var d = (x1-x0) * (x1-x0) + (y1-y0) * (y1-y0);\n var sfactor_sq = 1 / d - 0.25;\n if (sfactor_sq < 0) sfactor_sq = 0;\n var sfactor = Math.sqrt(sfactor_sq);\n if (sweep == large) sfactor = -sfactor;\n var xc = 0.5 * (x0 + x1) - sfactor * (y1-y0);\n var yc = 0.5 * (y0 + y1) + sfactor * (x1-x0);\n\n var th0 = Math.atan2(y0-yc, x0-xc);\n var th1 = Math.atan2(y1-yc, x1-xc);\n\n var th_arc = th1-th0;\n if (th_arc < 0 && sweep === 1) {\n th_arc += 2 * Math.PI;\n } else if (th_arc > 0 && sweep === 0) {\n th_arc -= 2 * Math.PI;\n }\n\n var segs = Math.ceil(Math.abs(th_arc / (Math.PI * 0.5 + 0.001)));\n var result = [];\n for (var i=0; i<segs; ++i) {\n var th2 = th0 + i * th_arc / segs;\n var th3 = th0 + (i+1) * th_arc / segs;\n result[i] = [xc, yc, th2, th3, rx, ry, sin_th, cos_th];\n }\n\n return (segmentCache[key] = result);\n }", "constructor(num_circle_segments, num_vertical_lines, color, radius_top, radius_bottom,\n include_top_circle, include_bottom_circle) {\n super();\n\n this.num_circle_segments = num_circle_segments;\n this.num_vertical_lines = num_vertical_lines;\n this.radius_top = radius_top;\n this.radius_bottom = radius_bottom;\n this.include_top_circle = include_top_circle;\n this.include_bottom_circle = include_bottom_circle;\n this.geometry = new BufferGeometry();\n this.material = new LineBasicMaterial({color: color});\n this.vertices = [\n new Vector3(0, .5, 0),\n new Vector3(0, -.5, 0)\n ];\n this.indices = []; // Which vertex is connected to which.\n\n /* Init circle indices, fill vertices array. */\n if (this.include_top_circle) {\n for (let i = 0; i < num_circle_segments; i++) {\n this.vertices.push(new Vector3(0, 0, 0));\n // Offset of two for top and bottom center vectors.\n this.indices.push(\n i + 2,\n (i + 1) % num_circle_segments + 2\n );\n }\n }\n if (this.include_bottom_circle) {\n for (let i = 0; i < num_circle_segments; i++) {\n this.vertices.push(new Vector3(0, 0, 0));\n let offset = this.include_top_circle ? num_circle_segments + 2: 2;\n this.indices.push(\n i + offset,\n (i + 1) % num_circle_segments + offset\n );\n }\n }\n\n /* Init lines connecting the two (potential) circles. */\n let index_offset = 2;\n index_offset += this.include_top_circle ? this.num_circle_segments : 0;\n index_offset += this.include_bottom_circle ? this.num_circle_segments : 0;\n for (let i = 0; i < this.num_vertical_lines; i++) {\n this.vertices.push(new Vector3(0, 0, 0));\n this.vertices.push(new Vector3(0, 0, 0));\n this.indices.push(\n 2 * i + index_offset,\n 2 * i + index_offset + 1\n );\n }\n\n this.vertex_positions = new Float32Array(this.vertices.length * 3);\n this.geometry.setIndex(new BufferAttribute(new Uint16Array(this.indices), 1));\n this.geometry.addAttribute(\"position\", new BufferAttribute(this.vertex_positions, 3));\n this.mesh = new LineSegments(this.geometry, this.material);\n this.add(this.mesh);\n\n this.update_cylinder();\n }", "function computeSlotSegCollisions(seg, otherSegs, results) {\n if (results === void 0) {\n results = [];\n }\n\n for (var i = 0; i < otherSegs.length; i++) {\n if (isSlotSegCollision(seg, otherSegs[i])) {\n results.push(otherSegs[i]);\n }\n }\n\n return results;\n } // Do these segments occupy the same vertical space?", "function Segment(props) {\n var attached = props.attached,\n basic = props.basic,\n children = props.children,\n circular = props.circular,\n className = props.className,\n clearing = props.clearing,\n color = props.color,\n compact = props.compact,\n content = props.content,\n disabled = props.disabled,\n floated = props.floated,\n inverted = props.inverted,\n loading = props.loading,\n placeholder = props.placeholder,\n padded = props.padded,\n piled = props.piled,\n raised = props.raised,\n secondary = props.secondary,\n size = props.size,\n stacked = props.stacked,\n tertiary = props.tertiary,\n textAlign = props.textAlign,\n vertical = props.vertical;\n var classes = Object(clsx__WEBPACK_IMPORTED_MODULE_2__[\"default\"])('ui', color, size, Object(_lib__WEBPACK_IMPORTED_MODULE_5__[\"useKeyOnly\"])(basic, 'basic'), Object(_lib__WEBPACK_IMPORTED_MODULE_5__[\"useKeyOnly\"])(circular, 'circular'), Object(_lib__WEBPACK_IMPORTED_MODULE_5__[\"useKeyOnly\"])(clearing, 'clearing'), Object(_lib__WEBPACK_IMPORTED_MODULE_5__[\"useKeyOnly\"])(compact, 'compact'), Object(_lib__WEBPACK_IMPORTED_MODULE_5__[\"useKeyOnly\"])(disabled, 'disabled'), Object(_lib__WEBPACK_IMPORTED_MODULE_5__[\"useKeyOnly\"])(inverted, 'inverted'), Object(_lib__WEBPACK_IMPORTED_MODULE_5__[\"useKeyOnly\"])(loading, 'loading'), Object(_lib__WEBPACK_IMPORTED_MODULE_5__[\"useKeyOnly\"])(placeholder, 'placeholder'), Object(_lib__WEBPACK_IMPORTED_MODULE_5__[\"useKeyOnly\"])(piled, 'piled'), Object(_lib__WEBPACK_IMPORTED_MODULE_5__[\"useKeyOnly\"])(raised, 'raised'), Object(_lib__WEBPACK_IMPORTED_MODULE_5__[\"useKeyOnly\"])(secondary, 'secondary'), Object(_lib__WEBPACK_IMPORTED_MODULE_5__[\"useKeyOnly\"])(stacked, 'stacked'), Object(_lib__WEBPACK_IMPORTED_MODULE_5__[\"useKeyOnly\"])(tertiary, 'tertiary'), Object(_lib__WEBPACK_IMPORTED_MODULE_5__[\"useKeyOnly\"])(vertical, 'vertical'), Object(_lib__WEBPACK_IMPORTED_MODULE_5__[\"useKeyOrValueAndKey\"])(attached, 'attached'), Object(_lib__WEBPACK_IMPORTED_MODULE_5__[\"useKeyOrValueAndKey\"])(padded, 'padded'), Object(_lib__WEBPACK_IMPORTED_MODULE_5__[\"useTextAlignProp\"])(textAlign), Object(_lib__WEBPACK_IMPORTED_MODULE_5__[\"useValueAndKey\"])(floated, 'floated'), 'segment', className);\n var rest = Object(_lib__WEBPACK_IMPORTED_MODULE_5__[\"getUnhandledProps\"])(Segment, props);\n var ElementType = Object(_lib__WEBPACK_IMPORTED_MODULE_5__[\"getElementType\"])(Segment, props);\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_4___default.a.createElement(ElementType, Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({}, rest, {\n className: classes\n }), _lib__WEBPACK_IMPORTED_MODULE_5__[\"childrenUtils\"].isNil(children) ? content : children);\n}", "function drawSegmentsOverLine(start, end, totalPts) {\n\n var percIncrement = 1 / (totalPts - 1);\n var drawPerc = 0;\n var pt;\n for (var i = 0; i < totalPts; i++) {\n drawPerc = percIncrement * i;\n pt = midpoint(start.x, start.y, end.x, end.y, drawPerc);\n circle(pt.x, pt.y);\n }\n\n }", "function segmentNew(start, end){\n\t\treturn {\n\t\t\tid: buildLog ? buildLog.segmentId() : -1,\n\t\t\tstart: start,\n\t\t\tend: end,\n\t\t\tmyFill: {\n\t\t\t\tabove: null, // is there fill above us?\n\t\t\t\tbelow: null // is there fill below us?\n\t\t\t},\n\t\t\totherFill: null\n\t\t};\n\t}", "function Segments(props) {\n var value = props.value,\n children = props.children,\n name = props.name,\n size = props.size,\n onChange = props.onChange,\n className = props.className;\n var classes = (0,_node_modules_classnames_index_js__WEBPACK_IMPORTED_MODULE_2__.default)('kt-segments', className);\n var contextValue = (0,react__WEBPACK_IMPORTED_MODULE_0__.useMemo)(function () {\n return {\n value: value,\n name: name,\n onChange: onChange,\n size: size\n };\n }, [value, name, onChange, size]);\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_context_js__WEBPACK_IMPORTED_MODULE_3__.SegmentsContext.Provider, {\n value: contextValue\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(\"div\", {\n className: classes\n }, children));\n}", "function computeSlotSegPressures(seg) {\n var forwardSegs = seg.forwardSegs;\n var forwardPressure = 0;\n var i;\n var forwardSeg;\n\n if (seg.forwardPressure === undefined) {\n // not already computed\n for (i = 0; i < forwardSegs.length; i++) {\n forwardSeg = forwardSegs[i]; // figure out the child's maximum forward path\n\n computeSlotSegPressures(forwardSeg); // either use the existing maximum, or use the child's forward pressure\n // plus one (for the forwardSeg itself)\n\n forwardPressure = Math.max(forwardPressure, 1 + forwardSeg.forwardPressure);\n }\n\n seg.forwardPressure = forwardPressure;\n }\n } // Find all the segments in `otherSegs` that vertically collide with `seg`.", "function isSlotSegCollision(seg1, seg2) {\n\treturn seg1.bottom > seg2.top && seg1.top < seg2.bottom;\n}", "function isSlotSegCollision(seg1, seg2) {\n\treturn seg1.bottom > seg2.top && seg1.top < seg2.bottom;\n}", "function isSlotSegCollision(seg1, seg2) {\n\treturn seg1.bottom > seg2.top && seg1.top < seg2.bottom;\n}", "function isSlotSegCollision(seg1, seg2) {\n\treturn seg1.bottom > seg2.top && seg1.top < seg2.bottom;\n}" ]
[ "0.64234924", "0.6271825", "0.6148352", "0.60231054", "0.5959933", "0.58803403", "0.5865494", "0.58606356", "0.58439827", "0.58426327", "0.58375865", "0.58350235", "0.5800868", "0.58000726", "0.57837456", "0.57215863", "0.57215863", "0.5704195", "0.5704195", "0.5704195", "0.5684275", "0.56811184", "0.567709", "0.56303084", "0.56205773", "0.5603904", "0.559231", "0.5559819", "0.55502915", "0.5450604", "0.5450502", "0.54454786", "0.5442353", "0.5431608", "0.54228973", "0.5422493", "0.5417751", "0.54066396", "0.54013014", "0.53860253", "0.5373204", "0.5373204", "0.5373204", "0.5373204", "0.53708285", "0.53496915", "0.53422195", "0.5342209", "0.53419924", "0.53324395", "0.53304935", "0.5289327", "0.5285001", "0.52811", "0.5255197", "0.52509105", "0.52447164", "0.52442247", "0.52379334", "0.52357906", "0.52357906", "0.52357906", "0.5226608", "0.52258205", "0.52213454", "0.5215413", "0.521198", "0.5211059", "0.5211059", "0.5207185", "0.52054113", "0.5200633", "0.5200633", "0.5194496", "0.5194496", "0.5194496", "0.5194496", "0.5194496", "0.5191955", "0.5189182", "0.51881784", "0.5186325", "0.51817244", "0.51723766", "0.51673806", "0.5159666", "0.51589775", "0.5154102", "0.51519233", "0.5151427", "0.51463217", "0.5143775", "0.51420414", "0.51381433", "0.5132147", "0.51284194", "0.51186436", "0.5106616", "0.5106616", "0.5106616", "0.5106616" ]
0.0
-1
A cmp function for determining which forward segment to rely on more when computing coordinates.
function compareForwardSlotSegs(seg1, seg2) { // put higher-pressure first return seg2.forwardPressure - seg1.forwardPressure || // put segments that are closer to initial edge first (and favor ones with no coords yet) (seg1.backwardCoord || 0) - (seg2.backwardCoord || 0) || // do normal sorting... compareSlotSegs(seg1, seg2); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function compareForwardSlotSegs(seg1, seg2) {\n // put higher-pressure first\n return seg2.forwardPressure - seg1.forwardPressure ||\n // put segments that are closer to initial edge first (and favor ones with no coords yet)\n (seg1.backwardCoord || 0) - (seg2.backwardCoord || 0) ||\n // do normal sorting...\n compareSegs(seg1, seg2);\n }", "function compareForwardSlotSegs(seg1, seg2) {\n\t// put higher-pressure first\n\treturn seg2.forwardPressure - seg1.forwardPressure ||\n\t\t// put segments that are closer to initial edge first (and favor ones with no coords yet)\n\t\t(seg1.backwardCoord || 0) - (seg2.backwardCoord || 0) ||\n\t\t// do normal sorting...\n\t\tcompareSegs(seg1, seg2);\n}", "compare(point, another) {\n var result = Path.compare(point.path, another.path);\n\n if (result === 0) {\n if (point.offset < another.offset) return -1;\n if (point.offset > another.offset) return 1;\n return 0;\n }\n\n return result;\n }", "compare(point, another) {\n var result = Path.compare(point.path, another.path);\n\n if (result === 0) {\n if (point.offset < another.offset) return -1;\n if (point.offset > another.offset) return 1;\n return 0;\n }\n\n return result;\n }", "sort(first, second) {\n // 1. Find point of divergence of 2 routes\n let firstCurrent = first.next;\n let secondCurrent = second.next;\n while (firstCurrent != null && secondCurrent != null && firstCurrent.direction == secondCurrent.direction) {\n firstCurrent = firstCurrent.next;\n secondCurrent = secondCurrent.next;\n }\n // 2. Compare routes\n // 2.1 Point of divergence has been found\n if (firstCurrent != null && secondCurrent != null) {\n let priority1 = this.getPriority(firstCurrent.prev.direction, firstCurrent.direction);\n let priority2 = this.getPriority(secondCurrent.prev.direction, secondCurrent.direction);\n return this.compare(priority1, priority2);\n }\n // 2.2 Routes do not have point of divergence and they both finished in the same point\n if (firstCurrent == null && secondCurrent == null) {\n return 0;\n }\n // 2.3 Routes do not have point of divergence and but first one finished earlier than second one\n if (secondCurrent != null) {\n let priority = this.walkThroughRoute(second);\n // The idea here is that the route that ended earlier should be less or greater (depending on the sign)\n // than the route that still continues.\n // Why the ended route is less or greater? Because it should be placed closer to the edge during rendering\n return Math.sign(priority);\n }\n // 2.4 Routes do not have point of divergence and but second one finished earlier than first one\n if (firstCurrent != null) {\n let priority = this.walkThroughRoute(first);\n // The idea here same as above BUT we have to take into account that now second route is less or greater\n // than the first one, so sign should be reverted in order to avoid descending sorting\n return Math.sign(priority) * -1;\n }\n return 0;\n }", "comparePoints (a, b) {\n let comparison = 0\n\n if (a.points > b.points) {\n comparison = -1\n } else if (b.points > a.points) {\n comparison = 1\n }\n return comparison\n }", "function lexoComp(p1, p2){\n if(p1.x < p2.x){\n return -1;\n }else if(p1.x == p2.x && p1.y < p2.y){\n return -1;\n }\n return 1;\n}", "function pa(a,b){\n// put higher-pressure first\n// put segments that are closer to initial edge first (and favor ones with no coords yet)\n// do normal sorting...\nreturn b.forwardPressure-a.forwardPressure||(a.backwardCoord||0)-(b.backwardCoord||0)||qa(a,b)}", "compare(a, b) {\n if (a.distance < b.distance) {\n return -1;\n }\n if (a.distance > b.distance) {\n return 1;\n }\n return 0;\n }", "function tspoComp(a, b) {\n\t\t//MUST FACTOR IN THE PRIORITY OF THE MOVES!!!\n\t\tif (a.prior > b.prior)\n\t\t\treturn -1;\n\t\tif (a.prior < b.prior)\n\t\t\treturn 1;\n\t\tif (a.speedDiff > b.speedDiff)\n\t\t\treturn -1;\n\t\treturn 1;\n\t}", "function compareP(a, b) {\n if (a.Points > b.Points)\n return -1;\n if (a.Points < b.Points)\n return 1;\n\n if (a.GD < b.GD)\n return -1;\n if (a.GD > b.GD)\n return 1;\n if (a.GF > b.GF)\n return -1;\n if (a.GF < b.GF)\n return 1;\n return 0;\n }", "function compare(a,b){ //condition for sort funtion ***\n var comparison=0;\n const scorea=a.points;\n const scoreb=b.points;\n if(scoreb > scorea){\n comparison=1;\n }else{\n comparison=-1;\n }\n return comparison;\n }", "resolveSegmentSegment(ax1, ay1, ax2, ay2, bx1, by1, bx2, by2) {\n const result = [];\n const isHorizontal1 = ax2 - ax1 > ay2 - ay1;\n const isHorizontal2 = bx2 - bx1 > by2 - by1;\n\n if (isHorizontal1 && isHorizontal2 &&\n by1 === ay1 &&\n ((ax1 <= bx2 && ax1 >= bx1) || (ax2 <= bx2 && ax2 >= bx1) || (bx1 <= ax2 && bx1 >= ax1) || (bx2 <= ax2 && bx2 >= ax1))) {\n\n if (bx1 < ax1) result.push(bx1, by1, ax1, by1);\n if (bx2 > ax2) result.push(ax2, by2, bx2, by2);\n\n } else if (!isHorizontal1 && isHorizontal2 &&\n by1 >= ay1 && by1 < ay2 &&\n ((ax1 <= bx2 && ax1 >= bx1) || (ax2 <= bx2 && ax2 >= bx1) || (bx1 <= ax2 && bx1 >= ax1) || (bx2 <= ax2 && bx2 >= ax1))) {\n\n if (bx1 < ax1) result.push(bx1, by1, ax1, by1);\n if (bx2 > ax2) result.push(ax2 + 1, by2, bx2, by2);\n\n } else if (!isHorizontal1 && !isHorizontal2 &&\n ax1 === bx2 &&\n ((by1 <= ay2 && by1 >= ay1) || (by2 <= ay2 && by2 >= ay1) || (ay1 <= by2 && ay1 >= by1) || (ay2 <= by2 && ay2 >= by1))) {\n\n if (by1 < ay1) result.push(bx1, by1, bx1, ay1);\n if (by2 > ay2) result.push(bx2, ay2, bx2, by2);\n\n } else if (isHorizontal1 && !isHorizontal2 &&\n bx1 >= ax1 && bx1 < ax2 &&\n ((ay2 <= by2 && ay2 >= by1) || (ay1 <= by2 && ay1 >= by1) || (by2 <= ay2 && by2 >= ay1) || (by1 <= ay2 && by1 >= ay1))) {\n\n if (by1 < ay1) result.push(bx1, by1, bx1, ay1);\n if (by2 > ay2) result.push(bx2, ay2 + 1, bx2, by2);\n\n } else { // segments do not intersect\n result.push(bx1, by1, bx2, by2);\n }\n\n return result;\n }", "function byX1(seg1, seg2) {\n return seg1.x1 - seg2.x1;\n }", "function sortByX(pt1, pt2){\n\n if(pt1.coorPt.x < pt2.coorPt.x){\n return -1;\n }else if(pt1.coorPt.x > pt2.coorPt.x){\n return 1;\n }else{\n if(pt1.coorPt.y < pt2.coorPt.y){\n return -1;\n }else if(pt1.coorPt.y > pt2.coorPt.y){\n return 1;\n }else{ return 0 };\n };\n}", "isBefore(point, another) {\n return Point.compare(point, another) === -1;\n }", "isBefore(point, another) {\n return Point.compare(point, another) === -1;\n }", "function byX1(seg1, seg2) {\n return seg1.x1 - seg2.x1;\n }", "function byX1(seg1, seg2) {\n\t return seg1.x1 - seg2.x1;\n\t }", "function compare(a,b) {\n if (a.x < b.x)\n return -1;\n if (a.x > b.x)\n return 1;\n return 0;\n }", "function onSegment (pi, pj, pk) {\n return Math.min(pi[0], pj[0]) <= pk[0] &&\n pk[0] <= Math.max(pi[0], pj[0]) &&\n Math.min(pi[1], pj[1]) <= pk[1] &&\n pk[1] <= Math.max(pi[1], pj[1]);\n}", "function clockwiseSortComparison (center, a, b){\n\n //simple quadrant comparison\n if (a.x - center.x >= 0 && b.x - center.x < 0) return -1; //a right of center, b left of center\n if (a.x - center.x < 0 && b.x - center.x >=0) return 1; //a left of center, b right of center\n if (a.x - center.x === 0 && b.x - center.x === 0){ //if they're on the center line\n if (a.y - center.y >=0 || b.y - center.y >= 0){\n return b.y - a.y;\n }\n return a.y - b.y;\n }\n\n //cross product of the vector between center and a/b\n vectorCP = (a.x - center.x) * (b.y - center.y) - (b.x - center.x) * (a.y - center.y);\n if (vectorCP < 0) return -1;\n if (vectorCP > 0) return 1;\n\n //if they're on the same line from the center, see which is closer\n var d1 = (a.x - center.x) * (a.x - center.x) + (a.y - center.y) * (a.y - center.y);\n var d2 = (b.x - center.x) * (b.x - center.x) + (b.y - center.y) * (b.y - center.y);\n if (d1 > d2) return -1;\n else return 1;\n\n}", "function shapeCompareFunc(a, b) {\n if (a.zlevel === b.zlevel) {\n if (a.z === b.z) {\n // if (a.z2 === b.z2) {\n // // FIXME Slow has renderidx compare\n // // http://stackoverflow.com/questions/20883421/sorting-in-javascript-should-every-compare-function-have-a-return-0-statement\n // // https://github.com/v8/v8/blob/47cce544a31ed5577ffe2963f67acb4144ee0232/src/js/array.js#L1012\n // return a.__renderidx - b.__renderidx;\n // }\n return a.z2 - b.z2;\n }\n\n return a.z - b.z;\n }\n\n return a.zlevel - b.zlevel;\n}", "function shapeCompareFunc(a, b) {\n if (a.zlevel === b.zlevel) {\n if (a.z === b.z) {\n // if (a.z2 === b.z2) {\n // // FIXME Slow has renderidx compare\n // // http://stackoverflow.com/questions/20883421/sorting-in-javascript-should-every-compare-function-have-a-return-0-statement\n // // https://github.com/v8/v8/blob/47cce544a31ed5577ffe2963f67acb4144ee0232/src/js/array.js#L1012\n // return a.__renderidx - b.__renderidx;\n // }\n return a.z2 - b.z2;\n }\n\n return a.z - b.z;\n }\n\n return a.zlevel - b.zlevel;\n}", "function shapeCompareFunc(a, b) {\n if (a.zlevel === b.zlevel) {\n if (a.z === b.z) {\n // if (a.z2 === b.z2) {\n // // FIXME Slow has renderidx compare\n // // http://stackoverflow.com/questions/20883421/sorting-in-javascript-should-every-compare-function-have-a-return-0-statement\n // // https://github.com/v8/v8/blob/47cce544a31ed5577ffe2963f67acb4144ee0232/src/js/array.js#L1012\n // return a.__renderidx - b.__renderidx;\n // }\n return a.z2 - b.z2;\n }\n\n return a.z - b.z;\n }\n\n return a.zlevel - b.zlevel;\n}", "function shapeCompareFunc(a, b) {\n if (a.zlevel === b.zlevel) {\n if (a.z === b.z) {\n // if (a.z2 === b.z2) {\n // // FIXME Slow has renderidx compare\n // // http://stackoverflow.com/questions/20883421/sorting-in-javascript-should-every-compare-function-have-a-return-0-statement\n // // https://github.com/v8/v8/blob/47cce544a31ed5577ffe2963f67acb4144ee0232/src/js/array.js#L1012\n // return a.__renderidx - b.__renderidx;\n // }\n return a.z2 - b.z2;\n }\n\n return a.z - b.z;\n }\n\n return a.zlevel - b.zlevel;\n}", "function shapeCompareFunc(a, b) {\n if (a.zlevel === b.zlevel) {\n if (a.z === b.z) {\n // if (a.z2 === b.z2) {\n // // FIXME Slow has renderidx compare\n // // http://stackoverflow.com/questions/20883421/sorting-in-javascript-should-every-compare-function-have-a-return-0-statement\n // // https://github.com/v8/v8/blob/47cce544a31ed5577ffe2963f67acb4144ee0232/src/js/array.js#L1012\n // return a.__renderidx - b.__renderidx;\n // }\n return a.z2 - b.z2;\n }\n\n return a.z - b.z;\n }\n\n return a.zlevel - b.zlevel;\n}", "function sortByPoint(a, b) {\n\t if (a.y < b.y) {\n\t return a.x - b.x;\n\t } else {\n\t return 1;\n\t }\n\t}", "announceClippedSegmentIntervals(f0, f1, pointA, pointB, announce) {\n let fraction;\n if (f1 < f0)\n return false;\n for (const plane of this._planes) {\n const hA = -plane.evaluatePoint(pointA);\n const hB = -plane.evaluatePoint(pointB);\n fraction = Geometry_1.Geometry.safeDivideFraction(-hA, (hB - hA), 0.0);\n if (fraction === undefined) {\n // LIne parallel to the plane. If positive, it is all OUT\n if (hA > 0.0)\n return false;\n }\n else if (hB > hA) { // STRICTLY moving outward\n if (fraction < f0)\n return false;\n if (fraction < f1)\n f1 = fraction;\n }\n else if (hA > hB) { // STRICTLY moving inward\n if (fraction > f1)\n return false;\n if (fraction > f0)\n f0 = fraction;\n }\n else {\n // Strictly equal evaluations\n if (hA > 0.0)\n return false;\n }\n }\n if (f1 >= f0) {\n if (announce)\n announce(f0, f1);\n return true;\n }\n return false;\n }", "function cmp(a, b) { return a.line - b.line || a.ch - b.ch }", "function cmp(a, b) { return a.line - b.line || a.ch - b.ch }", "function cmp(a, b) { return a.line - b.line || a.ch - b.ch }", "function cmp(a, b) { return a.line - b.line || a.ch - b.ch }", "function cmp(a, b) { return a.line - b.line || a.ch - b.ch }", "function cmp(a, b) { return a.line - b.line || a.ch - b.ch }", "function cmp(a, b) { return a.line - b.line || a.ch - b.ch }", "function cmp(a, b) { return a.line - b.line || a.ch - b.ch }", "function cmp(a, b) { return a.line - b.line || a.ch - b.ch }", "function cmp(a, b) { return a.line - b.line || a.ch - b.ch }", "function cmp(a, b) { return a.line - b.line || a.ch - b.ch }", "function cmp(a, b) { return a.line - b.line || a.ch - b.ch }", "function cmp(a, b) { return a.line - b.line || a.ch - b.ch }", "function cmp(a, b) { return a.line - b.line || a.ch - b.ch }", "function cmp(a, b) { return a.line - b.line || a.ch - b.ch }", "function cmp(a, b) { return a.line - b.line || a.ch - b.ch }", "function cmp(a, b) { return a.line - b.line || a.ch - b.ch }", "function cmp(a, b) { return a.line - b.line || a.ch - b.ch }", "function cmp(a, b) { return a.line - b.line || a.ch - b.ch }", "function cmp(a, b) { return a.line - b.line || a.ch - b.ch }", "function cmp(a, b) { return a.line - b.line || a.ch - b.ch }", "function cmp(a, b) { return a.line - b.line || a.ch - b.ch }", "function cmp(a, b) { return a.line - b.line || a.ch - b.ch }", "function cmp(a, b) { return a.line - b.line || a.ch - b.ch }", "function cmp(a, b) { return a.line - b.line || a.ch - b.ch }", "function cmp(a, b) { return a.line - b.line || a.ch - b.ch }", "function cmp(a, b) { return a.line - b.line || a.ch - b.ch }", "function cmp(a, b) { return a.line - b.line || a.ch - b.ch }", "function cmp(a, b) { return a.line - b.line || a.ch - b.ch }", "function cmp(a, b) { return a.line - b.line || a.ch - b.ch }", "function cmp(a, b) { return a.line - b.line || a.ch - b.ch }", "function cmp(a, b) { return a.line - b.line || a.ch - b.ch }", "function cmp(a, b) { return a.line - b.line || a.ch - b.ch }", "function compareByGeneratedPositionsInflated(mappingA,mappingB){var cmp=mappingA.generatedLine-mappingB.generatedLine;if(cmp!==0){return cmp;}cmp=mappingA.generatedColumn-mappingB.generatedColumn;if(cmp!==0){return cmp;}cmp=strcmp(mappingA.source,mappingB.source);if(cmp!==0){return cmp;}cmp=mappingA.originalLine-mappingB.originalLine;if(cmp!==0){return cmp;}cmp=mappingA.originalColumn-mappingB.originalColumn;if(cmp!==0){return cmp;}return strcmp(mappingA.name,mappingB.name);}", "function compare(a, b) {\n\t\t\tif (a.y === b.y) {\n\t\t\t return (a.x < b.x) ? -1 : 1;\n\t\t\t}\n\t\t\telse {\n\t\t\t return (a.y < b.y) ? -1 : 1;\n\t\t\t}\n\t\t}", "function sortByPoint(a, b) {\n if (a.y < b.y) {\n return a.x - b.x;\n }\n else {\n return 1;\n }\n}", "function compare (a, b) {\n if (parseInt(a.points[0].svImageX) < parseInt(b.points[0].svImageX)) {\n return -1;\n }\n if (parseInt(a.points[0].svImageX) > parseInt(b.points[0].svImageX)) {\n return 1\n }\n return 0\n }", "function compare (a, b) {\n if (parseInt(a.points[0].svImageX) < parseInt(b.points[0].svImageX)) {\n return -1;\n }\n if (parseInt(a.points[0].svImageX) > parseInt(b.points[0].svImageX)) {\n return 1\n }\n return 0\n }", "function orderliness(a) {\n\tlet sum = 0\n\tfor (let i = 0; i < a.length - 1; i++) {\n\t\tlet x = a[i]\n\t\tlet y = a[i + 1]\n\t\tsum += x < y ? 1 : x > y ? -1 : 0\n\t}\n\n\treturn sum / (a.length - 1)\n}", "function _onSegment(A,B,p, tolerance){\n\t\tif(!tolerance){\n\t\t\ttolerance = TOL;\n\t\t}\n\t\t\t\t\n\t\t// vertical line\n\t\tif(_almostEqual(A.x, B.x, tolerance) && _almostEqual(p.x, A.x, tolerance)){\n\t\t\tif(!_almostEqual(p.y, B.y, tolerance) && !_almostEqual(p.y, A.y, tolerance) && p.y < Math.max(B.y, A.y, tolerance) && p.y > Math.min(B.y, A.y, tolerance)){\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\telse{\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\t// horizontal line\n\t\tif(_almostEqual(A.y, B.y, tolerance) && _almostEqual(p.y, A.y, tolerance)){\n\t\t\tif(!_almostEqual(p.x, B.x, tolerance) && !_almostEqual(p.x, A.x, tolerance) && p.x < Math.max(B.x, A.x) && p.x > Math.min(B.x, A.x)){\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\telse{\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\t\t\n\t\t\n\t\t//range check\n\t\tif((p.x < A.x && p.x < B.x) || (p.x > A.x && p.x > B.x) || (p.y < A.y && p.y < B.y) || (p.y > A.y && p.y > B.y)){\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\t\n\t\t// exclude end points\n\t\tif((_almostEqual(p.x, A.x, tolerance) && _almostEqual(p.y, A.y, tolerance)) || (_almostEqual(p.x, B.x, tolerance) && _almostEqual(p.y, B.y, tolerance))){\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\tvar cross = (p.y - A.y) * (B.x - A.x) - (p.x - A.x) * (B.y - A.y);\n\t\t\n\t\tif(Math.abs(cross) > tolerance){\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\tvar dot = (p.x - A.x) * (B.x - A.x) + (p.y - A.y)*(B.y - A.y);\n\t\t\n\t\t\n\t\t\n\t\tif(dot < 0 || _almostEqual(dot, 0, tolerance)){\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\tvar len2 = (B.x - A.x)*(B.x - A.x) + (B.y - A.y)*(B.y - A.y);\n\t\t\n\t\t\n\t\t\n\t\tif(dot > len2 || _almostEqual(dot, len2, tolerance)){\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\treturn true;\n\t}", "function _calDotPriorX(x,y, side) {\r\n var patchSize = WIN_SIZE - 1; // there are two patches: left and right\r\n var indexesX = [];\r\n for (var i = 0; i < patchSize; ++i) {\r\n indexesX[i] = x - patchSize + i; // left positions\r\n indexesX[i+patchSize] = x + i + 1; // right positions\r\n }\r\n \r\n var priority = 0;\r\n for (var i=0; i<indexesX.length; ++i) {\r\n // out of scope: no priority increment\r\n if (indexesX[i] >= 0 && indexesX[i] < GRID_SIZE) {\r\n let pos = getPosition(indexesX[i], y);\r\n if (pos.isBlank()) {\r\n priority++;\r\n } else if (pos.getValue() === side) {\r\n priority += (WIN_SIZE - _distance(x, indexesX[i]));\r\n } else {\r\n // test 1: simple\r\n priority -= (WIN_SIZE - _distance(x, indexesX[i]));\r\n /*\r\n // test 2\r\n if (indexesX[i] == x-1) {\r\n priority = 0; // left neighbor: reset\r\n } else if (indexesX[i] == x+1) {\r\n break; // right neighbor: no increment any more!\r\n } else {\r\n priority -= (WIN_SIZE - _distance(x, indexesX[i]));\r\n }\r\n */\r\n }\r\n }\r\n }\r\n return priority;\r\n }", "minDist1() {\n // The maximum number of moves to the end of phase 1 wrt. the\n // combination flip and slice coordinates only\n let d1 = this.pruning('sliceFlip', N_SLICE1 * this.flip + this.slice);\n // The combination of twist and slice coordinates\n let d2 = this.pruning('sliceTwist', N_SLICE1 * this.twist + this.slice);\n return Math.max(d1, d2);\n }", "function sortByCardinalYMajorXMinor(a, b) {\n var bY = b.bounds[1] * -1,\n aY = a.bounds[1] * -1,\n bX = b.bounds[0],\n aX = a.bounds[0];\n if (aY == bY) return aX - bX;\n else return aY - bY || aX - bX;\n}", "function _calDotPriorS(x,y, side) {\r\n var patchSize = WIN_SIZE - 1; // there are two patches: left-bottom and right-top\r\n var indexesX = [];\r\n var indexesY = [];\r\n for (var i = 0; i < patchSize; ++i) {\r\n indexesX[i] = x - patchSize + i; // left x-axis\r\n indexesY[i] = y + patchSize - i; // bottom y-axis\r\n indexesX[i+patchSize] = x + i + 1; // right x-axis\r\n indexesY[i+patchSize] = y - i - 1; // top y-axis\r\n }\r\n \r\n var priority = 0;\r\n for (var i=0; i<indexesX.length; ++i) {\r\n // out of scope: no priority increment\r\n if (indexesX[i] >= 0 && indexesX[i] < GRID_SIZE\r\n && indexesY[i] >= 0 && indexesY[i] < GRID_SIZE) {\r\n let pos = getPosition(indexesX[i], indexesY[i]);\r\n if (pos.isBlank()) {\r\n priority++;\r\n } else if (pos.getValue() === side) {\r\n // priority += (WIN_SIZE - _distance(y, indexesY[i])); should be same!\r\n priority += (WIN_SIZE - _distance(x, indexesX[i]));\r\n } else {\r\n // test 1\r\n priority -= (WIN_SIZE - _distance(x, indexesX[i]));\r\n /*\r\n // test 2\r\n if (indexesX[i] == x-1) {\r\n priority = 0; // left neighbor: reset\r\n } else if (indexesX[i] == x+1) {\r\n break; // right neighbor: no increment any more!\r\n } else {\r\n priority -= (WIN_SIZE - _distance(x, indexesX[i]));\r\n }\r\n */\r\n }\r\n }\r\n }\r\n return priority;\r\n }", "function sortRegPointsByX(pt1, pt2){\n\n if(pt1[0] < pt2[0]){\n return -1;\n }else if(pt1[0] > pt2[0]){\n return 1;\n }else{\n if(pt1[1] < pt2[1]){\n return -1;\n }else if(pt1[1] > pt2[1]){\n return 1;\n }else{ return 0 };\n };\n}", "function compare(a,b) \n{\n if (a.CPT < b.CPT)\n return 1;\n if (a.CPT > b.CPT)\n return -1;\n return 0;\n}", "function compare(a,b)\n{\n\treturn (a.x - a.y) - (b.x - b.y);\n}", "function _calLinePriorX(x,y, side) {\r\n var patchSize = WIN_SIZE - 1; // there are two patches: left and right\r\n var indexesX = [];\r\n for (var i = 0; i < patchSize; ++i) {\r\n indexesX[i] = x - patchSize + i; // left positions\r\n indexesX[i+patchSize] = x + i + 1; // right positions\r\n }\r\n var min_scan_size = 3; // It seems that 3 is better than 2!\r\n var priority = 0;\r\n for (var scan_size = WIN_SIZE-1; scan_size >= min_scan_size; --scan_size) {\r\n var cnt = 0; // the number of continuous side\r\n for (var i = WIN_SIZE-1-scan_size; i < WIN_SIZE-1+scan_size; ++i) {\r\n // out of scope: no priority increment\r\n if (indexesX[i] >= 0 && indexesX[i] < GRID_SIZE) {\r\n let pos = getPosition(indexesX[i], y);\r\n // only consider positions than have side stones!\r\n if (pos.getValue() === side) {\r\n cnt++;\r\n if (cnt == scan_size) {\r\n // a value > the best dot priority: (5+4+3+2)*8\r\n // best dot priority: 2+3+...+WIN_SIZE = (2+WIN_SIZE)*(WIN_SIZE-1)/2\r\n // totally 8 patches \r\n //return (2+WIN_SIZE)*(WIN_SIZE-1)/2 * 8;\r\n priority = (3+scan_size)*scan_size*4; //(2+scan_size+1)*scan_size/2 * 8;\r\n if (scan_size == WIN_SIZE-1) {\r\n return priority; // return immediately!\r\n }\r\n \r\n // adjustment to distinguish blank or opponent side\r\n var left = i-scan_size;\r\n var right = i+1;\r\n var nBlock = 0; // the number of the other side stones in two ends.\r\n if (left < 0 || indexesX[left] < 0 \r\n || (!getPosition(indexesX[left], y).isBlank()\r\n && getPosition(indexesX[left], y).getValue() != side)) {\r\n priority -= 1;\r\n nBlock++;\r\n }\r\n if (right >= indexesX.length || indexesX[right] >= GRID_SIZE\r\n || (!getPosition(indexesX[right], y).isBlank()\r\n && getPosition(indexesX[right], y).getValue() != side)) {\r\n priority -= 1;\r\n nBlock++;\r\n }\r\n if (nBlock == 2 && scan_size < WIN_SIZE-1) {\r\n priority = 0; // both ends are blocked, and the max length inside < WIN_SIZE, no any priority in this direction!\r\n }\r\n return priority;\r\n }\r\n } else {\r\n cnt = 0; // reset\r\n }\r\n }\r\n }\r\n }\r\n return priority;\r\n }", "connectionPoint(x, y) {\n return (\n x > this.x &&\n x < this.x + this.w &&\n y > this.y &&\n y < this.y + this.h\n );\n }", "function displacement(num){\r\n\twhere=1;\r\n\tfor (var i=0; i<incount; ++i){\r\n\t\tif (startin[i] < num){\r\n\t\t\twhere+=lengthin[i]-1;\r\n\t\t}\r\n\t}\r\n\treturn where;\r\n}", "function sortingFunction(e1, e2) {\n var c = comparePaths(e1[2], e2[2]);\n if(c != 0) return c;\n if(e1.length == 4 && e2.length == 4)\n return e1[3] - e2[3];\n else\n return 0;\n}", "function cmp(a, b) {\n return a.line - b.line || a.ch - b.ch;\n }", "function isLess(i, j){\n displayBuffer.push(['compare', i, j]); // Do not delete this line (for display)\n return parseInt(csvData[i].dist) < parseInt(csvData[j].dist); \n}", "function sortByStartX(a, b) {\n\t\treturn a.start.x - b.start.x;\n\t}", "function heuristic(a, b)\n{\n // Init our Vector object used by threejs\n var positionA = new THREE.Vector3(a.i, 0, a.j);\n var positionB = new THREE.Vector3(b.i, 0, b.j);\n\n return positionA.distanceTo(positionB);\n}", "function oddComparator(home,away,flag){\n if(home >= away){\n if(flag == \"low\"){\n return [\"away\",away];\n }else{\n return [\"home\",home]\n }\n }else{\n if(flag == \"low\"){\n return [\"home\",home]\n }else{\n return [\"away\",away]\n }\n }\n}", "function isLess(i, j) {\n displayBuffer.push(['compare', i, j]); // Do not delete this line (for display)\n console.log(\"isLess - implement me !\");\n // if (csvData[i].dist < csvData[j].dist){\n // return true ;\n // }\n // return false;\n return (csvData[i].dist < csvData[j].dist);\n}", "function compareScoreArray(a, b) {\r\n let i = 0;\r\n while (i < a.length && i < b.length) {\r\n const diff = b[i] - a[i];\r\n // only keep going if diff === 0\r\n if (diff)\r\n return diff;\r\n i++;\r\n }\r\n // if the last subsegment was Static, the shorter segments should be sorted first\r\n // otherwise sort the longest segment first\r\n if (a.length < b.length) {\r\n return a.length === 1 && a[0] === 40 /* Static */ + 40 /* Segment */\r\n ? -1\r\n : 1;\r\n }\r\n else if (a.length > b.length) {\r\n return b.length === 1 && b[0] === 40 /* Static */ + 40 /* Segment */\r\n ? 1\r\n : -1;\r\n }\r\n return 0;\r\n}", "function compareScoreArray(a, b) {\r\n let i = 0;\r\n while (i < a.length && i < b.length) {\r\n const diff = b[i] - a[i];\r\n // only keep going if diff === 0\r\n if (diff)\r\n return diff;\r\n i++;\r\n }\r\n // if the last subsegment was Static, the shorter segments should be sorted first\r\n // otherwise sort the longest segment first\r\n if (a.length < b.length) {\r\n return a.length === 1 && a[0] === 40 /* Static */ + 40 /* Segment */\r\n ? -1\r\n : 1;\r\n }\r\n else if (a.length > b.length) {\r\n return b.length === 1 && b[0] === 40 /* Static */ + 40 /* Segment */\r\n ? 1\r\n : -1;\r\n }\r\n return 0;\r\n}", "function comparer(a, b) {\n var x = b[0],\n y = b[1],\n ob = a.getAttribute(\"id\").split(\"_\"),\n x_ob = Number(ob[0]),\n y_ob = Number(ob[1]),\n calc_x = x - x_ob,\n calc_y = y - y_ob,\n value;\n\n //only four cardinals\n if (calc_y === 0) {\n value = \"east\";\n } else if (calc_x === 0) {\n value = \"south\";\n }\n return value;\n }", "function pointCompare(aRow, bRow, key){\n if(key !== \"points\" && key !== \"custPoints\") return false;\n let cmp = aRow[key] - bRow[key];\n if(cmp !== 0) return cmp;\n return tieBreakerCompare(aRow, bRow);\n}", "function renderSortAux(e1, e2)\n{\n\tif (e1.y <= e2.y && e1.y > e2.y - Math.floor(e1.height * 0.8) && e1.z > e2.z) // if you're standing on top of them, you get drawn second\n\t{\n\t\treturn true;\n\t}\n\telse if (e1.y > e2.y) // if you're standing in front of them, you get drawn second\n\t{\n\t\treturn true;\n\t}\n\telse // otherwise, you're behind them and get drawn first\n\t{\n\t\treturn false;\n\t}\n}", "function pointSort(p1, p2) {\n\t\"use strict\";\n\t if(p1 === upper) {return -1;}\n\t if(p2 === upper) {return 1;}\n\t var m1 = upper.slope(p1);\n\t var m2 = upper.slope(p2);\n\t if(m1 === m2) {\n\t\t return p1.distance(upper) < p2.distance(upper) ? -1 : 1;\n\t }\n\t if(m1 <= 0 && m2 > 0) {return -1;}\n\t if(m1 > 0 && m2 <= 0) {return 1;}\n\t return m1 > m2 ? -1 : 1;\n}", "function compareScoreArray(a, b) {\n let i = 0;\n while (i < a.length && i < b.length) {\n const diff = b[i] - a[i];\n // only keep going if diff === 0\n if (diff)\n return diff;\n i++;\n }\n // if the last subsegment was Static, the shorter segments should be sorted first\n // otherwise sort the longest segment first\n if (a.length < b.length) {\n return a.length === 1 && a[0] === 40 /* Static */ + 40 /* Segment */\n ? -1\n : 1;\n }\n else if (a.length > b.length) {\n return b.length === 1 && b[0] === 40 /* Static */ + 40 /* Segment */\n ? 1\n : -1;\n }\n return 0;\n}", "function onSegment( p, q, r ) {\n\n\treturn q.x <= Math.max( p.x, r.x ) && q.x >= Math.min( p.x, r.x ) && q.y <= Math.max( p.y, r.y ) && q.y >= Math.min( p.y, r.y );\n\n}", "compare(s) {\n if ( s.start < this.start ) {\n return 1;\n } else if ( s.start > this.start ) {\n return -1;\n } else if ( s.end < this.end ) {\n return 1;\n } else if ( s.end > this.end ) {\n return -1;\n }\n return 0;\n }", "function onSegment(p, q, r) {\n return q.x <= Math.max(p.x, r.x) && q.x >= Math.min(p.x, r.x) && q.y <= Math.max(p.y, r.y) && q.y >= Math.min(p.y, r.y);\n}" ]
[ "0.661767", "0.658723", "0.645648", "0.645648", "0.60996675", "0.6083703", "0.60257", "0.59968686", "0.59018517", "0.57887083", "0.5752242", "0.5744045", "0.57433367", "0.5743011", "0.5735109", "0.5687681", "0.5687681", "0.56798077", "0.56597507", "0.5640013", "0.55897987", "0.5588942", "0.55823314", "0.55823314", "0.55823314", "0.55823314", "0.55823314", "0.5562465", "0.5547345", "0.554505", "0.554505", "0.554505", "0.554505", "0.554505", "0.554505", "0.554505", "0.554505", "0.554505", "0.554505", "0.554505", "0.554505", "0.554505", "0.554505", "0.554505", "0.554505", "0.554505", "0.554505", "0.554505", "0.554505", "0.554505", "0.554505", "0.554505", "0.554505", "0.554505", "0.554505", "0.554505", "0.554505", "0.554505", "0.554505", "0.554505", "0.554505", "0.554505", "0.5524825", "0.5519984", "0.55138725", "0.55032396", "0.55032396", "0.5501066", "0.54890084", "0.54867244", "0.5483871", "0.5474463", "0.5430119", "0.54291856", "0.54259825", "0.54229546", "0.54218584", "0.5421351", "0.54173654", "0.54120004", "0.5411353", "0.5408217", "0.54058236", "0.53900295", "0.5384705", "0.5359659", "0.5359411", "0.5359411", "0.53518784", "0.53447413", "0.5344095", "0.5340592", "0.53392136", "0.5335484", "0.53347915", "0.5327107" ]
0.66078544
4
A cmp function for determining which segment should be closer to the initial edge (the left edge on a lefttoright calendar).
function compareSlotSegs(seg1, seg2) { return seg1.start - seg2.start || // earlier start time goes first (seg2.end - seg2.start) - (seg1.end - seg1.start) || // tie? longer-duration goes first (seg1.event.title || '').localeCompare(seg2.event.title); // tie? alphabetically by title }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function compareDaySegments(a, b) {\n\treturn (b.rightCol - b.leftCol) - (a.rightCol - a.leftCol) || // put wider events first\n\t\tb.event.allDay - a.event.allDay || // if tie, put all-day events first (booleans cast to 0/1)\n\t\ta.event.start - b.event.start || // if a tie, sort by event start date\n\t\t(a.event.title || '').localeCompare(b.event.title) // if a tie, sort by event title\n}", "function compareDaySegments(a, b) {\n\treturn (b.rightCol - b.leftCol) - (a.rightCol - a.leftCol) || // put wider events first\n\t\tb.event.allDay - a.event.allDay || // if tie, put all-day events first (booleans cast to 0/1)\n\t\ta.event.start - b.event.start || // if a tie, sort by event start date\n\t\t(a.event.title || '').localeCompare(b.event.title) // if a tie, sort by event title\n}", "function compareDaySegments(a, b) {\n\treturn (b.rightCol - b.leftCol) - (a.rightCol - a.leftCol) || // put wider events first\n\t\tb.event.allDay - a.event.allDay || // if tie, put all-day events first (booleans cast to 0/1)\n\t\ta.event.start - b.event.start || // if a tie, sort by event start date\n\t\t(a.event.title || '').localeCompare(b.event.title) // if a tie, sort by event title\n}", "function compareForwardSlotSegs(seg1, seg2) {\n // put higher-pressure first\n return seg2.forwardPressure - seg1.forwardPressure ||\n // put segments that are closer to initial edge first (and favor ones with no coords yet)\n (seg1.backwardCoord || 0) - (seg2.backwardCoord || 0) ||\n // do normal sorting...\n compareSegs(seg1, seg2);\n }", "function compareForwardSlotSegs(seg1, seg2) {\n\t// put higher-pressure first\n\treturn seg2.forwardPressure - seg1.forwardPressure ||\n\t\t// put segments that are closer to initial edge first (and favor ones with no coords yet)\n\t\t(seg1.backwardCoord || 0) - (seg2.backwardCoord || 0) ||\n\t\t// do normal sorting...\n\t\tcompareSegs(seg1, seg2);\n}", "function compareDaySegments(a, b) {\n\treturn (b.rightCol - b.leftCol) - (a.rightCol - a.leftCol) || // put wider events first\n\t\tb.event.allDay - a.event.allDay || // if tie, put all-day events first (booleans cast to 0/1)\n\t\ta.event.start - b.event.start || // if a tie, sort by event start date\n\t\t(a.event.title || '').localeCompare(b.event.title); // if a tie, sort by event title\n}", "function compareDaySegments(a, b) {\n\treturn (b.rightCol - b.leftCol) - (a.rightCol - a.leftCol) || // put wider events first\n\t\tb.event.allDay - a.event.allDay || // if tie, put all-day events first (booleans cast to 0/1)\n\t\ta.event.start - b.event.start || // if a tie, sort by event start date\n\t\t(a.event.title || '').localeCompare(b.event.title); // if a tie, sort by event title\n}", "function compareForwardSlotSegs(seg1, seg2) {\n\t// put higher-pressure first\n\treturn seg2.forwardPressure - seg1.forwardPressure ||\n\t\t// put segments that are closer to initial edge first (and favor ones with no coords yet)\n\t\t(seg1.backwardCoord || 0) - (seg2.backwardCoord || 0) ||\n\t\t// do normal sorting...\n\t\tcompareSlotSegs(seg1, seg2);\n}", "function compareForwardSlotSegs(seg1, seg2) {\n\t// put higher-pressure first\n\treturn seg2.forwardPressure - seg1.forwardPressure ||\n\t\t// put segments that are closer to initial edge first (and favor ones with no coords yet)\n\t\t(seg1.backwardCoord || 0) - (seg2.backwardCoord || 0) ||\n\t\t// do normal sorting...\n\t\tcompareSlotSegs(seg1, seg2);\n}", "function compareForwardSlotSegs(seg1, seg2) {\n\t// put higher-pressure first\n\treturn seg2.forwardPressure - seg1.forwardPressure ||\n\t\t// put segments that are closer to initial edge first (and favor ones with no coords yet)\n\t\t(seg1.backwardCoord || 0) - (seg2.backwardCoord || 0) ||\n\t\t// do normal sorting...\n\t\tcompareSlotSegs(seg1, seg2);\n}", "function compareForwardSlotSegs(seg1, seg2) {\n\t// put higher-pressure first\n\treturn seg2.forwardPressure - seg1.forwardPressure ||\n\t\t// put segments that are closer to initial edge first (and favor ones with no coords yet)\n\t\t(seg1.backwardCoord || 0) - (seg2.backwardCoord || 0) ||\n\t\t// do normal sorting...\n\t\tcompareSlotSegs(seg1, seg2);\n}", "function compareForwardSlotSegs(seg1, seg2) {\n\t// put higher-pressure first\n\treturn seg2.forwardPressure - seg1.forwardPressure ||\n\t\t// put segments that are closer to initial edge first (and favor ones with no coords yet)\n\t\t(seg1.backwardCoord || 0) - (seg2.backwardCoord || 0) ||\n\t\t// do normal sorting...\n\t\tcompareSlotSegs(seg1, seg2);\n}", "sort(first, second) {\n // 1. Find point of divergence of 2 routes\n let firstCurrent = first.next;\n let secondCurrent = second.next;\n while (firstCurrent != null && secondCurrent != null && firstCurrent.direction == secondCurrent.direction) {\n firstCurrent = firstCurrent.next;\n secondCurrent = secondCurrent.next;\n }\n // 2. Compare routes\n // 2.1 Point of divergence has been found\n if (firstCurrent != null && secondCurrent != null) {\n let priority1 = this.getPriority(firstCurrent.prev.direction, firstCurrent.direction);\n let priority2 = this.getPriority(secondCurrent.prev.direction, secondCurrent.direction);\n return this.compare(priority1, priority2);\n }\n // 2.2 Routes do not have point of divergence and they both finished in the same point\n if (firstCurrent == null && secondCurrent == null) {\n return 0;\n }\n // 2.3 Routes do not have point of divergence and but first one finished earlier than second one\n if (secondCurrent != null) {\n let priority = this.walkThroughRoute(second);\n // The idea here is that the route that ended earlier should be less or greater (depending on the sign)\n // than the route that still continues.\n // Why the ended route is less or greater? Because it should be placed closer to the edge during rendering\n return Math.sign(priority);\n }\n // 2.4 Routes do not have point of divergence and but second one finished earlier than first one\n if (firstCurrent != null) {\n let priority = this.walkThroughRoute(first);\n // The idea here same as above BUT we have to take into account that now second route is less or greater\n // than the first one, so sign should be reverted in order to avoid descending sorting\n return Math.sign(priority) * -1;\n }\n return 0;\n }", "function compareDaySegCols(a, b) {\n return a.leftCol - b.leftCol;\n}", "function compareDaySegCols(a, b) {\n return a.leftCol - b.leftCol;\n}", "function compareDaySegCols(a, b) {\n return a.leftCol - b.leftCol;\n}", "function compareDaySegCols(a, b) {\n return a.leftCol - b.leftCol;\n}", "function compareDaySegCols(a, b) {\n return a.leftCol - b.leftCol;\n}", "compare(point, another) {\n var result = Path.compare(point.path, another.path);\n\n if (result === 0) {\n if (point.offset < another.offset) return -1;\n if (point.offset > another.offset) return 1;\n return 0;\n }\n\n return result;\n }", "compare(point, another) {\n var result = Path.compare(point.path, another.path);\n\n if (result === 0) {\n if (point.offset < another.offset) return -1;\n if (point.offset > another.offset) return 1;\n return 0;\n }\n\n return result;\n }", "function compareDaySegCols(a, b) {\n\treturn a.leftCol - b.leftCol;\n}", "function compareDaySegCols(a, b) {\n\treturn a.leftCol - b.leftCol;\n}", "function compareDaySegCols(a, b) {\n\treturn a.leftCol - b.leftCol;\n}", "function compareDaySegCols(a, b) {\n\treturn a.leftCol - b.leftCol;\n}", "function compareDaySegCols(a, b) {\n\treturn a.leftCol - b.leftCol;\n}", "function compareDaySegCols(a, b) {\n\treturn a.leftCol - b.leftCol;\n}", "function compareDaySegCols(a, b) {\n\treturn a.leftCol - b.leftCol;\n}", "function compareDaySegCols(a, b) {\n\treturn a.leftCol - b.leftCol;\n}", "compare(s) {\n if ( s.start < this.start ) {\n return 1;\n } else if ( s.start > this.start ) {\n return -1;\n } else if ( s.end < this.end ) {\n return 1;\n } else if ( s.end > this.end ) {\n return -1;\n }\n return 0;\n }", "function compareDaySegCols(a, b) {\n return a.leftCol - b.leftCol;\n }", "function compareDaySegCols(a, b) {\n return a.leftCol - b.leftCol;\n }", "function compareDaySegCols(a, b) {\n return a.leftCol - b.leftCol;\n }", "function compareDaySegCols(a, b) {\n return a.leftCol - b.leftCol;\n }", "function compareDaySegCols(a, b) {\n\t\treturn a.leftCol - b.leftCol;\n\t}", "compare(a, b) {\n if (a.distance < b.distance) {\n return -1;\n }\n if (a.distance > b.distance) {\n return 1;\n }\n return 0;\n }", "function compareScoreArray(a, b) {\r\n let i = 0;\r\n while (i < a.length && i < b.length) {\r\n const diff = b[i] - a[i];\r\n // only keep going if diff === 0\r\n if (diff)\r\n return diff;\r\n i++;\r\n }\r\n // if the last subsegment was Static, the shorter segments should be sorted first\r\n // otherwise sort the longest segment first\r\n if (a.length < b.length) {\r\n return a.length === 1 && a[0] === 40 /* Static */ + 40 /* Segment */\r\n ? -1\r\n : 1;\r\n }\r\n else if (a.length > b.length) {\r\n return b.length === 1 && b[0] === 40 /* Static */ + 40 /* Segment */\r\n ? 1\r\n : -1;\r\n }\r\n return 0;\r\n}", "function compareScoreArray(a, b) {\r\n let i = 0;\r\n while (i < a.length && i < b.length) {\r\n const diff = b[i] - a[i];\r\n // only keep going if diff === 0\r\n if (diff)\r\n return diff;\r\n i++;\r\n }\r\n // if the last subsegment was Static, the shorter segments should be sorted first\r\n // otherwise sort the longest segment first\r\n if (a.length < b.length) {\r\n return a.length === 1 && a[0] === 40 /* Static */ + 40 /* Segment */\r\n ? -1\r\n : 1;\r\n }\r\n else if (a.length > b.length) {\r\n return b.length === 1 && b[0] === 40 /* Static */ + 40 /* Segment */\r\n ? 1\r\n : -1;\r\n }\r\n return 0;\r\n}", "function compareScoreArray(a, b) {\n let i = 0;\n while (i < a.length && i < b.length) {\n const diff = b[i] - a[i];\n // only keep going if diff === 0\n if (diff)\n return diff;\n i++;\n }\n // if the last subsegment was Static, the shorter segments should be sorted first\n // otherwise sort the longest segment first\n if (a.length < b.length) {\n return a.length === 1 && a[0] === 40 /* Static */ + 40 /* Segment */\n ? -1\n : 1;\n }\n else if (a.length > b.length) {\n return b.length === 1 && b[0] === 40 /* Static */ + 40 /* Segment */\n ? 1\n : -1;\n }\n return 0;\n}", "function isDaySegCollision(seg,otherSegs){var i;var otherSeg;for(i=0;i<otherSegs.length;i++){otherSeg=otherSegs[i];if(otherSeg.leftCol<=seg.rightCol&&otherSeg.rightCol>=seg.leftCol){return true;}}return false;}// A cmp function for determining the leftmost event", "function sortingFunction(e1, e2) {\n var c = comparePaths(e1[2], e2[2]);\n if(c != 0) return c;\n if(e1.length == 4 && e2.length == 4)\n return e1[3] - e2[3];\n else\n return 0;\n}", "function clockwiseSortComparison (center, a, b){\n\n //simple quadrant comparison\n if (a.x - center.x >= 0 && b.x - center.x < 0) return -1; //a right of center, b left of center\n if (a.x - center.x < 0 && b.x - center.x >=0) return 1; //a left of center, b right of center\n if (a.x - center.x === 0 && b.x - center.x === 0){ //if they're on the center line\n if (a.y - center.y >=0 || b.y - center.y >= 0){\n return b.y - a.y;\n }\n return a.y - b.y;\n }\n\n //cross product of the vector between center and a/b\n vectorCP = (a.x - center.x) * (b.y - center.y) - (b.x - center.x) * (a.y - center.y);\n if (vectorCP < 0) return -1;\n if (vectorCP > 0) return 1;\n\n //if they're on the same line from the center, see which is closer\n var d1 = (a.x - center.x) * (a.x - center.x) + (a.y - center.y) * (a.y - center.y);\n var d2 = (b.x - center.x) * (b.x - center.x) + (b.y - center.y) * (b.y - center.y);\n if (d1 > d2) return -1;\n else return 1;\n\n}", "function comparer(a, b) {\n var x = b[0],\n y = b[1],\n ob = a.getAttribute(\"id\").split(\"_\"),\n x_ob = Number(ob[0]),\n y_ob = Number(ob[1]),\n calc_x = x - x_ob,\n calc_y = y - y_ob,\n value;\n\n //only four cardinals\n if (calc_y === 0) {\n value = \"east\";\n } else if (calc_x === 0) {\n value = \"south\";\n }\n return value;\n }", "function compare(left, right) {\n return left < right ? -1 : left > right ? 1 : 0;\n }", "sortOuterEdges() {\n if (!this.outerEdgesSorted) {\n //this.outerEdges.sort((a, b) => a.compareTo(b));\n // Using this comparator in order to be deterministic\n this.outerEdges.sort((a, b) => {\n const aNode = a.to,\n bNode = b.to;\n\n if (aNode.coordinates[0] - this.coordinates[0] >= 0 && bNode.coordinates[0] - this.coordinates[0] < 0)\n return 1;\n if (aNode.coordinates[0] - this.coordinates[0] < 0 && bNode.coordinates[0] - this.coordinates[0] >= 0)\n return -1;\n\n if (aNode.coordinates[0] - this.coordinates[0] === 0 && bNode.coordinates[0] - this.coordinates[0] === 0) {\n if (aNode.coordinates[1] - this.coordinates[1] >= 0 || bNode.coordinates[1] - this.coordinates[1] >= 0)\n return aNode.coordinates[1] - bNode.coordinates[1];\n return bNode.coordinates[1] - aNode.coordinates[1];\n }\n\n const det = orientationIndex(this.coordinates, aNode.coordinates, bNode.coordinates);\n if (det < 0)\n return 1;\n if (det > 0)\n return -1;\n\n const d1 = Math.pow(aNode.coordinates[0] - this.coordinates[0], 2) + Math.pow(aNode.coordinates[1] - this.coordinates[1], 2),\n d2 = Math.pow(bNode.coordinates[0] - this.coordinates[0], 2) + Math.pow(bNode.coordinates[1] - this.coordinates[1], 2);\n\n return d1 - d2;\n });\n this.outerEdgesSorted = true;\n }\n }", "function compareSegs(seg1, seg2) {\n return seg1.eventStartMS - seg2.eventStartMS || // earlier events go first\n seg2.eventDurationMS - seg1.eventDurationMS || // tie? longer events go first\n seg2.event.allDay - seg1.event.allDay || // tie? put all-day events first (booleans cast to 0/1)\n (seg1.event.title || '').localeCompare(seg2.event.title); // tie? alphabetically by title\n }", "function lexoComp(p1, p2){\n if(p1.x < p2.x){\n return -1;\n }else if(p1.x == p2.x && p1.y < p2.y){\n return -1;\n }\n return 1;\n}", "function compare(left, right) {\n\t return left < right ? -1 : left > right ? 1 : 0;\n\t}", "function compare(left, right) {\n\t return left < right ? -1 : left > right ? 1 : 0;\n\t}", "function compare(left, right) {\n return left < right ? -1 : left > right ? 1 : 0;\n}", "function compare(left, right) {\n return left < right ? -1 : left > right ? 1 : 0;\n}", "function compare(left, right) {\n return left < right ? -1 : left > right ? 1 : 0;\n}", "function compare(left, right) {\n return left < right ? -1 : left > right ? 1 : 0;\n}", "function compare(left, right) {\n return left < right ? -1 : left > right ? 1 : 0;\n}", "function compare(left, right) {\n return left < right ? -1 : left > right ? 1 : 0;\n}", "function compare(left, right) {\n return left < right ? -1 : left > right ? 1 : 0;\n}", "function compare(left, right) {\n return left < right ? -1 : left > right ? 1 : 0;\n}", "function compare(left, right) {\n return left < right ? -1 : left > right ? 1 : 0;\n}", "function compareSegs(seg1, seg2) {\n\treturn seg1.eventStartMS - seg2.eventStartMS || // earlier events go first\n\t\tseg2.eventDurationMS - seg1.eventDurationMS || // tie? longer events go first\n\t\tseg2.event.allDay - seg1.event.allDay || // tie? put all-day events first (booleans cast to 0/1)\n\t\t(seg1.event.title || '').localeCompare(seg2.event.title); // tie? alphabetically by title\n}", "function minCompare(el1, el2) {\n return el1 - el2;\n}", "function compareByInterval(node, otherNode) {\n return node.source.startIdx - otherNode.source.startIdx;\n}", "compare(path, another) {\n var min = Math.min(path.length, another.length);\n\n for (var i = 0; i < min; i++) {\n if (path[i] < another[i]) return -1;\n if (path[i] > another[i]) return 1;\n }\n\n return 0;\n }", "compare(path, another) {\n var min = Math.min(path.length, another.length);\n\n for (var i = 0; i < min; i++) {\n if (path[i] < another[i]) return -1;\n if (path[i] > another[i]) return 1;\n }\n\n return 0;\n }", "function compareByInterval(node, otherNode) {\n return node.source.startIdx - otherNode.source.startIdx;\n}", "function compare(x, y) {\n var a, b,\n xc = x.c,\n yc = y.c,\n i = x.s,\n j = y.s,\n k = x.e,\n l = y.e;\n\n // Either NaN?\n if (!i || !j) return null;\n\n a = xc && !xc[0];\n b = yc && !yc[0];\n\n // Either zero?\n if (a || b) return a ? b ? 0 : -j : i;\n\n // Signs differ?\n if (i != j) return i;\n\n a = i < 0;\n b = k == l;\n\n // Either Infinity?\n if (!xc || !yc) return b ? 0 : !xc ^ a ? 1 : -1;\n\n // Compare exponents.\n if (!b) return k > l ^ a ? 1 : -1;\n\n j = (k = xc.length) < (l = yc.length) ? k : l;\n\n // Compare digit by digit.\n for (i = 0; i < j; i++) if (xc[i] != yc[i]) return xc[i] > yc[i] ^ a ? 1 : -1;\n\n // Compare lengths.\n return k == l ? 0 : k > l ^ a ? 1 : -1;\n }", "lte(other) { return this.cmp(other) <= 0; }", "function numericComparator(left,right){if(left<right){return-1;}else if(left>right){return 1;}else if(left===right){return 0;}else{// one or both are NaN.\nif(isNaN(left)){return isNaN(right)?0:-1;}else{return 1;}}}", "function compare_start(a, b) {\n return a.start - b.start;\n }", "function compare( x, y ) {\r\n\t\t var a, b,\r\n\t\t xc = x.c,\r\n\t\t yc = y.c,\r\n\t\t i = x.s,\r\n\t\t j = y.s,\r\n\t\t k = x.e,\r\n\t\t l = y.e;\r\n\t\t\r\n\t\t // Either NaN?\r\n\t\t if ( !i || !j ) return null;\r\n\t\t\r\n\t\t a = xc && !xc[0];\r\n\t\t b = yc && !yc[0];\r\n\t\t\r\n\t\t // Either zero?\r\n\t\t if ( a || b ) return a ? b ? 0 : -j : i;\r\n\t\t\r\n\t\t // Signs differ?\r\n\t\t if ( i != j ) return i;\r\n\t\t\r\n\t\t a = i < 0;\r\n\t\t b = k == l;\r\n\t\t\r\n\t\t // Either Infinity?\r\n\t\t if ( !xc || !yc ) return b ? 0 : !xc ^ a ? 1 : -1;\r\n\t\t\r\n\t\t // Compare exponents.\r\n\t\t if ( !b ) return k > l ^ a ? 1 : -1;\r\n\t\t\r\n\t\t j = ( k = xc.length ) < ( l = yc.length ) ? k : l;\r\n\t\t\r\n\t\t // Compare digit by digit.\r\n\t\t for ( i = 0; i < j; i++ ) if ( xc[i] != yc[i] ) return xc[i] > yc[i] ^ a ? 1 : -1;\r\n\t\t\r\n\t\t // Compare lengths.\r\n\t\t return k == l ? 0 : k > l ^ a ? 1 : -1;\r\n\t\t }", "function closest(x, L, ileft, iright){\n let leftval = L[ileft],\n rightval = L[iright],\n gap = iright - ileft;\n\n if (leftval == x) return ileft;\n if (rightval == x) return iright;\n\n if (gap == 1) { // two items left\n console.log(\"gap\" + leftval + \" \" + rightval);\n if (Math.abs(rightval - x) > Math.abs(leftval - x)) return ileft;\n return iright;\n }\n\n // closest item is either left, right, or inside of the gap\n let isplit = ileft + Math.floor(gap / 2),\n splitvalL = L[isplit],\n splitvalR = L[isplit+1];\n\n if (x < splitvalL) {\n console.log(\"x<split\" + x + \" \" + L[isplit]);\n return closest(x, L, ileft, isplit);\n }\n if (x > splitvalR) {\n console.log(\"x>split+1\" + x + \" \" + L[isplit+1]);\n return closest(x, L, isplit+1, iright);\n }\n console.log( \"else: \" + (splitvalR - x) + \" \" + isplit);\n return (Math.abs(splitvalR - x) > Math.abs(splitvalL - x)) ? isplit : Math.min(L.length-1,isplit+1);\n }", "eventSorter(a, b) {\n const startA = a.dataStartMs || a.startMs, // dataXX are used if configured with fillTicks\n endA = a.dataEndMs || a.endMs,\n startB = b.dataStartMs || b.startMs,\n endB = b.dataEndMs || b.endMs,\n sameStart = startA === startB;\n\n if (sameStart) {\n if (endA - endB === 0) {\n return a.event.name < b.event.name ? -1 : 1;\n }\n return endA > endB ? -1 : 1;\n }\n\n return startA < startB ? -1 : 1;\n }", "function cmpClosest(a, b, c) {\n var ret = a.line - c.line\n if (ret) { return ret; }\n if (a.ch <= c.ch && c.ch <= b.ch) { return 0; }\n if (Math.abs(a.ch - c.ch) < Math.abs(b.ch - c.ch)) { return a.ch - c.ch; }\n return b.ch - c.ch;\n }", "function compare(x, y) {\n var a,\n b,\n xc = x.c,\n yc = y.c,\n i = x.s,\n j = y.s,\n k = x.e,\n l = y.e;\n\n // Either NaN?\n if (!i || !j) return null;\n\n a = xc && !xc[0];\n b = yc && !yc[0];\n\n // Either zero?\n if (a || b) return a ? b ? 0 : -j : i;\n\n // Signs differ?\n if (i != j) return i;\n\n a = i < 0;\n b = k == l;\n\n // Either Infinity?\n if (!xc || !yc) return b ? 0 : !xc ^ a ? 1 : -1;\n\n // Compare exponents.\n if (!b) return k > l ^ a ? 1 : -1;\n\n j = (k = xc.length) < (l = yc.length) ? k : l;\n\n // Compare digit by digit.\n for (i = 0; i < j; i++) {\n if (xc[i] != yc[i]) return xc[i] > yc[i] ^ a ? 1 : -1;\n } // Compare lengths.\n return k == l ? 0 : k > l ^ a ? 1 : -1;\n }", "function compare(x, y) {\n var a,\n b,\n xc = x.c,\n yc = y.c,\n i = x.s,\n j = y.s,\n k = x.e,\n l = y.e;\n\n // Either NaN?\n if (!i || !j) return null;\n\n a = xc && !xc[0];\n b = yc && !yc[0];\n\n // Either zero?\n if (a || b) return a ? b ? 0 : -j : i;\n\n // Signs differ?\n if (i != j) return i;\n\n a = i < 0;\n b = k == l;\n\n // Either Infinity?\n if (!xc || !yc) return b ? 0 : !xc ^ a ? 1 : -1;\n\n // Compare exponents.\n if (!b) return k > l ^ a ? 1 : -1;\n\n j = (k = xc.length) < (l = yc.length) ? k : l;\n\n // Compare digit by digit.\n for (i = 0; i < j; i++) {\n if (xc[i] != yc[i]) return xc[i] > yc[i] ^ a ? 1 : -1;\n } // Compare lengths.\n return k == l ? 0 : k > l ^ a ? 1 : -1;\n }", "function nodeCompare(n1, n2) {\n return n1.distance < n2.distance ? -1 : n1.distance > n2.distance ? 1 : 0;\n}", "function pa(a,b){\n// put higher-pressure first\n// put segments that are closer to initial edge first (and favor ones with no coords yet)\n// do normal sorting...\nreturn b.forwardPressure-a.forwardPressure||(a.backwardCoord||0)-(b.backwardCoord||0)||qa(a,b)}", "static compare(left, right) {\n if (left instanceof Position) {\n left = left.pos\n }\n if (right instanceof Position) {\n right = right.pos\n }\n return left - right\n for (let i = 0; i < Math.min(left.atoms.length, right.atoms.length); i++) {\n const diff = compareAtoms(left.atoms[i], right.atoms[i]);\n if (diff !== 0) {\n return diff;\n }\n }\n return left.atoms.length - right.atoms.length;\n }", "function compare(x, y) {\n var a, b,\n xc = x.c,\n yc = y.c,\n i = x.s,\n j = y.s,\n k = x.e,\n l = y.e;\n\n // Either NaN?\n if (!i || !j) return null;\n\n a = xc && !xc[0];\n b = yc && !yc[0];\n\n // Either zero?\n if (a || b) return a ? b ? 0 : -j : i;\n\n // Signs differ?\n if (i != j) return i;\n\n a = i < 0;\n b = k == l;\n\n // Either Infinity?\n if (!xc || !yc) return b ? 0 : !xc ^ a ? 1 : -1;\n\n // Compare exponents.\n if (!b) return k > l ^ a ? 1 : -1;\n\n j = (k = xc.length) < (l = yc.length) ? k : l;\n\n // Compare digit by digit.\n for (i = 0; i < j; i++) if (xc[i] != yc[i]) return xc[i] > yc[i] ^ a ? 1 : -1;\n\n // Compare lengths.\n return k == l ? 0 : k > l ^ a ? 1 : -1;\n }", "function compare(x, y) {\n var a, b,\n xc = x.c,\n yc = y.c,\n i = x.s,\n j = y.s,\n k = x.e,\n l = y.e;\n\n // Either NaN?\n if (!i || !j) return null;\n\n a = xc && !xc[0];\n b = yc && !yc[0];\n\n // Either zero?\n if (a || b) return a ? b ? 0 : -j : i;\n\n // Signs differ?\n if (i != j) return i;\n\n a = i < 0;\n b = k == l;\n\n // Either Infinity?\n if (!xc || !yc) return b ? 0 : !xc ^ a ? 1 : -1;\n\n // Compare exponents.\n if (!b) return k > l ^ a ? 1 : -1;\n\n j = (k = xc.length) < (l = yc.length) ? k : l;\n\n // Compare digit by digit.\n for (i = 0; i < j; i++) if (xc[i] != yc[i]) return xc[i] > yc[i] ^ a ? 1 : -1;\n\n // Compare lengths.\n return k == l ? 0 : k > l ^ a ? 1 : -1;\n }", "function compare(x, y) {\n var a, b,\n xc = x.c,\n yc = y.c,\n i = x.s,\n j = y.s,\n k = x.e,\n l = y.e;\n\n // Either NaN?\n if (!i || !j) return null;\n\n a = xc && !xc[0];\n b = yc && !yc[0];\n\n // Either zero?\n if (a || b) return a ? b ? 0 : -j : i;\n\n // Signs differ?\n if (i != j) return i;\n\n a = i < 0;\n b = k == l;\n\n // Either Infinity?\n if (!xc || !yc) return b ? 0 : !xc ^ a ? 1 : -1;\n\n // Compare exponents.\n if (!b) return k > l ^ a ? 1 : -1;\n\n j = (k = xc.length) < (l = yc.length) ? k : l;\n\n // Compare digit by digit.\n for (i = 0; i < j; i++) if (xc[i] != yc[i]) return xc[i] > yc[i] ^ a ? 1 : -1;\n\n // Compare lengths.\n return k == l ? 0 : k > l ^ a ? 1 : -1;\n }", "function compare(x, y) {\n var a, b,\n xc = x.c,\n yc = y.c,\n i = x.s,\n j = y.s,\n k = x.e,\n l = y.e;\n\n // Either NaN?\n if (!i || !j) return null;\n\n a = xc && !xc[0];\n b = yc && !yc[0];\n\n // Either zero?\n if (a || b) return a ? b ? 0 : -j : i;\n\n // Signs differ?\n if (i != j) return i;\n\n a = i < 0;\n b = k == l;\n\n // Either Infinity?\n if (!xc || !yc) return b ? 0 : !xc ^ a ? 1 : -1;\n\n // Compare exponents.\n if (!b) return k > l ^ a ? 1 : -1;\n\n j = (k = xc.length) < (l = yc.length) ? k : l;\n\n // Compare digit by digit.\n for (i = 0; i < j; i++) if (xc[i] != yc[i]) return xc[i] > yc[i] ^ a ? 1 : -1;\n\n // Compare lengths.\n return k == l ? 0 : k > l ^ a ? 1 : -1;\n }", "function compare(x, y) {\n var a, b,\n xc = x.c,\n yc = y.c,\n i = x.s,\n j = y.s,\n k = x.e,\n l = y.e;\n\n // Either NaN?\n if (!i || !j) return null;\n\n a = xc && !xc[0];\n b = yc && !yc[0];\n\n // Either zero?\n if (a || b) return a ? b ? 0 : -j : i;\n\n // Signs differ?\n if (i != j) return i;\n\n a = i < 0;\n b = k == l;\n\n // Either Infinity?\n if (!xc || !yc) return b ? 0 : !xc ^ a ? 1 : -1;\n\n // Compare exponents.\n if (!b) return k > l ^ a ? 1 : -1;\n\n j = (k = xc.length) < (l = yc.length) ? k : l;\n\n // Compare digit by digit.\n for (i = 0; i < j; i++) if (xc[i] != yc[i]) return xc[i] > yc[i] ^ a ? 1 : -1;\n\n // Compare lengths.\n return k == l ? 0 : k > l ^ a ? 1 : -1;\n }", "function compare(x, y) {\n var a, b,\n xc = x.c,\n yc = y.c,\n i = x.s,\n j = y.s,\n k = x.e,\n l = y.e;\n\n // Either NaN?\n if (!i || !j) return null;\n\n a = xc && !xc[0];\n b = yc && !yc[0];\n\n // Either zero?\n if (a || b) return a ? b ? 0 : -j : i;\n\n // Signs differ?\n if (i != j) return i;\n\n a = i < 0;\n b = k == l;\n\n // Either Infinity?\n if (!xc || !yc) return b ? 0 : !xc ^ a ? 1 : -1;\n\n // Compare exponents.\n if (!b) return k > l ^ a ? 1 : -1;\n\n j = (k = xc.length) < (l = yc.length) ? k : l;\n\n // Compare digit by digit.\n for (i = 0; i < j; i++) if (xc[i] != yc[i]) return xc[i] > yc[i] ^ a ? 1 : -1;\n\n // Compare lengths.\n return k == l ? 0 : k > l ^ a ? 1 : -1;\n }", "function compare(x, y) {\n var a, b,\n xc = x.c,\n yc = y.c,\n i = x.s,\n j = y.s,\n k = x.e,\n l = y.e;\n\n // Either NaN?\n if (!i || !j) return null;\n\n a = xc && !xc[0];\n b = yc && !yc[0];\n\n // Either zero?\n if (a || b) return a ? b ? 0 : -j : i;\n\n // Signs differ?\n if (i != j) return i;\n\n a = i < 0;\n b = k == l;\n\n // Either Infinity?\n if (!xc || !yc) return b ? 0 : !xc ^ a ? 1 : -1;\n\n // Compare exponents.\n if (!b) return k > l ^ a ? 1 : -1;\n\n j = (k = xc.length) < (l = yc.length) ? k : l;\n\n // Compare digit by digit.\n for (i = 0; i < j; i++) if (xc[i] != yc[i]) return xc[i] > yc[i] ^ a ? 1 : -1;\n\n // Compare lengths.\n return k == l ? 0 : k > l ^ a ? 1 : -1;\n }", "function compare(x, y) {\n var a, b,\n xc = x.c,\n yc = y.c,\n i = x.s,\n j = y.s,\n k = x.e,\n l = y.e;\n\n // Either NaN?\n if (!i || !j) return null;\n\n a = xc && !xc[0];\n b = yc && !yc[0];\n\n // Either zero?\n if (a || b) return a ? b ? 0 : -j : i;\n\n // Signs differ?\n if (i != j) return i;\n\n a = i < 0;\n b = k == l;\n\n // Either Infinity?\n if (!xc || !yc) return b ? 0 : !xc ^ a ? 1 : -1;\n\n // Compare exponents.\n if (!b) return k > l ^ a ? 1 : -1;\n\n j = (k = xc.length) < (l = yc.length) ? k : l;\n\n // Compare digit by digit.\n for (i = 0; i < j; i++) if (xc[i] != yc[i]) return xc[i] > yc[i] ^ a ? 1 : -1;\n\n // Compare lengths.\n return k == l ? 0 : k > l ^ a ? 1 : -1;\n }", "function compare( x, y ) {\r\n\t var a, b,\r\n\t xc = x.c,\r\n\t yc = y.c,\r\n\t i = x.s,\r\n\t j = y.s,\r\n\t k = x.e,\r\n\t l = y.e;\r\n\r\n\t // Either NaN?\r\n\t if ( !i || !j ) return null;\r\n\r\n\t a = xc && !xc[0];\r\n\t b = yc && !yc[0];\r\n\r\n\t // Either zero?\r\n\t if ( a || b ) return a ? b ? 0 : -j : i;\r\n\r\n\t // Signs differ?\r\n\t if ( i != j ) return i;\r\n\r\n\t a = i < 0;\r\n\t b = k == l;\r\n\r\n\t // Either Infinity?\r\n\t if ( !xc || !yc ) return b ? 0 : !xc ^ a ? 1 : -1;\r\n\r\n\t // Compare exponents.\r\n\t if ( !b ) return k > l ^ a ? 1 : -1;\r\n\r\n\t j = ( k = xc.length ) < ( l = yc.length ) ? k : l;\r\n\r\n\t // Compare digit by digit.\r\n\t for ( i = 0; i < j; i++ ) if ( xc[i] != yc[i] ) return xc[i] > yc[i] ^ a ? 1 : -1;\r\n\r\n\t // Compare lengths.\r\n\t return k == l ? 0 : k > l ^ a ? 1 : -1;\r\n\t }", "function compare(left, right) {\n return right - left;\n}", "function compare(x, y) {\r\n var a, b,\r\n xc = x.c,\r\n yc = y.c,\r\n i = x.s,\r\n j = y.s,\r\n k = x.e,\r\n l = y.e;\r\n\r\n // Either NaN?\r\n if (!i || !j) return null;\r\n\r\n a = xc && !xc[0];\r\n b = yc && !yc[0];\r\n\r\n // Either zero?\r\n if (a || b) return a ? b ? 0 : -j : i;\r\n\r\n // Signs differ?\r\n if (i != j) return i;\r\n\r\n a = i < 0;\r\n b = k == l;\r\n\r\n // Either Infinity?\r\n if (!xc || !yc) return b ? 0 : !xc ^ a ? 1 : -1;\r\n\r\n // Compare exponents.\r\n if (!b) return k > l ^ a ? 1 : -1;\r\n\r\n j = (k = xc.length) < (l = yc.length) ? k : l;\r\n\r\n // Compare digit by digit.\r\n for (i = 0; i < j; i++) if (xc[i] != yc[i]) return xc[i] > yc[i] ^ a ? 1 : -1;\r\n\r\n // Compare lengths.\r\n return k == l ? 0 : k > l ^ a ? 1 : -1;\r\n }", "function compare(x, y) {\r\n var a, b,\r\n xc = x.c,\r\n yc = y.c,\r\n i = x.s,\r\n j = y.s,\r\n k = x.e,\r\n l = y.e;\r\n\r\n // Either NaN?\r\n if (!i || !j) return null;\r\n\r\n a = xc && !xc[0];\r\n b = yc && !yc[0];\r\n\r\n // Either zero?\r\n if (a || b) return a ? b ? 0 : -j : i;\r\n\r\n // Signs differ?\r\n if (i != j) return i;\r\n\r\n a = i < 0;\r\n b = k == l;\r\n\r\n // Either Infinity?\r\n if (!xc || !yc) return b ? 0 : !xc ^ a ? 1 : -1;\r\n\r\n // Compare exponents.\r\n if (!b) return k > l ^ a ? 1 : -1;\r\n\r\n j = (k = xc.length) < (l = yc.length) ? k : l;\r\n\r\n // Compare digit by digit.\r\n for (i = 0; i < j; i++) if (xc[i] != yc[i]) return xc[i] > yc[i] ^ a ? 1 : -1;\r\n\r\n // Compare lengths.\r\n return k == l ? 0 : k > l ^ a ? 1 : -1;\r\n }", "function compare(x, y) {\r\n var a, b,\r\n xc = x.c,\r\n yc = y.c,\r\n i = x.s,\r\n j = y.s,\r\n k = x.e,\r\n l = y.e;\r\n\r\n // Either NaN?\r\n if (!i || !j) return null;\r\n\r\n a = xc && !xc[0];\r\n b = yc && !yc[0];\r\n\r\n // Either zero?\r\n if (a || b) return a ? b ? 0 : -j : i;\r\n\r\n // Signs differ?\r\n if (i != j) return i;\r\n\r\n a = i < 0;\r\n b = k == l;\r\n\r\n // Either Infinity?\r\n if (!xc || !yc) return b ? 0 : !xc ^ a ? 1 : -1;\r\n\r\n // Compare exponents.\r\n if (!b) return k > l ^ a ? 1 : -1;\r\n\r\n j = (k = xc.length) < (l = yc.length) ? k : l;\r\n\r\n // Compare digit by digit.\r\n for (i = 0; i < j; i++) if (xc[i] != yc[i]) return xc[i] > yc[i] ^ a ? 1 : -1;\r\n\r\n // Compare lengths.\r\n return k == l ? 0 : k > l ^ a ? 1 : -1;\r\n }", "function compare(x, y) {\r\n var a, b,\r\n xc = x.c,\r\n yc = y.c,\r\n i = x.s,\r\n j = y.s,\r\n k = x.e,\r\n l = y.e;\r\n\r\n // Either NaN?\r\n if (!i || !j) return null;\r\n\r\n a = xc && !xc[0];\r\n b = yc && !yc[0];\r\n\r\n // Either zero?\r\n if (a || b) return a ? b ? 0 : -j : i;\r\n\r\n // Signs differ?\r\n if (i != j) return i;\r\n\r\n a = i < 0;\r\n b = k == l;\r\n\r\n // Either Infinity?\r\n if (!xc || !yc) return b ? 0 : !xc ^ a ? 1 : -1;\r\n\r\n // Compare exponents.\r\n if (!b) return k > l ^ a ? 1 : -1;\r\n\r\n j = (k = xc.length) < (l = yc.length) ? k : l;\r\n\r\n // Compare digit by digit.\r\n for (i = 0; i < j; i++) if (xc[i] != yc[i]) return xc[i] > yc[i] ^ a ? 1 : -1;\r\n\r\n // Compare lengths.\r\n return k == l ? 0 : k > l ^ a ? 1 : -1;\r\n }", "function compare(x, y) {\r\n var a, b,\r\n xc = x.c,\r\n yc = y.c,\r\n i = x.s,\r\n j = y.s,\r\n k = x.e,\r\n l = y.e;\r\n\r\n // Either NaN?\r\n if (!i || !j) return null;\r\n\r\n a = xc && !xc[0];\r\n b = yc && !yc[0];\r\n\r\n // Either zero?\r\n if (a || b) return a ? b ? 0 : -j : i;\r\n\r\n // Signs differ?\r\n if (i != j) return i;\r\n\r\n a = i < 0;\r\n b = k == l;\r\n\r\n // Either Infinity?\r\n if (!xc || !yc) return b ? 0 : !xc ^ a ? 1 : -1;\r\n\r\n // Compare exponents.\r\n if (!b) return k > l ^ a ? 1 : -1;\r\n\r\n j = (k = xc.length) < (l = yc.length) ? k : l;\r\n\r\n // Compare digit by digit.\r\n for (i = 0; i < j; i++) if (xc[i] != yc[i]) return xc[i] > yc[i] ^ a ? 1 : -1;\r\n\r\n // Compare lengths.\r\n return k == l ? 0 : k > l ^ a ? 1 : -1;\r\n }", "function compare(x, y) {\r\n var a, b,\r\n xc = x.c,\r\n yc = y.c,\r\n i = x.s,\r\n j = y.s,\r\n k = x.e,\r\n l = y.e;\r\n\r\n // Either NaN?\r\n if (!i || !j) return null;\r\n\r\n a = xc && !xc[0];\r\n b = yc && !yc[0];\r\n\r\n // Either zero?\r\n if (a || b) return a ? b ? 0 : -j : i;\r\n\r\n // Signs differ?\r\n if (i != j) return i;\r\n\r\n a = i < 0;\r\n b = k == l;\r\n\r\n // Either Infinity?\r\n if (!xc || !yc) return b ? 0 : !xc ^ a ? 1 : -1;\r\n\r\n // Compare exponents.\r\n if (!b) return k > l ^ a ? 1 : -1;\r\n\r\n j = (k = xc.length) < (l = yc.length) ? k : l;\r\n\r\n // Compare digit by digit.\r\n for (i = 0; i < j; i++) if (xc[i] != yc[i]) return xc[i] > yc[i] ^ a ? 1 : -1;\r\n\r\n // Compare lengths.\r\n return k == l ? 0 : k > l ^ a ? 1 : -1;\r\n }", "function compare(x, y) {\r\n var a, b,\r\n xc = x.c,\r\n yc = y.c,\r\n i = x.s,\r\n j = y.s,\r\n k = x.e,\r\n l = y.e;\r\n\r\n // Either NaN?\r\n if (!i || !j) return null;\r\n\r\n a = xc && !xc[0];\r\n b = yc && !yc[0];\r\n\r\n // Either zero?\r\n if (a || b) return a ? b ? 0 : -j : i;\r\n\r\n // Signs differ?\r\n if (i != j) return i;\r\n\r\n a = i < 0;\r\n b = k == l;\r\n\r\n // Either Infinity?\r\n if (!xc || !yc) return b ? 0 : !xc ^ a ? 1 : -1;\r\n\r\n // Compare exponents.\r\n if (!b) return k > l ^ a ? 1 : -1;\r\n\r\n j = (k = xc.length) < (l = yc.length) ? k : l;\r\n\r\n // Compare digit by digit.\r\n for (i = 0; i < j; i++) if (xc[i] != yc[i]) return xc[i] > yc[i] ^ a ? 1 : -1;\r\n\r\n // Compare lengths.\r\n return k == l ? 0 : k > l ^ a ? 1 : -1;\r\n }", "function compare(x, y) {\r\n var a, b,\r\n xc = x.c,\r\n yc = y.c,\r\n i = x.s,\r\n j = y.s,\r\n k = x.e,\r\n l = y.e;\r\n\r\n // Either NaN?\r\n if (!i || !j) return null;\r\n\r\n a = xc && !xc[0];\r\n b = yc && !yc[0];\r\n\r\n // Either zero?\r\n if (a || b) return a ? b ? 0 : -j : i;\r\n\r\n // Signs differ?\r\n if (i != j) return i;\r\n\r\n a = i < 0;\r\n b = k == l;\r\n\r\n // Either Infinity?\r\n if (!xc || !yc) return b ? 0 : !xc ^ a ? 1 : -1;\r\n\r\n // Compare exponents.\r\n if (!b) return k > l ^ a ? 1 : -1;\r\n\r\n j = (k = xc.length) < (l = yc.length) ? k : l;\r\n\r\n // Compare digit by digit.\r\n for (i = 0; i < j; i++) if (xc[i] != yc[i]) return xc[i] > yc[i] ^ a ? 1 : -1;\r\n\r\n // Compare lengths.\r\n return k == l ? 0 : k > l ^ a ? 1 : -1;\r\n }", "function compare(x, y) {\r\n var a, b,\r\n xc = x.c,\r\n yc = y.c,\r\n i = x.s,\r\n j = y.s,\r\n k = x.e,\r\n l = y.e;\r\n\r\n // Either NaN?\r\n if (!i || !j) return null;\r\n\r\n a = xc && !xc[0];\r\n b = yc && !yc[0];\r\n\r\n // Either zero?\r\n if (a || b) return a ? b ? 0 : -j : i;\r\n\r\n // Signs differ?\r\n if (i != j) return i;\r\n\r\n a = i < 0;\r\n b = k == l;\r\n\r\n // Either Infinity?\r\n if (!xc || !yc) return b ? 0 : !xc ^ a ? 1 : -1;\r\n\r\n // Compare exponents.\r\n if (!b) return k > l ^ a ? 1 : -1;\r\n\r\n j = (k = xc.length) < (l = yc.length) ? k : l;\r\n\r\n // Compare digit by digit.\r\n for (i = 0; i < j; i++) if (xc[i] != yc[i]) return xc[i] > yc[i] ^ a ? 1 : -1;\r\n\r\n // Compare lengths.\r\n return k == l ? 0 : k > l ^ a ? 1 : -1;\r\n }", "function compare(x, y) {\r\n var a, b,\r\n xc = x.c,\r\n yc = y.c,\r\n i = x.s,\r\n j = y.s,\r\n k = x.e,\r\n l = y.e;\r\n\r\n // Either NaN?\r\n if (!i || !j) return null;\r\n\r\n a = xc && !xc[0];\r\n b = yc && !yc[0];\r\n\r\n // Either zero?\r\n if (a || b) return a ? b ? 0 : -j : i;\r\n\r\n // Signs differ?\r\n if (i != j) return i;\r\n\r\n a = i < 0;\r\n b = k == l;\r\n\r\n // Either Infinity?\r\n if (!xc || !yc) return b ? 0 : !xc ^ a ? 1 : -1;\r\n\r\n // Compare exponents.\r\n if (!b) return k > l ^ a ? 1 : -1;\r\n\r\n j = (k = xc.length) < (l = yc.length) ? k : l;\r\n\r\n // Compare digit by digit.\r\n for (i = 0; i < j; i++) if (xc[i] != yc[i]) return xc[i] > yc[i] ^ a ? 1 : -1;\r\n\r\n // Compare lengths.\r\n return k == l ? 0 : k > l ^ a ? 1 : -1;\r\n }" ]
[ "0.64841956", "0.64841956", "0.64841956", "0.64782214", "0.6472519", "0.6469082", "0.6469082", "0.64244586", "0.64244586", "0.64244586", "0.64244586", "0.64244586", "0.62643814", "0.6156284", "0.6156284", "0.6156284", "0.6156284", "0.6156284", "0.613294", "0.613294", "0.6082573", "0.6082573", "0.6082573", "0.6082573", "0.6082573", "0.6082573", "0.6082573", "0.6082573", "0.6031803", "0.6012519", "0.6012519", "0.6012519", "0.6012519", "0.59825194", "0.5979746", "0.59735626", "0.59735626", "0.5949075", "0.5940066", "0.5891858", "0.58607334", "0.5833856", "0.5817345", "0.5792388", "0.5791853", "0.5754006", "0.57221895", "0.57221895", "0.5704776", "0.5704776", "0.5704776", "0.5704776", "0.5704776", "0.5704776", "0.5704776", "0.5704776", "0.5704776", "0.56987417", "0.56927687", "0.56561416", "0.5632396", "0.5632396", "0.56318426", "0.56316745", "0.56303525", "0.56210613", "0.5608012", "0.5597234", "0.5591456", "0.5588706", "0.5576302", "0.5571908", "0.5571908", "0.5565729", "0.556444", "0.5559932", "0.5557212", "0.5557212", "0.5557212", "0.5557212", "0.5557212", "0.5557212", "0.5557212", "0.5557212", "0.5549088", "0.5547623", "0.5547075", "0.5547075", "0.5547075", "0.5547075", "0.5547075", "0.5547075", "0.5547075", "0.5547075", "0.5547075", "0.5547075" ]
0.5702905
61
Event Editable Boolean Calculations
function isEventDraggable(event) { var source = event.source || {}; return firstDefined( event.startEditable, source.startEditable, opt('eventStartEditable'), event.editable, source.editable, opt('editable') ) && !opt('disableDragging'); // deprecated }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "shouldUpdate(e){return!0}", "function fContext(event) {\n if (!event)\n event = getEvent(event);\n var obj = event.srcElement || event.target;\n if (obj.type == \"text\" || obj.type == \"textarea\") {\n obj.IsCheckedOnKd = true;\n return true;\n }\n else\n return false;\n}", "function onInputEvent(){\n let decimal_input = BinaryType.getInputValue();\n\n let binary_obj = new BinaryType(decimal_input);\n BinaryType.setCheckBox(binary_obj.binary);\n}", "function isChecked (buttonFunction, valueAdjust, bNum1){\n let isChecked = buttonFunction.target.checked;\n if(isChecked) {\n registerButton[bNum1].disabled = true;\n value += valueAdjust\n calcTotal();\n } else {\n registerButton[bNum1].disabled = false;\n value -= valueAdjust\n calcTotal();\n }\n}", "function isChecked2 (buttonFunction, valueAdjust){\n let isChecked = buttonFunction.target.checked;\n if(isChecked) {\n value += valueAdjust\n calcTotal();\n } else {\n value -= valueAdjust\n calcTotal();\n }\n}", "function isChecked0 (buttonFunction, valueAdjust){\n let isChecked = buttonFunction.target.checked;\n if(isChecked) {\n value += valueAdjust\n calcTotal();\n } else {\n value -= valueAdjust\n calcTotal();\n }\n}", "_onChange() {\n let checked = this.execute(\"is checked\");\n return this.args.onChange(checked, this);\n }", "function canBtnHdlr() {\n\tvar cells = $(this).closest(\"tr\").find(\"input[data-changed=true]\");\n\tif ( cells.length > 0 ) {\n\t\tcells.each( function () { // Restore the old value\n\t\t\t$(this).val( $(this).attr( \"data-oldv\" ) );\n\t\t\t$(this).attr( \"data-changed\", \"false\" );\n\t\t}); // forEach\n\t}\n\t$(this).closest(\"tr\").find(\"input[type=text]\").prop( \"disabled\", true );\n\tchgUpd2Edit( $(this).siblings(\".updBtn\") );\n}", "function checkBox(e){\n\t\t\t\t$(this).toggleClass(\"on\");\n\n\t\t\t\tif($(this).hasClass(\"stab\")){\n\t\t\t\t\tself.generateExploreResults(false);\n\t\t\t\t}\n\t\t\t}", "function onEdit(e) {\n let range = e.range;\n checkEditedCell(range);\n}", "function handleNumbers(event){\n var clickedNum = event.target.innerHTML;\n\n if (calculated === true && operating === false){\n outPut.innerHTML = \"Press an operator to continue calculating\"\n }\n else if (calculated === false && operating === false ){\n if (num1 === 0){\n num1 = clickedNum;\n } else {\n num1 += clickedNum;\n }\n outPut.innerHTML = num1;\n }\n else if (calculated === false && operating === true ){\n if (num2 === 0){\n num2 = clickedNum;\n } else {\n num2 += clickedNum;\n }\n outPut.innerHTML = num2;\n } else {\n outPut.innerHTML = \"Error. Press '=' to continue, or Clear.\"\n }\n }", "handleCustomLogicChange(event){\n let customLogic = event.detail.value;\n this.customFilterLogic = customLogic;\n this.displayValidateButton = true;\n }", "function fEnable(o) {\n var aSom = o.somExpression;\n if (aSom in vaFldTest) {\n var aVal = vaFldTest[aSom];\n var vVal = aVal.split(\"|\");\n if (o.className == \"field\" && o.ui.oneOfChild.className == \"checkButton\") {\n // checkbox only can do script\n o.validate.scriptTest = vVal[2];\n } else {\n o.validate.nullTest = vVal[0];\n o.validate.formatTest = vVal[1];\n o.validate.scriptTest = vVal[2];\n }\n o.access = vVal[3];\n } else {\n fDisable(o);\n }\n}", "_onChange() {\n let checked = this.execute('is checked');\n return this.attrs.onChange(checked, this);\n }", "clickHandler(event) {\n\t\tconsole.log(event.target);\n\t\tthis.myBool = !this.myBool;\n\t}", "function UseFastEvent()\r\n{\r\n try\r\n {\r\n gb_use_fast = gb_ctrl_chkbox_fast.checked() ? true : false;\t\r\n }\r\n catch(err)\r\n {\r\n DebugLog(err.message.toString());\r\n } \r\n}", "function setOpsVal(event) {\n\t\tlet operatorValue = event.target.value;\n\n\t\toperator = operatorValue;\n\t\tcalDisplay.value = ''\n //this will not display any of the operator signs to the user\n\t}", "function calculatePower(event) {\n let dString = display.toString();\n \n if(!isPowerPressed && lastValue == '^'){\n isPowerPressed = true\n }else if(isPowerPressed){\n display += (dString.charAt(dString.length - 1) == \"^\") ? event.value : \"^\"\n display = eval(\"Math.pow(\" + lastDigitClicked + \",\" + event.value + \")\")\n evaluationString = eval(\"Math.pow(\" + lastDigitClicked + \",\" + event.value + \")\")\n lastDigitClicked = display\n isPowerPressed = false\n return true\n }\n return false\n}", "get newButtonVisible(){\n return this.editMode == true && this.newClock == false ;\n }", "_autoChanged(newValue){this.enabled=newValue}", "setIsEnabled(valueNew){let t=e.ValueConverter.toBoolean(valueNew);null===t&&(t=this.getAttributeDefaultValueInternal(\"IsEnabled\")),t!==this.__isEnabled&&(this.__isEnabled=t,this.__processIsEnabled())}", "handleLogicChange(event){\n let logicType = event.detail.value;\n this.filterType = logicType;\n if(logicType == 'CUSTOM'){\n this.displayCustomField = true;\n this.displayValidateButton = true;\n } else {\n this.displayCustomField = false;\n this.displayValidateButton = true;\n }\n }", "editarFalse1() {\n this.activarPersonal = true;\n }", "function eventHandler(value) {\n if (\n value === \"+\" ||\n value === \"-\" ||\n value === \"*\" ||\n value === \"/\" ||\n value === \"%\" ||\n Number.isInteger(+value) ||\n value === \".\"\n ) {\n display.textContent += value;\n }\n if (value === \"=\" || value === \"Enter\") {\n display.textContent = eval(display.textContent);\n evaluated = true;\n }\n if (value === \"^\") {\n display.textContent += '**';\n }\n if (value === \"Backspace\") {\n display.textContent = display.textContent.slice(0, -1);\n }\n\n if (value === \"AC\") {\n evaluate = false;\n display.textContent = \"\";\n }\n}", "enabledEditMode() {\n\n this.state.inEdit = true;\n var vinput = document.getElementById(\"valueInput\" + this.state.id)\n vinput.disabled = !this.state.inEdit\n\n }", "toggleInput(event) {\n this.openValue = event.target.checked\n this.animate()\n }", "function valueCalled(e) {\n \n // code Clear the display\n if(e.target.value == 'C')\n {\n changeDisplayContent('');\n changeDisplayContent('0');\n resetFlags();\n resultDisplay.textContent = '';\n return;\n }\n\n // for removing the last digit\n if(e.target.value == 'D')\n {\n changeDisplayContent('D');\n return;\n }\n \n // for handling the floating points\n if(e.target.value == '.')\n {\n if(!floatFlag)\n {\n floatFlag = 1;\n changeDisplayContent('.');\n return;\n }\n else \n {\n return;\n }\n }\n\n // if the operator is not '='\n if(e.target.classList.contains('operator') && e.target.value != '=')\n {\n\n // if the last operator was an equal sign\n if(equalFlag)\n {\n currentOperator = e.target.value;\n equalFlag = 0;\n return;\n }\n\n // if num1 is empty then load the entered number in num1 \n // else put the num1flag on and enter it in num2\n if(!num1Flag)\n { \n currentOperator = e.target.value;\n if(checkFloat())\n {\n changeNum1(parseFloat(displayCalc));\n }\n\n else \n {\n changeNum1(parseInt(displayCalc));\n }\n changeDisplayContent('');\n }\n \n else if(!num2Flag)\n {\n if(displayCalc == '')\n {\n currentOperator = e.target.value;\n return;\n }\n\n if(checkFloat())\n {\n changeNum2(parseFloat(displayCalc));\n }\n else \n {\n changeNum2(parseInt(displayCalc));\n }\n \n // console.log('the number was saved in num2 : ' + num2);\n operate();\n changeDisplayContent('');\n changeDisplayContent('result');\n changeNum1(result);\n changeNum2(0);\n num2Flag = 0;\n currentOperator = e.target.value;\n }\n\n return;\n }\n \n // if the operator is '='\n else if(e.target.value == '=')\n {\n\n if(num1Flag && (displayCalc != '0' || displayCalc != '') && currentOperator != '')\n {\n if(checkFloat())\n {\n changeNum2(parseFloat(displayCalc));\n }\n else \n {\n changeNum2(parseInt(displayCalc));\n }\n\n operate();\n changeDisplayContent('');\n changeDisplayContent('result');\n displayCalc = '0';\n changeNum1(result);\n changeNum2(0);\n num2Flag = 0;\n currentOperator = '';\n equalFlag = 1;\n }\n return;\n }\n \n\n // if it is a number then display it on the screen\n if(e.target.classList.contains('number'))\n {\n if(equalFlag)\n {\n changeNum1(0);\n num1Flag = 0;\n equalFlag = 0;\n }\n changeDisplayContent(e.target.value);\n }\n \n}", "function falso(v) {\n\n boton.disabled = false;\n\n boton.addEventListener(\"click\", function () {\n isNotTrue(v);\n\n boton.style.display = \"none\";\n });\n\n}", "function GetItemTrueFalseButton4(){\n var val1 = document.getElementById(\"exampleRadios1\").checked;\n var val2 = document.getElementById(\"exampleRadios2\").checked;\n var returnval;\n if(val1 === true){\n returnval = \"change\";\n }\n else if(val2 === true){\n returnval = \"else\";\n }else{\n returnval = \"N/A\";\n }\n // Validation(returnval); - Validation is currently done on text entries\n return returnval;\n}", "function n(e){return e&&null!=e.applyEdits}", "radiosetter(event){\n console.log(event.target.value)\n switch (event.target.value) {\n case \"TRUE\":\n window.$attend = event.target.value\n break;\n case \"FALSE\":\n window.$attend = event.target.value\n break;\n case \"Public\":\n window.$classi = event.target.value\n break;\n case \"Private\":\n window.$classi = event.target.value\n break;\n case \"Confidential\":\n window.$classi = event.target.value\n break;\n case \"3\":\n window.$prio = event.target.value\n break;\n case \"2\":\n window.$prio = event.target.value\n break;\n case \"1\":\n window.$prio = event.target.value\n break;\n case \"reTRUE\":\n window.$reoccur = true\n break;\n case \"reFALSE\":\n window.$reoccur = false\n break;\n }\n }", "function validEditedCell(range) {\n column = range.getColumn();\n if (column === LOG_RECEIVED_I + 1 && range.isChecked()){\n return true;\n }\n else return false;\n}", "flag(){\n \n if(this.currentState == 'hidden') // allow flag option only if cell is hidden\n this.currentState = 'flagged';\n\n else if(this.currentState == 'flagged') // remove flag from cell\n this.currentState = 'hidden';\n \n }", "function caloryValue(event){\n calory = event.target.value;\n }", "function v(e) {\n // Use the `click` event to detect changes to checkbox and radio inputs.\n // This approach works across all browsers, whereas `change` does not fire\n // until `blur` in IE8.\n var t = e.nodeName;\n return t && \"input\" === t.toLowerCase() && (\"checkbox\" === e.type || \"radio\" === e.type);\n }", "function event_day_status() {\n\tif( $(\"#event_all_day\").is(\":checked\")){\n\t\tblock_hours_event();\n\t} else {\n\t\tunblock_hours_event();\n\t}\n\n\tfunction unblock_hours_event(){\n\t\t$('#event_starts_at_4i').attr('disabled', false);\n\t\t$('#event_starts_at_5i').attr('disabled', false);\n\t\t$('#event_ends_at_4i').attr('disabled', false);\t\t\n\t\t$('#event_ends_at_5i').attr('disabled', false);\n\t}\n\tfunction block_hours_event(){\n\t\t$('#event_starts_at_4i').attr('disabled', true);\n\t\t$('#event_starts_at_5i').attr('disabled', true);\n\t\t$('#event_ends_at_4i').attr('disabled', true);\t\t\n\t\t$('#event_ends_at_5i').attr('disabled', true);\n\t}\n}", "function animate(){\n document.getElementById(\"eY\").value=eulernum;\n document.getElementById(\"TeaeY\").value=TeaeulerY; \n if (document.getElementById(\"reflect\").checked){\n Toggle=1.0\n }\n else if(document.getElementById(\"refraction\").checked){\n Toggle =0.0\n }\n else {\n Toggle =0.5\n }\n}", "function check($event) {\n $event.preventDefault();\n var inputVal = angular.element('#input-1').val();\n if (inputVal) {\n $scope.inputDisabled = true;\n inputVal = parseInt(inputVal);\n if (inputVal === $scope.answer) {\n $scope.scoreboard.up();\n $scope.flag = 1;\n angular.element('.check-btns').addClass('move-disable');\n } else {\n $scope.flag = 0;\n }\n }\n return false;\n }", "function editClicked() {\n edit = true;\n}", "__interactionsAllowed(e){if(this.disabled){return!1}// https://github.com/vaadin/vaadin-checkbox/issues/63\nif(\"a\"===e.target.localName){return!1}return!0}", "__interactionsAllowed(e){if(this.disabled){return!1}// https://github.com/vaadin/vaadin-checkbox/issues/63\nif(\"a\"===e.target.localName){return!1}return!0}", "setShift(flag) {\nreturn this.shiftDown = Boolean(flag);\n}", "function shouldSetButtonEnabled() {\r\n\t//no input should be empty\r\n\tif (document.getElementById('FPF_leftGalaxy') == ''\r\n\t\t\t|| document.getElementById('FPF_rightGalaxy') == ''\r\n\t\t\t|| document.getElementById('FPF_leftSS') == ''\r\n\t\t\t|| document.getElementById('FPF_rightSS') == ''\r\n\t\t\t|| document.getElementById('FPF_closePosition') == ''\r\n\t\t\t|| document.getElementById('FPF_farPosition') == '')\r\n\t\treturn false;\r\n\r\n\t//the left system should be lefter than the right system\r\n\tvar systemDistance = getSystemDistance(document.getElementById('FPF_leftGalaxy').value\r\n\t\t\t\t\t\t\t\t\t\t,document.getElementById('FPF_leftSS').value\r\n\t\t\t\t\t\t\t\t\t\t,document.getElementById('FPF_rightGalaxy').value\r\n\t\t\t\t\t\t\t\t\t\t,document.getElementById('FPF_rightSS').value);\r\n\tif (systemDistance < 0) \r\n\t\treturn false;\r\n\r\n\t// the closest position should be closed to the sun than the further position\r\n\tvar positionDifference = document.getElementById('FPF_farPosition').value - document.getElementById('FPF_closePosition').value;\r\n\tif (positionDifference < 0)\r\n\t\treturn false;\r\n\r\n\treturn true;\r\n}", "function checkBox(e){\n\t\t\t\t$(this).toggleClass(\"on\");\n\t\t\t\t$(this).trigger(\"change\");\n\t\t\t}", "function checkBox(e){\n\t\t\t\t$(this).toggleClass(\"on\");\n\t\t\t\t$(this).trigger(\"change\");\n\t\t\t}", "enterTrueBoolean(ctx) {\n }", "handleChangeText(e, i){\n this.props.updateTrueFalseText(e.target.value, i);\n }", "function equalClickUpdate(){\n // display new value, set equalCLikedPrev to true, and reset variables\n if (equation != ''){\n equation = equation+displayVal;\n displayVal = eval(equation);\n displayValElement.value = displayVal;\n // change input background color if answer is 27\n if (displayVal == \"27\"){\n equal.className='btn-danger';\n }\n equation = '';\n curOperator = '';\n equalClickedPrev = true;\n }\n}", "function isEvent() {\n trigger = 1;\n if (label === eventLabel) {\n eventTrigger = true;\n return true;\n } else {\n eventTrigger = false;\n return false;\n }\n}", "function setNumsVal(e) {\n if (calDisplay.value == '' || calDisplay.value == 0) {\n //setting the number value in the calculator screen\n //if the calscreen vaule is an empty string OR 0 (meaning as long as one of these are true)\n //then do this v\n calDisplay.value = e.target.value\n //target the calculator screen and now show the number button the user click's object value in the screen\n } else {\n //if EITHER of the conditions are true then do this v\n calDisplay.value = calDisplay.value + e.target.value;\n //target the calculator screen and show the what is already there plus the new number button the user clicked\n }\n}", "update(ui) {\n const enable_if = (name, condition) => {\n const element = this.element.querySelector(`.action[data-name=\"${name}\"]`);\n element.disabled = !condition;\n };\n\n enable_if(\"Undo\", ui.history.present !== 0);\n enable_if(\"Redo\", ui.history.present < ui.history.actions.length);\n enable_if(\"Select all\", ui.selection.size < ui.quiver.all_cells().length);\n enable_if(\"Deselect all\", ui.selection.size > 0);\n enable_if(\"Delete\", ui.selection.size > 0);\n enable_if(\"Centre view\", ui.quiver.cells.length > 0 && ui.quiver.cells[0].size > 0);\n enable_if(\"Zoom in\", ui.scale < 1);\n enable_if(\"Zoom out\", ui.scale > -2.5);\n enable_if(\"Reset zoom\", ui.scale !== 0);\n }", "get boolValue() {}", "canEditCell(event) {\n if (event.value == undefined) {\n this.setState({ openNoScheduleWarning: true });\n return;\n }\n }", "function evaluate(event) {\n if (prevOperand.length == 0 || isLastInputOperation) return;\n\n const currOperand = display.innerHTML;\n const result = operate(operation,\n Number(prevOperand),\n Number(currOperand));\n\n // div by zero\n let displayText = result;\n if (result === null) {\n displayText = '';\n }\n\n // overflow\n if (result > MAX_VALUE) {\n console.log(result);\n displayText = OVERFLOW;\n }\n\n isFloat = isInt(result)? false : true;\n display.innerHTML = `${displayText}`;\n resetOperation();\n prevOperand = '';\n isResult = true;\n}", "doEditMode() {\n\n }", "function editEvent(){\n\t\n}", "function Test_Event( plcName, tagName, oldValue, newValue ){\r\n\t//console.log(\"Test_Event_Running\")\r\n\r\n\tif ( plcName == \"cushions\" ) {\r\n\r\n\t\tcheckValue = \"False\"\r\n\t\tif ( getTagValue( \"cushions\", \"KK.3\" ) === \"False\" ) {checkValue = \"True\"}\r\n\r\n\t\tsetTagValue(\"cushions\", \"KK.3\", checkValue)\r\n\t}\r\n}", "function changeBool(element) {\r\n if (element.undergraduate == 1) {\r\n element.undergraduate = \"Yes\"\r\n } else {\r\n element.undergraduate = \"No\"\r\n }\r\n }", "function mouseClicked(){\n if (value == false){\n value = true;\n console.log(\"change to true\");\n }\n else if (value == true) {\n value = false;\n console.log(\"change to false\")\n }\n }", "edit(input, date, description){\n if(input.disabled == true || date.disabled == true){\n input.disabled = !input.disabled;\n date.disabled = !date.disabled;\n }\n \telse{\n input.disabled = !input.disabled;\n date.disabled = !date.disabled;\n }\n }", "get _eventTargetProperty() {\n return 'checked';\n }", "function handleOperator(event) {\n if (prevOperand.length > 0) {\n evaluate(event);\n }\n\n if (display.innerHTML === OVERFLOW) {\n return;\n }\n\n resetOperation();\n event.target.classList.add('selected');\n operation = event.target.innerHTML;\n prevOperand = display.innerHTML;\n isLastInputOperation = true;\n isResult = false;\n}", "function correcto() {\n boton.disabled = false;\n\n boton.addEventListener(\"click\", function () {\n isTrue();\n animar();\n boton.style.display = \"none\";\n });\n\n}", "function numberClicked(number) {\r\n status = document.getElementById(\"hidden_status\").value ;\r\n \r\n if (status == 'eq') {\r\n number_new = number;\r\n document.getElementById(\"hidden_text\").value ='';\r\n document.getElementById(\"hidden_status\").value ='ok';\r\n }\r\n else if (status == 'operator') {\r\n number_new = number;\r\n document.getElementById(\"hidden_status\").value ='ok';\r\n } \r\n else{\r\n number_prev = document.getElementById(\"display\").value;\r\n number_new = number_prev + number; \r\n }\r\n \r\n\r\n document.getElementById(\"display\").value = number_new;\r\n\r\n addText(number);\r\n\r\n // decimal point can be only once\r\n if (number == '.') {\r\n disableDecimalPoint(true);\r\n }\r\n\r\n}", "mask() {\n this.expInfo[\"operation\"] = this.operation.value\n this.expInfo[\"value\"] = this.valueSelector.value\n this.paneOb.altFiltersState[this.id].op = this.operation.value\n this.paneOb.altFiltersState[this.id].val = this.valueSelector.value\n /** The list of 1's and 0's corresponding to whether the element at a particular index in the alternate column passes the logical comparison to the filter's specific operation and value choices */\n this.boolMask = this.paneOb.csvData[this.altColSelect.value].map(e => {\n if (this.operation.value == \"==\") {\n if (e == this.valueSelector.value) {\n return 1\n }\n return 0\n }\n if (this.operation.value == \"!=\") {\n if (e != this.valueSelector.value) {\n return 1\n }\n return 0\n }\n if (this.operation.value == \">\") {\n if (e > parseFloat(this.valueSelector.value)) {\n return 1\n }\n return 0\n }\n if (this.operation.value == \"<\") {\n if (e < parseFloat(this.valueSelector.value)) {\n return 1\n }\n return 0\n }\n })\n // emit event on the holder that the altchanged\n let altchange = new Event(\"altchange\")\n this.outerHolder.dispatchEvent(altchange)\n\n }", "onChanged(e){}", "function trigger_event_listeners() {\n\n // Handles/Triggers the Function for\n // changes in the Motions' Radio\n on_change_motions();\n\n // Handles/Triggers the Function for\n // changes in the Camera View's Radio\n on_change_camera_view();\n\n // Handles/Triggers the Function for\n // changes in the XZ Grid's Checkbox\n on_check_xz_grid();\n\n // Handles/Triggers the Function for\n // changes in the Atomic Orbit's Checkbox\n on_check_atomic_orbits();\n \n \n // Handles/Triggers the Function for\n // changes in the Atom's Particle's State #1 Checkbox\n on_check_atom_particle_state_1();\n \n // Handles/Triggers the Function for\n // changes in the Atom's Particle's State #2 Checkbox\n on_check_atom_particle_state_2();\n \n // Handles/Triggers the Function for\n // changes in the Atom's Particle's State #3 Checkbox\n on_check_atom_particle_state_3();\n \n // Handles/Triggers the Function for\n // changes in the Atom's Particle's State #4 Checkbox\n on_check_atom_particle_state_4();\n \n}", "function reactionCheckbox () {\n vArrows = cb1.checked; // Pfeile für Bewegungsrichtung\n bArrows = cb2.checked; // Pfeile für Magnetfeld\n iArrows = cb3.checked; // Pfeile für Induktionsstrom\n if (!on) paint(); // Falls Animation abgeschaltet, neu zeichnen\n }", "function py(e,t){var n=e||[!0,!1],r=K();t===void 0?r=K(n[1]):$t(t)?r=t:r=K(t);var a=function(i){i!==void 0?r.value=i:r.value=r.value===n[1]?n[0]:n[1]};return{state:r,toggle:a}}", "function button1(button) {\n\tflag = \"0\";\n\tif (document.calc.view.value == \"0\") {\n\t\tdocument.calc.view.value = button;\n\t\tif (document.calc.view.value == \".\") {\n\t\t\tdocument.calc.view.value = document.calc.view.value.replace(\".\",\"0.\");\n\t\t\tflag = \"1\";\n\t\t}\n\t} else {\n\t\tif (flag == \"1\") {\n\t\t\tif (button == \".\") {\n\t\t\t\tbutton = \"\";\n\t\t\t}\n\t\t}\n\t\tif (document.calc.view.value.indexOf(\"√(\") != \"-1\") {\n\t\t\tif (document.calc.view.value[document.calc.view.value.indexOf(\"√(\")-1] != \")\") {\n\t\t\t\tdocument.calc.view.value = document.calc.view.value.replace(/\\s/g,\"\");\n\t\t\t\tdocument.calc.view.value = document.calc.view.value.slice(0,document.calc.view.value.indexOf(\"√(\"));\n\t\t\t\tdocument.calc.view.value += button + \"√(\";\n\t\t\t} else {\n\t\t\t\tbutton2(button);\n\t\t\t}\n\t\t} else {\n\t\t\tbutton2(button);\n\t\t}\n\t}\n\tif (button == \".\") {\n\t\tflag = \"1\";\n\t}\n\telse if (isNaN(button)) {\n\t\tflag = \"0\";\n\t}\n}", "static _valueHasChanged(e,t,n=notEqual){return n(e,t)}", "function equate() {\n\n switch (activeOperator) {\n case \"add\":\n calculation += input;\n break;\n case \"subtract\":\n calculation -= input;\n break;\n case \"multiply\":\n calculation = calculation*input;\n break;\n case \"divide\":\n calculation = calculation/input;\n break;\n default:\n calculation = input;\n }\n\n //$(\"#add\").removeClass(\"active-operator\");\n //$(\"#subtract\").removeClass(\"active-operator\");\n //$(\"#multiply\").removeClass(\"active-operator\");\n //$(\"#divide\").removeClass(\"active-operator\");\n\n setScreen(\"calculation\");\n\n}", "function ON_CALCULATOR(){\n\tvar on = document.getElementsByTagName(\"button\");\n\tfor(var i = 0; i < on.length; i++){\n\t\ton[i].disabled = false;\n\t}\n\tdocument.getElementById('screen').value = \"0\";\n\tdocument.getElementById('degree').disabled = false; // to ON the degree radio button\n\tdocument.getElementById('radian').disabled = false; // To ON the radian radio button\n\tdocument.getElementById('Grads').disabled = false; // To ON the gradian radio button\n}", "_enabledChanged(newValue){if(this.annyang){if(newValue){if(this.auto){this.annyang.start({autoRestart:!0,continuous:!0})}else{this.annyang.start()}}else{this.annyang.abort()}}}", "function onButtonClickEvent(btn){\n var value = btn.dataset.value;\n\n if(value == '='){ // Equals sign\n $('#answer-display').value = calculate.getAnswer();\n }\n else{\n var results = calculate.insert(value);\n\n $('#number-display').value += results.value;\n $('#calc-btn-3-1').disabled = !results.decimalEnabled;\n\n // Set cursor to end\n setCursorToEnd($('#number-display'));\n }\n}", "function onOperatorButtonClicked(value)\n {\n //Current value doesn't equal zero and we can do stuff with it\n if(!runningTotal == 0){\n\n switch(value){\n case \"+\":\n //Set operator to clicked button\n currentOperator = \"+\";\n //Set operator press to true\n hasPressedOperator = true;\n //Update the display to reflect the change\n updateDisplay();\n break;\n case \"-\":\n //Set operator to clicked button\n currentOperator = \"-\";\n //Set operator press to true\n hasPressedOperator = true;\n //Update the display to reflect the change\n updateDisplay();\n break;\n case \"x\":\n //Set operator to clicked button\n currentOperator = \"*\";\n //Set operator press to true\n hasPressedOperator = true;\n //Update the display to reflect the change\n updateDisplay();\n break;\n case \"/\":\n //Set operator to clicked button\n currentOperator = \"/\";\n //Set operator press to true\n hasPressedOperator = true;\n //Update the display to reflect the change\n updateDisplay();\n break;\n case \"=\":\n //Check for a number and operator \n if(hasPressedOperand && hasPressedOperator){ \n //Set it so that we know they have just pressed the equals symbol\n hasPressedEquals = true;\n\n //Check currentOperator\n if(currentOperator == \"+\"){\n runningTotal += parseInt(currentOperand);\n //Reset the variables used\n hasPressedOperand = false;\n hasPressedOperator = false;\n currentOperand = 0;\n currentOperator = \"\";\n updateDisplay();\n } else if (currentOperator == \"-\"){\n runningTotal -= parseInt(currentOperand);\n //Reset the variables used\n hasPressedOperand = false;\n hasPressedOperator = false;\n currentOperand = 0;\n currentOperator = \"\";\n updateDisplay();\n } else if (currentOperator == \"*\"){\n runningTotal *= parseInt(currentOperand);\n //Reset the variables used\n hasPressedOperand = false;\n hasPressedOperator = false;\n currentOperand = 0;\n currentOperator = \"\";\n updateDisplay();\n } else if (currentOperator == \"/\"){\n runningTotal /= parseInt(currentOperand);\n //Reset the variables used\n hasPressedOperand = false;\n hasPressedOperator = false;\n currentOperand = 0;\n currentOperator = \"\";\n updateDisplay();\n } else {\n // runningTotal /= parseInt(currentOperand);\n }\n } else {\n\n }\n // -------\n }\n }\n }", "function onEqualsPress(event) {\n\t\t \n\tvar result = eval(currentInput);\n\n\t$(\".display\").val(result);\n\n\tcurrentInput = result;\n\n}", "validatePredicate(e){\n let val = e.target.value;\n console.log(val);\n }", "function setOperatorText() {\n if (choice === 'add') {\n $('#operator').text('+');\n } else if (choice === 'subtract') {\n $('#operator').text('-');\n } else if (choice === 'multiply') {\n $('#operator').text('*');\n } else {\n return false;\n }\n }", "function reaction() {\n input(); // Aceptar valores ingresados ​​(posiblemente corregidos)\n calculation(); // cálculos\n}", "function defineBooleanAttribute(key,handler){var attr=$attrs.$normalize('md-'+key);if(handler)defineProperty(key,handler);if($attrs.hasOwnProperty(attr))updateValue($attrs[attr]);$attrs.$observe(attr,updateValue);function updateValue(newValue){ctrl[key]=newValue!=='false';}}", "'click .homeReminder'(){\n if (homeReminderBool == null){\n homeReminderBool = true;\n } else {\n homeReminderBool = !homeReminderBool;\n }\n }", "function operation(e) {\n if (!equalPressed) {\n // is equal is not pressed, every time operant is pressed, do calculation\n calculate();\n }\n equalPressed = false;\n // when operant is pressed, save operant (only remembers the operant last pressed)\n operant = e.target.id;\n // record current number on screen to previous\n previous = viewer.textContent;\n // set rePrint to true\n rePrint = true;\n}", "function equals(e) {\n //stores equation to be calculated into the history display\n var display4 = $(\"#display_history3\").val();\n $(\"#display_history4\").val(display4);\n var display3 = $(\"#display_history2\").val();\n $(\"#display_history3\").val(display3);\n var display2 = $(\"#display_history\").val();\n $(\"#display_history2\").val(display2);\n\n $(\"#display_history\").val(display_val);\n\n calculate();\n\n //checks to see if a division of zero has occured, if not proceed as normal\n if (!divid_by_zero) {\n display_val = answer;\n equation_array = [];\n equation_array[0] = display_val.toString();\n }\n update_display();\n equals_just_used = true;\n\n}", "equalsClick(){\n let state = this.state.arithmetic;\n let startOperators = ['/','*'];\n let endOperators = ['+','/','*','-'];\n if(startOperators.includes(state[0]) || endOperators.includes(state[state.length - 1])){\n this.setState({\n answer: \"Invalid Arithmetic\",\n arithmetic: state\n });\n }else{\n let solved = eval(this.state.arithmetic);\n this.setState({\n answer: solved,\n arithmetic: state\n });\n }\n }", "function ans(){\n if(calc.input.value !== \"\"){\n calc.input.value =eval( calc.input.value);\n} else {\n calc.input.value = \"0\";\n} \n end =false; \n}", "handleMinY(event) {\n this.setState({minY: event.target.value, enableY1: true},(response)=>{\n this.checkEnableSave()\n })\n if(event.target.value.length < 1){\n this.setState({enableY1 : false},(response)=>{\n this.checkEnableSave()\n })\n }\n }", "processCalc(key)\n\t{\n\t\t// Verificamos si es un numero\n\t\tlet bool = /\\d/.test(String.fromCharCode(key));\n\t\tif(bool){\n\t\t\tthis.calc(); // Realizamos los calculos\n\t\t\treturn true;\n\t\t}\n\t}", "function toggleBit(e) {\n if (e.text() === \"0\") { e.text(1); }\n else { e.text(0); }\n}", "function operatorFunction(e) {\n if(result != \"\") {\n expression = result;\n document.querySelector('#expression').innerHTML = expression;\n document.querySelector('#result').innerHTML = \"\";\n }\n expression += e.target.value;\n document.querySelector('#expression').innerHTML = expression;\n}", "function evalBoolVal(val) {\n Log.GenMsg(`Evaluating single boolVal '${val}'...`);\n let addr = memManager.getFalseVal();\n if (val === \"true\") {\n //Store \"00\" in X and compare with defualt \"00\" in memory\n byteCode.push(\"A2\", \"00\", \"EC\", addr[0], addr[1]);\n }\n if (val === \"false\") {\n //Store \"01\" in X and compare with defualt \"00\" in memory\n byteCode.push(\"A2\", \"01\", \"EC\", addr[0], addr[1]);\n }\n }", "function operatorClicked(operator) {\r\n display_number = document.getElementById(\"display\").value;\r\n backup_number = document.getElementById(\"hidden_number\").value;\r\n backup_operator = document.getElementById(\"hidden_operator\").value;\r\n disableDecimalPoint(false);\r\n disableNumbers(false);\r\n\r\n addText(operator);\r\n\r\n // multiple pressing of operators without pressing =\r\n if (backup_operator != '' \r\n && backup_number != '' \r\n && display_number != '' \r\n && display_number != backup_number) {\r\n calculateResult();\r\n display_number = document.getElementById(\"display\").value;\r\n backup_number = document.getElementById(\"hidden_number\").value;\r\n backup_operator = document.getElementById(\"hidden_operator\").value;\r\n\r\n document.getElementById(\"hidden_operator\").value = operator;\r\n document.getElementById(\"hidden_number\").value = display_number;\r\n //document.getElementById(\"display\").value = '';\r\n document.getElementById(\"hidden_status\").value ='operator';\r\n disableDecimalPoint(false);\r\n disableNumbers(false);\r\n }\r\n\r\n\r\n // some value is displayed\r\n else if (display_number != '') {\r\n document.getElementById(\"hidden_operator\").value = operator;\r\n document.getElementById(\"hidden_number\").value = display_number;\r\n //document.getElementById(\"display\").value = '';\r\n document.getElementById(\"hidden_status\").value ='operator'; \r\n }\r\n\r\n // operator change\r\n else if (display_number == backup_number) {\r\n document.getElementById(\"hidden_operator\").value = operator;\r\n }\r\n\r\n}", "render(){\n\t\tconst { value1, value2, value3, proposedAnswer } = this.state;\n return(\n \t<div>\n \t <div className= 'equation'>\n <p className = 'text'> {`${value1} + ${value2} + ${value3} = ${proposedAnswer}`}</p> \n \t </div>\n \t <button onClick={this.handleAnswer} name=\"true\">\n \t true\n \t </button>\n \t <button name=\"false\" onClick={this.handleAnswer}>\n \t false\n \t </button>\n \t</div>\n\n \t);\n\t}", "function buttonState(inputValue) {\n // necesito una variable para guardar inputValue: DONE (86)\n // necesito una variable para controlar el estado del boton: DONE (87)\n // necesito comprobar el valor de mi variable: DONE (89)\n // si mi variable tiene algo --> cambio el valor del estado del boton: DONE (90)\n\n let bState = false; //Definir el estado inicial del boton --> deshabilitado \n\n if (inputValue) { // Condicional\n bState = true; // Estado final del algoritmo\n } \n}", "isEditable() {\n return !this.isReference();\n }", "function checkBoxesEvents(event) {\r\n\r\n\tswitch(event) {\r\n\t\r\n\t\tcase 'setupDefault':\r\n\t\t(gameSettingsFilter[0]) ? (gameSettingsFilter[0] = false) : (gameSettingsFilter[0] = true);\r\n\t\tsetSetupLabel();\r\n\t\tbreak;\r\n\t\t\r\n\t\t\r\n\t\tcase 'setupCustom':\r\n\t\t(gameSettingsFilter[1]) ? (gameSettingsFilter[1] = false) : (gameSettingsFilter[1] = true);\r\n\t\tsetSetupLabel();\r\n\t\tbreak;\t\r\n\t\t\r\n\t\t\r\n\t\tcase 'controlWheel':\r\n\t\t(gameSettingsFilter[2]) ? (gameSettingsFilter[2] = false):(gameSettingsFilter[2] = true);\r\n\t\tsetControllerLabel();\r\n\t\tbreak;\r\n\t\t\r\n\t\t\r\n\t\tcase 'controlPad':\r\n\t\t(gameSettingsFilter[3]) ? (gameSettingsFilter[3] = false):(gameSettingsFilter[3] = true);\r\n\t\tsetControllerLabel();\r\n\t\tbreak;\r\n\t\t\r\n\t\t\r\n\t\tcase 'controlKeyboard':\r\n\t\t(gameSettingsFilter[4]) ? (gameSettingsFilter[4] = false):(gameSettingsFilter[4] = true);\r\n\t\tsetControllerLabel();\r\n\t\tbreak;\t\r\n\t\t\r\n\t\t\r\n\t\tcase 'cameraInternal':\r\n\t\t(gameSettingsFilter[5]) ? (gameSettingsFilter[5] = false) : (gameSettingsFilter[5] = true);\r\n\t\tsetCameraLabel();\r\n\t\tbreak;\r\n\t\t\r\n\t\t\r\n\t\tcase 'cameraExternal':\r\n\t\t(gameSettingsFilter[6]) ? (gameSettingsFilter[6] = false) : (gameSettingsFilter[6] = true);\r\n\t\tsetCameraLabel();\r\n\t\tbreak;\r\n\t\t\r\n\t\t\r\n\t\tdefault:\r\n\t\talert('error in checkbox event switch');\r\n\t\tbreak;\r\n\t}\r\n\t\r\n\tcheckIfcurrentFilterMatchSave();\r\n}", "function changeMode(e){\n PUZZLE_DIFFICULTY = e.value;\n onImage();\n}", "function buttonHandler(){\n if (expression === 0 || expression === \"0\" || done){\n expression = \"\";\n done = false;\n }\n // get value of clicked button\n var char = $(this).attr(\"value\");\n // add value to expression\n expression += String(char);\n if (expression == \".\"){\n expression = \"0.\";\n }\n drawResult();\n}", "function ColorCheckBox(e) {\n guiData.colorActivated = !guiData.colorActivated;\n p.getBubbleDrawer().useColor(guiData.colorActivated);\n if (guiData.colorActivated)\n {\n $(\"#selectColorValue\").next(\"input\").autocomplete(\"enable\");\n }\n else\n {\n $(\"#selectColorValue\").next(\"input\").autocomplete(\"disable\");\n }\n if (!isPlaying)\n refreshDisplay();\n}", "function trigOp(){\n\tif (!this.classList.contains(\"disabled\")){\n\t\tevaluate();\n\t\tvar inputScreen = document.querySelector('.screen');\n\t\tvar value = inputScreen.innerHTML;\n\t\tif(this.innerHTML.contains(\"sin\")){\n\t\t\tinputScreen.innerHTML = Math.sin(value);\n\t\t}\n\t\telse if(this.innerHTML.contains(\"cos\")){\n\t\t\tinputScreen.innerHTML = Math.cos(value);\n\t\t}\n\t\telse if(this.innerHTML.contains(\"tan\")){\n\t\t\tinputScreen.innerHTML = Math.tan(value);\n\t\t}\n\t\tstartNew = true;\n\t\tif (inputScreen.innerHTML.contains(\".\")){\n\t\t\tdecimalBool = false;\n\t\t\tfactorialBool = false;\n\t\t\tdocument.getElementById(\"deci\").classList.add(\"disabled\");\n\t\t\tdocument.getElementById(\"factorial\").classList.add(\"disabled\");\n\t\t}\n\t}\t\n}", "get valueBoolean () {\r\n\t\treturn this.__valueBoolean;\r\n\t}" ]
[ "0.6374672", "0.5900065", "0.58899015", "0.58024275", "0.57794243", "0.56951785", "0.5663789", "0.5582251", "0.5573124", "0.55498624", "0.554738", "0.55345094", "0.55313414", "0.5530492", "0.55189085", "0.5517357", "0.55056113", "0.5494113", "0.5473155", "0.544875", "0.54486066", "0.54424703", "0.54385924", "0.54384506", "0.5428081", "0.54035515", "0.53990227", "0.53942615", "0.5393179", "0.5392199", "0.5371328", "0.5369342", "0.5361605", "0.53591204", "0.535446", "0.5352386", "0.5347723", "0.5344936", "0.53417605", "0.53413343", "0.53413343", "0.5336585", "0.5332966", "0.53258413", "0.53258413", "0.53016037", "0.52917296", "0.529072", "0.5288426", "0.5272884", "0.52672625", "0.52649426", "0.5258333", "0.52581114", "0.5257608", "0.5256923", "0.52457625", "0.5235853", "0.5235439", "0.5233441", "0.52325374", "0.52291113", "0.52263004", "0.52216667", "0.5199735", "0.5194971", "0.518833", "0.51875734", "0.51854753", "0.5182824", "0.51639307", "0.5157865", "0.51566577", "0.5154026", "0.5151907", "0.5149265", "0.5149015", "0.51489705", "0.5147783", "0.51469254", "0.5146166", "0.51434225", "0.51338804", "0.5132579", "0.5132039", "0.51270217", "0.51228386", "0.5113099", "0.51102024", "0.51097834", "0.5103357", "0.5103122", "0.5101321", "0.5098235", "0.5089576", "0.5083849", "0.50818247", "0.50771207", "0.5070076", "0.50692135", "0.50649184" ]
0.0
-1
returns a Date object for an event's end
function eventEnd(event) { return event.end ? cloneDate(event.end) : defaultEventEnd(event); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "get endTime() {\n let result = null;\n if (this.ended) {\n result = new Date(this.startTime.getTime() + this.duration);\n }\n return result;\n }", "getEndOfDay() {\n const endOfDay = new UniversalDate(this.date);\n endOfDay.date.setUTCHours(23);\n endOfDay.date.setUTCMinutes(59);\n endOfDay.date.setUTCSeconds(59);\n endOfDay.date.setUTCMilliseconds(999);\n\n return endOfDay;\n }", "get endDate() {\n return new Date(this.fiscalYear, this.fiscalMonth, 0, 23, 59, 59, 999);\n }", "function getEndDate(period) {\n const date = new Date(period.startingDay);\n date.setDate(date.getDate() + period.duration);\n return date;\n}", "function getNewEndDate() {\n return getNewStartDate().add(1, 'hours');\n }", "function getEndDate() {\n var endDate;\n if (!scope.endDate) {\n endDate = getMaxDate();\n } else {\n endDate = convertDate(scope.endDate);\n }\n return (endDate != 0) ? endDate : moment();\n }", "endDate() {\n const date =\n this.view === view_types.DAY\n ? this.date\n : this.view === view_types.WEEK\n ? endOfWeek(this.date, { weekStartsOn: this.iso ? 1 : 0 })\n : lastDayOfMonth(this.date);\n\n if (this.view === view_types.MONTH) {\n const daysNeededAtEnd =\n 7 - (this.getDayEval(date) + 1) > 6\n ? 0\n : 7 - this.getDayEval(date) - 1;\n return addDays(date, daysNeededAtEnd);\n }\n\n return date;\n }", "function defineEnd_date() {\n if (newPatient['Start_Date'] !== '') {\n let date = momentWeekDays(\n newPatient['Start_Date'],\n 'YYYY-MM-DD'\n ).businessAdd(14)._d;\n\n let endDate = moment(date).format('YYYY-MM-DD');\n\n setNewPatient({ ...newPatient, End_Date: endDate });\n\n console.log(moment(date).format('YYYY-MM-DD'));\n }\n }", "endOfDay(d) {\n d.setHours(23, 59, 59, 999);\n return d;\n }", "get eventDate() {\n return new Date(this._eventData.event_timestamp);\n }", "get eventDate() {\n return new Date(this._eventData.event_timestamp);\n }", "function getAnimationEndDate() {\n // Set end date once.\n if (undefined === _endDate && _config) {\n // Check if time has been given directly for the animation.\n if (undefined !== _config.animationDeltaToEndTime) {\n // Notice, positive value of end time is towards future.\n // Negative value may be used if end time should be in the past.\n _endDate = new Date();\n if (_config.animationDeltaToEndTime) {\n // Positive delta value given.\n _endDate.setTime(_endDate.getTime() + _config.animationDeltaToEndTime);\n ceilDate(_endDate, getAnimationResolution());\n\n } else {\n // Zero value for delta is a special case because it informs that future data is not wanted.\n // Notice, this floors the value below current time if resolution greater than zero and if\n // current time is not exactly on resolution.\n floorDate(_endDate, getAnimationResolution());\n }\n\n } else {\n // Check if time can be gotten from layer configurations because\n // it was not given for animation directly.\n _endDate = getAnimationEndDateFromLayers();\n // Ceil to the exact resolution time.\n if (undefined !== _endDate) {\n ceilDate(_endDate, getAnimationResolution());\n }\n }\n\n if (undefined === _endDate) {\n throw \"ERROR: Animation configuration missing proper end time!\";\n }\n }\n // Make copy. Then, possible changes do not affect the original object.\n return undefined === _endDate ? undefined : new Date(_endDate.getTime());\n }", "end() {\n return this.timestamp();\n }", "function getEnd(type) {\n\treturn moment().endOf(type).utc().format();\n}", "get end () {\n return moment(`${this.endYear}-03-31`)\n }", "get eventDate() {\n this._logger.debug(\"eventDate[get]\");\n return this._eventDate;\n }", "function getDayFrom(endDay = 7) {\n if (endDay < 0 || endDay > 7) {\n console.error(\n `endDay of ${endDay} is not a valid number. Only numbers including 0 - 7 allowed. Defaulting to 7.`\n )\n endDay = 7\n }\n\n // Will be mutating this value to calculate end.\n const now = new Date()\n\n if (endDay < now.getDay()) {\n endDay = (endDay % 7) + 7\n }\n\n const end = new Date(\n new Date(now.setDate(now.getDate() + (endDay - now.getDay() + 1))).setHours(\n 0,\n 0,\n 0,\n 0\n )\n )\n\n console.log('end', end)\n\n return end\n}", "function getEndDate(theDate)\n{\nvar isLeap= leapYear(theDate.getFullYear());\nif(isLeap)\nreturn calLeapPeriods[theDate.getMonth()];\nelse\nreturn calPeriods[theDate.getMonth()];\n}", "function endOfWeek(date) \n { \n var lastday = date.getDate() - (date.getDay() - 1) + 6; \n return new Date(date.setDate(lastday)); \n }", "function getCurrentEndOfDayTimeStamp() {\n var endOfDayTimeStamp = moment().utc().endOf('day');\n return Number(endOfDayTimeStamp);\n}", "get mmEnd(){\n return moment(this.end)\n }", "function tStart(end){\n\t\t\tvar t = new Date(), f = $scope.event,\n\t\t\tds = f.dateStart, ts = f.timeStart,\n\t\t\tde = f.dateEnd, te = f.timeEnd;\n\t\t\tif(!end){\n\t\t\t\tt.setFullYear(ds.getFullYear(), ds.getMonth(), ds.getDate(), ts.getHours(), ts.getMinutes(), 0, 0);\n\t\t\t\tt.setHours(ts.getHours(), ts.getMinutes(), 0, 0);\n\t\t\t}else{\n\t\t\t\tt.setFullYear(de.getFullYear(), de.getMonth(), de.getDate());\n\t\t\t\tt.setHours(te.getHours(), te.getMinutes(), 0, 0);\n\t\t\t}\n\t\t\treturn roundMinutes(t);\n\t\t}", "function getEndTime(unixTime) {\n let currentDay = moment.unix(unixTime).tz(localTZ);\n currentDay.hour(hoursOfOpEndArr[0]);\n currentDay.minute(hoursOfOpEndArr[1]);\n currentDay.second(0).millisecond(0);\n return currentDay.unix();\n }", "function getDefaultEventEnd(allDay, marker, context) {\n var dateEnv = context.dateEnv, options = context.options;\n var end = marker;\n if (allDay) {\n end = startOfDay(end);\n end = dateEnv.add(end, options.defaultAllDayEventDuration);\n }\n else {\n end = dateEnv.add(end, options.defaultTimedEventDuration);\n }\n return end;\n }", "function weekEnd() {\r\n var today = new Date().getDate();\r\n var month = new Date().getMonth()+1;\r\n var year = new Date().getFullYear();\r\n var now = parseInt((new Date(month+\"/\"+today+\"/\"+year).getTime()-Date.UTC(1970,0,1))/1000);\r\n var diff = 6 - new Date().getDay();\r\n return now + 86400 *diff;\r\n }", "function getEndTime(request){\r\n request.endTime = new Date(request.date);\r\n switch (request.duration){\r\n case \"30 minutes\":\r\n request.endTime.setMinutes(request.date.getMinutes() + 30);\r\n request.endTimeString = request.endTime.toLocaleTimeString();\r\n break;\r\n case \"45 minutes\":\r\n request.endTime.setMinutes(request.date.getMinutes() + 45);\r\n request.endTimeString = request.endTime.toLocaleTimeString();\r\n break;\r\n case \"1 hour\":\r\n request.endTime.setMinutes(request.date.getMinutes() + 60);\r\n request.endTimeString = request.endTime.toLocaleTimeString();\r\n break;\r\n case \"2 hours\":\r\n request.endTime.setMinutes(request.date.getMinutes() + 120);\r\n request.endTimeString = request.endTime.toLocaleTimeString();\r\n break;\r\n }\r\n}", "get eventTimingDate () {\r\n\t\treturn this._eventTimingDate;\r\n\t}", "function setEndDate() {\n // get the `snapshot` of the references data\n date_end_ref.once('value', function(date) {\n date_end = date.val();\n evaluateNewScreens(projectId);\n });\n }", "function getEndTime(layer) {\n var time;\n var times = getLayerTimes(layer);\n if (times && times.length) {\n time = times[times.length - 1];\n // Check if the time value is actually a string that combines\n // begin and end time information into one string instead of\n // providing separate time values for every step.\n if (undefined !== time && null !== time && 1 === times.length) {\n // Make sure time is string before checking syntax.\n time = time + \"\";\n var timeSplits = time.split(\"/\");\n if (timeSplits.length > 1) {\n // End time is the second part of the split.\n time = timeSplits[1];\n }\n }\n // Time is expected to be time format string if it is not a number.\n // Convert time value into Date object.\n time = new Date(isNaN(time) ? time : parseInt(time, TIME_RADIX));\n }\n return time;\n }", "get loopEnd() {\n return new TimeClass(this.context, this._loopEnd, \"i\").toSeconds();\n }", "get eventDate() {\n this._logService.debug(\"gsDiggUserDTO.eventDate[get]\");\n return this._eventDate;\n }", "function endEvent(){}", "dateChange(){\n if (this.date.start.getTime() > this.date.end.getTime())\n this.date.end = this.date.start;\n }", "function mutateEvent(event, newStart, newEnd) {\n\t\tvar oldAllDay = event._allDay;\n\t\tvar oldStart = event._start;\n\t\tvar oldEnd = event._end;\n\t\tvar clearEnd = false;\n\t\tvar newAllDay;\n\t\tvar dateDelta;\n\t\tvar durationDelta;\n\n\t\t// if no new dates were passed in, compare against the event's existing dates\n\t\tif (!newStart && !newEnd) {\n\t\t\tnewStart = event.start;\n\t\t\tnewEnd = event.end;\n\t\t}\n\n\t\t// NOTE: throughout this function, the initial values of `newStart` and `newEnd` are\n\t\t// preserved. These values may be undefined.\n\n\t\t// detect new allDay\n\t\tif (event.allDay != oldAllDay) { // if value has changed, use it\n\t\t\tnewAllDay = event.allDay;\n\t\t}\n\t\telse { // otherwise, see if any of the new dates are allDay\n\t\t\tnewAllDay = !(newStart || newEnd).hasTime();\n\t\t}\n\n\t\t// normalize the new dates based on allDay\n\t\tif (newAllDay) {\n\t\t\tif (newStart) {\n\t\t\t\tnewStart = newStart.clone().stripTime();\n\t\t\t}\n\t\t\tif (newEnd) {\n\t\t\t\tnewEnd = newEnd.clone().stripTime();\n\t\t\t}\n\t\t}\n\n\t\t// compute dateDelta\n\t\tif (newStart) {\n\t\t\tif (newAllDay) {\n\t\t\t\tdateDelta = dayishDiff(newStart, oldStart.clone().stripTime()); // treat oldStart as allDay\n\t\t\t}\n\t\t\telse {\n\t\t\t\tdateDelta = dayishDiff(newStart, oldStart);\n\t\t\t}\n\t\t}\n\n\t\tif (newAllDay != oldAllDay) {\n\t\t\t// if allDay has changed, always throw away the end\n\t\t\tclearEnd = true;\n\t\t}\n\t\telse if (newEnd) {\n\t\t\tdurationDelta = dayishDiff(\n\t\t\t\t// new duration\n\t\t\t\tnewEnd || t.getDefaultEventEnd(newAllDay, newStart || oldStart),\n\t\t\t\tnewStart || oldStart\n\t\t\t).subtract(dayishDiff(\n\t\t\t\t// subtract old duration\n\t\t\t\toldEnd || t.getDefaultEventEnd(oldAllDay, oldStart),\n\t\t\t\toldStart\n\t\t\t));\n\t\t}\n\n\t\treturn mutateEvents(\n\t\t\tclientEvents(event._id), // get events with this ID\n\t\t\tclearEnd,\n\t\t\tnewAllDay,\n\t\t\tdateDelta,\n\t\t\tdurationDelta\n\t\t);\n\t}", "function v(a,b,c){var d,e,f,g,h=a._allDay,i=a._start,j=a._end,k=!1;\n// if no new dates were passed in, compare against the event's existing dates\n// NOTE: throughout this function, the initial values of `newStart` and `newEnd` are\n// preserved. These values may be undefined.\n// detect new allDay\n// if value has changed, use it\n// normalize the new dates based on allDay\n// compute dateDelta\n// if allDay has changed, always throw away the end\n// new duration\n// subtract old duration\n// get events with this ID\nreturn b||c||(b=a.start,c=a.end),d=a.allDay!=h?a.allDay:!(b||c).hasTime(),d&&(b&&(b=b.clone().stripTime()),c&&(c=c.clone().stripTime())),b&&(e=d?o(b,i.clone().stripTime()):o(b,i)),d!=h?k=!0:c&&(f=o(c||x.getDefaultEventEnd(d,b||i),b||i).subtract(o(j||x.getDefaultEventEnd(h,i),i))),g=w(r(a._id),k,d,e,f),{dateDelta:e,durationDelta:f,undo:g}}", "function g(a,b,c,d){var e,f,g,j,k=a._allDay,l=a._start,m=a._end,n=!1;\n// if no new dates were passed in, compare against the event's existing dates\n// NOTE: throughout this function, the initial values of `newStart` and `newEnd` are\n// preserved. These values may be undefined.\n// detect new allDay\n// if value has changed, use it\n// normalize the new dates based on allDay\n// compute dateDelta\n// if allDay has changed, always throw away the end\n// new duration\n// subtract old duration\n// get events with this ID\nreturn c||d||(c=a.start,d=a.end),e=a.allDay!=k?a.allDay:!(c||d).hasTime(),e&&(c&&(c=c.clone().stripTime()),d&&(d=d.clone().stripTime())),c&&(f=e?o(c,l.clone().stripTime()):o(c,l)),e!=k?n=!0:d&&(g=o(d||i.getDefaultEventEnd(e,c||l),c||l).subtract(o(m||i.getDefaultEventEnd(k,l),l))),j=h(i.clientEvents(a._id),n,e,f,g,b),{dateDelta:f,durationDelta:g,undo:j}}", "function setEndDate() {\n // get the `snapshot` of the references data\n date_end_ref.once('value', function(date) {\n date_end = date.val();\n set();\n });\n }", "obtainEnd() {\n return this.endValues[this.mVersion - 1];\n }", "get end() {\n return this._end;\n }", "get end() {\n return this.ranges.length ? this.ranges[ this.ranges.length - 1 ].end : null;\n }", "getEndTime() {\n var lastRunnerInfo = this._runners[this._runnerIds.indexOf(this._lastRunnerId)];\n\n var lastDuration = lastRunnerInfo ? lastRunnerInfo.runner.duration() : 0;\n var lastStartTime = lastRunnerInfo ? lastRunnerInfo.start : 0;\n return lastStartTime + lastDuration;\n }", "get end() {\n return this.endInternal;\n }", "getDate() {\n return this.state.endD;\n }", "function calculateProjectEndDate(project) {\n let endDate = project.startDate + project.slackTime * 24 * 60 * 60 * 1000;\n const projectTasks = tasks.filter(el => el.projectId == project.id);\n projectTasks.forEach(el => {\n endDate = endDate + el.estimatedDays * 24 * 60 * 60 * 1000;\n });\n project.endDate = endDate;\n return project;\n}", "get end() {\n return this.span.end;\n }", "get end() {\n return this[this._end];\n }", "function findCurrentEvent(event) {\n if (event.summary && event.start && event.end) {\n let times\n\n // build date objects for event start / end times\n // regular events use dateTime, all day use date\n if (event.start.dateTime) {\n times = {\n start: new Date(event.start.dateTime),\n end: new Date(event.end.dateTime),\n allDay: false\n }\n } else if (event.start.date) {\n times = {\n start: new Date(event.start.date),\n end: new Date(event.end.date),\n allDay: true\n }\n } else {\n return false\n }\n\n // check to see if event is happening now\n if (\n now.getTime() > times.start.getTime() &&\n now.getTime() < times.end.getTime()\n ) {\n return {\n id: event.id,\n title: event.summary,\n location: event.location || 'Unkown',\n description: event.description || '',\n times: {\n start: moment(times.start).format('h:mma'),\n end: moment(times.end).format('h:mma'),\n allDay: times.allDay\n }\n }\n } else {\n return false\n }\n }\n}", "function getEndLimit ( dt ) {\n\n\t\t\tdt.addMonths(-1);\n\n\t\t\tif ( options.twoCalendars ) {\n\t\t\t\tdt.addMonths(-1);\n\t\t\t}\n\n\t\t\treturn dt;\n\t\t}", "hourEnd(s) {\n return s.dateTimeEnd.getHours();\n }", "get end() { return this._end; }", "function addEvent(events) {\n\n var startDateTime = new Date();\n var endDateTime = new Date() + 60; /* makes workout time always 1 hr */\n\n newEvent['start']['dateTime'] = startDateTime;\n newEvent['end']['dateTime'] = endDateTime;\n\n events.push(newEvent);\n\n // var end = new EventDateTime();\n //end.setDateTime(endDateTime);\n // newEvent.setEnd(end);\n\n/*\n var reminderOverrides = new EventReminder[] {\n new EventReminder().setMethod(\"email\").setMinutes(60 * 12),\n new EventReminder().setMethod(\"popup\").setMinutes(30),\n };*/\n\n /* var reminders = new Event.Reminders()\n reminders.setUseDefault(false)\n reminders.setOverrides(Arrays.asList(reminderOverrides));\n newEvent.setReminders(reminders); */\n\n console.log(\"end of add event\");\n\n}", "function extendDateToNextWorkingDay(end_date) {\n let endDate = moment(end_date, \"YYYY-MM-DD\");\n\n // if end date Friday, Saturday or Sunday, assume back next Monday\n if (endDate.day() === 5 || endDate.day() === 6 || endDate.day() === 0) {\n // if weekend, back next Monday\n endDate.day(1 + 7);\n } else {\n // if Monday-Thusday, assume back the next day\n endDate.add(1, \"day\");\n }\n\n return endDate;\n}", "function getEndDate(startDate, numDays) {\n\n startDate = new Date(startDate);\n const milliSecPerDay = 1000 * 60 * 60 * 24;\n let endMilliSec = startDate.getTime() + milliSecPerDay * parseInt(numDays);\n\n let endDate = new Date(endMilliSec);\n return (endDate);\n}", "function setEndDate() {\n const today = new Date();\n const year = today.getFullYear();\n const month = getTwoDigitMonth(today);\n const day = getTwoDigitDay(today);\n\n // YYYY-MM-DD\n $(\"#search-end\").val(`${year}-${month}-${day}`);\n }", "function mutateEvent(event, newStart, newEnd) {\n\t\tvar oldAllDay = event._allDay;\n\t\tvar oldStart = event._start;\n\t\tvar oldEnd = event._end;\n\t\tvar clearEnd = false;\n\t\tvar newAllDay;\n\t\tvar dateDelta;\n\t\tvar durationDelta;\n\t\tvar undoFunc;\n\n\t\t// if no new dates were passed in, compare against the event's existing dates\n\t\tif (!newStart && !newEnd) {\n\t\t\tnewStart = event.start;\n\t\t\tnewEnd = event.end;\n\t\t}\n\n\t\t// NOTE: throughout this function, the initial values of `newStart` and `newEnd` are\n\t\t// preserved. These values may be undefined.\n\n\t\t// detect new allDay\n\t\tif (event.allDay != oldAllDay) { // if value has changed, use it\n\t\t\tnewAllDay = event.allDay;\n\t\t}\n\t\telse { // otherwise, see if any of the new dates are allDay\n\t\t\tnewAllDay = !(newStart || newEnd).hasTime();\n\t\t}\n\n\t\t// normalize the new dates based on allDay\n\t\tif (newAllDay) {\n\t\t\tif (newStart) {\n\t\t\t\tnewStart = newStart.clone().stripTime();\n\t\t\t}\n\t\t\tif (newEnd) {\n\t\t\t\tnewEnd = newEnd.clone().stripTime();\n\t\t\t}\n\t\t}\n\n\t\t// compute dateDelta\n\t\tif (newStart) {\n\t\t\tif (newAllDay) {\n\t\t\t\tdateDelta = dayishDiff(newStart, oldStart.clone().stripTime()); // treat oldStart as allDay\n\t\t\t}\n\t\t\telse {\n\t\t\t\tdateDelta = dayishDiff(newStart, oldStart);\n\t\t\t}\n\t\t}\n\n\t\tif (newAllDay != oldAllDay) {\n\t\t\t// if allDay has changed, always throw away the end\n\t\t\tclearEnd = true;\n\t\t}\n\t\telse if (newEnd) {\n\t\t\tdurationDelta = dayishDiff(\n\t\t\t\t// new duration\n\t\t\t\tnewEnd || t.getDefaultEventEnd(newAllDay, newStart || oldStart),\n\t\t\t\tnewStart || oldStart\n\t\t\t).subtract(dayishDiff(\n\t\t\t\t// subtract old duration\n\t\t\t\toldEnd || t.getDefaultEventEnd(oldAllDay, oldStart),\n\t\t\t\toldStart\n\t\t\t));\n\t\t}\n\n\t\tundoFunc = mutateEvents(\n\t\t\tclientEvents(event._id), // get events with this ID\n\t\t\tclearEnd,\n\t\t\tnewAllDay,\n\t\t\tdateDelta,\n\t\t\tdurationDelta\n\t\t);\n\n\t\treturn {\n\t\t\tdateDelta: dateDelta,\n\t\t\tdurationDelta: durationDelta,\n\t\t\tundo: undoFunc\n\t\t};\n\t}", "function normalizeEventDates(eventProps) {\n\n\t\t\tnormalizeEventTimes(eventProps);\n\n\t\t\tif (eventProps.end && !eventProps.end.isAfter(eventProps.start)) {\n\t\t\t\teventProps.end = null;\n\t\t\t}\n\n\t\t\tif (!eventProps.end) {\n\t\t\t\tif (t.options.forceEventDuration) {\n\t\t\t\t\teventProps.end = t.getDefaultEventEnd(eventProps.allDay, eventProps.start);\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\teventProps.end = null;\n\t\t\t\t}\n\t\t\t}\n\t\t}", "function normalizeEventDates(eventProps) {\n\n\t\tnormalizeEventTimes(eventProps);\n\n\t\tif (eventProps.end && !eventProps.end.isAfter(eventProps.start)) {\n\t\t\teventProps.end = null;\n\t\t}\n\n\t\tif (!eventProps.end) {\n\t\t\tif (t.opt('forceEventDuration')) {\n\t\t\t\teventProps.end = t.getDefaultEventEnd(eventProps.allDay, eventProps.start);\n\t\t\t}\n\t\t\telse {\n\t\t\t\teventProps.end = null;\n\t\t\t}\n\t\t}\n\t}", "function normalizeEventDates(eventProps) {\n\n\t\tnormalizeEventTimes(eventProps);\n\n\t\tif (eventProps.end && !eventProps.end.isAfter(eventProps.start)) {\n\t\t\teventProps.end = null;\n\t\t}\n\n\t\tif (!eventProps.end) {\n\t\t\tif (t.opt('forceEventDuration')) {\n\t\t\t\teventProps.end = t.getDefaultEventEnd(eventProps.allDay, eventProps.start);\n\t\t\t}\n\t\t\telse {\n\t\t\t\teventProps.end = null;\n\t\t\t}\n\t\t}\n\t}", "function getLastDay(){\n\t//var d = new Date();\n\tvar year = currentYear;\n\tvar month = currentMonth;\t\n\tvar date = new Date(year, month + 1, 0);\n\treturn date.getDate();\n}", "function normalizeEventDates(eventProps) {\n\n\t\tnormalizeEventTimes(eventProps);\n\n\t\tif (eventProps.end && !eventProps.end.isAfter(eventProps.start)) {\n\t\t\teventProps.end = null;\n\t\t}\n\n\t\tif (!eventProps.end) {\n\t\t\tif (t.options.forceEventDuration) {\n\t\t\t\teventProps.end = t.getDefaultEventEnd(eventProps.allDay, eventProps.start);\n\t\t\t}\n\t\t\telse {\n\t\t\t\teventProps.end = null;\n\t\t\t}\n\t\t}\n\t}", "function normalizeEventDates(eventProps) {\n\n\t\tnormalizeEventTimes(eventProps);\n\n\t\tif (eventProps.end && !eventProps.end.isAfter(eventProps.start)) {\n\t\t\teventProps.end = null;\n\t\t}\n\n\t\tif (!eventProps.end) {\n\t\t\tif (t.options.forceEventDuration) {\n\t\t\t\teventProps.end = t.getDefaultEventEnd(eventProps.allDay, eventProps.start);\n\t\t\t}\n\t\t\telse {\n\t\t\t\teventProps.end = null;\n\t\t\t}\n\t\t}\n\t}", "finish() {\n this.addTimeStamp('runtime')\n this.attributes['endTime'] = Date.now();\n return this.attributes;\n }", "function semesterEnd() {\n var nowDate = new Date();\n if (nowDate.getMonth() <= 6) {\n return new Date(nowDate.getFullYear(), 6, 32).toUTCString(); // 31st of July, this year\n }\n else {\n return new Date(nowDate.getFullYear(), 11, 32).toUTCString(); // 31st of December, this year\n }\n}", "function generateScheduleEnd({\n frequency,\n start,\n timezone\n}) {\n const {\n unit: frequencyUnit,\n value: frequencyValue\n } = frequency;\n const isFrequencyLessThanWeek = (0, _fp.includes)(frequencyUnit, [_scheduling.Unit.Millisecond, _scheduling.Unit.Second, _scheduling.Unit.Minute, _scheduling.Unit.Hour, _scheduling.Unit.Day]);\n\n const mStart = _momentTimezone.default.tz(start, timezone); // NOTE: if frequency unit less than a week we must set end to jump a week\n // so that we can ensure that we are within a service interval\n\n\n const end = isFrequencyLessThanWeek ? mStart.add(1, _scheduling.Unit.Week).valueOf() : mStart.add(frequencyValue * 2, frequencyUnit).valueOf();\n return end;\n}", "function computeEventForDateSpan(dateSpan, dragMeta, calendar) {\n var defProps = __assign({}, dragMeta.leftoverProps);\n for (var _i = 0, _a = calendar.pluginSystem.hooks.externalDefTransforms; _i < _a.length; _i++) {\n var transform = _a[_i];\n __assign(defProps, transform(dateSpan, dragMeta));\n }\n var def = Object(_fullcalendar_core__WEBPACK_IMPORTED_MODULE_0__[\"parseEventDef\"])(defProps, dragMeta.sourceId, dateSpan.allDay, calendar.opt('forceEventDuration') || Boolean(dragMeta.duration), // hasEnd\n calendar);\n var start = dateSpan.range.start;\n // only rely on time info if drop zone is all-day,\n // otherwise, we already know the time\n if (dateSpan.allDay && dragMeta.startTime) {\n start = calendar.dateEnv.add(start, dragMeta.startTime);\n }\n var end = dragMeta.duration ?\n calendar.dateEnv.add(start, dragMeta.duration) :\n calendar.getDefaultEventEnd(dateSpan.allDay, start);\n var instance = Object(_fullcalendar_core__WEBPACK_IMPORTED_MODULE_0__[\"createEventInstance\"])(def.defId, { start: start, end: end });\n return { def: def, instance: instance };\n}", "function normalizeEventDates(eventProps) {\n\n\t\tnormalizeEventTimes(eventProps);\n\n\t\tif (eventProps.end && !eventProps.end.isAfter(eventProps.start)) {\n\t\t\teventProps.end = null;\n\t\t}\n\n\t\tif (!eventProps.end) {\n\t\t\tif (options.forceEventDuration) {\n\t\t\t\teventProps.end = t.getDefaultEventEnd(eventProps.allDay, eventProps.start);\n\t\t\t}\n\t\t\telse {\n\t\t\t\teventProps.end = null;\n\t\t\t}\n\t\t}\n\t}", "function getMonthEnd(date) {\n return new Date(date.getFullYear(), date.getMonth() + 1, 0, 0, 0, 0, 0);\n}", "function handleEnd(event) {\n var currentEventSubId = event.target.id;\n currentEventSubId = currentEventSubId.substring(\n currentEventSubId.indexOf(\"-\") + 1\n );\n\n const eventStatus = {\n eventSubIdToChange: currentEventSubId,\n changeStatusTo: \"end\",\n };\n\n // API TO UPDATE EVENT TO SET EVENT AS ACTIVATED\n API.updateEventStatus(eventStatus)\n .then((res) => {\n setEventIsActive(false);\n loadEvents();\n })\n .catch((err) => console.log(err));\n }", "eventTimeQualifier(calobj,startmomentobj,endmomentobj) {\n\n var endDiffinDays, startDiffinDays;\n\n var startNoTime = startmomentobj.clone();\n var endNoTime = endmomentobj.clone();\n\n try {\n // no time is considered for this\n startNoTime.startOf('day');\n startDiffinDays = startNoTime.diff(calobj.todayDate,'days');\n\n endNoTime.startOf('day');\n endDiffinDays = endNoTime.diff(calobj.todayDate,'days');\n }\n // eslint-disable-next-line no-catch-shadow\n catch (e) {\n startDiffinDays = -1;\n endDiffinDays = -1;\n console.log(\"Diff error:\", e);\n }\n // console.log(\"Diff in days is:\" + startDiffinDays + \" and end:\" + endDiffinDays + \" with today:\" + todayDate.format());\n\n if ( startDiffinDays > 0 ) {\n return this.EVENTISFUTURE;\n } else if ( startDiffinDays < 0 && endDiffinDays < 0 ) {\n return this.EVENTISPAST;\n } else if ( startDiffinDays == 0 ) {\n if ( startmomentobj.hour() == 0 && startmomentobj.minute() < 5 && \n ( (endmomentobj.hour() == 23 && endmomentobj.minute() > 54 ) || endDiffinDays > 0 ) ) {\n return this.EVENTSPANSTODAY;\n } else {\n return this.EVENTSTARTSTODAY; // all same day events that start today actually\n }\n } else if ( startDiffinDays < 0 && endDiffinDays == 0 ) {\n return this.EVENTENDSTODAY;\n } else if ( startDiffinDays < 0 && endDiffinDays > 0 ) {\n return this.EVENTSPANSTODAY;\n }\n\n // have no clue\n return 0;\n }", "function remaining_time() {\n let delta_time = Date.parse(end_date) - Date.parse(new Date()), //get quantity of the milliseconds from now to the end date\n seconds = Math.floor((delta_time/1000) % 60), //get seconds\n minutes = Math.floor((delta_time/1000/60) % 60), //get minutes\n hours = Math.floor((delta_time/1000/60/60)); //get hours\n\n //the time object\n return {\n 'total': delta_time,\n 'hours': hours,\n 'minutes': minutes,\n 'seconds': seconds\n }\n }", "function computeEventForDateSpan(dateSpan, dragMeta, calendar) {\n var defProps = __assign({}, dragMeta.leftoverProps);\n for (var _i = 0, _a = calendar.pluginSystem.hooks.externalDefTransforms; _i < _a.length; _i++) {\n var transform = _a[_i];\n __assign(defProps, transform(dateSpan, dragMeta));\n }\n var def = core.parseEventDef(defProps, dragMeta.sourceId, dateSpan.allDay, calendar.opt('forceEventDuration') || Boolean(dragMeta.duration), // hasEnd\n calendar);\n var start = dateSpan.range.start;\n // only rely on time info if drop zone is all-day,\n // otherwise, we already know the time\n if (dateSpan.allDay && dragMeta.startTime) {\n start = calendar.dateEnv.add(start, dragMeta.startTime);\n }\n var end = dragMeta.duration ?\n calendar.dateEnv.add(start, dragMeta.duration) :\n calendar.getDefaultEventEnd(dateSpan.allDay, start);\n var instance = core.createEventInstance(def.defId, { start: start, end: end });\n return { def: def, instance: instance };\n }", "get documentEnd() {\n if (!isNullOrUndefined(this.selectionModule)) {\n return this.selection.getDocumentEnd();\n }\n return undefined;\n }", "get maxDate() {\n return calculateMaxDate(this.expiryMilliseconds);\n }", "function computeEventForDateSpan(dateSpan, dragMeta, context) {\n var defProps = Object(tslib__WEBPACK_IMPORTED_MODULE_1__[\"__assign\"])({}, dragMeta.leftoverProps);\n\n for (var _i = 0, _a = context.pluginHooks.externalDefTransforms; _i < _a.length; _i++) {\n var transform = _a[_i];\n Object(tslib__WEBPACK_IMPORTED_MODULE_1__[\"__assign\"])(defProps, transform(dateSpan, dragMeta));\n }\n\n var _b = Object(_fullcalendar_common__WEBPACK_IMPORTED_MODULE_0__[\"refineEventDef\"])(defProps, context),\n refined = _b.refined,\n extra = _b.extra;\n\n var def = Object(_fullcalendar_common__WEBPACK_IMPORTED_MODULE_0__[\"parseEventDef\"])(refined, extra, dragMeta.sourceId, dateSpan.allDay, context.options.forceEventDuration || Boolean(dragMeta.duration), // hasEnd\n context);\n var start = dateSpan.range.start; // only rely on time info if drop zone is all-day,\n // otherwise, we already know the time\n\n if (dateSpan.allDay && dragMeta.startTime) {\n start = context.dateEnv.add(start, dragMeta.startTime);\n }\n\n var end = dragMeta.duration ? context.dateEnv.add(start, dragMeta.duration) : Object(_fullcalendar_common__WEBPACK_IMPORTED_MODULE_0__[\"getDefaultEventEnd\"])(dateSpan.allDay, start, context);\n var instance = Object(_fullcalendar_common__WEBPACK_IMPORTED_MODULE_0__[\"createEventInstance\"])(def.defId, {\n start: start,\n end: end\n });\n return {\n def: def,\n instance: instance\n };\n } // Utils for extracting data from element", "get end() {\n\t\treturn this.__end;\n\t}", "get end() {\n\t\treturn this.__end;\n\t}", "get endMS() {\n return this._endMS;\n }", "get endMS() {\n return this._endMS;\n }", "function endTimeDate(starttime, endtime) {\n\tvar result = \"\";\n\tvar endtimeDate = new Date(parseInt(endtime));\n\tvar starttimeDate = new Date(parseInt(starttime));\n\n\tvar formattedDate = endtimeDate.getDate() + \"-\" + (endtimeDate.getMonth() + 1) + \"-\" + endtimeDate.getFullYear();\n\n\tvar hours = (endtimeDate.getHours() < 10) ? \"0\" + endtimeDate.getHours() : endtimeDate.getHours();\n\tvar minutes = (endtimeDate.getMinutes() < 10) ? \"0\" + endtimeDate.getMinutes() : endtimeDate.getMinutes();\n\tvar formattedTime = hours + \":\" + minutes;\n\n\tif (endtimeDate.getDate() == starttimeDate.getDate()) {\n\t\tresult = \" til \" + formattedTime;\n\t} else if (endtimeDate.getDate() > starttimeDate.getDate()) {\n\t\tformattedDate = \"<br> Slut \" + formattedDate + \", kl. \" + formattedTime;\n\t\tresult = formattedDate;\n\t} else {\n\t\tresult = \"Wrong date object\";\n\t}\n\treturn result;\n}", "function dateTomorrowEnd(dateFormat) {\n dateFormat = dateFormat || _defaultDateFormat;\n return moment().add(1, 'days').format(_defaultDateFormat) + ' 23:59:59';\n }", "function getTimeRemaining(endtime) {\n const total = Date.parse(endtime) - Date.parse(new Date());\n const seconds = Math.floor((total / 1000) % 60);\n const minutes = Math.floor((total/1000/60) % 60);\n const hours = Math.floor((total/1000*60*60) % 24);\n const days = Math.floor((total/1000*60*60*24));\n return {\n total, days, hours, minutes, seconds\n };\n }", "function computeEventForDateSpan(dateSpan, dragMeta, context) {\n var defProps = __assign({}, dragMeta.leftoverProps);\n for (var _i = 0, _a = context.pluginHooks.externalDefTransforms; _i < _a.length; _i++) {\n var transform = _a[_i];\n __assign(defProps, transform(dateSpan, dragMeta));\n }\n var _b = refineEventDef(defProps, context), refined = _b.refined, extra = _b.extra;\n var def = parseEventDef(refined, extra, dragMeta.sourceId, dateSpan.allDay, context.options.forceEventDuration || Boolean(dragMeta.duration), // hasEnd\n context);\n var start = dateSpan.range.start;\n // only rely on time info if drop zone is all-day,\n // otherwise, we already know the time\n if (dateSpan.allDay && dragMeta.startTime) {\n start = context.dateEnv.add(start, dragMeta.startTime);\n }\n var end = dragMeta.duration ?\n context.dateEnv.add(start, dragMeta.duration) :\n getDefaultEventEnd(dateSpan.allDay, start, context);\n var instance = createEventInstance(def.defId, { start: start, end: end });\n return { def: def, instance: instance };\n }", "endTime(){\r\n var duration = (Math.random() * (2*60 - 1)*1000 + 1000);\r\n var now = new Date().getTime();\r\n return (now + duration);\r\n }", "function checkEventEndDate(e){\n resetInnerHTML('errEventEndDate');\n document.getElementById('endDate').removeAttribute('class');\n var endDate = document.getElementById('endDate').value.trim();\n var errorMsg = \"\";\n\n if(endDate.length < 1) {\n errorMsg += '* Event End Date required';\n }\n\n if(errorMsg.length > 0){\n if(e){\n e.preventDefault();\n }\n document.getElementById('errEventEndDate').innerHTML = errorMsg;\n setAttribute('endDate', 'class', 'errorBorder');\n }\n}", "returnNextEventDateFromRule(calobj,usedate,evtjson,) {\n\n var eRule = {};\n var retDate = usedate;\n var ltime = {};\n\n if (evtjson.rrule) {\n\n // var userule = \"DTSTART:\" + usedate + \"\\ntzid:\" + intimezone + \"\\nRRULE:\" + evtjson.rrule;\n var userule = \"DTSTART;TZID=\" + calobj.intimezone + \":\" + usedate + \"\\nRRULE:\" + evtjson.rrule;\n // console.log(\"Event Rule being processed:\" + userule);\n\n try {\n eRule = rrule.rrulestr(userule);\n let aeventStartdates = eRule.between(calobj.todayDate.toDate(), calobj.endWindowDate.toDate());\n\n // eRUle always returns UTC times so we need to maybe convert depending on the source\n\n if ( aeventStartdates.length > 0 ) {\n retDate = aeventStartdates[0].toString();\n\n // if the original date ended in Z then its a UTC Date, otherwise its local\n if ( ! usedate.endsWith('Z') ) {\n // original time was NOT UTC, Need to convert to local time\n ltime = moment.utc(retDate).tz(calobj.intimezone);\n retDate = ltime.format();\n }\n\n }\n }\n catch (e) {\n console.log(\"error processing rule:\", e);\n }\n } else {\n // no rule, so use the date given. It's always local time even if it has a Z on the end\n ltime = moment(usedate);\n retDate = ltime.format();\n // console.log(\"Converted usedate:\" + usedate + \" to moment:\" + retDate + \" without rule\")\n }\n\n // console.log(\"Setting event date based on rule to:\",retDate);\n return retDate; \n\n }", "function getLastMeetingday(callback) {\n const q = 'SELECT MAX(Date) AS Date FROM MeetingDays WHERE Date < date(\"now\");';\n db.get(q, [], (err, result) => {\n if (err) return callback(err);\n return callback(null, result.Date);\n });\n}", "setEndDate(date) {\n this.setState({ endD: date });\n this.checkDate(false);\n }", "beforeEnd() {\n this.d = this.d.day('friday')\n return this\n }", "function OnEndDateChanged(sender, eventArgs) {\n ClearTimeIfNoDate(endDatePickerId, endTimePickerId);\n FireDateRangeValidator();\n }", "toDate() {\n return this.timestamp();\n }", "function GetAEPDateRange(option, date) {\n\t\t\t\t\t\tvar dte;\n\t\t\t\t\t\tvar year = new Date().getFullYear();\n\n\t\t\t\t\t\tif (option == \"Start\") {\n\t\t\t\t\t\t\t\t\tdte = new Date(year + \"-\" + date + \" 00:00:00.000\");\n\t\t\t\t\t\t} else if (option == \"End\") {\n\t\t\t\t\t\t\t\t\tdte = new Date(year + \"-\" + date + \" 23:59:00.000\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\treturn dte;\n\t\t\t}", "_getMaxDate() {\n return this._rangeInput.max;\n }", "_getMaxDate() {\n return this._rangeInput.max;\n }", "async function getMigrationEndTs () {\n const client = await getPgClient()\n const { rows: [{ dump_ended_at }] } = await client.query(`\n SELECT id, dump_ended_at, MAX(id) FROM migration_tracker\n GROUP BY id\n `)\n\n await client.end()\n return new Date(dump_ended_at).toISOString()\n}", "GetEndProperty() {}", "function elementSelectedEndDate(){\r\n\tvar choice, day,month,timeDate,year ;\r\n\tchoice = document.form.endDate.value;\r\n\ttimeDate=new Date(\"\" + choice);\r\n\tif(isNaN(timeDate.getFullYear())) year = \"<Var>EndYear</Var>\\n \"; else year = \"<Ind type=\\\"integer\\\">\"+ timeDate.getFullYear() + \"</Ind>\\n \";\r\n\tif(isNaN(timeDate.getMonth())) month = \"<Var>EndMonth</Var>\\n \"; else month = \"<Ind type=\\\"integer\\\">\"+ (timeDate.getMonth()+1) + \"</Ind>\\n \";\r\n\tif(isNaN(timeDate.getDate())) day = \"<Var>EndDay</Var>\\n \"; else day = \"<Ind type=\\\"integer\\\">\"+ timeDate.getDate() + \"</Ind>\\n \";\r\n\tif (choice == \"\") englishEndDate = \"any day\";\t\r\n\telse englishEndDate = choice;\t\r\n\tendDate = \"<Expr>\\n <Fun>dateTime</Fun>\\n \" + year + month + day;\r\n\telementErrorDateTimeCheck();\r\n\tcreateRuleML();\r\n}", "function ed() {\n\t \ttarget.items.sort(function(a, b) {\n\t return parseDate(a.item_content_end_time).getTime() - parseDate(b.item_content_end_time).getTime();\n\t \t});\n\t end = parseDate(target.items[target.items.length - 1].item_content_end_time).getTime();\n\t }//让数据按结束时间从小到到排列 这样最后一个数据就是当天最晚的时间", "get endTime() { return this.startTime.plus(this.duration); }" ]
[ "0.6729883", "0.66035736", "0.6551354", "0.6455725", "0.64408535", "0.62579197", "0.6198936", "0.6056017", "0.60454184", "0.60088706", "0.60088706", "0.5981692", "0.58522236", "0.58233297", "0.5810547", "0.5797141", "0.57970375", "0.57565784", "0.57541823", "0.5730768", "0.5661055", "0.55985785", "0.5591571", "0.55877614", "0.55776715", "0.554593", "0.55333394", "0.54967606", "0.5490494", "0.54528445", "0.5437273", "0.53813756", "0.5366301", "0.5345409", "0.53373265", "0.5329981", "0.5327811", "0.53042185", "0.5303739", "0.5257383", "0.52569306", "0.5256493", "0.52479255", "0.5243303", "0.52201575", "0.5190426", "0.51722336", "0.51709837", "0.5165676", "0.5163534", "0.51498157", "0.5145389", "0.514248", "0.51416755", "0.5137335", "0.51251733", "0.5119803", "0.5119803", "0.51103586", "0.51010936", "0.51010936", "0.5091929", "0.50911355", "0.5090927", "0.5090869", "0.50872487", "0.5086519", "0.5080926", "0.5077381", "0.5061016", "0.5046425", "0.50428504", "0.50319964", "0.502794", "0.5026112", "0.5026112", "0.5024345", "0.5024345", "0.5016881", "0.50027466", "0.4996865", "0.49964076", "0.49827996", "0.49818695", "0.49788657", "0.49740002", "0.49625835", "0.49624556", "0.49594027", "0.49569318", "0.4949132", "0.49459997", "0.49459997", "0.49415368", "0.49386522", "0.4929855", "0.4923111", "0.490241" ]
0.80887157
1
Event Elements report when view creates an element for an event
function reportEventElement(event, element) { eventElementCouples.push({ event: event, element: element }); if (eventElementsByID[event._id]) { eventElementsByID[event._id].push(element); }else{ eventElementsByID[event._id] = [element]; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function _onElementAdded() {\n \n\t\t\t countElements++;\n \n\t\t\t //add all elements of a view\n\t\t\t if(countElements < elements.length) {\n\t\t\t\t var element = elements[countElements];\n\t\t\t\t if(!_removeNotValidElementObj(element)) {\n\t\t\t\t\t instance.addElement( element.type, element.source, element.title, element.parameters);\n\t\t\t\t }\n \n\t\t\t }\n\t\t\t //all initial elements are added, view is created\n\t\t\t else {\n \n\t\t\t\t $this.off('elementAdd', _onElementAdded);\n\t\t\t\t if(typeof callback !== 'undefined') {\n\t\t\t\t\t callback.call(callback, instance);\n\t\t\t\t }\n \n\t\t\t }\n \n\t\t }", "createTripEvent() {\n const pointController = new PointController(this.firstDayEventListElem, null, this._places, this._offers, this._onDataChange, this._onChangeView);\n pointController._pointView.element.querySelector(`.event__rollup-btn`).click();\n }", "function reportEventChange() {\n renderEvents();\n }", "function reportEventChange() {\n\t\t\trenderEvents();\n\t\t}", "function reportEventChange() {\n\t\trenderEvents();\n\t}", "function reportEventChange() {\n\t\trenderEvents();\n\t}", "function reportEventChange() {\n\t\trenderEvents();\n\t}", "createEvent(text) {\n const id = Date.now(); // TODO not great\n this.events.push({\n id,\n text,\n complete: false,\n });\n\n this.emit(\"change\");\n }", "onEventCreated(newEventRecord) {}", "onEventAction(event, element, view) {\n //$(element).qtip('show', true);\n let $this = this;\n let id = event._id;\n\n if (undefined === $this._huds[id]) {\n let repeats = `<div class=\"repeats\"><strong>${Craft.t(\"venti\", \"Repeats\")}:</strong>${event.summary}</div>`;\n let occur = `<button class=\"btn\" data-occur>${Craft.t(\"venti\", \"Remove Occurence\")}</button>`;\n let del = `<button class=\"btn\" data-del>${Craft.t(\"venti\", \"Delete\")}</button>`;\n let edit = `<button class=\"btn submit\" data-edit>${Craft.t(\"venti\", \"Edit\")}</button>`;\n let buttons = !$this._multisite || ($this._multisite && $this._editSites[event.siteId]) ? `\n <div class=\"hud-footer\">\n ${ (parseInt(event.recurring) === 1 && event.source.ajaxSettings.canManageEvents === true ) ? occur : '' }\n ${ (event.source.ajaxSettings.canManageEvents === true) ? del : ''}\n ${ (event.source.ajaxSettings.canManageEvents === true) ? edit : ''}\n </div>` : '';\n let content = `\n <div data-eid='${event.id}'>\n <div class=\"event-tip--header\">\n <h3>${event.title}</h3>\n <h6>\n <span class=\"event_group_color\" style=\"background-color:${event.color};\"></span>\n ${event.group}\n </h6>\n <span class=\"closer\">\n <svg height=16px version=1.1 viewBox=\"0 0 16 16\"width=16px xmlns=http://www.w3.org/2000/svg xmlns:xlink=http://www.w3.org/1999/xlink><defs></defs><g id=Page-1 fill=none fill-rule=evenodd stroke=none stroke-width=1><g id=close.3.3.1><g id=Group><g id=Filled_Icons_1_ fill=#CBCBCC><g id=Filled_Icons><path d=\"M15.81248,14.90752 L9.22496,8.32 L15.81184,1.73248 C16.06208,1.48288 16.06208,1.07776 15.81184,0.82752 C15.5616,0.57728 15.15712,0.57728 14.90688,0.82752 L8.32,7.41504 L1.73184,0.82688 C1.4816,0.57728 1.07712,0.57728 0.82688,0.82688 C0.57664,1.07712 0.57664,1.4816 0.82688,1.73184 L7.41504,8.32 L0.82688,14.90816 C0.57728,15.15776 0.57664,15.56352 0.82688,15.81312 C1.07712,16.06336 1.48224,16.06272 1.73184,15.81312 L8.32,9.22496 L14.90752,15.81184 C15.15712,16.06208 15.56224,16.06208 15.81248,15.81184 C16.06272,15.56224 16.06208,15.15712 15.81248,14.90752 L15.81248,14.90752 Z\"id=Shape></path></g></g><g id=Invisible_Shape transform=\"translate(0.640000, 0.640000)\"><rect height=15.36 id=Rectangle-path width=15.36 x=0 y=0></rect></g></g></g></g></svg>\n </span>\n </div>\n <div class=\"event-tip--datetime\">\n ${$this.tipDateFormat(event)}\n ${ parseInt(event.repeat) === 1 ? repeats : ''}\n </div> \n </div>\n ${ event.source.ajaxSettings.canManageEvents === true ? buttons : '' }\n `;\n\n\n $this._huds[id] = new Garnish.HUD($(element.currentTarget), $(content), {\n hudClass: 'hud venti-event-tip',\n tipWidth: 500,\n closeBtn: '.closer',\n onShow: $.proxy(function(evt) {\n\n const tip = $(evt.target.$footer);\n\n const btnEdit = tip.find('button[data-edit]');\n const btnDelete = tip.find('button[data-del]');\n const btnOccur = tip.find('button[data-occur]');\n\n btnEdit.on('click', $.proxy(function(evt) {\n evt.preventDefault();\n $this.editEvent(event, element);\n $this._huds[id].hide();\n }));\n\n btnDelete.on('click', $.proxy(function(evt) {\n evt.preventDefault();\n $this.deleteEvent(event, element);\n $this._huds[id].hide();\n }));\n\n btnOccur.on('click', $.proxy(function(evt) {\n evt.preventDefault();\n $this.removeOccurence(event, element);\n $this._huds[id].hide();\n }));\n\n }, this)\n });\n } else {\n $this._huds[id].show();\n }\n }", "function RenderEvent() {}", "handleCreated(event) {\n //If \"Create Issue and Upload Screenshot\" button has been clicked then we can use this flag to show file dialog after Issue has been crated\n if(this.fileUploadButtonClicked){\n this.showUploadFileDialog = true;\n }\n this.newIssueRecordId = event.detail.id;\n //Reset the form so we can enter more data for next issue; if needed\n this.handleResetFields();\n this.dispatchEvent(\n new ShowToastEvent({\n title: 'Success',\n message: '{0} was successfully created!',\n \"messageData\": [\n {\n url: '/'+ event.detail.id,\n label: 'Issue:: ' + event.detail.fields.Name.value\n }\n ],\n variant: 'success'\n })\n );\n }", "function elementCreated(element) {\n // if \"created\" hasn't been suspended: run created code\n if (!element.hasAttribute('suspend-created')) {\n \n }\n }", "function processEvents(element, index, array) {\r\r\n \tvar eventHtml = '';\r\r\n \teventHtml += '<div class=\"event clearfix\">';\r\r\n \teventHtml += '<div class=\"event-left\">';\r\r\n \tif(element.actor.hasOwnProperty('avatar_url')){\r\r\n \t\teventHtml += '<div class=\"event-field\">';\r\r\n \t\teventHtml += '<img src=\"' + element.actor.avatar_url + '\">';\r\r\n \t\teventHtml += '</div>';\r\r\n \t}\r\r\n \teventHtml += '</div>';\r\r\n \teventHtml += '<div class=\"event-right\">';\r\r\n \tif(element.actor.hasOwnProperty('login')){\r\r\n \t\teventHtml += '<div class=\"event-field\">';\r\r\n \t\teventHtml += '<h3>UserName: ' + element.actor.login + '</h3>';\r\r\n \t\teventHtml += '</div>';\r\r\n \t}\r\r\n \tif(element.hasOwnProperty('type')){\r\r\n \t\teventHtml += '<div class=\"event-field\">';\r\r\n \t\teventHtml += '<p>Type of Event: ' + element.type + '</p>';\r\r\n \t\teventHtml += '</div>';\r\r\n \t}\r\r\n \teventHtml += '<span>Click to show more details...</span>';\r\r\n \teventHtml += '<div class=\"event-details\">';\r\r\n \tif(element.hasOwnProperty('created_at')) {\r\r\n \t\tvar eventDate = convertDate(element.created_at);\r\r\n \t\teventHtml += '<div class=\"event-field\">';\r\r\n \t\teventHtml += 'Date Created: ' + eventDate;\r\r\n \t\teventHtml += '</div>';\r\r\n \t}\r\r\n \tif(element.repo.hasOwnProperty('name')){\r\r\n \t\teventHtml += '<div class=\"event-field\">';\r\r\n \t\teventHtml += '<p>Repo Name: ' + element.repo.name + '</p>';\r\r\n \t\teventHtml += '<a target=\"_blank\" href=\"https://github.com/' + element.repo.name + '\">Link to Repo</a>';\r\r\n \t\teventHtml += '</div>';\r\r\n \t}\r\r\n \teventHtml += '</div>';\r\r\n \teventHtml += '</div>';\r\r\n \teventHtml += '</div>';\r\r\n\r\r\n \t//checks where to place event for user or public github feed\r\r\n \tif (array.typeOfRequest == 'githubPublic') {\r\r\n \t\t$(\"#event-data\").append(eventHtml);\r\r\n \t}\r\r\n \telse if (array.typeOfRequest == 'githubUser') {\r\r\n \t\t$(\"#user-data\").append(eventHtml);\r\r\n \t}\r\r\n\r\r\n \t$('.event').click(function(){\r\r\n \t$(this).addClass(\"active\");\r\r\n\t\t})\r\r\n }", "function EventInfo() { }", "function EventInfo() { }", "function addEvent() {\n sendLog(\"Add Event\")\n selectEvent(0);\n handleShow();\n }", "function eventCreate(listOfEvents, current, indJ) {\n listOfEvents[indJ] = {\n id: current.section,\n title: current.section,\n start: determineDay(current.days[indJ]) + current.start + \":00\",\n end: determineDay(current.days[indJ]) + current.end + \":00\",\n allDay: false,\n editable: true\n };\n }", "function __add_button_create_event() {\n\t\tvar $element = $('.has-button-create-event');\n\n\t\t$(window).load(function() {\n\t\t\tvar $button = $('');\n\t\t\t$button.appendTo($element.find('.fc-header-right'));\n\t\t});\n\t}", "render() {\n\t\tlet width = this.details.width - 30;\n\t\tlet top = this.details.top;\n\t\tlet height = this.details.height;\n\t\tlet left = this.details.left;\n\t\tlet elem = document.createElement('div');\n\t\telem.setAttribute('class','event');\n\t\telem.innerHTML = `Event ID: ${this.details.id}`;\n\t\telem.style.top = `${top}px`;\n\t\telem.style.width = `${width}px`;\n\t\telem.style.height = `${height}px`;\n\t\telem.style.left = `${left}px`;\n\t\tmainElem.appendChild(elem);\n\t}", "__elemEvent(eventType, eventNameFull, d, i, nodes) {\n const node = nodes[i];\n const cssAction = EV.INTERACTION_EVENT_CSS_MAP[eventType];\n\n if (cssAction) {\n if (cssAction.action === 'add') {\n d3.select(node).classed(cssAction.css, true);\n }\n else if (cssAction.action === 'remove') {\n d3.select(node).classed(cssAction.css, false);\n }\n }\n\n this.__notify(eventNameFull, d, i, nodes);\n }", "function createEventDOM(newEvent,index) {\n\t/*var time = [];\n\ttime = (newEvent.time).split(\":\");\n\tvar timeStr = time[0] + time[1];*/\n\n\n\tvar e = document.createElement('div');\n\te.setAttribute(\"id\",index+\"-\"+(newEvent.date.toString())+\"-\"+(newEvent.month.toString())+\"-\"+(newEvent.year.toString()) );\n\te.setAttribute(\"class\", \"eventElement\");\n\n\tvar deleteButton = document.createElement('button');\n\tdeleteButton.setAttribute(\"onclick\", \"deleteEvent(\"+index+\",\"+newEvent.date+\",\"+newEvent.month+\",\"+newEvent.year+\")\");\n\tdeleteButton.setAttribute(\"class\", \"deleteEventButton\");\n\n\te.appendChild(deleteButton);\n\n\tvar eventTime = document.createElement('div');\n\teventTime.setAttribute(\"class\", \"eventTime\");\n\tvar t = newEvent.time;\n\tvar hours = Math.floor( t/ 60); \n var minutes = t % 60;\n if(minutes < 10)\n \tminutes = \"0\" + minutes;\n \tif(hours < 10)\n \t\thours = \"0\" + hours;\n \ttimeStr = hours.toString() +\" : \"+ minutes.toString();\n\n\teventTime.innerHTML = timeStr;\n\n\te.appendChild(eventTime);\n\n\tvar title = document.createElement('div');\n\ttitle.setAttribute(\"class\", \"eventTitle\");\n\ttitle.innerHTML = newEvent.title;\n\n\te.appendChild(title);\n\n\tvar classId = document.createElement('div');\n\tclassId.setAttribute(\"class\", \"eventClass\");\n\tclassId.innerHTML = 'Class ID:' + newEvent.classId;\n\n\te.appendChild(classId);\n\n\treturn e;\n\n}", "renderEvent(eventData) {\n // No point in rendering event that already has an element\n const data = eventData.tplData,\n { resourceRecord, eventRecord } = data,\n // Event element config, applied to existing element or used to create a new one below\n elementConfig = {\n className: data.wrapperCls,\n tabIndex: '0',\n children: [\n {\n className: data.cls,\n style: (data.internalStyle || '') + (data.style || ''),\n // Clone to be repeatable\n html: data.body.cloneNode(true),\n // Used for comparison, cheaper than comparing fragment from above\n compareHtml: data.eventContent\n }\n ],\n style: {\n transform: `translate(${data.left}px, ${data.top}px)`,\n // DomHelper appends px to dimensions when using numbers\n height: data.height,\n width: data.width,\n zIndex: data.zIndex\n },\n dataset: {\n resourceId: resourceRecord.id,\n eventId: data.eventId, // Not using eventRecord.id to distinguish between Event and ResourceTimeRange\n // Sync using assignment id in multi assignment mode or event id in single assignment mode\n syncId: data.assignment ? data.assignment.id : data.eventId\n },\n // Will not be part of DOM, but attached to the element\n elementData: eventData,\n // Dragging etc. flags element as retained, to not reuse/release it during that operation\n retainElement: eventRecord.instanceMeta(this.scheduler).retainElement\n };\n\n // Do not want to spam dataset with empty prop when not using assignments\n if (data.assignment) {\n elementConfig.dataset.assignmentId = data.assignment.id;\n }\n\n return elementConfig;\n }", "function trackElementEvent($el) {\n var category, action, label;\n\n if (!(category = $el.data('category'))) {\n return;\n }\n if (!(action = $el.data('action'))) {\n return;\n }\n label = $el.data('label');\n\n window.Gevent(category, action, label);\n }", "function ev( event ) {\n\n\t// Main view instance\n\tvar View = Gillie.Handler.extend({\n\n\t initialize: function() {\n\n\t \tthis.init();\n\t \t\n\t }\n\n\t , events: {\n\t \t// 'mousedown #draw-zone': 'drawBox'\n\t \t'click .draw-container': 'newBox'\t\n\t }\n\n\t ,\tinit: function() {\n\t \t\tvar TargetDate = \"03/01/2014 12:00 AM\"\n\t\t\t\t,\tCountActive = true\n\t\t\t\t,\tCountStepper = -1\n\t\t\t\t,\tLeadingZero = true\n\t\t\t\t,\tDisplayFormat = \"%%D%% Days, %%H%% Hours, %%M%% Minutes, %%S%% Seconds.\"\n\t\t\t\t,\tFinishMessage = \"It is finally here!\";\n\t \t}\n\n\t});\n\n\t// Create instance\n\tvar myView = new View();\n\n}", "function setAddEventHandlerInQuickView() {\n const button = nodeSelectors.quickViewBody.querySelector(selectors.add);\n on('click', button, (event) => handleAddEvent(event));\n }", "function viewEvent(event) {\n sendLog('View Event');\n getAnalysts(event.id)\n selectEvent(event);\n handleShow();\n }", "function newEvent(request, response){\n var contextData = {\n 'allowedDateInfo': allowedDateInfo\n };\n response.render('create-event.html', contextData);\n}", "function newEvent(request, response){\n var contextData = {\n 'allowedDateInfo': allowedDateInfo\n };\n response.render('create-event.html', contextData);\n}", "function addEvent() {\n // getting values from input\n let name = document.getElementById(\"name\").value;\n let start = document.getElementById(\"start\").value;\n let end = document.getElementById(\"end\").value;\n // adding event to the array by initialization object\n EventArr.push(new Event(name, start, end, \"21.5.2020\", \"25.6.2020\"));\n // writing event do DOM\n document.getElementById(\"actual-events\").innerHTML += name + \" | From: \" + start + \" To: \" + end + \"</br>\";\n // reseting inputs\n document.getElementById(\"name\").value = \"\";\n document.getElementById(\"start\").value = \"\";\n document.getElementById(\"end\").value = \"\";\n}", "function createEventPoint(){\r\n\t\tvar eventPoint = '<div class=\"eventPoint\"></div>';\r\n\t\tvar timePoint = '<div class=\"colTimePoint\"><div class=\"timePoint\"><div class=\"timePointBtn\"><div class=\"timePointIcon\"></div></div></div></div>';\r\n\t\tvar dateAndName = '<div class=\"colDateAndName\"><div class=\"date\"></div><div class=\"name\"></div></div>';\r\n\t\t\r\n\t\t$(\".eventsLine\").append(eventPoint);\r\n\t\t$(\".eventPoint:last\").append(timePoint);\r\n\t\t$(\".eventPoint:last\").append(dateAndName);\r\n\t}", "function ini_events(ele) {\n\t\t\t $scope.ele = ele\n ele.each(function () {\n\n // create an Event Object (http://arshaw.com/fullcalendar/docs/event_data/Event_Object/)\n // it doesn't need to have a start or end\n\n var eventObject = {\n title: $.trim($(this).text()), // use the element's text as the event title\n\t\t\t\t\t id: $(this).context.align\n };\n\n // store the Event Object in the DOM element so we can get to it later\n $(this).data('eventObject', eventObject);\n\n // make the event draggable using jQuery UI\n $(this).draggable({\n zIndex: 1070,\n revert: true, // will cause the event to go back to its\n revertDuration: 0 // original position after the drag\n });\n\n });\n }", "function ONEUPGRID_itinerary_event_click(element) {\n var event = this.getEventById(element.id.split(\"_\")[3].toString());\n\n //Set the current event\n this.setSelectedEventId(element.id.split(\"_\")[3].toString());\n\n //Show the details\n if (event != null) {\n //Make sure that the mini div is hidden, and the full div is shown\n var full = document.getElementById(\"ONEUPGRID_details_content_full_div\");\n var mini = document.getElementById(\"ONEUPGRID_details_content_mini_div\");\n\n full.style.opacity = \"1\";\n full.style.display = \"block\";\n mini.style.opacity = \"0\";\n mini.style.display = \"none\";\n \n document.getElementById(\"ONEUPGRID_details\").style.height = ((window.innerHeight - 80) * .11625 * 4).toString() + \"px\"\n\n this.showEventDetails(event);\n } else {\n //TODO: Make the world blow up\n }\n }", "function report(event) {\n\n } //Ti.API.info('Annotation ' + event.title + ' clicked, ID: ' + event.annotation.myID);", "function generateEvent(s,args){var evt=document.createEvent(\"CustomEvent\");evt.initCustomEvent(s,false,false,args);return evt;}", "function createEventDisplay(event)\n{\n \n let eventHTML =\n `<li>\n <h3 class=\"detailHeading\" >${event.name.html}\n </h3>\n <img class=\"eventThumbnail img-fluid\" src=\"${event.logo.url}\" alt=\"${event.name.html}\">\n <a href=\"${event.url}\">Visit the Event page on eventbrite.com</a><br>\n <button data-event-id=\"${event.id}\" type=\"button\" class=\"btn btn-dark btn-md\">Event Details</button>\n\n </li>\n `;\n\n $('#events').append(eventHTML);\n \n}", "renderEvent(data) {\n const me = this,\n eventIdProperty = me.view.scheduledEventName + 'Id',\n eventId = data[eventIdProperty],\n layoutCache = me.cache.getTimeSpan(eventId, data.resourceId),\n renderedEvents = me.cache.getRenderedEvents(data.resourceId),\n meta = data.event.instanceMeta(me.scheduler),\n // Event might be flagged to require a new element in onEventAdd, but if it is a drag proxy it should still\n // reuse an existing element (it will be correctly linked to the drag proxy element)\n wrapperElement = me.renderTimeSpan(\n data,\n layoutCache,\n renderedEvents[data.id],\n meta.requireElement && !meta.fromDragProxy\n );\n\n if (data.assignment) {\n wrapperElement.dataset.assignmentId = data.assignment.id;\n }\n\n // Add event/task id to wrappers dataset\n // Otherwise event element won't have event id property in it's dataset and scheduler\n // won't be able to resolve event by element reference (#8943)\n if (eventId) {\n wrapperElement.dataset[eventIdProperty] = eventId;\n }\n\n renderedEvents[data.id] = data;\n\n if (meta.requireElement) {\n delete meta.requireElement;\n delete meta.fromDragProxy;\n }\n\n // This event is documented on Scheduler\n me.scheduler.trigger('renderEvent', {\n eventRecord: data.event,\n resourceRecord: data.resource,\n assignmentRecord: data.assignment,\n element: wrapperElement,\n tplData: data\n });\n }", "function onEvent(e) {\r\n \r\n // console.log(e.type);\r\n // console.log(curEvent,preEvent);\r\n if (e.type === 'onload') {\r\n console.log(\"loadEventFound\")\r\n }\r\n\r\n if (e.constructor.name === 'PointerEvent' || e.type === 'selectstart' || e.type === 'selectionchange' || e.type === 'click'){\r\n return;\r\n }\r\n //console.log(e.constructor.name, e.type, \"captured\", e.target.constructor.name);\r\n //need better Logic, which works universally.//Output is not consistent.\r\n \r\n\r\n if(e.type==='mousedown'){\r\n mD = true;\r\n mM = false; \r\n }\r\n if (e.type === 'mousemove') {\r\n mM = true;\r\n // console.log(\"mouseMove\",mM)\r\n }\r\n if(e.type === 'mouseup'){\r\n mU =true; mD = false; mM = false; \r\n console.log(\"mouseUp\");\r\n }\r\n\r\n\r\n if(mD&&mM){\r\n createElement(e);\r\n console.log(\"mouseDown\",mD,\"mouseMove\",mM,\"clickNDraw\");\r\n }\r\n\r\n\r\n\r\n}", "function eventReporter(e) {\n if (e.type !== \"keypress\") e.preventDefault();\n var display = ''; // Text to display in event box.\n display += (\"<li>Event type: <code>\" + e.type + \"</code></li>\");\n var target_box = ($(e.target).attr('id') ? $(e.target).attr('id') : $(e.target).parent().attr('id'));\n display += (\"<li>Target box: <code>\" + target_box + \"</code></li>\");\n $(\"#event-box-content\").html(display);\n}", "handleAccountCreated(evt) {\n this.createStatus = `Account record created. Id is ${evt.detail.id}.`;\n\n const event = new CustomEvent('newrecord', {\n bubbles: true,\n cancelable: true,\n composed: true,\n detail: { data: evt.detail },\n });\n this.dispatchEvent(event);\n }", "renderNewEventBtn() {\n eventContainer.innerHTML += eventHtml.makeNewEventBtn();\n }", "getEventsToRender() {}", "function addEvent(e) {\n\tif (! (layout.events.some(function (ee) {\n\t\treturn ((ee.nn == e.nn) && (ee.en == e.en));\n\t})))\n\t\tlayout.events.push(e);\n}", "addEventToWidget(event) {\n // Create date header\n if (this.lastDate === null || event.startDate.diffDays(this.lastDate) <= -1) {\n let leadingNewline = \"\";\n if (this.lastDate) {\n leadingNewline = \"\\n\\n\";\n }\n this.lastDate = event.startDate;\n let label = CalendarUtility.label(leadingNewline + this.formatEventDate(event.startDateText) + SEPARATOR_LINE, this.zoom, this.textcolor);\n this.window.add(label);\n }\n\n // Create event row\n let box = CalendarUtility.container();\n let lblEvent = CalendarUtility.label(event.name, this.zoom, this.textcolor);\n box.add(lblEvent);\n\n let dateText = event.formatEventDuration(this.lastDate);\n if (dateText) {\n let lblDate = CalendarUtility.label(dateText, this.zoom, this.textcolor, false);\n lblEvent.width = TEXT_WIDTH;\n lblDate.width = DATE_WIDTH;\n box.add(lblDate);\n } else {\n lblEvent.width = TEXT_WIDTH + DATE_WIDTH;\n }\n\n this.window.add(box);\n }", "function elementCreated(element) {\n // if \"created\" hasn't been suspended: run created code\n if (!element.hasAttribute('suspend-created')) {\n if (!element.hasAttribute('role')) {\n element.setAttribute('role', 'button');\n element.setAttribute('aria-pressed', '');\n }\n }\n }", "function newEvent(point) {\n // interactions\n if(DRAWING_HANDOFF==true || DRAWING_COLLAB==true) {\n alert(\"Please click on another event or the same event to cancel\");\n return;\n }\n\n if (overlayIsOn) {\n overlayOff();\n return;\n } \n\n //Close all open popovers\n for (var i = 0; i<flashTeamsJSON[\"events\"].length; i++) {\n var idNum = flashTeamsJSON[\"events\"][i].id;\n $(timeline_svg.selectAll(\"g#g_\"+idNum)[0][0]).popover('hide');\n }\n\n if(isUser || in_progress) { // user page\n return;\n }\n \n createEvent(point);\n}", "function createListeners(event) {\r\n mD = false;\r\n mM = false;\r\n mU = true;\r\n document[event] = onEvent;\r\n //var ehhEvent = window.addEventListener(event, onEvent);\r\n //console.log(\"event Created\",ehhEvent);\r\n //window[entity] = onEvent;\r\n}", "function appendMainEvent(x){\n\tvar i;\n\tvar parent = document.getElementById(\"MainEventOutput\");\n\tvar newLine = document.createElement(\"br\");\n\tfor (i = 0; i < x; i++){\n\t\tvar holder = i + 1;\n\t\tvar elementName = \"Event\" + holder;\n\t\t\n\t\t// Creating of Main event Div \n\t\tvar MainEvent = document.createElement(\"div\");\n\t\tMainEvent.setAttribute(\"id\", elementName);\n\n\t\t// Event ID\n\t\tvar eventID = elementName;\n\n\t\t// Event Title Creation\n\t\tvar eventTitle = document.createElement(\"h1\");\n\t\teventTitle.setAttribute(\"id\", eventID+ \"Title\");\n\t\tvar node = document.createTextNode(\"MainEvent \" + holder);\n\t\teventTitle.appendChild(node);\n\t\tMainEvent.appendChild(eventTitle);\n\n\t\t// Creation of Form aspect\n\t\tvar eventForm = document.createElement(\"form\");\n\n\t\t// Event Name Creation\n\t\tvar eventName = document.createElement(\"h2\");\n\t\teventName.appendChild(document.createTextNode(\"EventName: \"));\n\t\tvar eventNameInput = document.createElement(\"input\");\n\t\teventNameInput.setAttribute(\"placeholder\", \"Book of Moron\")\n\t\teventForm.appendChild(eventName);\n\t\teventForm.appendChild(eventNameInput);\n\n\t\t// For now assume its under wordpress but make sure we can render it as a graphic\n\t\tvar eventGraphic = document.createElement(\"h2\");\n\t\teventGraphic.appendChild(document.createTextNode(\"EventGraphic: \"));\n\t\tvar eventGraphicInput = document.createElement(\"input\");\n\t\teventGraphicInput.setAttribute(\"placeholder\", \"Image Graphic URL\");\n\t\teventForm.appendChild(eventGraphic);\n\t\teventForm.appendChild(eventGraphicInput);\n\n\t\t// Event Dates Creation\n\t\tvar eventDates = document.createElement(\"h2\");\n\t\teventDates.appendChild(document.createTextNode(\"Dates: \"));\n\t\tvar eventDatesInput = document.createElement(\"input\");\n\t\teventDatesInput.setAttribute(\"type\", \"date\");\n\t\t// eventDatesInput.setAttribute(\"placeholder\", \"place ,'s between each date if multiple\");\n\t\teventForm.appendChild(eventDates);\n\t\teventForm.appendChild(eventDatesInput);\n\n\t\t// Event Description\n\t\tvar eventDescription = document.createElement(\"h2\");\n\t\teventDescription.appendChild(document.createTextNode(\"Description: \"));\n\t\tvar eventDescriptionInput = document.createElement(\"textarea\");\n\t\teventDescriptionInput.setAttribute(\"placeholder\", \"Description\");\n\t\teventForm.appendChild(eventDescription);\n\t\teventForm.appendChild(eventDescriptionInput);\t\n\n\t\t// Event Ticket\n\t\tvar eventTicket = document.createElement(\"h2\");\n\t\teventTicket.appendChild(document.createTextNode(\"ticketLink: \"));\n\t\tvar eventTicketInput = document.createElement(\"input\");\n\t\teventTicketInput.setAttribute(\"placeholder\", \"Ticket link\");\n\n\t\teventForm.appendChild(eventTicket);\n\t\teventForm.appendChild(eventTicketInput);\n\t\teventForm.appendChild(newLine);\n\t\tMainEvent.appendChild(eventForm);\n\n\t\t// Clear button\n\t\tvar clearButton = document.createElement(\"input\");\n\t\tclearButton.setAttribute(\"type\", \"button\");\n\t\tclearButton.setAttribute(\"id\", eventID);\n\t\tclearButton.setAttribute(\"value\", \"clearButton\");\n\t\tclearButton.setAttribute(\"onclick\", \"clearEvent(this.id); return false;\");\n\t\tMainEvent.appendChild(clearButton);\n\t\tMainEvent.appendChild(newLine);\n\n\t\t// Appending it to Main EventOutput\n\t\tparent.appendChild(MainEvent);\n\t}\n\tvar addNewEvent = document.createElement(\"input\");\n\taddNewEvent.setAttribute(\"type\", \"button\");\n\taddNewEvent.setAttribute(\"value\", \"add Another Event\");\n\taddNewEvent.setAttribute(\"onclick\", \"createMainEvent(); return false;\");\n\tparent.appendChild(addNewEvent);\n}", "function _add (element, event) {\n var events = event.split(' ');\n // is this valid to add this element? e.g. you can't have `blahblah` as event name\n var valid = true;\n\n for (var i = 0; i < events.length; i++) {\n var ex = events[i];\n\n if (_options.events.indexOf(ex) == -1) {\n valid = false;\n break;\n }\n }\n\n if (valid) {\n _elements.push({\n element: element,\n event: event\n });\n } else {\n _error('Invalid event name: `' + event + '`. Skipping ' + element);\n }\n }", "function attachEventHandlers() {\n // TODO device: attach context menu to device (call showContextMenu() in model-diagram.js if context menu is called)\n $(\"#\"+title).contextmenu(function(ev){\n diagram.showContextMenu(_this, ev);\n });\n // TODO device: attach events for functionality like in assignment-document described\n $(\"#\"+title).mousedown(function(event){\n return false;\n });\n $(\"#\"+title).click(function(event){\n diagram.deviceMouseDown(_this);\n });\n\n $(\"#\"+title).dblclick(function(event) {\n alert(name[type] +\" \"+ index);\n });\n\n $(\"#\"+title).keydown(function(event){\n if(event.which == \"13\"){\n diagram.deviceMouseDown(_this);\n }\n });\n\n var x = $(\"#arrow-device-add-reference\").clone();\n x.attr(\"id\", \"arrow-symbol-\"+ title);\n $(\"#\"+title).append(x);\n $(\"#\"+title).hover(function(event){\n if($(window).width() >= 768){\n x.attr(\"style\", \"display: block;\");\n }\n }, function(event){\n x.attr(\"style\", \"display: none;\");\n });\n x.click(function(event){\n diagram.toggleArrowActive();\n });\n\n $(\"#\"+title).removeClass('ui-draggable-dragging');\n\n // TODO device: attach drag & drop functionality\n $(\"#\"+title).draggable({\n start: function(event){\n if($(window).width() <= 767){\n return false;\n }\n },\n containment: diagram.area,\n drag: function(event){\n moveDevice();\n }\n });\n\n\n // TODO device optional: attach events for bonus points for 'Tab' and 'Enter'\n $(\"#\"+_this.title).attr(\"tabindex\",\"0\");\n }", "function fillEventList(dataArr){\n dataArr.forEach(function (e, i, a){\n var eventLi = document.getElementById('type'+e.eventType+'text'+parseInt((e.year%100)-1));\n var eventList = document.getElementById(\"sampleList\").innerHTML; \n if(eventLi == null) //this math sets list element's id equal to type#text+year, e.g. type0text0\n document.getElementById('sampleList').innerHTML = eventList + '<li id= type'+e.eventType + 'text'+parseInt((e.year%100)-1) + '>' + e.text + '</li>';\n else //else, the event is a triangle\n document.getElementById('sampleList').innerHTML = eventList + '<li id= tritype'+e.eventType + 'text'+parseInt((e.year%100)-1) + '>' + e.text + '</li>';\n \n // eventLi.addEventListener(\n // \"click\",\n // function(e){\n // console.log(\"here\");\n // highlightItem(e.target);\n // },\n // false);\n })\n\n }", "callEvent(event) {\n trackEvent('Elections', 'clicked ' + event.currentTarget.id)\n }", "function DayEvent() {\n MarionetteElement.apply(this, arguments);\n}", "function recordEvent( event )\n {\n var slideData = getSlideData();\n slideData.events.push(event);\n needSave = true;\n buttonSave.style.color = \"#2a9ddf\";\n }", "function createEvt(scope, name) {\n\tif(!G.evt[scope]) G.evt[scope] = {};\n\tif(G.evt[scope][name] == null)\n\t\tG.evt[scope][name] = []; \n}", "onEventDataGenerated(renderData) {\n const me = this,\n {\n eventRecord\n } = renderData;\n\n if (me.shouldInclude(eventRecord)) {\n if (me.scheduler.isVertical) {\n renderData.width = me.scheduler.resourceColumnWidth;\n } else {\n renderData.top = 0;\n } // Flag that we should fill entire row/col\n\n renderData.fillSize = true; // Add our own cls\n\n renderData.wrapperCls[me.rangeCls] = 1;\n renderData.wrapperCls[`b-sch-color-${eventRecord.timeRangeColor}`] = eventRecord.timeRangeColor; // Add label\n\n renderData.children.push(eventRecord.name); // Event data for DOMSync comparison\n\n renderData.eventId = `${me.idPrefix}-${eventRecord.id}`;\n }\n }", "function createNewEvent() {\n\t\tcalendar.dblclick(function(event) {\n\t\t\tconsole.log(\"event\", event.originalEvent.layerX);\n\t\t\tvar orgEvent = event.originalEvent;\n\t\t\tvar _x = orgEvent.layerX;\n\t\t\tvar _y = orgEvent.layerY;\n\t\t\tvar eventTarget = calendar.find(\".events\");\n\t\t\tvar calOffset = calendar.offset();\n\t\t\tvar callOffsetX = calOffset.left;\n\t\t\tvar callOffsetY = calOffset.top;\n\t\t\tvar x = event.clientX- callOffsetX;\n\t\t\tvar y = event.clientY - callOffsetY;\n\n\t\t\tconsole.log(\"_Y\" + _y);\n\t\t\tconsole.log(\"_X\" + _x);\n\n\t\t\tvar event = \n\t\t\t\t \"<div class='event day-view cal-entry f-min noob' style='top: \" + y + \"px; left: \" + x + \"px;'>\"\n\t\t\t\t+ \"\t\t\t<dl>\"\n\t\t\t\t+ \"\t\t\t\t<dt class='tutor'>KEINE LEHRER</dt>\"\n\t\t\t\t+ \"\t\t\t\t<dt></dt>\"\n\t\t\t\t+ \"\t\t\t\t<dd class='placeholder'>KEINE SCHÜLER</dd>\"\n\t\t\t\t+ \"\t\t\t</dl>\"\n\t\t\t\t+ \"\t\t</div>\";\n\t\t\teventTarget.append(event);\n\t\t\tvar noob = eventTarget.find(\".noob\");\n\n\t\t\tconsole.log(\"MAKING AJAX REQUEST\");\n\n\t\t\t$.ajax({\n\t\t\t\ttype: \"POST\",\n\t\t\t\turl: \"http://127.0.0.1:8000/calendar\",\n\t\t\t\tdata: { \"newEvent\": \"True\", \"room\" : currCol, \"pos_x\" : _x, \"pos_y\" : _y}\n\t\t\t})\n\t\t\t.done(function( msg ) {\n\t\t\t\talert( \"Data Saved: \" + msg );\n\t\t\t});\n\n\t\t\t_this.reloadListener();\n\t\t});\n\t}", "_createElement() {\n const that = this;\n\n if (that.mode === 'numeric') {\n that._getEventValue = function () {\n return that.value;\n };\n }\n else {\n that._handleDateScale();\n that.digitalDisplay = false;\n }\n\n //Creating instances of NumericProcessor, NumberRenderer and Draw\n that._numericProcessor = new JQX.Utilities.NumericProcessor(that, 'scaleType');\n that._numberRenderer = new JQX.Utilities.NumberRenderer();\n that._draw = new JQX.Utilities.Draw(that.$.svgContainer);\n\n if (!that._isVisible()) {\n that._renderingSuspended = true;\n return;\n }\n\n that._renderingSuspended = false;\n\n that._setSettingsObject();\n\n\n that._wordLengthNumber = that._numericProcessor.getWordLength(that.wordLength);\n\n that._measurements = {};\n that._validateInitialPropertyValues();\n that._getMeasurements();\n\n that._setDrawVariables();\n that._getRange();\n that._numericProcessor.getAngleRangeCoefficient();\n\n if (that.mode === 'numeric' || !that.coerce) {\n that._validateValue();\n }\n else {\n that._coerceInitialDateValue = true;\n }\n\n that._initTickIntervalHandler();\n\n that._renderAnalogItems();\n delete that._preventResizeHandler;\n\n that._setFocusable();\n\n that._setUpdatePointerMethod();\n }", "renderedCallback() {\n //this.template.querySelector(\"lightning-input\").focus();\n var event = new CustomEvent('awesome', {\n bubbles: true,\n detail: {\n hazcheeseburger: true\n }\n });\n window.dispatchEvent(event);\n }", "function zenbuHeatmapElement_elementEvent(mode, value, value2) {\n var datasourceElement = this.datasource();\n}", "registerDomEvents() {\n\t\tgetComponentElementById(this,\"btnSave\").on(\"click\", function() {\n\t\t\tthis.saveEntity();\n\t\t}.bind(this));\n\n\t\tgetComponentElementById(this,\"btnDelete\").on(\"click\", function() {\n\t\t\tshowAlert(\"Are you sure?\",\"warning\",[\"Cancel\",\"Delete\"],false,0,this.deleteEntity.bind(this),this.doNothing);\n\t\t}.bind(this));\n\n\t}", "function logCreationEvent(id, type, message, time) {\n \n if (logMode === 'l') {\n if (!eventList.creationEvents[id]) {\n eventList.creationEvents[id] = [];\n }\n eventList.creationEvents[id].push({'type': type, 'event': message, \"timestamp\": time});\n } else if (logMode === 'v') {\n console.log(type + ': Agent ' + id + ' ' + message + ' on ' + time);\n }\n\n }", "function eventDSViewOnLoad() {\n var form = EventViewPanel.getForm();\n form.setValues(eventDS.getAt(0).data);\n form.findField('tripsDisplayFieldEvent').setValue(buildStringFromArray(eventDS.getAt(0).data.trips, \"name\", \"<br/>\"));\n}", "function genNewEventBox(newEvent) {\n let newDiv = gen('div');\n let newP = gen('p');\n newP.textContent = newEvent.value;\n newDiv.classList.add('event');\n let circle = generateCheckCircle(\"red_circle\");\n let delectCircle = genereateDeleteCircle();\n\n let time = gen('p');\n time.classList.add('timePTag');\n time.textContent = newEvent.parentNode.querySelectorAll(\"input\")[1].value;\n\n // add elements to the container box\n newDiv.appendChild(circle);\n newDiv.appendChild(newP);\n newDiv.appendChild(time);\n newDiv.appendChild(delectCircle);\n newEvent.parentNode.parentNode.appendChild(newDiv);\n }", "function AddingEventFunction(result){\n\tconsole.log(\"we are adding to the page\");\n\tconsole.log(result);\n\tvar h1Id = '#IndexNewEvent';\n\tvar x = 0;\n\tvar string;\n\twhile(x<result.length){\n\t\tstring = string + \"<h4> Title: \"+result[x]['title']+\"</h4>\"\n\t\t+ \"<img src = '\"+result[x]['image']+\"'class ='detailsImage'/>\"\n\t\t+\"<div>Summary: \"+result[x]['summary']+\"</div>\";\n\t\tx++;\n\t}\n\n\t$(h1Id).html(string);\n\n}", "renderEvent(eventData) {\n // No point in rendering event that already has an element\n const data = eventData.renderData,\n {\n resourceRecord,\n assignmentRecord\n } = data,\n // Event element config, applied to existing element or used to create a new one below\n elementConfig = {\n className: data.wrapperCls,\n tabIndex: '0',\n children: [{\n className: data.cls,\n style: (data.internalStyle || '') + (data.style || ''),\n children: data.children,\n dataset: {\n // Each feature putting contents in the event wrap should have this to simplify syncing and\n // element retrieval after sync\n taskFeature: 'event'\n },\n syncOptions: {\n syncIdField: 'taskBarFeature'\n }\n }, ...data.wrapperChildren],\n style: {\n transform: `translate(${data.left}px, ${data.top}px)`,\n // DomHelper appends px to dimensions when using numbers\n height: data.height,\n width: data.width,\n zIndex: data.zIndex,\n style: data.wrapperStyle || ''\n },\n dataset: {\n resourceId: resourceRecord.id,\n eventId: data.eventId,\n // Not using eventRecord.id to distinguish between Event and ResourceTimeRange\n // Sync using assignment id for events and event id for ResourceTimeRanges\n syncId: assignmentRecord ? assignmentRecord.id : data.eventId\n },\n // Will not be part of DOM, but attached to the element\n elementData: eventData,\n // Dragging etc. flags element as retained, to not reuse/release it during that operation. Events\n // always use assignments, but ResourceTimeRanges does not\n retainElement: (assignmentRecord || data.eventRecord).instanceMeta(this.scheduler).retainElement,\n // Options for this level of sync, lower levels can have their own\n syncOptions: {\n syncIdField: 'taskFeature',\n // Remove instead of release when a feature is disabled\n releaseThreshold: 0\n }\n }; // Do not want to spam dataset with empty prop when not using assignments (ResourceTimeRanges)\n\n if (assignmentRecord) {\n elementConfig.dataset.assignmentId = assignmentRecord.id;\n }\n\n this.scheduler.trigger('beforeRenderEvent', {\n renderData: data,\n domConfig: elementConfig\n }); // Allows access to the used config later, for example to retrieve element\n\n eventData.elementConfig = elementConfig;\n return elementConfig;\n }", "function newTechspecEvent()\r\n{\r\n\tvar url = \"new\";\r\n\tvar htmlAreaObj = _getWorkAreaDefaultObj();\r\n\tvar objAjax = htmlAreaObj.getHTMLAjax();\r\n\tvar objHTMLData = htmlAreaObj.getHTMLDataObj();\r\n\r\n\tsectionName = objAjax.getDivSectionId();\r\n\t//alert(\"sectionName \" + sectionName);\r\n\tif(objAjax && objHTMLData)\r\n\t{\r\n\t if(!isValidRecord(true))\r\n\t\t{\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tbShowMsg = true;\r\n\t Main.loadWorkArea(\"techspecevents.do\", url);\r\n\t}\r\n}", "function recordEvent(info) {\n ///console.log('event', info);\n var detail = { detail: info };\n var event = new CustomEvent('benchmarkEvent', detail);\n document.dispatchEvent(event);\n }", "addEventHandlers() {\n\n\t\tthis.elementConfig.addButton.on(\"click\",this.handleAdd);\n\t\tthis.elementConfig.cancelButton.on(\"click\",this.handleCancel);\n\t\tthis.elementConfig.retrieveButton.on(\"click\",this.retrieveData);\n\n\n\t}", "function viewsEvents()\n { $('#tree .b-delete-view').attr('title', T('DELETE_VIEW'));\n }", "function setEvents(events, elementID, from){\n var container = document.getElementById(elementID);\n while(container.firstChild){ container.removeChild(container.firstChild) }\n for(let i=0; i<events.length; i++){\n var div = document.createElement('div');\n div.className = \"event card-1\";\n div.onclick = () => goToEvent(events[i].id, from);\n \n var img = document.createElement('img');\n img.className = \"event_image\";\n img.src = events[i].image;\n div.appendChild(img);\n \n var title = document.createElement('p');\n title.className = \"eventBox_borderBottom\";\n var title_txt = document.createTextNode(events[i].title);\n title.append(title_txt);\n div.appendChild(title);\n \n var date = document.createElement('p');\n date.className = \"date_text\"\n var date_txt = document.createTextNode(createDateString(events[i].date));\n date.append(date_txt);\n div.appendChild(date);\n \n container.appendChild(div);\n }\n}", "function reportEvents(_events) {\n\t\t\tevents = _events;\n\t\t\trenderEvents();\n\t\t}", "push(e) {\n this.elements.add(e);\n }", "function EventRenderWrapper() {\n /**\n * Related elements\n */\n this.Elements = [];\n }", "function EventWindow(parent){this.parent=parent;this.l10n=this.parent.localeObj;this.fields=this.parent.eventFields;this.eventWindowTime={startTime:new Date(),endTime:new Date()};this.fieldValidator=new FieldValidator();this.renderEventWindow();}", "onEvent() {\n \n }", "function scriptEventFired(node)\r\n{\r\n\ttry\r\n\t{\r\n\t\tscriptLog(\"Event fired!\");\r\n\t\taddElement(node);\r\n\t}\r\n\tcatch(err) { logError(err); }\r\n}", "function reportEvents(_events) {\n events = _events;\n renderEvents();\n }", "function packEventData(el, seriesModel, itemNode) {\n\t el.eventData = {\n\t componentType: 'series',\n\t componentSubType: 'treemap',\n\t seriesIndex: seriesModel.componentIndex,\n\t seriesName: seriesModel.name,\n\t seriesType: 'treemap',\n\t selfType: 'breadcrumb', // Distinguish with click event on treemap node.\n\t nodeData: {\n\t dataIndex: itemNode && itemNode.dataIndex,\n\t name: itemNode && itemNode.name\n\t },\n\t treePathInfo: itemNode && helper.wrapTreePathInfo(itemNode, seriesModel)\n\t };\n\t}", "function addEvent() {\n let newEvent = this.nextElementSibling;\n if (newEvent.value && this.parentNode.querySelectorAll(\"input\")[1].value) {\n genNewEventBox(newEvent);\n }\n }", "internalAddEvent(startDate, resourceRecord, row) {\n const me = this,\n resourceRecords = [resourceRecord],\n eventRecord = new me.eventStore.modelClass({\n startDate,\n endDate: DateHelper.add(startDate, 1, me.timeAxis.unit)\n });\n\n me.onEventCreated(eventRecord);\n\n if (me.eventEdit) {\n const eventData = me.currentOrientation.getTimeSpanRenderData(eventRecord, resourceRecord),\n proxyEl = (me.eventEdit.dragProxyElement = DomHelper.createElement({\n parent: me.foregroundCanvas,\n className: 'b-sch-dragcreator-proxy',\n style: `width:${eventData.width}px;height:${eventData.height}px`\n }));\n\n DomHelper.setTranslateXY(proxyEl, eventData.left, ((row && row.top) || 0) + eventData.top);\n\n me.editEvent(eventRecord, resourceRecord, proxyEl);\n return;\n }\n\n /**\n * Fires before an event is added. Can be triggered by schedule double click, drag create action, or by the event editor.\n * @event beforeEventAdd\n * @param {Scheduler.view.Scheduler} source The Scheduler instance\n * @param {Scheduler.model.EventModel} eventRecord The record about to be added\n * @param {Scheduler.model.ResourceModel[]} resources **Deprecated** Use `resourceRecords` instead\n * @param {Scheduler.model.ResourceModel[]} resourceRecords Resources that the record is assigned to\n * @preventable\n */\n if (me.trigger('beforeEventAdd', { eventRecord, resourceRecords, resources: resourceRecords }) !== false) {\n me.eventStore.add(eventRecord);\n me.eventStore.assignEventToResource(eventRecord, resourceRecord);\n }\n }", "function createElementsOnCheckEventsCLicked(artist, eventsList) {\r\n if (artist === null) {\r\n return;\r\n }\r\n let firstCont = document.createElement(\"div\");\r\n firstCont.className = \"row\";\r\n firstCont.id = \"events-items\";\r\n\r\n let secondCont = document.createElement(\"div\");\r\n secondCont.style.marginLeft = \"18px\";\r\n\r\n let card = getArtistEventsCard(artist);\r\n card.id = \"artist-ev\";\r\n\r\n\r\n let button = document.createElement('button');\r\n button.id = \"back-btn\"\r\n button.type = \"button\";\r\n button.className = \"btn btn-light\";\r\n button.innerHTML = \"<svg width='1em' height='1em' viewBox='0 0 16 16' class='bi bi-arrow-left' fill='currentColor' xmlns='http://www.w3.org/2000/svg'><path fill-rule='evenodd' d='M15 8a.5.5 0 0 0-.5-.5H2.707l3.147-3.146a.5.5 0 1 0-.708-.708l-4 4a.5.5 0 0 0 0 .708l4 4a.5.5 0 0 0 .708-.708L2.707 8.5H14.5A.5.5 0 0 0 15 8z'/></svg>\";\r\n button.style.borderRadius = \"10px\";\r\n button.style.marginLeft = \"18px\";\r\n button.style.marginTop = \"10px\";\r\n button.onclick = () => { onBackBtnClicked() };\r\n\r\n secondCont.appendChild(button);\r\n secondCont.appendChild(card);\r\n\r\n firstCont.appendChild(secondCont);\r\n firstCont.appendChild(createListOfEvents(eventsList));\r\n\r\n bodyElement.appendChild(firstCont);\r\n}", "function setUpOnEventoElemento (idElemento, evento, funcao) {\r\n\tsetUpEventos (\"\", idElemento, evento, funcao,\"\");\r\n}", "onEventDataGenerated(renderData) {\n const me = this,\n record = renderData.event || renderData.eventRecord; // Differs by mode\n\n if (record.isResourceTimeRange) {\n if (me.scheduler.isVertical) {\n renderData.width = me.scheduler.resourceColumnWidth;\n } else {\n renderData.top = 0;\n // Avoid colliding ids by using a prefix\n renderData.id = `${me.scheduler.id}-${me.idPrefix}-${record.id}`;\n }\n\n // Flag that we should fill entire row/col\n renderData.fillSize = true;\n // Needed for caching\n renderData.eventId = `${me.idPrefix}-${record.id}`;\n // Add our own cls\n renderData.wrapperCls[me.rangeCls] = 1;\n renderData.wrapperCls[`b-sch-color-${record.timeRangeColor}`] = record.timeRangeColor;\n // Add label\n renderData.body = document.createDocumentFragment();\n renderData.body.textContent = record.name;\n }\n }", "function eventFunction(e){\r\n\t//drawAllEvents();\r\n\tvar dayevents = getSlot(e.startArray, EC);\r\n\tif (!dayEventDup(e,dayevents)){\r\n\t dayevents.push(e);\r\n\t dayevents.sort(sortByEventTime);\r\n\t // show number of events, if it is amongst currently shown queries\r\n\t if (queryStates[e.qid]==1){\r\n\t\teventSource.loadQueryEvents([e]);\r\n\t }\r\n\t} \r\n }", "function report_target(e){ \n console.log('New event triggered on: ' + e.target);\n}", "addEventListeners() {\n document.getElementById('addBoard').addEventListener('click', this.handleAddBoardButtonClick);\n const templateButtons = document.getElementsByClassName('js-createBoardByTemplate');\n for (const button of templateButtons) {\n button.addEventListener('click', (event) => {\n event.stopPropagation();\n const templateName = event.currentTarget.getAttribute('data-template-name');\n this.eventBus.call('addBoardByTemplate', templateName);\n });\n }\n }", "function AttachOnClick(element, eventName) {\n var self = this;\n\n switch (eventName) {\n case \"ONEUPGRID_itinerary_event_click\":\n element.onclick = function () { self.ONEUPGRID_itinerary_event_click(this); };\n break;\n case \"ONEUPGRID_details_close_div_click\":\n element.onclick = function () { self.ONEUPGRID_details_close_div_click(this); };\n break;\n case \"ONEUPGRID_details_actions_link_click\":\n element.onclick = function () { self.ONEUPGRID_details_actions_link_click(this); };\n break;\n case \"ONEUPGRID_details_title_map_click\":\n element.onclick = function () { self.ONEUPGRID_details_title_map_click(this); };\n break;\n case \"ONEUPGRID_details_content_mini_details_button_click\":\n element.onclick = function () { self.ONEUPGRID_details_content_mini_details_button_click(this); };\n break;\n case \"ONEUPGRID_details_content_mini_directions_button_click\":\n element.onclick = function () { self.ONEUPGRID_details_content_mini_directions_button_click(this); };\n break;\n case \"ONEUPGRID_details_content_mini_previous_div_click\":\n element.onclick = function () { self.ONEUPGRID_details_content_mini_previous_div_click(this); };\n break;\n case \"ONEUPGRID_details_content_mini_next_div_click\":\n element.onclick = function () { self.ONEUPGRID_details_content_mini_next_div_click(this); };\n break;\n case \"ONEUPGRID_mapnav_click\":\n element.onclick = function () { self.ONEUPGRID_mapnav_click(this); };\n break;\n };\n\n element = null;\n }", "function reportEventChange(event) {// event is change from eventID\t\n\t\trerenderEvents(event.id);\t\t\n\t\tvar currentObj = event;\n\t\tdate = currentObj.start;\n\t\tif (options.isDBUpdateonDrag && currentObj.isCurrent == false && options.defaultView=='month') {\n\t\t\tvar $scrollable = $(currentView.element).find(\"#scroll-slots\");\n\t\t\tvar parentContainerID = $scrollable.find(\"#dragable-\" + currentObj.id)\n\t\t\t\t\t.attr(\"id\");\n\t\t\tvar message = currentObj.msg;\n\t\t\tvar messageAndUIBinder = new MessageAndUIBinder(parentContainerID,\n\t\t\t\t\tmessage, AppConstants.XPaths.Appointment.MESSAGE_TYPE);\n\t\t\tif (messageAndUIBinder) {\n\t\t\t\tvar lookupHandler = appController.getComponent(\"DataLayer\").lookupHandler;\n\t\t\t\tmessageAndUIBinder.loadDataOntoForm(lookupHandler);\n\t\t\t\tmessageAndUIBinder.bindFieldEvents();\n\n\t\t\t\tvar fields = \"\";\n\t\t\t\tvar type = \"IVL_TS\";\n\t\t\t\tvar tagName = \"effectiveTime\";\n\t\t\t\tvar pathFields = fields.split(',');\n\t\t\t\tcurrentObj.start = CommonUtil.dateFormat(parseDate(currentObj.start),\n\t\t\t\t\t\t\"fullDateTime\");\n\t\t\t\tcurrentObj.end = CommonUtil.dateFormat(parseDate(currentObj.end),\n\t\t\t\t\t\t\"fullDateTime\");\n\t\t\t\tinstanceObject = [ currentObj.start, currentObj.end ];\n\t\t\t\tmessageAndUIBinder.writeValueToMessage(tagName, pathFields,\n\t\t\t\t\t\ttype, instanceObject);\n\t\t\t\tmessageAndUIBinder.bindFieldEvents();\n\t\t\t\t$(messageAndUIBinder.parentContainerID).trigger(\"change\");\n\t\t\t}\n\t\t\tcurrentObj.start = parseDate(currentObj.start);\n\t\t\tcurrentObj.end = parseDate(currentObj.end);\t\t\t\n\t\t\tonChangeSchedule(currentObj);\t\n\t\t}\n\t}", "function displayEvent(event) {\n var display = '<div class=\"box\">';\n display += \"<p class=\\\"subtitle is-5\\\">\" + event.name + \"</p>\";\n display += createButton(EVENT_NOTIFY_TEXT, \"showNotifyEvent\", event._id, \"button is-small\",\n \"event_notification_button\"+event._id);\n display += '<div id=\"eventNotifyText' + event._id + '\"></div>'\n display += \"<br>\"\n var showNumber = 1;\n //display = displayShowsForEvent(event, display)\n event.shows.forEach((show) => {\n var list = \"<ul id=\\\"\" + show._id + \"\\\"></ul>\";\n var name = \"Show #\" + showNumber + \" on \" + prettyDate(show.start_date) + \" at \" + prettyTime(show.start_time);\n var tickets = \"<br>Tickets sold: \" + show.tickets_sold;\n var btn1 = createButton(TOGGLE_ATTENDEES_TEXT, \"viewShow\", show._id, \"button is-small\",\"show_button\"+show._id);\n var btn2 = createButton(SHOW_NOTIFY_TEXT, \"showNotifyShow\", show._id, \"button is-small\",\n \"show_notification_button\" + show._id);\n var notificationBox = '<div id=\"showNotifyText' + show._id + '\"></div>';\n display += name + tickets + \"<br>\" + \n btn1 + btn2 + notificationBox + list + \"<br>\";\n showNumber += 1;\n }); \n var footer = '<footer class=\"card-footer\">';\n footer += '<a href=\"/edit_event/'+encodeURI(event.name)+'\" class=\"card-footer-item\">Edit Event</a>'\n footer += '<a href=\"/view_stats/'+encodeURI(event.name)+'\" class=\"card-footer-item\">Statistics</a>'\n footer += '</footer>';\n display += footer;\n display += ' </div>'\n return display;\n}", "function reportEvents(_events) {\n\t\tevents = _events;\n\t\trenderEvents();\n\t}", "function reportEvents(_events) {\n\t\tevents = _events;\n\t\trenderEvents();\n\t}", "function reportEvents(_events) {\n\t\tevents = _events;\n\t\trenderEvents();\n\t}", "function reportEvents(_events) {\n\t\tevents = _events;\n\t\trenderEvents();\n\t}", "function reportEvents(_events) {\n\t\tevents = _events;\n\t\trenderEvents();\n\t}", "function reportEvents(_events) {\n\t\tevents = _events;\n\t\trenderEvents();\n\t}" ]
[ "0.6776793", "0.6702373", "0.6371938", "0.6188468", "0.6181015", "0.6181015", "0.6181015", "0.6172564", "0.6078908", "0.60667634", "0.6004926", "0.59632623", "0.5922792", "0.589542", "0.5859667", "0.5859667", "0.5851978", "0.5837908", "0.58021235", "0.5784641", "0.57688", "0.57408994", "0.57396406", "0.5728859", "0.5705489", "0.5633683", "0.5627611", "0.5606963", "0.5606963", "0.55941015", "0.55706424", "0.55494803", "0.55423075", "0.5535941", "0.5531457", "0.55274343", "0.55184025", "0.5518306", "0.5517975", "0.5455089", "0.5445998", "0.5428018", "0.5421088", "0.54163295", "0.54159594", "0.5404457", "0.54023004", "0.5396413", "0.53942764", "0.5388103", "0.53855324", "0.5379182", "0.53742075", "0.5362731", "0.53374046", "0.5328524", "0.5327134", "0.53270024", "0.53106123", "0.5307208", "0.5307109", "0.5303073", "0.5299624", "0.5298039", "0.5293395", "0.5291878", "0.5281423", "0.5278686", "0.52734333", "0.5272786", "0.527121", "0.52673006", "0.5266632", "0.5266363", "0.5265321", "0.52595276", "0.52574205", "0.52527195", "0.5250676", "0.52433413", "0.5235775", "0.52301794", "0.5223664", "0.5223642", "0.5220774", "0.52206033", "0.5214012", "0.52136457", "0.52095306", "0.5208896", "0.5206227", "0.5206227", "0.5206227", "0.5206227", "0.5206227", "0.5206227" ]
0.6136239
12
attaches eventClick, eventMouseover, eventMouseout
function eventElementHandlers(event, eventElement) { eventElement .click(function(ev) { if (!eventElement.hasClass('ui-draggable-dragging') && !eventElement.hasClass('ui-resizable-resizing')) { return trigger('eventClick', this, event, ev); } }) .hover( function(ev) { trigger('eventMouseover', this, event, ev); }, function(ev) { trigger('eventMouseout', this, event, ev); } ); // TODO: don't fire eventMouseover/eventMouseout *while* dragging is occuring (on subject element) // TODO: same for resizing }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function addE(n){\n n.addEventListener(\"mouseover\", over);\n n.addEventListener(\"mouseout\", out);\n n.addEventListener(\"click\", click);\n}", "function addEventListeners() {\r document.getElementById(\"clickTag\").addEventListener(\"click\", clickthrough);\r\tdocument.getElementById(\"clickTag\").addEventListener(\"mouseover\", mouseOver);\r\tdocument.getElementById(\"clickTag\").addEventListener(\"mouseout\", mouseOff);\r}", "function addEventsToElement(ele) {\n ele.style.cursor=\"pointer\";\n if (ele.addEventListener) {\n ele.addEventListener('click',clickedTag,false);\n ele.addEventListener('mouseover',mouseoverTag,false);\n ele.addEventListener('mouseout',mouseoutTag,false);\n } else if (ele.attachEvent) {\n //alert(\"You are using IE. I will register the events, but \\n be warned that they fail.\");\n ele.attachEvent('onclick',clickedTag);\n ele.attachEvent('onmouseover',mouseoverTag);\n ele.attachEvent('onmouseout',mouseoutTag);\n }\n}", "function setEventBehaviour(){\n\t\t\tbutton.style(\"pointer-events\",\"all\");\n\t\t}", "function addEvents(){\n\t$(\".mainListItem\").hover(\n\t\tfunction() {\n\t\t\t$(this).animate({\"backgroundColor\":\"#252525\"}, 100);\n\t\t\t//alert(\"IN\");\n\t\t},\n\t\tfunction() {\n\t\t\t$(this).animate({\"backgroundColor\":\"#494949\"}, 100);\n\t\t\t//alert(\"OUT\");\n\t\t}\n\t);\n\n\t// $(\".mainListItem\").click(\n\t// \tfunction() {\n\t// \t\twindow.open('https://instagram.com/igor.mec', '_blank'); \t\t\n\t// \t}\n\t// );\n\n\t$(\".profimg\").click(\n\t\tfunction() {\n\t\t\tselectProfile(this);\t\t\t\n\t\t}\n\t);\n}", "e_mouseOver(e)\n\t{\n\n\t}", "_evtClick(event) { }", "_buttonsMouseEventsHandler(event) {\n const that = this;\n\n if (that.disabled || that.readonly) {\n return;\n }\n\n if (event.type === 'mouseenter') {\n event.target.setAttribute('hover', '');\n that.setAttribute('hover', '');\n\n if (that.dropDownOpenMode === 'auto' && !(JQX.TextBox && that instanceof JQX.TextBox)) {\n if (event.target === that.$.dropDownButton) {\n that.open();\n that.$.input.focus();\n }\n else {\n that.close();\n }\n }\n }\n else {\n event.target.removeAttribute('hover');\n that.removeAttribute('hover');\n }\n }", "function onMouseClick(e) {\n eventHandler.mouseClickHandler(e);\n}", "onElementMouseUp(event) {}", "onElementMouseUp(event) {}", "function addEvents(){ //establishes addEvents function\n\n\t\n\n\t$('mydiv').mouseover (function(i) { //uses jquery mouseover function on the table and establishes a function of i\n\t\t\n\t\tvar color = \"rgb(\"; //establishes color variable with setting up the rgb(x,x,x) format\n\n\t\tfor (var i=0; i<3; i++){ //for loop with varible i that runs 3x\n\n\t\t\tvar random = Math.round(Math.random() * 255); //establishes a variable that will generate a random between 0 and 255\n\n\t\t\tcolor += random; //adds veriables together \n\n\t\t\tif (i<2){ //if its the first or second rgb value have a comma afetr it to stick with proper format\n\t\t\t\tcolor += \",\";\n\t\t\t\n\t\t\t} else {\n\t\t\t\tcolor += \")\"; //if its the last one, put a ) afetr it to stick with format\n\t\t\t};\n\t\t};\n\n\t\t$(this).css('color', color); //appends css with the random created rgb colors\n\t});\n\n\tfunction clickme(){ //establishes click function\n\n\t\talert('Hey, you clicked me!'); //alert message\n\t};\n\n\t$('mydiv').on('click', clickme); //establishes that this will be done on the table through jquery on method\n}", "function fireMouseOut(e) {\n console.log('out', e);\n\n }", "function onEvent(e) {\r\n \r\n // console.log(e.type);\r\n // console.log(curEvent,preEvent);\r\n if (e.type === 'onload') {\r\n console.log(\"loadEventFound\")\r\n }\r\n\r\n if (e.constructor.name === 'PointerEvent' || e.type === 'selectstart' || e.type === 'selectionchange' || e.type === 'click'){\r\n return;\r\n }\r\n //console.log(e.constructor.name, e.type, \"captured\", e.target.constructor.name);\r\n //need better Logic, which works universally.//Output is not consistent.\r\n \r\n\r\n if(e.type==='mousedown'){\r\n mD = true;\r\n mM = false; \r\n }\r\n if (e.type === 'mousemove') {\r\n mM = true;\r\n // console.log(\"mouseMove\",mM)\r\n }\r\n if(e.type === 'mouseup'){\r\n mU =true; mD = false; mM = false; \r\n console.log(\"mouseUp\");\r\n }\r\n\r\n\r\n if(mD&&mM){\r\n createElement(e);\r\n console.log(\"mouseDown\",mD,\"mouseMove\",mM,\"clickNDraw\");\r\n }\r\n\r\n\r\n\r\n}", "onMouseUp(e) {}", "onMouseUp(event) {\n\t\tcurrentEvent = event\n\t\tthis.isClicked = false\n\t\tthis.render()\n\t}", "_mouseEventsHandler(event) {\n const that = this;\n\n event.type === 'mouseenter' ? that.setAttribute('hover', '') : that.removeAttribute('hover');\n }", "_addEvents () {\n this.container.classList.add(\"tooltiped\");\n\n this.container.addEventListener(\"mouseenter\", this._mouseOver.bind(this));\n this.container.addEventListener(\"mousemove\", this._mouseMove.bind(this));\n this.container.addEventListener(\"mouseleave\", this._mouseOut.bind(this));\n }", "_buttonsMouseEventsHandler(event) {\n const that = this;\n\n if (that.disabled) {\n return;\n }\n\n if (event.type === 'mouseenter') {\n that.setAttribute('hover', '');\n event.target.setAttribute('hover', '');\n }\n else {\n that.removeAttribute('hover');\n event.target.removeAttribute('hover');\n }\n }", "_buttonsMouseEventsHandler(event) {\n const that = this;\n\n if (that.disabled) {\n return;\n }\n\n if (event.type === 'mouseenter') {\n that.setAttribute('hover', '');\n event.target.setAttribute('hover', '');\n }\n else {\n that.removeAttribute('hover');\n event.target.removeAttribute('hover');\n }\n }", "function AttachOnClick(element, eventName) {\n var self = this;\n\n switch (eventName) {\n case \"ONEUPGRID_itinerary_event_click\":\n element.onclick = function () { self.ONEUPGRID_itinerary_event_click(this); };\n break;\n case \"ONEUPGRID_details_close_div_click\":\n element.onclick = function () { self.ONEUPGRID_details_close_div_click(this); };\n break;\n case \"ONEUPGRID_details_actions_link_click\":\n element.onclick = function () { self.ONEUPGRID_details_actions_link_click(this); };\n break;\n case \"ONEUPGRID_details_title_map_click\":\n element.onclick = function () { self.ONEUPGRID_details_title_map_click(this); };\n break;\n case \"ONEUPGRID_details_content_mini_details_button_click\":\n element.onclick = function () { self.ONEUPGRID_details_content_mini_details_button_click(this); };\n break;\n case \"ONEUPGRID_details_content_mini_directions_button_click\":\n element.onclick = function () { self.ONEUPGRID_details_content_mini_directions_button_click(this); };\n break;\n case \"ONEUPGRID_details_content_mini_previous_div_click\":\n element.onclick = function () { self.ONEUPGRID_details_content_mini_previous_div_click(this); };\n break;\n case \"ONEUPGRID_details_content_mini_next_div_click\":\n element.onclick = function () { self.ONEUPGRID_details_content_mini_next_div_click(this); };\n break;\n case \"ONEUPGRID_mapnav_click\":\n element.onclick = function () { self.ONEUPGRID_mapnav_click(this); };\n break;\n };\n\n element = null;\n }", "function addEvents() {\n for (let index = 0; index < boxs.length; index ++) {\n boxs[index].addEventListener('mouseenter', mouseEnter,true);\n boxs[index].addEventListener('mouseleave', mouseLeave, true);\n boxs[index].addEventListener('click', mouseClick, true);\n }\n}", "function mouseOver(ev) {\n ev.target.style.opacity = 0.5;\n}", "onClick(event) {\n\t\t// console.log(\"mouse click\");\n\t\tthis.draw(event);\n\t}", "function addEvents(){\r\n// jquery selects the table element and applie a mouseover method using an anonymous function.\r\n\t$('table').mouseover(function(){\r\n\t\t// variable for color is defined which below will be added to the random variable that will be created next\r\n\t\tvar color = \"rgb(\";\r\n\t\t// a never ending for loop is used below to assign random digits to the random variable\r\n\t\tfor (var i=0; i<3; i++){\r\n\t\t\t// random variable is assigned to a Math module and the round and random methods *255 to generate different numbers\r\n\t\t\tvar random = Math.round(Math.random() * 255);\r\n\t\t\t// the color variable is appended to the random variable\r\n\t\t\tcolor += random;\r\n\t\t\t// Conditional statements are used to append in commas or a paretheses to close the value on the color variable\r\n\t\t\tif (i<2){\r\n\t\t\t\tcolor += \",\";\r\n\r\n\t\t\t} else {\r\n\t\t\t\tcolor += \")\";\r\n\t\t\t}\r\n\t\t};\r\n\t\t// jquery selects the current element and uses the css method with the color listener to set the value of they style (color) attribute to the table\r\n\t\t$(this).css('color', color);\r\n\t});\r\n\r\n\r\n\t//another new function called click me which is part of addEvents function which is called above\r\n\tfunction clickme(){\r\n\t\t// this function includes an alert, or a pop-up box with the following text when the function is called.\r\n\t\talert('Hey, you clicked me!');\r\n\t};\r\n\t// jquery slects the table element and uses the on method with an event lisener 'click' to indicate the clickme function should be called\r\n\t$('table').on('click', clickme);\r\n}", "function event_cat_mouseOver(){\n\tdiv_cat.style.cursor = 'grab';\n}", "e_mouseOut(e)\n\t{\n\n\t}", "function init(){\n $('#grid .row').on('mouseover', 'div.drawable',function(){\n console.log('moved over');\n if(MouseState.isMouseDown === true)\n {\n \tprocessClick($(this));\n }\n });\n $('#grid .row').on('mousedown', 'div.drawable',function(){\n console.log('clicked');\n MouseState.isMouseDown = true;\n processClick($(this));\n });\n $('#grid .row').on('contextmenu', 'div.drawable',function(event){\n \tconsole.log('right clicked');\n \tMouseState.isEraseSelected = true;\n \tprocessClick($(this));\n \tevent.preventDefault();\n });\n $('body').on('mouseup',function(){\n console.log('released');\n MouseState.isMouseDown = false;\n MouseState.isEraseSelected = false;\n });\n }", "function triggerClickHoverEvent(eventname, event, seriesFilter) {\n var offset = eventHolder.offset()\n , canvasX = event.pageX - offset.left - plotOffset.left\n , canvasY = event.pageY - offset.top - plotOffset.top\n , pos = canvasToAxisCoords({\n left: canvasX,\n top: canvasY\n });\n\n pos.pageX = event.pageX;\n pos.pageY = event.pageY;\n\n var item = findNearbyItem(canvasX, canvasY, seriesFilter);\n\n if (item) {\n // fill in mouse pos for any listeners out there\n item.pageX = parseInt(item.series.xaxis.p2c(item.datapoint[0]) + offset.left + plotOffset.left, 10);\n item.pageY = parseInt(item.series.yaxis.p2c(item.datapoint[1]) + offset.top + plotOffset.top, 10);\n }\n\n if (options.grid.autoHighlight) {\n // clear auto-highlights\n for (var i = 0; i < highlights.length; ++i) {\n var h = highlights[i];\n if (h.auto == eventname && !(item && h.series == item.series && h.point[0] == item.datapoint[0] && h.point[1] == item.datapoint[1]))\n unhighlight(h.series, h.point);\n }\n\n if (item)\n highlight(item.series, item.datapoint, eventname);\n }\n\n placeholder.trigger(eventname, [pos, item]);\n }", "function _tagClicks(evObj, evCat, evAct, evLbl, evVal)\n\t{\n\t\tif (evObj.addEventListener)\n\t\t{\n\t\t\tevObj.addEventListener('mousedown', function() {\n _sendEvent(evCat, evAct, evLbl, evVal); });\n\t\t}\n\t\telse if (evObj.attachEvent)\n\t\t{\n\t\t\tevObj.attachEvent('onmousedown', function() {\n _sendEvent(evCat, evAct, evLbl, evVal); });\n\t\t}\n }", "function mouseEvents(){\n document.getElementById(\"manual_button\").addEventListener(\"mouseover\", function(){\n this.src='images/hover_manual.png';\n });\n document.getElementById(\"manual_button\").addEventListener(\"mouseout\", function(){\n this.src='images/manual_button.png';\n });\n document.getElementById(\"data_button\").addEventListener(\"mouseover\", function(){\n this.src='images/hover_data.png';\n });\n document.getElementById(\"data_button\").addEventListener(\"mouseout\", function(){\n this.src='images/data_button.png';\n });\n}", "_mouseEvent(eventType, e)\n\t{\n\t\tswitch(eventType)\n\t\t{\n\t\t\tcase ComponentEvent.MOUSE_OVER:\n\t\t\t\tdocument.body.style.cursor = 'pointer';\n\t\t\t\tbreak;\n\n\t\t\tcase ComponentEvent.MOUSE_OUT:\n\t\t\t\tdocument.body.style.cursor = 'default';\n\t\t\t\tbreak;\n\n\t\t\tdefault:\n\t\t\t\tbreak;\n\t\t}\n\n\t\tsuper._mouseEvent(eventType, e);\n\t}", "function addClickEvents() {\n\t\tnodeElements.on(\"click\", function (clickedNode) {\n\t\t\tevent.stopPropagation();\n\t\t\texecuteModules(clickedNode);\n\t\t});\n\n\t\tlabelGroupElements.selectAll(\".label\").on(\"click\", function (clickedProperty) {\n\t\t\tevent.stopPropagation();\n\t\t\t// to be sure that will be highlight clicked element.\n\t\t\tclickedProperty.labelElement(d3.select(this));\n\t\t\tclickedProperty.displayBoth = false;\n\t\t\texecuteModules(clickedProperty);\n\t\t});\n\t}", "function addEventPanel() {\n var div = document.createElement( \"div\" );\n div.style.width = container.style.width;\n div.style.height = container.style.height;\n div.style.position = \"absolute\";\n div.style.zIndex = 90;\n \n _eventPanel = div;\n container.appendChild( div );\n \n // EventHandler registrieren\n _eventPanel.addEventListener( \"mouseover\", onMouseOver, true );\n _eventPanel.addEventListener( \"mouseout\", onMouseOut, true );\n _eventPanel.addEventListener( \"mousemove\", onMouseMove, true );\n _eventPanel.addEventListener( \"click\", onClick, true );\n }", "_mouseEvent(eventType, e)\n\t{\n\t\tswitch(eventType)\n\t\t{\n\t\t\tcase ComponentEvent.MOUSE_OVER:\n\t\t\t\tdocument.body.style.cursor = 'pointer';\n\t\t\t\tbreak;\n\n\t\t\tcase ComponentEvent.MOUSE_OUT:\n\t\t\t\tdocument.body.style.cursor = 'default';\n\t\t\t\tbreak;\n\n\t\t\tcase ComponentEvent.CLICK:\n\t\t\t\tthis.SwitchState();\n\t\t\t\tbreak;\n\n\t\t\tdefault:\n\t\t\t\tbreak;\n\t\t}\n\n\t\tsuper._mouseEvent(eventType, e);\n\t}", "_mouseEvent(eventType, e)\n\t{\n\t\tswitch(eventType)\n\t\t{\n\t\t\tcase ComponentEvent.MOUSE_OVER:\n\t\t\t\tdocument.body.style.cursor = 'pointer';\n\t\t\t\tbreak;\n\n\t\t\tcase ComponentEvent.MOUSE_OUT:\n\t\t\t\tdocument.body.style.cursor = 'default';\n\t\t\t\tbreak;\n\n\t\t\tcase ComponentEvent.CLICK:\n\t\t\t\tthis.SwitchState();\n\t\t\t\tbreak;\n\n\t\t\tdefault:\n\t\t\t\tbreak;\n\t\t}\n\n\t\tsuper._mouseEvent(eventType, e);\n\t}", "function n(a,b){b.click(function(c){if(!b.hasClass(\"ui-draggable-dragging\")&&!b.hasClass(\"ui-resizable-resizing\"))return h(\"eventClick\",this,a,c)}).hover(function(b){h(\"eventMouseover\",this,a,b)},function(b){h(\"eventMouseout\",this,a,b)})}", "function setEventInspektor(divPanel)\n{\n divPanel.onclick = function(event) {\n \n let newTarget = event.target;\n let index = elemIndexInspektor(newTarget);\n \n setColor(all[index]);\n \n event.stopPropagation(); // DOTO vyrest o jinak, tohle neni moc dobre reseni\n };\n \n}", "function addclickEvents(){\n document.getElementById(\"flask\").addEventListener(\"click\", function() {\n callFlask();\n }, false);\n document.getElementById(\"magnet\").addEventListener(\"click\", function() {\n \tcallMagnet();\n }, false);\n document.getElementById(\"heater_button\").addEventListener(\"click\", function() {\n \tcallHeater();\n }, false);\n document.getElementById(\"stir_button\").addEventListener(\"click\", function() {\n \tcallStir();\n }, false);\n document.getElementById(\"pipette\").addEventListener(\"click\", function() {\n \tcallPipette();\n }, false);\n}", "function declareJqueryOnClickEvents() {\r\n\t$('#clear').on(\"click\", function () {\r\n\t\tclearCanvas();\r\n\t\tsocket.emit('clear', fileName);\r\n\t\twindow.location.href = \"/drawPadLoad\";\r\n\t});\r\n\t$('#back').on(\"click\", function () {\r\n\t\tsaveFile(fileName);\r\n\t\tsetTimeout(function () {\r\n\t\t\tdocument.location.href = \"/\";\r\n\t\t}, 500);\r\n\r\n\t});\r\n\t$('#save').on(\"click\", function () {\r\n\t\tsaveWindow(fileName);\r\n\t});\r\n\t$('#saveFile').on(\"click\", function () {\r\n\t\tsaveFile(fileName);\r\n\t});\r\n\r\n\t//Toolbar onClick Events are in a seperate function, in order to make this function more readable\r\n\tjqueryToolBarOnClickEvents();\r\n}", "function MouseUpEvent() {}", "function triggerClickHoverEvent(eventname, event, seriesFilter) {\n var offset = eventHolder.offset(),\n canvasX = event.pageX - offset.left - plotOffset.left,\n canvasY = event.pageY - offset.top - plotOffset.top,\n pos = canvasToAxisCoords({ left: canvasX, top: canvasY });\n\n pos.pageX = event.pageX;\n pos.pageY = event.pageY;\n\n var item = findNearbyItem(canvasX, canvasY, seriesFilter);\n\n if (item) {\n // fill in mouse pos for any listeners out there\n item.pageX = parseInt(item.series.xaxis.p2c(item.datapoint[0]) + offset.left + plotOffset.left, 10);\n item.pageY = parseInt(item.series.yaxis.p2c(item.datapoint[1]) + offset.top + plotOffset.top, 10);\n }\n\n if (options.grid.autoHighlight) {\n // clear auto-highlights\n for (var i = 0; i < highlights.length; ++i) {\n var h = highlights[i];\n if (h.auto == eventname && !(item && h.series == item.series && h.point[0] == item.datapoint[0] && h.point[1] == item.datapoint[1])) unhighlight(h.series, h.point);\n }\n\n if (item) highlight(item.series, item.datapoint, eventname);\n }\n\n placeholder.trigger(eventname, [pos, item]);\n }", "function bloquear_click_derecho(){\n if(document.layers)document.captureEvents(Event.MOUSEDOWN);\n document.onmousedown=evento_click_derecho;\n}", "function triggerClickHoverEvent(eventname, event, seriesFilter) {\n var offset = eventHolder.offset(),\n canvasX = event.pageX - offset.left - plotOffset.left,\n canvasY = event.pageY - offset.top - plotOffset.top,\n pos = canvasToAxisCoords({ left: canvasX, top: canvasY });\n\n pos.pageX = event.pageX;\n pos.pageY = event.pageY;\n\n var item = findNearbyItem(canvasX, canvasY, seriesFilter);\n\n if (item) {\n // fill in mouse pos for any listeners out there\n item.pageX = parseInt(item.series.xaxis.p2c(item.datapoint[0]) + offset.left + plotOffset.left);\n item.pageY = parseInt(item.series.yaxis.p2c(item.datapoint[1]) + offset.top + plotOffset.top);\n }\n\n if (options.grid.autoHighlight) {\n // clear auto-highlights\n for (var i = 0; i < highlights.length; ++i) {\n var h = highlights[i];\n if (h.auto == eventname &&\n !(item && h.series == item.series &&\n h.point[0] == item.datapoint[0] &&\n h.point[1] == item.datapoint[1]))\n unhighlight(h.series, h.point);\n }\n \n if (item)\n highlight(item.series, item.datapoint, eventname);\n }\n \n placeholder.trigger(eventname, [ pos, item ]);\n }", "function mouseUp() { }", "function triggerClickHoverEvent(eventname, event, seriesFilter) {\n var offset = eventHolder.offset(),\n canvasX = event.pageX - offset.left - plotOffset.left,\n canvasY = event.pageY - offset.top - plotOffset.top,\n pos = canvasToAxisCoords({ left: canvasX, top: canvasY });\n\n pos.pageX = event.pageX;\n pos.pageY = event.pageY;\n\n var item = findNearbyItem(canvasX, canvasY, seriesFilter);\n\n if (item) {\n // fill in mouse pos for any listeners out there\n item.pageX = parseInt(item.series.xaxis.p2c(item.datapoint[0]) + offset.left + plotOffset.left, 10);\n item.pageY = parseInt(item.series.yaxis.p2c(item.datapoint[1]) + offset.top + plotOffset.top, 10);\n }\n\n if (options.grid.autoHighlight) {\n // clear auto-highlights\n for (var i = 0; i < highlights.length; ++i) {\n var h = highlights[i];\n if (h.auto == eventname &&\n !(item && h.series == item.series &&\n h.point[0] == item.datapoint[0] &&\n h.point[1] == item.datapoint[1]))\n unhighlight(h.series, h.point);\n }\n\n if (item)\n highlight(item.series, item.datapoint, eventname);\n }\n\n placeholder.trigger(eventname, [ pos, item ]);\n }", "function triggerClickHoverEvent(eventname, event, seriesFilter) {\n var offset = eventHolder.offset(),\n canvasX = event.pageX - offset.left - plotOffset.left,\n canvasY = event.pageY - offset.top - plotOffset.top,\n pos = canvasToAxisCoords({ left: canvasX, top: canvasY });\n\n pos.pageX = event.pageX;\n pos.pageY = event.pageY;\n\n var item = findNearbyItem(canvasX, canvasY, seriesFilter);\n\n if (item) {\n // fill in mouse pos for any listeners out there\n item.pageX = parseInt(item.series.xaxis.p2c(item.datapoint[0]) + offset.left + plotOffset.left, 10);\n item.pageY = parseInt(item.series.yaxis.p2c(item.datapoint[1]) + offset.top + plotOffset.top, 10);\n }\n\n if (options.grid.autoHighlight) {\n // clear auto-highlights\n for (var i = 0; i < highlights.length; ++i) {\n var h = highlights[i];\n if (h.auto == eventname &&\n !(item && h.series == item.series &&\n h.point[0] == item.datapoint[0] &&\n h.point[1] == item.datapoint[1]))\n unhighlight(h.series, h.point);\n }\n\n if (item)\n highlight(item.series, item.datapoint, eventname);\n }\n\n placeholder.trigger(eventname, [ pos, item ]);\n }", "function triggerClickHoverEvent(eventname, event, seriesFilter) {\n var offset = eventHolder.offset(),\n canvasX = event.pageX - offset.left - plotOffset.left,\n canvasY = event.pageY - offset.top - plotOffset.top,\n pos = canvasToAxisCoords({ left: canvasX, top: canvasY });\n\n pos.pageX = event.pageX;\n pos.pageY = event.pageY;\n\n var item = findNearbyItem(canvasX, canvasY, seriesFilter);\n\n if (item) {\n // fill in mouse pos for any listeners out there\n item.pageX = parseInt(item.series.xaxis.p2c(item.datapoint[0]) + offset.left + plotOffset.left, 10);\n item.pageY = parseInt(item.series.yaxis.p2c(item.datapoint[1]) + offset.top + plotOffset.top, 10);\n }\n\n if (options.grid.autoHighlight) {\n // clear auto-highlights\n for (var i = 0; i < highlights.length; ++i) {\n var h = highlights[i];\n if (h.auto == eventname &&\n !(item && h.series == item.series &&\n h.point[0] == item.datapoint[0] &&\n h.point[1] == item.datapoint[1]))\n unhighlight(h.series, h.point);\n }\n\n if (item)\n highlight(item.series, item.datapoint, eventname);\n }\n\n placeholder.trigger(eventname, [ pos, item ]);\n }", "function triggerClickHoverEvent(eventname, event, seriesFilter) {\n var offset = eventHolder.offset(),\n canvasX = event.pageX - offset.left - plotOffset.left,\n canvasY = event.pageY - offset.top - plotOffset.top,\n pos = canvasToAxisCoords({ left: canvasX, top: canvasY });\n\n pos.pageX = event.pageX;\n pos.pageY = event.pageY;\n\n var item = findNearbyItem(canvasX, canvasY, seriesFilter);\n\n if (item) {\n // fill in mouse pos for any listeners out there\n item.pageX = parseInt(item.series.xaxis.p2c(item.datapoint[0]) + offset.left + plotOffset.left, 10);\n item.pageY = parseInt(item.series.yaxis.p2c(item.datapoint[1]) + offset.top + plotOffset.top, 10);\n }\n\n if (options.grid.autoHighlight) {\n // clear auto-highlights\n for (var i = 0; i < highlights.length; ++i) {\n var h = highlights[i];\n if (h.auto == eventname &&\n !(item && h.series == item.series &&\n h.point[0] == item.datapoint[0] &&\n h.point[1] == item.datapoint[1]))\n unhighlight(h.series, h.point);\n }\n\n if (item)\n highlight(item.series, item.datapoint, eventname);\n }\n\n placeholder.trigger(eventname, [ pos, item ]);\n }", "function triggerClickHoverEvent(eventname, event, seriesFilter) {\n var offset = eventHolder.offset(),\n canvasX = event.pageX - offset.left - plotOffset.left,\n canvasY = event.pageY - offset.top - plotOffset.top,\n pos = canvasToAxisCoords({ left: canvasX, top: canvasY });\n\n pos.pageX = event.pageX;\n pos.pageY = event.pageY;\n\n var item = findNearbyItem(canvasX, canvasY, seriesFilter);\n\n if (item) {\n // fill in mouse pos for any listeners out there\n item.pageX = parseInt(item.series.xaxis.p2c(item.datapoint[0]) + offset.left + plotOffset.left, 10);\n item.pageY = parseInt(item.series.yaxis.p2c(item.datapoint[1]) + offset.top + plotOffset.top, 10);\n }\n\n if (options.grid.autoHighlight) {\n // clear auto-highlights\n for (var i = 0; i < highlights.length; ++i) {\n var h = highlights[i];\n if (h.auto == eventname &&\n !(item && h.series == item.series &&\n h.point[0] == item.datapoint[0] &&\n h.point[1] == item.datapoint[1]))\n unhighlight(h.series, h.point);\n }\n\n if (item)\n highlight(item.series, item.datapoint, eventname);\n }\n\n placeholder.trigger(eventname, [ pos, item ]);\n }", "function triggerClickHoverEvent(eventname, event, seriesFilter) {\n var offset = eventHolder.offset(),\n canvasX = event.pageX - offset.left - plotOffset.left,\n canvasY = event.pageY - offset.top - plotOffset.top,\n pos = canvasToAxisCoords({ left: canvasX, top: canvasY });\n\n pos.pageX = event.pageX;\n pos.pageY = event.pageY;\n\n var item = findNearbyItem(canvasX, canvasY, seriesFilter);\n\n if (item) {\n // fill in mouse pos for any listeners out there\n item.pageX = parseInt(item.series.xaxis.p2c(item.datapoint[0]) + offset.left + plotOffset.left, 10);\n item.pageY = parseInt(item.series.yaxis.p2c(item.datapoint[1]) + offset.top + plotOffset.top, 10);\n }\n\n if (options.grid.autoHighlight) {\n // clear auto-highlights\n for (var i = 0; i < highlights.length; ++i) {\n var h = highlights[i];\n if (h.auto == eventname &&\n !(item && h.series == item.series &&\n h.point[0] == item.datapoint[0] &&\n h.point[1] == item.datapoint[1]))\n unhighlight(h.series, h.point);\n }\n\n if (item)\n highlight(item.series, item.datapoint, eventname);\n }\n\n placeholder.trigger(eventname, [ pos, item ]);\n }", "function triggerClickHoverEvent(eventname, event, seriesFilter) {\n var offset = eventHolder.offset(),\n canvasX = event.pageX - offset.left - plotOffset.left,\n canvasY = event.pageY - offset.top - plotOffset.top,\n pos = canvasToAxisCoords({ left: canvasX, top: canvasY });\n\n pos.pageX = event.pageX;\n pos.pageY = event.pageY;\n\n var item = findNearbyItem(canvasX, canvasY, seriesFilter);\n\n if (item) {\n // fill in mouse pos for any listeners out there\n item.pageX = parseInt(item.series.xaxis.p2c(item.datapoint[0]) + offset.left + plotOffset.left, 10);\n item.pageY = parseInt(item.series.yaxis.p2c(item.datapoint[1]) + offset.top + plotOffset.top, 10);\n }\n\n if (options.grid.autoHighlight) {\n // clear auto-highlights\n for (var i = 0; i < highlights.length; ++i) {\n var h = highlights[i];\n if (h.auto == eventname &&\n !(item && h.series == item.series &&\n h.point[0] == item.datapoint[0] &&\n h.point[1] == item.datapoint[1]))\n unhighlight(h.series, h.point);\n }\n\n if (item)\n highlight(item.series, item.datapoint, eventname);\n }\n\n placeholder.trigger(eventname, [ pos, item ]);\n }", "function triggerClickHoverEvent(eventname, event, seriesFilter) {\n var offset = eventHolder.offset(),\n canvasX = event.pageX - offset.left - plotOffset.left,\n canvasY = event.pageY - offset.top - plotOffset.top,\n pos = canvasToAxisCoords({ left: canvasX, top: canvasY });\n\n pos.pageX = event.pageX;\n pos.pageY = event.pageY;\n\n var item = findNearbyItem(canvasX, canvasY, seriesFilter);\n\n if (item) {\n // fill in mouse pos for any listeners out there\n item.pageX = parseInt(item.series.xaxis.p2c(item.datapoint[0]) + offset.left + plotOffset.left, 10);\n item.pageY = parseInt(item.series.yaxis.p2c(item.datapoint[1]) + offset.top + plotOffset.top, 10);\n }\n\n if (options.grid.autoHighlight) {\n // clear auto-highlights\n for (var i = 0; i < highlights.length; ++i) {\n var h = highlights[i];\n if (h.auto == eventname &&\n !(item && h.series == item.series &&\n h.point[0] == item.datapoint[0] &&\n h.point[1] == item.datapoint[1]))\n unhighlight(h.series, h.point);\n }\n\n if (item)\n highlight(item.series, item.datapoint, eventname);\n }\n\n placeholder.trigger(eventname, [ pos, item ]);\n }", "function triggerClickHoverEvent(eventname, event, seriesFilter) {\n var offset = eventHolder.offset(),\n canvasX = event.pageX - offset.left - plotOffset.left,\n canvasY = event.pageY - offset.top - plotOffset.top,\n pos = canvasToAxisCoords({ left: canvasX, top: canvasY });\n\n pos.pageX = event.pageX;\n pos.pageY = event.pageY;\n\n var item = findNearbyItem(canvasX, canvasY, seriesFilter);\n\n if (item) {\n // fill in mouse pos for any listeners out there\n item.pageX = parseInt(item.series.xaxis.p2c(item.datapoint[0]) + offset.left + plotOffset.left, 10);\n item.pageY = parseInt(item.series.yaxis.p2c(item.datapoint[1]) + offset.top + plotOffset.top, 10);\n }\n\n if (options.grid.autoHighlight) {\n // clear auto-highlights\n for (var i = 0; i < highlights.length; ++i) {\n var h = highlights[i];\n if (h.auto == eventname &&\n !(item && h.series == item.series &&\n h.point[0] == item.datapoint[0] &&\n h.point[1] == item.datapoint[1]))\n unhighlight(h.series, h.point);\n }\n\n if (item)\n highlight(item.series, item.datapoint, eventname);\n }\n\n placeholder.trigger(eventname, [ pos, item ]);\n }", "function triggerClickHoverEvent(eventname, event, seriesFilter) {\n var offset = eventHolder.offset(),\n canvasX = event.pageX - offset.left - plotOffset.left,\n canvasY = event.pageY - offset.top - plotOffset.top,\n pos = canvasToAxisCoords({ left: canvasX, top: canvasY });\n\n pos.pageX = event.pageX;\n pos.pageY = event.pageY;\n\n var item = findNearbyItem(canvasX, canvasY, seriesFilter);\n\n if (item) {\n // fill in mouse pos for any listeners out there\n item.pageX = parseInt(item.series.xaxis.p2c(item.datapoint[0]) + offset.left + plotOffset.left, 10);\n item.pageY = parseInt(item.series.yaxis.p2c(item.datapoint[1]) + offset.top + plotOffset.top, 10);\n }\n\n if (options.grid.autoHighlight) {\n // clear auto-highlights\n for (var i = 0; i < highlights.length; ++i) {\n var h = highlights[i];\n if (h.auto == eventname &&\n !(item && h.series == item.series &&\n h.point[0] == item.datapoint[0] &&\n h.point[1] == item.datapoint[1]))\n unhighlight(h.series, h.point);\n }\n\n if (item)\n highlight(item.series, item.datapoint, eventname);\n }\n\n placeholder.trigger(eventname, [ pos, item ]);\n }", "function triggerClickHoverEvent(eventname, event, seriesFilter) {\n var offset = eventHolder.offset(),\n canvasX = event.pageX - offset.left - plotOffset.left,\n canvasY = event.pageY - offset.top - plotOffset.top,\n pos = canvasToAxisCoords({ left: canvasX, top: canvasY });\n\n pos.pageX = event.pageX;\n pos.pageY = event.pageY;\n\n var item = findNearbyItem(canvasX, canvasY, seriesFilter);\n\n if (item) {\n // fill in mouse pos for any listeners out there\n item.pageX = parseInt(item.series.xaxis.p2c(item.datapoint[0]) + offset.left + plotOffset.left, 10);\n item.pageY = parseInt(item.series.yaxis.p2c(item.datapoint[1]) + offset.top + plotOffset.top, 10);\n }\n\n if (options.grid.autoHighlight) {\n // clear auto-highlights\n for (var i = 0; i < highlights.length; ++i) {\n var h = highlights[i];\n if (h.auto == eventname &&\n !(item && h.series == item.series &&\n h.point[0] == item.datapoint[0] &&\n h.point[1] == item.datapoint[1]))\n unhighlight(h.series, h.point);\n }\n\n if (item)\n highlight(item.series, item.datapoint, eventname);\n }\n\n placeholder.trigger(eventname, [ pos, item ]);\n }", "function triggerClickHoverEvent(eventname, event, seriesFilter) {\n var offset = eventHolder.offset(),\n canvasX = event.pageX - offset.left - plotOffset.left,\n canvasY = event.pageY - offset.top - plotOffset.top,\n pos = canvasToAxisCoords({ left: canvasX, top: canvasY });\n\n pos.pageX = event.pageX;\n pos.pageY = event.pageY;\n\n var item = findNearbyItem(canvasX, canvasY, seriesFilter);\n\n if (item) {\n // fill in mouse pos for any listeners out there\n item.pageX = parseInt(item.series.xaxis.p2c(item.datapoint[0]) + offset.left + plotOffset.left, 10);\n item.pageY = parseInt(item.series.yaxis.p2c(item.datapoint[1]) + offset.top + plotOffset.top, 10);\n }\n\n if (options.grid.autoHighlight) {\n // clear auto-highlights\n for (var i = 0; i < highlights.length; ++i) {\n var h = highlights[i];\n if (h.auto == eventname &&\n !(item && h.series == item.series &&\n h.point[0] == item.datapoint[0] &&\n h.point[1] == item.datapoint[1]))\n unhighlight(h.series, h.point);\n }\n\n if (item)\n highlight(item.series, item.datapoint, eventname);\n }\n\n placeholder.trigger(eventname, [ pos, item ]);\n }", "function triggerClickHoverEvent(eventname, event, seriesFilter) {\n var offset = eventHolder.offset(),\n canvasX = event.pageX - offset.left - plotOffset.left,\n canvasY = event.pageY - offset.top - plotOffset.top,\n pos = canvasToAxisCoords({ left: canvasX, top: canvasY });\n\n pos.pageX = event.pageX;\n pos.pageY = event.pageY;\n\n var item = findNearbyItem(canvasX, canvasY, seriesFilter);\n\n if (item) {\n // fill in mouse pos for any listeners out there\n item.pageX = parseInt(item.series.xaxis.p2c(item.datapoint[0]) + offset.left + plotOffset.left, 10);\n item.pageY = parseInt(item.series.yaxis.p2c(item.datapoint[1]) + offset.top + plotOffset.top, 10);\n }\n\n if (options.grid.autoHighlight) {\n // clear auto-highlights\n for (var i = 0; i < highlights.length; ++i) {\n var h = highlights[i];\n if (h.auto == eventname &&\n !(item && h.series == item.series &&\n h.point[0] == item.datapoint[0] &&\n h.point[1] == item.datapoint[1]))\n unhighlight(h.series, h.point);\n }\n\n if (item)\n highlight(item.series, item.datapoint, eventname);\n }\n\n placeholder.trigger(eventname, [ pos, item ]);\n }", "function triggerClickHoverEvent(eventname, event, seriesFilter) {\n var offset = eventHolder.offset(),\n canvasX = event.pageX - offset.left - plotOffset.left,\n canvasY = event.pageY - offset.top - plotOffset.top,\n pos = canvasToAxisCoords({ left: canvasX, top: canvasY });\n\n pos.pageX = event.pageX;\n pos.pageY = event.pageY;\n\n var item = findNearbyItem(canvasX, canvasY, seriesFilter);\n\n if (item) {\n // fill in mouse pos for any listeners out there\n item.pageX = parseInt(item.series.xaxis.p2c(item.datapoint[0]) + offset.left + plotOffset.left, 10);\n item.pageY = parseInt(item.series.yaxis.p2c(item.datapoint[1]) + offset.top + plotOffset.top, 10);\n }\n\n if (options.grid.autoHighlight) {\n // clear auto-highlights\n for (var i = 0; i < highlights.length; ++i) {\n var h = highlights[i];\n if (h.auto == eventname &&\n !(item && h.series == item.series &&\n h.point[0] == item.datapoint[0] &&\n h.point[1] == item.datapoint[1]))\n unhighlight(h.series, h.point);\n }\n\n if (item)\n highlight(item.series, item.datapoint, eventname);\n }\n\n placeholder.trigger(eventname, [ pos, item ]);\n }", "function triggerClickHoverEvent(eventname, event, seriesFilter) {\n var offset = eventHolder.offset(),\n canvasX = event.pageX - offset.left - plotOffset.left,\n canvasY = event.pageY - offset.top - plotOffset.top,\n pos = canvasToAxisCoords({ left: canvasX, top: canvasY });\n\n pos.pageX = event.pageX;\n pos.pageY = event.pageY;\n\n var item = findNearbyItem(canvasX, canvasY, seriesFilter);\n\n if (item) {\n // fill in mouse pos for any listeners out there\n item.pageX = parseInt(item.series.xaxis.p2c(item.datapoint[0]) + offset.left + plotOffset.left, 10);\n item.pageY = parseInt(item.series.yaxis.p2c(item.datapoint[1]) + offset.top + plotOffset.top, 10);\n }\n\n if (options.grid.autoHighlight) {\n // clear auto-highlights\n for (var i = 0; i < highlights.length; ++i) {\n var h = highlights[i];\n if (h.auto == eventname &&\n !(item && h.series == item.series &&\n h.point[0] == item.datapoint[0] &&\n h.point[1] == item.datapoint[1]))\n unhighlight(h.series, h.point);\n }\n\n if (item)\n highlight(item.series, item.datapoint, eventname);\n }\n\n placeholder.trigger(eventname, [ pos, item ]);\n }", "function triggerClickHoverEvent(eventname, event, seriesFilter) {\n var offset = eventHolder.offset(),\n canvasX = event.pageX - offset.left - plotOffset.left,\n canvasY = event.pageY - offset.top - plotOffset.top,\n pos = canvasToAxisCoords({ left: canvasX, top: canvasY });\n\n pos.pageX = event.pageX;\n pos.pageY = event.pageY;\n\n var item = findNearbyItem(canvasX, canvasY, seriesFilter);\n\n if (item) {\n // fill in mouse pos for any listeners out there\n item.pageX = parseInt(item.series.xaxis.p2c(item.datapoint[0]) + offset.left + plotOffset.left, 10);\n item.pageY = parseInt(item.series.yaxis.p2c(item.datapoint[1]) + offset.top + plotOffset.top, 10);\n }\n\n if (options.grid.autoHighlight) {\n // clear auto-highlights\n for (var i = 0; i < highlights.length; ++i) {\n var h = highlights[i];\n if (h.auto == eventname &&\n !(item && h.series == item.series &&\n h.point[0] == item.datapoint[0] &&\n h.point[1] == item.datapoint[1]))\n unhighlight(h.series, h.point);\n }\n\n if (item)\n highlight(item.series, item.datapoint, eventname);\n }\n\n placeholder.trigger(eventname, [ pos, item ]);\n }", "function triggerClickHoverEvent(eventname, event, seriesFilter) {\n var offset = eventHolder.offset(),\n canvasX = event.pageX - offset.left - plotOffset.left,\n canvasY = event.pageY - offset.top - plotOffset.top,\n pos = canvasToAxisCoords({ left: canvasX, top: canvasY });\n\n pos.pageX = event.pageX;\n pos.pageY = event.pageY;\n\n var item = findNearbyItem(canvasX, canvasY, seriesFilter);\n\n if (item) {\n // fill in mouse pos for any listeners out there\n item.pageX = parseInt(item.series.xaxis.p2c(item.datapoint[0]) + offset.left + plotOffset.left, 10);\n item.pageY = parseInt(item.series.yaxis.p2c(item.datapoint[1]) + offset.top + plotOffset.top, 10);\n }\n\n if (options.grid.autoHighlight) {\n // clear auto-highlights\n for (var i = 0; i < highlights.length; ++i) {\n var h = highlights[i];\n if (h.auto == eventname &&\n !(item && h.series == item.series &&\n h.point[0] == item.datapoint[0] &&\n h.point[1] == item.datapoint[1]))\n unhighlight(h.series, h.point);\n }\n\n if (item)\n highlight(item.series, item.datapoint, eventname);\n }\n\n placeholder.trigger(eventname, [ pos, item ]);\n }", "mouseUp(pt) {}", "mouseUp(pt) {}", "function mouseOver(){\n\t\t\t\tconsole.log(\"mouseOver by EventListener. \"+ this.$rectRed);\n\t\t\t\t//this.$rectRed.innerHTML = '<rect y=\"66\" x=\"0\" height=\"81\" width=\"80\" id=\"rect3\" style=\"display:inline;fill:#e23b3b;fill-opacity:1;stroke-width:1.26025\" />';\n\t\t\t}", "function addEvents(){\n\n\t//define the way to activate the event is to roll the mouse\n\t$('table').mouseover(function(){\n\n //define to use rgb color model\n\t\tvar color = \"rgb(\";\n\n //loop to assign number for each column of the rgb color model\n\t\tfor (var i=0; i<3; i++){\n\n //produce a random number\n\t\t\tvar random = Math.round(Math.random() * 255);\n\n\t\t\t//assign the random numer just produced to each column of the color model\n\t\t\tcolor += random;\n\n\t\t\tif (i<2){\n\t\t\t\tcolor += \",\";\n\n\t\t\t} else {\n\t\t\t\tcolor += \")\";\n\t\t }\n\n //assign the random color just produced to the table\n\t\t\t$(this).css('color', color);\n\t\t}\n\t});\n\n //function to pop out a string\n\tfunction clickme(){\n\n\t\talert('Hey, you clicked me!');\n\t};\n\n\t//activate the event when the table is clicked\n\t$('table').on('click', clickme);\n}", "_mouseEvent(eventType, e)\n\t{\n\t\tsuper._mouseEvent(eventType, e);\n\t}", "_mouseEvent(eventType, e)\n\t{\n\t\tsuper._mouseEvent(eventType, e);\n\t}", "_mouseEvent(eventType, e)\n\t{\n\t\tsuper._mouseEvent(eventType, e);\n\t}", "_mouseEvent(eventType, e)\n\t{\n\t\tsuper._mouseEvent(eventType, e);\n\t}", "_mouseEvent(eventType, e)\n\t{\n\t\tsuper._mouseEvent(eventType, e);\n\t}", "function mouseoverTag(event) {\n e = getEvent(event);\n var src = e.srcElement || e.target;\n if(src.mybackground == \"yellow\") return;\n src.mybackground = src.style.backgroundColor;\n src.style.backgroundColor=\"yellow\";\n}", "function geoButtonMouseOverHandler(event) {\r\n\r\n unsafeWindow.ButtonHoverOn(this);\r\n\r\n}", "function handleMouseOverElement(e) {\n\t\t\te.currentTarget.addClassName('highlight');\n\t\t\ttheInterface.emit('ui:emphElement', {\n\t\t\t\tid : e.currentTarget.getAttribute('id'),\n\t\t\t\tlayer : e.currentTarget.getAttribute('data-layer')\n\t\t\t});\n\t\t}", "function clickPaint() {\n\tidName('paint-layer').style.pointerEvents = 'auto';\n\tidName('shape-layer').style.pointerEvents = 'none';\n\tclassName('upper-canvas')[0].style.pointerEvents = 'none';\n}", "function clickShape() {\n\tidName('shape-layer').style.pointerEvents = 'auto';\n\tclassName('upper-canvas')[0].style.pointerEvents = 'auto';\n\tidName('paint-layer').style.pointerEvents = 'none';\n}", "function handleMouseOverDist(e) {\n\t\t\t\te.currentTarget.addClassName('active');\n\t\t\t\tvar parent = $(e.currentTarget).parent().get(0);\n\n\t\t\t\ttheInterface.emit('ui:emphElement', {\n\t\t\t\t\tid : e.currentTarget.getAttribute('id'),\n\t\t\t\t\tlayer : parent.getAttribute('data-layer')\n\t\t\t\t});\n\n\t\t\t}", "function mouseOver() {\n setMouseOver(true);\n }", "function onMouseOver(evt) {\n $('#event-diagnostic').text('Mouse over fired.');\n }", "function onMouseDown(event) { }", "setMouseListener() {\r\n this.functionOnClick = this.mouseupEventHandler(this);\r\n let target = document.getElementById(\"gameport\");\r\n target.addEventListener(\"mouseup\", this.functionOnClick);\r\n }", "function Form_SysButtonMouseOver(event)\n{\n\t//Get Source Element\n\tvar sourceElement = Browser_GetEventSourceElement(event);\n\t//has set pressed?\n\tif (sourceElement.SetMouseOver)\n\t{\n\t\t//update it\n\t\tsourceElement.style.backgroundPosition = sourceElement.SetMouseOver;\n\t\t//add listeners to unpress it\n\t\tBrowser_AddEvent(sourceElement, __BROWSER_EVENT_MOUSEOUT, Form_SysButtonUnpressed);\n\t}\n\t//block the event\n\tBrowser_CancelBubbleOnly(event);\n}", "function triggerClickHoverEvent(eventname, e) \n\t\t{\n\t\t\tvar offset = plot.offset(),\n\t\t\t\tcanvasX = parseInt(e.pageX - offset.left),\n\t\t\t\tcanvasY = parseInt(e.pageY - offset.top),\n\t\t\t\titem = findNearbySlice(canvasX, canvasY);\n\t\t\t\n\t\t\tif (options.grid.autoHighlight) \n\t\t\t{\n\t\t\t\t// clear auto-highlights\n\t\t\t\tfor (var i = 0; i < highlights.length; ++i) \n\t\t\t\t{\n\t\t\t\t\tvar h = highlights[i];\n\t\t\t\t\tif (h.auto == eventname && !(item && h.series == item.series))\n\t\t\t\t\t\tunhighlight(h.series);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t// highlight the slice\n\t\t\tif (item) \n\t\t\t highlight(item.series, eventname);\n\t\t\t\t\n\t\t\t// trigger any hover bind events\n\t\t\tvar pos = { pageX: e.pageX, pageY: e.pageY };\n\t\t\ttarget.trigger(eventname, [ pos, item ]);\t\n\t\t}", "function myAgendaMouseoverHandler(eventObj){\n\t\tvar agendaId = eventObj.data.agendaId;\n\t\tvar agendaItem = jfcalplugin.getAgendaItemById(\"#mycal\",agendaId);\n\t\t//alert(\"You moused over agenda item \" + agendaItem.title + \" at location (X=\" + eventObj.pageX + \", Y=\" + eventObj.pageY + \")\");\n\t}", "onItemClick(name, elem, evt){\r\n this.emit('click', name, elem, evt);\r\n }", "_handleMouseOut() {\n\t\tthis._resumeTimeout();\n\t}", "function contractNo_BeforeBind(eventObject) {\r\n eventObject.srcElement.style.cursor = \"hand\";\r\n eventObject.srcElement.style.color = \"blue\";\r\n eventObject.srcElement.style.textDecorationUnderline = true;\r\n eventObject.srcElement.onclick = link(eventObject.srcElement.businessObject);\r\n}", "function mouseEvents(){\n \n \n $('#add').hover(function(){\n $('#add').toggleClass('buttonHover');\n });\n}", "addClickEvents () {\n this.clickEvents.clickId.forEach((cid, i) => {\n let id = document.getElementById(cid)\n id.run = this.clickEvents.clickRun[i]\n id.addEventListener('mousedown', (e) => {\n e.currentTarget.run()\n this.checkItemStates()\n })\n })\n }", "onElementMouseMove(event) {}", "_mouseEvent(eventType, e)\n\t{\n\t\tswitch(eventType)\n\t\t{\n\t\t\tcase ComponentEvent.MOUSE_OVER:\n\t\t\t\tdocument.body.style.cursor = 'text';\n\t\t\t\tbreak;\n\n\t\t\tcase ComponentEvent.MOUSE_OUT:\n\t\t\t\tdocument.body.style.cursor = 'default';\n\t\t\t\tbreak;\n\n\t\t\tdefault:\n\t\t\t\tbreak;\n\t\t}\n\n\t\tsuper._mouseEvent(eventType, e);\n\t}", "function addEvents(){\n\t//when the table is mousedover make it change color\n\t$('table').mouseover(function(){\n //set the color variable\n\t\tvar color = \"rgb(\";\n //loop to add different commponents to color variable\n\t\tfor (var i=0; i<3; i++){\n\n\t\t\tvar random = Math.round(Math.random() * 255);\n\n\t\t\tcolor += random; //.toString();\n //if not all of the components are added to the color variable place a comma before the next one is added\n\t\t\tif (i<2){\n\t\t\t\tcolor += \",\";\n //otherwise close it was a parenthesis\n\t\t\t} else {\n\t\t\t\tcolor += \")\";\n\t\t\t}\n\t\t};\n //print the color to the console\n\t\tconsole.log(color);\n //change the table's color to the color represented by the color variable\n\t\t$(this).css('color', color);\n\t});\n //make pop up on click\n\tfunction clickme(){\n //the message in the pop up\n\t\talert('Hey, you clicked me!');\n\t};\n //alert only happens when the table is clicked\n\t$('table').on('click', clickme);\n}", "mouseDown(pt) {}", "mouseDown(pt) {}", "function setMouseClick(node) {\n click_active = true; //Disable mouseover events\n\n mouse_zoom_rect.on('mouseout', null); //Send out for pop-up\n\n showTooltip(node); //Find all edges and nodes connected to the \"found\" node\n\n setSelection(node); //Draw the connected edges and nodes\n\n drawSelected(); //Draw the edges on the hidden canvas for edge hover\n\n drawHiddenEdges(node); //Add the extra click icon in the bottom right\n\n renderClickIcon(node); //Draw rotating circle around the hovered node\n\n drawDottedHoverCircle(node); //Set for reference\n\n current_click = node;\n } //function setMouseClick", "function setMouseClick(node) {\n click_active = true; //Disable mouseover events\n\n mouse_zoom_rect.on('mouseout', null); //Send out for pop-up\n\n showTooltip(node); //Find all edges and nodes connected to the \"found\" node\n\n setSelection(node); //Draw the connected edges and nodes\n\n drawSelected(); //Draw the edges on the hidden canvas for edge hover\n\n drawHiddenEdges(node); //Add the extra click icon in the bottom right\n\n renderClickIcon(node); //Draw rotating circle around the hovered node\n\n drawDottedHoverCircle(node); //Set for reference\n\n current_click = node;\n } //function setMouseClick", "function myAgendaMouseoverHandler(eventObj) {\n var agendaId = eventObj.data.agendaId;\n var agendaItem = jfcalplugin.getAgendaItemById(\"#mycal\", agendaId);\n //alert(\"You moused over agenda item \" + agendaItem.title + \" at location (X=\" + eventObj.pageX + \", Y=\" + eventObj.pageY + \")\");\n }", "function mouseOverAndOut(triggerElement, changingElement, className) {\n\n triggerElement.onmouseover = function () {\n\n addClass(changingElement, className)\n\n }\n\n\n\n triggerElement.onmouseout = function () {\n\n removeClass(changingElement, className)\n\n\n }\n}", "addAllEvents () {\n this.addClickEvents()\n this.addHoverEvents()\n this.checkItemStates()\n }", "function cClick(){\r\nif(OLloaded&&OLgateOK){OLhover=0;OLhideObject(over);o3_showingsticky=0;}\r\nreturn false;\r\n}", "function addEvents(){\r\n\r\n\t$('table').mouseover(function(i){\r\n\r\n\t\tvar color = \"rgb(\";\r\n\r\n\t\t/*for (statement 1; statement 2; statement 3)\r\n\t\t\t\t\t{code block to be executed\r\n\t\t\t}\r\n\t\t\tStatement 1 sets a variable before the loop starts (var i = 0).\r\n\t\t\t\tNormally you will use statement 1 to initialize the variable used in the loop (i = 0).\r\n\t\t\t\tOptional.\r\n\t\t\tStatement 2 defines the condition for the loop to run (i must be less than 3).\r\n\t\t\t\tOften statement 2 is used to evaluate the condition of the initial variable.\r\n\t\t\t\tAlso optional.\r\n\t\t\t\tIf statement 2 returns true, the loop will start over again, if it returns false, the loop will end.\r\n\t\t\t\tIf you omit statement 2, you must provide a break inside the loop. Otherwise the loop will never end. This will crash your browser.\r\n\t\t\tStatement 3 increases a value (i++) each time the code block in the loop has been executed.\r\n\t\t\t\tOften statement 3 increments the value of the initial variable.\r\n\t\t\t\tAlso optional.*/\r\n\r\n\t\t//loop to add colors for the mouseover function\r\n\t\t//i < 3 accesses the length property outside the loop reducing activity w/in loop making it run faster.\r\n\t\tfor (var i=0; i<3; i++){\r\n\r\n\t\t\t//Math.round(x) returns the value of x rounded to its nearest integer\r\n\t\t\t//Math.random() returns a random number between 0(inclusive) and 1(exclusive)\r\n\t\t\tvar random = Math.round(Math.random() * 255);\r\n\r\n\t\t\tcolor += random;\r\n\t\t\t//conditional statement used to generate multiple random CSS colors for display\r\n\t\t\tif (i<2){\r\n\t\t\t\tcolor += \",\";\r\n\t\t\t} else {\r\n\t\t\t\tcolor += \")\";\r\n\t\t};\r\n\t//change the text color\r\n\t//console.log('color', color)\r\n\t$(this).css('color', color);\r\n\t};\r\n});\r\n\r\n//function to display a message (alert) when user clicks the table\r\nfunction clickme(){\r\n\r\n\t//message(alert) that will populate\r\n\talert('Hey, you clicked me!');\r\n\t};\r\n\r\n\t//add the event listener. See example 3.9 Module 2.3.4.\r\n\t$('table').on('click', clickme);\r\n\r\n}" ]
[ "0.70697653", "0.6895282", "0.67447406", "0.6630171", "0.6528773", "0.65242267", "0.6403982", "0.63784784", "0.6350967", "0.6292795", "0.6292795", "0.62927246", "0.62601703", "0.6218493", "0.6196979", "0.6185429", "0.61851877", "0.6113366", "0.6103146", "0.6103146", "0.61001045", "0.6074525", "0.606604", "0.6050986", "0.6035908", "0.60279477", "0.6012923", "0.59985185", "0.5992876", "0.59920025", "0.59892815", "0.5987809", "0.5981198", "0.59778774", "0.5977128", "0.5977128", "0.5971652", "0.5962703", "0.5952418", "0.59379816", "0.59338397", "0.593372", "0.5933199", "0.592594", "0.5923445", "0.5921761", "0.5921761", "0.5921761", "0.5921761", "0.5921761", "0.5921761", "0.5921761", "0.5921761", "0.5921761", "0.5921761", "0.5921761", "0.5921761", "0.5921761", "0.5921761", "0.5921761", "0.5921761", "0.5921761", "0.59102356", "0.59102356", "0.5891283", "0.5890855", "0.5885531", "0.5885531", "0.5885531", "0.5885531", "0.5885531", "0.5878728", "0.58780426", "0.5871451", "0.58714217", "0.58696914", "0.5854433", "0.5853922", "0.5840354", "0.5833891", "0.5826646", "0.58208793", "0.5818322", "0.58099365", "0.58098304", "0.5809672", "0.580161", "0.5799163", "0.5797347", "0.5797185", "0.57939357", "0.5790462", "0.5789478", "0.5789478", "0.5783723", "0.5783723", "0.57832", "0.5782133", "0.5772485", "0.57671803", "0.5762915" ]
0.0
-1
Is the current day hidden? `day` is a dayofweek index (06), or a Date object
function isHiddenDay(day) { if (typeof day == 'object') { day = day.getDay(); } return isHiddenDayHash[day]; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function isHiddenDay(day) {\n\t\tif (moment.isMoment(day)) {\n\t\t\tday = day.day();\n\t\t}\n\t\treturn isHiddenDayHash[day];\n\t}", "function isHiddenDay(day) {\n\t\tif (moment.isMoment(day)) {\n\t\t\tday = day.day();\n\t\t}\n\t\treturn isHiddenDayHash[day];\n\t}", "isDay() {\n\t\treturn (Date.now() + 60000 * new Date().getTimezoneOffset() + 21600000) % 86400000 / 3600000 > 12;\n\t}", "function Day(day) {\n\tif(validDateWeek(day))\n\t\tthis.type = \"day\";\n\telse\n\t\tthis.type = \"fill\";\n\n\tthis.day = day;\n\tthis.dayOfMonth = day.getDate();\n\n\tif(day.getDate() == new Date().getDate()\n\t && day.getMonth() == new Date().getMonth()\n\t && day.getFullYear() == new Date().getFullYear()){\n\t\tthis.isToday = true;\n\t}\n\telse{\n\t\tthis.isToday = false;\n\t}\n}", "function whatDay(){\n\tvar currentDay = dateobj.getDay();\n\t\n\tif(currentDay==-1){currentDay=6;}\n\tif(currentDay==0){currentDay=6}\n\telse{currentDay=currentDay-1;}\n\t\n\tvar days = document.getElementsByClassName(\"day\");\n\t//iterates through all divs with a class of \"day\"\n\tfor (var x in days){\n\t\t//list of classes in current div\n\t\tvar classArr = days[x].classList;\n\t\t\n\t\t(classArr !== undefined) && ((x == currentDay) ? classArr.add(\"light-on\") : classArr.remove(\"light-on\"));\n\t}\n}", "function cursorVisible(){\n var currentDay = moment().day();\n if(currentDay > 0)\n return 'visible';\n else\n return 'hidden';\n }", "isDay() {\n let hours = new Date(Date.now()).getHours()\n return hours >= 7 && hours <= 21\n }", "function dayButtonClicked() {\n if (night == false) {\n night = true;\n nightIn();\n return;\n }\n if (night == true) {\n night = false;\n dayIn();\n return;\n }\n}", "function whatDayIsIt(){\n let days = [ \"Sunday\", \"Monday\", \"Tuesday\",\"Wednesday\", \"Thursday\", \"Friday\", \"Saturday\"]\n return days[(new Date()).getDay()]\n}", "function whatDayToday(day) {\n var result;\n day = day.toLowerCase();\n switch (day) {\n case \"sunday\":\n case \"monday\":\n result = \"Have a good week\"\n break\n case \"tuesday\":\n case \"wednesday\":\n result = \"Ohhh....\"\n break\n case \"thrusday\":\n result = \"Yalla habayta\"\n break\n case \"friday\":\n case \"saturday\":\n result = \"Yammi jachnun\"\n break\n default:\n result = \"Not a valid day\"\n break\n }\n return result\n }", "function isCurrentWeekDay(index)\r\n {\r\n return (utils.getWeekday() == index) ? true : false;\r\n }", "E (date) {\n return date.getDay() || 7\n }", "isToday(day) {\n const today = new Date();\n return day.getDate() === today.getDate() &&\n day.getMonth() === today.getMonth() &&\n day.getFullYear() === today.getFullYear();\n }", "visibleDays(currentDate) {\n const start = startOfWeek(startOfMonth(currentDate));\n const end = endOfWeek(addWeeks(start, 5));\n\n // Generate calendar days:\n return eachDay(start, end).map((date) => {\n return {\n selected: isSameDay(currentDate, date),\n date: startOfDay(date),\n enabled: this.props.dateEnabled(date),\n visible: this.props.dateVisible(date),\n past: isPast(date),\n today: isToday(date),\n sameMonth: isSameMonth(currentDate, date),\n future: isFuture(date)\n };\n });\n }", "function today() {\n document.getElementById(\"day\").innerHTML = days[d.getDay()];\n\ndocument.getElementById(\"time\").innerHTML = d.timeNow();\n}", "d (date) {\n return date.getDay()\n }", "function getDay(){\n\treturn day;\n}", "function currentDay(){\n return getWeekday(new Date().getDay())\n}", "function getDayofToday() {\n const d = new Date();\n const weekday = [\"Sunday\", \"Monday\", \"Tuesday\", \"Wednesday\", \"Thursday\", \"Friday\", \"Saturday\"];\n return weekday[d.getDay()];\n }", "function getDay(){\n\t//var d = new Date();\t\t\n\treturn d.getDay();\n}", "isDayActive(date) {\n return date.isSame(this.value, 'day');\n }", "function dayOrNight() {\n var sunset = new Date().sunset(52.3559042,4.9546308);\n var sunrise = new Date().sunrise(52.3559042,4.9546308);\n var current = new Date();\n const sessionValue = sessionStorage.getItem(\"Day?\");\n\n if (sessionValue === null) {\n\n if ((current < sunset && current > sunrise) ) {\n isNightTime = false;\n nightSwitch();\n } else {\n isNightTime = true;\n nightSwitch();\n }\n } else {\n if ( sessionValue === \"true\") {\n isNightTime = false;\n nightSwitch();\n } else {\n isNightTime = true;\n nightSwitch();\n }\n }\n\n\n}", "function getCurrentDay () {\n\t\tvar today = new Date();\n\t\tvar dd = today.getDate();\n\t\t return dd;\n }", "function wotDayIsIt(callback){\n var day = (new Date().getDay());\n callback(day)\n}", "function clickedButton (){\n \n let currentDay= document.getElementById('date');\n if(currentDay.style.display==='none'){\n currentDay.style.display= 'block';\n }else {\n currentDay.style.display='none';\n }\n /*For testing purposes\n console.log('click test2'); */\n }", "function checkIsItDay() {\n let time = new Date().getHours();\n // console.log(time.getHours());\n return time > 6 && time < 18;\n}", "function getDay (){\n const dayOfWeek = new Date();\n return dayOfWeek.getDay();\n}", "function dayTime(currentTime){\n if (currentTime >= 7){\n return true;\n } else {\n return false;\n }\n }", "function isDateToday(date) {\n return dayjs(date.format('YYYY-MM-DD')).isSame(dayjs().format('YYYY-MM-DD'));\n}", "function getDay(date){\n\tvar day = date.getDay();\n if(0 == day){\n \tday = 7;\n }\n return day;\n}", "function FillDay(day) {\n\tthis.type = \"fill\"\n\tthis.day = day\n\tthis.dayOfMonth = day.getDate()\n\n\tif(day.getDate() == new Date().getDate()\n\t && day.getMonth() == new Date().getMonth()){\n\t\tthis.isToday = true;\n\t}\n\telse{\n\t\tthis.isToday = false;\n\t}\n}", "function showTimeDay() {\r\n var today = new Date();\r\n var time = today.getHours() + \":\" + today.getMinutes(); //getting time \r\n\r\n document.getElementById('topTime').innerHTML = time\r\n\r\n document.getElementById('time').innerHTML = time; //showing time on page\r\n\r\n var weekDays = [\"Sunday\", \"Monday\", \"Tuesday\", \"Wednesday\", \"Thursday\", \"Friday\", \"Saturday\"];//array of days\r\n document.getElementById('day').innerHTML = weekDays[today.getDay()] // showing todays day on page\r\n\r\n}", "function timechecks() {\n var t = new Date;\n var d = t.getDay();\n return d;\n}", "function isDay(sunrise, sunset, time){\n\tif(time > sunrise && time < sunset){\n \t\treturn \"day\";\n \t}\n \telse{\n \t\treturn \"night\";\n\t}\n}", "function clickToday() {\n if (!$(\"tr.fc-week\").is(':visible')) {\n $('.fc-today-button').click();\n }\n}", "function showDays () {\n\tvar emptyDays = document.getElementsByClassName(\"dayNumber\"); // find all day elements\n\tfor (var i = 0; i < emptyDays.length; i++) { // iterate through day elements array\n\t\temptyDays[i].parentNode.style.visibility = \"visible\"; // show all elements\n\t}\n}", "function dayFinder(date) {\n var newDate = new Date(date);\n switch(newDate.getDay()) {\n case 0:\n return \"Sunday\";\n case 1:\n return \"Monday\";\n case 2:\n return \"Tuesday\";\n case 3:\n return \"Wednesday\";\n case 4:\n return \"Thursday\";\n case 5:\n return \"Friday\";\n case 6:\n return \"Saturday\";\n break;\n }\n}", "function determineDay(day) {\n switch (day) {\n case \"Mon\":\n return \"2015-08-24 \";\n case \"Tue\":\n return \"2015-08-25 \";\n case \"Wed\":\n return \"2015-08-26 \";\n case \"Thu\":\n return \"2015-08-27 \";\n case \"Fri\":\n return \"2015-08-28 \";\n }\n }", "findDayOfWeek(day) {\n switch (new Date(day.dt_txt).getDay()) {\n case 0:\n return \"Sunday\"\n case 1:\n return \"Monday\"\n case 2:\n return \"Tuesday\"\n case 3:\n return \"Wednesday\"\n case 4:\n return \"Thursday\"\n case 5:\n return \"Friday\"\n default:\n return \"Saturday\"\n }\n }", "function getEventsByDay(_day, sday){\n\t$(\"#moreInfo\").hide();\n\t$(\"#body\").show();\n\tsetSessionValue(\"date\",_day);\n\tday = _day;\n\tsetDateOnMenu(sday);\n\tdayChooser();\n\tsetTimeline(day);\n}", "function filterByDay(val){\n return val.date == this;\n }", "function disabledDate2(current) {\n // No puede seleccionar fecha anterior a hoy\n return (\n current < addWeekdays(date, 7) ||\n moment(current).day() === 0 ||\n moment(current).day() === 6\n );\n }", "function showPancake() {\n var date = new Date();\n var dayOfWeek = date.getDay();\n\n if (dayOfWeek == 5) {\n var pancake = document.getElementById(\"pancake\");\n pancake.style.display = \"block\";\n }\n}", "function isDayOfWeek(dayOfWeek) {\n\t\n if (typeof dayOfWeek != 'undefined') {\n\t\n \tvar today = new Date();\n\n \tif (today.getDay() == dayOfWeek) {\n\t \t// Today is the specified day of the week.\n\t \treturn true;\n\t }\n }\n // Today is not the specified day of week.\n return false;\n}", "function calendarBeforeShowDayEdit(day) {\n return calendarBeforeShowDay(day, busy_at_edit, $(this));\n}", "function displayDay() {\n var day;\n \n switch (new Date().getDay()) {\n case 0: \n day = \"Sunday\";\n break;\n case 1: \n day = \"Monday\";\n break;\n case 2:\n day = \"Tuesday\";\n break;\n case 3:\n day = \"Wednesday\";\n break;\n case 4:\n day = \"Thursday\";\n break;\n case 5:\n day = \"Friday\";\n break;\n case 6:\n day = \"Saturday\";\n break;\n }\n \n var dayDiv = document.getElementById('day');\n dayDiv.innerText = day;\n }", "function calendarBeforeShowDay(day)\n{\n var result = true;\n var title = '';\n var day_class = 'contract-day';\n\n var timestamp = (day.getTime() - day.getTimezoneOffset()*60000)/1000;\n var role = $(this).data('role');\n\n if (rates[timestamp] === undefined) {\n result = false;\n } else {\n /**\n * rate_info structure:\n *\n * integer rate\n * integer min_stay\n * integer max_stay\n */\n var rate_info = rates[timestamp];\n\n title = translate_formatted(translate.TEXT_PROPERTY_CALENDAR_POPUP_PLACEHOLDER, [rate_info.rate, rate_info.min_stay]);\n\n if (busy_at[timestamp] !== undefined) {\n var busyness = busy_at[timestamp];\n\n switch (role) {\n case 'arrival':\n if (role == 'arrival' && busyness.arrival == false && busyness.departure == true) {\n day_class = day_class + ' departure';\n result = true;\n } else if (role == 'arrival' && busyness.arrival == true && busyness.departure == false) {\n day_class = day_class + ' arrival';\n result = false;\n } else {\n result = false;\n }\n\n break;\n\n case 'departure':\n if (role == 'departure' && busyness.arrival == true && busyness.departure == false) {\n day_class = day_class + ' arrival';\n result = true;\n } else if (role == 'departure' && busyness.arrival == false && busyness.departure == true) {\n day_class = day_class + ' departure';\n result = false;\n } else {\n result = false;\n }\n\n break;\n }\n\n if (busyness.arrival == true && busyness.departure == true) {\n day_class = day_class + ' arrival departure';\n result = false;\n }\n }\n }\n\n day_class = day_class + ' ' + (result === true ? 'available' : 'disabled');\n return [result, day_class, title];\n}", "function calendarBeforeShowDay(day, busy_at, input)\n{\n var result = true;\n var title = '';\n var day_class = 'contract-day';\n\n // Fix for day.getTime() after close calendar\n if (day instanceof Date) {\n var timestamp = (day.getTime() - day.getTimezoneOffset()*60000)/1000;\n var role = $(input).data('role');\n\n if (busy_at[timestamp] !== undefined) {\n var busyness = busy_at[timestamp];\n\n switch (role) {\n case 'arrival':\n if (role == 'arrival' && busyness.arrival == false && busyness.departure == true) {\n day_class = day_class + ' departure';\n result = true;\n } else if (role == 'arrival' && busyness.arrival == true && busyness.departure == false) {\n day_class = day_class + ' arrival';\n result = false;\n } else {\n result = false;\n }\n\n break;\n\n case 'departure':\n if (role == 'departure' && busyness.arrival == true && busyness.departure == false) {\n day_class = day_class + ' arrival';\n result = true;\n } else if (role == 'departure' && busyness.arrival == false && busyness.departure == true) {\n day_class = day_class + ' departure';\n result = false;\n } else {\n result = false;\n }\n\n break;\n }\n\n if (busyness.arrival == true && busyness.departure == true) {\n day_class = day_class + ' arrival departure';\n result = false;\n }\n }\n\n day_class = day_class + ' ' + (result === true ? 'available' : 'disabled');\n return [result, day_class, title];\n }\n\n return null;\n}", "function findDay(myDate) { \r\n var dayArr = ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'];\r\n var dayOfTheWeek = dayArr[new Date(myDate).getDay()];\r\n document.getElementById(\"answer3\").innerHTML = \"The date \" + myDate + \" is a \" + dayOfTheWeek + \".\";\r\n}", "function showDate(choose){\n var chooseTimeZone = choose;\n chooseTimeZone.setMinutes(chooseTimeZone.getMinutes() - timeZoneToday);\n var local = $('#local').data('local')\n var options = { weekday: 'long', year: 'numeric', month: 'long', day: 'numeric' };\n $('#date-choose').html(chooseTimeZone.toLocaleDateString(local, options));\n if (dateOpen.length){\n $.each(dateOpen, function(i, d) {\n var day = new Date(d.day.date.slice(0, 10));\n if (choose.getDate() == day.getDate() && choose.getMonth() == day.getMonth() && choose.getFullYear() == day.getFullYear()){\n $('#nb-places').html(1000 - d.nbVisitor);\n return false;\n }\n $('#nb-places').html('1000');\n });\n } else {\n $('#nb-places').html('1000');\n }\n $('#choose').css('display', 'block');\n // \n if ((choose.getDate() == today.getDate() && choose.getMonth() == today.getMonth() && choose.getFullYear() == today.getFullYear() && today.getHours() > 13)){\n $('#button-day').css('display', 'none');\n } else {\n $('#button-day').css('display', 'inline-block');\n }\n $('#button-half-day').css('display', 'inline-block');\n }", "function day() {\r\n var d = new Date();\r\n var weekday = new Array(7);\r\n weekday[0]= \"Sunday\";\r\n weekday[1] = \"Monday\";\r\n weekday[2] = \"Tuesday\";\r\n weekday[3] = \"Wednesday\";\r\n weekday[4] = \"Thursday\";\r\n weekday[5] = \"Friday\";\r\n weekday[6] = \"Saturday\";\r\n\r\n return weekday[d.getDay()];\r\n}", "includesDay(day) {\n return !this.excludesDay(day) && (this.dates.find(function (d) {\n return d.includesDay(day);\n }) || false);\n }", "includesDay(day) {\n return !this.excludesDay(day) && (this.dates.find(function (d) {\n return d.includesDay(day);\n }) || false);\n }", "function displayBanner(){\n var dayOfWeek = false\n if (new Date().getDay() == \"5\" || dayOfWeek == true){\n document.getElementById('banner').classList.toggle('hidden');\n }\n document.documentElement.scrollTop = 0;\n\n}", "function getDay() {\n return ''+ this._day.getDay();\n }", "_dayIsDisabled(day) {\n let { minDate, maxDate } = this;\n if (minDate && minDate.valueOf() > day.valueOf()) {\n return true;\n } else if (maxDate && maxDate.valueOf() < day.valueOf()) {\n return true;\n } else {\n return this._dayNotAvailable(day);\n }\n }", "function getToday(){\n let today = new Date();\n let days = ['Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday', 'Friday'];\n return days[today.getDay()-1];\n}", "function mydate() {\n\t//alert(\"\");\n\tdocument.getElementById(\"dt\").hidden = false;\n\tdocument.getElementById(\"DOB\").hidden = true;\n}", "function isNewDay() {\n \n var lastCheckedDate = Properties_.getProperty(PROPERTY_EVENTS_CHECKED)\n Logger.log('lastCheckedDate: ' + lastCheckedDate)\n \n var today = (new Date()).toDateString()\n Properties_.setProperty(PROPERTY_EVENTS_CHECKED, today) \n Logger.log('today: ' + today)\n \n var newDay = (lastCheckedDate !== today) \n Logger.log('newDay: ' + newDay)\n \n return newDay \n}", "calculateDisabledFrom(day) {\n return DateUtils.isPastDay(day);\n }", "function getDayOfWeek(day) {\n switch(day) {\n case 0: return 'Sun';\n case 1: return 'Mon';\n case 2: return 'Tue';\n case 3: return 'Wed';\n case 4: return 'Thu';\n case 5: return 'Fri';\n case 6: return 'Sat';\n default: return;\n }\n}", "function getCurrentDay() {\n\tconst event = new Date(Date.now());\n\tconst options = { year: \"numeric\", month: \"long\", day: \"numeric\" };\n\tlet currentDay = event.toLocaleDateString(undefined, options);\n\n\t$(\"#currentDay\").text(\"Today's Date: \" + currentDay);\n}", "function getDay(date) {\n return date.getDay() >= 1 ? date.getDay() - 1 : 6;\n}", "function getVisibility(weather, dayWanted) {\n if (weather && dayWanted >= 0) {\n let visibility = weather[dayWanted].visibility;\n return Number.parseFloat(visibility).toFixed(1);\n } else {\n return \"____\";\n }\n }", "function whatDay(day) {\n var result = \"\";\n day = day.toLowerCase()\n if (day === 'sunday' || day === 'monday') {\n result = 'Have a good week';\n } else if (day === 'tuesday' || day === 'wednesday') {\n result = 'Ohhh ... ';\n } else if (day === 'thursday') {\n result = 'Yalla habaita';\n } else if (day === 'friday' || day === 'saturday') {\n result = 'Yammi Jachnun'\n } else {\n result = 'not a day';\n }\n return result;\n}", "highlightToday() {\n\n // find all day squares\n var days = C('day-square');\n\n // deletes all of the \n for (var i = 0; i < days.length; i++)\n days[i].classList.remove('today');\n\n // if it is the correct month and year, highlights the today's date\n if((this.month == this.today.getMonth()) && (this.year == this.today.getFullYear())) \n days[this.today.getDate() + this.monthInfo.firstDayOfWeek - 1].classList.add('today');\n \n }", "function getDayType(day)\r\n{\r\n\tswitch(day)\r\n\t{\r\n\t\t//Weekdays\r\n\t\tcase 1: //Monday\r\n\t\tcase 2: //Tuesday\r\n\t\tcase 3: //Wednesday\r\n\t\tcase 4: //Thursday\r\n\t\tcase 5: return \"Weekday\"; break; //Friday\r\n\r\n\t\t//Weekends\r\n\t\tcase 6: //Saturday\r\n\t\tcase 0: return \"Weekend\"; break; //Sunday\r\n\r\n\t\t//Otherwise\r\n\t\tdefault: return null; break; //Invalid date\r\n\t}\r\n}", "adjDayOfWeekToStartOnMonday(today) {\n let dayOfWeek = this.dateAdapter.getDayOfWeek(today);\n dayOfWeek = dayOfWeek === 0 ? 6 : (dayOfWeek - 1);\n return dayOfWeek;\n }", "function skipHiddenDays(date, inc, isExclusive) {\n\t\tinc = inc || 1;\n\t\twhile (\n\t\t\tisHiddenDayHash[ ( date.getDay() + (isExclusive ? inc : 0) + 7 ) % 7 ]\n\t\t) {\n\t\t\taddDays(date, inc);\n\t\t}\n\t}", "function skipHiddenDays(date, inc, isExclusive) {\n\t\tinc = inc || 1;\n\t\twhile (\n\t\t\tisHiddenDayHash[ ( date.getDay() + (isExclusive ? inc : 0) + 7 ) % 7 ]\n\t\t) {\n\t\t\taddDays(date, inc);\n\t\t}\n\t}", "function skipHiddenDays(date, inc, isExclusive) {\n\t\tinc = inc || 1;\n\t\twhile (\n\t\t\tisHiddenDayHash[ ( date.getDay() + (isExclusive ? inc : 0) + 7 ) % 7 ]\n\t\t) {\n\t\t\taddDays(date, inc);\n\t\t}\n\t}", "function getCurrentDay() {\n var returnDate;\n date = new Date();\n if (date.getDay() === 0) {\n returnDate = 6;\n } else {\n returnDate = date.getDay() - 1;\n }\n return returnDate;\n}", "get hideAllDay() {\n\t\treturn this.nativeElement ? this.nativeElement.hideAllDay : undefined;\n\t}", "function generateDay(day, date)\n{\n\tvar isShaded = (date.getMonth() % 2);//Every other month will be shaded a different color to help differentiate the months\n\tvar isToday = (date.getDate() == todaysDate.getDate() && date.getMonth() == todaysDate.getMonth() && date.getFullYear() == todaysDate.getFullYear());\n\n\tif(isShaded) day.className += ' shaded';\n\tif(isToday) day.className += ' today';\n\n\tday.id = idForDate(date);\n\tday.innerHTML = '<span>' + date.getDate() + '</span>';\n\n\tsearchItemsForPID(day.id, function(items)\n\t{\n\t\tfor(var i in items)\n\t\t{\n\t\t\tvar item = loadEvent(day.id, items[i].itemId);\n\t\t\titem.value = items[i].itemValue;\n\t\t\tadjustHeight(item.id);\n\t\t}\n\t});\n}", "function benoitWorks(date){\n console.log('benoitWorks');\n var day = date.getDay();\n return [(day == 1 || day == 3 || day == 5), ''];\n}", "function dayOfTheWeek(today) {\n\tif (today.getDay() === 0) {\n\t\treturn \"Sunday\";\n\t} else if (today.getDay() === 1) {\n\t\treturn \"Monday\";\n\t} else if (today.getDay() === 2) {\n\t\treturn \"Tuesday\";\n\t} else if (today.getDay() === 3) {\n\t\treturn \"Wednesday\";\n\t} else if (today.getDay() === 4) {\n\t\treturn \"Thursday\";\n\t} else if (today.getDay() === 5) {\n\t\treturn \"Friday\";\n\t} else if (today.getDay() === 6) {\n\t\treturn \"Saturday\";\n\t}\n}", "function checkDiscount(day, time) {\n\n\t\tif (!screeningExists(movies[activeMovie], day, time))\n\t\t\treturn false;\n\n\t\tif (day.toString() === \"Monday\" || day.toString() === \"Tuesday\")\n\t\t\treturn true;\n\n\t\tif (day.toString() !== \"Saturday\" && day.toString() !== \"Sunday\") {\n\t\t\tif (time.toString() === \"1pm\")\n\t\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "function fetchdayoftheweek(){\r\n var d = new Date();\r\n var n = d.getDay();\r\n\r\n let sat = \"Saturday\"\r\n let sun = \"Sunday\"\r\n let mon = \"Monday\"\r\n let tue = \"Tuesday\"\r\n let wed = \"Wednesday\"\r\n let thu = \"Thursday\"\r\n let fri = \"Friday\"\r\n\r\n if (n==6){\r\n return sat;\r\n }\r\n else if (n==0){\r\n return sun;\r\n }\r\n else if (n==0){\r\n return mon;\r\n }\r\n else if (n==0){\r\n return tue;\r\n }\r\n else if (n==0){\r\n return wed;\r\n }\r\n else if (n==0){\r\n return thu;\r\n }\r\n else if (n==0){\r\n return fri;\r\n }\r\n }", "getDayOfTheWeekIndeces(dayOfTheWeek) {\n const dayofTheWeekIndeces = {\n Sunday: 0,\n Monday: 1,\n Tuesday: 2,\n Wednesday: 3,\n Thursday: 4,\n Friday: 5,\n Saturday: 6,\n };\n return dayofTheWeekIndeces[dayOfTheWeek];\n }", "function Day(parent){var _this=_super.call(this,parent)||this;_this.viewClass='e-day-view';return _this;}", "isOnDate(date) {\n const selfDate = this.timeHuman.split(\" \")[0];\n const selfDay = Number(selfDate.split(\"-\")[2]);\n const day = Number(date.split(\"-\")[2]);\n return selfDay === day;\n }", "function dayIndex(date) {\n return date.getDay();\n}", "function isDayDisabled(day) {\n var _ref3 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},\n minDate = _ref3.minDate,\n maxDate = _ref3.maxDate,\n excludeDates = _ref3.excludeDates,\n includeDates = _ref3.includeDates,\n filterDate = _ref3.filterDate;\n\n return isOutOfBounds(day, { minDate: minDate, maxDate: maxDate }) || excludeDates && excludeDates.some(function (excludeDate) {\n return isSameDay(day, excludeDate);\n }) || includeDates && !includeDates.some(function (includeDate) {\n return isSameDay(day, includeDate);\n }) || filterDate && !filterDate(newDate(day)) || false;\n}", "function isDayDisabled(day) {\n var _ref3 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},\n minDate = _ref3.minDate,\n maxDate = _ref3.maxDate,\n excludeDates = _ref3.excludeDates,\n includeDates = _ref3.includeDates,\n filterDate = _ref3.filterDate;\n\n return isOutOfBounds(day, { minDate: minDate, maxDate: maxDate }) || excludeDates && excludeDates.some(function (excludeDate) {\n return isSameDay(day, excludeDate);\n }) || includeDates && !includeDates.some(function (includeDate) {\n return isSameDay(day, includeDate);\n }) || filterDate && !filterDate(newDate(day)) || false;\n}", "function isDayDisabled(day) {\n var _ref3 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},\n minDate = _ref3.minDate,\n maxDate = _ref3.maxDate,\n excludeDates = _ref3.excludeDates,\n includeDates = _ref3.includeDates,\n filterDate = _ref3.filterDate;\n\n return isOutOfBounds(day, { minDate: minDate, maxDate: maxDate }) || excludeDates && excludeDates.some(function (excludeDate) {\n return isSameDay(day, excludeDate);\n }) || includeDates && !includeDates.some(function (includeDate) {\n return isSameDay(day, includeDate);\n }) || filterDate && !filterDate(newDate(day)) || false;\n}", "function newDay() {\n \n var lastCheckedDate = Properties_.getProperty(PROPERTY_DAILY_CHECK)\n Logger.log('lastCheckedDate: ' + lastCheckedDate)\n \n var today = (new Date()).toDateString()\n Properties_.setProperty(PROPERTY_DAILY_CHECK, today) \n Logger.log('today: ' + today)\n \n var newDay = (lastCheckedDate !== today) \n Logger.log('newDay: ' + newDay)\n \n return newDay\n \n}", "function dayTime () {\r\n\r\n\tlet day = new Date().getDay(); \r\n\t switch(day) {\r\n\t case 0:\r\n day = \"Sunday\";\r\n break;\r\n case 1:\r\n day = \"Monday\";\r\n break;\r\n case 2:\r\n day = \"Tuesday\";\r\n break;\r\n case 3:\r\n day = \"Wednesday\";\r\n break;\r\n case 4:\r\n day = \"Thursday\";\r\n break;\r\n case 5:\r\n day = \"Friday\";\r\n break;\r\n case 6:\r\n day = \"Saturday\";\r\n}\r\n\r\nlet time = new Date().getHours();\r\nlet minutes = new Date().getMinutes();\r\nlet seconds = new Date().getSeconds();\r\n\r\nif (time > 12) {\r\n\ttime = time-12;\r\n} \r\n\r\nconsole.log (\"Today is \" + day + \". Current time is \" + time + \":\" + minutes + \":\" + seconds);\r\n\r\n}", "function whatDayIsIt() {\n let now = new Date();\n\n let date = now.getDate();\n let day = now.getDay();\n let weekDays;\n if (myLang = 'es') {\n weekDays = ['Lunes', 'Martes', 'Miércoles', 'Jueves', 'Viernes', 'Sábado', 'Domingo'];\n } else if (myLang = 'ca') {\n weekDays = ['Dilluns', 'Dimarts', 'Dimecres', 'Dijous', 'Divendres', 'Dissabte', 'Diumenge'];\n } else if (myLang = 'de') {\n weekDays = ['Montag', 'Dienstag', 'Mittwoch', 'Donnerstag', 'Freitag', 'Samstag', 'Sonntag'];\n } else {\n weekDays = ['Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday', 'Sunday']; \n };\n day = weekDays[day-1];\n let month = now.getMonth();\n let allMonths;\n if (myLang = 'es') {\n allMonths = ['Enero', 'Ferbrero', 'Marzo', 'Abril', 'Mayo', 'Junio', 'Julio', 'Agosto', 'Septiembre', 'Octubre', 'Noviembre', 'Diciembre'];\n } else if (myLang = 'ca') {\n allMonths = ['Gener', 'Ferbrer', 'Març', 'Abril', 'Maig', 'Juny', 'Juliol', 'Agost', 'Septembre', 'Octubre', 'Novembre', 'Decembre'];\n } else if (myLang = 'de') {\n allMonths = ['Januar', 'Februar', 'März', 'April', 'Mai', 'Juni', 'Juli', 'August', 'September', 'Oktober', 'November', 'Dezember'];\n } else {\n allMonths = ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December']; \n };\n month = allMonths[month];\n let hours = now.getHours();\n let minutes = now.getMinutes();\n\n // if the minutes are lower than 10, we still want them to have two digits\n if (minutes < 10) {\n minutes = `0${minutes}`;\n }\n\n // if the date is the first, second or third, the appendix \"th\" is different\n switch(date) {\n case 1:\n date = `${date}st`\n break;\n case 21:\n date = `${date}st`\n break;\n case 31:\n date = `${date}st`\n break;\n case 2:\n date = `${date}nd`\n break;\n case 22:\n date = `${date}nd`\n break;\n case 3:\n date = `${date}rd`\n break;\n case 23:\n date = `${date}rd`\n break;\n default:\n date = `${date}th`\n }\n\n let elaborateNow = `${day} ${date} ${month}, ${hours}:${minutes}` // Wednesday 24th March, 10.30\n\n let currentDate = document.querySelector(\"#current-date\");\n currentDate.innerHTML = elaborateNow;\n}", "function DisableDays(date){\n\t\tvar day = date.getDay();\n\t\t\n\t\t // If day == 1 then it is MOnday\n\t\t for(var i=0;i<available_days.length;i++){\n\t\t\tif (day == available_days[i]) {\n\t\t\t\treturn [false]; \n\t\t\t}\n\t\t }\n\t}", "function dayLight(){\n let day = moment().dayOfYear();\n if (day < 71 || day > 309){\n return(chalk.green(\"is not\"));\n // console.log(\"It\" + chalk.green(\"is not\") + \" daylight savings\")\n }\n else{\n return(chalk.green(\"is\"));\n // console.log(\"It \" + chalk.green(\"is\") + \" daylight savings\")\n }\n}", "outsideTimeFrame() {\n\t\tconst date = new Date();\n\t\tconst weekday = date.getDay() || 7; // JavaScript days are Sun-Sat 0-6 but we want Mon-Sun 1-7.\n\t\tconst hour = date.getHours();\n\n\t\tif (weekday < window.pizzakitTimes.start.weekday) {\n\t\t\treturn true;\n\t\t}\n\t\telse if (weekday == window.pizzakitTimes.start.weekday) {\n\t\t\tif (hour < window.pizzakitTimes.start.hours) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\tif (window.pizzakitTimes.end.weekday < weekday) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\telse if (window.pizzakitTimes.end.weekday == weekday) {\n\t\t\t\tif (window.pizzakitTimes.end.hours <= hour) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn false;\n\t}", "function displayDate() {\n let currentDay = $(\"#currentDay\").text(momentVar);\n return currentDay;\n \n }", "function dayPart(oDate)\n{\n var theHour = oDate.getHours();\n if (theHour < 6)\n return \"wee hours\";\n if (theHour < 12)\n return \"morning\";\n if (theHour < 18)\n return \"afternoon\";\n return \"evening\";\n}", "function dayClick(date, jsEvent, view)\n {\n\n alert('Clicked on: ' + date.format());\n\n // alert('Coordinates: ' + jsEvent.pageX + ',' + jsEvent.pageY);\n\n // alert('Current view: ' + view.name);\n\n // change the day's background color just for fun\n // $(this).css('background-color', 'red');\n }", "function filterToday() {\n const dayStart = moment()\n .subtract(0, \"days\")\n .format(\"YYYY-MM-DD\")\n .toString();\n return (\n props.choice(\"Hôm Nay\"),\n props.timeStart(dayStart),\n props.timeEnd(dayStart),\n props.close()\n );\n }", "function showTuesday() {\n let a = document.getElementById('antradienis');\n\n if (a.style.display === 'none') {\n a.style.display = 'block';\n } else {\n a.style.display = 'none';\n }\n}", "function fullDay(date){\n var response = false;\n $.each(dateOpen, function(i, d) {\n var open = new Date(d.day.date.slice(0, 10));\n if (date.getDate() == open.getDate() && date.getMonth() == open.getMonth() && d.nbVisitor >= 1000) {\n response = true;\n return false;\n }\n });\n return response;\n }", "function irdIsSpecialDay(statTable, statDay)\n{\n\tvar endResult = 0;\n\t\n\tif(typeof statTable != 'undefined' && typeof statDay != 'undefined'){\n\t\tendResult = _genesys.session.isSpecialDay(statTable,statDay);\n\t}\n\t\n\treturn endResult;\n}" ]
[ "0.7995713", "0.7995713", "0.65326756", "0.6412873", "0.6258095", "0.6251579", "0.6239685", "0.6140315", "0.61022156", "0.60843164", "0.6054245", "0.6049217", "0.60408616", "0.6026903", "0.5969462", "0.5950089", "0.59450924", "0.5944389", "0.5924504", "0.5918209", "0.5906734", "0.59037644", "0.58862275", "0.5864976", "0.5864129", "0.58376133", "0.5818905", "0.58072424", "0.5803567", "0.57649773", "0.57592577", "0.5734085", "0.5732922", "0.5721876", "0.5715765", "0.56914794", "0.56887436", "0.5684145", "0.56714565", "0.56623274", "0.56463957", "0.5641759", "0.5640871", "0.5637343", "0.56367254", "0.5625192", "0.5622139", "0.56162095", "0.5583657", "0.55795115", "0.5569671", "0.5565349", "0.5565349", "0.555327", "0.5550081", "0.55486983", "0.5543342", "0.5536412", "0.55274624", "0.55212176", "0.552049", "0.5514502", "0.5489749", "0.5471593", "0.5470814", "0.5463783", "0.5458736", "0.5457174", "0.5457025", "0.5457025", "0.5457025", "0.5454166", "0.54519147", "0.5451016", "0.54369974", "0.5430503", "0.54258925", "0.54219604", "0.53825516", "0.5379738", "0.5378553", "0.537815", "0.5374699", "0.5374699", "0.5374699", "0.53737015", "0.53665924", "0.5366303", "0.5352743", "0.535035", "0.5347042", "0.53401774", "0.53378433", "0.5336907", "0.5334482", "0.5330899", "0.5328727", "0.5324196" ]
0.8228789
1
Keep incrementing the current day until it is no longer a hidden day. If the initial value of `date` is not a hidden day, don't do anything. Pass `isExclusive` as `true` if you are dealing with an end date. `inc` defaults to `1` (increment one day forward each time)
function skipHiddenDays(date, inc, isExclusive) { inc = inc || 1; while ( isHiddenDayHash[ ( date.getDay() + (isExclusive ? inc : 0) + 7 ) % 7 ] ) { addDays(date, inc); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function skipHiddenDays(date, inc, isExclusive) {\n\t\tvar out = date.clone();\n\t\tinc = inc || 1;\n\t\twhile (\n\t\t\tisHiddenDayHash[(out.day() + (isExclusive ? inc : 0) + 7) % 7]\n\t\t) {\n\t\t\tout.add('days', inc);\n\t\t}\n\t\treturn out;\n\t}", "function skipHiddenDays(date, inc, isExclusive) {\n\t\tvar out = date.clone();\n\t\tinc = inc || 1;\n\t\twhile (\n\t\t\tisHiddenDayHash[(out.day() + (isExclusive ? inc : 0) + 7) % 7]\n\t\t) {\n\t\t\tout.add('days', inc);\n\t\t}\n\t\treturn out;\n\t}", "_noEntry(){\n const tomorrow = this.date.getDate() + 1;\n this.date.setDate(tomorrow);\n }", "function incrementDate() {\n setDate(addDays(date, 1));\n setPage(1);\n }", "function moveOneDay(date) {date.setTime((date.getTime() + 24 * 60 * 60 * 1000)); }", "function nextDay(date) {\n return new Date(date.getFullYear(), date.getMonth(), date.getDate() + 1)\n }", "function getFutureDate(date) {\n if (isValid(date) && _.isDate(date)) {\n date.setDate(date.getDate() + 1);\n return date;\n }\n }", "function nextDay (data_, nr_days) {\n// var nxt_day = new Date(data_);\n if (!nr_days) {\n nr_days = 1;\n }\n\n/* Este cálculo não estava a devolver sempre a data correta. REDIRECIONADA PARA addDays()\n * var tmp = new Date(nxt_day).getDate();\n console.log(\"data:\"+data_+\" nr_days:\"+nr_days+\" tmp:\"+tmp+\" set date:\" + nxt_day.setDate( tmp + nr_days));\n return formatDate(nxt_day.setDate( new Date(nxt_day).getDate() + nr_days), 'YYYY-MM-DD');\n*/\n return formatDate(addDays(data_,nr_days), 'YYYY-MM-DD');\n}", "function nextDay() {\n rightNow = SunCalcHelper.addDays(rightNow, 1);\n\n if (rightNow.getDate() !== new Date().getDate()) {\n Elements.decreaseDay.addEventListener('click', previousDay);\n Elements.decreaseDay.classList.remove('is-disabled');\n }\n\n getTimes(userPosition);\n updateCurrentMoment(rightNow);\n}", "function incrementDate(date, increment) {\n time = new Date(date.year, date.month-1, date.day).getTime(); // Get the time in milliseconds since the Epoch\n dayMillis = 86400000; // Milliseconds in a day\n\n time = time + increment*dayMillis; // Increment the time\n\n return new Date(time); // Convert the date to our custom format\n}", "function isSoon$static(date/*:Date*/, nextDays/*:int*/)/*:Boolean*/ {\n date =AS3.as( date, Date);\n if (!date) {\n return false;\n }\n var nextDaysMillis/*:int*/ = 1000 * 60 * 60 * 24 * nextDays;\n var diffMillis/*:Number*/ = TimeUtil.getDayAtMidnight(date).getTime() - TimeUtil.getDayAtMidnight(new Date()).getTime();\n return diffMillis >= 0 && diffMillis <= nextDaysMillis;\n }", "function getAvailableDate() {\n const date = new Date();\n date.setDate(date.getDate() + 1);\n return date;\n}", "function dayFwd(dc) {\n\n var x = dateFromString(dc.value);\n // set date to next day\n x.setDate(x.getDate() + 1);\n return setDateControl(dc, x);\n}", "function isEvent() {\r\n var inputDate = document.getElementById(\"userdate\").value;\r\n var actualDate = new Date(inputDate);\r\n var incDate = actualDate.getDate()+1;\r\n actualDate.setDate(incDate);\r\n //var isEven = parseInt(inputDate);\r\n \r\n\r\n if (actualDate.getDate()%2==0) {\r\n document.getElementById(\"isevent\").innerHTML = \"Yes, there is!\"; \r\n } \r\n else {\r\n document.getElementById(\"isevent\").innerHTML = \"Sorry, no event slated for \"+inputDate+ \"!\";\r\n }\r\n}", "adjustForNextDay(date, adjustment) {\n date.setTime( date.getTime() + adjustment * 86400000 )\n }", "function getNextDayOfTheWeek(day, excludeToday = true, hour, minute, refDate = new Date()) {\n const dayOfWeek = [0, 1, 2, 3, 4, 5, 6].indexOf(day);\n if (dayOfWeek < 0) return;\n refDate.setHours(hour, minute);\n refDate.setDate(refDate.getDate() + !!excludeToday + ((dayOfWeek + 7 - refDate.getDay() - !!excludeToday) % 7));\n return refDate;\n}", "function incrementDate() {\n dateOffset ++;\n googleTimeMin = d.getUTCFullYear() + '-' + (d.getUTCMonth() +1 ) + \"-\" + (d.getUTCDate() + dateOffset) + 'T00:00:00.000Z';\n googleTimeMax = d.getUTCFullYear() + '-' + (d.getUTCMonth() +1 ) + \"-\" + (d.getUTCDate() + dateOffset) + 'T23:59:59.999Z';\n calendarDate();\n listUpcomingEvents();\n\n}", "nextDay(){\n return this.addProp(this._time + 24*60*60*1000);\n }", "function decrementDate() {\n setDate(subDays(date, 1));\n setPage(1);\n }", "function addDays(_date, _noOfDays) {\n _date.setDate(_date.getDate() + _noOfDays);\n return _date;\n }", "function expireTime(date) {\n return date.setDate(date.getDate() + 1);\n}", "function getNextDay(date,i) {\n\tvar a = new Date(date);\n\ta = a.valueOf();\n\ta = a + i * 24 * 60 * 60 * 1000;\n\ta = new Date(a);\n\t//初始化时间\n\tvar year = a.getFullYear();\n var\tmonth = a.getMonth() + 1;\n\tvar day = a.getDate();\n\tvar currentDate = year + \"-\";\n\tif (month > 9) {\n\t\tcurrentDate += (month + \"-\");\n\t} else {\n\t\tcurrentDate += (\"0\" + month + \"-\");\n\t}\n\tif (day > 9) {\n\t\tcurrentDate += day;\n\t} else {\n\t\tcurrentDate += (\"0\" + day);\n\t}\n\treturn currentDate;\n}", "function date() {\n let d = new Date()\n /* For testing purposes */\n // d.setDate(d.getDate() + 1)\n return d\n}", "function incrementCurrentDate(increment) {\n\n\tlet currentDate = new Date();\n\tlet daysInMonth = new Date(currentDate.getFullYear(), currentDate.getMonth() + 1, 0).getDate();\n\tlet incrementDate = currentDate.getDate() + increment;\n\n\tif(incrementDate > daysInMonth) {\n\t\tincrementDate = incrementDate % daysInMonth;\t\t\n\t\tcurrentDate.setMonth(currentDate.getMonth() + 1);\n\t\t\n\t}\n\n\tcurrentDate.setDate(incrementDate);\n\n\treturn currentDate;\n}", "function nextDOW(dayName, excludeToday = true, refDate = new Date()) {\n\tconst dayOfWeek = [\"sun\",\"mon\",\"tue\",\"wed\",\"thu\",\"fri\",\"sat\"]\n .indexOf(dayName.slice(0,3).toLowerCase());\n\tif (dayOfWeek < 0) return;\n\tnewDate = new Date(refDate);\n\tnewDate.setHours(1,0,0,0); // setHours(1) to force correct day in case of UTC/BST issues\n\tnewDate.setDate(newDate.getDate() + !!excludeToday + (dayOfWeek + 7 - newDate.getDay() - !!excludeToday) % 7);\n\treturn newDate;\n}", "function getNextDate(date) {\n var day = date.day + 1; //date in increased\n var month = date.month;\n var year = date.year;\n var daysInMonth = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];\n if(month===2)//if month is feb check leapyear or not\n {\n if(leapyear(year))\n {\n if(day>29)\n {\n day=1;\n month++;\n }\n }\n else{\n if(day>28)\n {\n day=1;\n month++;\n }\n }\n }\nelse { //for other month increament if the day >month array\n if (day > daysInMonth[month - 1]) {\n day = 1;\n month++;\n\n }\n}\nif(month>12) //if dec then it may go to 13 14 for that we increment the year and set month to 1\n{\n month=1;\n year++;\n}\nreturn { // return the increment date\n day:day,\n month:month,\n year:year,\n}\n}", "function incrementBusinessDateBy(start_date, increment_by) {\n var date_to_increment = start_date;\n var end_date = \"\", count = 0;\n while(count < Math.abs(increment_by)){\n end_date = new Date(date_to_increment.setDate(date_to_increment.getDate() + (increment_by > 0 ? 1 : -1)));\n if(end_date.getDay() != 0 && end_date.getDay() != 6){\n count++;\n }\n }\n return end_date;\n}", "function addDays(date, days) {\r\n const copy = new Date(Number(date))\r\n copy.setDate(date.getDate() + days)\r\n return copy\r\n }", "function addDays(date, days) {\n const copy = new Date(Number(date));\n copy.setDate(date.getDate() + days);\n return copy;\n }", "function findNextDay(date, dayCode)\r\n{\r\n var targetDay = convertToJSDayCode(dayCode);\r\n var testDate = date;\r\n\r\n while (testDate.getDOW() != targetDay)\r\n {\r\n // log('findNextDay: ' + testDate + ': ' + testDate.getDay() + ' != ' + targetDay );\r\n testDate = addDays(testDate, 1);\r\n }\r\n\r\n return testDate;\r\n}", "function addDays(date, numDays)\r\n{\r\n var newDate = date.clone();\r\n \r\n newDate.addDays( numDays );\r\n return newDate;\r\n}", "function getDate() {\n //if date is greater or equal to the current date, run the logic below\n if (date >= pay_day) {\n counter++;\n //define previous_pay_day to be the same as current pay_day\n previous_pay_day = pay_day;\n //define current pay_day to be pay_day plus 2 weeks\n pay_day = moment(previous_pay_day).add(2, \"week\");\n //call the function again.\n getDate();\n }\n }", "function nextGameDay() {\n var dt = new Date()\n var gameDays = [0, 1, 4]\n\n while(!gameDays.includes(dt.getDay())) {\n dt.setDate(dt.getDate() + 1)\n }\n return dt\n}", "function addDays(date, days) {\n const copy = new Date(Number(date))\n copy.setDate(date.getDate() + days)\n\n return copy\n}", "function addTomorrow() {\n todayView.classList.add(\"hidden\");\n laterView.classList.add(\"hidden\");\n tomorrowViewList.classList.add(\"hidden\");\n tomorrowAddButton.classList.add(\"hidden\");\n if (textForm.classList.contains(\"hidden\")) {\n textForm.classList.remove(\"hidden\");\n }\n var tempDate = new Date();\n tempDate.setDate(tempDate.getDate() + 1);\n dueDate = new Date(tempDate.getFullYear(),tempDate.getMonth(),tempDate.getDate());\n}", "function addDays(date, days) {\n var result = new Date(date);\n result.setDate(result.getDate() + days);\n return result;\n }", "function changeDays(days, date) {\n const result = new Date(date);\n result.setDate(result.getDate() + days);\n return result;\n}", "nextEnabled() {\n return !this.calendar.maxDate ||\n !this._isSameView(this.calendar.activeDate, this.calendar.maxDate);\n }", "nextEnabled() {\n return !this.calendar.maxDate ||\n !this._isSameView(this.calendar.activeDate, this.calendar.maxDate);\n }", "function addDays(date, days) {\n //alert(\"called\");\n var result = new Date(date);\n result.setDate(result.getDate() + days);\n return result;\n}", "function NextDay()\n{\n\tif (boolSaveChanges || bSelectChanged)\n\t{\n\t\tSaveChanges(\"MoveToNextDay()\", \"Daily\");\n\t}\n\telse\n\t{\n\t\tMoveToNextDay();\n\t}\n}", "function addDays(date, days) {\r\n var result = new Date(date);\r\n result.setDate(result.getDate() + days);\r\n return result;\r\n}", "function addDays() {\n var today = new Date();\n var dayNum = today.getDay();\n var dateField = Xrm.Page.getAttribute(\"cog_twobusinessdayslater\");\n\n if (dayNum == 4 || dayNum == 5) {\n today.setDate(today.getDate() + 4);\n dateField.setValue(today);\n dateField.setSubmitMode(\"always\");\n } else {\n today.setDate(today.getDate() + 2);\n dateField.setValue(today);\n dateField.setSubmitMode(\"always\");\n }\n}", "function _isNextDay(d1, d2) {\n if (!_isSameMonth(d1, d2) && !_isNextMonth(d1, d2)) {\n return false;\n }\n return _getDaysDif(d1, d2) === 1;\n }", "function addDays(date, days) {\n var result = new Date(date.getTime());\n result.setDate(result.getDate() + days);\n return result;\n}", "function addDays(date, days) {\n const result = new Date(date);\n result.setDate(result.getDate() + days);\n return result;\n}", "function incrementDate() {\n if (dateIdx < 1255){\n _barChart.updateChart();\n dateIdx += 1;\n } \n else {\n console.log(\"Animation is finished!\")\n dateIdx = 0;\n }\n}", "skip() {\n\t\t// Calculate the next due date for the schedule\n\t\tthis.calculateNextDue();\n\n\t\t// Update the schedule\n\t\tthis.save(true);\n\t}", "function addDays(date, days) {\n var result = new Date(date);\n result.setDate(result.getDate() + days);\n return result;\n}", "async _forwardClicked(){\n this.date.setDate(this.date.getDate() + 1);\n const alreadyWritten = await this.diaryService.alreadyWritten(this.journalID, this.date);\n if(alreadyWritten === false){\n this.promptIndex ++;\n this.diaryService.createEntry(this.journalID,this.date, this.promptIndex, '');\n } else{\n this.diaryService.get(this.journalID, this.date);\n }\n}", "function dealWithOverflow(date, ndays, limit) {\n if (date + ndays > limit) {\n date = date + ndays - limit;\n } else {\n date += ndays;\n }\n return date;\n}", "function AddDays(date, days) {\n \n var result = new Date(date);\n result.setDate(result.getDate() + days);\n \n return result;\n}", "function changeNextDate() {\n var setDateVal = $('#microbundle_fireinspection_inspectionDate').val();\n var setDate = new Date(setDateVal);\n var nextDate = $('#microbundle_fireinspection_nextInspectionDate');\n switch ($(\"input[type='radio']:checked\").val()) {\n case '' :\n nextDate.prop(\"readonly\", false);\n break;\n case '3' :\n setDate.setMonth(setDate.getMonth() + 3);\n nextDate.val(setDate.toISOString().split('T')[0]);\n nextDate.prop(\"readonly\", true);\n break;\n case '6' :\n setDate.setMonth(setDate.getMonth() + 6);\n nextDate.val(setDate.toISOString().split('T')[0]);\n nextDate.prop(\"readonly\", true);\n break;\n case '12' :\n setDate.setMonth(setDate.getMonth() + 12);\n nextDate.val(setDate.toISOString().split('T')[0]);\n nextDate.prop(\"readonly\", true);\n break;\n }\n\n}", "function addOrRemoveDate(date) {\r\n var index = jQuery.inArray(date, dates);\r\n if (index >= 0) removeDate(index);\r\n else addDate(date);\r\n\r\n printArray();\r\n}", "function getNextReminderByDate(currentDate, done) {\n logger.info(\"Inside DAO method - get next reminder by date\");\n logger.info(currentDate);\n remindersModel.find({\n $or : [{\n nextReminder : new Date(currentDate)\n },\n {\n snoozeTime : new Date(currentDate)\n }]\n }, (err, reminderObj) => {\n if (err) return done(`Error while retrieving a Reminder by date ${err}.`);\n return done(null, reminderObj);\n });\n}", "function addDays(date, days) {\n var newDate = new Date(date);\n newDate.setDate(newDate.getDate() + days);\n return newDate;\n }", "function incrementDate(oDate)\r\n{\r\n var oNewDate = new Date();\r\n var nMillisecondsInOneDay = 86400000;\r\n \r\n if (oDate)\r\n {\r\n oNewDate = new Date(oDate.getTime() + nMillisecondsInOneDay);\r\n }\r\n \r\n return oNewDate;\r\n}", "function addDays(date, days) {\n var result = new Date(date);\n result.setDate(date.getDate() + days);\n return result;\n}", "function decrementDate() {\n dateOffset --;\n googleTimeMin = d.getUTCFullYear() + '-' + (d.getUTCMonth() +1 ) + \"-\" + (d.getUTCDate() + dateOffset) + 'T00:00:00.000Z';\n googleTimeMax = d.getUTCFullYear() + '-' + (d.getUTCMonth() +1 ) + \"-\" + (d.getUTCDate() + dateOffset) + 'T23:59:59.999Z';\n calendarDate();\n listUpcomingEvents();\n\n}", "function findNextAvailableOne(date, addFn, increase, testFn, min, max) {\n if (!isInRange(date, min, max)) {\n return;\n }\n\n if (testFn(date)) {\n var newDate = addFn(date, increase);\n return findNextAvailableOne(newDate, addFn, increase, testFn, min, max);\n }\n\n return date;\n } // direction: -1 (left/up), 1 (right/down)", "function incrementTestCaseDate(){\n if (process.env.TEST_CASE_NUMBER) {\n return knex.raw(`\n UPDATE hearings \n SET date = (date + interval '1 day')\n WHERE case_id = '${process.env.TEST_CASE_NUMBER}'\n `)\n }\n}", "function addDate (date, i) {\r\n yyyymmdd = date.split(\"-\");\r\n\r\n var date = new Date(\r\n parseInt(yyyymmdd[0], 10),\r\n parseInt(yyyymmdd[1], 10) - 1,\r\n parseInt(yyyymmdd[2], 10)\r\n );\r\n\r\n date.setDate(date.getDate() + i);\r\n\r\n return date.getFullYear() + \r\n (\"0\" + (date.getMonth() + 1)).slice(-2) +\r\n (\"0\" + date.getDate()).slice(-2)\r\n }", "function fillNext() {\n const nextMonth = moment(currentDate).add(1, 'month');\n const nextStartDay = nextMonth.startOf('month').day();\n for (let i = nextStartDay; i < 14; i++) {\n dateArray.push(i - nextStartDay + 1)\n }\n \n }", "function interfaceNext ( ) {\n\t\t\tif ( !CAN_NEXT ) return;\n\t\t\tCURRENT.addMonths(1);\n\t\t\tgenerateCalendarForCurrent();\n\t\t\temitEvent('Clear');\n\t\t}", "function setDay(date, slide, templateNum) {\n \n // Setup global variables\n var objects = slide.getShapes()\n var calNum = [13, 13, 11, 11, 9]\n const MILLS = 1000 * 60 * 60 * 24 // The number of millisecconds in a day; used for calculations\n \n // Edit numbers\n if ((new Date(date)).getTime() > 100) { // If date exists:\n for (var i = 0; i < 7; i++) { // For each number of calendar dates on template (1-7):\n slide.getShapes()[calNum[templateNum] + i].getText().setText((new Date((new Date((new Date(date)).getTime() - (new Date(date).getDay()*MILLS))).getTime() + i*MILLS)).getDate()) // Set text to day in accordance to weekday\n }\n \n slide.getShapes()[calNum[templateNum] + (new Date(date)).getDay()].getFill().setSolidFill(settingsArray[0][1]) // Fill date day with background color\n slide.getShapes()[calNum[templateNum] + (new Date(date)).getDay()].getText().getTextStyle().setForegroundColor(255, 255, 255) // Set date day text to white\n \n // Delete widget if date does not work\n } else {\n for (var i = 0; i < 8; i++) { // For each date widget number plus day labels:\n slide.getShapes()[calNum[templateNum] - 1 + i].getText().setText(\"\") // Set text to blank\n }\n }\n}", "function addDaysToDate(date, days){\n let res = new Date(date);\n res.setDate(res.getDate() + days);\n return res;\n}", "function dateSelectionRight() {\n date1.setDate(date1.getDate() + 1);\n date2.setDate(date2.getDate() + 1);\n date3.setDate(date3.getDate() + 1);\n refreshDate();\n updateEventContent();\n}", "function nextDate() {\n var year = x.getFullYear();\n var month = x.getMonth();\n if (month == 12) {\n month = 0;\n year += 1;\n }\n x = new Date(year, (month + 1), 1);\n displayDates();\n}", "function addDays(date, days) {\n\tvar result = new Date(date);\n\tresult.setDate(date.getDate() + days);\n\treturn result;\n}", "function changeDateOneStep(step, loop){ // takes -1 or 1 from left/right-Buttons and updates the current Date, loop is true when auto-play is on, so it starts at 0 when end of data is reached\r\n\t\tvar x = document.getElementById(\"time_slider\").value;\r\n\t\tvar thisDate = parseInt(x) + parseInt(step); // thisDate = integer of Timestep (e.g. 0 = first Date in Data)\r\n\t\tvar goLeft = (step == -1) ? true : false;\r\n\t\tupdateInput(thisDate, goLeft, loop);\r\n\t}", "function next(){\n var date = drawer.getUIDateTime();\n var alt_band = drawer.getAltitudeBand();\n date = moment(date).add('minutes', TIME_OFFSET);\n if (date > maxDate) {\n date = minDate;\n }\n drawer.setUIDateTime(date);\n //drawer.updateTimeIndicator(date);\n interpolator.calculateForTimeAndAlt(date, alt_band);\n }", "nextPickupDates (intsArr, isRecycling = false) {\n var arr = []\n var date = null\n var isHoliday = false\n _.each(intsArr, (int, index) => {\n date = Schedule.nextDayOfWeek(int)\n isHoliday = Schedule.isHoliday(date, isRecycling)\n arr.push({ date, isHoliday })\n\n while (isHoliday) {\n int = (index + 1 === intsArr.length) ? intsArr[0] : intsArr[index + 1] // jump to next day in intsArr\n date = Schedule.nextDayOfWeek(int, date)\n isHoliday = Schedule.isHoliday(date, isRecycling)\n arr.push({ date, isHoliday })\n }\n })\n return _.chain(arr).sortBy(x => x.date.valueOf()).uniq(x => x.date.valueOf(), true).value()\n }", "function futureDate(){\n var d = new Date();\n d.setDate(d.getDate() + 33);\nconsole.log(d);\n}", "function addDays(date,days) \n{\n \n var masiku=parseInt(days);\n \n var result = new Date(date);\n result.setDate(result.getDate() + masiku);\n \n \n // return formatDate(result);\n return formatDate(result);\n}", "function addDays(date, days) {\n\t\tif(days == 0) return date;\n\t\treturn new Date(date.getFullYear(), date.getMonth(), date.getDate() + days);\n\t}", "function DisableDays(date){\n\t\tvar day = date.getDay();\n\t\t\n\t\t // If day == 1 then it is MOnday\n\t\t for(var i=0;i<available_days.length;i++){\n\t\t\tif (day == available_days[i]) {\n\t\t\t\treturn [false]; \n\t\t\t}\n\t\t }\n\t}", "isDayActive(date) {\n return date.isSame(this.value, 'day');\n }", "function next(){\n month++;\n if(month==12){\n month=0;\n year++;\n }\n buildCalendar();\n}", "function fillCurrent() {\n for (let i = startDay; i < endDate + startDay; i++) {\n dateArray.push(i - startDay + 1)\n }\n }", "function disableDates(date){\n //Testing, need to get dates from DB instead\n return date.getDate();\n}", "function newDateSimulator() {\r\n\t++date_increment;\r\n\tvar dateToday = new Date();\r\n\tdateToday.setDate(dateToday.getDate() + date_increment);\r\n\tconsole.log(\"dateToday: \", dateToday);\r\n\tdate_text.innerHTML = \"Day: \" + dateToday;\r\n\tdocument.body.appendChild(date_text);\r\n\tdocument.body.appendChild(br1);\r\n\r\n\treturn dateToday;\r\n}", "function blockdates(){\n \n var dateToday = new Date();\n var dtToday = dateToday;\n var ndtToday = dateToday;\n dtToday.setDate(dtToday.getDate() - 14);\n var month = dtToday.getMonth() + 1;\n var day = dtToday.getDate();\n var year = dtToday.getFullYear();\n if(month < 10)\n month = '0' + month.toString();\n if(day < 10)\n day = '0' + day.toString();\n \n var maxDate = year + '-' + month + '-' + day;\n \n $('#positive_date').attr('max', maxDate);\n\n //block by default negetive, not old than positive date\n blockNegativeDate(dtToday);\n //disabled negative date\n document.getElementById(\"negative_date\").disabled = true;\n}", "function modelForNextDay(model, day, infectPerDay, becomeSpreader, daysAsSpreader, lockdown, spreadReduction) {\n\t let reduction = () => day < lockdown ? 1 : (Math.max(Math.exp(-(day - lockdown)), (1 - spreadReduction)));\n\t let perDay = reduction() * infectPerDay; //number pof people infected per day per infected person\n\t let spreaders = arrSum(model,becomeSpreader, daysAsSpreader);\n\t //const sumInfections = (sum, spreaders) => (sum || 0) + Math.min(MAX_NEW_INFECTION, spreaders * perDay);\n\t //let newInfections = spreadPeriod.reduce(sumInfections, 0);\n //let newInfections = Math.min(MAX_NEW_INFECTION,spreaders*perDay);\n let newInfections = arrSum(model,becomeSpreader, daysAsSpreader) * perDay;\n \n\t const forwardOneDay = model.slice(0, model.length - 1); // all existing infected people list moves forward by one day\n\t //return { newModel: [newInfections, ...forwardOneDay], actualPerDay: perDay};\n return { newModel: [Math.min(MAX_NEW_INFECTION,newInfections), ...forwardOneDay], \n \t\t\t\t actualPerDay: perDay\n };\n\n\t}", "includesDate(other) {\n var _this2 = this;\n\n const date = other.isDateInfo ? other : new dateInfo_DateInfo(other, this.opts);\n\n if (!this.shallowIncludesDate(date)) {\n return false;\n }\n\n if (!this.on) {\n return true;\n }\n\n const range = this.findShallowIntersectingRange(this, date);\n let result = true;\n this.iterateDatesInRange(range, function (state) {\n if (_this2.matchesDay(state.day)) {\n result = result && date.matchesDay(state.day);\n state.finished = !result;\n }\n });\n return result;\n }", "includesDate(other) {\n var _this2 = this;\n\n const date = other.isDateInfo ? other : new dateInfo_DateInfo(other, this.opts);\n\n if (!this.shallowIncludesDate(date)) {\n return false;\n }\n\n if (!this.on) {\n return true;\n }\n\n const range = this.findShallowIntersectingRange(this, date);\n let result = true;\n this.iterateDatesInRange(range, function (state) {\n if (_this2.matchesDay(state.day)) {\n result = result && date.matchesDay(state.day);\n state.finished = !result;\n }\n });\n return result;\n }", "function goTo(date) {\n try {\n // get curDate\n const [dd, mm, yyyy] = document.querySelector(\"h3.jsx-2989278273\").textContent.slice(11).split(\"/\");\n const curDate = `${yyyy}-${mm}-${dd}`;\n\n // the given `date` is `n` days before or after\n const n = (Date.parse(curDate) - Date.parse(date)) / 864e5;\n const nAbs = Math.abs(n);\n\n // get btn\n const btns = document.querySelectorAll('.jsx-2989278273.report-nav');\n const btn = n > 0 ? btns[0] : btns[1];\n\n console.log(`Start jumping to ${nAbs} day${nAbs > 1 ? \"s\" : \"\"} ${n > 0 ? \"before\" : \"after\"}...`);\n for (i = 1; i <= nAbs; i++) {\n btn.click();\n if (i % 30 == 0) console.log(`> already jumped ${i} days...`);\n }\n console.log(`Finished! Now on ${date}.`);\n } catch (err) {\n console.error(err);\n }\n}", "function next(){\n if(dateInfo.currentMonth!=11){\n dateInfo.currentMonth++;\n }\n else{\n dateInfo.currentYear++;\n dateInfo.currentMonth=0;\n }\n while (calendar.firstChild) {calendar.removeChild(calendar.firstChild);}\n createCalendar();\n document.documentElement.scrollTop = 0; \n}", "function blockNegativeDate(ndate){\n ndate.setDate(ndate.getDate() + 1);\n var nmonth = ndate.getMonth() + 1;\n var nday = ndate.getDate();\n var nyear = ndate.getFullYear();\n if(nmonth < 10)\n nmonth = '0' + nmonth.toString();\n if(nday < 10)\n nday = '0' + nday.toString();\n \n var nmaxDate = nyear + '-' + nmonth + '-' + nday;\n $('#negative_date').attr('min', nmaxDate);\n}", "function addDays(currentDate,days) {\r\n\tvar dat = new Date(currentDate);\r\n\tdat.setDate(dat.getDate() + days);\r\n\treturn dat;\r\n}", "function nextMonth() {\n // -- add one month to the viewDate --/\n $directive.viewDate.setDate(1);\n $directive.viewDate.setMonth($directive.viewDate.getMonth() + 1);\n // -- reload the viewdate :P --/\n setViewDate($directive.viewDate);\n }", "function updateDays() {\n var days = fjDateTab.querySelectorAll('.fj-date-tab'),\n temp, num = days.length;\n while(num--) {\n temp = curStart.clone()\n .add(num, 'd');\n // if today or tomorrow then same else change\n days[num].querySelector('.fj-date-title')\n .innerHTML = temp.calendar(curStart, {\n sameDay: '[Today]',\n nextDay: '[Tomorrow]',\n nextWeek: 'ddd',\n lastDay: '[Yesterday]',\n lastWeek: '[Last] ddd',\n sameElse: 'ddd'\n });\n days[num].querySelector('.fj-date-subtitle')\n .innerHTML = temp.format('D MMM');\n }\n}", "advance24Hours(time) {\n time.setDate(time.getDate() + 1);\n return time;\n }", "function shouldRunAlgoForNextEventDate(eventGenerator) {\n const now = moment();\n // if eventGeneratorDate is after now, then we can just wait until then to start the algo.\n // i.e. afterNow => return false\n return eventGenerator.isReoccurring && (\n eventGenerator.intervalYear ||\n eventGenerator.intervalMonth ||\n eventGenerator.intervalDay) && moment(eventGenerator.date).isSameOrBefore(now);\n}", "function move2Now() {\r\n var now = new Date();\r\n //var nowBuff = new Date(now.getTime() + (24*3600*1000));\r\n///Set to tomorrow so it includes all of today\r\n //$(\"#date2\").val(now.toISOString().split('T')[0]);\r\n $(\"#date2\").val(momentLA_Date(now));\r\n setStartRange(now, $(\"#qryRangeDD\").val()); \r\n $('#fwd').addClass('disabled');\r\n $('#fwdEnd').addClass('disabled');\r\n //timelineType();\r\n}", "function changeDate(dir){\n\n if(dir > 0){\n // go to next day\n index = (index + 1) % data.length;\n }else{\n // go to previous day\n index = (index - 1 + data.length) % data.length;\n }\n\n log(\"Index: \" + index);\n\n // update stats placeholders\n $(\"#date\").text(data[index].date);\n $(\"#dailyStat\").html(data[index].numtoday.toLocaleString('en-US'));\n $(\"#totalStat\").html(data[index].numtotal.toLocaleString('en-US'));\n}", "function IncrementTaskNonBlock()\n{\n if (data.taskNum < data.taskList.length-1)\n\tdata.taskNum++;\n data.SaveState();\n floatingDaily.Draw();\n}", "function activate_date(objInp){ objInp.disabled=(objInp.disabled^ true );}", "function addDays(date, days)\r\n{\r\n var millisecondsInDay = 86400000;\r\n var addedDate = new Date();\r\n addedDate.setTime(date.valueOf() + (days * millisecondsInDay));\r\n return addedDate;\r\n}" ]
[ "0.73943055", "0.73943055", "0.612547", "0.6119797", "0.59336084", "0.5883459", "0.5559785", "0.54565847", "0.5366886", "0.5352873", "0.5349927", "0.5287219", "0.5190578", "0.5187464", "0.51595217", "0.50864446", "0.506023", "0.50530714", "0.5033056", "0.4995627", "0.49903795", "0.49844185", "0.49825388", "0.4966662", "0.49656144", "0.4962253", "0.49164176", "0.48807174", "0.48783052", "0.4875837", "0.48695397", "0.48469204", "0.48168564", "0.48073453", "0.4802706", "0.48001358", "0.47950712", "0.47933617", "0.47933617", "0.47882637", "0.4780671", "0.47806275", "0.4762833", "0.47491443", "0.47484228", "0.47422782", "0.47418094", "0.473079", "0.472403", "0.47226477", "0.47183087", "0.46896037", "0.46893704", "0.4686827", "0.46797207", "0.46722713", "0.46538422", "0.46277156", "0.46214154", "0.46046156", "0.45972002", "0.4588063", "0.45839837", "0.4583474", "0.4580228", "0.4570059", "0.45647687", "0.45542273", "0.45535988", "0.45535675", "0.4547546", "0.45442995", "0.45301384", "0.45276365", "0.4521067", "0.4514188", "0.45079723", "0.45022145", "0.44706813", "0.446436", "0.44528043", "0.4448337", "0.44200614", "0.4418426", "0.4418426", "0.44136074", "0.4411086", "0.4405729", "0.43933055", "0.43842116", "0.43662652", "0.4365541", "0.4362824", "0.43613318", "0.43583634", "0.43499383", "0.43454584", "0.43452123" ]
0.7422984
1
cell offset > day offset
function cellOffsetToDayOffset(cellOffset) { var day0 = t.visStart.getDay(); // first date's day of week cellOffset += dayToCellMap[day0]; // normlize cellOffset to beginning-of-week return Math.floor(cellOffset / cellsPerWeek) * 7 // # of days from full weeks + cellToDayMap[ // # of days from partial last week (cellOffset % cellsPerWeek + cellsPerWeek) % cellsPerWeek // crazy math to handle negative cellOffsets ] - day0; // adjustment for beginning-of-week normalization }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function dayOffsetToCellOffset(dayOffset) {\n\t\tvar day0 = t.visStart.getDay(); // first date's day of week\n\t\tdayOffset += day0; // normalize dayOffset to beginning-of-week\n\t\treturn Math.floor(dayOffset / 7) * cellsPerWeek // # of cells from full weeks\n\t\t\t+ dayToCellMap[ // # of cells from partial last week\n\t\t\t\t(dayOffset % 7 + 7) % 7 // crazy math to handle negative dayOffsets\n\t\t\t]\n\t\t\t- dayToCellMap[day0]; // adjustment for beginning-of-week normalization\n\t}", "function dayOffsetToCellOffset(dayOffset) {\n\t\tvar day0 = t.visStart.getDay(); // first date's day of week\n\t\tdayOffset += day0; // normalize dayOffset to beginning-of-week\n\t\treturn Math.floor(dayOffset / 7) * cellsPerWeek // # of cells from full weeks\n\t\t\t+ dayToCellMap[ // # of cells from partial last week\n\t\t\t\t(dayOffset % 7 + 7) % 7 // crazy math to handle negative dayOffsets\n\t\t\t]\n\t\t\t- dayToCellMap[day0]; // adjustment for beginning-of-week normalization\n\t}", "function dayOffsetToCellOffset(dayOffset) {\n\t\tvar day0 = t.visStart.getDay(); // first date's day of week\n\t\tdayOffset += day0; // normalize dayOffset to beginning-of-week\n\t\treturn Math.floor(dayOffset / 7) * cellsPerWeek // # of cells from full weeks\n\t\t\t+ dayToCellMap[ // # of cells from partial last week\n\t\t\t\t(dayOffset % 7 + 7) % 7 // crazy math to handle negative dayOffsets\n\t\t\t]\n\t\t\t- dayToCellMap[day0]; // adjustment for beginning-of-week normalization\n\t}", "function dayOffsetToCellOffset(dayOffset) {\n\t\tvar day0 = t.start.day(); // first date's day of week\n\t\tdayOffset += day0; // normalize dayOffset to beginning-of-week\n\t\treturn Math.floor(dayOffset / 7) * cellsPerWeek + // # of cells from full weeks\n\t\t\tdayToCellMap[ // # of cells from partial last week\n\t\t\t\t(dayOffset % 7 + 7) % 7 // crazy math to handle negative dayOffsets\n\t\t\t] -\n\t\t\tdayToCellMap[day0]; // adjustment for beginning-of-week normalization\n\t}", "function dayOffsetToCellOffset(dayOffset) {\n\t\tvar day0 = t.start.day(); // first date's day of week\n\t\tdayOffset += day0; // normalize dayOffset to beginning-of-week\n\t\treturn Math.floor(dayOffset / 7) * cellsPerWeek + // # of cells from full weeks\n\t\t\tdayToCellMap[ // # of cells from partial last week\n\t\t\t\t(dayOffset % 7 + 7) % 7 // crazy math to handle negative dayOffsets\n\t\t\t] -\n\t\t\tdayToCellMap[day0]; // adjustment for beginning-of-week normalization\n\t}", "function cellOffsetToDayOffset(cellOffset) {\n\t\tvar day0 = t.start.day(); // first date's day of week\n\t\tcellOffset += dayToCellMap[day0]; // normlize cellOffset to beginning-of-week\n\t\treturn Math.floor(cellOffset / cellsPerWeek) * 7 + // # of days from full weeks\n\t\t\tcellToDayMap[ // # of days from partial last week\n\t\t\t\t(cellOffset % cellsPerWeek + cellsPerWeek) % cellsPerWeek // crazy math to handle negative cellOffsets\n\t\t\t] -\n\t\t\tday0; // adjustment for beginning-of-week normalization\n\t}", "function cellOffsetToDayOffset(cellOffset) {\n\t\tvar day0 = t.start.day(); // first date's day of week\n\t\tcellOffset += dayToCellMap[day0]; // normlize cellOffset to beginning-of-week\n\t\treturn Math.floor(cellOffset / cellsPerWeek) * 7 + // # of days from full weeks\n\t\t\tcellToDayMap[ // # of days from partial last week\n\t\t\t\t(cellOffset % cellsPerWeek + cellsPerWeek) % cellsPerWeek // crazy math to handle negative cellOffsets\n\t\t\t] -\n\t\t\tday0; // adjustment for beginning-of-week normalization\n\t}", "function E(a){// TODO: remove because mom.hasTime() from realCellToDate() is better\nreturn Na(\"allDaySlot\")&&!a.row}", "function daysPosition(day, offset) {\n let days = ['monday', 'tuesday', 'wednesday', 'thursday', 'friday', 'saturday', 'sunday']\n\n if (days.indexOf(day.toLowerCase()) < 0) {\n return \"That's not a day of the week\"\n }\n\n if (!offset) {\n days.unshift(...days.splice(6, 1))\n }\n\n return days.indexOf(day.toLowerCase()) + 1\n}", "function dateToCell(date) {\n\t\tvar dayOffset = dateToDayOffset(date);\n\t\tvar cellOffset = dayOffsetToCellOffset(dayOffset);\n\t\tvar cell = cellOffsetToCell(cellOffset);\n\t\treturn cell;\n\t}", "function dateToCell(date) {\n\t\tvar dayOffset = dateToDayOffset(date);\n\t\tvar cellOffset = dayOffsetToCellOffset(dayOffset);\n\t\tvar cell = cellOffsetToCell(cellOffset);\n\t\treturn cell;\n\t}", "function dateToCell(date) {\n\t\tvar dayOffset = dateToDayOffset(date);\n\t\tvar cellOffset = dayOffsetToCellOffset(dayOffset);\n\t\tvar cell = cellOffsetToCell(cellOffset);\n\t\treturn cell;\n\t}", "function dateToCell(date) {\n\t\tvar dayOffset = dateToDayOffset(date);\n\t\tvar cellOffset = dayOffsetToCellOffset(dayOffset);\n\t\tvar cell = cellOffsetToCell(cellOffset);\n\t\treturn cell;\n\t}", "function dateToCell(date) {\n\t\tvar dayOffset = dateToDayOffset(date);\n\t\tvar cellOffset = dayOffsetToCellOffset(dayOffset);\n\t\tvar cell = cellOffsetToCell(cellOffset);\n\t\treturn cell;\n\t}", "function calculateDayOffset(date)\n{\n var dayFormula = 1000*60*60*24;\n return Math.round(new Date().getTime()/dayFormula - date.getTime()/dayFormula);\n}", "function getCellForDate ( dt ) {\n\t\t\treturn ROOT.querySelector('[data-calc=\"' + getCalcForDate(dt) + '\"][data-valid=\"true\"]');\n\t\t}", "function C(a){var b=G.start.day();// normalize dayOffset to beginning-of-week\n// first date's day of week\n// # of cells from full weeks\n// # of cells from partial last week\nreturn a+=b,Math.floor(a/7)*N+Q[(a%7+7)%7]-Q[b]}", "function E(a){// TODO: remove because mom.hasTime() from realCellToDate() is better\nreturn Qa(\"allDaySlot\")&&!a.row}", "function dateToDayOffset(date) {\n\t\treturn dayDiff(date, t.visStart);\n\t}", "function dateToDayOffset(date) {\n\t\treturn dayDiff(date, t.visStart);\n\t}", "function dateToDayOffset(date) {\n\t\treturn dayDiff(date, t.visStart);\n\t}", "col_row_offset_from_offset(offset) {\n return [\n this.cell_from_offset(this.cell_width, offset.left),\n this.cell_from_offset(this.cell_height, offset.top),\n ];\n }", "function dateToDayOffset(date) {\n\t\treturn date.clone().stripTime().diff(t.start, 'days');\n\t}", "function dateToDayOffset(date) {\n\t\treturn date.clone().stripTime().diff(t.start, 'days');\n\t}", "function search_weekday(weekday, jd, direction, offset) {\n return weekday_before(weekday, jd + (direction * offset));\n}", "function search_weekday(weekday, jd, direction, offset)\n {\n return weekday_before(weekday, jd + (direction * offset));\n }", "function fillDays() {\n var i;\n var calendarDays = document\n .getElementById(\"calendarTable\")\n .getElementsByTagName(\"tbody\")[0]\n .getElementsByClassName(\"day\");\n\n //get month -current month is April -so this got 3\n month = date.getMonth();\n console.log(month);\n //get year -current year is 2019\n year = date.getFullYear();\n console.log(year);\n var daysOffset = new Date(year, month, 1).getDay();\n console.log(daysOffset);\n var numberOfDays = new Date(year, month + 1, 0).getDate(); //0 for day gives last day of the PREVIOUS month\n console.log(numberOfDays);\n\n //clear cells\n for (i = 0; i < calendarDays.length; i++) {\n calendarDays[i].innerHTML = \"&nbsp\";\n }\n\n //populate cells with dates, 1-31\n for (i = 1; i <= numberOfDays; i++) {\n calendarDays[daysOffset].innerHTML = i;\n daysOffset++;\n }\n}", "function get_selected_day() {\r\n return $('.days_panel .day.day_selected').attr('day_offset');\r\n}", "function findWorkingColumn(today) {\n var firstColumn = 2\n , lastColumn = rangeData.getLastColumn() - 1\n , dateSearchRange = sheet.getRange(firstColumn, 2, 1, lastColumn)\n , rangeValues = dateSearchRange.getValues();\n\n for (i = 0; i < lastColumn; i++) {\n var date = Utilities.formatDate(rangeValues[0][i], \"GMT\", \"yyyy-MM-dd\");\n\n if (date === today) {\n return i + 2;\n }\n }\n}", "getDateOffset(date) {\n let currentTime = date ? new Date(date) : new Date();\n let currentOffset = date ? currentTime.getTimezoneOffset(): 0;\n return new Date(currentTime.getTime() +Math.abs(currentOffset*60000));\n }", "renderCells() {\n const { currentMonth, today, booked } = this.state;\n const monthStart = dateFns.startOfMonth(currentMonth);\n const monthEnd = dateFns.endOfMonth(monthStart);\n const startDate = dateFns.startOfWeek(monthStart);\n const endDate = dateFns.endOfWeek(monthEnd);\n\n const dateFormat = \"D\";\n const rows = [];\n\n let days = [];\n let day = startDate;\n let formattedDate = \"\";\n\n // loop from startDate to endDate to show all the dates\n while (day <= endDate) {\n for (let i = 0; i < 7; i++) {\n formattedDate = dateFns.format(day, dateFormat);\n const cloneDay = day;\n // determine if day is disabled, today or has event and assign the style\n days.push(\n <div\n className={`col cell ${\n !dateFns.isSameMonth(day, monthStart)\n ? \"disabled\"\n : dateFns.isSameDay(day, today) ? \"selected\" : \"\"\n }${booked.map((book) => dateFns.isSameDay(day, book) ? \"booked\" : \"\").join('')}\n ` }\n \n key={day}\n onClick={() => this.onDateClick(dateFns.parse(cloneDay))}\n >\n <span className=\"number\">{formattedDate}</span>\n <span className=\"bg\">{formattedDate}</span>\n \n </div>\n );\n day = dateFns.addDays(day, 1);\n }\n rows.push(\n <div className=\"row\" key={day}>\n {days}\n </div>\n );\n days = [];\n }\n return <div className=\"body\">{rows}</div>;\n }", "function getIsCellAllDay(cell) { // TODO: remove because mom.hasTime() from realCellToDate() is better\n\t\treturn opt('allDaySlot') && !cell.row;\n\t}", "function getIsCellAllDay(cell) { // TODO: remove because mom.hasTime() from realCellToDate() is better\n\t\treturn opt('allDaySlot') && !cell.row;\n\t}", "function y(a){var b=G.start.day();// normlize cellOffset to beginning-of-week\n// first date's day of week\n// # of days from full weeks\n// # of days from partial last week\nreturn a+=Q[b],7*Math.floor(a/N)+R[(a%N+N)%N]-b}", "function dayOffsetToDate(dayOffset) {\n\t\tvar date = cloneDate(t.visStart);\n\t\taddDays(date, dayOffset);\n\t\treturn date;\n\t}", "function dayOffsetToDate(dayOffset) {\n\t\tvar date = cloneDate(t.visStart);\n\t\taddDays(date, dayOffset);\n\t\treturn date;\n\t}", "function dayOffsetToDate(dayOffset) {\n\t\tvar date = cloneDate(t.visStart);\n\t\taddDays(date, dayOffset);\n\t\treturn date;\n\t}", "function weekOffset(dayOffset) {\n if (dayOffset >= 0) {\n return Math.floor(dayOffset / 7);\n }\n dayOffset = -dayOffset;\n dayOffset--;\n return -Math.floor(dayOffset / 7) - 1;\n}", "function getDay(offset = 0) {\n const day = new Date();\n const weekday = ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'];\n return weekday[(day.getDay() + offset) % 7];\n}", "function cellOffsetToCell(cellOffset) {\n\t\tvar colCnt = t.getColCnt();\n\n\t\t// rtl variables. wish we could pre-populate these. but where?\n\t\tvar dis = isRTL ? -1 : 1;\n\t\tvar dit = isRTL ? colCnt - 1 : 0;\n\n\t\tvar row = Math.floor(cellOffset / colCnt);\n\t\tvar col = ((cellOffset % colCnt + colCnt) % colCnt) * dis + dit; // column, adjusted for RTL (dis & dit)\n\t\treturn {\n\t\t\trow: row,\n\t\t\tcol: col\n\t\t};\n\t}", "function cellOffsetToCell(cellOffset) {\n\t\tvar colCnt = t.getColCnt();\n\n\t\t// rtl variables. wish we could pre-populate these. but where?\n\t\tvar dis = isRTL ? -1 : 1;\n\t\tvar dit = isRTL ? colCnt - 1 : 0;\n\n\t\tvar row = Math.floor(cellOffset / colCnt);\n\t\tvar col = ((cellOffset % colCnt + colCnt) % colCnt) * dis + dit; // column, adjusted for RTL (dis & dit)\n\t\treturn {\n\t\t\trow: row,\n\t\t\tcol: col\n\t\t};\n\t}", "function cellOffsetToCell(cellOffset) {\n\t\tvar colCnt = t.getColCnt();\n\n\t\t// rtl variables. wish we could pre-populate these. but where?\n\t\tvar dis = isRTL ? -1 : 1;\n\t\tvar dit = isRTL ? colCnt - 1 : 0;\n\n\t\tvar row = Math.floor(cellOffset / colCnt);\n\t\tvar col = ((cellOffset % colCnt + colCnt) % colCnt) * dis + dit; // column, adjusted for RTL (dis & dit)\n\t\treturn {\n\t\t\trow: row,\n\t\t\tcol: col\n\t\t};\n\t}", "function cellOffsetToCell(cellOffset) {\n\t\tvar colCnt = t.getColCnt();\n\n\t\t// rtl variables. wish we could pre-populate these. but where?\n\t\tvar dis = isRTL ? -1 : 1;\n\t\tvar dit = isRTL ? colCnt - 1 : 0;\n\n\t\tvar row = Math.floor(cellOffset / colCnt);\n\t\tvar col = ((cellOffset % colCnt + colCnt) % colCnt) * dis + dit; // column, adjusted for RTL (dis & dit)\n\t\treturn {\n\t\t\trow: row,\n\t\t\tcol: col\n\t\t};\n\t}", "function cellOffsetToCell(cellOffset) {\n\t\tvar colCnt = t.getColCnt();\n\n\t\t// rtl variables. wish we could pre-populate these. but where?\n\t\tvar dis = isRTL ? -1 : 1;\n\t\tvar dit = isRTL ? colCnt - 1 : 0;\n\n\t\tvar row = Math.floor(cellOffset / colCnt);\n\t\tvar col = ((cellOffset % colCnt + colCnt) % colCnt) * dis + dit; // column, adjusted for RTL (dis & dit)\n\t\treturn {\n\t\t\trow: row,\n\t\t\tcol: col\n\t\t};\n\t}", "styleEvents(events){\n const {\n day\n } = this.props;\n\n const columnEndTimes = [];\n\n return events.map((event) => {\n const { startDate, endDate } = event;\n\n const startOfDayUnix = day.startMoment.valueOf();\n const endOfDayUnix = day.endMoment.valueOf();\n\n let styles = {\n top:`${((startDate - startOfDayUnix)/(endOfDayUnix - startOfDayUnix))*100}%`,\n height: (DAY_COLUMN_HEIGHT/MS_IN_DAY)*(endDate-startDate)\n };\n\n // columns - this just offsets everything 45px*the col. We might want to change this to a percentage based on the total # of cols in the future.\n // loop through all the column event times and find the lowest column with no overlap\n for (let [idx, columnEndTime] of columnEndTimes.entries()) {\n if (startDate >= columnEndTime) {\n columnEndTimes[idx] = endDate;\n\n styles = {\n ...styles,\n left: `${idx*45}px`,\n zIndex: idx\n };\n\n break;\n }\n }\n\n // if there is STILL overlap, then we need to make a new column\n // with the current event's endTime there.\n if(!styles.left) {\n columnEndTimes.push(endDate);\n\n styles = {\n ...styles,\n left: `${(columnEndTimes.length - 1)*45}px`,\n zIndex: columnEndTimes.length - 1\n };\n\n }\n\n return {\n ...event,\n styles\n };\n });\n }", "function dayOffsetToDate(dayOffset) {\n\t\treturn t.start.clone().add('days', dayOffset);\n\t}", "function dayOffsetToDate(dayOffset) {\n\t\treturn t.start.clone().add('days', dayOffset);\n\t}", "function findWorkingRow(time) {\n var firstRow = 3\n , lastRow = 24\n , hourSearchRange = sheet.getRange(firstRow, 1, lastRow, 1)\n , rangeValues = hourSearchRange.getValues();\n\n for (i = 0; i < lastRow; i++) {\n // Some weird conversion of these hour formatted cells here... Gotta offset by 6..idk why.\n var hour = Utilities.formatDate(rangeValues[i][0], \"GMT-6\", \"HH\");\n\n if (hour === time) {\n return i + 3;\n }\n }\n}", "cell_from_offset(sizes, offset) {\n // We explore the grid in both directions, starting from the origin.\n let index = 0;\n const original_offset = offset;\n if (offset === 0) {\n return [index, 0];\n }\n // The following two loops have been kept separate to increase readability.\n // Explore to the right or bottom...\n while (offset >= 0) {\n const size = this.cell_size(sizes, index);\n if (offset < size) {\n return [index, original_offset - offset];\n }\n offset -= size;\n ++index;\n }\n // Explore to the left or top...\n while (offset <= 0) {\n --index;\n const size = this.cell_size(sizes, index);\n if (Math.abs(offset) < size) {\n return [index, original_offset - (offset + size)];\n }\n offset += size;\n }\n }", "function compareDaySegCols(a, b) {\n return a.leftCol - b.leftCol;\n}", "function compareDaySegCols(a, b) {\n return a.leftCol - b.leftCol;\n}", "function compareDaySegCols(a, b) {\n return a.leftCol - b.leftCol;\n}", "function compareDaySegCols(a, b) {\n return a.leftCol - b.leftCol;\n}", "function compareDaySegCols(a, b) {\n return a.leftCol - b.leftCol;\n}", "_handleCalendarCellHover(event, cell) {\n const that = this;\n\n if (that._animationStarted) {\n return;\n }\n\n if (that.displayMode === 'month') {\n if (event.type === 'mouseover' && that.selectionMode === 'many' && that.selectedDates.length > 0) {\n const months = that.$.monthsContainer.children;\n\n for (let m = 0; m < months.length; m++) {\n that._getMonthCells(months[m]).map(cell => {\n that._setCellState(cell, 'hover', false);\n });\n }\n\n let firstSelectedDate = new Date(that.selectedDates[0]),\n targetDate = new Date(cell.value),\n targetCell = cell;\n const nextCoeff = firstSelectedDate.getTime() > targetDate.getTime() ? -1 : 1,\n hoverCell = function () {\n targetCell = that._getCellByDate(firstSelectedDate, that.$.monthsContainer);\n\n if (targetCell && !targetCell.selected && !targetCell.restricted) {\n that._setCellState(targetCell, 'hover', true);\n }\n };\n\n if (firstSelectedDate.getTime() !== targetDate.getTime()) {\n firstSelectedDate.setDate(firstSelectedDate.getDate() + nextCoeff);\n while (firstSelectedDate.getTime() !== targetDate.getTime()) {\n hoverCell();\n firstSelectedDate.setDate(firstSelectedDate.getDate() + nextCoeff);\n }\n\n hoverCell();\n }\n }\n else {\n that._setCellState(cell, 'hover', false);\n }\n }\n\n if (event.type === 'mouseover' && !cell.otherMonth) {\n that._setCellState(cell, 'hover', true);\n }\n else {\n that._setCellState(cell, 'hover', false);\n }\n }", "function cellsTranslate(d,i){\n \n let cellSize = timeDaySize;\n\n let rowsLength = 7;\n let colsLength = 7;\n let cols = Math.floor(i/colsLength); // divide to place into rows, floor to get rid of decimals\n let rows = i % rowsLength; // using remainder to detect when to switch to next column. \n // use remainder instead of division to loop through 0-5\n \n\n // let x = 1475 + cellSize * rows * 2.5;\n // let y = 100+ cellSize * cols * 3;\n \n let x = 1475 + cellSize * rows * 2.5;\n let y = 100+ cellSize * cols * 3;\n \n \n return \"translate(\" + x + \",\" + y + \")\";\n}", "function addDayOfWeekToMissedDays()\r\n{\r\n\t$(\"tr td[colspan=4]:not(.grey)\").each(function(){\r\n\t\tvar dateField = this.previousSibling.previousSibling;\r\n\t\t\t\t\r\n\t\tif(isInt($(dateField).text()[0]))\r\n\t\t{\t\t\r\n\t\t\tsetupDay(dateField,\tnull);\r\n\t\t}\r\n\t});\r\n}", "function compareDaySegCols(a, b) {\n\treturn a.leftCol - b.leftCol;\n}", "function compareDaySegCols(a, b) {\n\treturn a.leftCol - b.leftCol;\n}", "function compareDaySegCols(a, b) {\n\treturn a.leftCol - b.leftCol;\n}", "function compareDaySegCols(a, b) {\n\treturn a.leftCol - b.leftCol;\n}", "function compareDaySegCols(a, b) {\n\treturn a.leftCol - b.leftCol;\n}", "function compareDaySegCols(a, b) {\n\treturn a.leftCol - b.leftCol;\n}", "function compareDaySegCols(a, b) {\n\treturn a.leftCol - b.leftCol;\n}", "function compareDaySegCols(a, b) {\n\treturn a.leftCol - b.leftCol;\n}", "function compareDaySegCols(a, b) {\n\t\treturn a.leftCol - b.leftCol;\n\t}", "function compareDaySegCols(a, b) {\n return a.leftCol - b.leftCol;\n }", "function compareDaySegCols(a, b) {\n return a.leftCol - b.leftCol;\n }", "function compareDaySegCols(a, b) {\n return a.leftCol - b.leftCol;\n }", "function compareDaySegCols(a, b) {\n return a.leftCol - b.leftCol;\n }", "_weeksDownHandler(event, cell) {\n const that = this,\n date = cell.value;\n let neighbourMonth;\n\n if (cell.otherMonth) {\n neighbourMonth = cell.value.getTime() > cell.closest('.jqx-calendar-month')._date.getTime() ? 1 : -1;\n }\n\n if (that.hasRippleAnimation) {\n JQX.Utilities.Animation.Ripple.animate(cell, event.pageX, event.pageY);\n }\n\n if (neighbourMonth) {\n if (that._isDateInView(cell.value)) {\n return;\n }\n\n if (!that.disableAutoNavigation) {\n that.navigate(neighbourMonth * that.months);\n }\n\n return;\n }\n\n cell = that._getCellByDate(date);\n\n if (cell && (cell.disabled || cell.restricted)) {\n return;\n }\n\n that._handleDateSelection(cell);\n }", "function getRowDay(row) {\n let dayText = null\n\n // sessions whose durations overlap, are placed on adjacent rows\n // these rows do not contain data about the weekday\n // so retrace rows until the current weekday is determined\n\n while (!dayText && $(row).prev()[0] !== row) {\n dayText = $(row).find('.weekday').text()\n row = $(row).prev()\n }\n\n return DAYS.indexOf(dayText)\n}", "function cursorIsInsideOfTableCell(dom, offsets, cellNode){\n var isInsideOfCell = true;\n var allText = dom.documentElement.outerHTML;\n var cellOuterHTML = cellNode.outerHTML;\n var selStr = allText.substring(offsets[0],offsets[1]);\n \n if ( stripWhiteSpace(selStr) == stripWhiteSpace(cellOuterHTML) ){\n isInsideOfCell = false;\n }\n\n return isInsideOfCell;\n}", "function calendarDate() {\n //Need to be able to handle when dateOffset > than weekDays array \n //calendarDateOffset = dateOffset;\n $(\"#calendar-date\").empty();\n $(\"#calendar-date\").append( (weekDays[d.getUTCDay() + dateOffset]) + \" , \" + (months[d.getUTCMonth()]) + \" \" + (d.getUTCDate() + dateOffset) );\n}", "moins(nombreJours){\n return this.offset(-1*nombreJours*24*3600)\n}", "function cellCompete(states, days) {\n\t// WRITE YOUR CODE HERE\n\tif (days === 0) return false;\n\tif (states == null || states.length === 0) return false;\n\n\tlet tmp = [...states];\n\n\twhile (days > 0) {\n\t\tlet j = 0;\n\t\tfor (let i = 0; i < 8; i++) {\n\t\t\tj = i + 1;\n\t\t\tif (i === 0) {\n\t\t\t\t//left edge cell\n\t\t\t\tif (states[j] === 0) {\n\t\t\t\t\ttmp[i] = 0;\n\t\t\t\t} else {\n\t\t\t\t\ttmp[i] = 1;\n\t\t\t\t}\n\t\t\t} else if (i === 7) {\n\t\t\t\t//rigth edge cell\n\t\t\t\tif (states[i - 1] === 0) {\n\t\t\t\t\ttmp[i] = 0;\n\t\t\t\t} else {\n\t\t\t\t\ttmp[i] = 1;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif (states[i - 1] === states[j]) {\n\t\t\t\t\ttmp[i] = 0;\n\t\t\t\t} else {\n\t\t\t\t\ttmp[i] = 1;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tdays--;\n\t\tstates = [...tmp];\n\t}\n\n\treturn states;\n}", "function onHourChange() {\r\n clearTimer();\r\n //casy prevedene na cisla\r\n var t1,t2;\r\n //Pozice bunky\r\n var index = td==null?0:td.cellIndex+1;\r\n if(tr.cells.length<=index)\r\n return false;\r\n //Nalezeni bunky aktualni hodiny\r\n if(td==null) {\r\n //Prvni spusteni: Najit bunku odpovidajici nasemu casu\r\n \r\n for(var i=0,l=casy2.length; i<l; i++) {\r\n //Rozdelim casy na hodiny a minuty\r\n t1 = casy2[i][0].split(\":\");\r\n t2 = casy2[i][1].split(\":\");\r\n //console.log(t1,t2,[hr,min]);\r\n //Zjistim, zda se aktualni cas nachazi v intervalu\r\n if(isTimeBigger(hr, min, 1*t1[0], 1*t1[1]) && isTimeBigger(1*t2[0], 1*t2[1], hr, min)) {\r\n //Skocim na bunku\r\n var pos = 0; //pocet projitych bunek\r\n var ipos = 0; //pocet projitych casu\r\n while(ipos<i) {\r\n pos++;\r\n ipos+=1+getSpan(tr.cells[pos+cell_padding]);\r\n }\r\n td = tr.cells[pos+cell_padding];\r\n console.log(td);\r\n //taky si ulozim pozici v poli casu\r\n timepos = ipos-getSpan(td); //ipos je pocet hodin pred touhle bunkou, ale vcetne tehle bunky a jejiho poctu, odecitam vsak pouze jeji span, pokud ma bunka span, muzem zacinat uprostred, ale vse se pocita z rozmeru bunky\r\n //nactu skutecne casove hodnoty\r\n getTimeVals(td, timepos); \r\n console.log(i, ipos, pos, getSpan(td));\r\n break;\r\n }\r\n else\r\n console.log(hr,min,t1,t2);\r\n }\r\n if(td==null) {\r\n console.error(hr,min,tr, t1, t2);\r\n throw new Error(\"No suitable cell was found!\");\r\n } \r\n }\r\n else {\r\n //Skok o hodinu dale\r\n timepos++;\r\n //Skok i o vic, pokud posledni pole zahrnovalo vic hodin\r\n timepos+=getSpan(td);\r\n //Preskocit na dalsi bunku, spocitat casy\r\n td = tr.cells[index];\r\n getTimeVals(td, timepos);\r\n }\r\n //Zapamatovat si puvodni CSS tridu pro pripadne obnoveni\r\n if(td.oldClassName==null) {\r\n td.oldClassName = td.className;\r\n td.className+=\" timer\";\r\n }\r\n //Vykreslit casoznacku\r\n updateTimer();\r\n }", "refreshColumns() {\n this.iterateDays().iterate(d => {\n let markers = [];\n for (let event of d.events) {\n if (!event.fullDay) {\n markers.push({\n time: event.time.start.time,\n event: event,\n start: true,\n parent: null\n });\n markers.push({\n time: event.time.end.time - 1,\n event: event,\n start: false,\n parent: null\n });\n }\n }\n markers.sort((a, b) => {\n return a.time - b.time;\n });\n let parent = null;\n for (let marker of markers) {\n if (marker.start) {\n marker.parent = parent;\n parent = marker;\n }\n else if (parent) {\n parent = parent.parent;\n }\n }\n for (let marker of markers) {\n if (marker.start) {\n marker.event.col = marker.parent ? marker.parent.event.col + 1 : 0;\n }\n }\n });\n return this;\n }", "function initCells(){\n\t\tvar days = ['Monday', 'Tuesday', 'Wednesday', \n\t\t\t'Thursday', 'Friday', 'Saturday', 'Sunday'];\n\t\tvar tableRows = document.getElementById('schedTable').children[0].children;\n\t\tvar numericClass = 0000;\n\t\tvar toggle = true;\n\t\tvar first = true;\n\t\tfor(row in tableRows){\n\t\t\tif(!isNaN(row)){\n\t\t\t\tvar tableDatas = tableRows[row].children;\n\t\t\t\tif(!first){\n\t\t\t\t\tvar counter = 0;\n\t\t\t\t\tfor(dat in tableDatas){\n\t\t\t\t\t\tif(!isNaN(dat)){\n\t\t\t\t\t\t\tif(!tableDatas[dat].classList.contains('timeLabel')){\n\t\t\t\t\t\t\t\tvar html = days[counter].toLowerCase();\n\t\t\t\t\t\t\t\tcounter++\n\t\t\t\t\t\t\t\ttableDatas[dat].classList.add(html);\n\t\t\t\t\t\t\t\ttableDatas[dat].classList.add(numericClass);\n\t\t\t\t\t\t\t\ttableDatas[dat].classList.add('cell');\n\t\t\t\t\t\t\t\ttableDatas[dat].setAttribute('data-type','');\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif(toggle){\n\t\t\t\t\t\tnumericClass += 30;\n\t\t\t\t\t\ttoggle = false;\n\t\t\t\t\t}\n\t\t\t\t\telse{\n\t\t\t\t\t\tnumericClass += 70;\n\t\t\t\t\t\ttoggle = true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\tfirst = false;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "function loadDateColumn(cellValue, rowObject, width, nIndex, event) {\n \"use strict\";\n oGridConfig.nColumnCounter++;\n var sCurrentValue = $.trim(cellValue) ? cellValue : \"NA\"\n , orignalDateValue = sCurrentValue;\n var sDate = \"NA\" !== sCurrentValue ? oListView.formatDate(sCurrentValue) : \"NA\";\n var sGenericColumnChunk = \"<span class='gridCell ms-font-m dataColumn\" + oGridConfig.nColumnCounter + \"' title='\" + sDate + \"' data-orignalDate='\" + orignalDateValue + \"'>\" + sDate + \"</span>\";\n return sGenericColumnChunk;\n}", "function calculateOffsetIE(){\n calculateOffset(el);\n try {\n while (el = el.offsetParent) { calculateOffset(el); }\n } catch(e) {\n // Hello, internet explorer.\n }\n }", "function calculateOffsetIE(){\n calculateOffset(el);\n try {\n while (el = el.offsetParent) { calculateOffset(el); }\n } catch(e) {\n // Hello, internet explorer.\n }\n }", "function isPadding(cell) {\n return cell[3];\n }", "function getIndexPos() {\n // var range = 96;\n var d = new Date();\n var currentHour = d.getHours(); //get time in hours\n return currentHour * 4 + 1;\n }", "isDay() {\n\t\treturn (Date.now() + 60000 * new Date().getTimezoneOffset() + 21600000) % 86400000 / 3600000 > 12;\n\t}", "static dateFormatter(cell) {\n const date = new Date(cell).toDateString();\n return date;\n }", "function offset_function(_, i){\n var x = -0.5 + ( Math.floor(i / num_cell) ) / num_cell ;\n var y = -0.5 + (i % num_cell) / num_cell ;\n return [x, y];\n }", "col_row_from_offset(offset) {\n return this.col_row_offset_from_offset(offset).map(([index, _]) => index);\n }", "function day(t, offset) {\n\t_d.setTime(t * 1000)\n\t_d.setMilliseconds(0)\n\t_d.setSeconds(0)\n\t_d.setMinutes(0)\n\t_d.setHours(0)\n\t_d.setDate(_d.getDate() + (offset || 0))\n\treturn _d.valueOf() / 1000\n}", "_isOnSafeCell (position) {\n return position % 100 === 13 || position % 100 === 34\n }", "function addDateToCalendar(row, day, dateValueOf){\n\t\n\tvar dataCol = $('<td>');\n\trow.append(dataCol);\n\n\tvar innerElem = $('<div>');\n\tdataCol.append(innerElem);\n\t\n\tinnerElem.append('<span class=\"celldate-number\">' + (day) +'</span>');\n\tinnerElem.data('itemdata', dateValueOf);\n\tinnerElem.addClass('celldate-container');\n}", "function checkOffset(offset){\n if(offset && offset >= 0){\n return offset;\n }\n else{\n return 0;\n }\n }", "function addToDay(row, day) {\n var sheet = SpreadsheetApp.getActiveSpreadsheet().getSheetByName(day);\n \n \n var startDate = new Date(row[masterCols.start_time]);\n var endDate = new Date(row[masterCols.end_time]);\n Logger.log(startDate);\n var startPoint = startDate.getHours() * 2+2; //Start hour\n var endPoint = (endDate.getHours() === 0) ? 24 * 2+1 : endDate.getHours() * 2 + 1; //End hour\n \n if (startDate.getMinutes() === 30){startPoint += 1;} //start min\n if (endDate.getMinutes() === 30){endPoint += 1;} //end min\n \n var words = row[masterCols.event_section].split(\",\"); //delimiter\n \n //if workshop is the first word, then we use the next keyword as its event\n //This is an artefact of a request from Bitcamp 2019\n var section = (words[0] === \"Workshop\") ? words[1] : words[0]; //Event Section\n var col, bg;\n \n Logger.log(section);\n \n for (var i = 0; i < eventCategories.totalEvents; i++){\n if (section === eventCategories[i].name){\n col = eventCategories[i].col, bg = eventCategories[i].hex;\n break;\n }\n }\n \n var startCell = col+startPoint;\n var endCell = col+endPoint;\n Logger.log(startCell);\n \n //if an event already exists at that cell, then put this event in the overflow col\n //In the future we may need more overflow columns\n \n if (sheet.getRange(startCell).getBackground() !== \"#ffffff\"){ startCell = 'G'+startPoint; endCell = 'G'+endPoint;}\n else if (sheet.getRange(endCell).getBackground() !== \"#ffffff\"){ startCell = 'G'+startPoint; endCell = 'G'+endPoint;}\n else if (sheet.getRange(col+Math.floor((startPoint+endPoint)/2)).getBackground() !== \"#ffffff\"){ startCell = 'G'+startPoint; endCell = 'G'+endPoint;}\n \n if (sheet.getRange(startCell).getBackground() !== \"#ffffff\"){ startCell = 'H'+startPoint; endCell = 'H'+endPoint;}\n \n //error will occur if start and end time are the exact same, as endCell will occur before startCell\n if (startPoint === endPoint + 1){endCell = startCell;}\n \n sheet.getRange(startCell).setValue(row[masterCols.title]);\n sheet.getRange(startCell+\":\"+endCell).setBackground(bg).setVerticalAlignment(\"middle\").setBorder(true, true, true, true, true, false);\n}", "function returnCol(cell) {\n\treturn cell % 9;\n}", "_getCellByDate(date, monthContainer) {\n const that = this;\n\n if (!(date instanceof Date)) {\n return;\n }\n\n if (!monthContainer) {\n monthContainer = that.$.monthsContainer;\n }\n\n if (that.displayMode !== 'month') {\n if (that.displayModeView === 'list') {\n return;\n }\n\n let items = arguments[1] ? that.$.nextMonthsContainer.children : that.$.dateViewContainer.children;\n\n for (let i = 0; i < items.length; i++) {\n if (that.displayMode === 'year') {\n if (items[i].value.getMonth() === date.getMonth()) {\n return items[i];\n }\n\n continue;\n }\n else if (items[i].value.getFullYear() === date.getFullYear()) {\n return items[i];\n }\n }\n\n return;\n }\n\n let ownerMonth,\n monthCells,\n months = monthContainer.children;\n\n for (let i = 0; i < months.length; i++) {\n if (date.getFullYear() === months[i]._date.getFullYear() && date.getMonth() === months[i]._date.getMonth()) {\n ownerMonth = months[i];\n break;\n }\n }\n\n if (!ownerMonth) {\n return;\n }\n\n monthCells = that._getMonthCells(ownerMonth);\n\n for (let i = 0; i < monthCells.length; i++) {\n if (monthCells[i].otherMonth && !monthCells[i].hover) {\n continue;\n }\n\n if (monthCells[i].value.getMonth() === date.getMonth() && monthCells[i].value.getDate() === date.getDate()) {\n return monthCells[i];\n }\n }\n }", "function week_start_offset() {\n\treturn locale.starts('en') ? 0 : 1\n}", "function getMarkersByDay(cal_event){\n var results = new Array();\n calendar_events = $('#calendar').weekCalendar(\"serializeEvents\");\n calendar_helper_sortEvents(calendar_events); \n\n for (var i in calendar_events){\n var evnt = calendar_events[i];\n if (calendar_helper_dateEquals(evnt.start, cal_event.start))\n results.push(evnt.marker.position) \n }\n \n return results;\n}", "function calculateDate(el) {\r\n\treturn 2019 - el; \r\n}" ]
[ "0.7144688", "0.7144688", "0.7144688", "0.7053415", "0.7053415", "0.68077415", "0.68077415", "0.600007", "0.59222496", "0.5801507", "0.5801507", "0.5801507", "0.5801507", "0.5801507", "0.57486504", "0.57306266", "0.5674545", "0.56581914", "0.55727714", "0.55727714", "0.55727714", "0.5561575", "0.5541485", "0.5541485", "0.5535918", "0.5531892", "0.5440423", "0.5413037", "0.54056364", "0.5374715", "0.53626364", "0.5349197", "0.5349197", "0.5333915", "0.53209364", "0.53209364", "0.53209364", "0.5317774", "0.53068954", "0.5297593", "0.5297593", "0.5297593", "0.5297593", "0.5297593", "0.52908903", "0.527009", "0.527009", "0.52411795", "0.5227127", "0.5206647", "0.5206647", "0.5206647", "0.5206647", "0.5206647", "0.5196993", "0.5190393", "0.51859146", "0.515714", "0.515714", "0.515714", "0.515714", "0.515714", "0.515714", "0.515714", "0.515714", "0.515704", "0.5140897", "0.5140897", "0.5140897", "0.5140897", "0.5124419", "0.5123835", "0.51209354", "0.5110293", "0.5062242", "0.5061283", "0.50541764", "0.50406617", "0.50365734", "0.5029632", "0.5013064", "0.5013064", "0.5012484", "0.49723008", "0.49641296", "0.49575976", "0.49462727", "0.49431655", "0.49416414", "0.49285054", "0.49215385", "0.4919355", "0.49024758", "0.48824847", "0.48820096", "0.48689416", "0.48606423", "0.48586175" ]
0.6942672
7
day offset > date (JavaScript Date object)
function dayOffsetToDate(dayOffset) { var date = cloneDate(t.visStart); addDays(date, dayOffset); return date; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function dateToDayOffset(date) {\n\t\treturn date.clone().stripTime().diff(t.start, 'days');\n\t}", "function dateToDayOffset(date) {\n\t\treturn date.clone().stripTime().diff(t.start, 'days');\n\t}", "function dateToDayOffset(date) {\n\t\treturn dayDiff(date, t.visStart);\n\t}", "function dateToDayOffset(date) {\n\t\treturn dayDiff(date, t.visStart);\n\t}", "function dateToDayOffset(date) {\n\t\treturn dayDiff(date, t.visStart);\n\t}", "function calculateDayOffset(date)\n{\n var dayFormula = 1000*60*60*24;\n return Math.round(new Date().getTime()/dayFormula - date.getTime()/dayFormula);\n}", "getDateOffset(date) {\n let currentTime = date ? new Date(date) : new Date();\n let currentOffset = date ? currentTime.getTimezoneOffset(): 0;\n return new Date(currentTime.getTime() +Math.abs(currentOffset*60000));\n }", "function dayOffsetToDate(dayOffset) {\n\t\treturn t.start.clone().add('days', dayOffset);\n\t}", "function dayOffsetToDate(dayOffset) {\n\t\treturn t.start.clone().add('days', dayOffset);\n\t}", "function getDayDate(firstDay, offset) {\n var date = new Date(firstDay);\n var newDate = date.getDate() + offset;\n return new Date(date.setDate(newDate));\n}", "function getDay(offset = 0) {\n const day = new Date();\n const weekday = ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'];\n return weekday[(day.getDay() + offset) % 7];\n}", "function getDateWithinWeek(d, offset) {\n d = new Date(d);\n var day = d.getDay(),\n diff = d.getDate() - day + (day == 0 ? offset-7:offset); // adjust when day is sunday\n return new Date(d.setDate(diff));\n}", "function weekOffset(dayOffset) {\n if (dayOffset >= 0) {\n return Math.floor(dayOffset / 7);\n }\n dayOffset = -dayOffset;\n dayOffset--;\n return -Math.floor(dayOffset / 7) - 1;\n}", "function daysPosition(day, offset) {\n let days = ['monday', 'tuesday', 'wednesday', 'thursday', 'friday', 'saturday', 'sunday']\n\n if (days.indexOf(day.toLowerCase()) < 0) {\n return \"That's not a day of the week\"\n }\n\n if (!offset) {\n days.unshift(...days.splice(6, 1))\n }\n\n return days.indexOf(day.toLowerCase()) + 1\n}", "function day(t, offset) {\n\t_d.setTime(t * 1000)\n\t_d.setMilliseconds(0)\n\t_d.setSeconds(0)\n\t_d.setMinutes(0)\n\t_d.setHours(0)\n\t_d.setDate(_d.getDate() + (offset || 0))\n\treturn _d.valueOf() / 1000\n}", "DD (date) {\n return pad(date.getDate())\n }", "function getOffsetDate(offset) {\n offset = 60 * 60 * 1000 * offset;\n const localDate = new Date(),\n localTime = localDate.getTime(),\n localOffset = localDate.getTimezoneOffset() * 60 * 1000,\n utc = localTime + localOffset,\n newTime = utc + offset,\n newDate = new Date(newTime);\n return newDate;\n}", "adjustForNextDay(date, adjustment) {\n date.setTime( date.getTime() + adjustment * 86400000 )\n }", "function day(date) { return `${date.getDate()}`.padStart(2, '0') }", "function weekday_before(weekday, jd){\n return jd - jwday(jd - weekday);\n}", "function getDay(date) {\n return date.getDay() >= 1 ? date.getDay() - 1 : 6;\n}", "function calendarDate() {\n //Need to be able to handle when dateOffset > than weekDays array \n //calendarDateOffset = dateOffset;\n $(\"#calendar-date\").empty();\n $(\"#calendar-date\").append( (weekDays[d.getUTCDay() + dateOffset]) + \" , \" + (months[d.getUTCMonth()]) + \" \" + (d.getUTCDate() + dateOffset) );\n}", "function weekday_before(weekday, jd)\n {\n return jd - jwday(jd - weekday);\n }", "function cellOffsetToDayOffset(cellOffset) {\n\t\tvar day0 = t.visStart.getDay(); // first date's day of week\n\t\tcellOffset += dayToCellMap[day0]; // normlize cellOffset to beginning-of-week\n\t\treturn Math.floor(cellOffset / cellsPerWeek) * 7 // # of days from full weeks\n\t\t\t+ cellToDayMap[ // # of days from partial last week\n\t\t\t\t(cellOffset % cellsPerWeek + cellsPerWeek) % cellsPerWeek // crazy math to handle negative cellOffsets\n\t\t\t]\n\t\t\t- day0; // adjustment for beginning-of-week normalization\n\t}", "function cellOffsetToDayOffset(cellOffset) {\n\t\tvar day0 = t.visStart.getDay(); // first date's day of week\n\t\tcellOffset += dayToCellMap[day0]; // normlize cellOffset to beginning-of-week\n\t\treturn Math.floor(cellOffset / cellsPerWeek) * 7 // # of days from full weeks\n\t\t\t+ cellToDayMap[ // # of days from partial last week\n\t\t\t\t(cellOffset % cellsPerWeek + cellsPerWeek) % cellsPerWeek // crazy math to handle negative cellOffsets\n\t\t\t]\n\t\t\t- day0; // adjustment for beginning-of-week normalization\n\t}", "function cellOffsetToDayOffset(cellOffset) {\n\t\tvar day0 = t.visStart.getDay(); // first date's day of week\n\t\tcellOffset += dayToCellMap[day0]; // normlize cellOffset to beginning-of-week\n\t\treturn Math.floor(cellOffset / cellsPerWeek) * 7 // # of days from full weeks\n\t\t\t+ cellToDayMap[ // # of days from partial last week\n\t\t\t\t(cellOffset % cellsPerWeek + cellsPerWeek) % cellsPerWeek // crazy math to handle negative cellOffsets\n\t\t\t]\n\t\t\t- day0; // adjustment for beginning-of-week normalization\n\t}", "function moveOneDay(date) {date.setTime((date.getTime() + 24 * 60 * 60 * 1000)); }", "function search_weekday(weekday, jd, direction, offset) {\n return weekday_before(weekday, jd + (direction * offset));\n}", "function dayDiff(day, from) {\n return (day - from + 7) % 7;\n}", "function dayFromDate(dateIn)\r\n{\r\n return dateIn.getDate();\r\n}", "function search_weekday(weekday, jd, direction, offset)\n {\n return weekday_before(weekday, jd + (direction * offset));\n }", "function daysDiff(newdate,olddate)\n{\n //if the outcome is Positive, It Means the new Date is greater than old date\n //eg , If th eoutput is >=1 it means date of appointment is in future\n \nvar olddt = new Date(olddate);\nvar newdt = new Date(newdate);\n\nreturn Math.floor((Date.UTC(newdt.getFullYear(), newdt.getMonth(), newdt.getDate()) - Date.UTC(olddt.getFullYear(), olddt.getMonth(), olddt.getDate()) ) /(1000 * 60 * 60 * 24));\n\n}", "function getTodayPlus(offset, baseDate) {\n if (!baseDate) {\n baseDate = new Date(); // using today as the base\n }\n\n baseDate.setTime(baseDate.getTime() + offset * 86400000);\n return baseDate;\n }", "function getOffset(date, tzid) {\n if (tzid == null) {\n return null;\n\t}\n\n var exptz = tzs.waitFetch(tzid, date.substring(0, 4));\n var offset = null;\n\n if ((exptz == null) || (exptz.status != tzs.okStatus)) {\n\t return null;\n }\n\n var obs = exptz.findObservance(date);\n \n if (obs == null) {\n return null;\n\t}\n\n return obs.to / 60;\n}", "function calculateDate(el) {\r\n\treturn 2019 - el; \r\n}", "d (date) {\n return date.getDay()\n }", "isDay() {\n\t\treturn (Date.now() + 60000 * new Date().getTimezoneOffset() + 21600000) % 86400000 / 3600000 > 12;\n\t}", "E (date) {\n return date.getDay() || 7\n }", "function getDateTodayOrYesterday(offset) {\n var d = new Date();\n d.setDate(d.getDate() - offset);\n return (d.getFullYear() + \"-\" + (d.getMonth() + 1) + \"-\" + d.getDate());\n}", "function offset(date) {\n let result = '';\n const diffSec = moment(new Date()).diff(date) / 1000;\n const diffMin = Math.floor(diffSec / 60);\n const diffHour = Math.floor(diffMin / 60);\n const diffDay = Math.floor(diffHour / 24);\n\n if (diffDay > 0) {\n result += diffDay > 1 ? ` ${diffDay % 365} days` : ' 1 day';\n }\n if (diffHour > 0) {\n result += diffHour > 1 ? ` ${diffHour % 24} hours` : '1 hour';\n }\n if (diffMin > 0) {\n result += (diffMin % 60) > 1 ? ` ${diffMin % 60} minutes` : ' 1 minute';\n }\n result += ' ago';\n return result;\n}", "function cellOffsetToDayOffset(cellOffset) {\n\t\tvar day0 = t.start.day(); // first date's day of week\n\t\tcellOffset += dayToCellMap[day0]; // normlize cellOffset to beginning-of-week\n\t\treturn Math.floor(cellOffset / cellsPerWeek) * 7 + // # of days from full weeks\n\t\t\tcellToDayMap[ // # of days from partial last week\n\t\t\t\t(cellOffset % cellsPerWeek + cellsPerWeek) % cellsPerWeek // crazy math to handle negative cellOffsets\n\t\t\t] -\n\t\t\tday0; // adjustment for beginning-of-week normalization\n\t}", "function cellOffsetToDayOffset(cellOffset) {\n\t\tvar day0 = t.start.day(); // first date's day of week\n\t\tcellOffset += dayToCellMap[day0]; // normlize cellOffset to beginning-of-week\n\t\treturn Math.floor(cellOffset / cellsPerWeek) * 7 + // # of days from full weeks\n\t\t\tcellToDayMap[ // # of days from partial last week\n\t\t\t\t(cellOffset % cellsPerWeek + cellsPerWeek) % cellsPerWeek // crazy math to handle negative cellOffsets\n\t\t\t] -\n\t\t\tday0; // adjustment for beginning-of-week normalization\n\t}", "D (date) {\n return date.getDate()\n }", "function DefDateDay(yy,mm,dd)\n{\nreturn Math.floor((Date2Days(yy,mm,dd)-2) % 7) + 1;\n}", "function getDay(date) {\n // получить номер дня недели, от 0(пн) до 6(вс)\n var day = date.getDay();\n if (day == 0) day = 7;\n return day - 1;\n}", "function dateGetter(name,size,offset,trim,negWrap){if(offset===void 0){offset=0;}if(trim===void 0){trim=false;}if(negWrap===void 0){negWrap=false;}return function(date,locale){var part=getDatePart(name,date);if(offset>0||part>-offset){part+=offset;}if(name===DateType.Hours){if(part===0&&offset===-12){part=12;}}else if(name===DateType.FractionalSeconds){return formatFractionalSeconds(part,size);}var localeMinus=getLocaleNumberSymbol(locale,NumberSymbol.MinusSign);return padNumber(part,size,localeMinus,trim,negWrap);};}", "function startOfUTCISOWeek(dirtyDate) {\n Object(__WEBPACK_IMPORTED_MODULE_1__requiredArgs_index_js__[\"a\" /* default */])(1, arguments);\n var weekStartsOn = 1;\n var date = Object(__WEBPACK_IMPORTED_MODULE_0__toDate_index_js__[\"default\"])(dirtyDate);\n var day = date.getUTCDay();\n var diff = (day < weekStartsOn ? 7 : 0) + day - weekStartsOn;\n date.setUTCDate(date.getUTCDate() - diff);\n date.setUTCHours(0, 0, 0, 0);\n return date;\n}", "function dayOffsetToCellOffset(dayOffset) {\n\t\tvar day0 = t.visStart.getDay(); // first date's day of week\n\t\tdayOffset += day0; // normalize dayOffset to beginning-of-week\n\t\treturn Math.floor(dayOffset / 7) * cellsPerWeek // # of cells from full weeks\n\t\t\t+ dayToCellMap[ // # of cells from partial last week\n\t\t\t\t(dayOffset % 7 + 7) % 7 // crazy math to handle negative dayOffsets\n\t\t\t]\n\t\t\t- dayToCellMap[day0]; // adjustment for beginning-of-week normalization\n\t}", "function dayOffsetToCellOffset(dayOffset) {\n\t\tvar day0 = t.visStart.getDay(); // first date's day of week\n\t\tdayOffset += day0; // normalize dayOffset to beginning-of-week\n\t\treturn Math.floor(dayOffset / 7) * cellsPerWeek // # of cells from full weeks\n\t\t\t+ dayToCellMap[ // # of cells from partial last week\n\t\t\t\t(dayOffset % 7 + 7) % 7 // crazy math to handle negative dayOffsets\n\t\t\t]\n\t\t\t- dayToCellMap[day0]; // adjustment for beginning-of-week normalization\n\t}", "function dayOffsetToCellOffset(dayOffset) {\n\t\tvar day0 = t.visStart.getDay(); // first date's day of week\n\t\tdayOffset += day0; // normalize dayOffset to beginning-of-week\n\t\treturn Math.floor(dayOffset / 7) * cellsPerWeek // # of cells from full weeks\n\t\t\t+ dayToCellMap[ // # of cells from partial last week\n\t\t\t\t(dayOffset % 7 + 7) % 7 // crazy math to handle negative dayOffsets\n\t\t\t]\n\t\t\t- dayToCellMap[day0]; // adjustment for beginning-of-week normalization\n\t}", "function undate(date) {\n\t// shift the time compensating for local timezone\n\treturn date.getTime()/1000+date.getTimezoneOffset()*60-5*3600;\n}", "function dateDiff(date1, date2) {\n\n var stdt = new Date(date2);\n var endt = new Date(date1);\n var stOffst = stdt.getTimezoneOffset();\n var enOffst = endt.getTimezoneOffset();\n var minOffset = stOffst - enOffst;\n\n var dt = Date.parse(date1) - Date.parse(date2) + minOffset * 60 * 1000;\n return dt;\n\n}", "function dateCheck()\n{\n\tif(date.getUTCMonth() + dateMonthAdded > date.getUTCMonth())\n\t{\n\t\tdate.setUTCDate(1);\n\t}\n\tswitch(date.getUTCMonth())\n\t{\n\t\tcase 1://feb is a special month where every 4 years the final year is allways dividable with 4 and gets 29 days instead of 28\n\t\t\tif(date.getUTCFullYear()%4 == 0)\n\t\t\t\tdays = days - 3;\n\t\t\telse\n\t\t\t\tdays = days - 2;\n\t\t\tbreak;\n\t\tcase 3://april\n\t\t\tdays = days - 1;\n\t\t\tbreak;\n\t\tcase 5://june\n\t\t\tdays = days - 1;\n\t\t\tbreak;\n\t\tcase 8://sept\n\t\t\tdays = days - 1;\n\t\t\tbreak;\n\t\tcase 10://nov\n\t\t\tdays = days - 1;\n\t\t\tbreak;\n\t}\n}", "isSameDay(date) {\n const universalDate = new UniversalDate(date);\n return universalDate.year === this.year && universalDate.week === this.week && universalDate.dayOfWeek === this.dayOfWeek;\n }", "getDayNo(date) {\n\t\t// return new Date(date).getUTCDate();// 1\n\t\treturn Moment(date).format('DD');// 01\n\t}", "function getHourCorrection(date) {\n return - (date.getTimezoneOffset() / 60);\n}", "function determineDate(inputDate) {\n var inputTime = new Date(inputDate);\n return (inputTime - now > FOUR_DAYS) ? inputDate - ONE_WEEK : inputDate;\n }", "daysFromNow(d) {\n return Math.ceil((this.beginningOfDay(d).getTime() - this.beginningOfDay(new Date()).getTime()) / 86400000);\n }", "function nextDOW(dayName, excludeToday = true, refDate = new Date()) {\n\tconst dayOfWeek = [\"sun\",\"mon\",\"tue\",\"wed\",\"thu\",\"fri\",\"sat\"]\n .indexOf(dayName.slice(0,3).toLowerCase());\n\tif (dayOfWeek < 0) return;\n\tnewDate = new Date(refDate);\n\tnewDate.setHours(1,0,0,0); // setHours(1) to force correct day in case of UTC/BST issues\n\tnewDate.setDate(newDate.getDate() + !!excludeToday + (dayOfWeek + 7 - newDate.getDay() - !!excludeToday) % 7);\n\treturn newDate;\n}", "function getDay(date) {\n var day = date.getDate();\n return day < 10 ? '0' + day : day; \n}", "function get15dayFromNow() {\n return new Date(new Date().valueOf() + 7 * 24 * 60 * 60 * 1000);\n }", "floorDate(date, relativeToStart, resolutionUnit, incr) {\n relativeToStart = relativeToStart !== false;\n\n const me = this,\n relativeTo = relativeToStart ? DateHelper.clone(me.startDate) : null,\n increment = incr || me.resolutionIncrement,\n unit = resolutionUnit || (relativeToStart ? me.resolutionUnit : me.mainUnit),\n snap = (value, increment) => Math.floor(value / increment) * increment;\n\n if (relativeToStart) {\n const snappedDuration = snap(DateHelper.diff(relativeTo, date, unit), increment);\n // TODO: used to be small unit multipled with factor (minute = seconds, minutes * 60)\n return DateHelper.add(relativeTo, snappedDuration, unit);\n }\n\n let dt = DateHelper.clone(date);\n\n if (unit === 'week') {\n let day = dt.getDay() || 7,\n startDay = me.weekStartDay || 7;\n\n dt = DateHelper.add(\n DateHelper.startOf(dt, 'day'),\n day >= startDay ? startDay - day : -(7 - startDay + day),\n 'day'\n );\n\n // Watch out for Brazil DST craziness (see test 028_timeaxis_dst.t.js)\n if (dt.getDay() !== startDay && dt.getHours() === 23) {\n dt = DateHelper.add(dt, 1, 'hour');\n }\n } else {\n // removes \"smaller\" units from date (for example minutes; removes seconds and milliseconds)\n dt = DateHelper.startOf(dt, unit);\n\n // day and year are 1-based so need to make additional adjustments\n let modifier = ['day', 'year'].includes(unit) ? 1 : 0,\n useUnit = unit === 'day' ? 'date' : unit,\n snappedValue = snap(DateHelper.get(dt, useUnit) - modifier, increment) + modifier;\n\n dt = DateHelper.set(dt, useUnit, snappedValue);\n }\n\n return dt;\n }", "floorDate(date, relativeToStart, resolutionUnit, incr) {\n relativeToStart = relativeToStart !== false;\n\n const me = this,\n relativeTo = relativeToStart ? DateHelper.clone(me.startDate) : null,\n increment = incr || me.resolutionIncrement,\n unit = resolutionUnit || (relativeToStart ? me.resolutionUnit : me.mainUnit),\n snap = (value, increment) => Math.floor(value / increment) * increment;\n\n if (relativeToStart) {\n const snappedDuration = snap(DateHelper.diff(relativeTo, date, unit), increment); // TODO: used to be small unit multipled with factor (minute = seconds, minutes * 60)\n\n return DateHelper.add(relativeTo, snappedDuration, unit);\n }\n\n let dt = DateHelper.clone(date);\n\n if (unit === 'week') {\n const day = dt.getDay() || 7,\n startDay = me.weekStartDay || 7;\n dt = DateHelper.add(DateHelper.startOf(dt, 'day'), day >= startDay ? startDay - day : -(7 - startDay + day), 'day'); // Watch out for Brazil DST craziness (see test 028_timeaxis_dst.t.js)\n\n if (dt.getDay() !== startDay && dt.getHours() === 23) {\n dt = DateHelper.add(dt, 1, 'hour');\n }\n } else {\n // removes \"smaller\" units from date (for example minutes; removes seconds and milliseconds)\n dt = DateHelper.startOf(dt, unit); // day and year are 1-based so need to make additional adjustments\n\n const modifier = ['day', 'year'].includes(unit) ? 1 : 0,\n useUnit = unit === 'day' ? 'date' : unit,\n snappedValue = snap(DateHelper.get(dt, useUnit) - modifier, increment) + modifier;\n dt = DateHelper.set(dt, useUnit, snappedValue);\n }\n\n return dt;\n }", "function dayOffsetToCellOffset(dayOffset) {\n\t\tvar day0 = t.start.day(); // first date's day of week\n\t\tdayOffset += day0; // normalize dayOffset to beginning-of-week\n\t\treturn Math.floor(dayOffset / 7) * cellsPerWeek + // # of cells from full weeks\n\t\t\tdayToCellMap[ // # of cells from partial last week\n\t\t\t\t(dayOffset % 7 + 7) % 7 // crazy math to handle negative dayOffsets\n\t\t\t] -\n\t\t\tdayToCellMap[day0]; // adjustment for beginning-of-week normalization\n\t}", "function dayOffsetToCellOffset(dayOffset) {\n\t\tvar day0 = t.start.day(); // first date's day of week\n\t\tdayOffset += day0; // normalize dayOffset to beginning-of-week\n\t\treturn Math.floor(dayOffset / 7) * cellsPerWeek + // # of cells from full weeks\n\t\t\tdayToCellMap[ // # of cells from partial last week\n\t\t\t\t(dayOffset % 7 + 7) % 7 // crazy math to handle negative dayOffsets\n\t\t\t] -\n\t\t\tdayToCellMap[day0]; // adjustment for beginning-of-week normalization\n\t}", "function startOfUTCISOWeek (dirtyDate, dirtyOptions) {\n var weekStartsOn = 1\n\n var date = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__toDate_index_js__[\"a\" /* default */])(dirtyDate, dirtyOptions)\n var day = date.getUTCDay()\n var diff = (day < weekStartsOn ? 7 : 0) + day - weekStartsOn\n\n date.setUTCDate(date.getUTCDate() - diff)\n date.setUTCHours(0, 0, 0, 0)\n return date\n}", "function startOfUTCISOWeek(dirtyDate) {\n Object(_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(1, arguments);\n var weekStartsOn = 1;\n var date = Object(_toDate_index_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(dirtyDate);\n var day = date.getUTCDay();\n var diff = (day < weekStartsOn ? 7 : 0) + day - weekStartsOn;\n date.setUTCDate(date.getUTCDate() - diff);\n date.setUTCHours(0, 0, 0, 0);\n return date;\n}", "function startOfUTCISOWeek(dirtyDate) {\n Object(_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(1, arguments);\n var weekStartsOn = 1;\n var date = Object(_toDate_index_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(dirtyDate);\n var day = date.getUTCDay();\n var diff = (day < weekStartsOn ? 7 : 0) + day - weekStartsOn;\n date.setUTCDate(date.getUTCDate() - diff);\n date.setUTCHours(0, 0, 0, 0);\n return date;\n}", "function startOfUTCISOWeek(dirtyDate) {\n Object(_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(1, arguments);\n var weekStartsOn = 1;\n var date = Object(_toDate_index_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(dirtyDate);\n var day = date.getUTCDay();\n var diff = (day < weekStartsOn ? 7 : 0) + day - weekStartsOn;\n date.setUTCDate(date.getUTCDate() - diff);\n date.setUTCHours(0, 0, 0, 0);\n return date;\n}", "function startOfUTCISOWeek(dirtyDate) {\n Object(_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(1, arguments);\n var weekStartsOn = 1;\n var date = Object(_toDate_index_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(dirtyDate);\n var day = date.getUTCDay();\n var diff = (day < weekStartsOn ? 7 : 0) + day - weekStartsOn;\n date.setUTCDate(date.getUTCDate() - diff);\n date.setUTCHours(0, 0, 0, 0);\n return date;\n}", "function startOfUTCISOWeek(dirtyDate) {\n Object(_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(1, arguments);\n var weekStartsOn = 1;\n var date = Object(_toDate_index_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(dirtyDate);\n var day = date.getUTCDay();\n var diff = (day < weekStartsOn ? 7 : 0) + day - weekStartsOn;\n date.setUTCDate(date.getUTCDate() - diff);\n date.setUTCHours(0, 0, 0, 0);\n return date;\n}", "function startOfUTCISOWeek(dirtyDate) {\n Object(_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(1, arguments);\n var weekStartsOn = 1;\n var date = Object(_toDate_index_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(dirtyDate);\n var day = date.getUTCDay();\n var diff = (day < weekStartsOn ? 7 : 0) + day - weekStartsOn;\n date.setUTCDate(date.getUTCDate() - diff);\n date.setUTCHours(0, 0, 0, 0);\n return date;\n}", "function startOfUTCISOWeek(dirtyDate) {\n Object(_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(1, arguments);\n var weekStartsOn = 1;\n var date = Object(_toDate_index_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(dirtyDate);\n var day = date.getUTCDay();\n var diff = (day < weekStartsOn ? 7 : 0) + day - weekStartsOn;\n date.setUTCDate(date.getUTCDate() - diff);\n date.setUTCHours(0, 0, 0, 0);\n return date;\n}", "function startOfUTCISOWeek(dirtyDate) {\n Object(_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(1, arguments);\n var weekStartsOn = 1;\n var date = Object(_toDate_index_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(dirtyDate);\n var day = date.getUTCDay();\n var diff = (day < weekStartsOn ? 7 : 0) + day - weekStartsOn;\n date.setUTCDate(date.getUTCDate() - diff);\n date.setUTCHours(0, 0, 0, 0);\n return date;\n}", "function startOfUTCISOWeek(dirtyDate) {\n Object(_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(1, arguments);\n var weekStartsOn = 1;\n var date = Object(_toDate_index_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(dirtyDate);\n var day = date.getUTCDay();\n var diff = (day < weekStartsOn ? 7 : 0) + day - weekStartsOn;\n date.setUTCDate(date.getUTCDate() - diff);\n date.setUTCHours(0, 0, 0, 0);\n return date;\n}", "function startOfUTCISOWeek(dirtyDate) {\n (0,_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_0__.default)(1, arguments);\n var weekStartsOn = 1;\n var date = (0,_toDate_index_js__WEBPACK_IMPORTED_MODULE_1__.default)(dirtyDate);\n var day = date.getUTCDay();\n var diff = (day < weekStartsOn ? 7 : 0) + day - weekStartsOn;\n date.setUTCDate(date.getUTCDate() - diff);\n date.setUTCHours(0, 0, 0, 0);\n return date;\n}", "function startOfUTCISOWeek(dirtyDate) {\n (0,_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_0__.default)(1, arguments);\n var weekStartsOn = 1;\n var date = (0,_toDate_index_js__WEBPACK_IMPORTED_MODULE_1__.default)(dirtyDate);\n var day = date.getUTCDay();\n var diff = (day < weekStartsOn ? 7 : 0) + day - weekStartsOn;\n date.setUTCDate(date.getUTCDate() - diff);\n date.setUTCHours(0, 0, 0, 0);\n return date;\n}", "function startOfUTCISOWeek(dirtyDate) {\n (0,_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_0__.default)(1, arguments);\n var weekStartsOn = 1;\n var date = (0,_toDate_index_js__WEBPACK_IMPORTED_MODULE_1__.default)(dirtyDate);\n var day = date.getUTCDay();\n var diff = (day < weekStartsOn ? 7 : 0) + day - weekStartsOn;\n date.setUTCDate(date.getUTCDate() - diff);\n date.setUTCHours(0, 0, 0, 0);\n return date;\n}", "function startOfUTCISOWeek(dirtyDate) {\n (0,_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_0__.default)(1, arguments);\n var weekStartsOn = 1;\n var date = (0,_toDate_index_js__WEBPACK_IMPORTED_MODULE_1__.default)(dirtyDate);\n var day = date.getUTCDay();\n var diff = (day < weekStartsOn ? 7 : 0) + day - weekStartsOn;\n date.setUTCDate(date.getUTCDate() - diff);\n date.setUTCHours(0, 0, 0, 0);\n return date;\n}", "function startOfUTCISOWeek(dirtyDate) {\n (0,_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_0__.default)(1, arguments);\n var weekStartsOn = 1;\n var date = (0,_toDate_index_js__WEBPACK_IMPORTED_MODULE_1__.default)(dirtyDate);\n var day = date.getUTCDay();\n var diff = (day < weekStartsOn ? 7 : 0) + day - weekStartsOn;\n date.setUTCDate(date.getUTCDate() - diff);\n date.setUTCHours(0, 0, 0, 0);\n return date;\n}", "function startOfUTCISOWeek(dirtyDate) {\n (0,_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_0__.default)(1, arguments);\n var weekStartsOn = 1;\n var date = (0,_toDate_index_js__WEBPACK_IMPORTED_MODULE_1__.default)(dirtyDate);\n var day = date.getUTCDay();\n var diff = (day < weekStartsOn ? 7 : 0) + day - weekStartsOn;\n date.setUTCDate(date.getUTCDate() - diff);\n date.setUTCHours(0, 0, 0, 0);\n return date;\n}", "function startOfUTCISOWeek(dirtyDate) {\n (0,_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_0__.default)(1, arguments);\n var weekStartsOn = 1;\n var date = (0,_toDate_index_js__WEBPACK_IMPORTED_MODULE_1__.default)(dirtyDate);\n var day = date.getUTCDay();\n var diff = (day < weekStartsOn ? 7 : 0) + day - weekStartsOn;\n date.setUTCDate(date.getUTCDate() - diff);\n date.setUTCHours(0, 0, 0, 0);\n return date;\n}", "DDDD (date) {\n return pad(getDayOfYear(date), 3)\n }", "function startOfUTCISOWeek(dirtyDate) {\n (0,_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(1, arguments);\n var weekStartsOn = 1;\n var date = (0,_toDate_index_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(dirtyDate);\n var day = date.getUTCDay();\n var diff = (day < weekStartsOn ? 7 : 0) + day - weekStartsOn;\n date.setUTCDate(date.getUTCDate() - diff);\n date.setUTCHours(0, 0, 0, 0);\n return date;\n}", "function DateTimezone(offset) {\n\n // 建立現在時間的物件\n var d = new Date();\n \n // 取得 UTC time\n var utc = d.getTime() + (d.getTimezoneOffset() * 60000);\n\n // 新增不同時區的日期資料\n return new Date(utc + (3600000*offset));\n\n}", "function generateOffset(date) {\n let offset = ''\n const tzOffset = date.getTimezoneOffset()\n\n if (tzOffset !== 0) {\n const absoluteOffset = Math.abs(tzOffset)\n const hourOffset = addLeadingZeros(absoluteOffset / 60, 2)\n const minuteOffset = addLeadingZeros(absoluteOffset % 60, 2)\n // If less than 0, the sign is +, because it is ahead of time.\n const sign = tzOffset < 0 ? '+' : '-'\n\n offset = `${sign}${hourOffset}:${minuteOffset}`\n } else {\n offset = 'Z'\n }\n\n return offset\n}", "function addDay(date) {\n //TODO: refactor\n var date = [date.substring(0, 4), date.substring(4, 6), date.substring(6, 8)].join('-')\n date = (date) ? new Date(date + \"T23:59:59-0000\") : new Date()\n return getTimestamp(new Date(date.setDate(date.getDate() + 1)), 'yyyymmdd')\n }", "function fixDate(d, check) {\n // force d to be on check's YMD, for daylight savings purposes\n if (+d) { // prevent infinite looping on invalid dates\n while (d.getDate() != check.getDate()) {\n d.setTime(+d + (d < check ? 1 : -1) * HOUR_MS);\n }\n }\n}", "function dayIndex(date) {\n return date.getDay();\n}", "function getDay(date){\n\tvar day = date.getDay();\n if(0 == day){\n \tday = 7;\n }\n return day;\n}", "function getPastDay(date, days) {\n\tconst MILLISECOND_IN_DAY = 86400000;\n\tlet newDateMs = new Date(date.getTime()-MILLISECOND_IN_DAY*days);\n\tlet newDate = new Date(newDateMs).getDate();\n\treturn newDate; \n}", "function isBeforeDate(start_date) {\n if (typeof start_date === 'string') {\n start_date = startOfDay(parseISO(start_date));\n }\n start_date = startOfDay(start_date);\n const result = isBefore(evenDate, start_date);\n return result;\n}", "adjDayOfWeekToStartOnMonday(today) {\n let dayOfWeek = this.dateAdapter.getDayOfWeek(today);\n dayOfWeek = dayOfWeek === 0 ? 6 : (dayOfWeek - 1);\n return dayOfWeek;\n }", "get dayOfWeek() {\n return ((this.date.getUTCDay() + 6) % 7);\n }", "function dayOfWeek(){\r\n var localOffsetInHours = 2;\r\n var date = new Date();\r\n var offsetInMinutes = date.getTimezoneOffset() + localOffsetInHours * 60;\r\n var d = new Date(date.valueOf() + offsetInMinutes * 60 * 1000);\r\n \r\n var day = d.getDay();\r\n \r\n if( day == 0 ){\r\n // we need it monday-based, not sunday-based\r\n day = 7;\r\n }\r\n return day;\r\n}", "function getPastDay(defaul, daysBefore) {\n let dayMili = 86400000;\n let defaultMili = defaul.valueOf();\n let searchedDate = new Date(defaultMili - dayMili * daysBefore);\n return searchedDate.getDate();\n }", "getDate(day) {\n let d = new Date();\n d.setDate(d.getDate() + (day + 7 - d.getDay()) % 7);\n const dd = String(d.getDate()).padStart(2, '0');\n const mm = String(d.getMonth() + 1).padStart(2, '0');\n const yyyy = d.getFullYear();\n d = yyyy + '-' + mm + '-' + dd; \n return d;\n }", "function futureDate(){\n var d = new Date();\n d.setDate(d.getDate() + 33);\nconsole.log(d);\n}" ]
[ "0.75193644", "0.75193644", "0.717648", "0.717648", "0.717648", "0.71749514", "0.7152707", "0.65581214", "0.65581214", "0.6480398", "0.62511355", "0.6242571", "0.6144856", "0.6016284", "0.5947486", "0.59390366", "0.5920385", "0.58628374", "0.58557093", "0.5851208", "0.5831339", "0.5813235", "0.57267666", "0.5665205", "0.5665205", "0.5665205", "0.5636881", "0.56323665", "0.5592513", "0.5589637", "0.55740345", "0.5557598", "0.55543095", "0.5554093", "0.55361885", "0.55279493", "0.5527447", "0.55132294", "0.55094165", "0.5504879", "0.54999405", "0.54999405", "0.5499722", "0.54989946", "0.5498448", "0.5490374", "0.54849046", "0.54841256", "0.54841256", "0.54841256", "0.5473929", "0.5422873", "0.5413516", "0.540828", "0.5407445", "0.5396184", "0.5395055", "0.5369195", "0.53641623", "0.53632116", "0.53611875", "0.53548414", "0.5337282", "0.5306926", "0.5306926", "0.5304112", "0.52976054", "0.52976054", "0.52976054", "0.52976054", "0.52976054", "0.52976054", "0.52976054", "0.52976054", "0.52976054", "0.5293418", "0.5293418", "0.5293418", "0.5293418", "0.5293418", "0.5293418", "0.5293418", "0.52905077", "0.5275399", "0.5270032", "0.5264754", "0.5258947", "0.52565044", "0.52424616", "0.5235098", "0.52272046", "0.5225471", "0.52162915", "0.52112854", "0.52003074", "0.5199255", "0.51942396", "0.51916385" ]
0.6605572
8
TRANSFORMATIONS: date > day offset > cell offset > cell date > cell (combines all transformations)
function dateToCell(date) { var dayOffset = dateToDayOffset(date); var cellOffset = dayOffsetToCellOffset(dayOffset); var cell = cellOffsetToCell(cellOffset); return cell; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function dayOffsetToCellOffset(dayOffset) {\n\t\tvar day0 = t.start.day(); // first date's day of week\n\t\tdayOffset += day0; // normalize dayOffset to beginning-of-week\n\t\treturn Math.floor(dayOffset / 7) * cellsPerWeek + // # of cells from full weeks\n\t\t\tdayToCellMap[ // # of cells from partial last week\n\t\t\t\t(dayOffset % 7 + 7) % 7 // crazy math to handle negative dayOffsets\n\t\t\t] -\n\t\t\tdayToCellMap[day0]; // adjustment for beginning-of-week normalization\n\t}", "function dayOffsetToCellOffset(dayOffset) {\n\t\tvar day0 = t.start.day(); // first date's day of week\n\t\tdayOffset += day0; // normalize dayOffset to beginning-of-week\n\t\treturn Math.floor(dayOffset / 7) * cellsPerWeek + // # of cells from full weeks\n\t\t\tdayToCellMap[ // # of cells from partial last week\n\t\t\t\t(dayOffset % 7 + 7) % 7 // crazy math to handle negative dayOffsets\n\t\t\t] -\n\t\t\tdayToCellMap[day0]; // adjustment for beginning-of-week normalization\n\t}", "function cellOffsetToDayOffset(cellOffset) {\n\t\tvar day0 = t.start.day(); // first date's day of week\n\t\tcellOffset += dayToCellMap[day0]; // normlize cellOffset to beginning-of-week\n\t\treturn Math.floor(cellOffset / cellsPerWeek) * 7 + // # of days from full weeks\n\t\t\tcellToDayMap[ // # of days from partial last week\n\t\t\t\t(cellOffset % cellsPerWeek + cellsPerWeek) % cellsPerWeek // crazy math to handle negative cellOffsets\n\t\t\t] -\n\t\t\tday0; // adjustment for beginning-of-week normalization\n\t}", "function cellOffsetToDayOffset(cellOffset) {\n\t\tvar day0 = t.start.day(); // first date's day of week\n\t\tcellOffset += dayToCellMap[day0]; // normlize cellOffset to beginning-of-week\n\t\treturn Math.floor(cellOffset / cellsPerWeek) * 7 + // # of days from full weeks\n\t\t\tcellToDayMap[ // # of days from partial last week\n\t\t\t\t(cellOffset % cellsPerWeek + cellsPerWeek) % cellsPerWeek // crazy math to handle negative cellOffsets\n\t\t\t] -\n\t\t\tday0; // adjustment for beginning-of-week normalization\n\t}", "function applyOffset(data)\n{\n var startingTimes = [];\n computeOffset(data, startingTimes);\n for (var i = 0; i < data.length/6; i++) { // timeline num\n for (var j = i*6; j < i*6+5; j++) { // each row for the corresponding timeline\n for (var k = 0; k < data[j][\"times\"].length; k++) { // each event in the row\n data[j][\"times\"][k][\"starting_time\"] -= startingTimes[i];\n data[j][\"times\"][k][\"ending_time\"] -= startingTimes[i];\n }\n }\n }\n return data;\n}", "function cellOffsetToDayOffset(cellOffset) {\n\t\tvar day0 = t.visStart.getDay(); // first date's day of week\n\t\tcellOffset += dayToCellMap[day0]; // normlize cellOffset to beginning-of-week\n\t\treturn Math.floor(cellOffset / cellsPerWeek) * 7 // # of days from full weeks\n\t\t\t+ cellToDayMap[ // # of days from partial last week\n\t\t\t\t(cellOffset % cellsPerWeek + cellsPerWeek) % cellsPerWeek // crazy math to handle negative cellOffsets\n\t\t\t]\n\t\t\t- day0; // adjustment for beginning-of-week normalization\n\t}", "function cellOffsetToDayOffset(cellOffset) {\n\t\tvar day0 = t.visStart.getDay(); // first date's day of week\n\t\tcellOffset += dayToCellMap[day0]; // normlize cellOffset to beginning-of-week\n\t\treturn Math.floor(cellOffset / cellsPerWeek) * 7 // # of days from full weeks\n\t\t\t+ cellToDayMap[ // # of days from partial last week\n\t\t\t\t(cellOffset % cellsPerWeek + cellsPerWeek) % cellsPerWeek // crazy math to handle negative cellOffsets\n\t\t\t]\n\t\t\t- day0; // adjustment for beginning-of-week normalization\n\t}", "function cellOffsetToDayOffset(cellOffset) {\n\t\tvar day0 = t.visStart.getDay(); // first date's day of week\n\t\tcellOffset += dayToCellMap[day0]; // normlize cellOffset to beginning-of-week\n\t\treturn Math.floor(cellOffset / cellsPerWeek) * 7 // # of days from full weeks\n\t\t\t+ cellToDayMap[ // # of days from partial last week\n\t\t\t\t(cellOffset % cellsPerWeek + cellsPerWeek) % cellsPerWeek // crazy math to handle negative cellOffsets\n\t\t\t]\n\t\t\t- day0; // adjustment for beginning-of-week normalization\n\t}", "function dayOffsetToCellOffset(dayOffset) {\n\t\tvar day0 = t.visStart.getDay(); // first date's day of week\n\t\tdayOffset += day0; // normalize dayOffset to beginning-of-week\n\t\treturn Math.floor(dayOffset / 7) * cellsPerWeek // # of cells from full weeks\n\t\t\t+ dayToCellMap[ // # of cells from partial last week\n\t\t\t\t(dayOffset % 7 + 7) % 7 // crazy math to handle negative dayOffsets\n\t\t\t]\n\t\t\t- dayToCellMap[day0]; // adjustment for beginning-of-week normalization\n\t}", "function dayOffsetToCellOffset(dayOffset) {\n\t\tvar day0 = t.visStart.getDay(); // first date's day of week\n\t\tdayOffset += day0; // normalize dayOffset to beginning-of-week\n\t\treturn Math.floor(dayOffset / 7) * cellsPerWeek // # of cells from full weeks\n\t\t\t+ dayToCellMap[ // # of cells from partial last week\n\t\t\t\t(dayOffset % 7 + 7) % 7 // crazy math to handle negative dayOffsets\n\t\t\t]\n\t\t\t- dayToCellMap[day0]; // adjustment for beginning-of-week normalization\n\t}", "function dayOffsetToCellOffset(dayOffset) {\n\t\tvar day0 = t.visStart.getDay(); // first date's day of week\n\t\tdayOffset += day0; // normalize dayOffset to beginning-of-week\n\t\treturn Math.floor(dayOffset / 7) * cellsPerWeek // # of cells from full weeks\n\t\t\t+ dayToCellMap[ // # of cells from partial last week\n\t\t\t\t(dayOffset % 7 + 7) % 7 // crazy math to handle negative dayOffsets\n\t\t\t]\n\t\t\t- dayToCellMap[day0]; // adjustment for beginning-of-week normalization\n\t}", "useCellFormatByFieldType(data, fieldType) {\n let outputData = data;\n switch (fieldType) {\n case FieldType.dateTime:\n case FieldType.dateTimeIso:\n case FieldType.dateTimeShortIso:\n case FieldType.dateTimeIsoAmPm:\n case FieldType.dateTimeIsoAM_PM:\n case FieldType.dateEuro:\n case FieldType.dateEuroShort:\n case FieldType.dateTimeEuro:\n case FieldType.dateTimeShortEuro:\n case FieldType.dateTimeEuroAmPm:\n case FieldType.dateTimeEuroAM_PM:\n case FieldType.dateTimeEuroShort:\n case FieldType.dateTimeEuroShortAmPm:\n case FieldType.dateUs:\n case FieldType.dateUsShort:\n case FieldType.dateTimeUs:\n case FieldType.dateTimeShortUs:\n case FieldType.dateTimeUsAmPm:\n case FieldType.dateTimeUsAM_PM:\n case FieldType.dateTimeUsShort:\n case FieldType.dateTimeUsShortAmPm:\n case FieldType.dateUtc:\n case FieldType.date:\n case FieldType.dateIso:\n outputData = data;\n if (data) {\n const defaultDateFormat = mapMomentDateFormatWithFieldType(fieldType);\n const isDateValid = moment$2(data, defaultDateFormat, false).isValid();\n const outputDate = (data && isDateValid) ? moment$2(data).format(defaultDateFormat) : data;\n const dateFormatter = this._stylesheet.createFormat({ format: defaultDateFormat });\n outputData = { value: outputDate, metadata: { style: dateFormatter.id } };\n }\n break;\n case FieldType.number:\n const val = isNaN(+data) ? null : data;\n outputData = { value: val, metadata: { style: this._stylesheetFormats.numberFormatter.id } };\n break;\n default:\n outputData = data;\n }\n return outputData;\n }", "function cellsTranslate(d,i){\n \n let cellSize = timeDaySize;\n\n let rowsLength = 7;\n let colsLength = 7;\n let cols = Math.floor(i/colsLength); // divide to place into rows, floor to get rid of decimals\n let rows = i % rowsLength; // using remainder to detect when to switch to next column. \n // use remainder instead of division to loop through 0-5\n \n\n // let x = 1475 + cellSize * rows * 2.5;\n // let y = 100+ cellSize * cols * 3;\n \n let x = 1475 + cellSize * rows * 2.5;\n let y = 100+ cellSize * cols * 3;\n \n \n return \"translate(\" + x + \",\" + y + \")\";\n}", "styleEvents(events){\n const {\n day\n } = this.props;\n\n const columnEndTimes = [];\n\n return events.map((event) => {\n const { startDate, endDate } = event;\n\n const startOfDayUnix = day.startMoment.valueOf();\n const endOfDayUnix = day.endMoment.valueOf();\n\n let styles = {\n top:`${((startDate - startOfDayUnix)/(endOfDayUnix - startOfDayUnix))*100}%`,\n height: (DAY_COLUMN_HEIGHT/MS_IN_DAY)*(endDate-startDate)\n };\n\n // columns - this just offsets everything 45px*the col. We might want to change this to a percentage based on the total # of cols in the future.\n // loop through all the column event times and find the lowest column with no overlap\n for (let [idx, columnEndTime] of columnEndTimes.entries()) {\n if (startDate >= columnEndTime) {\n columnEndTimes[idx] = endDate;\n\n styles = {\n ...styles,\n left: `${idx*45}px`,\n zIndex: idx\n };\n\n break;\n }\n }\n\n // if there is STILL overlap, then we need to make a new column\n // with the current event's endTime there.\n if(!styles.left) {\n columnEndTimes.push(endDate);\n\n styles = {\n ...styles,\n left: `${(columnEndTimes.length - 1)*45}px`,\n zIndex: columnEndTimes.length - 1\n };\n\n }\n\n return {\n ...event,\n styles\n };\n });\n }", "function transform() {\n\tdata.forEach(function(d){\n\t\td.timecreate = new Date(d.timecreate.split(\" \")[0]);\n\t});\n\n\tnest = d3.nest()\n\t\t.key(function(d){ return d.timecreate; })\n\t\t.key(function(d){ return d.typetext; })\n\t\t.entries(data);\n\n\tfor(i in nest) { days.push(nest[i].key) }\n\n\ttypeNest = d3.nest()\n\t\t\t.key(function(d) { return d.type_ })\n\t\t\t.entries(data);\n\n\tpastData.forEach(function(d){\n\t\td.timecreate = new Date(d.timecreate.split(\" \")[0]);\n\t});\n\n\tpastNest = d3.nest()\n\t\t\t\t.key(function(d){ return d.timecreate; })\n\t\t\t\t.key(function(d){ return d.typetext; })\n\t\t\t\t.entries(pastData);\n\n\tpastTypeNest = d3.nest()\n\t\t\t\t\t.key(function(d) { return d.type_ })\n\t\t\t\t\t.entries(pastData);\n\n\t// this is a hacky way of getting data objects that compare to this time last year\n\tpastNestDelim = pastNest.slice(0, days.length);\n\n\tpastDataDelim = [];\n\n\tfor (i in pastNestDelim) {\n\t\tfor(l in pastNestDelim[i].values) {\n\t\t\tfor(j in pastNestDelim[i].values[l].values)\n\t\t\t\tpastDataDelim.push(pastNestDelim[i].values[l].values[j]);\n\t\t}\n\t}\n\n\tpastTypeNestDelim = d3.nest()\n\t\t\t\t\t\t.key(function(d) { return d.type_ })\n\t\t\t\t\t\t.entries(pastDataDelim);\n\n\t// wait a little bit for d3 to make nest objects before calling next function, which requires them\n\tsetTimeout(function() {\n\t\tlog.text('> Comparing 2013 and 2014 data...');\n\t\tqueue(fns);\n\t}, 500);\n}", "static dateFormatter(cell) {\n const date = new Date(cell).toDateString();\n return date;\n }", "function transformUTCToTZ() {\n $(\".funnel-table-time\").each(function (i, cell) {\n var dateTimeFormat = \"MM:DD HH:mm\";\n transformUTCToTZTime(cell, dateTimeFormat);\n });\n }", "function cs_datum_transform( srcdefn, dstdefn, point )\n{\n\n // Short cut if the datums are identical.\n if( cs_compare_datums( srcdefn, dstdefn ) )\n return 0; // in this case, zero is sucess,\n // whereas cs_compare_datums returns 1 to indicate TRUE\n // confusing, should fix this\n\n// #define CHECK_RETURN {if( pj_errno != 0 ) { if( z_is_temp ) pj_dalloc(z); return pj_errno; }}\n\n\n // If this datum requires grid shifts, then apply it to geodetic coordinates.\n if( srcdefn.datum_type == PJD_GRIDSHIFT )\n {\n alert(\"ERROR: Grid shift transformations are not implemented yet.\");\n /*\n pj_apply_gridshift( pj_param(srcdefn.params,\"snadgrids\").s, 0,\n point_count, point_offset, x, y, z );\n CHECK_RETURN;\n\n src_a = SRS_WGS84_SEMIMAJOR;\n src_es = 0.006694379990;\n */\n }\n\n if( dstdefn.datum_type == PJD_GRIDSHIFT )\n {\n alert(\"ERROR: Grid shift transformations are not implemented yet.\");\n /*\n dst_a = ;\n dst_es = 0.006694379990;\n */\n }\n\n // Do we need to go through geocentric coordinates?\n// if( srcdefn.es != dstdefn.es || srcdefn.a != dstdefn.a || // RWG - removed ellipse comparison so\n if( srcdefn.datum_type == PJD_3PARAM // that longlat CSs do not have to have\n || srcdefn.datum_type == PJD_7PARAM // an ellipsoid, also should put it a\n || dstdefn.datum_type == PJD_3PARAM // tolerance for es if used.\n || dstdefn.datum_type == PJD_7PARAM)\n {\n\n // Convert to geocentric coordinates.\n cs_geodetic_to_geocentric( srcdefn, point );\n // CHECK_RETURN;\n\n // Convert between datums\n if( srcdefn.datum_type == PJD_3PARAM || srcdefn.datum_type == PJD_7PARAM )\n {\n cs_geocentric_to_wgs84( srcdefn, point);\n // CHECK_RETURN;\n }\n\n if( dstdefn.datum_type == PJD_3PARAM || dstdefn.datum_type == PJD_7PARAM )\n {\n cs_geocentric_from_wgs84( dstdefn, point);\n // CHECK_RETURN;\n }\n\n // Convert back to geodetic coordinates\n cs_geocentric_to_geodetic( dstdefn, point );\n // CHECK_RETURN;\n }\n\n\n // Apply grid shift to destination if required\n if( dstdefn.datum_type == PJD_GRIDSHIFT )\n {\n alert(\"ERROR: Grid shift transformations are not implemented yet.\");\n // pj_apply_gridshift( pj_param(dstdefn.params,\"snadgrids\").s, 1, point);\n // CHECK_RETURN;\n }\n return 0;\n}", "col_row_offset_from_offset(offset) {\n return [\n this.cell_from_offset(this.cell_width, offset.left),\n this.cell_from_offset(this.cell_height, offset.top),\n ];\n }", "function mangleCalendarData () {\n calendarData.rows.forEach(function(row) {\n row.cells.forEach(function(cell) {\n openDoorIfCorrectTime(cell);\n });\n });\n }", "function changeDateFormat() {\n var row_start = 2; // Edit as required\n var row_end = 47; // Edit as required\n var col = 1;\n var sheet = SpreadsheetApp.getActiveSheet();\n for (i = row_start; i < row_end + 1; i++) {\n cell = sheet.getRange(i, col);\n cell.setNumberFormat(\"yyyy-mm-dd\");\n }\n}", "function calEventToSheet(calEvent, idxMap, dataRow) {\n convertedEvent = convertCalEvent(calEvent);\n\n for (var idx = 0; idx < idxMap.length; idx++) {\n if (idxMap[idx] !== null) {\n dataRow[idx] = convertedEvent[idxMap[idx]];\n }\n }\n}", "renderCells() {\n const { currentMonth, today, booked } = this.state;\n const monthStart = dateFns.startOfMonth(currentMonth);\n const monthEnd = dateFns.endOfMonth(monthStart);\n const startDate = dateFns.startOfWeek(monthStart);\n const endDate = dateFns.endOfWeek(monthEnd);\n\n const dateFormat = \"D\";\n const rows = [];\n\n let days = [];\n let day = startDate;\n let formattedDate = \"\";\n\n // loop from startDate to endDate to show all the dates\n while (day <= endDate) {\n for (let i = 0; i < 7; i++) {\n formattedDate = dateFns.format(day, dateFormat);\n const cloneDay = day;\n // determine if day is disabled, today or has event and assign the style\n days.push(\n <div\n className={`col cell ${\n !dateFns.isSameMonth(day, monthStart)\n ? \"disabled\"\n : dateFns.isSameDay(day, today) ? \"selected\" : \"\"\n }${booked.map((book) => dateFns.isSameDay(day, book) ? \"booked\" : \"\").join('')}\n ` }\n \n key={day}\n onClick={() => this.onDateClick(dateFns.parse(cloneDay))}\n >\n <span className=\"number\">{formattedDate}</span>\n <span className=\"bg\">{formattedDate}</span>\n \n </div>\n );\n day = dateFns.addDays(day, 1);\n }\n rows.push(\n <div className=\"row\" key={day}>\n {days}\n </div>\n );\n days = [];\n }\n return <div className=\"body\">{rows}</div>;\n }", "function mutateEvents(events, clearEnd, allDay, dateDelta, durationDelta, miscProps) {\n\t\tvar isAmbigTimezone = t.getIsAmbigTimezone();\n\t\tvar undoFunctions = [];\n\n\t\t// normalize zero-length deltas to be null\n\t\tif (dateDelta && !dateDelta.valueOf()) { dateDelta = null; }\n\t\tif (durationDelta && !durationDelta.valueOf()) { durationDelta = null; }\n\n\t\t$.each(events, function(i, event) {\n\t\t\tvar oldProps;\n\t\t\tvar newProps;\n\n\t\t\t// build an object holding all the old values, both date-related and misc.\n\t\t\t// for the undo function.\n\t\t\toldProps = {\n\t\t\t\tstart: event.start.clone(),\n\t\t\t\tend: event.end ? event.end.clone() : null,\n\t\t\t\tallDay: event.allDay\n\t\t\t};\n\t\t\t$.each(miscProps, function(name) {\n\t\t\t\toldProps[name] = event[name];\n\t\t\t});\n\n\t\t\t// new date-related properties. work off the original date snapshot.\n\t\t\t// ok to use references because they will be thrown away when backupEventDates is called.\n\t\t\tnewProps = {\n\t\t\t\tstart: event._start,\n\t\t\t\tend: event._end,\n\t\t\t\tallDay: allDay // normalize the dates in the same regard as the new properties\n\t\t\t};\n\t\t\tnormalizeEventRange(newProps); // massages start/end/allDay\n\n\t\t\t// strip or ensure the end date\n\t\t\tif (clearEnd) {\n\t\t\t\tnewProps.end = null;\n\t\t\t}\n\t\t\telse if (durationDelta && !newProps.end) { // the duration translation requires an end date\n\t\t\t\tnewProps.end = t.getDefaultEventEnd(newProps.allDay, newProps.start);\n\t\t\t}\n\n\t\t\tif (dateDelta) {\n\t\t\t\tnewProps.start.add(dateDelta);\n\t\t\t\tif (newProps.end) {\n\t\t\t\t\tnewProps.end.add(dateDelta);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (durationDelta) {\n\t\t\t\tnewProps.end.add(durationDelta); // end already ensured above\n\t\t\t}\n\n\t\t\t// if the dates have changed, and we know it is impossible to recompute the\n\t\t\t// timezone offsets, strip the zone.\n\t\t\tif (\n\t\t\t\tisAmbigTimezone &&\n\t\t\t\t!newProps.allDay &&\n\t\t\t\t(dateDelta || durationDelta)\n\t\t\t) {\n\t\t\t\tnewProps.start.stripZone();\n\t\t\t\tif (newProps.end) {\n\t\t\t\t\tnewProps.end.stripZone();\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$.extend(event, miscProps, newProps); // copy over misc props, then date-related props\n\t\t\tbackupEventDates(event); // regenerate internal _start/_end/_allDay\n\n\t\t\tundoFunctions.push(function() {\n\t\t\t\t$.extend(event, oldProps);\n\t\t\t\tbackupEventDates(event); // regenerate internal _start/_end/_allDay\n\t\t\t});\n\t\t});\n\n\t\treturn function() {\n\t\t\tfor (var i = 0; i < undoFunctions.length; i++) {\n\t\t\t\tundoFunctions[i]();\n\t\t\t}\n\t\t};\n\t}", "function mutateEvents(events, clearEnd, allDay, dateDelta, durationDelta, miscProps) {\n\t\tvar isAmbigTimezone = t.getIsAmbigTimezone();\n\t\tvar undoFunctions = [];\n\n\t\t// normalize zero-length deltas to be null\n\t\tif (dateDelta && !dateDelta.valueOf()) { dateDelta = null; }\n\t\tif (durationDelta && !durationDelta.valueOf()) { durationDelta = null; }\n\n\t\t$.each(events, function(i, event) {\n\t\t\tvar oldProps;\n\t\t\tvar newProps;\n\n\t\t\t// build an object holding all the old values, both date-related and misc.\n\t\t\t// for the undo function.\n\t\t\toldProps = {\n\t\t\t\tstart: event.start.clone(),\n\t\t\t\tend: event.end ? event.end.clone() : null,\n\t\t\t\tallDay: event.allDay\n\t\t\t};\n\t\t\t$.each(miscProps, function(name) {\n\t\t\t\toldProps[name] = event[name];\n\t\t\t});\n\n\t\t\t// new date-related properties. work off the original date snapshot.\n\t\t\t// ok to use references because they will be thrown away when backupEventDates is called.\n\t\t\tnewProps = {\n\t\t\t\tstart: event._start,\n\t\t\t\tend: event._end,\n\t\t\t\tallDay: allDay // normalize the dates in the same regard as the new properties\n\t\t\t};\n\t\t\tnormalizeEventDates(newProps); // massages start/end/allDay\n\n\t\t\t// strip or ensure the end date\n\t\t\tif (clearEnd) {\n\t\t\t\tnewProps.end = null;\n\t\t\t}\n\t\t\telse if (durationDelta && !newProps.end) { // the duration translation requires an end date\n\t\t\t\tnewProps.end = t.getDefaultEventEnd(newProps.allDay, newProps.start);\n\t\t\t}\n\n\t\t\tif (dateDelta) {\n\t\t\t\tnewProps.start.add(dateDelta);\n\t\t\t\tif (newProps.end) {\n\t\t\t\t\tnewProps.end.add(dateDelta);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (durationDelta) {\n\t\t\t\tnewProps.end.add(durationDelta); // end already ensured above\n\t\t\t}\n\n\t\t\t// if the dates have changed, and we know it is impossible to recompute the\n\t\t\t// timezone offsets, strip the zone.\n\t\t\tif (\n\t\t\t\tisAmbigTimezone &&\n\t\t\t\t!newProps.allDay &&\n\t\t\t\t(dateDelta || durationDelta)\n\t\t\t) {\n\t\t\t\tnewProps.start.stripZone();\n\t\t\t\tif (newProps.end) {\n\t\t\t\t\tnewProps.end.stripZone();\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$.extend(event, miscProps, newProps); // copy over misc props, then date-related props\n\t\t\tbackupEventDates(event); // regenerate internal _start/_end/_allDay\n\n\t\t\tundoFunctions.push(function() {\n\t\t\t\t$.extend(event, oldProps);\n\t\t\t\tbackupEventDates(event); // regenerate internal _start/_end/_allDay\n\t\t\t});\n\t\t});\n\n\t\treturn function() {\n\t\t\tfor (var i = 0; i < undoFunctions.length; i++) {\n\t\t\t\tundoFunctions[i]();\n\t\t\t}\n\t\t};\n\t}", "function mutateEvents(events, clearEnd, allDay, dateDelta, durationDelta, miscProps) {\n\t\tvar isAmbigTimezone = t.getIsAmbigTimezone();\n\t\tvar undoFunctions = [];\n\n\t\t// normalize zero-length deltas to be null\n\t\tif (dateDelta && !dateDelta.valueOf()) { dateDelta = null; }\n\t\tif (durationDelta && !durationDelta.valueOf()) { durationDelta = null; }\n\n\t\t$.each(events, function(i, event) {\n\t\t\tvar oldProps;\n\t\t\tvar newProps;\n\n\t\t\t// build an object holding all the old values, both date-related and misc.\n\t\t\t// for the undo function.\n\t\t\toldProps = {\n\t\t\t\tstart: event.start.clone(),\n\t\t\t\tend: event.end ? event.end.clone() : null,\n\t\t\t\tallDay: event.allDay\n\t\t\t};\n\t\t\t$.each(miscProps, function(name) {\n\t\t\t\toldProps[name] = event[name];\n\t\t\t});\n\n\t\t\t// new date-related properties. work off the original date snapshot.\n\t\t\t// ok to use references because they will be thrown away when backupEventDates is called.\n\t\t\tnewProps = {\n\t\t\t\tstart: event._start,\n\t\t\t\tend: event._end,\n\t\t\t\tallDay: allDay // normalize the dates in the same regard as the new properties\n\t\t\t};\n\t\t\tnormalizeEventDates(newProps); // massages start/end/allDay\n\n\t\t\t// strip or ensure the end date\n\t\t\tif (clearEnd) {\n\t\t\t\tnewProps.end = null;\n\t\t\t}\n\t\t\telse if (durationDelta && !newProps.end) { // the duration translation requires an end date\n\t\t\t\tnewProps.end = t.getDefaultEventEnd(newProps.allDay, newProps.start);\n\t\t\t}\n\n\t\t\tif (dateDelta) {\n\t\t\t\tnewProps.start.add(dateDelta);\n\t\t\t\tif (newProps.end) {\n\t\t\t\t\tnewProps.end.add(dateDelta);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (durationDelta) {\n\t\t\t\tnewProps.end.add(durationDelta); // end already ensured above\n\t\t\t}\n\n\t\t\t// if the dates have changed, and we know it is impossible to recompute the\n\t\t\t// timezone offsets, strip the zone.\n\t\t\tif (\n\t\t\t\tisAmbigTimezone &&\n\t\t\t\t!newProps.allDay &&\n\t\t\t\t(dateDelta || durationDelta)\n\t\t\t) {\n\t\t\t\tnewProps.start.stripZone();\n\t\t\t\tif (newProps.end) {\n\t\t\t\t\tnewProps.end.stripZone();\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$.extend(event, miscProps, newProps); // copy over misc props, then date-related props\n\t\t\tbackupEventDates(event); // regenerate internal _start/_end/_allDay\n\n\t\t\tundoFunctions.push(function() {\n\t\t\t\t$.extend(event, oldProps);\n\t\t\t\tbackupEventDates(event); // regenerate internal _start/_end/_allDay\n\t\t\t});\n\t\t});\n\n\t\treturn function() {\n\t\t\tfor (var i = 0; i < undoFunctions.length; i++) {\n\t\t\t\tundoFunctions[i]();\n\t\t\t}\n\t\t};\n\t}", "function mutateEvents(events, clearEnd, allDay, dateDelta, durationDelta, miscProps) {\n\t\tvar isAmbigTimezone = t.getIsAmbigTimezone();\n\t\tvar undoFunctions = [];\n\n\t\t// normalize zero-length deltas to be null\n\t\tif (dateDelta && !dateDelta.valueOf()) { dateDelta = null; }\n\t\tif (durationDelta && !durationDelta.valueOf()) { durationDelta = null; }\n\n\t\t$.each(events, function(i, event) {\n\t\t\tvar oldProps;\n\t\t\tvar newProps;\n\n\t\t\t// build an object holding all the old values, both date-related and misc.\n\t\t\t// for the undo function.\n\t\t\toldProps = {\n\t\t\t\tstart: event.start.clone(),\n\t\t\t\tend: event.end ? event.end.clone() : null,\n\t\t\t\tallDay: event.allDay\n\t\t\t};\n\t\t\t$.each(miscProps, function(name) {\n\t\t\t\toldProps[name] = event[name];\n\t\t\t});\n\n\t\t\t// new date-related properties. work off the original date snapshot.\n\t\t\t// ok to use references because they will be thrown away when backupEventDates is called.\n\t\t\tnewProps = {\n\t\t\t\tstart: event._start,\n\t\t\t\tend: event._end,\n\t\t\t\tallDay: allDay // normalize the dates in the same regard as the new properties\n\t\t\t};\n\t\t\tnormalizeEventDates(newProps); // massages start/end/allDay\n\n\t\t\t// strip or ensure the end date\n\t\t\tif (clearEnd) {\n\t\t\t\tnewProps.end = null;\n\t\t\t}\n\t\t\telse if (durationDelta && !newProps.end) { // the duration translation requires an end date\n\t\t\t\tnewProps.end = t.getDefaultEventEnd(newProps.allDay, newProps.start);\n\t\t\t}\n\n\t\t\tif (dateDelta) {\n\t\t\t\tnewProps.start.add(dateDelta);\n\t\t\t\tif (newProps.end) {\n\t\t\t\t\tnewProps.end.add(dateDelta);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (durationDelta) {\n\t\t\t\tnewProps.end.add(durationDelta); // end already ensured above\n\t\t\t}\n\n\t\t\t// if the dates have changed, and we know it is impossible to recompute the\n\t\t\t// timezone offsets, strip the zone.\n\t\t\tif (\n\t\t\t\tisAmbigTimezone &&\n\t\t\t\t!newProps.allDay &&\n\t\t\t\t(dateDelta || durationDelta)\n\t\t\t) {\n\t\t\t\tnewProps.start.stripZone();\n\t\t\t\tif (newProps.end) {\n\t\t\t\t\tnewProps.end.stripZone();\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$.extend(event, miscProps, newProps); // copy over misc props, then date-related props\n\t\t\tbackupEventDates(event); // regenerate internal _start/_end/_allDay\n\n\t\t\tundoFunctions.push(function() {\n\t\t\t\t$.extend(event, oldProps);\n\t\t\t\tbackupEventDates(event); // regenerate internal _start/_end/_allDay\n\t\t\t});\n\t\t});\n\n\t\treturn function() {\n\t\t\tfor (var i = 0; i < undoFunctions.length; i++) {\n\t\t\t\tundoFunctions[i]();\n\t\t\t}\n\t\t};\n\t}", "function mutateEvents(events, clearEnd, allDay, dateDelta, durationDelta, miscProps) {\n\t\tvar isAmbigTimezone = t.getIsAmbigTimezone();\n\t\tvar undoFunctions = [];\n\n\t\t// normalize zero-length deltas to be null\n\t\tif (dateDelta && !dateDelta.valueOf()) { dateDelta = null; }\n\t\tif (durationDelta && !durationDelta.valueOf()) { durationDelta = null; }\n\n\t\t$.each(events, function(i, event) {\n\t\t\tvar oldProps;\n\t\t\tvar newProps;\n\n\t\t\t// build an object holding all the old values, both date-related and misc.\n\t\t\t// for the undo function.\n\t\t\toldProps = {\n\t\t\t\tstart: event.start.clone(),\n\t\t\t\tend: event.end ? event.end.clone() : null,\n\t\t\t\tallDay: event.allDay\n\t\t\t};\n\t\t\t$.each(miscProps, function(name) {\n\t\t\t\toldProps[name] = event[name];\n\t\t\t});\n\n\t\t\t// new date-related properties. work off the original date snapshot.\n\t\t\t// ok to use references because they will be thrown away when backupEventDates is called.\n\t\t\tnewProps = {\n\t\t\t\tstart: event._start,\n\t\t\t\tend: event._end,\n\t\t\t\tallDay: allDay // normalize the dates in the same regard as the new properties\n\t\t\t};\n\t\t\tnormalizeEventDates(newProps); // massages start/end/allDay\n\n\t\t\t// strip or ensure the end date\n\t\t\tif (clearEnd) {\n\t\t\t\tnewProps.end = null;\n\t\t\t}\n\t\t\telse if (durationDelta && !newProps.end) { // the duration translation requires an end date\n\t\t\t\tnewProps.end = t.getDefaultEventEnd(newProps.allDay, newProps.start);\n\t\t\t}\n\n\t\t\tif (dateDelta) {\n\t\t\t\tnewProps.start.add(dateDelta);\n\t\t\t\tif (newProps.end) {\n\t\t\t\t\tnewProps.end.add(dateDelta);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (durationDelta) {\n\t\t\t\tnewProps.end.add(durationDelta); // end already ensured above\n\t\t\t}\n\n\t\t\t// if the dates have changed, and we know it is impossible to recompute the\n\t\t\t// timezone offsets, strip the zone.\n\t\t\tif (\n\t\t\t\tisAmbigTimezone &&\n\t\t\t\t!newProps.allDay &&\n\t\t\t\t(dateDelta || durationDelta)\n\t\t\t) {\n\t\t\t\tnewProps.start.stripZone();\n\t\t\t\tif (newProps.end) {\n\t\t\t\t\tnewProps.end.stripZone();\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$.extend(event, miscProps, newProps); // copy over misc props, then date-related props\n\t\t\tbackupEventDates(event); // regenerate internal _start/_end/_allDay\n\n\t\t\tundoFunctions.push(function() {\n\t\t\t\t$.extend(event, oldProps);\n\t\t\t\tbackupEventDates(event); // regenerate internal _start/_end/_allDay\n\t\t\t});\n\t\t});\n\n\t\treturn function() {\n\t\t\tfor (var i = 0; i < undoFunctions.length; i++) {\n\t\t\t\tundoFunctions[i]();\n\t\t\t}\n\t\t};\n\t}", "function mutateEvents(events, clearEnd, allDay, dateDelta, durationDelta, miscProps) {\n\t\tvar isAmbigTimezone = t.getIsAmbigTimezone();\n\t\tvar undoFunctions = [];\n\n\t\t// normalize zero-length deltas to be null\n\t\tif (dateDelta && !dateDelta.valueOf()) { dateDelta = null; }\n\t\tif (durationDelta && !durationDelta.valueOf()) { durationDelta = null; }\n\n\t\t$.each(events, function(i, event) {\n\t\t\tvar oldProps;\n\t\t\tvar newProps;\n\n\t\t\t// build an object holding all the old values, both date-related and misc.\n\t\t\t// for the undo function.\n\t\t\toldProps = {\n\t\t\t\tstart: event.start.clone(),\n\t\t\t\tend: event.end ? event.end.clone() : null,\n\t\t\t\tallDay: event.allDay\n\t\t\t};\n\t\t\t$.each(miscProps, function(name) {\n\t\t\t\toldProps[name] = event[name];\n\t\t\t});\n\n\t\t\t// new date-related properties. work off the original date snapshot.\n\t\t\t// ok to use references because they will be thrown away when backupEventDates is called.\n\t\t\tnewProps = {\n\t\t\t\tstart: event._start,\n\t\t\t\tend: event._end,\n\t\t\t\tallDay: allDay // normalize the dates in the same regard as the new properties\n\t\t\t};\n\t\t\tnormalizeEventDates(newProps); // massages start/end/allDay\n\n\t\t\t// strip or ensure the end date\n\t\t\tif (clearEnd) {\n\t\t\t\tnewProps.end = null;\n\t\t\t}\n\t\t\telse if (durationDelta && !newProps.end) { // the duration translation requires an end date\n\t\t\t\tnewProps.end = t.getDefaultEventEnd(newProps.allDay, newProps.start);\n\t\t\t}\n\n\t\t\tif (dateDelta) {\n\t\t\t\tnewProps.start.add(dateDelta);\n\t\t\t\tif (newProps.end) {\n\t\t\t\t\tnewProps.end.add(dateDelta);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (durationDelta) {\n\t\t\t\tnewProps.end.add(durationDelta); // end already ensured above\n\t\t\t}\n\n\t\t\t// if the dates have changed, and we know it is impossible to recompute the\n\t\t\t// timezone offsets, strip the zone.\n\t\t\tif (\n\t\t\t\tisAmbigTimezone &&\n\t\t\t\t!newProps.allDay &&\n\t\t\t\t(dateDelta || durationDelta)\n\t\t\t) {\n\t\t\t\tnewProps.start.stripZone();\n\t\t\t\tif (newProps.end) {\n\t\t\t\t\tnewProps.end.stripZone();\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$.extend(event, miscProps, newProps); // copy over misc props, then date-related props\n\t\t\tbackupEventDates(event); // regenerate internal _start/_end/_allDay\n\n\t\t\tundoFunctions.push(function() {\n\t\t\t\t$.extend(event, oldProps);\n\t\t\t\tbackupEventDates(event); // regenerate internal _start/_end/_allDay\n\t\t\t});\n\t\t});\n\n\t\treturn function() {\n\t\t\tfor (var i = 0; i < undoFunctions.length; i++) {\n\t\t\t\tundoFunctions[i]();\n\t\t\t}\n\t\t};\n\t}", "function computeEventForDateSpan(dateSpan, dragMeta, context) {\n var defProps = Object(tslib__WEBPACK_IMPORTED_MODULE_1__[\"__assign\"])({}, dragMeta.leftoverProps);\n\n for (var _i = 0, _a = context.pluginHooks.externalDefTransforms; _i < _a.length; _i++) {\n var transform = _a[_i];\n Object(tslib__WEBPACK_IMPORTED_MODULE_1__[\"__assign\"])(defProps, transform(dateSpan, dragMeta));\n }\n\n var _b = Object(_fullcalendar_common__WEBPACK_IMPORTED_MODULE_0__[\"refineEventDef\"])(defProps, context),\n refined = _b.refined,\n extra = _b.extra;\n\n var def = Object(_fullcalendar_common__WEBPACK_IMPORTED_MODULE_0__[\"parseEventDef\"])(refined, extra, dragMeta.sourceId, dateSpan.allDay, context.options.forceEventDuration || Boolean(dragMeta.duration), // hasEnd\n context);\n var start = dateSpan.range.start; // only rely on time info if drop zone is all-day,\n // otherwise, we already know the time\n\n if (dateSpan.allDay && dragMeta.startTime) {\n start = context.dateEnv.add(start, dragMeta.startTime);\n }\n\n var end = dragMeta.duration ? context.dateEnv.add(start, dragMeta.duration) : Object(_fullcalendar_common__WEBPACK_IMPORTED_MODULE_0__[\"getDefaultEventEnd\"])(dateSpan.allDay, start, context);\n var instance = Object(_fullcalendar_common__WEBPACK_IMPORTED_MODULE_0__[\"createEventInstance\"])(def.defId, {\n start: start,\n end: end\n });\n return {\n def: def,\n instance: instance\n };\n } // Utils for extracting data from element", "function C(a){var b=G.start.day();// normalize dayOffset to beginning-of-week\n// first date's day of week\n// # of cells from full weeks\n// # of cells from partial last week\nreturn a+=b,Math.floor(a/7)*N+Q[(a%7+7)%7]-Q[b]}", "function pt (dat) {\n dat.cx = getYearDay(dat.date) - startDay\n dat.cy = typeIndex(dat.type)\n return dat\n}", "function formatDate(main_date, sub_str, pos){\n\n var formatted_date = [];\n\n formatted_date['value_modifier'] = ''; /*assume the date is not estimated*/\n\n if(pos == 0) /*year*/\n {\n if (sub_str.toLowerCase() != 'unknown') {\n formatted_date['value_datetime'] = sub_str;\n }\n else{\n formatted_date['value_datetime'] = null; /* since year is unknown, leave the date 'null'*/\n }\n }\n\n else if(pos == 1) /*month*/\n {\n\n if (sub_str.toLowerCase() != 'unknown') {\n formatted_date['value_datetime'] = main_date +'-'+ sub_str;\n }\n else{\n formatted_date['value_datetime'] = main_date +'-07-01'; /* since month is unknown, estimate date*/\n formatted_date['value_modifier'] = 'ES';\n }\n }\n\n else if(pos == 2) /*day*/\n {\n if (sub_str.toLowerCase() != 'unknown') {\n formatted_date['value_datetime'] = main_date +'-'+ sub_str;\n }\n else{\n formatted_date['value_datetime'] = main_date +'-15'; /* since day is unknown, estimate date*/\n formatted_date['value_modifier'] = 'ES';\n }\n }\n\n return formatted_date;\n}", "function mutateEvents(events, clearEnd, allDay, dateDelta, durationDelta, miscProps) {\n\t\t\tvar isAmbigTimezone = t.getIsAmbigTimezone();\n\t\t\tvar undoFunctions = [];\n\n\t\t\t// normalize zero-length deltas to be null\n\t\t\tif (dateDelta && !dateDelta.valueOf()) { dateDelta = null; }\n\t\t\tif (durationDelta && !durationDelta.valueOf()) { durationDelta = null; }\n\n\t\t\t$.each(events, function(i, event) {\n\t\t\t\tvar oldProps;\n\t\t\t\tvar newProps;\n\n\t\t\t\t// build an object holding all the old values, both date-related and misc.\n\t\t\t\t// for the undo function.\n\t\t\t\toldProps = {\n\t\t\t\t\tstart: event.start.clone(),\n\t\t\t\t\tend: event.end ? event.end.clone() : null,\n\t\t\t\t\tallDay: event.allDay\n\t\t\t\t};\n\t\t\t\t$.each(miscProps, function(name) {\n\t\t\t\t\toldProps[name] = event[name];\n\t\t\t\t});\n\n\t\t\t\t// new date-related properties. work off the original date snapshot.\n\t\t\t\t// ok to use references because they will be thrown away when backupEventDates is called.\n\t\t\t\tnewProps = {\n\t\t\t\t\tstart: event._start,\n\t\t\t\t\tend: event._end,\n\t\t\t\t\tallDay: allDay // normalize the dates in the same regard as the new properties\n\t\t\t\t};\n\t\t\t\tnormalizeEventDates(newProps); // massages start/end/allDay\n\n\t\t\t\t// strip or ensure the end date\n\t\t\t\tif (clearEnd) {\n\t\t\t\t\tnewProps.end = null;\n\t\t\t\t}\n\t\t\t\telse if (durationDelta && !newProps.end) { // the duration translation requires an end date\n\t\t\t\t\tnewProps.end = t.getDefaultEventEnd(newProps.allDay, newProps.start);\n\t\t\t\t}\n\n\t\t\t\tif (dateDelta) {\n\t\t\t\t\tnewProps.start.add(dateDelta);\n\t\t\t\t\tif (newProps.end) {\n\t\t\t\t\t\tnewProps.end.add(dateDelta);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif (durationDelta) {\n\t\t\t\t\tnewProps.end.add(durationDelta); // end already ensured above\n\t\t\t\t}\n\n\t\t\t\t// if the dates have changed, and we know it is impossible to recompute the\n\t\t\t\t// timezone offsets, strip the zone.\n\t\t\t\tif (\n\t\t\t\t\tisAmbigTimezone &&\n\t\t\t\t\t!newProps.allDay &&\n\t\t\t\t\t(dateDelta || durationDelta)\n\t\t\t\t) {\n\t\t\t\t\tnewProps.start.stripZone();\n\t\t\t\t\tif (newProps.end) {\n\t\t\t\t\t\tnewProps.end.stripZone();\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t$.extend(event, miscProps, newProps); // copy over misc props, then date-related props\n\t\t\t\tbackupEventDates(event); // regenerate internal _start/_end/_allDay\n\n\t\t\t\tundoFunctions.push(function() {\n\t\t\t\t\t$.extend(event, oldProps);\n\t\t\t\t\tbackupEventDates(event); // regenerate internal _start/_end/_allDay\n\t\t\t\t});\n\t\t\t});\n\n\t\t\treturn function() {\n\t\t\t\tfor (var i = 0; i < undoFunctions.length; i++) {\n\t\t\t\t\tundoFunctions[i]();\n\t\t\t\t}\n\t\t\t};\n\t\t}", "fnDateFormatChange(eve) {\n debugger;\n let timeFormat = eve.target.value;\n let data = [];\n if (timeFormat == 12) {\n data = this.state.data.map((obj) => {\n let _obj = Object.assign({}, obj);\n let _date = obj.createdDate;\n let _dateArr = _date.split(\"T\");\n let _time = _dateArr[1];\n let _timeArr = _time.split(\".\");\n _time = this.tConvert(_timeArr[0], 12) + \".\" + _timeArr[1];\n _date = _dateArr[0] + \"T\" + _time;\n _obj.createdDate = _date;\n return _obj;\n });\n } else {\n data = this.state.formated24Hours;\n }\n\n this.setState({\n data: data,\n tableData: data.slice(0, 5),\n totalPages: Math.ceil(data.length / 5),\n currPage: 1,\n isSearching: true,\n });\n }", "function mutateEvents(events, clearEnd, allDay, dateDelta, durationDelta, miscProps) {\n var isAmbigTimezone = t.getIsAmbigTimezone();\n var undoFunctions = [];\n\n // normalize zero-length deltas to be null\n if (dateDelta && !dateDelta.valueOf()) { dateDelta = null; }\n if (durationDelta && !durationDelta.valueOf()) { durationDelta = null; }\n\n $.each(events, function (i, event) {\n var oldProps;\n var newProps;\n\n // build an object holding all the old values, both date-related and misc.\n // for the undo function.\n oldProps = {\n start: event.start.clone(),\n end: event.end ? event.end.clone() : null,\n allDay: event.allDay\n };\n $.each(miscProps, function (name) {\n oldProps[name] = event[name];\n });\n\n // new date-related properties. work off the original date snapshot.\n // ok to use references because they will be thrown away when backupEventDates is called.\n newProps = {\n start: event._start,\n end: event._end,\n allDay: allDay // normalize the dates in the same regard as the new properties\n };\n normalizeEventRange(newProps); // massages start/end/allDay\n\n // strip or ensure the end date\n if (clearEnd) {\n newProps.end = null;\n }\n else if (durationDelta && !newProps.end) { // the duration translation requires an end date\n newProps.end = t.getDefaultEventEnd(newProps.allDay, newProps.start);\n }\n\n if (dateDelta) {\n newProps.start.add(dateDelta);\n if (newProps.end) {\n newProps.end.add(dateDelta);\n }\n }\n\n if (durationDelta) {\n newProps.end.add(durationDelta); // end already ensured above\n }\n\n // if the dates have changed, and we know it is impossible to recompute the\n // timezone offsets, strip the zone.\n if (\n isAmbigTimezone &&\n !newProps.allDay &&\n (dateDelta || durationDelta)\n ) {\n newProps.start.stripZone();\n if (newProps.end) {\n newProps.end.stripZone();\n }\n }\n\n $.extend(event, miscProps, newProps); // copy over misc props, then date-related props\n backupEventDates(event); // regenerate internal _start/_end/_allDay\n\n undoFunctions.push(function () {\n $.extend(event, oldProps);\n backupEventDates(event); // regenerate internal _start/_end/_allDay\n });\n });\n\n return function () {\n for (var i = 0; i < undoFunctions.length; i++) {\n undoFunctions[i]();\n }\n };\n }", "function formatDate(data, annotations) {\n for (let entry of data) {\n let date = entry[\"DATE\"].split(\"/\");\n let newDate = `${\"20\" + date[2]}-${date[1]}-${date[0]}`;\n entry[\"DATE\"] = newDate;\n }\n return data;\n }", "getCellFormat(table, start, end) {\n if (start.paragraph.associatedCell.equals(end.paragraph.associatedCell)) {\n return;\n }\n let isStarted = false;\n for (let i = 0; i < table.childWidgets.length; i++) {\n let row = table.childWidgets[i];\n if (row === start.paragraph.associatedCell.ownerRow) {\n isStarted = true;\n }\n if (isStarted) {\n for (let j = 0; j < row.childWidgets.length; j++) {\n let cell = row.childWidgets[j];\n if (this.isCellSelected(cell, start, end)) {\n this.cellFormat.combineFormat(cell.cellFormat);\n }\n if (cell === end.paragraph.associatedCell) {\n this.cellFormat.combineFormat(cell.cellFormat);\n return;\n }\n }\n }\n }\n }", "function addToDay(row, day) {\n var sheet = SpreadsheetApp.getActiveSpreadsheet().getSheetByName(day);\n \n \n var startDate = new Date(row[masterCols.start_time]);\n var endDate = new Date(row[masterCols.end_time]);\n Logger.log(startDate);\n var startPoint = startDate.getHours() * 2+2; //Start hour\n var endPoint = (endDate.getHours() === 0) ? 24 * 2+1 : endDate.getHours() * 2 + 1; //End hour\n \n if (startDate.getMinutes() === 30){startPoint += 1;} //start min\n if (endDate.getMinutes() === 30){endPoint += 1;} //end min\n \n var words = row[masterCols.event_section].split(\",\"); //delimiter\n \n //if workshop is the first word, then we use the next keyword as its event\n //This is an artefact of a request from Bitcamp 2019\n var section = (words[0] === \"Workshop\") ? words[1] : words[0]; //Event Section\n var col, bg;\n \n Logger.log(section);\n \n for (var i = 0; i < eventCategories.totalEvents; i++){\n if (section === eventCategories[i].name){\n col = eventCategories[i].col, bg = eventCategories[i].hex;\n break;\n }\n }\n \n var startCell = col+startPoint;\n var endCell = col+endPoint;\n Logger.log(startCell);\n \n //if an event already exists at that cell, then put this event in the overflow col\n //In the future we may need more overflow columns\n \n if (sheet.getRange(startCell).getBackground() !== \"#ffffff\"){ startCell = 'G'+startPoint; endCell = 'G'+endPoint;}\n else if (sheet.getRange(endCell).getBackground() !== \"#ffffff\"){ startCell = 'G'+startPoint; endCell = 'G'+endPoint;}\n else if (sheet.getRange(col+Math.floor((startPoint+endPoint)/2)).getBackground() !== \"#ffffff\"){ startCell = 'G'+startPoint; endCell = 'G'+endPoint;}\n \n if (sheet.getRange(startCell).getBackground() !== \"#ffffff\"){ startCell = 'H'+startPoint; endCell = 'H'+endPoint;}\n \n //error will occur if start and end time are the exact same, as endCell will occur before startCell\n if (startPoint === endPoint + 1){endCell = startCell;}\n \n sheet.getRange(startCell).setValue(row[masterCols.title]);\n sheet.getRange(startCell+\":\"+endCell).setBackground(bg).setVerticalAlignment(\"middle\").setBorder(true, true, true, true, true, false);\n}", "function applyDate(inputFieldNames, inputFieldValues, isInlineCalendar, event){\r\n\t\r\n\t\r\n\tif (event){\r\n\t\tvar target = (isIE) ? event.srcElement : event.target;\r\n\t\tfor (var p=target.parentNode;p!=null;p=p.parentNode){\r\n\t\t\tif ((p.id) && ((p.id.indexOf(\"HATSFR\")) == 0)){\r\n\t\t\t\tvar parentName=p.id.substring(6);\r\n\t\t\t\tsetHatsFocus(parentName);\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t\r\n\tfor (var i=0,iL=inputFieldNames.length,iName,iVal; i<iL; ++i){\r\n\t\tiName=inputFieldNames[i];\r\n\t\tiVal=inputFieldValues[i];\r\n\t\tvar e = eval(\"hatsForm.\" + iName);\r\n\r\n\t\tif (typeof e.value == 'undefined'){\r\n\t\t\tif (typeof e[0].value != 'undefined'){\r\n\t\t\t\te = e[0];\r\n\t\t\t\tif ((isInlineCalendar) && (i == (iL - 1))){\r\n\t\t\t\t\te.focus();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\telse if (e && isInlineCalendar && (i == (iL - 1))){\r\n\t\t\te.focus();\r\n\t\t}\r\n\r\n\t\ttry {\r\n\t\t\te.setAttribute(\"MDT\",\"1\");\r\n\t\t}\r\n\t\tcatch(ex){\r\n\t\t\tvar errNum = (ex.number) ? (ex.number & 0xFFFF) : \"\";\r\n\t\t\talert(\"applyDate Exception \" + errNum + \": \" + ex.name + \" \" + ex.toString());\r\n\t\t}\r\n\r\n\t\tif (enableBIDI){\r\n\t\t\tif(e.length > 0){\r\n\t\t\t\tfor (var k=0,kL=e.length; k<kL; ++k){\r\n\t\t\t\t\tiVal = reverseData(e[k], iVal);\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\tiVal = reverseData(e, iVal);\r\n\t\t\t}\r\n\t\t}\r\n\t\tcheckInput2(iName, iVal, e.type);\r\n\r\n\t\tif (i == (iL - 1)){// only set the cursor position on the last field (works for single and multiple)\r\n\t\t\tvar inputField = iName.split(\"_\");\r\n\t\t\tvar fstart = parseInt(inputField[1]);\r\n\t\t\tvar flength = parseInt(inputField[2]);\r\n\t\t\tvar d = fstart + flength;\r\n\r\n\t\t\tif (flength <= iVal.length){\r\n\t\t\t\td = d - 1; //adjust for last in field\r\n\t\t\t}\r\n\r\n\t\t\tsetCursorPosition(d, hatsForm.name);\r\n\t\t\thatsForm.CARETPOS.value = d + 1;\r\n\t\t}\r\n\t}\r\n}", "function cellOffsetToCell(cellOffset) {\n\t\tvar colCnt = t.getColCnt();\n\n\t\t// rtl variables. wish we could pre-populate these. but where?\n\t\tvar dis = isRTL ? -1 : 1;\n\t\tvar dit = isRTL ? colCnt - 1 : 0;\n\n\t\tvar row = Math.floor(cellOffset / colCnt);\n\t\tvar col = ((cellOffset % colCnt + colCnt) % colCnt) * dis + dit; // column, adjusted for RTL (dis & dit)\n\t\treturn {\n\t\t\trow: row,\n\t\t\tcol: col\n\t\t};\n\t}", "function cellOffsetToCell(cellOffset) {\n\t\tvar colCnt = t.getColCnt();\n\n\t\t// rtl variables. wish we could pre-populate these. but where?\n\t\tvar dis = isRTL ? -1 : 1;\n\t\tvar dit = isRTL ? colCnt - 1 : 0;\n\n\t\tvar row = Math.floor(cellOffset / colCnt);\n\t\tvar col = ((cellOffset % colCnt + colCnt) % colCnt) * dis + dit; // column, adjusted for RTL (dis & dit)\n\t\treturn {\n\t\t\trow: row,\n\t\t\tcol: col\n\t\t};\n\t}", "function cellOffsetToCell(cellOffset) {\n\t\tvar colCnt = t.getColCnt();\n\n\t\t// rtl variables. wish we could pre-populate these. but where?\n\t\tvar dis = isRTL ? -1 : 1;\n\t\tvar dit = isRTL ? colCnt - 1 : 0;\n\n\t\tvar row = Math.floor(cellOffset / colCnt);\n\t\tvar col = ((cellOffset % colCnt + colCnt) % colCnt) * dis + dit; // column, adjusted for RTL (dis & dit)\n\t\treturn {\n\t\t\trow: row,\n\t\t\tcol: col\n\t\t};\n\t}", "function cellOffsetToCell(cellOffset) {\n\t\tvar colCnt = t.getColCnt();\n\n\t\t// rtl variables. wish we could pre-populate these. but where?\n\t\tvar dis = isRTL ? -1 : 1;\n\t\tvar dit = isRTL ? colCnt - 1 : 0;\n\n\t\tvar row = Math.floor(cellOffset / colCnt);\n\t\tvar col = ((cellOffset % colCnt + colCnt) % colCnt) * dis + dit; // column, adjusted for RTL (dis & dit)\n\t\treturn {\n\t\t\trow: row,\n\t\t\tcol: col\n\t\t};\n\t}", "function cellOffsetToCell(cellOffset) {\n\t\tvar colCnt = t.getColCnt();\n\n\t\t// rtl variables. wish we could pre-populate these. but where?\n\t\tvar dis = isRTL ? -1 : 1;\n\t\tvar dit = isRTL ? colCnt - 1 : 0;\n\n\t\tvar row = Math.floor(cellOffset / colCnt);\n\t\tvar col = ((cellOffset % colCnt + colCnt) % colCnt) * dis + dit; // column, adjusted for RTL (dis & dit)\n\t\treturn {\n\t\t\trow: row,\n\t\t\tcol: col\n\t\t};\n\t}", "function eventToSheetRow_(event, infoCol, sheetIdx) {\n\n let sheetRow = [];\n\n // Find the index that we need to use to set the Title and EventID.\n let splitedTitle = event.title.split(\" - \");\n if (splitedTitle.length > 2) {\n splitedTitle[1] = splitedTitle.slice(1).join(' - ')\n }\n let idx = headerString[sheetIdx].prefix.indexOf(splitedTitle[0]);\n\n // Convert the event object into spreadsheet cell value. \n let title = splitedTitle[1];\n let id = event.id;\n let date = \"\";\n let time = \"\";\n let recurrence = \"\";\n\n // Make this start and end object to make everything easier to read.\n let start = {\n 'year': event.startTime.getFullYear(),\n 'month': event.startTime.getMonth() + 1,\n 'day': event.startTime.getDate(),\n 'hours': event.startTime.getHours(),\n 'minutes': event.startTime.getMinutes()\n }\n let end = {\n 'year': event.endTime.getFullYear(),\n 'month': event.endTime.getMonth() + 1,\n 'day': event.endTime.getDate(),\n 'hours': event.endTime.getHours(),\n 'minutes': event.endTime.getMinutes()\n }\n \n // Form the date value.\n date = start.year.toString().padStart(4,\"0\") + start.month.toString().padStart(2,\"0\") + start.day.toString().padStart(2,\"0\");\n if (\n start.year !== end.year ||\n start.month !== end.month ||\n start.day !== end.day\n ) {\n date = date + \"-\" + end.year.toString().padStart(4,\"0\") + end.month.toString().padStart(2,\"0\") + end.day.toString().padStart(2,\"0\");\n }\n\n // Form the time value.\n time = start.hours.toString().padStart(2,\"0\") + start.minutes.toString().padStart(2,\"0\");\n if (\n start.hours !== end.hours - 1 ||\n start.minutes !== end.minutes\n ) {\n time = time + \"-\" + end.hours.toString().padStart(2,\"0\") + end.minutes.toString().padStart(2,\"0\");\n }\n\n // Form the recurrence value, if required.\n if (event.recurrence !== \"null\") {\n recurrence = \"Re:every\" + event.recurrence.repeatTimes.toString() + capitalizeFirstLetter(event.recurrence.rule);\n if (event.recurrence.rule === \"week\") {\n recurrence = recurrence + \" On:[\" + event.recurrence.repeatOn.join(',') + \"]\";\n }\n else if (event.recurrence.rule === \"month\") {\n recurrence = recurrence + \" With:\" + event.recurrence.repeatMode;\n }\n if (event.recurrence.end.toLowerCase() === \"endafter\") {\n recurrence = recurrence + \" \" + event.recurrence.end + \":\" + event.recurrence.endTimes + \"times\"\n }\n else {\n recurrence = recurrence + \" \" + event.recurrence.end + \":\" + event.recurrence.endDate.year.toString().padStart(4,\"0\") + event.recurrence.endDate.month.toString().padStart(2,\"0\") + event.recurrence.endDate.day.toString().padStart(2,\"0\");\n }\n }\n\n // Put everything into the sheetRow array.\n sheetRow[infoCol.ids[idx]] = id;\n sheetRow[infoCol.titles[idx]] = title;\n sheetRow[infoCol.date] = date;\n sheetRow[infoCol.time] = time;\n sheetRow[infoCol.recurrence] = recurrence;\n\n // fill all the undefined section with empty string.\n for (let i = 0; i < sheetRow.length; i++) {\n if (typeof(sheetRow[i]) === \"undefined\") {\n sheetRow[i] = \"\";\n }\n }\n\n return sheetRow;\n\n /**\n * Helper function that capitalize the first letter for the whole string. \n * @param {string} str String that want to be capitalized.\n * @returns Original string but with the first letter capitalized. Eg: \"day\" -> \"Day\", \"day of week\" -> \"Day of week\"\n */\n function capitalizeFirstLetter(str) {\n return str.charAt(0).toUpperCase() + str.substring(1);\n }\n\n}", "function setUpSheet(sheet, fieldKeys) {\n sheet.getRange(1, fieldKeys.indexOf('starttime') + 1, 999).setNumberFormat(dateFormat);\n sheet.getRange(1, fieldKeys.indexOf('endtime') + 1, 999).setNumberFormat(dateFormat);\n sheet.getRange(1, fieldKeys.indexOf('duration') + 1, 999).setNumberFormat('0.0');\n sheet.hideColumns(fieldKeys.indexOf('id') + 1);\n sheet.hideColumns(fieldKeys.indexOf('description') + 1);\n}", "piecesToCells(pieces, cells, action) {\n if (pieces.constructor !== Array) {\n pieces = [pieces];\n }\n pieces.forEach((piece) => {\n const boardIndex = piece.boardIndex;\n piece.cells.forEach(cell => {\n const xCoord = piece.centerX + cell[0];\n const yCoord = piece.centerY + cell[1];\n switch (action) {\n case 'drawInactive':\n let oldCell = this.getCells(yCoord, xCoord, boardIndex);\n cells = update(cells, {\n [oldCell.index]: {\n $merge: {\n inactivePiecePlayerIndex: piece.playerIndex,\n inactivePieceIndex: piece.pieceIndex,\n }\n }\n });\n break;\n case 'eraseInactive':\n let oldCell = this.getCells(yCoord, xCoord, boardIndex);\n cells = update(cells, {\n [oldCell.index]: {\n $merge: {\n inactivePiecePlayerIndex: null,\n inactivePieceIndex: null,\n }\n }\n });\n break;\n case 'drawActive':\n let oldCell = this.getCells(yCoord, xCoord, boardIndex);\n cells = update(cells, {\n [oldCell.index]: {\n $merge: {\n activePiecePlayerIndex: piece.playerIndex,\n activePieceIndex: piece.pieceIndex,\n valid: piece.valid,\n }\n }\n });\n break;\n case 'eraseActive':\n let oldCell = this.getCells(yCoord, xCoord, boardIndex);\n cells = update(cells, {\n [oldCell.index]: {\n $merge: {\n activePiecePlayerIndex: null,\n activePieceIndex: null,\n valid: null,\n }\n }\n });\n default:\n console.log(`Error in pieceToCells - invalid action '${action}'`)\n break;\n }\n });\n });\n return cells;\n }", "serializeCellFormat(writer, cellFormat, ensureMerge, endProperties) {\n let cell = this.blockOwner;\n //Get the table fomat\n let tf = this.table.tableFormat;\n //Get the row format\n let rf = this.row.rowFormat;\n writer.writeStartElement(undefined, 'tcPr', this.wNamespace);\n //w:cnfStyle - Table Cell Conditional Formatting\n // SerializeCnfStyleElement(cell);\n //w:tcW - Preferred Table Cell Width\n this.serializeCellWidth(writer, cell);\n // serialize cell margins\n this.serializeCellMargins(writer, cellFormat);\n if (ensureMerge) {\n //w:gridSpan - Grid Columns Spanned by Current Table Cell\n this.serializeGridSpan(writer, cell);\n //w:hMerge - Horizontally Merged Cell and w:vMerge - Vertically Merged Cell\n this.serializeCellMerge(writer, cellFormat);\n }\n //w:tcBorders - Table Cell Borders\n writer.writeStartElement(undefined, 'tcBorders', this.wNamespace);\n this.serializeBorders(writer, cellFormat.borders, 8);\n writer.writeEndElement();\n //w:shd - Table Cell Shading\n this.serializeShading(writer, cell.cellFormat.shading);\n // //w:noWrap - Don't Wrap Cell Content\n // if (cellFormat.HasValue(CellFormat.TextWrapKey)) {\n // m_writer.WriteStartElement('noWrap', W_namespace);\n // if (cellFormat.TextWrap)\n // m_writer.WriteAttributeString('w', 'val', W_namespace, 'false');\n // m_writer.WriteEndElement();\n // }\n // //w:tcMar - Single Table Cell Margins\n // if (!cellFormat.SamePaddingsAsTable) {\n // m_writer.WriteStartElement('tcMar', W_namespace);\n // SerializePaddings(cellFormat.Paddings);\n // m_writer.WriteEndElement();\n // }\n //w:textDirection - Table Cell Text Flow Direction\n this.serializeTableCellDirection(writer, cellFormat);\n // //w:tcFitText - Fit Text Within Cell\n // if (cellFormat.FitText) {\n // m_writer.WriteStartElement('tcFitText', W_namespace);\n // m_writer.WriteEndElement();\n // }\n // //w:hideMark \n // if (cellFormat.HideMark) {\n // m_writer.WriteStartElement('hideMark', W_namespace);\n // m_writer.WriteEndElement();\n // }\n //w:vAlign - Table Cell Vertical Alignment\n // if (cellFormat.HasValue(CellFormat.VrAlignmentKey))\n this.serializeCellVerticalAlign(writer, cellFormat.verticalAlignment);\n // //w:hideMark - Ignore End Of Cell Marker In Row Height Calculation\n // SerializeDocxProps(tempDocxProps, 'hideMark');\n // //w:cellIns - Table Cell Insertion\n // SerializeDocxProps(tempDocxProps, 'cellIns');\n // //w:cellDel - Table Cell Deletion\n // SerializeDocxProps(tempDocxProps, 'cellDel');\n // //w:cellMerge - Vertically Merged/Split Table Cells\n // SerializeDocxProps(tempDocxProps, 'cellMerge');\n // if (cellFormat.OldPropertiesHash.length > 0 && !m_isAlternativeCellFormat) {\n // m_isAlternativeCellFormat = true;\n // SerializeTrackChangeProps('tcPrChange', cellFormat.FormatChangeAuthorName, cellFormat.FormatChangeDateTime);\n // Dictionary < int, object > oldPropertyHash = new Dictionary<int, object>(cellFormat.OldPropertiesHash);\n // Dictionary < int, object > propertyHash = new Dictionary<int, object>(cellFormat.PropertiesHash);\n // cellFormat.PropertiesHash.Clear();\n // cellFormat.OldPropertiesHash.Clear();\n // foreach(KeyValuePair < int, object > keyValue in oldPropertyHash)\n // cellFormat.PropertiesHash[keyValue.Key] = keyValue.Value;\n // SerializeCellFormat(cellFormat);\n // cellFormat.PropertiesHash.Clear();\n // foreach(KeyValuePair < int, object > keyValue in propertyHash)\n // cellFormat.PropertiesHash[keyValue.Key] = keyValue.Value;\n // foreach(KeyValuePair < int, object > keyValue in oldPropertyHash)\n // cellFormat.OldPropertiesHash[keyValue.Key] = keyValue.Value;\n // m_writer.WriteEndElement();\n // m_isAlternativeCellFormat = false;\n // }\n if (endProperties) {\n writer.writeEndElement();\n }\n }", "function J(e,t){if(t.full)return null;var a=I(e,t.from.line)&&T(e,t.from.line).markedSpans,n=I(e,t.to.line)&&T(e,t.to.line).markedSpans;if(!a&&!n)return null;var r=t.from.ch,f=t.to.ch,o=0==P(t.from,t.to),i=X(a,r,o),s=Y(n,f,o),c=1==t.text.length,u=p(t.text).length+(c?r:0);if(i)\n // Fix up .to properties of first\n for(var l=0;l<i.length;++l){var d=i[l];if(null==d.to){var _=K(s,d.marker);_?c&&(d.to=null==_.to?null:_.to+u):d.to=r}}if(s)\n // Fix up .from in last (or move them into first in case of sameLine)\n for(var m=0;m<s.length;++m){var g=s[m];if(null!=g.to&&(g.to+=u),null==g.from){var h=K(i,g.marker);h||(g.from=u,c&&(i||(i=[])).push(g))}else g.from+=u,c&&(i||(i=[])).push(g)}\n // Make sure we didn't create any zero-length spans\n i&&(i=ee(i)),s&&s!=i&&(s=ee(s));var b=[i];if(!c){\n // Fill gap with whole-line-spans\n var y,v=t.text.length-2;if(v>0&&i)for(var w=0;w<i.length;++w)null==i[w].to&&(y||(y=[])).push(new V(i[w].marker,null,null));for(var x=0;x<v;++x)b.push(y);b.push(s)}return b}", "function fixDate(type, value, hash) {\n if (type !== \"commit\" && type !== \"tag\") return;\n // Add up to 3 extra newlines and try all 30-minutes timezone offsets.\n var clone = JSON.parse(JSON.stringify(value));\n for (var x = 0; x < 3; x++) {\n for (var i = -720; i < 720; i += 30) {\n if (type === \"commit\") {\n clone.author.date.offset = i;\n clone.committer.date.offset = i;\n }\n else if (type === \"tag\") {\n clone.tagger.date.offset = i;\n }\n if (hash !== hashAs(type, clone)) continue;\n // Apply the changes and return.\n value.message = clone.message;\n if (type === \"commit\") {\n value.author.date.offset = clone.author.date.offset;\n value.committer.date.offset = clone.committer.date.offset;\n }\n else if (type === \"tag\") {\n value.tagger.date.offset = clone.tagger.date.offset;\n }\n return true;\n }\n clone.message += \"\\n\";\n }\n return false;\n}", "function formatDate(unix, offset, dateFormat = 'full') {\n const date = (0,date_fns_fromUnixTime__WEBPACK_IMPORTED_MODULE_0__.default)(unix + offset).toUTCString();\n let dayOfWeek = date.slice(0, 3);\n let dayOfMonth = date.slice(5, 7);\n const month = date.slice(8, 11);\n const year = date.slice(14, 16);\n let suffix;\n\n // change 01 to 1 etc\n if (dayOfMonth < 10) {\n dayOfMonth = dayOfMonth.slice(1);\n }\n\n // generate corect date suffix\n if (dayOfMonth.slice(-1) === '1') {\n suffix = 'st';\n } else if (dayOfMonth.slice(-1) === '2') {\n suffix = 'nd';\n } else if (dayOfMonth.slice(-1) === '3') {\n suffix = 'rd';\n } else {\n suffix = 'th';\n }\n\n // those pesky 11, 12, 13 ths\n if (dayOfMonth > 3 && dayOfMonth < 21) {\n suffix = 'th';\n }\n\n // convert short day name to full day name\n if (dayOfWeek === 'Mon') {\n dayOfWeek = 'Monday';\n } else if (dayOfWeek === 'Tue') {\n dayOfWeek = 'Tuesday';\n } else if (dayOfWeek === 'Wed') {\n dayOfWeek = 'Wednesday';\n } else if (dayOfWeek === 'Thu') {\n dayOfWeek = 'Thursday';\n } else if (dayOfWeek === 'Fri') {\n dayOfWeek = 'Friday';\n } else if (dayOfWeek === 'Sat') {\n dayOfWeek = 'Saturday';\n } else if (dayOfWeek === 'Sun') {\n dayOfWeek = 'Sunday';\n }\n\n // return only the day of week\n if (dateFormat === 'day') {\n return dayOfWeek;\n }\n\n // return full date string\n return `${dayOfWeek}, ${dayOfMonth}${suffix} ${month} '${year}`;\n}", "function processRowToDateTime(row, format) {\n\tfor(var i = 1; i < row.length; i ++) {\n\t\tif(row[i] == '') {\n\t\t\trow[i] = null;\n\t\t\tcontinue;\n\t\t}\n\t\tswitch(format) {\n\t\t\tcase 'dd-mm-yyyy':\n\t\t\t\tvar reggie = /(\\d{2})-(\\d{2})-(\\d{4})/;\n\t\t\t\tvar dateArray = reggie.exec(row[i]); \n\t\t\t\tvar dateObject = new Date(\n\t\t\t\t (+dateArray[3]),\n\t\t\t\t (+dateArray[2])-1, // Careful, month starts at 0!\n\t\t\t\t (+dateArray[1])\n\t\t\t\t);\n\t\t\t\tbreak;\n\t\t\tcase 'mm-dd-yyyy':\n\t\t\t\tvar reggie = /(\\d{2})-(\\d{2})-(\\d{4})/;\n\t\t\t\tvar dateArray = reggie.exec(row[i]); \n\t\t\t\tvar dateObject = new Date(\n\t\t\t\t (+dateArray[3]),\n\t\t\t\t (+dateArray[1])-1, // Careful, month starts at 0!\n\t\t\t\t (+dateArray[2])\n\t\t\t\t);\n\t\t\t\tbreak;\n\t\t\tcase 'mm/dd/yyyy':\n\t\t\t\tvar reggie = /(\\d{2})\\/(\\d{2})\\/(\\d{4})/;\n\t\t\t\tvar dateArray = reggie.exec(row[i]); \n\t\t\t\tvar dateObject = new Date(\n\t\t\t\t (+dateArray[3]),\n\t\t\t\t (+dateArray[1])-1, // Careful, month starts at 0!\n\t\t\t\t (+dateArray[2])\n\t\t\t\t);\n\t\t\t\tbreak;\n\t\t\tdefault: // dd/mm/yyyy\n\t\t\t\tvar reggie = /(\\d{2})\\/(\\d{2})\\/(\\d{4})/;\n\t\t\t\tvar dateArray = reggie.exec(row[i]); \n\t\t\t\tvar dateObject = new Date(\n\t\t\t\t (+dateArray[3]),\n\t\t\t\t (+dateArray[2])-1, // Careful, month starts at 0!\n\t\t\t\t (+dateArray[1])\n\t\t\t\t);\n\t\t\t\tbreak;\n\t\t}\n\t\t\n\t\trow[i] = dateObject.getFullYear() + \"-\" + padStr((dateObject.getMonth() + 1)) + \"-\" + padStr(dateObject.getDate()) + \" \" +\n\t\tpadStr(dateObject.getHours()) + \":\" + padStr(dateObject.getMinutes()) + \":\" + padStr(dateObject.getSeconds());\n\t\t\n\t}\n\t\n\treturn row;\n}", "function igmask_date(e, di, v, lf, id, pe, x, y, w, h, z)\r\n{\r\n\tvar me = new igmask_new(e, null, id, pe, x, y, w, h, z);\r\n\t// 1 - d, 2 - m, 3 - y\r\n\t// 00007 - 1st\r\n\t// 00070 - 2nd\r\n\t// 00700 - 3rd\r\n\t// 01000 - dd\r\n\t// 02000 - mm\r\n\t// 04000 - yyyy\r\n\tme.order = 7370;//2 | (1 << 3) | (3 << 6) | (1 << 10) | (1 << 11) | (1 << 12)\r\n\tme.sepCh = \"/\";\r\n\tme.sep = 47;\r\n\tme.autoCentury = true;\r\n\tme.setLongFormat = function(v){this.longFormat = v;}\r\n\tme.getLongFormat = function(){return this.longFormat;}\r\n\tme.setDateInfo = function(v){this.info = v; this.setInputMask(null);}\r\n\tme.getDateInfo = function(){return this.info;}\r\n\tme.setInputMask = function(v)\r\n\t{\r\n\t\tvar sep0 = null;\r\n\t\tif(v == null && this.info != null)\r\n\t\t{\r\n\t\t\tv = this.info.ShortDatePattern;\r\n\t\t\tif(ig_csom.isEmpty(sep0 = this.info.DateSeparator)) sep0 = null;\r\n\t\t}\r\n\t\tif(v == null || v.length < 3) v = \"MM/dd/yyyy\";\r\n\t\tvar ii = v.length;\r\n\t\tvar y = 0, m = 0, d = 0, sep = 0, i = -1, o = 0;\r\n\t\twhile(++i < ii)\r\n\t\t{\r\n\t\t\tvar ch = v.charAt(i);\r\n\t\t\tif(ch == 'd')\r\n\t\t\t{\r\n\t\t\t\tif(d++ > 0){o |= 1024; continue;}\r\n\t\t\t\to |= 1 << (sep++ * 3);\r\n\t\t\t}\r\n\t\t\telse if(ch == 'm' || ch == 'M')\r\n\t\t\t{\r\n\t\t\t\tif(m++ > 0){o |= 2048; continue;}\r\n\t\t\t\to |= 2 << (sep++ * 3);\r\n\t\t\t}\r\n\t\t\telse if(ch == 'y')\r\n\t\t\t{\r\n\t\t\t\tif(y++ > 0){if(y > 2) o |= 4096; continue;}\r\n\t\t\t\to |= 3 << (sep++ * 3);\r\n\t\t\t}\r\n\t\t\telse if(sep == 1 && sep0 == null) sep0 = ch;\r\n\t\t}\r\n\t\tif(sep0 != null)\r\n\t\t{\r\n\t\t\tthis.sepCh = sep0;\r\n\t\t\tthis.sep = sep0.charCodeAt(0);\r\n\t\t}\r\n\t\tif(m == 0) o |= 1 << (sep++ * 3);\r\n\t\tif(d == 0) o |= 2 << (sep++ * 3);\r\n\t\tif(y == 0) o |= 3 << (sep++ * 3);\r\n\t\tthis.order = o;\r\n\t\tthis.mask = v;\r\n\t}\r\n\tme.setGood = function()\r\n\t{\r\n\t\tvar d = this.date;\r\n\t\tif(d == null)\r\n\t\t{\r\n\t\t\tif(this.elem.value.length > 0) d = this.toDate();\r\n\t\t\tif(d == null && !this.allowNull) d = new Date();\r\n\t\t\tthis.date = d;\r\n\t\t}\r\n\t\tthis.good = d;\r\n\t}\r\n\tme.focusText = function()\r\n\t{\r\n\t\tvar v, i = -1, t = \"\", d = this.date;\r\n\t\tif(d == null){if(this.allowNull) return t; this.date = d = new Date();}\r\n\t\twhile(++i < 3)\r\n\t\t{\r\n\t\t\tif((v = (this.order >> i * 3) & 3) == 0) break;\r\n\t\t\tif(i > 0) t += this.sepCh;\r\n\t\t\tswitch(v)\r\n\t\t\t{\r\n\t\t\t\tcase 1: v = d.getDate();\r\n\t\t\t\t\tif(v < 10 && (this.order & 1024) != 0) t += 0;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 2: v = d.getMonth() + 1;\r\n\t\t\t\t\tif(v < 10 && (this.order & 2048) != 0) t += 0;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 3: v = d.getFullYear();\r\n\t\t\t\t\tif((this.order & 4096) == 0) v %= 100;\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\tt += v;\r\n\t\t}\r\n\t\treturn t;\r\n\t}\r\n\tme.setText = function(v){this.setDate(this.toDate(v));}\r\n\tme.toDate = function(t, inv)\r\n\t{\r\n\t\tif(t == null) t = this.elem.value;\r\n\t\tvar ii = t.length;\r\n\t\tif(ii == 0 && this.allowNull) return null;\r\n\t\tvar y = -1, m = -1, d = -1, sep = 0, i = -1, f = 0;\r\n\t\twhile(++i <= ii)\r\n\t\t{\r\n\t\t\tvar ch = (i < ii) ? t.charCodeAt(i) : this.sep;\r\n\t\t\tif(ch == this.sep)\r\n\t\t\t{\r\n\t\t\t\tif(i + 1 == ii) break;\r\n\t\t\t\tswitch((this.order >> sep * 3) & 3)\r\n\t\t\t\t{\r\n\t\t\t\t\tcase 1: d = f; break;\r\n\t\t\t\t\tcase 2: m = f; break;\r\n\t\t\t\t\tcase 3: y = f; break;\r\n\t\t\t\t}\r\n\t\t\t\tsep++;\r\n\t\t\t}\r\n\t\t\tch -= 48;\r\n\t\t\tif(ch >= 0 && ch <= 9) f = f * 10 + ch;\r\n\t\t\telse f = 0;\r\n\t\t}\r\n\t\tf = null;\r\n\t\ti = 0;\r\n\t\tthis.extra.year = y; this.extra.month = m; this.extra.day = d; this.extra.reason = (ii > 0) ? 2 : 1;\r\n\t\tif(sep != 3) i++;\r\n\t\telse\r\n\t\t{\r\n\t\t\tif(d < 1 || d > 31 || m < 1 || m > 12 || y < 0 || y > 9998) i++;\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\tif(m == 2 && d > 29) i = d = 29;\r\n\t\t\t\tif(this.autoCentury){if(y < 37) y += 2000; else if(y < 100) y += 1900;}\r\n\t\t\t\tf = new Date(y, m - 1, d);\r\n\t\t\t\tif(y < 100 && f.setFullYear != null) f.setFullYear(y);\r\n\t\t\t\tif(f.getDate() != d)\r\n\t\t\t\t{\r\n\t\t\t\t\tdelete(f); f = new Date(i = y, m - 1, d - 1);\r\n\t\t\t\t\tif(y < 100 && f.setFullYear != null) f.setFullYear(y);\r\n\t\t\t\t}\r\n\t\t\t\td = f.getTime();\r\n\t\t\t\tif((m = this.max) != null) if(d > m.getTime()){delete(f); f = m; if(i++ == 0) this.extra.reason = 0;}\r\n\t\t\t\tif((m = this.min) != null) if(d < m.getTime()){delete(f); f = m; if(i++ == 0) this.extra.reason = 0;}\r\n\t\t\t}\r\n\t\t}\r\n\t\tthis.extra.date = f;\r\n\t\tif(inv && i > 0) if(this.fireEvt(11, null)) f = this.date;\r\n\t\treturn f;\r\n\t}\r\n\tme.spin = function(v)\r\n\t{\r\n\t\tvar d = this.toDate();\r\n\t\tif(d == null) d = new Date();\r\n\t\tthis.setDate(new Date(d.getFullYear(), d.getMonth(), d.getDate() + v));\r\n\t}\r\n\tme.isValid = function(){return this.toDate() != null;}\r\n\tme.repaint = function(fire)\r\n\t{\r\n\t\tvar t = null;\r\n\t\tif(!this.getReadOnly() && this.getEnabled())\r\n\t\t{\r\n\t\t\tif(this.foc) t = this.focusText();\r\n\t\t\telse if(this.changed)\r\n\t\t\t{\r\n\t\t\t\tvar d = this.toDate(null, true);\r\n\t\t\t\tif(d != null || this.allowNull) this.date = d;\r\n\t\t\t}\r\n\t\t}\r\n\t\tthis.text = (t == null) ? this.staticText() : t;\r\n\t\tthis.repaint0(fire);\r\n\t}\r\n\tme.staticText = function()\r\n\t{\r\n\t\tif(this.date == null)\r\n\t\t{\r\n\t\t\tif(this.useLastGoodValue && this.good != null && this.text.length > 0) this.date = this.good;\r\n\t\t\telse{if(this.allowNull) return this.nullText; this.date = new Date();}\r\n\t\t}\r\n\t\tvar t = this.info;\r\n\t\tif(t != null) t = this.longFormat ? t.LongDatePattern : t.ShortDatePattern;\r\n\t\telse if(this.longFormat && this.date.toLocaleDateString != null) return this.date.toLocaleDateString();\r\n\t\tif(t == null || t.length < 2) t = this.mask;\r\n\t\tvar f = \"yyyy\", v = this.date.getFullYear();\r\n\t\tif(t.indexOf(f) < 0)\r\n\t\t{\r\n\t\t\tif(t.indexOf(f = \"yy\") < 0) v = -1;\r\n\t\t\telse v %= 100;\r\n\t\t}\r\n\t\tif(v != -1) t = t.replace(f, v);\r\n\t\tf = \"MMM\";\r\n\t\tv = this.date.getMonth() + 1;\r\n\t\tvar mm = null, dd = null;\r\n\t\tif(t.indexOf(f) < 0)\r\n\t\t{\r\n\t\t\tif(t.indexOf(f = \"MM\") < 0){if(t.indexOf(f = \"M\") < 0) v = -1;}\r\n\t\t\telse if(v < 10) v = \"0\" + v;\r\n\t\t\tif(v != -1) t = t.replace(f, v);\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tif(t.indexOf(\"MMMM\") >= 0) f = \"MMMM\";\r\n\t\t\tif(this.info != null) mm = (f.length == 4) ? this.info.MonthNames : this.info.AbbreviatedMonthNames;\r\n\t\t\tif(mm != null) mm = (mm.length >= v) ? mm[v - 1] : null;\r\n\t\t\tt = t.replace(f, (mm == null) ? (\"\" + v) : \"[]\");\r\n\t\t}\r\n\t\tf = \"ddd\";\r\n\t\tv = \"\";\r\n\t\tif(t.indexOf(f) >= 0)\r\n\t\t{\r\n\t\t\tif(t.indexOf(\"dddd\") >= 0) f = \"dddd\";\r\n\t\t\tif(this.info != null) dd = (f.length == 4) ? this.info.DayNames : this.info.AbbreviatedDayNames;\r\n\t\t\tv += this.date.getDay();\r\n\t\t\tif(dd != null) dd = (dd.length >= v) ? dd[v] : null;\r\n\t\t\tt = t.replace(f, (dd == null) ? v : \"()\");\r\n\t\t}\r\n\t\tf = \"dd\";\r\n\t\tv = this.date.getDate();\r\n\t\tif(t.indexOf(f) < 0){if(t.indexOf(f = \"d\") < 0) v = -1;}\r\n\t\telse if(v < 10) v = \"0\" + v;\r\n\t\tif(v != -1) t = t.replace(f, v);\r\n\t\tif(mm != null) t = t.replace(\"[]\", mm);\r\n\t\tif(dd != null) t = t.replace(\"()\", dd);\r\n\t\treturn t;\r\n\t}\r\n\tme.getDate = function(){return this.foc ? this.toDate() : this.date;}\r\n\tme.setDate = function(v)\r\n\t{\r\n\t\tif(v == null && !this.allowNull) if((v = this.date) == null) v = new Date();\r\n\t\tif(v != null)\r\n\t\t{\r\n\t\t\tvar m, d = v.getTime();\r\n\t\t\tif((m = this.max) != null) if(d > m.getTime()) v = m;\r\n\t\t\tif((m = this.min) != null) if(d < m.getTime()) v = m;\r\n\t\t}\r\n\t\telse this.good = null;\r\n\t\tif(this.date == v) return;\r\n\t\tthis.date = v;\r\n\t\tthis.text = this.foc ? this.focusText() : this.staticText();\r\n\t\tthis.repaint0(true);\r\n\t}\r\n\t// return char that can be added or -1\r\n\tme.canAdd = function(k, t)\r\n\t{\r\n\t\tvar ii = t.length - 1;\r\n\t\tif(ii < 0) return (k == this.sep) ? -1 : k;\r\n\t\tif(t.charCodeAt(ii) == this.sep)\r\n\t\t\treturn (k == this.sep) ? -1 : k;\r\n\t\tvar f = 0, sep = 0, i = -1, n = 0;\r\n\t\twhile(++i <= ii)\r\n\t\t{\r\n\t\t\tvar ch = t.charCodeAt(i);\r\n\t\t\tif(ch == this.sep){if(sep++ > 1) return -1; n = f = 0; continue;}\r\n\t\t\tn++;\r\n\t\t\tf = f * 10 + ch - 48;\r\n\t\t}\r\n\t\tif(sep > 1 && k == this.sep) return -1;\r\n\t\ti = (this.order >> sep * 3) & 3;\r\n\t\tif(i == 1){if(n > 1 || f * 10 + k - 48 > 31) n = 4;}\r\n\t\tif(i == 2){if(n > 1 || f * 10 + k - 48 > 12) n = 4;}\r\n\t\treturn (n < 4) ? k : ((sep > 1) ? -1 : this.sep);\r\n\t}\r\n\tme.afterKey = function(k, fix)\r\n\t{\r\n\t\tvar t = this.elem.value;\r\n\t\tif(fix)\r\n\t\t{\r\n\t\t\tvar sep = 0, i = -1, f = 0, i0 = 0, ii = t.length, tt = \"\";\r\n\t\t\twhile(++i <= ii)\r\n\t\t\t{\r\n\t\t\t\tvar ch = (i < ii) ? t.charCodeAt(i) : this.sep;\r\n\t\t\t\tif(ch == this.sep)\r\n\t\t\t\t{\r\n\t\t\t\t\tswitch((this.order >> sep * 3) & 3)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tcase 1: if(f > 31){while(f > 31) f = Math.floor(f / 10);} else f = -1; break;\r\n\t\t\t\t\t\tcase 2: if(f > 12){while(f > 12) f = Math.floor(f / 10);} else f = -1; break;\r\n\t\t\t\t\t\tcase 3: if(f < 9999) f = -1; else while(f > 9999) f = Math.floor(f / 10); break;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif(f < 0) tt += t.substring(i0, i);\r\n\t\t\t\t\telse tt += f;\r\n\t\t\t\t\tif(i < ii) tt += this.sepCh;\r\n\t\t\t\t\tsep++;\r\n\t\t\t\t\ti0 = i + 1;\r\n\t\t\t\t}\r\n\t\t\t\tch -= 48;\r\n\t\t\t\tif(ch >= 0 && ch <= 9) f = f * 10 + ch;\r\n\t\t\t\telse f = 0;\r\n\t\t\t}\r\n\t\t\tt = tt;\r\n\t\t}\r\n\t\tif(this.k0 > 0) if(this.canAdd(48, t) == this.sep) t += this.sepCh;\r\n\t\tthis.elem.value = t;\r\n\t}\r\n\tme.filterKey = function(k, fix)\r\n\t{\r\n\t\tif(k != this.sep && (k < 48 || k > 57))\r\n\t\t\t// check for -_\\/space.,:;\"%\r\n\t\t\tif(this.tr != null && this.isSep(k)) k = this.sep;\r\n\t\t\telse return 0;\r\n\t\tif(fix && this.canAdd(k, this.elem.value) != k) k = 0;\r\n\t\treturn k;\r\n\t}\r\n\tme.isSep = function(k){return k == this.sep || k == 45 || k == 92 || k == 95 || k == 47 || k == 32 || k == 46 || k == 44 || k == 58 || k == 59;}\r\n\tme.paste = function(old)\r\n\t{\r\n\t\tvar ch, sep = true, v = \"\", f = 0;\r\n\t\tfor(var i = 0; i < old.length; i++)\r\n\t\t{\r\n\t\t\tch = old.charCodeAt(i);\r\n\t\t\tif(ch >= 48 && ch <= 57) sep = false;\r\n\t\t\telse{if(!this.isSep(ch)) continue; if(f > 1) break; if(sep) continue; sep = true; f++;}\r\n\t\t\tv += sep ? this.sepCh : old.charAt(i);\r\n\t\t}\r\n\t\tthis.text = \"\";\r\n\t\tthis.setText(v);\r\n\t}\r\n\tme.setLongFormat(lf);\r\n\tme.setDateInfo(di);\r\n\tme.setDate(v);\r\n\treturn me;\r\n}", "refreshColumns() {\n this.iterateDays().iterate(d => {\n let markers = [];\n for (let event of d.events) {\n if (!event.fullDay) {\n markers.push({\n time: event.time.start.time,\n event: event,\n start: true,\n parent: null\n });\n markers.push({\n time: event.time.end.time - 1,\n event: event,\n start: false,\n parent: null\n });\n }\n }\n markers.sort((a, b) => {\n return a.time - b.time;\n });\n let parent = null;\n for (let marker of markers) {\n if (marker.start) {\n marker.parent = parent;\n parent = marker;\n }\n else if (parent) {\n parent = parent.parent;\n }\n }\n for (let marker of markers) {\n if (marker.start) {\n marker.event.col = marker.parent ? marker.parent.event.col + 1 : 0;\n }\n }\n });\n return this;\n }", "function rangeOffsetDemo () {\n var rng = \n SpreadsheetApp.getActiveSheet()\n .getRange('C10');\n rng.setBackground('red');\n rng.setValue('Method offset()');\n rng.offset(-1,-1)\n .setNote('Offset -1, -1 from cell '\n + rng.getA1Notation());\n rng.offset(-1,0)\n .setNote('Offset -1, 0 from cell '\n + rng.getA1Notation());\n rng.offset(-1,1)\n .setNote('Offset -1, 1 from cell '\n + rng.getA1Notation());\n rng.offset(0,1)\n .setNote('Offset 0, 1 from cell '\n + rng.getA1Notation());\n rng.offset(1,0)\n .setNote('Offset 1, 0 from cell '\n + rng.getA1Notation());\n rng.offset(0,1)\n .setNote('Offset 0, 1 from cell '\n + rng.getA1Notation());\n rng.offset(1,1)\n .setNote('Offset 1, 1 from cell '\n + rng.getA1Notation());\n rng.offset(0,-1)\n .setNote('Offset 0, -1 from cell '\n + rng.getA1Notation());\n rng.offset(1,-1)\n .setNote('Offset -1, -1 from cell '\n + rng.getA1Notation());\n}", "function dataTransform(nestedData) {\n function fillMonths(values, key) {\n var result = [];\n for (var i = 1; i <= 12; i++) {\n var month = values.find(function(d) { return d.month === i; });\n if (!month) {\n month = {\n \"year\": parseInt(key),\n \"month\": i,\n \"variance\": 0,\n \"dateYear\": new Date(key, 0),\n \"monthName\": getMonthName(i)\n };\n }\n month.temperature = baseTemperature + month.variance;\n result.push(month);\n }\n return result.sort(function(a, b) { return a.month - b.month });\n }\n\n return nestedData.map(function(data) {\n return {\n \"key\": data.key,\n \"values\": fillMonths(data.values, data.key)\n };\n });\n }", "_alignCell(cell, dimensions, number, offset = 0, lineWeight = 1) {\n\t\t\td3.select(cell)\n\t\t\t\t// + number: Space 1 px between cells\n\t\t\t\t.attr('transform', `translate(${ offset + number * dimensions + number * lineWeight },0)`);\n\t\t}", "function getPointFromCell(cell) {\n\n fieldname = cell.getColumn().getField(); \n aPoint = cell.getRow ().getData();\n aPoints = lens.pointsTableHandler.convertRowData([ aPoint ]); // apply filters \n aPoint = aPoints[0];\n\n\n /* need to update the infomration */\n console.log(`Edited field \"${fieldname}\" directly.`); \n\n /* field information */\n \n switch (fieldname) {\n case \"zo\": case \"ho\": case \"to\": \n return { id: aPoint.id, which: \"object\", z: Number(aPoint.zo), h: Number(aPoint.ho), t: Number(aPoint.to)};\n\n case \"zi\": case \"hi\": case \"ti\":\n return { id: aPoint.id, which: \"image\", z: Number(aPoint.zi), h: Number(aPoint.hi), t: Number(aPoint.ti) };\n\n case \"beamwidth\":\n return { id: aPoint.id, beamwidth: Number(aPoint.beamwidth) };\n\n /* add in additional processing required for information */\n\n case \"l\": \n\n var cardinals = renderableLens.total.cardinal;\n return { id: aPoint.id, which: \"object\", z: Number(aPoint.l + cardinals.VP1), h: Number(aPoint.ho), t: Number(aPoint.to) };\n\n case \"ld\": \n var cardinals = renderableLens.total.cardinal;\n return { id: aPoint.id, which: \"image\", z: Number(aPoint.ld + cardinals.VP2), h: Number(aPoint.hi), t: Number(aPoint.ti) };\n\n\n\n default:\n throw \"Editing for ${fieldname} was not handled.\";\n }\n }", "function computeEventForDateSpan(dateSpan, dragMeta, calendar) {\n var defProps = __assign({}, dragMeta.leftoverProps);\n for (var _i = 0, _a = calendar.pluginSystem.hooks.externalDefTransforms; _i < _a.length; _i++) {\n var transform = _a[_i];\n __assign(defProps, transform(dateSpan, dragMeta));\n }\n var def = Object(_fullcalendar_core__WEBPACK_IMPORTED_MODULE_0__[\"parseEventDef\"])(defProps, dragMeta.sourceId, dateSpan.allDay, calendar.opt('forceEventDuration') || Boolean(dragMeta.duration), // hasEnd\n calendar);\n var start = dateSpan.range.start;\n // only rely on time info if drop zone is all-day,\n // otherwise, we already know the time\n if (dateSpan.allDay && dragMeta.startTime) {\n start = calendar.dateEnv.add(start, dragMeta.startTime);\n }\n var end = dragMeta.duration ?\n calendar.dateEnv.add(start, dragMeta.duration) :\n calendar.getDefaultEventEnd(dateSpan.allDay, start);\n var instance = Object(_fullcalendar_core__WEBPACK_IMPORTED_MODULE_0__[\"createEventInstance\"])(def.defId, { start: start, end: end });\n return { def: def, instance: instance };\n}", "function MapDataByColumnMap(e) {\n // get current sheet\n var ss = SpreadsheetApp.getActiveSpreadsheet();\n var sheet = ss.getSheets()[0];\n\n // Json object that we will send as body\n var payload = {};\n\n //set entity of the item to be title of the sheet\n payload._type = configuration._type.toLowerCase();\n\n // gets entity properties (title,description,date...)\n var properties = Object.keys(configuration.columnMap);\n\n // loops through properties to get value for each from corresponding cell\n for (var i = 0; i < properties.length; i++) {\n var property = properties[i].toLowerCase();\n // reads column name(A,B,C...) from column map, gets number of the row that was last edited\n // and reads cell value\n var cell = sheet.getRange(configuration.columnMap[properties[i]] + e.range.rowStart);\n\n // if cell value is empty we do not generate entity\n // if done is empty we ignore it, (done == (null || \"\")) => entity == open\n if (cell.getValue() == \"\" && property != \"done\") return null;\n\n // if it's date convert it to Json ISO date format\n if (property == \"date\") {\n var timestamp = Date.parse(cell.getValue());\n\n // if it is not valid date we return\n if (isNaN(timestamp)) return null;\n\n // if it is valid we convert it to json iso string\n payload[property] = new Date(timestamp).toISOString();\n } else {\n // assign values to the entity\n payload[property] = cell.getValue();\n }\n }\n\n return payload;\n}", "render(){\r\n\r\n\t//If the day of the week falls on the first day of the month, create a Date\r\n // object, otherwise create an empty table data object\r\n var tableRow = [];\r\n var tableRows = [];\r\n var counter = 0;\r\n\r\n //Work out if its the current month, and if so provide today's date\r\n var isThisMonth = false;\r\n var dateFunc = getDateProps();\r\n\r\n if(this.props.year === dateFunc.year && this.props.month === dateFunc.month){\r\n isThisMonth = true\r\n var todaysDate = dateFunc.todaysDate\r\n }\r\n \r\n for(let i = 1; i < 44; i++) {\r\n if(tableRow.length > 6) { //Assign all dates to a row\r\n tableRows.push(<tr key={i}>{tableRow}</tr>);\r\n tableRow = [];\r\n };\r\n if(i === this.props.start) { //Check if the correct first day of the week\r\n counter++ //then activate the counter for the loop below\r\n }\r\n\r\n if(counter >= 1 && counter <= this.props.end) { //Populate with this month's dates\r\n \r\n\t\t\tlet date = new Date(this.props.year + \"-\" + this.props.month + \"-\" + counter)\r\n\t\t\tlet dayEvents = []\r\n\t\t\tlet dayToday;\r\n\t\t\tif(isThisMonth) {\r\n\t\t\t\tif(counter === todaysDate) {\r\n\t\t\t\t\tdayToday = true;\r\n\t\t\t\t} else {\r\n\t\t\t\tdayToday = false;\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\tdayToday = false\r\n\t\t\t}\r\n\t\t\ttableRow.push(<DateObj\r\n\t\t\t key={i} \r\n\t\t\t date={date} \r\n\t\t\t day={counter}\r\n\t\t\t dayToday={dayToday}\r\n\t\t\t dayEvents={dayEvents}/>);\r\n\r\n counter++;\r\n } else if(counter > this.props.end) { //Start again, with the dates for the next month\r\n tableRow.push(<td key={i}></td>)\r\n counter ++;\r\n } else { //For dates that exist in the previous month.\r\n tableRow.push(<td key={i}></td>)\r\n };\r\n };\r\n \r\n\treturn (\r\n <div id=\"calender\" className=\"container-fluid\">\r\n <table className=\"table\" id=\"calender\">\r\n <thead>\r\n <tr id=\"daysOfWeek\">\r\n <th>M</th>\r\n <th>T</th>\r\n <th>W</th>\r\n <th>T</th>\r\n <th>F</th>\r\n <th>S</th>\r\n <th>S</th>\r\n </tr>\r\n </thead>\r\n <tbody>\r\n {tableRows}\r\n </tbody>\r\n </table>\r\n </div>\r\n )\r\n }", "function updateDates(this_sheet_name){\n var ss = SpreadsheetApp.getActiveSpreadsheet();\n var sheet = ss.getSheetByName(this_sheet_name);\n var a1notation = [\"H1\",\"G1\",\"F1\",\"E1\",\"D1\",\"C1\",\"B1\"];\n var range;\n for (var i=0; i<7; i++){\n range = sheet.getRange(a1notation[i]);\n range.setFormula(\"=TODAY()+7-WEEKDAY(TODAY(),1)+\"+String(6-i+1)); //fixes Sunday problem??? Sundays were landing on wrong day of week\n //range.setFormula(\"=DATE(YEAR(TODAY()),1,1)+((WEEKNUM(TODAY()))*7)+7-WEEKDAY(DATE(YEAR(TODAY()),1,\"+String(i+1)+\"),1)\"); //use equation to get date\n range.setValue(range.getDisplayValue()); //set it to the display value\n }\n}", "static _extractDateParts(date){return{day:date.getDate(),month:date.getMonth(),year:date.getFullYear()}}", "function defaultTransform_(data, row, column, options) {\r\n if (!data[row][column]) {\r\n if (row < 2 || hasOption_(options, \"noInherit\")) {\r\n data[row][column] = \"\";\r\n } else {\r\n data[row][column] = data[row-1][column];\r\n }\r\n }\r\n\r\n if (!hasOption_(options, \"rawHeaders\") && row == 0) {\r\n if (column == 0 && data[row].length > 1) {\r\n removeCommonPrefixes_(data, row);\r\n }\r\n\r\n data[row][column] = toTitleCase_(data[row][column].toString().replace(/[\\/\\_]/g, \" \"));\r\n }\r\n\r\n if (!hasOption_(options, \"noTruncate\") && data[row][column]) {\r\n data[row][column] = data[row][column].toString().substr(0, 256);\r\n }\r\n\r\n if (hasOption_(options, \"debugLocation\")) {\r\n data[row][column] = \"[\" + row + \",\" + column + \"]\" + data[row][column];\r\n }\r\n}", "function fillDays() {\n var i;\n var calendarDays = document\n .getElementById(\"calendarTable\")\n .getElementsByTagName(\"tbody\")[0]\n .getElementsByClassName(\"day\");\n\n //get month -current month is April -so this got 3\n month = date.getMonth();\n console.log(month);\n //get year -current year is 2019\n year = date.getFullYear();\n console.log(year);\n var daysOffset = new Date(year, month, 1).getDay();\n console.log(daysOffset);\n var numberOfDays = new Date(year, month + 1, 0).getDate(); //0 for day gives last day of the PREVIOUS month\n console.log(numberOfDays);\n\n //clear cells\n for (i = 0; i < calendarDays.length; i++) {\n calendarDays[i].innerHTML = \"&nbsp\";\n }\n\n //populate cells with dates, 1-31\n for (i = 1; i <= numberOfDays; i++) {\n calendarDays[daysOffset].innerHTML = i;\n daysOffset++;\n }\n}", "function flatten_cell(cell, column) {\n //Start off with an empty return value object for our flattened cell.\n const rval = {};\n //Remember the column our cell came from.\n rval.column = column;\n //Itterate all the keys in the original cell\n const keys = Object.keys(cell);\n for (let ki = 0; ki < keys.length; ki += 1) {\n const key = keys[ki];\n //We ignore the \"x\" and \"y\" keys.\n if (key !== \"x\" && key !== \"y\" && key !== \"w\" && key !== \"h\" && key !== \"sw\") {\n //The \"R\" key designates a nested object.\n if (key === \"R\") {\n if (cell[key].length !== 1) {\n //If the R holds more than one object, we don't have\n //the right logic to flatten the cell!\n throw Error(\"Unexpected length for R array\");\n }\n //Itterate all the keys in the R nested object.\n const keys2 = Object.keys(cell[key][0]);\n for (let ki2 = 0; ki2 < keys2.length; ki2 += 1) {\n const key2 = keys2[ki2];\n //The R::TS key designates an array that we want to\n //convert to seperate attributes.\n if (key2 === \"TS\") {\n if (cell.R[0][key2].length !== 4) {\n throw Error(\"Unexpected length for TS\");\n }\n rval.f_fc = cell.R[0][key2][0];\n rval.f_sz = cell.R[0][key2][1];\n rval.f_bd = cell.R[0][key2][2];\n rval.f_it = cell.R[0][key2][3];\n } else {\n //A \"T\" attributes required URL-decoding.\n if (key2 === \"T\") {\n rval[key2] = decodeURIComponent(cell.R[0][key2]);\n } else {\n rval[key2] = cell.R[0][key2];\n }\n }\n }\n } else {\n rval[key] = cell[key];\n }\n }\n }\n return rval;\n }", "function computeEventForDateSpan(dateSpan, dragMeta, context) {\n var defProps = __assign({}, dragMeta.leftoverProps);\n for (var _i = 0, _a = context.pluginHooks.externalDefTransforms; _i < _a.length; _i++) {\n var transform = _a[_i];\n __assign(defProps, transform(dateSpan, dragMeta));\n }\n var _b = refineEventDef(defProps, context), refined = _b.refined, extra = _b.extra;\n var def = parseEventDef(refined, extra, dragMeta.sourceId, dateSpan.allDay, context.options.forceEventDuration || Boolean(dragMeta.duration), // hasEnd\n context);\n var start = dateSpan.range.start;\n // only rely on time info if drop zone is all-day,\n // otherwise, we already know the time\n if (dateSpan.allDay && dragMeta.startTime) {\n start = context.dateEnv.add(start, dragMeta.startTime);\n }\n var end = dragMeta.duration ?\n context.dateEnv.add(start, dragMeta.duration) :\n getDefaultEventEnd(dateSpan.allDay, start, context);\n var instance = createEventInstance(def.defId, { start: start, end: end });\n return { def: def, instance: instance };\n }", "function cloneWithOffset(input, date, config) {\n if (config === void 0) { config = {}; }\n if (!config._isUTC) {\n return input;\n }\n var res = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_6__create_clone__[\"a\" /* cloneDate */])(date);\n // todo: input._d - res._d + ((res._offset || 0) - (input._offset || 0))*60000\n var offsetDiff = (config._offset || 0) * 60000;\n var diff = input.valueOf() - res.valueOf() + offsetDiff;\n // Use low-level api, because this fn is low-level api.\n res.setTime(res.valueOf() + diff);\n // todo: add timezone handling\n // hooks.updateOffset(res, false);\n return res;\n}", "function cloneWithOffset(input, date, config) {\n if (config === void 0) { config = {}; }\n if (!config._isUTC) {\n return input;\n }\n var res = Object(__WEBPACK_IMPORTED_MODULE_6__create_clone__[\"a\" /* cloneDate */])(date);\n // todo: input._d - res._d + ((res._offset || 0) - (input._offset || 0))*60000\n var offsetDiff = (config._offset || 0) * 60000;\n var diff = input.valueOf() - res.valueOf() + offsetDiff;\n // Use low-level api, because this fn is low-level api.\n res.setTime(res.valueOf() + diff);\n // todo: add timezone handling\n // hooks.updateOffset(res, false);\n return res;\n}", "toInput(plain = false, plainData = d => d, plainMeta = m => m) {\n let out = {};\n out.type = this.type;\n out.size = this.size;\n out.fill = this.fill;\n out.minimumSize = this.minimumSize;\n out.repeatCovers = this.repeatCovers;\n out.listTimes = this.listTimes;\n out.eventsOutside = this.eventsOutside;\n out.updateRows = this.updateRows;\n out.updateColumns = this.updateColumns;\n out.around = plain ? this.span.start.time : this.span.start;\n out.events = [];\n for (let event of this.events) {\n if (plain) {\n let plainEvent = {};\n if (fn.isDefined(event.id)) {\n plainEvent.id = event.id;\n }\n if (fn.isDefined(event.data)) {\n plainEvent.data = plainData(event.data);\n }\n if (!event.visible) {\n plainEvent.visible = event.visible;\n }\n plainEvent.schedule = event.schedule.toInput();\n let meta = plainEvent.schedule.meta;\n if (meta) {\n for (let identifier in meta) {\n meta[identifier] = plainMeta(meta[identifier]);\n }\n }\n out.events.push(plainEvent);\n }\n else {\n out.events.push(event);\n }\n }\n return out;\n }", "function parse_CellStyleXF(blob, length, style, opts) {\n\tvar o = {};\n\tvar a = blob.read_shift(4), b = blob.read_shift(4);\n\tvar c = blob.read_shift(4), d = blob.read_shift(2);\n\to.patternType = XLSFillPattern[c >> 26];\n\n\tif(!opts.cellStyles) return o;\n\to.alc = a & 0x07;\n\to.fWrap = (a >> 3) & 0x01;\n\to.alcV = (a >> 4) & 0x07;\n\to.fJustLast = (a >> 7) & 0x01;\n\to.trot = (a >> 8) & 0xFF;\n\to.cIndent = (a >> 16) & 0x0F;\n\to.fShrinkToFit = (a >> 20) & 0x01;\n\to.iReadOrder = (a >> 22) & 0x02;\n\to.fAtrNum = (a >> 26) & 0x01;\n\to.fAtrFnt = (a >> 27) & 0x01;\n\to.fAtrAlc = (a >> 28) & 0x01;\n\to.fAtrBdr = (a >> 29) & 0x01;\n\to.fAtrPat = (a >> 30) & 0x01;\n\to.fAtrProt = (a >> 31) & 0x01;\n\n\to.dgLeft = b & 0x0F;\n\to.dgRight = (b >> 4) & 0x0F;\n\to.dgTop = (b >> 8) & 0x0F;\n\to.dgBottom = (b >> 12) & 0x0F;\n\to.icvLeft = (b >> 16) & 0x7F;\n\to.icvRight = (b >> 23) & 0x7F;\n\to.grbitDiag = (b >> 30) & 0x03;\n\n\to.icvTop = c & 0x7F;\n\to.icvBottom = (c >> 7) & 0x7F;\n\to.icvDiag = (c >> 14) & 0x7F;\n\to.dgDiag = (c >> 21) & 0x0F;\n\n\to.icvFore = d & 0x7F;\n\to.icvBack = (d >> 7) & 0x7F;\n\to.fsxButton = (d >> 14) & 0x01;\n\treturn o;\n}", "function parse_CellStyleXF(blob, length, style, opts) {\n\tvar o = {};\n\tvar a = blob.read_shift(4), b = blob.read_shift(4);\n\tvar c = blob.read_shift(4), d = blob.read_shift(2);\n\to.patternType = XLSFillPattern[c >> 26];\n\n\tif(!opts.cellStyles) return o;\n\to.alc = a & 0x07;\n\to.fWrap = (a >> 3) & 0x01;\n\to.alcV = (a >> 4) & 0x07;\n\to.fJustLast = (a >> 7) & 0x01;\n\to.trot = (a >> 8) & 0xFF;\n\to.cIndent = (a >> 16) & 0x0F;\n\to.fShrinkToFit = (a >> 20) & 0x01;\n\to.iReadOrder = (a >> 22) & 0x02;\n\to.fAtrNum = (a >> 26) & 0x01;\n\to.fAtrFnt = (a >> 27) & 0x01;\n\to.fAtrAlc = (a >> 28) & 0x01;\n\to.fAtrBdr = (a >> 29) & 0x01;\n\to.fAtrPat = (a >> 30) & 0x01;\n\to.fAtrProt = (a >> 31) & 0x01;\n\n\to.dgLeft = b & 0x0F;\n\to.dgRight = (b >> 4) & 0x0F;\n\to.dgTop = (b >> 8) & 0x0F;\n\to.dgBottom = (b >> 12) & 0x0F;\n\to.icvLeft = (b >> 16) & 0x7F;\n\to.icvRight = (b >> 23) & 0x7F;\n\to.grbitDiag = (b >> 30) & 0x03;\n\n\to.icvTop = c & 0x7F;\n\to.icvBottom = (c >> 7) & 0x7F;\n\to.icvDiag = (c >> 14) & 0x7F;\n\to.dgDiag = (c >> 21) & 0x0F;\n\n\to.icvFore = d & 0x7F;\n\to.icvBack = (d >> 7) & 0x7F;\n\to.fsxButton = (d >> 14) & 0x01;\n\treturn o;\n}", "function parse_CellStyleXF(blob, length, style, opts) {\n\tvar o = {};\n\tvar a = blob.read_shift(4), b = blob.read_shift(4);\n\tvar c = blob.read_shift(4), d = blob.read_shift(2);\n\to.patternType = XLSFillPattern[c >> 26];\n\n\tif(!opts.cellStyles) return o;\n\to.alc = a & 0x07;\n\to.fWrap = (a >> 3) & 0x01;\n\to.alcV = (a >> 4) & 0x07;\n\to.fJustLast = (a >> 7) & 0x01;\n\to.trot = (a >> 8) & 0xFF;\n\to.cIndent = (a >> 16) & 0x0F;\n\to.fShrinkToFit = (a >> 20) & 0x01;\n\to.iReadOrder = (a >> 22) & 0x02;\n\to.fAtrNum = (a >> 26) & 0x01;\n\to.fAtrFnt = (a >> 27) & 0x01;\n\to.fAtrAlc = (a >> 28) & 0x01;\n\to.fAtrBdr = (a >> 29) & 0x01;\n\to.fAtrPat = (a >> 30) & 0x01;\n\to.fAtrProt = (a >> 31) & 0x01;\n\n\to.dgLeft = b & 0x0F;\n\to.dgRight = (b >> 4) & 0x0F;\n\to.dgTop = (b >> 8) & 0x0F;\n\to.dgBottom = (b >> 12) & 0x0F;\n\to.icvLeft = (b >> 16) & 0x7F;\n\to.icvRight = (b >> 23) & 0x7F;\n\to.grbitDiag = (b >> 30) & 0x03;\n\n\to.icvTop = c & 0x7F;\n\to.icvBottom = (c >> 7) & 0x7F;\n\to.icvDiag = (c >> 14) & 0x7F;\n\to.dgDiag = (c >> 21) & 0x0F;\n\n\to.icvFore = d & 0x7F;\n\to.icvBack = (d >> 7) & 0x7F;\n\to.fsxButton = (d >> 14) & 0x01;\n\treturn o;\n}", "function parse_CellStyleXF(blob, length, style, opts) {\n\tvar o = {};\n\tvar a = blob.read_shift(4), b = blob.read_shift(4);\n\tvar c = blob.read_shift(4), d = blob.read_shift(2);\n\to.patternType = XLSFillPattern[c >> 26];\n\n\tif(!opts.cellStyles) return o;\n\to.alc = a & 0x07;\n\to.fWrap = (a >> 3) & 0x01;\n\to.alcV = (a >> 4) & 0x07;\n\to.fJustLast = (a >> 7) & 0x01;\n\to.trot = (a >> 8) & 0xFF;\n\to.cIndent = (a >> 16) & 0x0F;\n\to.fShrinkToFit = (a >> 20) & 0x01;\n\to.iReadOrder = (a >> 22) & 0x02;\n\to.fAtrNum = (a >> 26) & 0x01;\n\to.fAtrFnt = (a >> 27) & 0x01;\n\to.fAtrAlc = (a >> 28) & 0x01;\n\to.fAtrBdr = (a >> 29) & 0x01;\n\to.fAtrPat = (a >> 30) & 0x01;\n\to.fAtrProt = (a >> 31) & 0x01;\n\n\to.dgLeft = b & 0x0F;\n\to.dgRight = (b >> 4) & 0x0F;\n\to.dgTop = (b >> 8) & 0x0F;\n\to.dgBottom = (b >> 12) & 0x0F;\n\to.icvLeft = (b >> 16) & 0x7F;\n\to.icvRight = (b >> 23) & 0x7F;\n\to.grbitDiag = (b >> 30) & 0x03;\n\n\to.icvTop = c & 0x7F;\n\to.icvBottom = (c >> 7) & 0x7F;\n\to.icvDiag = (c >> 14) & 0x7F;\n\to.dgDiag = (c >> 21) & 0x0F;\n\n\to.icvFore = d & 0x7F;\n\to.icvBack = (d >> 7) & 0x7F;\n\to.fsxButton = (d >> 14) & 0x01;\n\treturn o;\n}", "function parse_CellStyleXF(blob, length, style, opts) {\n\tvar o = {};\n\tvar a = blob.read_shift(4), b = blob.read_shift(4);\n\tvar c = blob.read_shift(4), d = blob.read_shift(2);\n\to.patternType = XLSFillPattern[c >> 26];\n\n\tif(!opts.cellStyles) return o;\n\to.alc = a & 0x07;\n\to.fWrap = (a >> 3) & 0x01;\n\to.alcV = (a >> 4) & 0x07;\n\to.fJustLast = (a >> 7) & 0x01;\n\to.trot = (a >> 8) & 0xFF;\n\to.cIndent = (a >> 16) & 0x0F;\n\to.fShrinkToFit = (a >> 20) & 0x01;\n\to.iReadOrder = (a >> 22) & 0x02;\n\to.fAtrNum = (a >> 26) & 0x01;\n\to.fAtrFnt = (a >> 27) & 0x01;\n\to.fAtrAlc = (a >> 28) & 0x01;\n\to.fAtrBdr = (a >> 29) & 0x01;\n\to.fAtrPat = (a >> 30) & 0x01;\n\to.fAtrProt = (a >> 31) & 0x01;\n\n\to.dgLeft = b & 0x0F;\n\to.dgRight = (b >> 4) & 0x0F;\n\to.dgTop = (b >> 8) & 0x0F;\n\to.dgBottom = (b >> 12) & 0x0F;\n\to.icvLeft = (b >> 16) & 0x7F;\n\to.icvRight = (b >> 23) & 0x7F;\n\to.grbitDiag = (b >> 30) & 0x03;\n\n\to.icvTop = c & 0x7F;\n\to.icvBottom = (c >> 7) & 0x7F;\n\to.icvDiag = (c >> 14) & 0x7F;\n\to.dgDiag = (c >> 21) & 0x0F;\n\n\to.icvFore = d & 0x7F;\n\to.icvBack = (d >> 7) & 0x7F;\n\to.fsxButton = (d >> 14) & 0x01;\n\treturn o;\n}", "function parse_CellStyleXF(blob, length, style, opts) {\n\tvar o = {};\n\tvar a = blob.read_shift(4), b = blob.read_shift(4);\n\tvar c = blob.read_shift(4), d = blob.read_shift(2);\n\to.patternType = XLSFillPattern[c >> 26];\n\n\tif(!opts.cellStyles) return o;\n\to.alc = a & 0x07;\n\to.fWrap = (a >> 3) & 0x01;\n\to.alcV = (a >> 4) & 0x07;\n\to.fJustLast = (a >> 7) & 0x01;\n\to.trot = (a >> 8) & 0xFF;\n\to.cIndent = (a >> 16) & 0x0F;\n\to.fShrinkToFit = (a >> 20) & 0x01;\n\to.iReadOrder = (a >> 22) & 0x02;\n\to.fAtrNum = (a >> 26) & 0x01;\n\to.fAtrFnt = (a >> 27) & 0x01;\n\to.fAtrAlc = (a >> 28) & 0x01;\n\to.fAtrBdr = (a >> 29) & 0x01;\n\to.fAtrPat = (a >> 30) & 0x01;\n\to.fAtrProt = (a >> 31) & 0x01;\n\n\to.dgLeft = b & 0x0F;\n\to.dgRight = (b >> 4) & 0x0F;\n\to.dgTop = (b >> 8) & 0x0F;\n\to.dgBottom = (b >> 12) & 0x0F;\n\to.icvLeft = (b >> 16) & 0x7F;\n\to.icvRight = (b >> 23) & 0x7F;\n\to.grbitDiag = (b >> 30) & 0x03;\n\n\to.icvTop = c & 0x7F;\n\to.icvBottom = (c >> 7) & 0x7F;\n\to.icvDiag = (c >> 14) & 0x7F;\n\to.dgDiag = (c >> 21) & 0x0F;\n\n\to.icvFore = d & 0x7F;\n\to.icvBack = (d >> 7) & 0x7F;\n\to.fsxButton = (d >> 14) & 0x01;\n\treturn o;\n}", "function parse_CellStyleXF(blob, length, style, opts) {\n\tvar o = {};\n\tvar a = blob.read_shift(4), b = blob.read_shift(4);\n\tvar c = blob.read_shift(4), d = blob.read_shift(2);\n\to.patternType = XLSFillPattern[c >> 26];\n\n\tif(!opts.cellStyles) return o;\n\to.alc = a & 0x07;\n\to.fWrap = (a >> 3) & 0x01;\n\to.alcV = (a >> 4) & 0x07;\n\to.fJustLast = (a >> 7) & 0x01;\n\to.trot = (a >> 8) & 0xFF;\n\to.cIndent = (a >> 16) & 0x0F;\n\to.fShrinkToFit = (a >> 20) & 0x01;\n\to.iReadOrder = (a >> 22) & 0x02;\n\to.fAtrNum = (a >> 26) & 0x01;\n\to.fAtrFnt = (a >> 27) & 0x01;\n\to.fAtrAlc = (a >> 28) & 0x01;\n\to.fAtrBdr = (a >> 29) & 0x01;\n\to.fAtrPat = (a >> 30) & 0x01;\n\to.fAtrProt = (a >> 31) & 0x01;\n\n\to.dgLeft = b & 0x0F;\n\to.dgRight = (b >> 4) & 0x0F;\n\to.dgTop = (b >> 8) & 0x0F;\n\to.dgBottom = (b >> 12) & 0x0F;\n\to.icvLeft = (b >> 16) & 0x7F;\n\to.icvRight = (b >> 23) & 0x7F;\n\to.grbitDiag = (b >> 30) & 0x03;\n\n\to.icvTop = c & 0x7F;\n\to.icvBottom = (c >> 7) & 0x7F;\n\to.icvDiag = (c >> 14) & 0x7F;\n\to.dgDiag = (c >> 21) & 0x0F;\n\n\to.icvFore = d & 0x7F;\n\to.icvBack = (d >> 7) & 0x7F;\n\to.fsxButton = (d >> 14) & 0x01;\n\treturn o;\n}", "function parse_CellStyleXF(blob, length, style, opts) {\n\tvar o = {};\n\tvar a = blob.read_shift(4), b = blob.read_shift(4);\n\tvar c = blob.read_shift(4), d = blob.read_shift(2);\n\to.patternType = XLSFillPattern[c >> 26];\n\n\tif(!opts.cellStyles) return o;\n\to.alc = a & 0x07;\n\to.fWrap = (a >> 3) & 0x01;\n\to.alcV = (a >> 4) & 0x07;\n\to.fJustLast = (a >> 7) & 0x01;\n\to.trot = (a >> 8) & 0xFF;\n\to.cIndent = (a >> 16) & 0x0F;\n\to.fShrinkToFit = (a >> 20) & 0x01;\n\to.iReadOrder = (a >> 22) & 0x02;\n\to.fAtrNum = (a >> 26) & 0x01;\n\to.fAtrFnt = (a >> 27) & 0x01;\n\to.fAtrAlc = (a >> 28) & 0x01;\n\to.fAtrBdr = (a >> 29) & 0x01;\n\to.fAtrPat = (a >> 30) & 0x01;\n\to.fAtrProt = (a >> 31) & 0x01;\n\n\to.dgLeft = b & 0x0F;\n\to.dgRight = (b >> 4) & 0x0F;\n\to.dgTop = (b >> 8) & 0x0F;\n\to.dgBottom = (b >> 12) & 0x0F;\n\to.icvLeft = (b >> 16) & 0x7F;\n\to.icvRight = (b >> 23) & 0x7F;\n\to.grbitDiag = (b >> 30) & 0x03;\n\n\to.icvTop = c & 0x7F;\n\to.icvBottom = (c >> 7) & 0x7F;\n\to.icvDiag = (c >> 14) & 0x7F;\n\to.dgDiag = (c >> 21) & 0x0F;\n\n\to.icvFore = d & 0x7F;\n\to.icvBack = (d >> 7) & 0x7F;\n\to.fsxButton = (d >> 14) & 0x01;\n\treturn o;\n}", "function rangeOffsetDemo() {\n var rng = SpreadsheetApp.getActiveSheet()\n .getRange('C10');\n rng.setBackground('red');\n rng.setValue('Method offset()');\n rng.offset(-1, -1)\n .setComment('Offset -1, -1 from cell ' + rng.getA1Notation());\n rng.offset(-1, 0)\n .setComment('Offset -1, 0 from cell ' + rng.getA1Notation());\n rng.offset(-1, 1)\n .setComment('Offset -1, 1 from cell ' + rng.getA1Notation());\n rng.offset(0, 1)\n .setComment('Offset 0, 1 from cell ' + rng.getA1Notation());\n rng.offset(1, 0)\n .setComment('Offset 1, 0 from cell ' + rng.getA1Notation());\n rng.offset(0, 1)\n .setComment('Offset 0, 1 from cell ' + rng.getA1Notation());\n rng.offset(1, 1)\n .setComment('Offset 1, 1 from cell ' + rng.getA1Notation());\n rng.offset(0, -1)\n .setComment('Offset 0, -1 from cell ' + rng.getA1Notation());\n rng.offset(1, -1)\n .setComment('Offset -1, -1 from cell ' + rng.getA1Notation());\n}", "function sheet_from_array_of_arrays(data, opts) {\n var ws = {};\n var range = {\n s: {\n c: 10000000,\n r: 10000000\n },\n e: {\n c: 0,\n r: 0\n }\n };\n for (var R = 0; R != data.length; ++R) {\n for (var C = 0; C != data[R].length; ++C) {\n if (range.s.r > R) range.s.r = R;\n if (range.s.c > C) range.s.c = C;\n if (range.e.r < R) range.e.r = R;\n if (range.e.c < C) range.e.c = C;\n var cellData = data[R][C];\n var cell;\n var cell_ref = XLSX.utils.encode_cell({\n c: C,\n r: R\n });\n if (_.str.startsWith(cellData, \"=\")) {\n //TODO: update xlsx lib when updated with this feature:\n //now formula only works since I edited the current module code (node_modules/xlsx/xlsx.js) andd added this feature:\n // https://github.com/christocracy/js-xlsx/commit/45f9e0198c10086f03dac000c09f24fe18bbd5d8\n //details: https://github.com/SheetJS/js-xlsx/pull/103\n cell = {\n //f: _.str.strRight(cellData, '='),\n f: cellData,\n t: 'n'\n };\n } else {\n cell = {\n v: cellData\n };\n if (cell.v === null) continue;\n\n\n if (typeof cell.v === 'number') cell.t = 'n';\n else if (typeof cell.v === 'boolean') cell.t = 'b';\n else if (cell.v instanceof Date) {\n cell.t = 'n';\n cell.z = XLSX.SSF._table[14];\n cell.v = datenum(cell.v);\n } else cell.t = 's';\n }\n\n ws[cell_ref] = cell;\n }\n }\n if (range.s.c < 10000000) ws['!ref'] = XLSX.utils.encode_range(range);\n return ws;\n}", "_handleCalendarCellHover(event, cell) {\n const that = this;\n\n if (that._animationStarted) {\n return;\n }\n\n if (that.displayMode === 'month') {\n if (event.type === 'mouseover' && that.selectionMode === 'many' && that.selectedDates.length > 0) {\n const months = that.$.monthsContainer.children;\n\n for (let m = 0; m < months.length; m++) {\n that._getMonthCells(months[m]).map(cell => {\n that._setCellState(cell, 'hover', false);\n });\n }\n\n let firstSelectedDate = new Date(that.selectedDates[0]),\n targetDate = new Date(cell.value),\n targetCell = cell;\n const nextCoeff = firstSelectedDate.getTime() > targetDate.getTime() ? -1 : 1,\n hoverCell = function () {\n targetCell = that._getCellByDate(firstSelectedDate, that.$.monthsContainer);\n\n if (targetCell && !targetCell.selected && !targetCell.restricted) {\n that._setCellState(targetCell, 'hover', true);\n }\n };\n\n if (firstSelectedDate.getTime() !== targetDate.getTime()) {\n firstSelectedDate.setDate(firstSelectedDate.getDate() + nextCoeff);\n while (firstSelectedDate.getTime() !== targetDate.getTime()) {\n hoverCell();\n firstSelectedDate.setDate(firstSelectedDate.getDate() + nextCoeff);\n }\n\n hoverCell();\n }\n }\n else {\n that._setCellState(cell, 'hover', false);\n }\n }\n\n if (event.type === 'mouseover' && !cell.otherMonth) {\n that._setCellState(cell, 'hover', true);\n }\n else {\n that._setCellState(cell, 'hover', false);\n }\n }", "function computeEventForDateSpan(dateSpan, dragMeta, calendar) {\n var defProps = __assign({}, dragMeta.leftoverProps);\n for (var _i = 0, _a = calendar.pluginSystem.hooks.externalDefTransforms; _i < _a.length; _i++) {\n var transform = _a[_i];\n __assign(defProps, transform(dateSpan, dragMeta));\n }\n var def = core.parseEventDef(defProps, dragMeta.sourceId, dateSpan.allDay, calendar.opt('forceEventDuration') || Boolean(dragMeta.duration), // hasEnd\n calendar);\n var start = dateSpan.range.start;\n // only rely on time info if drop zone is all-day,\n // otherwise, we already know the time\n if (dateSpan.allDay && dragMeta.startTime) {\n start = calendar.dateEnv.add(start, dragMeta.startTime);\n }\n var end = dragMeta.duration ?\n calendar.dateEnv.add(start, dragMeta.duration) :\n calendar.getDefaultEventEnd(dateSpan.allDay, start);\n var instance = core.createEventInstance(def.defId, { start: start, end: end });\n return { def: def, instance: instance };\n }", "set(input) {\n let typeChange = fn.isDefined(input.type) && input.type !== this.type;\n let sizeChange = fn.isDefined(input.size) && input.size !== this.size;\n if (typeChange || sizeChange) {\n let focus = fn.coalesce(input.otherwiseFocus, 0.4999);\n let prefer = fn.coalesce(input.preferToday, true);\n let size = fn.coalesce(input.size, this.size);\n let type = fn.coalesce(input.type, this.type);\n let around = fn.coalesce(input.around, this.days[Math.floor((this.days.length - 1) * focus)]);\n let today = Day.today();\n if (!around || (prefer && this.span.matchesDay(today))) {\n around = today;\n }\n let meta = Calendar.TYPES[type];\n let start = meta.getStart(Day.parse(around), size, focus);\n let end = meta.getEnd(start, size, focus);\n this.span.start = start;\n this.span.end = end;\n this.type = type;\n this.size = size;\n this.moveStart = meta.moveStart;\n this.moveEnd = meta.moveEnd;\n }\n else if (input.around) {\n let focus = fn.coalesce(input.otherwiseFocus, 0.4999);\n let around = Day.parse(input.around);\n let type = this.type;\n let size = this.size;\n let meta = Calendar.TYPES[type];\n let start = meta.getStart(around, size, focus);\n let end = meta.getEnd(start, size, focus);\n this.span.start = start;\n this.span.end = end;\n }\n this.fill = fn.coalesce(input.fill, this.fill);\n this.minimumSize = fn.coalesce(input.minimumSize, this.minimumSize);\n this.repeatCovers = fn.coalesce(input.repeatCovers, this.repeatCovers);\n this.listTimes = fn.coalesce(input.listTimes, this.listTimes);\n this.eventsOutside = fn.coalesce(input.eventsOutside, this.eventsOutside);\n this.updateRows = fn.coalesce(input.updateRows, this.updateRows);\n this.updateColumns = fn.coalesce(input.updateColumns, this.updateColumns);\n this.eventSorter = fn.coalesce(input.eventSorter, this.eventSorter);\n this.parseMeta = fn.coalesce(input.parseMeta, this.parseMeta);\n this.parseData = fn.coalesce(input.parseData, this.parseData);\n if (fn.isArray(input.events)) {\n this.setEvents(input.events, true);\n }\n if (!input.delayRefresh) {\n this.refresh();\n }\n return this;\n }", "function initCells(){\n\t\tvar days = ['Monday', 'Tuesday', 'Wednesday', \n\t\t\t'Thursday', 'Friday', 'Saturday', 'Sunday'];\n\t\tvar tableRows = document.getElementById('schedTable').children[0].children;\n\t\tvar numericClass = 0000;\n\t\tvar toggle = true;\n\t\tvar first = true;\n\t\tfor(row in tableRows){\n\t\t\tif(!isNaN(row)){\n\t\t\t\tvar tableDatas = tableRows[row].children;\n\t\t\t\tif(!first){\n\t\t\t\t\tvar counter = 0;\n\t\t\t\t\tfor(dat in tableDatas){\n\t\t\t\t\t\tif(!isNaN(dat)){\n\t\t\t\t\t\t\tif(!tableDatas[dat].classList.contains('timeLabel')){\n\t\t\t\t\t\t\t\tvar html = days[counter].toLowerCase();\n\t\t\t\t\t\t\t\tcounter++\n\t\t\t\t\t\t\t\ttableDatas[dat].classList.add(html);\n\t\t\t\t\t\t\t\ttableDatas[dat].classList.add(numericClass);\n\t\t\t\t\t\t\t\ttableDatas[dat].classList.add('cell');\n\t\t\t\t\t\t\t\ttableDatas[dat].setAttribute('data-type','');\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif(toggle){\n\t\t\t\t\t\tnumericClass += 30;\n\t\t\t\t\t\ttoggle = false;\n\t\t\t\t\t}\n\t\t\t\t\telse{\n\t\t\t\t\t\tnumericClass += 70;\n\t\t\t\t\t\ttoggle = true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\tfirst = false;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "async function process_wb_manually(wb, sheetName) {\n $('#data-table').empty();\n var sh = workbook.Sheets[sheetName];\n var cellsToAppend = \"\";\n var range = XLSX.utils.decode_range(sh['!ref']); // get the range\n for (var R = range.s.r; R <= range.e.r; ++R) {\n cellsToAppend += \"<tr>\";\n cellsToAppend += (R===0)?\"<th style='min-width: 0px'>#</th>\":\"<td><b>\" + R + \"</b></td>\";\n for (var C = range.s.c; C <= range.e.c; ++C) {\n var cellref = XLSX.utils.encode_cell({c: C, r: R}); // construct A1 reference for cell\n if (sh[cellref]){\n var cell = sh[cellref];\n if(R === 0){\n cellsToAppend += \"<th class=\\\"filter\\\">\" + cell.v + \"</th>\";\n } else {\n if (R> 0 && (sh[XLSX.utils.encode_cell({c: C, r: 0})].v === \"startDate\" || sh[XLSX.utils.encode_cell({c: C, r: 0})].v === \"endDate\" ||sh[XLSX.utils.encode_cell({c: C, r: 0})].v === \"feeDateFrom\" ||sh[XLSX.utils.encode_cell({c: C, r: 0})].v === \"feeDateTo\" )) {\n if(cell.v instanceof Date) {\n datePlusOne = new Date(cell.v.getTime() + 1000*60*60);\n } else {\n datePlusOne = cell.v;\n }\n\t\t\t cellsToAppend += \"<td id='r\" + R + \"c\" + C + \"'><span class='table_span' contenteditable='false' oninput='changeCell(\" + C + \", \" + R + \"); return false'>\" + datePlusOne.toLocaleString('es-ES', {\n day: '2-digit',\n month: '2-digit',\n year: 'numeric',\n }) + \"</span></td>\";\n } else {\n cellsToAppend += \"<td id='r\" + R + \"c\" + C + \"'><span class='table_span' contenteditable='false' oninput='changeCell(\" + C + \", \" + R + \"); return false'>\" + cell.v + \"</span></td>\";\n }\n }\n } else {\n if(sh[XLSX.utils.encode_cell({c: C, r: 0})]) {\n cellsToAppend += \"<td id='r\" + R + \"c\" + C + \"'><span class='table_span' contenteditable='false' oninput='changeCell(\" + C + \", \" + R + \"); return false'></span></td>\";\n }\n }\n }\n cellsToAppend += \"</tr>\";\n }\n $('#data-table').append(cellsToAppend);\n}", "function parseTransformArray(model) {\n var first = null;\n var node;\n var previous;\n var lookupCounter = 0;\n function insert(newNode) {\n if (!first) {\n // A parent may be inserted during node construction\n // (e.g., selection FilterNodes may add a TimeUnitNode).\n first = newNode.parent || newNode;\n }\n else if (newNode.parent) {\n previous.insertAsParentOf(newNode);\n }\n else {\n newNode.parent = previous;\n }\n previous = newNode;\n }\n model.transforms.forEach(function (t) {\n if (transform_1.isCalculate(t)) {\n node = new CalculateNode(t);\n }\n else if (transform_1.isFilter(t)) {\n // Automatically add a parse node for filters with filter objects\n var parse = {};\n var filter = t.filter;\n var val = null;\n // For EqualFilter, just use the equal property.\n // For RangeFilter and OneOfFilter, all array members should have\n // the same type, so we only use the first one.\n if (filter_1.isEqualFilter(filter)) {\n val = filter.equal;\n }\n else if (filter_1.isRangeFilter(filter)) {\n val = filter.range[0];\n }\n else if (filter_1.isOneOfFilter(filter)) {\n val = (filter.oneOf || filter['in'])[0];\n } // else -- for filter expression, we can't infer anything\n if (val) {\n if (datetime_1.isDateTime(val)) {\n parse[filter['field']] = 'date';\n }\n else if (vega_util_1.isNumber(val)) {\n parse[filter['field']] = 'number';\n }\n else if (vega_util_1.isString(val)) {\n parse[filter['field']] = 'string';\n }\n }\n if (util_1.keys(parse).length > 0) {\n var parseNode = new formatparse_1.ParseNode(parse);\n insert(parseNode);\n }\n node = new FilterNode(model, t.filter);\n }\n else if (transform_1.isBin(t)) {\n node = bin_1.BinNode.makeFromTransform(model, t);\n }\n else if (transform_1.isTimeUnit(t)) {\n node = timeunit_1.TimeUnitNode.makeFromTransform(model, t);\n }\n else if (transform_1.isSummarize(t)) {\n node = aggregate_1.AggregateNode.makeFromTransform(model, t);\n if (selection_2.requiresSelectionId(model)) {\n insert(node);\n node = new IdentifierNode();\n }\n }\n else if (transform_1.isLookup(t)) {\n node = LookupNode.make(model, t, lookupCounter++);\n }\n else {\n log.warn(log.message.invalidTransformIgnored(t));\n return;\n }\n insert(node);\n });\n var last = node;\n return { first: first, last: last };\n}", "function eventRestructurer(columns) {\n const containerWidth = 620;\n const resultArray = [];\n columns.forEach((group, columnsIndex) => {\n group.forEach(event => {\n const factorWL = widthLeftFactor(event, columnsIndex, columns);\n resultArray.push({\n id: `${event[0]}`,\n start: event[1].start,\n end: event[1].end,\n top: `${event[1].start}px`,\n width: containerWidth * factorWL[0],\n left: `${columnsIndex / factorWL[1] * 100}%`\n });\n });\n });\n return resultArray;\n }", "function simplifyDates(weekObjects){\n console.log(\"simplifyDates alkaa\");\n for(var i = 0; i < weekObjects.length; i++){\n //console.log(\"kierros \" + i + \"alkaa\");\n //console.log(weekObjects);\n var fDate = weekObjects[i].span.firstDate;\n //console.log(\"kierros \" + i + \"tässä\");\n var lDate = weekObjects[i].span.lastDate;\n var sfDate = fDate.getTime();\n var slDate = lDate.getTime();\n weekObjects[i].span.firstDate = sfDate;\n weekObjects[i].span.lastDate = slDate;\n \n }\n console.log(\"simplifyDates loppuu\");\n}", "function formatChartDef(inputChartDef) {\r\n //\r\n // WORKAROUND: Merge the index in as a column.\r\n // This needs to be changed later and it shouldn't be part of the C3 template it should be\r\n // code that is shared to all templates.\r\n //\r\n var workingChartDef = inputChartDef;\r\n //TODO: This transformation should not be in the template!\r\n if (inputChartDef.data.index && inputChartDef.data.index.values && inputChartDef.data.index.values.length > 0) {\r\n workingChartDef = Object.assign({}, inputChartDef);\r\n workingChartDef.data = Object.assign({}, inputChartDef.data);\r\n workingChartDef.data.columnOrder = inputChartDef.data.columnOrder.slice(); // Clone array.\r\n workingChartDef.data.columnOrder.push(\"__index__\");\r\n workingChartDef.data.columns = Object.assign({}, inputChartDef.data.columns);\r\n workingChartDef.data.columns[\"__index__\"] = inputChartDef.data.index.type;\r\n workingChartDef.data.values = inputChartDef.data.values.slice(); // Clone array.\r\n for (var i = 0; i < workingChartDef.data.values.length; ++i) {\r\n var row = workingChartDef.data.values[i];\r\n row[\"__index__\"] = inputChartDef.data.index.values[i];\r\n }\r\n }\r\n var values = workingChartDef.data.values;\r\n //TODO: Dates need to be deserialized by the api.\r\n if (workingChartDef.data.columns) {\r\n var columnNames = Object.keys(workingChartDef.data.columns);\r\n var hasDates = columnNames.filter(function (columnName) { return workingChartDef.data.columns[columnName] === \"date\"; });\r\n if (hasDates) {\r\n values = values.slice(); // Clone the date so we can inflate the dates.\r\n for (var _i = 0, columnNames_1 = columnNames; _i < columnNames_1.length; _i++) {\r\n var columnName = columnNames_1[_i];\r\n if (workingChartDef.data.columns[columnName] === \"date\") {\r\n for (var _a = 0, values_1 = values; _a < values_1.length; _a++) {\r\n var row = values_1[_a];\r\n row[columnName] = moment(row[columnName], moment.ISO_8601).toDate();\r\n }\r\n }\r\n }\r\n }\r\n }\r\n var xs = {};\r\n extractXS(\"y\", workingChartDef, xs);\r\n extractXS(\"y2\", workingChartDef, xs);\r\n var columns = [];\r\n var columnsSet = {};\r\n extractColumns(\"y\", workingChartDef, columns, columnsSet);\r\n extractColumns(\"y2\", workingChartDef, columns, columnsSet);\r\n var c3ChartDef = {\r\n bindto: \"#chart\",\r\n size: {\r\n width: workingChartDef.plotConfig && workingChartDef.plotConfig.width || 1200,\r\n height: workingChartDef.plotConfig && workingChartDef.plotConfig.height || 600,\r\n },\r\n data: {\r\n xs: xs,\r\n columns: columns,\r\n type: workingChartDef.plotConfig && workingChartDef.plotConfig.chartType || \"line\",\r\n axes: configureAxes(workingChartDef),\r\n names: configureSeriesNames(workingChartDef),\r\n },\r\n axis: configureAxis(workingChartDef),\r\n transition: {\r\n duration: 0 // Disable animated transitions when we are capturing a static image.\r\n },\r\n point: {\r\n show: false\r\n }\r\n };\r\n return c3ChartDef;\r\n}", "function transformData (data, start_date){\n let st_arr = [];\n let fpt_arr = [];\n let kwht_arr = [];\n data.forEach(function (arrayItem) {\n var timestamp = new Date(arrayItem.ingestedTimestamp);\n if (new Date(start_date) < new Date(timestamp)){\n timestamp.toLocaleString();\n st_arr.push({x: timestamp ,y: arrayItem.payload[\"ST\"]});\n fpt_arr.push({x: timestamp ,y: arrayItem.payload[\"FPT\"]});\n kwht_arr.push({x: timestamp ,y: arrayItem.payload[\"KWHT\"]});\n }\n });\n return [{ name: \"ST\", values: st_arr}, { name: \"FPT\", values: fpt_arr}, { name: \"KWHT\", values: kwht_arr}];\n}", "function getTransform(step, shift, isCol, margin) {\n\tif (isCol) {\n\t\treturn 'translate3d(' + shift + 'px, ' + step + 'px, 0)';\n\t}\telse {\n\t\treturn 'translate3d(' + step + 'px, ' + shift + 'px, 0)';\n\t}\n}", "function replaceRelativeDates() {\n// console.log(\"replaceRelativeDates2()\");\n var marker;\n var markerID;\n var markerNames = [];\n \n for(let i=1; i<numberOfWeeks; i++) {\n marker = \"week\" + i + \"_mon\";\n replaceMarker(marker);\n\n marker = \"week\" + i + \"_tue\";\n replaceMarker(marker);\n\n marker = \"week\" + i + \"_wed\";\n replaceMarker(marker);\n\n marker = \"week\" + i + \"_thu\";\n replaceMarker(marker);\n\n marker = \"week\" + i + \"_fri\";\n replaceMarker(marker);\n\n marker = \"week\" + i + \"_sat\";\n replaceMarker(marker);\n\n marker = \"week\" + i + \"_sun\";\n replaceMarker(marker);\n }\n}", "preProcessByDayResult(queryResult, groupBy) {\n switch (groupBy) {\n case \"day\":\n queryResult = this.fillEmptyDayPoints(queryResult);\n // replace key name \"day\" with \"x\" and value name \"count\" with \"y\"\n let resultByDay = [];\n queryResult.forEach(function (element) {\n resultByDay.push({x: new Date(element.day), y: element.count});\n });\n // sort the date\n resultByDay.sort(function (previousVal, currentVal) {\n return previousVal.x - currentVal.x;\n });\n return resultByDay;\n case \"week\":\n // TODO\n case \"month\":\n default:\n // group by year\n var groupsByYear = queryResult.reduce(function (previousVal, currentVal) {\n var yearNum = currentVal.day.split((\"-\"))[0];\n (previousVal[yearNum]) ? previousVal[yearNum].data.push(currentVal) : previousVal[yearNum] = {\n year: yearNum,\n data: [currentVal]\n };\n return previousVal;\n }, {});\n var resultByYear = Object.keys(groupsByYear).map(function (k) {\n return groupsByYear[k];\n });\n\n // sum up the result for every month\n var resultByMonth = [];\n var hasCountMonth = [];\n for (var i = 0; i < resultByYear.length; i++) {\n var groupsByMonthOneYear = resultByYear[i].data.reduce(function (previousVal, currentVal) {\n var monthNum = currentVal.day.split((\"-\"))[1];\n if (previousVal[monthNum]) {\n previousVal[monthNum].y += currentVal.count;\n } else {\n var thisMonth = new Date(resultByYear[i].year, monthNum - 1);\n previousVal[monthNum] = {y: currentVal.count, x: thisMonth};\n hasCountMonth.push(thisMonth);\n }\n return previousVal;\n }, {});\n var resultByMonthOneYear = Object.keys(groupsByMonthOneYear).map(function (key) {\n return groupsByMonthOneYear[key];\n });\n resultByMonth = resultByMonth.concat(resultByMonthOneYear);\n }\n return this.complementData(resultByMonth, hasCountMonth);\n }\n }", "_formatCellValue(row, column, cell, value) {\r\n if (value === undefined) {\r\n value = row.data[column.dataField];\r\n }\r\n\r\n if (column.formatFunction) {\r\n const settings = {\r\n value: value,\r\n row: row && row.data ? row.data.$.id : row,\r\n column: column.dataField,\r\n cell: cell,\r\n template: null\r\n };\r\n\r\n column.formatFunction(settings);\r\n\r\n value = settings.value;\r\n\r\n if (settings.template instanceof HTMLElement) {\r\n return settings.template;\r\n }\r\n\r\n if (settings.template === null ||\r\n typeof settings.template !== 'string') {\r\n return value;\r\n }\r\n\r\n const template = settings.template;\r\n let result = '';\r\n\r\n if (template.startsWith('#')) {\r\n const templateElement = document.querySelector(template);\r\n\r\n if (templateElement && templateElement instanceof HTMLTemplateElement) {\r\n const templateContent = templateElement.content.cloneNode(true),\r\n tempElement = document.createElement('div');\r\n\r\n tempElement.appendChild(templateContent);\r\n\r\n value = value.toString();\r\n value = value.replace(/'/ig, '\\\\\\'');\r\n value = value.replace(/\"/ig, '\\\\\"');\r\n\r\n result = tempElement.innerHTML.replace(/{{value}}/ig, value);\r\n\r\n if (result.indexOf('{{value=') >= 0) {\r\n if (!value) {\r\n result = result.replace(/{{value=/ig, '');\r\n result = result.replace(/}}/ig, '');\r\n }\r\n else {\r\n result = result.substring(0, result.indexOf('{{value=')) + value + result.substring(result.indexOf('}'));\r\n result = result.replace(/}/ig, '');\r\n result = result.replace(/{/ig, '');\r\n }\r\n }\r\n\r\n return result;\r\n }\r\n }\r\n\r\n result = template.replace(/{{value}}/ig, value);\r\n return result;\r\n }\r\n else if (column.dataType === 'date' && value instanceof Date) {\r\n return value.toLocaleDateString();\r\n }\r\n\r\n return value;\r\n }", "toTableRow(day){\n\t\t\n\t\t// sets the character to print out for Open or Closed\n\t\tlet open_char = \"C\";\n\t\tif(this.open == 1){\n\t\t\topen_char = 'O';\n\t\t}\n\t\t\n\t\t// adds the meeting codes to the end of the meeting name\n\t\tlet newmname = Meeting.addToName(this.mname, this);\n\n\t\t// combines address pieces together to create a whole address\n\t\tlet wholeaddress = this.address+\", \"+this.city+\" WA \"+this.zipcode;\n\n\t\tlet address_td = \"\";\n\t\tif(this.tc==1) {\n\t\t\taddress_td = \"<td class=\\\"col_address_tc\\\"><a target=\\\"_blank\\\" href=\\\"http://maps.apple.com/?q=\"+wholeaddress+\"\\\">\"+this.address+\" [\"+this.zipcode+\"]\"+\"</a></td>\";\n\t\t}\n\t\telse if(this.nl==1) {\n\t\t\taddress_td = \"<td class=\\\"col_address_nl\\\"></td>\";\n\t\t}\n\t\telse{\n\t\t\taddress_td = \"<td class=\\\"col_address\\\"><a target=\\\"_blank\\\" href=\\\"http://maps.apple.com/?q=\"+wholeaddress+\"\\\">\"+this.address+\" [\"+this.zipcode+\"]\"+\"</a></td>\";\n\t\t}\n\t\t\n\t\t// makes location and notes an empty string if null\n\t\tlet newlocation = this.location;\n\t\tif (this.location == null) {\n\t\t\tnewlocation = \"\";\n\t\t}\n\t\tlet newnotes = this.webnotes;\n\t\tif (this.webnotes == null) {\n\t\t\tnewnotes = \"\";\n\t\t}\n\t\tlet newurl = this.conference_url;\t\n\t\tif (this.conference_url == null) {\n\t\t\tnewurl = \"\";\n\t\t}\n\n\t\tlet phone_td = \"\";\n\t\tlet newphone = this.conference_phone;\n\t\tlet newphone_display = \"\";\t\n\t\tif (this.conference_phone == \"\") {\n\t\t\tnewphone = \"\";\n\t\t\tphone_td = \"<td class=\\\"col_phone\\\"></td>\";\n\t\t} else {\n\t\t\tnewphone_display = newphone.substring(2,5)+\"-\"+newphone.substring(5,8)+\"-\"+newphone.substring(8,12);\n\t\t\tphone_td = \"<td class=\\\"col_phone\\\"><a target=\\\"_blank\\\" href=\\\"tel:\"+newphone+\"\\\">\"+newphone_display+\"</a></td>\";\n\t\t}\n\n\t\t// creates a String of the meeting info as an HTML table row and returns it\n\t\tlet htmlstring = \"<tr><td class=\\\"oc col_day\\\">\"+day+\"</td>\"; // day, input as parameter\n\t\thtmlstring = htmlstring+\"<td class=\\\"col_time\\\" data-value=\\\"\"+Meeting.formatSortableTime(this.stime)+\"\\\">\"+Meeting.formatTime(this.stime)+\"</td>\"; // String start time with numeric data-value for sorting\n\t\thtmlstring = htmlstring+\"<td class=\\\"oc col_oc\\\">\"+open_char+\"</td><td class=\\\"col_name\\\">\"+newmname+\"</td>\"; // O or C and New Name\n\t\t// used apple maps, as if it's a non apple device it automatically goes to google maps\n\t\thtmlstring = htmlstring+address_td; // address\n\t\thtmlstring = htmlstring+\"<td class=\\\"col_city\\\">\"+this.city+\"</td>\"; // city\n\t\thtmlstring = htmlstring+\"<td class=\\\"col_location\\\">\"+newlocation+\"</td>\"; // location\n\t\thtmlstring = htmlstring+\"<td class=\\\"col_notes\\\">\"+newnotes+\"</td>\"; // notes\n\t\thtmlstring = htmlstring+\"<td class=\\\"col_url\\\"><a target=\\\"_blank\\\" href=\\\"\"+newurl+\"\\\">\"+newurl+\"</a></td>\"; // conference_url\n\t\thtmlstring = htmlstring+phone_td; // conference_phone\n\t\thtmlstring = htmlstring+\"<td class=\\\"col_venmo\\\">\"+this.venmo+\"</td>\"; // venmo\n\t\thtmlstring = htmlstring+\"<td class=\\\"col_updated\\\">\"+Meeting.formatUpdated(this.lupdate)+\"</td></tr>\"; // updated\n\t\t\n\t\treturn htmlstring;\n\t}" ]
[ "0.5513567", "0.5513567", "0.5480849", "0.5480849", "0.544876", "0.5447136", "0.5447136", "0.5447136", "0.5423239", "0.5423239", "0.5423239", "0.52923745", "0.52917147", "0.5036175", "0.50296986", "0.5012839", "0.49849567", "0.48386535", "0.47930777", "0.47927776", "0.47662795", "0.47618827", "0.47063535", "0.46834287", "0.46728212", "0.46728212", "0.46728212", "0.46728212", "0.46728212", "0.4670036", "0.4667641", "0.46495283", "0.46450207", "0.46324453", "0.4626273", "0.46097186", "0.45938382", "0.45739406", "0.4570857", "0.456882", "0.45533174", "0.45533174", "0.45533174", "0.45533174", "0.45533174", "0.45379362", "0.45374778", "0.4528257", "0.45246214", "0.44936016", "0.44861364", "0.44701523", "0.44665262", "0.44434035", "0.44427568", "0.44346482", "0.4434563", "0.44345072", "0.44293422", "0.44272828", "0.44206956", "0.4419179", "0.44172594", "0.44163737", "0.44148996", "0.441259", "0.44066116", "0.44026226", "0.4401166", "0.4393233", "0.43931794", "0.4393033", "0.4393033", "0.4393033", "0.4393033", "0.4393033", "0.4393033", "0.4393033", "0.4393033", "0.43830672", "0.43817684", "0.43812397", "0.4377293", "0.43760678", "0.43726704", "0.43697724", "0.43516484", "0.43481877", "0.43401903", "0.433912", "0.4338094", "0.43324703", "0.4331503", "0.43230656", "0.43188187", "0.43148336" ]
0.5553793
3
date > day offset
function dateToDayOffset(date) { return dayDiff(date, t.visStart); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function dateToDayOffset(date) {\n\t\treturn date.clone().stripTime().diff(t.start, 'days');\n\t}", "function dateToDayOffset(date) {\n\t\treturn date.clone().stripTime().diff(t.start, 'days');\n\t}", "getDateOffset(date) {\n let currentTime = date ? new Date(date) : new Date();\n let currentOffset = date ? currentTime.getTimezoneOffset(): 0;\n return new Date(currentTime.getTime() +Math.abs(currentOffset*60000));\n }", "function calculateDayOffset(date)\n{\n var dayFormula = 1000*60*60*24;\n return Math.round(new Date().getTime()/dayFormula - date.getTime()/dayFormula);\n}", "function getDateWithinWeek(d, offset) {\n d = new Date(d);\n var day = d.getDay(),\n diff = d.getDate() - day + (day == 0 ? offset-7:offset); // adjust when day is sunday\n return new Date(d.setDate(diff));\n}", "function daysPosition(day, offset) {\n let days = ['monday', 'tuesday', 'wednesday', 'thursday', 'friday', 'saturday', 'sunday']\n\n if (days.indexOf(day.toLowerCase()) < 0) {\n return \"That's not a day of the week\"\n }\n\n if (!offset) {\n days.unshift(...days.splice(6, 1))\n }\n\n return days.indexOf(day.toLowerCase()) + 1\n}", "isDay() {\n\t\treturn (Date.now() + 60000 * new Date().getTimezoneOffset() + 21600000) % 86400000 / 3600000 > 12;\n\t}", "function getDay(offset = 0) {\n const day = new Date();\n const weekday = ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'];\n return weekday[(day.getDay() + offset) % 7];\n}", "function search_weekday(weekday, jd, direction, offset) {\n return weekday_before(weekday, jd + (direction * offset));\n}", "function dayOffsetToDate(dayOffset) {\n\t\tvar date = cloneDate(t.visStart);\n\t\taddDays(date, dayOffset);\n\t\treturn date;\n\t}", "function dayOffsetToDate(dayOffset) {\n\t\tvar date = cloneDate(t.visStart);\n\t\taddDays(date, dayOffset);\n\t\treturn date;\n\t}", "function dayOffsetToDate(dayOffset) {\n\t\tvar date = cloneDate(t.visStart);\n\t\taddDays(date, dayOffset);\n\t\treturn date;\n\t}", "function search_weekday(weekday, jd, direction, offset)\n {\n return weekday_before(weekday, jd + (direction * offset));\n }", "function fullDay(date){\n var response = false;\n $.each(dateOpen, function(i, d) {\n var open = new Date(d.day.date.slice(0, 10));\n if (date.getDate() == open.getDate() && date.getMonth() == open.getMonth() && d.nbVisitor >= 1000) {\n response = true;\n return false;\n }\n });\n return response;\n }", "function getDayDate(firstDay, offset) {\n var date = new Date(firstDay);\n var newDate = date.getDate() + offset;\n return new Date(date.setDate(newDate));\n}", "function dayOffsetToDate(dayOffset) {\n\t\treturn t.start.clone().add('days', dayOffset);\n\t}", "function dayOffsetToDate(dayOffset) {\n\t\treturn t.start.clone().add('days', dayOffset);\n\t}", "function weekOffset(dayOffset) {\n if (dayOffset >= 0) {\n return Math.floor(dayOffset / 7);\n }\n dayOffset = -dayOffset;\n dayOffset--;\n return -Math.floor(dayOffset / 7) - 1;\n}", "E (date) {\n return date.getDay() || 7\n }", "function calendarDate() {\n //Need to be able to handle when dateOffset > than weekDays array \n //calendarDateOffset = dateOffset;\n $(\"#calendar-date\").empty();\n $(\"#calendar-date\").append( (weekDays[d.getUTCDay() + dateOffset]) + \" , \" + (months[d.getUTCMonth()]) + \" \" + (d.getUTCDate() + dateOffset) );\n}", "isSameDay(date) {\n const universalDate = new UniversalDate(date);\n return universalDate.year === this.year && universalDate.week === this.week && universalDate.dayOfWeek === this.dayOfWeek;\n }", "function getDay(date) {\n return date.getDay() >= 1 ? date.getDay() - 1 : 6;\n}", "function filterByDay(val){\n return val.date == this;\n }", "function checkDate(int,tomorrow,array){\r\n\tvar dateInfo = getTime();\r\n\tif(tomorrow){ //adjust day if needed\r\n\t\tif(dateInfo[2] == 6) {\r\n\t\t\tdateInfo[2] = 0;\r\n\t\t}\r\n\t\telse{\r\n\t\t\tdateInfo[2] = dateInfo[2]+1;\r\n\t\t}\r\n\t}\r\n\tvar hourFloat = concot(dateInfo);\r\n\tif(finder(\"openWhen\",queryResult) != undefined) {\r\n\t\thourFloat = parseFloat(finder(\"openWhen\",queryResult));\r\n\t}\r\n\r\n\tif(dateInfo[2] == 6){\r\n\t\tvar saturday = array[int][\"tid_lordag\"].split(\" - \");\r\n\t\tif(parseFloat(saturday[0])<hourFloat&&parseFloat(saturday[1])>hourFloat || array[int][\"tid_lordag\"] == \"ALL\"){\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\telse {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}\r\n\telse if (dateInfo[2] == 0) {\r\n\t\tvar sunday = array[int][\"tid_sondag\"].split(\" - \");\r\n\t\tif(parseFloat(sunday[0])<hourFloat &&parseFloat(sunday[1])>hourFloat || array[int][\"tid_sondag\"] == \"ALL\"){\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\telse {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}\r\n\telse {\r\n\t\tvar weekday = array[int][\"tid_hverdag\"].split(\" - \");\r\n\t\tif(parseFloat(weekday[0])<hourFloat&&parseFloat(weekday[1])>hourFloat || array[int][\"tid_hverdag\"] == \"ALL\"){\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\telse {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}\r\n}", "isOnDate(date) {\n const selfDate = this.timeHuman.split(\" \")[0];\n const selfDay = Number(selfDate.split(\"-\")[2]);\n const day = Number(date.split(\"-\")[2]);\n return selfDay === day;\n }", "function weekday_before(weekday, jd){\n return jd - jwday(jd - weekday);\n}", "function moveOneDay(date) {date.setTime((date.getTime() + 24 * 60 * 60 * 1000)); }", "function day(t, offset) {\n\t_d.setTime(t * 1000)\n\t_d.setMilliseconds(0)\n\t_d.setSeconds(0)\n\t_d.setMinutes(0)\n\t_d.setHours(0)\n\t_d.setDate(_d.getDate() + (offset || 0))\n\treturn _d.valueOf() / 1000\n}", "function getDateTodayOrYesterday(offset) {\n var d = new Date();\n d.setDate(d.getDate() - offset);\n return (d.getFullYear() + \"-\" + (d.getMonth() + 1) + \"-\" + d.getDate());\n}", "adjustForNextDay(date, adjustment) {\n date.setTime( date.getTime() + adjustment * 86400000 )\n }", "function isBeforeDate(start_date) {\n if (typeof start_date === 'string') {\n start_date = startOfDay(parseISO(start_date));\n }\n start_date = startOfDay(start_date);\n const result = isBefore(evenDate, start_date);\n return result;\n}", "function isDate(date) {\n return (date && date.getDate) ? date : false;\n }", "function weekday_before(weekday, jd)\n {\n return jd - jwday(jd - weekday);\n }", "function fixDate(d, check) {\n // force d to be on check's YMD, for daylight savings purposes\n if (+d) { // prevent infinite looping on invalid dates\n while (d.getDate() != check.getDate()) {\n d.setTime(+d + (d < check ? 1 : -1) * HOUR_MS);\n }\n }\n}", "function dateCheck()\n{\n\tif(date.getUTCMonth() + dateMonthAdded > date.getUTCMonth())\n\t{\n\t\tdate.setUTCDate(1);\n\t}\n\tswitch(date.getUTCMonth())\n\t{\n\t\tcase 1://feb is a special month where every 4 years the final year is allways dividable with 4 and gets 29 days instead of 28\n\t\t\tif(date.getUTCFullYear()%4 == 0)\n\t\t\t\tdays = days - 3;\n\t\t\telse\n\t\t\t\tdays = days - 2;\n\t\t\tbreak;\n\t\tcase 3://april\n\t\t\tdays = days - 1;\n\t\t\tbreak;\n\t\tcase 5://june\n\t\t\tdays = days - 1;\n\t\t\tbreak;\n\t\tcase 8://sept\n\t\t\tdays = days - 1;\n\t\t\tbreak;\n\t\tcase 10://nov\n\t\t\tdays = days - 1;\n\t\t\tbreak;\n\t}\n}", "validateStartDate(start_time){\n let start_time_date = new Date(start_time);\n let tempDate = new Date();\n tempDate.setDate(tempDate.getDate());\n let date_difference = tempDate.getTime() - start_time_date.getTime();\n let dayToMillis = 86400000;\n date_difference = date_difference / dayToMillis;\n if(date_difference >= 0 && date_difference < 7){\n return true;\n }\n return false;\n }", "DD (date) {\n return pad(date.getDate())\n }", "isDayWeekday(hire_date){\n console.log(typeof hire_date);\n let arr = hire_date.split('-');\n let hireDate = new Date(parseInt(arr[0]), parseInt(arr[1]) - 1, parseInt(arr[2]));\n if(hireDate.getDay() != 0 && hireDate.getDay() != 7){\n console.log(hireDate.getDay())\n return true;\n }\n return false;\n }", "isDayActive(date) {\n return date.isSame(this.value, 'day');\n }", "function getOffsetDate(offset) {\n offset = 60 * 60 * 1000 * offset;\n const localDate = new Date(),\n localTime = localDate.getTime(),\n localOffset = localDate.getTimezoneOffset() * 60 * 1000,\n utc = localTime + localOffset,\n newTime = utc + offset,\n newDate = new Date(newTime);\n return newDate;\n}", "function checkDate(item){\n var val = Date.parse(item);\n var tomtom = new Date();\n tomtom.setDate(tomtom.getDate()+2);\n if(val >= tomtom){\n return true;\n }\n else false;\n}", "function day(date) { return `${date.getDate()}`.padStart(2, '0') }", "checkDayEvents(date) {\n var dayEvents = this.events.find(ev => {\n return new Date(ev.date).toDateString() === date.toDateString();\n });\n this.settings.onDateSelect(this, date, dayEvents);\n }", "function startOfUTCISOWeek(dirtyDate) {\n Object(__WEBPACK_IMPORTED_MODULE_1__requiredArgs_index_js__[\"a\" /* default */])(1, arguments);\n var weekStartsOn = 1;\n var date = Object(__WEBPACK_IMPORTED_MODULE_0__toDate_index_js__[\"default\"])(dirtyDate);\n var day = date.getUTCDay();\n var diff = (day < weekStartsOn ? 7 : 0) + day - weekStartsOn;\n date.setUTCDate(date.getUTCDate() - diff);\n date.setUTCHours(0, 0, 0, 0);\n return date;\n}", "function excludeTime(d) {\n return d.startOf('day');\n}", "function isDateToday(date) {\n return dayjs(date.format('YYYY-MM-DD')).isSame(dayjs().format('YYYY-MM-DD'));\n}", "function disableDates(date){\n //Testing, need to get dates from DB instead\n return date.getDate();\n}", "includesDay(day) {\n return !this.excludesDay(day) && (this.dates.find(function (d) {\n return d.includesDay(day);\n }) || false);\n }", "includesDay(day) {\n return !this.excludesDay(day) && (this.dates.find(function (d) {\n return d.includesDay(day);\n }) || false);\n }", "function isSoon$static(date/*:Date*/, nextDays/*:int*/)/*:Boolean*/ {\n date =AS3.as( date, Date);\n if (!date) {\n return false;\n }\n var nextDaysMillis/*:int*/ = 1000 * 60 * 60 * 24 * nextDays;\n var diffMillis/*:Number*/ = TimeUtil.getDayAtMidnight(date).getTime() - TimeUtil.getDayAtMidnight(new Date()).getTime();\n return diffMillis >= 0 && diffMillis <= nextDaysMillis;\n }", "d (date) {\n return date.getDay()\n }", "function filterDate(date){\n //Test\n console.log(\"I am filtering a date\")\n return date.datetime === inputValue;\n}", "function checkOverEighteenFn(year, month, day) {\n // Write your code here\n let d = new Date();\n year = d.getFullYear() - year\n if(year >= 18){\n return true\n }\n \n return false\n}", "function unluckyDays(year){\n for (var i = 0; i < 12; i++) {\n var scary = new Date(year, i, 13)\n if(scary.getDay() === 5){\n alert(\"Got one!\")\n }\n }\n}", "function getOffset(date, tzid) {\n if (tzid == null) {\n return null;\n\t}\n\n var exptz = tzs.waitFetch(tzid, date.substring(0, 4));\n var offset = null;\n\n if ((exptz == null) || (exptz.status != tzs.okStatus)) {\n\t return null;\n }\n\n var obs = exptz.findObservance(date);\n \n if (obs == null) {\n return null;\n\t}\n\n return obs.to / 60;\n}", "function daysDiff(newdate,olddate)\n{\n //if the outcome is Positive, It Means the new Date is greater than old date\n //eg , If th eoutput is >=1 it means date of appointment is in future\n \nvar olddt = new Date(olddate);\nvar newdt = new Date(newdate);\n\nreturn Math.floor((Date.UTC(newdt.getFullYear(), newdt.getMonth(), newdt.getDate()) - Date.UTC(olddt.getFullYear(), olddt.getMonth(), olddt.getDate()) ) /(1000 * 60 * 60 * 24));\n\n}", "function dayTime(currentTime){\n if (currentTime >= 7){\n return true;\n } else {\n return false;\n }\n }", "function disabledDate2(current) {\n // No puede seleccionar fecha anterior a hoy\n return (\n current < addWeekdays(date, 7) ||\n moment(current).day() === 0 ||\n moment(current).day() === 6\n );\n }", "function determineDate(inputDate) {\n var inputTime = new Date(inputDate);\n return (inputTime - now > FOUR_DAYS) ? inputDate - ONE_WEEK : inputDate;\n }", "function checkDate(date) {\n if (date.getDay()== \"2\" || closeDay(date)){\n return [false, 'close'];\n } else if(date.getDay()== \"0\" || noreservationDay(date)) {\n return [false, 'noreservation'];\n } else if(fullDay(date)) {\n return [false, 'full'];\n } else if( date.getDate() == today.getDate() && date.getMonth() == today.getMonth() && date.getFullYear() == today.getFullYear() &&today.getHours() > 17) {\n return [false, ''];\n } else {\n return [true, 'valid'];\n }\n }", "function startOfUTCISOWeek(dirtyDate) {\n (0,_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_0__.default)(1, arguments);\n var weekStartsOn = 1;\n var date = (0,_toDate_index_js__WEBPACK_IMPORTED_MODULE_1__.default)(dirtyDate);\n var day = date.getUTCDay();\n var diff = (day < weekStartsOn ? 7 : 0) + day - weekStartsOn;\n date.setUTCDate(date.getUTCDate() - diff);\n date.setUTCHours(0, 0, 0, 0);\n return date;\n}", "function startOfUTCISOWeek(dirtyDate) {\n (0,_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_0__.default)(1, arguments);\n var weekStartsOn = 1;\n var date = (0,_toDate_index_js__WEBPACK_IMPORTED_MODULE_1__.default)(dirtyDate);\n var day = date.getUTCDay();\n var diff = (day < weekStartsOn ? 7 : 0) + day - weekStartsOn;\n date.setUTCDate(date.getUTCDate() - diff);\n date.setUTCHours(0, 0, 0, 0);\n return date;\n}", "function startOfUTCISOWeek(dirtyDate) {\n (0,_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_0__.default)(1, arguments);\n var weekStartsOn = 1;\n var date = (0,_toDate_index_js__WEBPACK_IMPORTED_MODULE_1__.default)(dirtyDate);\n var day = date.getUTCDay();\n var diff = (day < weekStartsOn ? 7 : 0) + day - weekStartsOn;\n date.setUTCDate(date.getUTCDate() - diff);\n date.setUTCHours(0, 0, 0, 0);\n return date;\n}", "function startOfUTCISOWeek(dirtyDate) {\n (0,_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_0__.default)(1, arguments);\n var weekStartsOn = 1;\n var date = (0,_toDate_index_js__WEBPACK_IMPORTED_MODULE_1__.default)(dirtyDate);\n var day = date.getUTCDay();\n var diff = (day < weekStartsOn ? 7 : 0) + day - weekStartsOn;\n date.setUTCDate(date.getUTCDate() - diff);\n date.setUTCHours(0, 0, 0, 0);\n return date;\n}", "function startOfUTCISOWeek(dirtyDate) {\n (0,_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_0__.default)(1, arguments);\n var weekStartsOn = 1;\n var date = (0,_toDate_index_js__WEBPACK_IMPORTED_MODULE_1__.default)(dirtyDate);\n var day = date.getUTCDay();\n var diff = (day < weekStartsOn ? 7 : 0) + day - weekStartsOn;\n date.setUTCDate(date.getUTCDate() - diff);\n date.setUTCHours(0, 0, 0, 0);\n return date;\n}", "function startOfUTCISOWeek(dirtyDate) {\n (0,_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_0__.default)(1, arguments);\n var weekStartsOn = 1;\n var date = (0,_toDate_index_js__WEBPACK_IMPORTED_MODULE_1__.default)(dirtyDate);\n var day = date.getUTCDay();\n var diff = (day < weekStartsOn ? 7 : 0) + day - weekStartsOn;\n date.setUTCDate(date.getUTCDate() - diff);\n date.setUTCHours(0, 0, 0, 0);\n return date;\n}", "function startOfUTCISOWeek(dirtyDate) {\n (0,_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_0__.default)(1, arguments);\n var weekStartsOn = 1;\n var date = (0,_toDate_index_js__WEBPACK_IMPORTED_MODULE_1__.default)(dirtyDate);\n var day = date.getUTCDay();\n var diff = (day < weekStartsOn ? 7 : 0) + day - weekStartsOn;\n date.setUTCDate(date.getUTCDate() - diff);\n date.setUTCHours(0, 0, 0, 0);\n return date;\n}", "function getTodayPlus(offset, baseDate) {\n if (!baseDate) {\n baseDate = new Date(); // using today as the base\n }\n\n baseDate.setTime(baseDate.getTime() + offset * 86400000);\n return baseDate;\n }", "function dateGetter(name,size,offset,trim,negWrap){if(offset===void 0){offset=0;}if(trim===void 0){trim=false;}if(negWrap===void 0){negWrap=false;}return function(date,locale){var part=getDatePart(name,date);if(offset>0||part>-offset){part+=offset;}if(name===DateType.Hours){if(part===0&&offset===-12){part=12;}}else if(name===DateType.FractionalSeconds){return formatFractionalSeconds(part,size);}var localeMinus=getLocaleNumberSymbol(locale,NumberSymbol.MinusSign);return padNumber(part,size,localeMinus,trim,negWrap);};}", "function isWeekend(day,date)\n{\ntemp=new Date(date);\ntemp.setDate(day);\nd=temp.getDay();\nif(d==0 || d==6)\n{\nreturn true;\n}\nreturn false;\n}", "function dayDiff(day, from) {\n return (day - from + 7) % 7;\n}", "function startOfUTCISOWeek(dirtyDate) {\n Object(_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(1, arguments);\n var weekStartsOn = 1;\n var date = Object(_toDate_index_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(dirtyDate);\n var day = date.getUTCDay();\n var diff = (day < weekStartsOn ? 7 : 0) + day - weekStartsOn;\n date.setUTCDate(date.getUTCDate() - diff);\n date.setUTCHours(0, 0, 0, 0);\n return date;\n}", "function startOfUTCISOWeek(dirtyDate) {\n Object(_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(1, arguments);\n var weekStartsOn = 1;\n var date = Object(_toDate_index_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(dirtyDate);\n var day = date.getUTCDay();\n var diff = (day < weekStartsOn ? 7 : 0) + day - weekStartsOn;\n date.setUTCDate(date.getUTCDate() - diff);\n date.setUTCHours(0, 0, 0, 0);\n return date;\n}", "function startOfUTCISOWeek(dirtyDate) {\n Object(_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(1, arguments);\n var weekStartsOn = 1;\n var date = Object(_toDate_index_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(dirtyDate);\n var day = date.getUTCDay();\n var diff = (day < weekStartsOn ? 7 : 0) + day - weekStartsOn;\n date.setUTCDate(date.getUTCDate() - diff);\n date.setUTCHours(0, 0, 0, 0);\n return date;\n}", "function startOfUTCISOWeek(dirtyDate) {\n Object(_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(1, arguments);\n var weekStartsOn = 1;\n var date = Object(_toDate_index_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(dirtyDate);\n var day = date.getUTCDay();\n var diff = (day < weekStartsOn ? 7 : 0) + day - weekStartsOn;\n date.setUTCDate(date.getUTCDate() - diff);\n date.setUTCHours(0, 0, 0, 0);\n return date;\n}", "function startOfUTCISOWeek(dirtyDate) {\n Object(_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(1, arguments);\n var weekStartsOn = 1;\n var date = Object(_toDate_index_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(dirtyDate);\n var day = date.getUTCDay();\n var diff = (day < weekStartsOn ? 7 : 0) + day - weekStartsOn;\n date.setUTCDate(date.getUTCDate() - diff);\n date.setUTCHours(0, 0, 0, 0);\n return date;\n}", "function startOfUTCISOWeek(dirtyDate) {\n Object(_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(1, arguments);\n var weekStartsOn = 1;\n var date = Object(_toDate_index_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(dirtyDate);\n var day = date.getUTCDay();\n var diff = (day < weekStartsOn ? 7 : 0) + day - weekStartsOn;\n date.setUTCDate(date.getUTCDate() - diff);\n date.setUTCHours(0, 0, 0, 0);\n return date;\n}", "function startOfUTCISOWeek(dirtyDate) {\n Object(_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(1, arguments);\n var weekStartsOn = 1;\n var date = Object(_toDate_index_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(dirtyDate);\n var day = date.getUTCDay();\n var diff = (day < weekStartsOn ? 7 : 0) + day - weekStartsOn;\n date.setUTCDate(date.getUTCDate() - diff);\n date.setUTCHours(0, 0, 0, 0);\n return date;\n}", "function startOfUTCISOWeek(dirtyDate) {\n Object(_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(1, arguments);\n var weekStartsOn = 1;\n var date = Object(_toDate_index_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(dirtyDate);\n var day = date.getUTCDay();\n var diff = (day < weekStartsOn ? 7 : 0) + day - weekStartsOn;\n date.setUTCDate(date.getUTCDate() - diff);\n date.setUTCHours(0, 0, 0, 0);\n return date;\n}", "function startOfUTCISOWeek(dirtyDate) {\n Object(_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(1, arguments);\n var weekStartsOn = 1;\n var date = Object(_toDate_index_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(dirtyDate);\n var day = date.getUTCDay();\n var diff = (day < weekStartsOn ? 7 : 0) + day - weekStartsOn;\n date.setUTCDate(date.getUTCDate() - diff);\n date.setUTCHours(0, 0, 0, 0);\n return date;\n}", "function dayIndex(date) {\n return date.getDay();\n}", "checkDateExpiresOn(date) {\n let currentDate = new Date(Date.now());\n let givenDate = new Date(this.stringFormatDate(date));\n if (givenDate < currentDate) {\n return true;\n }\n return false;\n }", "function DefDateDay(yy,mm,dd)\n{\nreturn Math.floor((Date2Days(yy,mm,dd)-2) % 7) + 1;\n}", "function startOfUTCISOWeek(dirtyDate) {\n (0,_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(1, arguments);\n var weekStartsOn = 1;\n var date = (0,_toDate_index_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(dirtyDate);\n var day = date.getUTCDay();\n var diff = (day < weekStartsOn ? 7 : 0) + day - weekStartsOn;\n date.setUTCDate(date.getUTCDate() - diff);\n date.setUTCHours(0, 0, 0, 0);\n return date;\n}", "function checkOverdue(date) {\n var today = new Date();\n var mm = today.getMonth() + 1;\n var dd = today.getDate();\n var yyyy = today.getFullYear();\n if (parseInt(date.substr(6,4)) >= yyyy &&\n parseInt(date.substr(0,2)) >= mm &&\n parseInt(date.substr(3,2)) >= dd) {\n return false;\n } else {\n return true;\n }\n} //end checkOverdue", "getDayNo(date) {\n\t\t// return new Date(date).getUTCDate();// 1\n\t\treturn Moment(date).format('DD');// 01\n\t}", "includesDate(other) {\n var _this2 = this;\n\n const date = other.isDateInfo ? other : new dateInfo_DateInfo(other, this.opts);\n\n if (!this.shallowIncludesDate(date)) {\n return false;\n }\n\n if (!this.on) {\n return true;\n }\n\n const range = this.findShallowIntersectingRange(this, date);\n let result = true;\n this.iterateDatesInRange(range, function (state) {\n if (_this2.matchesDay(state.day)) {\n result = result && date.matchesDay(state.day);\n state.finished = !result;\n }\n });\n return result;\n }", "includesDate(other) {\n var _this2 = this;\n\n const date = other.isDateInfo ? other : new dateInfo_DateInfo(other, this.opts);\n\n if (!this.shallowIncludesDate(date)) {\n return false;\n }\n\n if (!this.on) {\n return true;\n }\n\n const range = this.findShallowIntersectingRange(this, date);\n let result = true;\n this.iterateDatesInRange(range, function (state) {\n if (_this2.matchesDay(state.day)) {\n result = result && date.matchesDay(state.day);\n state.finished = !result;\n }\n });\n return result;\n }", "function nextDOW(dayName, excludeToday = true, refDate = new Date()) {\n\tconst dayOfWeek = [\"sun\",\"mon\",\"tue\",\"wed\",\"thu\",\"fri\",\"sat\"]\n .indexOf(dayName.slice(0,3).toLowerCase());\n\tif (dayOfWeek < 0) return;\n\tnewDate = new Date(refDate);\n\tnewDate.setHours(1,0,0,0); // setHours(1) to force correct day in case of UTC/BST issues\n\tnewDate.setDate(newDate.getDate() + !!excludeToday + (dayOfWeek + 7 - newDate.getDay() - !!excludeToday) % 7);\n\treturn newDate;\n}", "function isDateWithinSameDay(date1, date2) {\n return date1.getDate() === date2.getDate() &&\n date1.getMonth() === date2.getMonth() &&\n date1.getFullYear() === date2.getFullYear();\n }", "isDay() {\n let hours = new Date(Date.now()).getHours()\n return hours >= 7 && hours <= 21\n }", "_noEntry(){\n const tomorrow = this.date.getDate() + 1;\n this.date.setDate(tomorrow);\n }", "function cellOffsetToDayOffset(cellOffset) {\n\t\tvar day0 = t.visStart.getDay(); // first date's day of week\n\t\tcellOffset += dayToCellMap[day0]; // normlize cellOffset to beginning-of-week\n\t\treturn Math.floor(cellOffset / cellsPerWeek) * 7 // # of days from full weeks\n\t\t\t+ cellToDayMap[ // # of days from partial last week\n\t\t\t\t(cellOffset % cellsPerWeek + cellsPerWeek) % cellsPerWeek // crazy math to handle negative cellOffsets\n\t\t\t]\n\t\t\t- day0; // adjustment for beginning-of-week normalization\n\t}", "function cellOffsetToDayOffset(cellOffset) {\n\t\tvar day0 = t.visStart.getDay(); // first date's day of week\n\t\tcellOffset += dayToCellMap[day0]; // normlize cellOffset to beginning-of-week\n\t\treturn Math.floor(cellOffset / cellsPerWeek) * 7 // # of days from full weeks\n\t\t\t+ cellToDayMap[ // # of days from partial last week\n\t\t\t\t(cellOffset % cellsPerWeek + cellsPerWeek) % cellsPerWeek // crazy math to handle negative cellOffsets\n\t\t\t]\n\t\t\t- day0; // adjustment for beginning-of-week normalization\n\t}", "function cellOffsetToDayOffset(cellOffset) {\n\t\tvar day0 = t.visStart.getDay(); // first date's day of week\n\t\tcellOffset += dayToCellMap[day0]; // normlize cellOffset to beginning-of-week\n\t\treturn Math.floor(cellOffset / cellsPerWeek) * 7 // # of days from full weeks\n\t\t\t+ cellToDayMap[ // # of days from partial last week\n\t\t\t\t(cellOffset % cellsPerWeek + cellsPerWeek) % cellsPerWeek // crazy math to handle negative cellOffsets\n\t\t\t]\n\t\t\t- day0; // adjustment for beginning-of-week normalization\n\t}", "outsideTimeFrame() {\n\t\tconst date = new Date();\n\t\tconst weekday = date.getDay() || 7; // JavaScript days are Sun-Sat 0-6 but we want Mon-Sun 1-7.\n\t\tconst hour = date.getHours();\n\n\t\tif (weekday < window.pizzakitTimes.start.weekday) {\n\t\t\treturn true;\n\t\t}\n\t\telse if (weekday == window.pizzakitTimes.start.weekday) {\n\t\t\tif (hour < window.pizzakitTimes.start.hours) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\tif (window.pizzakitTimes.end.weekday < weekday) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\telse if (window.pizzakitTimes.end.weekday == weekday) {\n\t\t\t\tif (window.pizzakitTimes.end.hours <= hour) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn false;\n\t}", "function tzTokenizeDate(date, timeZone) {\n var dtf = getDateTimeFormat(timeZone);\n return dtf.formatToParts ? partsOffset(dtf, date) : hackyOffset(dtf, date)\n}", "function tzTokenizeDate(date, timeZone) {\n var dtf = getDateTimeFormat(timeZone);\n return dtf.formatToParts ? partsOffset(dtf, date) : hackyOffset(dtf, date);\n}" ]
[ "0.6852997", "0.6852997", "0.66000175", "0.64474636", "0.6234923", "0.6171766", "0.60891175", "0.6050031", "0.59065974", "0.5902533", "0.5902533", "0.5902533", "0.5865114", "0.58583325", "0.58446234", "0.5819917", "0.5819917", "0.5757572", "0.56975555", "0.5696399", "0.56866497", "0.562097", "0.5599743", "0.5596994", "0.55944175", "0.5585661", "0.5577575", "0.5555616", "0.55258524", "0.54790324", "0.5470896", "0.547044", "0.5461851", "0.54482764", "0.5430546", "0.5409714", "0.54", "0.53946465", "0.5384587", "0.53749186", "0.53737974", "0.5368459", "0.5352442", "0.53433007", "0.5340597", "0.5293722", "0.5277522", "0.52690864", "0.52690864", "0.526647", "0.52518123", "0.5247181", "0.5242501", "0.524175", "0.5234799", "0.5234007", "0.521874", "0.52092636", "0.5208649", "0.5206946", "0.52047336", "0.52047336", "0.52047336", "0.52047336", "0.52047336", "0.52047336", "0.52047336", "0.52024835", "0.5192885", "0.51925987", "0.51835716", "0.5182439", "0.5182439", "0.5182439", "0.5182439", "0.5182439", "0.5182439", "0.5182439", "0.5182439", "0.5182439", "0.5181627", "0.5181013", "0.5180828", "0.51807487", "0.5175746", "0.5174655", "0.51723564", "0.51723564", "0.5169762", "0.5167865", "0.51634794", "0.51587415", "0.5155533", "0.5155533", "0.5155533", "0.51495147", "0.51366335", "0.5128639" ]
0.6656873
3
day offset > cell offset
function dayOffsetToCellOffset(dayOffset) { var day0 = t.visStart.getDay(); // first date's day of week dayOffset += day0; // normalize dayOffset to beginning-of-week return Math.floor(dayOffset / 7) * cellsPerWeek // # of cells from full weeks + dayToCellMap[ // # of cells from partial last week (dayOffset % 7 + 7) % 7 // crazy math to handle negative dayOffsets ] - dayToCellMap[day0]; // adjustment for beginning-of-week normalization }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function dayOffsetToCellOffset(dayOffset) {\n\t\tvar day0 = t.start.day(); // first date's day of week\n\t\tdayOffset += day0; // normalize dayOffset to beginning-of-week\n\t\treturn Math.floor(dayOffset / 7) * cellsPerWeek + // # of cells from full weeks\n\t\t\tdayToCellMap[ // # of cells from partial last week\n\t\t\t\t(dayOffset % 7 + 7) % 7 // crazy math to handle negative dayOffsets\n\t\t\t] -\n\t\t\tdayToCellMap[day0]; // adjustment for beginning-of-week normalization\n\t}", "function dayOffsetToCellOffset(dayOffset) {\n\t\tvar day0 = t.start.day(); // first date's day of week\n\t\tdayOffset += day0; // normalize dayOffset to beginning-of-week\n\t\treturn Math.floor(dayOffset / 7) * cellsPerWeek + // # of cells from full weeks\n\t\t\tdayToCellMap[ // # of cells from partial last week\n\t\t\t\t(dayOffset % 7 + 7) % 7 // crazy math to handle negative dayOffsets\n\t\t\t] -\n\t\t\tdayToCellMap[day0]; // adjustment for beginning-of-week normalization\n\t}", "function cellOffsetToDayOffset(cellOffset) {\n\t\tvar day0 = t.visStart.getDay(); // first date's day of week\n\t\tcellOffset += dayToCellMap[day0]; // normlize cellOffset to beginning-of-week\n\t\treturn Math.floor(cellOffset / cellsPerWeek) * 7 // # of days from full weeks\n\t\t\t+ cellToDayMap[ // # of days from partial last week\n\t\t\t\t(cellOffset % cellsPerWeek + cellsPerWeek) % cellsPerWeek // crazy math to handle negative cellOffsets\n\t\t\t]\n\t\t\t- day0; // adjustment for beginning-of-week normalization\n\t}", "function cellOffsetToDayOffset(cellOffset) {\n\t\tvar day0 = t.visStart.getDay(); // first date's day of week\n\t\tcellOffset += dayToCellMap[day0]; // normlize cellOffset to beginning-of-week\n\t\treturn Math.floor(cellOffset / cellsPerWeek) * 7 // # of days from full weeks\n\t\t\t+ cellToDayMap[ // # of days from partial last week\n\t\t\t\t(cellOffset % cellsPerWeek + cellsPerWeek) % cellsPerWeek // crazy math to handle negative cellOffsets\n\t\t\t]\n\t\t\t- day0; // adjustment for beginning-of-week normalization\n\t}", "function cellOffsetToDayOffset(cellOffset) {\n\t\tvar day0 = t.visStart.getDay(); // first date's day of week\n\t\tcellOffset += dayToCellMap[day0]; // normlize cellOffset to beginning-of-week\n\t\treturn Math.floor(cellOffset / cellsPerWeek) * 7 // # of days from full weeks\n\t\t\t+ cellToDayMap[ // # of days from partial last week\n\t\t\t\t(cellOffset % cellsPerWeek + cellsPerWeek) % cellsPerWeek // crazy math to handle negative cellOffsets\n\t\t\t]\n\t\t\t- day0; // adjustment for beginning-of-week normalization\n\t}", "function cellOffsetToDayOffset(cellOffset) {\n\t\tvar day0 = t.start.day(); // first date's day of week\n\t\tcellOffset += dayToCellMap[day0]; // normlize cellOffset to beginning-of-week\n\t\treturn Math.floor(cellOffset / cellsPerWeek) * 7 + // # of days from full weeks\n\t\t\tcellToDayMap[ // # of days from partial last week\n\t\t\t\t(cellOffset % cellsPerWeek + cellsPerWeek) % cellsPerWeek // crazy math to handle negative cellOffsets\n\t\t\t] -\n\t\t\tday0; // adjustment for beginning-of-week normalization\n\t}", "function cellOffsetToDayOffset(cellOffset) {\n\t\tvar day0 = t.start.day(); // first date's day of week\n\t\tcellOffset += dayToCellMap[day0]; // normlize cellOffset to beginning-of-week\n\t\treturn Math.floor(cellOffset / cellsPerWeek) * 7 + // # of days from full weeks\n\t\t\tcellToDayMap[ // # of days from partial last week\n\t\t\t\t(cellOffset % cellsPerWeek + cellsPerWeek) % cellsPerWeek // crazy math to handle negative cellOffsets\n\t\t\t] -\n\t\t\tday0; // adjustment for beginning-of-week normalization\n\t}", "function calculateDayOffset(date)\n{\n var dayFormula = 1000*60*60*24;\n return Math.round(new Date().getTime()/dayFormula - date.getTime()/dayFormula);\n}", "function daysPosition(day, offset) {\n let days = ['monday', 'tuesday', 'wednesday', 'thursday', 'friday', 'saturday', 'sunday']\n\n if (days.indexOf(day.toLowerCase()) < 0) {\n return \"That's not a day of the week\"\n }\n\n if (!offset) {\n days.unshift(...days.splice(6, 1))\n }\n\n return days.indexOf(day.toLowerCase()) + 1\n}", "function E(a){// TODO: remove because mom.hasTime() from realCellToDate() is better\nreturn Na(\"allDaySlot\")&&!a.row}", "function C(a){var b=G.start.day();// normalize dayOffset to beginning-of-week\n// first date's day of week\n// # of cells from full weeks\n// # of cells from partial last week\nreturn a+=b,Math.floor(a/7)*N+Q[(a%7+7)%7]-Q[b]}", "function get_selected_day() {\r\n return $('.days_panel .day.day_selected').attr('day_offset');\r\n}", "function dateToDayOffset(date) {\n\t\treturn dayDiff(date, t.visStart);\n\t}", "function dateToDayOffset(date) {\n\t\treturn dayDiff(date, t.visStart);\n\t}", "function dateToDayOffset(date) {\n\t\treturn dayDiff(date, t.visStart);\n\t}", "function dateToCell(date) {\n\t\tvar dayOffset = dateToDayOffset(date);\n\t\tvar cellOffset = dayOffsetToCellOffset(dayOffset);\n\t\tvar cell = cellOffsetToCell(cellOffset);\n\t\treturn cell;\n\t}", "function dateToCell(date) {\n\t\tvar dayOffset = dateToDayOffset(date);\n\t\tvar cellOffset = dayOffsetToCellOffset(dayOffset);\n\t\tvar cell = cellOffsetToCell(cellOffset);\n\t\treturn cell;\n\t}", "function dateToCell(date) {\n\t\tvar dayOffset = dateToDayOffset(date);\n\t\tvar cellOffset = dayOffsetToCellOffset(dayOffset);\n\t\tvar cell = cellOffsetToCell(cellOffset);\n\t\treturn cell;\n\t}", "function dateToCell(date) {\n\t\tvar dayOffset = dateToDayOffset(date);\n\t\tvar cellOffset = dayOffsetToCellOffset(dayOffset);\n\t\tvar cell = cellOffsetToCell(cellOffset);\n\t\treturn cell;\n\t}", "function dateToCell(date) {\n\t\tvar dayOffset = dateToDayOffset(date);\n\t\tvar cellOffset = dayOffsetToCellOffset(dayOffset);\n\t\tvar cell = cellOffsetToCell(cellOffset);\n\t\treturn cell;\n\t}", "function dateToDayOffset(date) {\n\t\treturn date.clone().stripTime().diff(t.start, 'days');\n\t}", "function dateToDayOffset(date) {\n\t\treturn date.clone().stripTime().diff(t.start, 'days');\n\t}", "function getCellForDate ( dt ) {\n\t\t\treturn ROOT.querySelector('[data-calc=\"' + getCalcForDate(dt) + '\"][data-valid=\"true\"]');\n\t\t}", "function E(a){// TODO: remove because mom.hasTime() from realCellToDate() is better\nreturn Qa(\"allDaySlot\")&&!a.row}", "function fillDays() {\n var i;\n var calendarDays = document\n .getElementById(\"calendarTable\")\n .getElementsByTagName(\"tbody\")[0]\n .getElementsByClassName(\"day\");\n\n //get month -current month is April -so this got 3\n month = date.getMonth();\n console.log(month);\n //get year -current year is 2019\n year = date.getFullYear();\n console.log(year);\n var daysOffset = new Date(year, month, 1).getDay();\n console.log(daysOffset);\n var numberOfDays = new Date(year, month + 1, 0).getDate(); //0 for day gives last day of the PREVIOUS month\n console.log(numberOfDays);\n\n //clear cells\n for (i = 0; i < calendarDays.length; i++) {\n calendarDays[i].innerHTML = \"&nbsp\";\n }\n\n //populate cells with dates, 1-31\n for (i = 1; i <= numberOfDays; i++) {\n calendarDays[daysOffset].innerHTML = i;\n daysOffset++;\n }\n}", "function y(a){var b=G.start.day();// normlize cellOffset to beginning-of-week\n// first date's day of week\n// # of days from full weeks\n// # of days from partial last week\nreturn a+=Q[b],7*Math.floor(a/N)+R[(a%N+N)%N]-b}", "function findWorkingColumn(today) {\n var firstColumn = 2\n , lastColumn = rangeData.getLastColumn() - 1\n , dateSearchRange = sheet.getRange(firstColumn, 2, 1, lastColumn)\n , rangeValues = dateSearchRange.getValues();\n\n for (i = 0; i < lastColumn; i++) {\n var date = Utilities.formatDate(rangeValues[0][i], \"GMT\", \"yyyy-MM-dd\");\n\n if (date === today) {\n return i + 2;\n }\n }\n}", "function search_weekday(weekday, jd, direction, offset)\n {\n return weekday_before(weekday, jd + (direction * offset));\n }", "function compareDaySegCols(a, b) {\n return a.leftCol - b.leftCol;\n}", "function compareDaySegCols(a, b) {\n return a.leftCol - b.leftCol;\n}", "function compareDaySegCols(a, b) {\n return a.leftCol - b.leftCol;\n}", "function compareDaySegCols(a, b) {\n return a.leftCol - b.leftCol;\n}", "function compareDaySegCols(a, b) {\n return a.leftCol - b.leftCol;\n}", "function search_weekday(weekday, jd, direction, offset) {\n return weekday_before(weekday, jd + (direction * offset));\n}", "function compareDaySegCols(a, b) {\n\treturn a.leftCol - b.leftCol;\n}", "function compareDaySegCols(a, b) {\n\treturn a.leftCol - b.leftCol;\n}", "function compareDaySegCols(a, b) {\n\treturn a.leftCol - b.leftCol;\n}", "function compareDaySegCols(a, b) {\n\treturn a.leftCol - b.leftCol;\n}", "function compareDaySegCols(a, b) {\n\treturn a.leftCol - b.leftCol;\n}", "function compareDaySegCols(a, b) {\n\treturn a.leftCol - b.leftCol;\n}", "function compareDaySegCols(a, b) {\n\treturn a.leftCol - b.leftCol;\n}", "function compareDaySegCols(a, b) {\n\treturn a.leftCol - b.leftCol;\n}", "function compareDaySegCols(a, b) {\n\t\treturn a.leftCol - b.leftCol;\n\t}", "function compareDaySegCols(a, b) {\n return a.leftCol - b.leftCol;\n }", "function compareDaySegCols(a, b) {\n return a.leftCol - b.leftCol;\n }", "function compareDaySegCols(a, b) {\n return a.leftCol - b.leftCol;\n }", "function compareDaySegCols(a, b) {\n return a.leftCol - b.leftCol;\n }", "styleEvents(events){\n const {\n day\n } = this.props;\n\n const columnEndTimes = [];\n\n return events.map((event) => {\n const { startDate, endDate } = event;\n\n const startOfDayUnix = day.startMoment.valueOf();\n const endOfDayUnix = day.endMoment.valueOf();\n\n let styles = {\n top:`${((startDate - startOfDayUnix)/(endOfDayUnix - startOfDayUnix))*100}%`,\n height: (DAY_COLUMN_HEIGHT/MS_IN_DAY)*(endDate-startDate)\n };\n\n // columns - this just offsets everything 45px*the col. We might want to change this to a percentage based on the total # of cols in the future.\n // loop through all the column event times and find the lowest column with no overlap\n for (let [idx, columnEndTime] of columnEndTimes.entries()) {\n if (startDate >= columnEndTime) {\n columnEndTimes[idx] = endDate;\n\n styles = {\n ...styles,\n left: `${idx*45}px`,\n zIndex: idx\n };\n\n break;\n }\n }\n\n // if there is STILL overlap, then we need to make a new column\n // with the current event's endTime there.\n if(!styles.left) {\n columnEndTimes.push(endDate);\n\n styles = {\n ...styles,\n left: `${(columnEndTimes.length - 1)*45}px`,\n zIndex: columnEndTimes.length - 1\n };\n\n }\n\n return {\n ...event,\n styles\n };\n });\n }", "function weekOffset(dayOffset) {\n if (dayOffset >= 0) {\n return Math.floor(dayOffset / 7);\n }\n dayOffset = -dayOffset;\n dayOffset--;\n return -Math.floor(dayOffset / 7) - 1;\n}", "col_row_offset_from_offset(offset) {\n return [\n this.cell_from_offset(this.cell_width, offset.left),\n this.cell_from_offset(this.cell_height, offset.top),\n ];\n }", "renderCells() {\n const { currentMonth, today, booked } = this.state;\n const monthStart = dateFns.startOfMonth(currentMonth);\n const monthEnd = dateFns.endOfMonth(monthStart);\n const startDate = dateFns.startOfWeek(monthStart);\n const endDate = dateFns.endOfWeek(monthEnd);\n\n const dateFormat = \"D\";\n const rows = [];\n\n let days = [];\n let day = startDate;\n let formattedDate = \"\";\n\n // loop from startDate to endDate to show all the dates\n while (day <= endDate) {\n for (let i = 0; i < 7; i++) {\n formattedDate = dateFns.format(day, dateFormat);\n const cloneDay = day;\n // determine if day is disabled, today or has event and assign the style\n days.push(\n <div\n className={`col cell ${\n !dateFns.isSameMonth(day, monthStart)\n ? \"disabled\"\n : dateFns.isSameDay(day, today) ? \"selected\" : \"\"\n }${booked.map((book) => dateFns.isSameDay(day, book) ? \"booked\" : \"\").join('')}\n ` }\n \n key={day}\n onClick={() => this.onDateClick(dateFns.parse(cloneDay))}\n >\n <span className=\"number\">{formattedDate}</span>\n <span className=\"bg\">{formattedDate}</span>\n \n </div>\n );\n day = dateFns.addDays(day, 1);\n }\n rows.push(\n <div className=\"row\" key={day}>\n {days}\n </div>\n );\n days = [];\n }\n return <div className=\"body\">{rows}</div>;\n }", "function getIndexPos() {\n // var range = 96;\n var d = new Date();\n var currentHour = d.getHours(); //get time in hours\n return currentHour * 4 + 1;\n }", "getDateOffset(date) {\n let currentTime = date ? new Date(date) : new Date();\n let currentOffset = date ? currentTime.getTimezoneOffset(): 0;\n return new Date(currentTime.getTime() +Math.abs(currentOffset*60000));\n }", "function getIsCellAllDay(cell) { // TODO: remove because mom.hasTime() from realCellToDate() is better\n\t\treturn opt('allDaySlot') && !cell.row;\n\t}", "function getIsCellAllDay(cell) { // TODO: remove because mom.hasTime() from realCellToDate() is better\n\t\treturn opt('allDaySlot') && !cell.row;\n\t}", "function findWorkingRow(time) {\n var firstRow = 3\n , lastRow = 24\n , hourSearchRange = sheet.getRange(firstRow, 1, lastRow, 1)\n , rangeValues = hourSearchRange.getValues();\n\n for (i = 0; i < lastRow; i++) {\n // Some weird conversion of these hour formatted cells here... Gotta offset by 6..idk why.\n var hour = Utilities.formatDate(rangeValues[i][0], \"GMT-6\", \"HH\");\n\n if (hour === time) {\n return i + 3;\n }\n }\n}", "function onHourChange() {\r\n clearTimer();\r\n //casy prevedene na cisla\r\n var t1,t2;\r\n //Pozice bunky\r\n var index = td==null?0:td.cellIndex+1;\r\n if(tr.cells.length<=index)\r\n return false;\r\n //Nalezeni bunky aktualni hodiny\r\n if(td==null) {\r\n //Prvni spusteni: Najit bunku odpovidajici nasemu casu\r\n \r\n for(var i=0,l=casy2.length; i<l; i++) {\r\n //Rozdelim casy na hodiny a minuty\r\n t1 = casy2[i][0].split(\":\");\r\n t2 = casy2[i][1].split(\":\");\r\n //console.log(t1,t2,[hr,min]);\r\n //Zjistim, zda se aktualni cas nachazi v intervalu\r\n if(isTimeBigger(hr, min, 1*t1[0], 1*t1[1]) && isTimeBigger(1*t2[0], 1*t2[1], hr, min)) {\r\n //Skocim na bunku\r\n var pos = 0; //pocet projitych bunek\r\n var ipos = 0; //pocet projitych casu\r\n while(ipos<i) {\r\n pos++;\r\n ipos+=1+getSpan(tr.cells[pos+cell_padding]);\r\n }\r\n td = tr.cells[pos+cell_padding];\r\n console.log(td);\r\n //taky si ulozim pozici v poli casu\r\n timepos = ipos-getSpan(td); //ipos je pocet hodin pred touhle bunkou, ale vcetne tehle bunky a jejiho poctu, odecitam vsak pouze jeji span, pokud ma bunka span, muzem zacinat uprostred, ale vse se pocita z rozmeru bunky\r\n //nactu skutecne casove hodnoty\r\n getTimeVals(td, timepos); \r\n console.log(i, ipos, pos, getSpan(td));\r\n break;\r\n }\r\n else\r\n console.log(hr,min,t1,t2);\r\n }\r\n if(td==null) {\r\n console.error(hr,min,tr, t1, t2);\r\n throw new Error(\"No suitable cell was found!\");\r\n } \r\n }\r\n else {\r\n //Skok o hodinu dale\r\n timepos++;\r\n //Skok i o vic, pokud posledni pole zahrnovalo vic hodin\r\n timepos+=getSpan(td);\r\n //Preskocit na dalsi bunku, spocitat casy\r\n td = tr.cells[index];\r\n getTimeVals(td, timepos);\r\n }\r\n //Zapamatovat si puvodni CSS tridu pro pripadne obnoveni\r\n if(td.oldClassName==null) {\r\n td.oldClassName = td.className;\r\n td.className+=\" timer\";\r\n }\r\n //Vykreslit casoznacku\r\n updateTimer();\r\n }", "function addDayOfWeekToMissedDays()\r\n{\r\n\t$(\"tr td[colspan=4]:not(.grey)\").each(function(){\r\n\t\tvar dateField = this.previousSibling.previousSibling;\r\n\t\t\t\t\r\n\t\tif(isInt($(dateField).text()[0]))\r\n\t\t{\t\t\r\n\t\t\tsetupDay(dateField,\tnull);\r\n\t\t}\r\n\t});\r\n}", "function cellCompete(states, days) {\n\t// WRITE YOUR CODE HERE\n\tif (days === 0) return false;\n\tif (states == null || states.length === 0) return false;\n\n\tlet tmp = [...states];\n\n\twhile (days > 0) {\n\t\tlet j = 0;\n\t\tfor (let i = 0; i < 8; i++) {\n\t\t\tj = i + 1;\n\t\t\tif (i === 0) {\n\t\t\t\t//left edge cell\n\t\t\t\tif (states[j] === 0) {\n\t\t\t\t\ttmp[i] = 0;\n\t\t\t\t} else {\n\t\t\t\t\ttmp[i] = 1;\n\t\t\t\t}\n\t\t\t} else if (i === 7) {\n\t\t\t\t//rigth edge cell\n\t\t\t\tif (states[i - 1] === 0) {\n\t\t\t\t\ttmp[i] = 0;\n\t\t\t\t} else {\n\t\t\t\t\ttmp[i] = 1;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif (states[i - 1] === states[j]) {\n\t\t\t\t\ttmp[i] = 0;\n\t\t\t\t} else {\n\t\t\t\t\ttmp[i] = 1;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tdays--;\n\t\tstates = [...tmp];\n\t}\n\n\treturn states;\n}", "function dayOffsetToDate(dayOffset) {\n\t\tvar date = cloneDate(t.visStart);\n\t\taddDays(date, dayOffset);\n\t\treturn date;\n\t}", "function dayOffsetToDate(dayOffset) {\n\t\tvar date = cloneDate(t.visStart);\n\t\taddDays(date, dayOffset);\n\t\treturn date;\n\t}", "function dayOffsetToDate(dayOffset) {\n\t\tvar date = cloneDate(t.visStart);\n\t\taddDays(date, dayOffset);\n\t\treturn date;\n\t}", "function cellsTranslate(d,i){\n \n let cellSize = timeDaySize;\n\n let rowsLength = 7;\n let colsLength = 7;\n let cols = Math.floor(i/colsLength); // divide to place into rows, floor to get rid of decimals\n let rows = i % rowsLength; // using remainder to detect when to switch to next column. \n // use remainder instead of division to loop through 0-5\n \n\n // let x = 1475 + cellSize * rows * 2.5;\n // let y = 100+ cellSize * cols * 3;\n \n let x = 1475 + cellSize * rows * 2.5;\n let y = 100+ cellSize * cols * 3;\n \n \n return \"translate(\" + x + \",\" + y + \")\";\n}", "_handleCalendarCellHover(event, cell) {\n const that = this;\n\n if (that._animationStarted) {\n return;\n }\n\n if (that.displayMode === 'month') {\n if (event.type === 'mouseover' && that.selectionMode === 'many' && that.selectedDates.length > 0) {\n const months = that.$.monthsContainer.children;\n\n for (let m = 0; m < months.length; m++) {\n that._getMonthCells(months[m]).map(cell => {\n that._setCellState(cell, 'hover', false);\n });\n }\n\n let firstSelectedDate = new Date(that.selectedDates[0]),\n targetDate = new Date(cell.value),\n targetCell = cell;\n const nextCoeff = firstSelectedDate.getTime() > targetDate.getTime() ? -1 : 1,\n hoverCell = function () {\n targetCell = that._getCellByDate(firstSelectedDate, that.$.monthsContainer);\n\n if (targetCell && !targetCell.selected && !targetCell.restricted) {\n that._setCellState(targetCell, 'hover', true);\n }\n };\n\n if (firstSelectedDate.getTime() !== targetDate.getTime()) {\n firstSelectedDate.setDate(firstSelectedDate.getDate() + nextCoeff);\n while (firstSelectedDate.getTime() !== targetDate.getTime()) {\n hoverCell();\n firstSelectedDate.setDate(firstSelectedDate.getDate() + nextCoeff);\n }\n\n hoverCell();\n }\n }\n else {\n that._setCellState(cell, 'hover', false);\n }\n }\n\n if (event.type === 'mouseover' && !cell.otherMonth) {\n that._setCellState(cell, 'hover', true);\n }\n else {\n that._setCellState(cell, 'hover', false);\n }\n }", "function getRowDay(row) {\n let dayText = null\n\n // sessions whose durations overlap, are placed on adjacent rows\n // these rows do not contain data about the weekday\n // so retrace rows until the current weekday is determined\n\n while (!dayText && $(row).prev()[0] !== row) {\n dayText = $(row).find('.weekday').text()\n row = $(row).prev()\n }\n\n return DAYS.indexOf(dayText)\n}", "function calendarDate() {\n //Need to be able to handle when dateOffset > than weekDays array \n //calendarDateOffset = dateOffset;\n $(\"#calendar-date\").empty();\n $(\"#calendar-date\").append( (weekDays[d.getUTCDay() + dateOffset]) + \" , \" + (months[d.getUTCMonth()]) + \" \" + (d.getUTCDate() + dateOffset) );\n}", "function getDay(offset = 0) {\n const day = new Date();\n const weekday = ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'];\n return weekday[(day.getDay() + offset) % 7];\n}", "cell_from_offset(sizes, offset) {\n // We explore the grid in both directions, starting from the origin.\n let index = 0;\n const original_offset = offset;\n if (offset === 0) {\n return [index, 0];\n }\n // The following two loops have been kept separate to increase readability.\n // Explore to the right or bottom...\n while (offset >= 0) {\n const size = this.cell_size(sizes, index);\n if (offset < size) {\n return [index, original_offset - offset];\n }\n offset -= size;\n ++index;\n }\n // Explore to the left or top...\n while (offset <= 0) {\n --index;\n const size = this.cell_size(sizes, index);\n if (Math.abs(offset) < size) {\n return [index, original_offset - (offset + size)];\n }\n offset += size;\n }\n }", "function setPositionByTime(element, starttime, endtime, day) {\n var gridHeight = window.innerHeight - 80;\n var hourHeight = (gridHeight * .11625) / 2;\n \n //SET THE TOP\n element.style.top = (80 + (hourHeight * (starttime - 8)) + 5).toString() + \"px\";\n\n //SET THE HEIGHT\n //Calculation: The -10 is for the 5px margin on top and bottom, the -2 is\n //for the top and bottom border (1px each)\n element.style.height = (((endtime-starttime)*hourHeight) - 10 - 2).toString() + \"px\";\n\n //SET THE LEFT\n var leftIndent = (window.innerWidth * .10) + 5.0;\n var rowWidth = (window.innerWidth * .3);\n if (day == \"Friday\") {\n element.style.left = leftIndent.toString() + \"px\";\n } else if (day == \"Saturday\") {\n element.style.left = (leftIndent + rowWidth).toString() + \"px\";\n } else if (day == \"Sunday\") {\n element.style.left = (leftIndent + (rowWidth * 2.0)).toString() + \"px\";\n }\n\n //SET THE WIDTH\n //Calculation: The -10 is for the 5px margin on the right and left,\n //the -2 is for the right and left border\n element.style.width = (rowWidth - 10 - 2).toString() + \"px\";\n }", "function addToDay(row, day) {\n var sheet = SpreadsheetApp.getActiveSpreadsheet().getSheetByName(day);\n \n \n var startDate = new Date(row[masterCols.start_time]);\n var endDate = new Date(row[masterCols.end_time]);\n Logger.log(startDate);\n var startPoint = startDate.getHours() * 2+2; //Start hour\n var endPoint = (endDate.getHours() === 0) ? 24 * 2+1 : endDate.getHours() * 2 + 1; //End hour\n \n if (startDate.getMinutes() === 30){startPoint += 1;} //start min\n if (endDate.getMinutes() === 30){endPoint += 1;} //end min\n \n var words = row[masterCols.event_section].split(\",\"); //delimiter\n \n //if workshop is the first word, then we use the next keyword as its event\n //This is an artefact of a request from Bitcamp 2019\n var section = (words[0] === \"Workshop\") ? words[1] : words[0]; //Event Section\n var col, bg;\n \n Logger.log(section);\n \n for (var i = 0; i < eventCategories.totalEvents; i++){\n if (section === eventCategories[i].name){\n col = eventCategories[i].col, bg = eventCategories[i].hex;\n break;\n }\n }\n \n var startCell = col+startPoint;\n var endCell = col+endPoint;\n Logger.log(startCell);\n \n //if an event already exists at that cell, then put this event in the overflow col\n //In the future we may need more overflow columns\n \n if (sheet.getRange(startCell).getBackground() !== \"#ffffff\"){ startCell = 'G'+startPoint; endCell = 'G'+endPoint;}\n else if (sheet.getRange(endCell).getBackground() !== \"#ffffff\"){ startCell = 'G'+startPoint; endCell = 'G'+endPoint;}\n else if (sheet.getRange(col+Math.floor((startPoint+endPoint)/2)).getBackground() !== \"#ffffff\"){ startCell = 'G'+startPoint; endCell = 'G'+endPoint;}\n \n if (sheet.getRange(startCell).getBackground() !== \"#ffffff\"){ startCell = 'H'+startPoint; endCell = 'H'+endPoint;}\n \n //error will occur if start and end time are the exact same, as endCell will occur before startCell\n if (startPoint === endPoint + 1){endCell = startCell;}\n \n sheet.getRange(startCell).setValue(row[masterCols.title]);\n sheet.getRange(startCell+\":\"+endCell).setBackground(bg).setVerticalAlignment(\"middle\").setBorder(true, true, true, true, true, false);\n}", "function cellOffsetToCell(cellOffset) {\n\t\tvar colCnt = t.getColCnt();\n\n\t\t// rtl variables. wish we could pre-populate these. but where?\n\t\tvar dis = isRTL ? -1 : 1;\n\t\tvar dit = isRTL ? colCnt - 1 : 0;\n\n\t\tvar row = Math.floor(cellOffset / colCnt);\n\t\tvar col = ((cellOffset % colCnt + colCnt) % colCnt) * dis + dit; // column, adjusted for RTL (dis & dit)\n\t\treturn {\n\t\t\trow: row,\n\t\t\tcol: col\n\t\t};\n\t}", "function cellOffsetToCell(cellOffset) {\n\t\tvar colCnt = t.getColCnt();\n\n\t\t// rtl variables. wish we could pre-populate these. but where?\n\t\tvar dis = isRTL ? -1 : 1;\n\t\tvar dit = isRTL ? colCnt - 1 : 0;\n\n\t\tvar row = Math.floor(cellOffset / colCnt);\n\t\tvar col = ((cellOffset % colCnt + colCnt) % colCnt) * dis + dit; // column, adjusted for RTL (dis & dit)\n\t\treturn {\n\t\t\trow: row,\n\t\t\tcol: col\n\t\t};\n\t}", "function cellOffsetToCell(cellOffset) {\n\t\tvar colCnt = t.getColCnt();\n\n\t\t// rtl variables. wish we could pre-populate these. but where?\n\t\tvar dis = isRTL ? -1 : 1;\n\t\tvar dit = isRTL ? colCnt - 1 : 0;\n\n\t\tvar row = Math.floor(cellOffset / colCnt);\n\t\tvar col = ((cellOffset % colCnt + colCnt) % colCnt) * dis + dit; // column, adjusted for RTL (dis & dit)\n\t\treturn {\n\t\t\trow: row,\n\t\t\tcol: col\n\t\t};\n\t}", "function cellOffsetToCell(cellOffset) {\n\t\tvar colCnt = t.getColCnt();\n\n\t\t// rtl variables. wish we could pre-populate these. but where?\n\t\tvar dis = isRTL ? -1 : 1;\n\t\tvar dit = isRTL ? colCnt - 1 : 0;\n\n\t\tvar row = Math.floor(cellOffset / colCnt);\n\t\tvar col = ((cellOffset % colCnt + colCnt) % colCnt) * dis + dit; // column, adjusted for RTL (dis & dit)\n\t\treturn {\n\t\t\trow: row,\n\t\t\tcol: col\n\t\t};\n\t}", "function cellOffsetToCell(cellOffset) {\n\t\tvar colCnt = t.getColCnt();\n\n\t\t// rtl variables. wish we could pre-populate these. but where?\n\t\tvar dis = isRTL ? -1 : 1;\n\t\tvar dit = isRTL ? colCnt - 1 : 0;\n\n\t\tvar row = Math.floor(cellOffset / colCnt);\n\t\tvar col = ((cellOffset % colCnt + colCnt) % colCnt) * dis + dit; // column, adjusted for RTL (dis & dit)\n\t\treturn {\n\t\t\trow: row,\n\t\t\tcol: col\n\t\t};\n\t}", "isDay() {\n\t\treturn (Date.now() + 60000 * new Date().getTimezoneOffset() + 21600000) % 86400000 / 3600000 > 12;\n\t}", "function calculateOffsetIE(){\n calculateOffset(el);\n try {\n while (el = el.offsetParent) { calculateOffset(el); }\n } catch(e) {\n // Hello, internet explorer.\n }\n }", "function calculateOffsetIE(){\n calculateOffset(el);\n try {\n while (el = el.offsetParent) { calculateOffset(el); }\n } catch(e) {\n // Hello, internet explorer.\n }\n }", "function offset_function(_, i){\n var x = -0.5 + ( Math.floor(i / num_cell) ) / num_cell ;\n var y = -0.5 + (i % num_cell) / num_cell ;\n return [x, y];\n }", "function dayOffsetToDate(dayOffset) {\n\t\treturn t.start.clone().add('days', dayOffset);\n\t}", "function dayOffsetToDate(dayOffset) {\n\t\treturn t.start.clone().add('days', dayOffset);\n\t}", "refreshColumns() {\n this.iterateDays().iterate(d => {\n let markers = [];\n for (let event of d.events) {\n if (!event.fullDay) {\n markers.push({\n time: event.time.start.time,\n event: event,\n start: true,\n parent: null\n });\n markers.push({\n time: event.time.end.time - 1,\n event: event,\n start: false,\n parent: null\n });\n }\n }\n markers.sort((a, b) => {\n return a.time - b.time;\n });\n let parent = null;\n for (let marker of markers) {\n if (marker.start) {\n marker.parent = parent;\n parent = marker;\n }\n else if (parent) {\n parent = parent.parent;\n }\n }\n for (let marker of markers) {\n if (marker.start) {\n marker.event.col = marker.parent ? marker.parent.event.col + 1 : 0;\n }\n }\n });\n return this;\n }", "_weeksDownHandler(event, cell) {\n const that = this,\n date = cell.value;\n let neighbourMonth;\n\n if (cell.otherMonth) {\n neighbourMonth = cell.value.getTime() > cell.closest('.jqx-calendar-month')._date.getTime() ? 1 : -1;\n }\n\n if (that.hasRippleAnimation) {\n JQX.Utilities.Animation.Ripple.animate(cell, event.pageX, event.pageY);\n }\n\n if (neighbourMonth) {\n if (that._isDateInView(cell.value)) {\n return;\n }\n\n if (!that.disableAutoNavigation) {\n that.navigate(neighbourMonth * that.months);\n }\n\n return;\n }\n\n cell = that._getCellByDate(date);\n\n if (cell && (cell.disabled || cell.restricted)) {\n return;\n }\n\n that._handleDateSelection(cell);\n }", "function isPadding(cell) {\n return cell[3];\n }", "function calendarGridGen(col){\n var dayWidth = $(\".day\").width();\n var dayMargin = $(\".day\").css(\"margin\").replace(\"px\", \"\");\n var calendarPadding = $(\".calendar-page\").css(\"padding\").replace(\"px\", \"\");\n var calendarWidth = ((dayWidth*col) + ((dayMargin)*col)*2) + (calendarPadding*2);\n $(\".calendar-page\").css(\"width\" , calendarWidth);\n}", "getAntimeridianAdjustment() {\n const localHoursOffset = this.getLocalMeanTimeOffset() / GeoLocation.HOUR_MILLIS;\n // if the offset is 20 hours or more in the future (never expected anywhere other\n // than a location using a timezone across the anti meridian to the east such as Samoa)\n if (localHoursOffset >= 20) {\n // roll the date forward a day\n return 1;\n }\n else if (localHoursOffset <= -20) {\n // if the offset is 20 hours or more in the past (no current location is known\n // that crosses the antimeridian to the west, but better safe than sorry)\n // roll the date back a day\n return -1;\n }\n // 99.999% of the world will have no adjustment\n return 0;\n }", "function calendarGridGen(col){\n var dayWidth = $(\".day\").width();\n var dayMargin = $(\".day\").css(\"margin\").replace(\"px\", \"\");\n var calendarPadding = $(\".calendar-page\").css(\"padding\").replace(\"px\", \"\");\n var calendarWidth = ((dayWidth*calendarCol) + ((dayMargin)*calendarCol)*2) + (calendarPadding*2);\n $(\".calendar-page\").css(\"width\" , calendarWidth);\n}", "function cellCompete(states, days)\n{\n // WRITE YOUR CODE HERE \n for (let i = 0; i< days; i++) {\n \n \n let dayResult = [];\n states.forEach((cellState, index)=>{\n let leftVal = (index == 0) ? 0 : grid [index -1] ;\n let rightVal = (index == grid.length -1)? 0: grid[index+1];\n \n dayResult[index] = (leftVal==rightVal)? 0: 1;\n console.log(dayResult);\n \n //if (index = 0) {\n // left val = 0 else\n // left val = state [index-1]\n // }\n });\n states = dayResult;\n \n }\n return states;\n}", "function getMarkersByDay(cal_event){\n var results = new Array();\n calendar_events = $('#calendar').weekCalendar(\"serializeEvents\");\n calendar_helper_sortEvents(calendar_events); \n\n for (var i in calendar_events){\n var evnt = calendar_events[i];\n if (calendar_helper_dateEquals(evnt.start, cal_event.start))\n results.push(evnt.marker.position) \n }\n \n return results;\n}", "function calcLifebarIndex(t) {\n var d = new Date(t);\n var startOfCurrentDay = lastUpdate.getTime() - (lastUpdate.getTime() % ONEDAY);\n var startOfTDay = t - (t % ONEDAY);\n var diff = (startOfCurrentDay - startOfTDay) / ONEDAY;\n return d.getHours() + ((13 - diff) * 24);\n}", "function nearest_weekday(weekday, jd)\n {\n return search_weekday(weekday, jd, 1, 3);\n }", "moins(nombreJours){\n return this.offset(-1*nombreJours*24*3600)\n}", "_navigateDays(event) {\n const that = this;\n let iterations = event.key === 'ArrowUp' || event.key === 'ArrowDown' ? 7 : 1,\n coefficient = event.key === 'ArrowUp' || event.key === 'ArrowLeft' || event.key === 'PageUp' ? -1 : 1;\n\n switch (event.key) {\n case 'ArrowUp':\n case 'ArrowLeft':\n case 'ArrowDown':\n case 'ArrowRight':\n if (!that._handleArrowKeys(event, iterations, coefficient)) {\n return;\n }\n\n break;\n case ' ':\n case 'Enter':\n if (that.displayMode !== 'month') {\n\n that._displayModeHandler(that.displayModeView === 'list' ? that.$.listViewContainer.getItem(that.$.listViewContainer.selectedValues[0]) : that._focusedCell);\n return;\n }\n\n break;\n case 'Control':\n case 'Shift':\n if (that.selectionMode === 'default') {\n that._keysPressed[event.key] = true;\n }\n\n return;\n case 'Home':\n case 'End': {\n //Prevent window scrolling\n event.preventDefault();\n\n let targetDate,\n getTargetMonthDay = function (days) {\n if (event.key === 'Home') {\n for (let d = 0; d < days.length; d++) {\n if (!days[d].otherMonth && (!days[d].disabled || !days[d].restricted)) {\n return days[d];\n }\n }\n }\n else {\n for (let d = days.length - 1; d >= 0; d--) {\n if (!days[d].otherMonth && (!days[d].disabled || !days[d].restricted)) {\n return days[d];\n }\n }\n }\n };\n\n if (that.displayMode !== 'month') {\n targetDate = getTargetMonthDay(that.$.dateViewContainer.children);\n }\n else {\n targetDate = getTargetMonthDay(that._getMonthCells(that._focusedCell.closest('.jqx-calendar-month'), that.rightToLeft));\n }\n\n if (!targetDate) {\n return;\n }\n\n that._focusCell(targetDate);\n\n if (that.displayMode !== 'month') {\n return;\n }\n\n break;\n }\n case 'PageUp':\n case 'PageDown': {\n if (!that._handlePageUpDownKeys(event, coefficient)) {\n return;\n }\n\n break;\n }\n default:\n return;\n }\n\n if (that._focusedCell) {\n that._handleDateSelection(that._focusedCell);\n }\n }", "function returnCol(cell) {\n\treturn cell % 9;\n}", "function cursorIsInsideOfTableCell(dom, offsets, cellNode){\n var isInsideOfCell = true;\n var allText = dom.documentElement.outerHTML;\n var cellOuterHTML = cellNode.outerHTML;\n var selStr = allText.substring(offsets[0],offsets[1]);\n \n if ( stripWhiteSpace(selStr) == stripWhiteSpace(cellOuterHTML) ){\n isInsideOfCell = false;\n }\n\n return isInsideOfCell;\n}", "renderDateGrid(dateObj) {\n // We basing all the calculations with Sunday being 0, Monday = 1 etc\n\n const gridBody = document.querySelector('#dateGrid');\n\n if(typeof(gridBody) != 'undefined' && gridBody != null){\n while (gridBody.firstChild) {\n gridBody.removeChild(gridBody.firstChild);\n }\n } else{\n console.log('Element does not exist!');\n }\n\n const start = parseInt(dateObj.startOfMonth, 10); \n let dayCounter = parseInt(dateObj.daysInMonth, 10);\n let runningTotal = 0;\n let dateTotal = 1;\n let maxRows = 0;\n\n // To determine how many rows, based on start of month and how many days in the month\n if (dayCounter > 30 && start >= 5) {\n maxRows = 6;\n } else if (dayCounter >= 30 && start >= 6) {\n maxRows = 6;\n } \n else {\n maxRows = 5;\n }\n\n // Here is the meet of the grid, where we do our calculation based on Moment data\n for (let i = 0; i < maxRows; i++) {\n const row = document.createElement('tr');\n gridBody.appendChild(row);\n \n for (let j = 0; j < 7; j++) {\n const cell = document.createElement('td');\n\n if (runningTotal < start) {\n cell.classList.add('not_in_month');\n runningTotal++;\n } else if (dateTotal <= dayCounter) {\n cell.classList.add('in_month');\n\n cell.textContent = dateTotal;\n cell.addEventListener('click', event => {\n let day = cell.textContent;\n console.log(day, 'hello');\n this.calcBookingDate(dateObj, day);\n popBack.classList.remove('displayBlock');\n popBack.classList.add('displayNone');\n });\n dateTotal++;\n } else {\n cell.classList.add('not_in_month');\n }\n \n row.appendChild(cell);\n \n // to break to next row\n if (j > 6) {\n break;\n }\n }\n }\n }", "function initCells(){\n\t\tvar days = ['Monday', 'Tuesday', 'Wednesday', \n\t\t\t'Thursday', 'Friday', 'Saturday', 'Sunday'];\n\t\tvar tableRows = document.getElementById('schedTable').children[0].children;\n\t\tvar numericClass = 0000;\n\t\tvar toggle = true;\n\t\tvar first = true;\n\t\tfor(row in tableRows){\n\t\t\tif(!isNaN(row)){\n\t\t\t\tvar tableDatas = tableRows[row].children;\n\t\t\t\tif(!first){\n\t\t\t\t\tvar counter = 0;\n\t\t\t\t\tfor(dat in tableDatas){\n\t\t\t\t\t\tif(!isNaN(dat)){\n\t\t\t\t\t\t\tif(!tableDatas[dat].classList.contains('timeLabel')){\n\t\t\t\t\t\t\t\tvar html = days[counter].toLowerCase();\n\t\t\t\t\t\t\t\tcounter++\n\t\t\t\t\t\t\t\ttableDatas[dat].classList.add(html);\n\t\t\t\t\t\t\t\ttableDatas[dat].classList.add(numericClass);\n\t\t\t\t\t\t\t\ttableDatas[dat].classList.add('cell');\n\t\t\t\t\t\t\t\ttableDatas[dat].setAttribute('data-type','');\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif(toggle){\n\t\t\t\t\t\tnumericClass += 30;\n\t\t\t\t\t\ttoggle = false;\n\t\t\t\t\t}\n\t\t\t\t\telse{\n\t\t\t\t\t\tnumericClass += 70;\n\t\t\t\t\t\ttoggle = true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\tfirst = false;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "function nearest_weekday(weekday, jd){\n return search_weekday(weekday, jd, 1, 3);\n}" ]
[ "0.71999806", "0.71999806", "0.7089495", "0.7089495", "0.7089495", "0.69556844", "0.69556844", "0.6013744", "0.6004352", "0.5970007", "0.59467673", "0.5759576", "0.57284325", "0.57284325", "0.57284325", "0.5680983", "0.5680983", "0.5680983", "0.5680983", "0.5680983", "0.5665322", "0.5665322", "0.5647765", "0.56459916", "0.56412673", "0.5627682", "0.56207556", "0.55877453", "0.55789435", "0.55789435", "0.55789435", "0.55789435", "0.55789435", "0.55778545", "0.5543561", "0.5543561", "0.5543561", "0.5543561", "0.5543561", "0.5543561", "0.5543561", "0.5543561", "0.5540669", "0.5524071", "0.5524071", "0.5524071", "0.5524071", "0.5500042", "0.5404324", "0.5396999", "0.5381309", "0.53679055", "0.53577405", "0.5346725", "0.5346725", "0.53424513", "0.53144455", "0.5310047", "0.53012604", "0.530036", "0.530036", "0.530036", "0.52910924", "0.52807164", "0.5278766", "0.5270658", "0.5251625", "0.5242855", "0.52196807", "0.521249", "0.51981354", "0.51981354", "0.51981354", "0.51981354", "0.51981354", "0.518301", "0.51827836", "0.51827836", "0.51782525", "0.51767904", "0.51767904", "0.51659006", "0.5151832", "0.51290596", "0.51255655", "0.5113801", "0.51031303", "0.51010597", "0.50860876", "0.50852776", "0.50616914", "0.50615406", "0.505814", "0.5049931", "0.5045887", "0.5045156", "0.50220126", "0.5012263" ]
0.7303795
1
cell offset > cell (object with row & col keys)
function cellOffsetToCell(cellOffset) { var colCnt = t.getColCnt(); // rtl variables. wish we could pre-populate these. but where? var dis = isRTL ? -1 : 1; var dit = isRTL ? colCnt - 1 : 0; var row = Math.floor(cellOffset / colCnt); var col = ((cellOffset % colCnt + colCnt) % colCnt) * dis + dit; // column, adjusted for RTL (dis & dit) return { row: row, col: col }; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "getCellPosition(column, row) {\n return {x: column * CELL.WIDTH, y: row * CELL.HEIGHT};\n }", "function findPosition(cell) {\n let x = parseInt(cell.attr(\"value\").substring(0, 1));\n let y = parseInt(cell.attr(\"value\").substring(1));\n\n return {\n x: x, \n y: y\n }\n}", "at(row, col) {\n\t\treturn this.cells[DokuCell.calculateIndex(row, col)]\n\t}", "function getCoordinates(cell) {\n return {\n x: (cell) % 10,\n y: Math.floor((cell) / 10)\n }\n}", "function calcCellPosition (i, j) {\n return {\n x: map(i, 0, gridSize - 1, 5 * (-(gridSize - 1) / gridSize), 5 * ((gridSize - 1) / gridSize)),\n y: -map(j, 0, gridSize - 1, 5 * (-(gridSize - 1) / gridSize), 5 * ((gridSize - 1) / gridSize))\n }\n}", "function getCellIndex(x, y) {\n return y * 10 + x;\n}", "function getCell(pos) { return gameField.querySelector(\"table\").rows[pos[1]].cells[pos[0]]; }", "function rowcol(idx) {\n return {\n row: Math.floor(idx / 8),\n col: idx % 8\n }\n }", "function grid_from_offset(pos){\n\t \tvar location = {\n\t \t\tcol: Math.floor(pos.left/tileWidth) + 1,\n\t \t\trow: Math.floor(pos.top/tileHeight) + 1\n\t \t}\n\t \treturn location;\n\t }", "calculateCellsPosition(x, y) {\n let position = {};\n\n position.x = (Cell.config.cellSize + Cell.config.cellMargin) * x;\n position.y = (Cell.config.cellSize + Cell.config.cellMargin) * y;\n\n return position;\n }", "cellIndex(x, y) {\n var indexNumber = x + y*this.width;\n return this.cells[indexNumber];\n }", "function offset_from_location(row, col){\n\t\tvar offset = $('.tile-board').offset();\n\t\toffset.left += (col-1)*tileWidth;\n\t\toffset.top += (row-1)*tileHeight;\n\t\treturn offset;\n\t}", "cell_from_offset(sizes, offset) {\n // We explore the grid in both directions, starting from the origin.\n let index = 0;\n const original_offset = offset;\n if (offset === 0) {\n return [index, 0];\n }\n // The following two loops have been kept separate to increase readability.\n // Explore to the right or bottom...\n while (offset >= 0) {\n const size = this.cell_size(sizes, index);\n if (offset < size) {\n return [index, original_offset - offset];\n }\n offset -= size;\n ++index;\n }\n // Explore to the left or top...\n while (offset <= 0) {\n --index;\n const size = this.cell_size(sizes, index);\n if (Math.abs(offset) < size) {\n return [index, original_offset - (offset + size)];\n }\n offset += size;\n }\n }", "col_row_offset_from_offset(offset) {\n return [\n this.cell_from_offset(this.cell_width, offset.left),\n this.cell_from_offset(this.cell_height, offset.top),\n ];\n }", "function index(row, col) {\n return row * 8 + col;\n }", "function offsetToPosition(offset) {\n var index = -1\n var length = indices.length\n\n if (offset < 0) {\n return {}\n }\n\n while (++index < length) {\n if (indices[index] > offset) {\n return {\n line: index + 1,\n column: offset - (indices[index - 1] || 0) + 1,\n offset: offset\n }\n }\n }\n\n return {}\n }", "function offsetToPosition(offset) {\n var index = -1\n var length = indices.length\n\n if (offset < 0) {\n return {}\n }\n\n while (++index < length) {\n if (indices[index] > offset) {\n return {\n line: index + 1,\n column: offset - (indices[index - 1] || 0) + 1,\n offset: offset\n }\n }\n }\n\n return {}\n }", "function offsetToPosition(offset) {\n var index = -1\n var length = indices.length\n\n if (offset < 0) {\n return {}\n }\n\n while (++index < length) {\n if (indices[index] > offset) {\n return {\n line: index + 1,\n column: offset - (indices[index - 1] || 0) + 1,\n offset: offset\n }\n }\n }\n\n return {}\n }", "function offsetToPosition(offset) {\n var index = -1\n var length = indices.length\n\n if (offset < 0) {\n return {}\n }\n\n while (++index < length) {\n if (indices[index] > offset) {\n return {\n line: index + 1,\n column: offset - (indices[index - 1] || 0) + 1,\n offset: offset\n }\n }\n }\n\n return {}\n }", "function offsetToPosition(offset) {\n var index = -1\n var length = indices.length\n\n if (offset < 0) {\n return {}\n }\n\n while (++index < length) {\n if (indices[index] > offset) {\n return {\n line: index + 1,\n column: offset - (indices[index - 1] || 0) + 1,\n offset: offset\n }\n }\n }\n\n return {}\n }", "function Cell() {\n this.objectContainer = [];\n this.neighborOffsetArray;\n this.occupiedCellsIndex = null;\n this.allCellsIndex = null;\n } // ---------------------------------------------------------------------", "cellState(row, col) {\n const cells = this.cells;\n return cells[ this.to_1d(row, col) * this.cellBytes ];\n }", "function getCellCoords(c){\n\n let x = (c % 3) * cell;\n let y = Math.floor(c / 3) * cell\n\n return {\n 'x': x,\n 'y': y,\n };\n}", "function offsetToPoint(offset) {\n var index = -1\n var length = indices.length\n\n if (offset < 0) {\n return {}\n }\n\n while (++index < length) {\n if (indices[index] > offset) {\n return {\n line: index + 1,\n column: offset - (indices[index - 1] || 0) + 1,\n offset: offset\n }\n }\n }\n\n return {}\n }", "function offsetToPoint(offset) {\n var index = -1\n\n if (offset > -1 && offset < indices[indices.length - 1]) {\n while (++index < indices.length) {\n if (indices[index] > offset) {\n return {\n line: index + 1,\n column: offset - (indices[index - 1] || 0) + 1,\n offset: offset\n }\n }\n }\n }\n\n return {}\n }", "function offsetToPoint(offset) {\n var index = -1\n\n if (offset > -1 && offset < indices[indices.length - 1]) {\n while (++index < indices.length) {\n if (indices[index] > offset) {\n return {\n line: index + 1,\n column: offset - (indices[index - 1] || 0) + 1,\n offset: offset\n }\n }\n }\n }\n\n return {}\n }", "function offsetToPoint(offset) {\n var index = -1;\n\n if (offset > -1 && offset < indices[indices.length - 1]) {\n while (++index < indices.length) {\n if (indices[index] > offset) {\n return {\n line: index + 1,\n column: offset - (indices[index - 1] || 0) + 1,\n offset: offset\n }\n }\n }\n }\n\n return {}\n }", "function Cell() {\n this.objectContainer = [];\n this.neighborOffsetArray;\n this.occupiedCellsIndex = null;\n this.allCellsIndex = null;\n }", "getItem(x,y) { return this.getCell(x,y)._mapItem;}", "rowColToIndex(row, col) {\n return col + row * this.col;\n }", "function Cell(x, y, x2, y2) {\n this.cur = [x, y];\n this.pre = [x2, y2];\n}", "cellGet(x, y) {\r\n if (this.isInside(x,y)) {\r\n return this.field[x + y * this.width];\r\n }\r\n return this.emptyCell;\r\n }", "function computeInOffsetByIndex(x, y, index) {\n var outx = x + 15;\n var outy = y + 47 + index * 20;\n\n return { x: outx, y: outy };\n}", "positionOfFocus(focus, rowOffset) {\n const row = this._rows[focus.row];\n if (row === undefined) {\n return undefined;\n }\n const rowPos = focus.row + rowOffset;\n if (focus.column < 0) {\n return new point_1.Point(rowPos, focus.offset);\n }\n const cellWidths = row.getCells().map((cell) => cell.rawContent.length);\n const maxIndex = Math.min(focus.column, cellWidths.length);\n let columnPos = row.marginLeft.length + 1;\n for (let columnIndex = 0; columnIndex < maxIndex; columnIndex++) {\n columnPos += cellWidths[columnIndex] + 1;\n }\n return new point_1.Point(rowPos, columnPos + focus.offset);\n }", "function getTileCoordinate(column, row, columnoffset, rowoffset) {\n var tilex = level.x + (column + columnoffset) * level.tilewidth;\n var tiley = level.y + (row + rowoffset) * level.tileheight;\n return { tilex: tilex, tiley: tiley};\n }", "function getTileCoordinate(column, row, columnoffset, rowoffset) {\n var tilex = level.x + (column + columnoffset) * level.tilewidth;\n var tiley = level.y + (row + rowoffset) * level.tileheight;\n return { tilex: tilex, tiley: tiley};\n }", "function getTileCoordinate(column, row, columnoffset, rowoffset) {\n var tilex = level.x + (column + columnoffset) * level.tilewidth;\n var tiley = level.y + (row + rowoffset) * level.tileheight;\n \n return { tilex: tilex, tiley: tiley};\n }", "offset_from_position(position) {\n const offset = Offset.zero();\n\n // We attempt to explore in each of the four directions in turn.\n // These four loops could be simplified, but have been left as-is to aid readability.\n\n if (position.x > 0) {\n for (let col = 0; col < Math.floor(position.x); ++col) {\n offset.left += this.cell_size(this.cell_width, col);\n }\n offset.left\n += this.cell_size(this.cell_width, Math.floor(position.x)) * (position.x % 1);\n }\n if (position.x < 0) {\n for (let col = -1; col >= position.x; --col) {\n offset.left -= this.cell_size(this.cell_width, col);\n }\n offset.left\n += this.cell_size(this.cell_width, Math.floor(position.x)) * (position.x % 1);\n }\n\n if (position.y > 0) {\n for (let row = 0; row < Math.floor(position.y); ++row) {\n offset.top += this.cell_size(this.cell_height, row);\n }\n offset.top\n += this.cell_size(this.cell_height, Math.floor(position.y)) * (position.y % 1);\n }\n if (position.y < 0) {\n for (let row = -1; row >= position.y; --row) {\n offset.top -= this.cell_size(this.cell_height, row);\n }\n offset.top\n += this.cell_size(this.cell_height, Math.floor(position.y)) * (position.y % 1);\n }\n\n return offset;\n }", "pieceAt(row, col) {\n if(!this.inBounds(row, col)) {\n return undefined;\n } else {\n if(this.chessboard[row][col] === EMPTY_CELL) {\n return EMPTY_CELL;\n } else {\n return {\n type: this.chessboard[row][col][0],\n owner: this.chessboard[row][col][1]\n };\n }\n }\n }", "getRow() {\n return INDEX2ROW(this.cellIndex);\n }", "function getCellByCoord(i, j) {\n var elCell = document.querySelector(getSelector({ i: i, j: j }));\n return elCell;\n}", "function relocate(b, cell) {\n return tagOf(cell) < 3 ? cell + b : cell\n}", "function getPos(obj) {\n var offsets = obj.offset();\n objHeight = obj.height();\n objWidth = obj.width();\n excldH = objHeight/3; //Caculating 10% height\n top = offsets.top,\n left = offsets.left,\n bottom = top+objHeight,\n right = left+objWidth\n}", "function getCell(row,col) {\n\tif (row < 0) {\n\t\trow += numRows\n\t}\n\trow = row % numRows\n\tif (col < 0) {\n\t\tcol += numColumns\n\t}\n\tcol = col % numColumns\n\t\n\treturn cells.getAt(row * numColumns + col)\n}", "getObjectPosition(row, col) {\r\n\t\tvar posX = gameOptions.panSize * (col + 1) + gameOptions.horizontalPanSpace * (col + 0.13);\r\n var posY = gameOptions.panSize * (row + 1) + gameOptions.verticalPanSpace * (row + 0.13);\r\n return new Phaser.Geom.Point(posX, posY);\r\n\t}", "getObjectPosition(row, col) {\r\n\t\tvar posX = gameOptions.panSize * (col + 1) + gameOptions.horizontalPanSpace * (col + 0.13);\r\n var posY = gameOptions.panSize * (row + 1) + gameOptions.verticalPanSpace * (row + 0.13);\r\n return new Phaser.Geom.Point(posX, posY);\r\n\t}", "col_row_from_offset(offset) {\n return this.col_row_offset_from_offset(offset).map(([index, _]) => index);\n }", "function constructMarkedCell() {\n this.x = -1;\n this.y = -1; }", "function helpGetOffset(obj, coord) {\n\tvar val = obj[\"offset\"+coord] ;\n\tif (coord == \"Top\") val += obj.offsetHeight;\n\twhile ((obj = obj.offsetParent )!=null) {\n\t\tval += obj[\"offset\"+coord]; \n\t\tif (obj.border && obj.border != 0) val++; \n\t}\n\treturn val;\n}", "function putObjInCell( obj, i, j ) {\n var tempI = obj.i;\n var tempJ = obj.j;\n obj.i = i;\n obj.j = j;\n grid[i][j].occupiedBy = obj;\n obj.x = grid[i][j].x;\n obj.y = grid[i][j].y;\n grid[tempI][tempJ].occupiedBy = null;\n}", "getObjectPosition(row, col) {\r\n\t\tvar posX = gameOptions.panSize * (col + 1) + gameOptions.horizontalPanSpace * (col + 0.13);\t\t\t//150 * (0 + 1) + 87.5 * (0 + 0.13)\r\n var posY = gameOptions.panSize * (row + 1) + gameOptions.verticalPanSpace * (row + 0.13);\t\t\t\t//150 * (0 + 1) + 47.5 * (0 + 0.13)\r\n return new Phaser.Geom.Point(posX, posY);\r\n\t}", "getObjectPosition(row, col) {\r\n\t\tvar posX = gameOptions.panSize * (col + 1) + gameOptions.horizontalPanSpace * (col + 0.13);\t\t\t//150 * (0 + 1) + 87.5 * (0 + 0.13)\r\n var posY = gameOptions.panSize * (row + 1) + gameOptions.verticalPanSpace * (row + 0.13);\t\t\t\t//150 * (0 + 1) + 47.5 * (0 + 0.13)\r\n return new Phaser.Geom.Point(posX, posY);\r\n\t}", "function getPos(obj) {\n\t\tvar offsets = obj.offset();\n\t\tobjHeight = obj.height();\n\t\tobjWidth = obj.width();\n\t\texcldH = objHeight / 3; //Caculating 10% height\n\t\t(top = offsets.top),\n\t\t\t(left = offsets.left),\n\t\t\t(bottom = top + objHeight),\n\t\t\t(right = left + objWidth);\n\t}", "function getOffset(el) {\n const rect = el.getBoundingClientRect();\n return {\n left: rect.left,\n top: rect.top\n };\n }", "function cursorCell() {\n\t\t\treturn cellAt(cursor.y, cursor.x);\n\t\t}", "function cellPoint( table, item, cell ) {\n var poly = ( cell ? \n table.cells.filter('#'+table.tabid+'_'+cell[0]+'_'+cell[1]) :\n table.tabregion ).children('polygon');\n return poly.length === 0 ? null : poly[0].points.getItem(item) ;\n }", "function offset (info) {\r\n\treturn info.offset;\r\n}", "position_from_offset(offset) {\n const [col, row] = this.col_row_from_offset(offset);\n return new Position(col, row);\n }", "function Cell(top, bottom, left, right, index, id, posn, state) {\n\tthis.top = top;\n\tthis.bottom = bottom;\n\tthis.left =left;\n\tthis.right = right;\n\tthis.index=index;\n\tthis.id = id;\n\tthis.posn = posn;\n\tthis.state = state;\n}", "function getCellAt(x, y) {\n return $(\"td[data-col=\" + x + \"][data-row=\" + y + \"]\");\n}", "function getX(cell) {\n return cell[0];\n }", "function whichCell (row,col) {\n\t// checks that we are within the non-header rows of the table\n\t// rows are 1-3 (excludes header=0); cols are 0-3\n\tif(row<1 || row>3 || col<0 || col>3) {\n\t\treturn undefined;\n\t}\n\n\t// pick the row (header = 0 so we can do this direct)\n\tvar thisRow = table44.childNodes[row];\n\n\t// initialize the cell (must do col-1 as there is a col 0)\n\tvar thisCell = thisRow.childNodes[col];\n\n\t// returns desired cell\n\treturn thisCell;\n}", "static getCellAtCoords(eventXScreen, eventYScreen) {\n var currCell = document.elementFromPoint(eventXScreen, eventYScreen);\n\n if (!currCell) throw new Error(\"Unable to locate cell\");\n\n //sometimes gets rows or legospace\n for(let i=0; i<10; i++) {\n if (!currCell.className.match(/cell/)) {\n eventYScreen -= (i * 5); // - some amount from y to avoid landing on the row border, or lego face\n currCell = document.elementFromPoint(eventXScreen, eventYScreen);\n } else {\n break;\n }\n }\n\n //verify a cell //would be better to use jquery's parents()\n if (!currCell.className.match(/cell/) || !currCell.parentNode.parentNode.className.match(/plane-x/)) {\n console.log(\"not at cell\");\n console.dir(currCell);\n throw new Error(\"Unable to find cell\");\n }\n\n // currCell.style.backgroundColor = \"yellow\";\n var xPlaneCell = currCell.className.match(/cell-(\\d+)/)[1]\n var xPlaneRow = currCell.parentNode.className.match(/row-(\\d+)/)[1]\n return [currCell, xPlaneCell, xPlaneRow];\n }", "function offset_function(_, i){\n var x = -0.5 + ( Math.floor(i / num_cell) ) / num_cell ;\n var y = -0.5 + (i % num_cell) / num_cell ;\n return [x, y];\n }", "_positionCell() {\n if (this.props.inline) {\n return;\n }\n\n let position;\n if (!this.state.absolute) {\n position = this._getDialogPosition(this._dialog, this._table);\n }\n\n this.setState({ absolute: true, ...position });\n }", "function re(idx) {return {row: Math.floor(idx/elesPerRow), ele: idx%elesPerRow}}", "function getOffset(fieldIndex) {\n let gridCellSize = getGridCellSize();\n\n let xOffset = (width - gridCellSize * gridSize) / 2;\n let yOffset = (height - gridCellSize * gridSize) / 2;\n\n if (fieldIndex == 0 || fieldIndex == undefined) {\n xOffset -= (gridSize * gridCellSize) / 2 + 50;\n } else {\n xOffset += (gridSize * gridCellSize) / 2 + 50;\n }\n\n return {\n x: xOffset,\n y: yOffset,\n };\n}", "function getOffset(el) {\n const rect = el.getBoundingClientRect();\n return {\n //the 3 is the border\n left: rect.left + 3,\n top: rect.top + 3\n }\n}", "constructor(startCell) {\n this.currentCell = startCell;\n this.x = startCell.column;\n this.y = startCell.row;\n }", "function Cell() {\n this.row = -1;\n this.col = -1;\n\n this.neighbors = {\n north: null,\n east: null,\n west: null,\n south: null\n };\n\n this.links = [];\n}", "function getPositionIndex(e){\n\t\t\n\t\tvar totCells = cells.length,\n\t\t\ttotRows = Math.ceil(totCells / args.columns),\n\t\t\tcol = args.columns-1,\n\t\t\trow = totRows-1,\n\t\t\theightMult = (args.cellHeight + (2 * args.rowPadding)),\n\t\t\twidthMult = (args.cellWidth + (2 * args.columnPadding));\n\t\t\n\t\t//get the new row\n\t\tfor(var i = 0; i < totRows; i++){\n\t\t\tif(e.top < (i * heightMult) + (heightMult / 2)){\n\t\t\t\trow = i;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t\t\t\t\n\t\t//get the new column\n\t\tfor(var i = 0; i < args.columns; i++){\n\t\t\tif(e.left < (i * widthMult)+(widthMult/2)){\n\t\t\t\tcol = i;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tvar dPositionIndex = ((1*row)*args.columns)+col;\n\t\t\n\t\t//check to see if the index is out of bounds and just set it to the last cell\n\t\t//probably a better way to handle this\n\t\tif(dPositionIndex >= totCells){\n\t\t\tdPositionIndex = totCells-1;\n\t\t}\n\t\treturn \tdPositionIndex;\t\n\t}", "fetchCell(coords) {\n return this.cells[coords[0]][coords[1]];\n }", "configCells(){\n for (var j=0; j<this.rows; j++){\n for(var i=0; i<this.columns; i++){\n var c = this.cell(i,j) ;\n c.north = this.cell(i,j+1) ;\n c.south = this.cell(i,j-1) ;\n c.east = this.cell(i+1,j) ;\n c.west = this.cell(i-1,j) ;\n }\n }\n }", "cell(i,j){\n if (j == undefined &&\n i < this.size){\n return this._cells[i] ;\n }\n if (-1 < i && \n i < this.columns && \n -1 < j && \n j < this.rows ){\n var index = j*this.columns + i ;\n return this._cells[index] ;\n }else{\n return null ;\n }\n }", "function modelToViewPos(x, y, cellSize) {\n return {\n x: (x * cellSize) + (cellSize / 2),\n y: (y * cellSize) + (cellSize / 2),\n };\n}", "function xy_to_id(cell) {\n return ROW * cell.x + cell.y + 1;\n}", "getCell(x,y) { \n if(x<0 || y<0 || x>=mw || y>=mh) return this._openCell \n return this._gridCells[ x+ mw* y]; \n }", "function getDirectlyRelatedColCells(colPos) {\r\n\tvar i,\r\n\t\tdirectlyRelatedColCells = new Array();\r\n\r\n\tfor (i=0; i<9; i++) {\r\n\t\tdirectlyRelatedColCells[i] = colPos + (i * 9);\r\n\t}\r\n\t\r\n\t// console.log(' directlyRelatedColCells=' + directlyRelatedColCells);\r\n\t\r\n\treturn directlyRelatedColCells;\r\n}", "at(x, y) {\n return this.grid[y][x];\n }", "positionAt(offset) {\n return (0, utils_1.positionAt)(offset, this.getText(), this.getLineOffsets());\n }", "function getOffset(obj) {\n var offsetLeft = 0;\n var offsetTop = 0;\n do {\n if (!isNaN(obj.offsetLeft)) {\n offsetLeft += obj.offsetLeft;\n }\n if (!isNaN(obj.offsetTop)) {\n offsetTop += obj.offsetTop;\n }\n } while(obj = obj.offsetParent );\n return {left: offsetLeft, top: offsetTop};\n }", "position(obj, coord) {\n let x = coord[0];\n let y = coord[1];\n this.grid[x][y] = obj;\n }", "function posToIndex(pos) {\n var row = pos[0];\n var col = pos[1];\n return (row * 4) + col;\n}", "function get_cell(row, col) {\n return $(`.col[row='${row}'][col='${col}']`)\n }", "_getValueInCell(row, column) {\n const that = this,\n array = that.value,\n dimensionValues = that._coordinates,\n length = dimensionValues.length;\n let value;\n\n if (length === 1) {\n if (that._oneDimensionSpecialCase === false) {\n value = array[column + dimensionValues[0]];\n }\n else {\n value = array[row + dimensionValues[0]];\n }\n }\n else {\n const actualIndexes = dimensionValues.slice(0);\n\n if (that.arrayIndexingMode === 'LabVIEW') {\n actualIndexes[length - 1] += column;\n actualIndexes[length - 2] += row;\n }\n else {\n actualIndexes[0] += column;\n actualIndexes[1] += row;\n }\n\n const oneDimensionalArrayValue = array[actualIndexes[0]];\n\n if (oneDimensionalArrayValue !== undefined) {\n const twoDimensionalArrayValue = oneDimensionalArrayValue[actualIndexes[1]];\n\n if (twoDimensionalArrayValue !== undefined) {\n value = twoDimensionalArrayValue;\n\n if (length > 2) {\n for (let i = 2; i < length; i++) {\n if (value === undefined) {\n break;\n }\n\n value = value[actualIndexes[i]];\n }\n }\n }\n }\n }\n\n return value;\n }", "function getOffset(obj) {\n var offsetLeft = 0;\n var offsetTop = 0;\n do {\n if (!isNaN(obj.offsetLeft)) {\n offsetLeft += obj.offsetLeft;\n }\n if (!isNaN(obj.offsetTop)) {\n offsetTop += obj.offsetTop;\n }\n } while(obj = obj.offsetParent );\n return {left: offsetLeft, top: offsetTop};\n }", "function getOffset(obj) {\n\t var offsetLeft = 0;\n\t var offsetTop = 0;\n\t do {\n\t\tif (!isNaN(obj.offsetLeft)) {\n\t\t\toffsetLeft += obj.offsetLeft;\n\t\t}\n\t\tif (!isNaN(obj.offsetTop)) {\n\t\t\toffsetTop += obj.offsetTop;\n\t\t} \n\t } while(obj = obj.offsetParent );\n\t return {left: offsetLeft, top: offsetTop};\n }", "key(i) { return this.#offset + this.#key[i]; }", "function getCell(xx,yy,ii,jj){\r\n\treturn document.body.getElementsByTagName(\"table\")[TableOffset+ii*2+jj].rows[xx].cells[yy];\r\n}", "function getCell(row, col) {\n\t\treturn grid[row][col];\n\t}", "function getGridCellDev(grid, row, col)\n{\n // IGNORE IF IT'S OUTSIDE THE GRID\n if (!isValidCellDev(row, col))\n {\n return -1;\n }\n var index = (row * gridWidthDev) + col;\n return grid[index];\n}", "cells() {\n var start = typeof this.topLeft === 'function' ? this.topLeft() : this.topLeft,\n end = typeof this.bottomRight === 'function' ? this.bottomRight() : this.bottomRight,\n\tthat = this;\n \n return Array.apply(start, Array(end+1)).map(function (x, y) {\n return y; \n });\n }", "function setCellPositon() {\n puzzleData.forEach((item, index) => {\n if (item.value) _move(item.el, index);\n })\n }", "function _getPos(elem) {\n var bbox = elem.getBoundingClientRect();\n return {\n x: bbox.left,\n y: bbox.top,\n bbox: bbox\n };\n}", "function getObjLoc(obj){\r\n\tif (obj)\r\n\t\treturn \"(\"+obj.offsetLeft+\",\"+obj.offsetTop+\",\"+obj.clientWidth+\"w,\"+obj.clientHeight+\"h)\";\r\n\telse\r\n\t\treturn obj;\r\n}", "function getCell(xCoord, yCoord) {\r\n return $(`#${xCoord}-${yCoord}`)\r\n}" ]
[ "0.7319825", "0.70336825", "0.6954565", "0.67027235", "0.66995287", "0.6691314", "0.6675111", "0.6674823", "0.6662998", "0.6581578", "0.6533822", "0.64943516", "0.645391", "0.6449585", "0.6431887", "0.6417582", "0.6417582", "0.6417582", "0.6417582", "0.6417582", "0.6376607", "0.63501394", "0.63370764", "0.6317968", "0.62873954", "0.62873954", "0.6281755", "0.62591517", "0.6241942", "0.62239325", "0.621415", "0.6150565", "0.6149188", "0.6142403", "0.61387604", "0.61387604", "0.6118993", "0.60917276", "0.6082037", "0.6074965", "0.60733396", "0.6059863", "0.6057022", "0.6052111", "0.6035796", "0.6035796", "0.6032902", "0.603163", "0.60030526", "0.59853476", "0.5978259", "0.5978259", "0.59682614", "0.5959625", "0.5953312", "0.5947304", "0.59342766", "0.5927832", "0.5923066", "0.59173375", "0.59111476", "0.59102017", "0.58976746", "0.5890045", "0.5887282", "0.5887252", "0.5885042", "0.58813035", "0.58668447", "0.5864611", "0.58551437", "0.5843835", "0.58316916", "0.5826609", "0.5797228", "0.57943547", "0.5791481", "0.57885605", "0.57720673", "0.5764159", "0.5762929", "0.5760808", "0.5759468", "0.5752177", "0.5745462", "0.5743065", "0.5742581", "0.5740881", "0.57377994", "0.5730865", "0.5723256", "0.5715995", "0.571599", "0.5712396", "0.5711469", "0.5710963" ]
0.62901706
28
Converts a date range into an array of segment objects. "Segments" are horizontal stretches of time, sliced up by row. A segment object has the following properties: row cols isStart isEnd
function rangeToSegments(startDate, endDate) { var rowCnt = t.getRowCnt(); var colCnt = t.getColCnt(); var segments = []; // array of segments to return // day offset for given date range var rangeDayOffsetStart = dateToDayOffset(startDate); var rangeDayOffsetEnd = dateToDayOffset(endDate); // exclusive // first and last cell offset for the given date range // "last" implies inclusivity var rangeCellOffsetFirst = dayOffsetToCellOffset(rangeDayOffsetStart); var rangeCellOffsetLast = dayOffsetToCellOffset(rangeDayOffsetEnd) - 1; // loop through all the rows in the view for (var row=0; row<rowCnt; row++) { // first and last cell offset for the row var rowCellOffsetFirst = row * colCnt; var rowCellOffsetLast = rowCellOffsetFirst + colCnt - 1; // get the segment's cell offsets by constraining the range's cell offsets to the bounds of the row var segmentCellOffsetFirst = Math.max(rangeCellOffsetFirst, rowCellOffsetFirst); var segmentCellOffsetLast = Math.min(rangeCellOffsetLast, rowCellOffsetLast); // make sure segment's offsets are valid and in view if (segmentCellOffsetFirst <= segmentCellOffsetLast) { // translate to cells var segmentCellFirst = cellOffsetToCell(segmentCellOffsetFirst); var segmentCellLast = cellOffsetToCell(segmentCellOffsetLast); // view might be RTL, so order by leftmost column var cols = [ segmentCellFirst.col, segmentCellLast.col ].sort(); // Determine if segment's first/last cell is the beginning/end of the date range. // We need to compare "day offset" because "cell offsets" are often ambiguous and // can translate to multiple days, and an edge case reveals itself when we the // range's first cell is hidden (we don't want isStart to be true). var isStart = cellOffsetToDayOffset(segmentCellOffsetFirst) == rangeDayOffsetStart; var isEnd = cellOffsetToDayOffset(segmentCellOffsetLast) + 1 == rangeDayOffsetEnd; // +1 for comparing exclusively segments.push({ row: row, leftCol: cols[0], rightCol: cols[1], isStart: isStart, isEnd: isEnd }); } } return segments; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function rangeToSegments(start, end) {\n\n\t\tvar rowCnt = t.getRowCnt();\n\t\tvar colCnt = t.getColCnt();\n\t\tvar segments = []; // array of segments to return\n\n\t\t// day offset for given date range\n\t\tvar rangeDayOffsetStart = dateToDayOffset(start);\n\t\tvar rangeDayOffsetEnd = dateToDayOffset(end); // an exclusive value\n\t\tvar endTimeMS = +end.time();\n\t\tif (endTimeMS && endTimeMS >= nextDayThreshold) {\n\t\t\trangeDayOffsetEnd++;\n\t\t}\n\t\trangeDayOffsetEnd = Math.max(rangeDayOffsetEnd, rangeDayOffsetStart + 1);\n\n\t\t// first and last cell offset for the given date range\n\t\t// \"last\" implies inclusivity\n\t\tvar rangeCellOffsetFirst = dayOffsetToCellOffset(rangeDayOffsetStart);\n\t\tvar rangeCellOffsetLast = dayOffsetToCellOffset(rangeDayOffsetEnd) - 1;\n\n\t\t// loop through all the rows in the view\n\t\tfor (var row=0; row<rowCnt; row++) {\n\n\t\t\t// first and last cell offset for the row\n\t\t\tvar rowCellOffsetFirst = row * colCnt;\n\t\t\tvar rowCellOffsetLast = rowCellOffsetFirst + colCnt - 1;\n\n\t\t\t// get the segment's cell offsets by constraining the range's cell offsets to the bounds of the row\n\t\t\tvar segmentCellOffsetFirst = Math.max(rangeCellOffsetFirst, rowCellOffsetFirst);\n\t\t\tvar segmentCellOffsetLast = Math.min(rangeCellOffsetLast, rowCellOffsetLast);\n\n\t\t\t// make sure segment's offsets are valid and in view\n\t\t\tif (segmentCellOffsetFirst <= segmentCellOffsetLast) {\n\n\t\t\t\t// translate to cells\n\t\t\t\tvar segmentCellFirst = cellOffsetToCell(segmentCellOffsetFirst);\n\t\t\t\tvar segmentCellLast = cellOffsetToCell(segmentCellOffsetLast);\n\n\t\t\t\t// view might be RTL, so order by leftmost column\n\t\t\t\tvar cols = [ segmentCellFirst.col, segmentCellLast.col ].sort();\n\n\t\t\t\t// Determine if segment's first/last cell is the beginning/end of the date range.\n\t\t\t\t// We need to compare \"day offset\" because \"cell offsets\" are often ambiguous and\n\t\t\t\t// can translate to multiple days, and an edge case reveals itself when we the\n\t\t\t\t// range's first cell is hidden (we don't want isStart to be true).\n\t\t\t\tvar isStart = cellOffsetToDayOffset(segmentCellOffsetFirst) == rangeDayOffsetStart;\n\t\t\t\tvar isEnd = cellOffsetToDayOffset(segmentCellOffsetLast) + 1 == rangeDayOffsetEnd; // +1 for comparing exclusively\n\n\t\t\t\tsegments.push({\n\t\t\t\t\trow: row,\n\t\t\t\t\tleftCol: cols[0],\n\t\t\t\t\trightCol: cols[1],\n\t\t\t\t\tisStart: isStart,\n\t\t\t\t\tisEnd: isEnd\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\n\t\treturn segments;\n\t}", "function rangeToSegments(start, end) {\n\n\t\tvar rowCnt = t.getRowCnt();\n\t\tvar colCnt = t.getColCnt();\n\t\tvar segments = []; // array of segments to return\n\n\t\t// day offset for given date range\n\t\tvar rangeDayOffsetStart = dateToDayOffset(start);\n\t\tvar rangeDayOffsetEnd = dateToDayOffset(end); // an exclusive value\n\t\tvar endTimeMS = +end.time();\n\t\tif (endTimeMS && endTimeMS >= nextDayThreshold) {\n\t\t\trangeDayOffsetEnd++;\n\t\t}\n\t\trangeDayOffsetEnd = Math.max(rangeDayOffsetEnd, rangeDayOffsetStart + 1);\n\n\t\t// first and last cell offset for the given date range\n\t\t// \"last\" implies inclusivity\n\t\tvar rangeCellOffsetFirst = dayOffsetToCellOffset(rangeDayOffsetStart);\n\t\tvar rangeCellOffsetLast = dayOffsetToCellOffset(rangeDayOffsetEnd) - 1;\n\n\t\t// loop through all the rows in the view\n\t\tfor (var row=0; row<rowCnt; row++) {\n\n\t\t\t// first and last cell offset for the row\n\t\t\tvar rowCellOffsetFirst = row * colCnt;\n\t\t\tvar rowCellOffsetLast = rowCellOffsetFirst + colCnt - 1;\n\n\t\t\t// get the segment's cell offsets by constraining the range's cell offsets to the bounds of the row\n\t\t\tvar segmentCellOffsetFirst = Math.max(rangeCellOffsetFirst, rowCellOffsetFirst);\n\t\t\tvar segmentCellOffsetLast = Math.min(rangeCellOffsetLast, rowCellOffsetLast);\n\n\t\t\t// make sure segment's offsets are valid and in view\n\t\t\tif (segmentCellOffsetFirst <= segmentCellOffsetLast) {\n\n\t\t\t\t// translate to cells\n\t\t\t\tvar segmentCellFirst = cellOffsetToCell(segmentCellOffsetFirst);\n\t\t\t\tvar segmentCellLast = cellOffsetToCell(segmentCellOffsetLast);\n\n\t\t\t\t// view might be RTL, so order by leftmost column\n\t\t\t\tvar cols = [ segmentCellFirst.col, segmentCellLast.col ].sort();\n\n\t\t\t\t// Determine if segment's first/last cell is the beginning/end of the date range.\n\t\t\t\t// We need to compare \"day offset\" because \"cell offsets\" are often ambiguous and\n\t\t\t\t// can translate to multiple days, and an edge case reveals itself when we the\n\t\t\t\t// range's first cell is hidden (we don't want isStart to be true).\n\t\t\t\tvar isStart = cellOffsetToDayOffset(segmentCellOffsetFirst) == rangeDayOffsetStart;\n\t\t\t\tvar isEnd = cellOffsetToDayOffset(segmentCellOffsetLast) + 1 == rangeDayOffsetEnd; // +1 for comparing exclusively\n\n\t\t\t\tsegments.push({\n\t\t\t\t\trow: row,\n\t\t\t\t\tleftCol: cols[0],\n\t\t\t\t\trightCol: cols[1],\n\t\t\t\t\tisStart: isStart,\n\t\t\t\t\tisEnd: isEnd\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\n\t\treturn segments;\n\t}", "function buildSegmentsForEvent(event) {\n\t\tvar startDate = event.start;\n\t\tvar endDate = exclEndDay(event);\n\t\tvar segments = rangeToSegments(startDate, endDate);\n\t\tfor (var i=0; i<segments.length; i++) {\n\t\t\tsegments[i].event = event;\n\t\t}\n\t\treturn segments;\n\t}", "function buildSegmentsForEvent(event) {\n\t\tvar startDate = event.start;\n\t\tvar endDate = exclEndDay(event);\n\t\tvar segments = rangeToSegments(startDate, endDate);\n\t\tfor (var i=0; i<segments.length; i++) {\n\t\t\tsegments[i].event = event;\n\t\t}\n\t\treturn segments;\n\t}", "function buildSegmentsForEvent(event) {\n\t\tvar startDate = event.start;\n\t\tvar endDate = exclEndDay(event);\n\t\tvar segments = rangeToSegments(startDate, endDate);\n\t\tfor (var i=0; i<segments.length; i++) {\n\t\t\tsegments[i].event = event;\n\t\t}\n\t\treturn segments;\n\t}", "function buildSegmentsForEvent(event) {\n\t\tvar segments = rangeToSegments(event.start, getEventEnd(event));\n\t\tfor (var i=0; i<segments.length; i++) {\n\t\t\tsegments[i].event = event;\n\t\t}\n\t\treturn segments;\n\t}", "function buildSegmentsForEvent(event) {\n\t\tvar segments = rangeToSegments(event.start, getEventEnd(event));\n\t\tfor (var i=0; i<segments.length; i++) {\n\t\t\tsegments[i].event = event;\n\t\t}\n\t\treturn segments;\n\t}", "function makeRange() {\n var result = {}\n /*\n year: 2015,\n month: [3, 4],\n days: [[30, 31], [1,2,3,4,5,6]],\n */\n ;\n\n var startDate = new Date($scope.range.start);\n var endDate = new Date($scope.range.end);\n\n var yearNum = startDate.getFullYear();\n\n var startDay = startDate.getDate();\n var endDay = endDate.getDate();\n\n\n var startMonthNum = (startDate.getMonth() + 1);\n var endMonthNum = (endDate.getMonth() + 1);\n\n var daysInStartDate = new Date(yearNum, startMonthNum, 0).getDate();\n\n //define month array\n console.log(startMonthNum + ' - ' + endMonthNum);\n if(startMonthNum === endMonthNum) {\n month = [startMonthNum, null];\n } else {\n month = [startMonthNum, endMonthNum];\n }\n\n //define days array\n var days = [[],[]];\n\n if(month[1] === null) {\n for(var i = startDay; i <= endDay; i++) {\n days[0].push(i);\n }\n\n days[1] = null;\n } else {\n for(var i = startDay; i <= daysInStartDate; i++) {\n days[0].push(i);\n }\n\n for(var j = 1; j <= endDay; j++){\n days[1].push(j);\n }\n }\n\n result.year = yearNum;\n result.month = month;\n result.days = days;\n\n return result;\n }", "function createRegions() {\n regions = [];\n\n var fullWidth = absolute(timelineController.timeExtents[1]);\n var chunkWidth = 500;\n var chunks = Math.ceil(fullWidth / chunkWidth);\n var offset = 0;\n\n // avoid creating lots of chunks - cap and only generate around the\n // current view\n // if we scroll out of bounds of the chunks we *do* have, we can throw\n // away our regions + purge regions in memory\n if (chunks > 30) {\n var startX = absolute(timelineController.viewExtents[0]);\n var endX = absolute(timelineController.viewExtents[1]);\n var midX = startX + (endX - startX) / 2;\n\n chunks = 50;\n offset = Math.max(0, midX - (chunkWidth * 15));\n }\n\n for (var i = 0; i < chunks; i++) {\n // for each desired chunk, find the bounds and managed data points\n // then, calculate positions for each data point\n var w = Math.min(fullWidth - offset, chunkWidth);\n var min = absolute.invert(offset);\n var max = absolute.invert(offset + w);\n var data = timelineController.dstatInBounds(min, max);\n\n regions.push({\n x: offset, width: w, min: min, max: max,\n data: data,\n c: null,\n dirty: true,\n index: regions.length\n });\n\n offset += w;\n }\n }", "findRangeofDates(){ \n\t\tlet min=new Date(2030,1,1); \n\t\tlet max=new Date(1990,1,1);\n\t\tconst ar=this.props.data;\n\t\tfor(let i=0;i<ar.length;i++){\n\t\t\tif(ar[i].start<min)\n\t\t\t\tmin=ar[i].start;\n\t\t\tif(ar[i].end>max)\n\t\t\t\tmax=ar[i].end;\n\t\t}\n\t\tthis.min=min;\n\t\tthis.max=max;\n\t}", "function getDateArray(start, end) {\n\t\tvar arr = new Array();\n\n\t\twhile (start <= end) {\n\t\t\tarr.push(new Date(start));\n\t\t\tstart.setDate(start.getDate() + 1);\n\t\t}\n\t\t\n\t\treturn arr;\n\t}", "function segmentNew(start, end){\n\t\treturn {\n\t\t\tid: buildLog ? buildLog.segmentId() : -1,\n\t\t\tstart: start,\n\t\t\tend: end,\n\t\t\tmyFill: {\n\t\t\t\tabove: null, // is there fill above us?\n\t\t\t\tbelow: null // is there fill below us?\n\t\t\t},\n\t\t\totherFill: null\n\t\t};\n\t}", "function buildSegments(events) {\n\t\tvar segments = [];\n\t\tfor (var i=0; i<events.length; i++) {\n\t\t\tvar eventSegments = buildSegmentsForEvent(events[i]);\n\t\t\tsegments.push.apply(segments, eventSegments); // append an array to an array\n\t\t}\n\t\treturn segments;\n\t}", "function buildSegments(events) {\n\t\tvar segments = [];\n\t\tfor (var i=0; i<events.length; i++) {\n\t\t\tvar eventSegments = buildSegmentsForEvent(events[i]);\n\t\t\tsegments.push.apply(segments, eventSegments); // append an array to an array\n\t\t}\n\t\treturn segments;\n\t}", "function buildSegments(events) {\n\t\tvar segments = [];\n\t\tfor (var i=0; i<events.length; i++) {\n\t\t\tvar eventSegments = buildSegmentsForEvent(events[i]);\n\t\t\tsegments.push.apply(segments, eventSegments); // append an array to an array\n\t\t}\n\t\treturn segments;\n\t}", "function buildSegments(events) {\n\t\tvar segments = [];\n\t\tfor (var i=0; i<events.length; i++) {\n\t\t\tvar eventSegments = buildSegmentsForEvent(events[i]);\n\t\t\tsegments.push.apply(segments, eventSegments); // append an array to an array\n\t\t}\n\t\treturn segments;\n\t}", "function buildSegments(events) {\n\t\tvar segments = [];\n\t\tfor (var i=0; i<events.length; i++) {\n\t\t\tvar eventSegments = buildSegmentsForEvent(events[i]);\n\t\t\tsegments.push.apply(segments, eventSegments); // append an array to an array\n\t\t}\n\t\treturn segments;\n\t}", "function gSrange(begin,end,inclusive) {\n var start = begin;\n var finish = end;\n var reverse = false;\n if (finish<start) {\n start = finish;\n finish = begin;\n reverse = true;\n if (!inclusive) {\n start = start + 1;\n }\n } else {\n if (!inclusive) {\n finish = finish - 1;\n }\n }\n\n var result,number,count;\n for (result=[], number=start, count=0 ; number<=finish ; number++,count++) {\n result[count] = number;\n }\n if (reverse) {\n result = result.reverse()\n }\n var object = gSlist(result);\n object.toList = function() {\n return gSlist(this.values());\n }\n return object;\n}", "function createDateArray(start,end){\n let\n dateArray = [],\n dt = new Date(start);\n\n while (moment(dt).dayOfYear() <= moment(end).dayOfYear()) {\n dateArray.push(new Date(dt));\n dt.setDate(dt.getDate() + 1);\n }\n return dateArray;\n}", "getAllInBetweenDates(sStartDate, sEndDate) {\n let aDates = [];\n //to avoid modifying the original date\n const oStartDate = new Date(sStartDate);\n const oEndDate = new Date(sEndDate);\n while (oStartDate <= oEndDate) {\n aDates = [...aDates, new Date(oStartDate)];\n oStartDate.setDate(oStartDate.getDate() + 1)\n }\n return aDates;\n }", "function rangeArr(start, end) {\n if (start === end) return [];\n\n return ([start].concat(rangeArr(start + 1, end)));\n\n}", "function getSection(start, angle, length, width) {\n var pThere = start + new Point(width/2, 0);\n var pBack = start + new Point(-width/2, 0);\n markPoint(pThere);\n markPoint(pBack);\n var hInThere = new Point(length*0.5, length*0.3);\n var hOutBack = new Point(length*-0.7, length*0.2);\n var hOutThere = new Point(length*0.5, -length*0.3);\n var hInBack = new Point(length*-0.7, -length*0.2);\n var segmentThere = new Segment(pThere, hInThere, hOutThere);\n var segmentBack = new Segment(pBack, hInBack, hOutBack);\n return [segmentThere, segmentBack, (start + new Point(0, -length))]\n }", "splitEvents(){\n const { events } = this.props;\n const { days } = this.state;\n const sortedEvents = events.sort((firstEvent, secondEvent) => {\n const firstStartDate = moment(firstEvent.startDate);\n const secondStartDate = moment(secondEvent.startDate);\n\n if(firstStartDate.isBefore(secondStartDate)) {\n return -1;\n } else if (firstStartDate.isSame(secondStartDate)) {\n return 0;\n } else {\n return 1;\n }\n });\n\n // what if the dates are out of range?\n // i should be able to query the dates out of the BE\n // for now we can assume within range\n const result = [...Array(7)].map(el => new Array());\n sortedEvents.forEach((event) => {\n const startDate = moment(event.startDate);\n\n days.forEach((day, idx) => {\n if(startDate.isBetween(day.startMoment, day.endMoment)) {\n result[idx].push(event);\n }\n });\n });\n\n return result;\n }", "function getIndexRange( start, end ) {\n let startIndex = 0;\n let endIndex = 10000000000;\n let startSet = false;\n let endSet = false;\n for (let i = 0; i < data.length; i++) {\n let d = data[i];\n if (d.seconds >= start && startSet == false) {\n startSet = true;\n startIndex = i;\n } \n else if (d.seconds >= end && endSet == false) {\n endSet = true;\n endIndex = i-1;\n break;\n }\n }\n return [startIndex, endIndex]\n}", "function getDateRange(dataPassed){\r\n //called by slider start & end dates\r\n //get first object in dataPassed array, and get the date\r\n firstObj=dataPassed.filter(function(d,i){\r\n return i==0\r\n });\r\n //get last object in dataPassed array, and get the date\r\n lastObj = dataPassed.filter(function(d,i){\r\n return i==dataPassed.length-1\r\n });\r\n datefrom = firstObj[0].Day;\r\n dateto=lastObj[0].Day;\r\n datejson = {'start':datefrom,'end':dateto};\r\n return datejson;\r\n }", "clipSegment(start, end, log=false) {\n const size = this.settings.maxRadius\n const radStart = start.magnitude()\n const radEnd = end.magnitude()\n\n if (radStart < size && radEnd < size) {\n if (log) { console.log('line is inside limits') }\n return []\n }\n\n const intersections = this.getIntersections(start, end)\n if (!intersections.intersection) {\n if (log) { console.log('line is outside limits') }\n return [end]\n }\n\n if (intersections.points[0].on && intersections.points[1].on) {\n let point = intersections.points[0].point\n let otherPoint = intersections.points[1].point\n\n if (log) { console.log('line is outside limits, but intersects within limits') }\n return [\n ...this.tracePerimeter(point, otherPoint),\n otherPoint,\n end\n ]\n }\n\n if (radStart <= size) {\n const point1 = (intersections.points[0].on && Math.abs(intersections.points[0].point - start) > 0.0001) ? intersections.points[0].point : intersections.points[1].point\n if (log) { console.log('start is inside limits') }\n return [ point1, end ]\n } else {\n const point1 = intersections.points[0].on ? intersections.points[0].point : intersections.points[1].point\n if (log) { console.log('end is inside limits') }\n return [ start, point1 ]\n }\n }", "function buildSegmentSubrows(segments) {\n\n\t\t// Give preference to elements with certain criteria, so they have\n\t\t// a chance to be closer to the top.\n\t\tsegments.sort(compareDaySegments);\n\n\t\tvar subrows = [];\n\t\tfor (var i=0; i<segments.length; i++) {\n\t\t\tvar segment = segments[i];\n\n\t\t\t// loop through subrows, starting with the topmost, until the segment\n\t\t\t// doesn't collide with other segments.\n\t\t\tfor (var j=0; j<subrows.length; j++) {\n\t\t\t\tif (!isDaySegmentCollision(segment, subrows[j])) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\t// `j` now holds the desired subrow index\n\t\t\tif (subrows[j]) {\n\t\t\t\tsubrows[j].push(segment);\n\t\t\t}\n\t\t\telse {\n\t\t\t\tsubrows[j] = [ segment ];\n\t\t\t}\n\t\t}\n\n\t\treturn subrows;\n\t}", "function buildSegmentSubrows(segments) {\n\n\t\t// Give preference to elements with certain criteria, so they have\n\t\t// a chance to be closer to the top.\n\t\tsegments.sort(compareDaySegments);\n\n\t\tvar subrows = [];\n\t\tfor (var i=0; i<segments.length; i++) {\n\t\t\tvar segment = segments[i];\n\n\t\t\t// loop through subrows, starting with the topmost, until the segment\n\t\t\t// doesn't collide with other segments.\n\t\t\tfor (var j=0; j<subrows.length; j++) {\n\t\t\t\tif (!isDaySegmentCollision(segment, subrows[j])) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\t// `j` now holds the desired subrow index\n\t\t\tif (subrows[j]) {\n\t\t\t\tsubrows[j].push(segment);\n\t\t\t}\n\t\t\telse {\n\t\t\t\tsubrows[j] = [ segment ];\n\t\t\t}\n\t\t}\n\n\t\treturn subrows;\n\t}", "function buildSegmentSubrows(segments) {\n\n\t\t// Give preference to elements with certain criteria, so they have\n\t\t// a chance to be closer to the top.\n\t\tsegments.sort(compareDaySegments);\n\n\t\tvar subrows = [];\n\t\tfor (var i=0; i<segments.length; i++) {\n\t\t\tvar segment = segments[i];\n\n\t\t\t// loop through subrows, starting with the topmost, until the segment\n\t\t\t// doesn't collide with other segments.\n\t\t\tfor (var j=0; j<subrows.length; j++) {\n\t\t\t\tif (!isDaySegmentCollision(segment, subrows[j])) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\t// `j` now holds the desired subrow index\n\t\t\tif (subrows[j]) {\n\t\t\t\tsubrows[j].push(segment);\n\t\t\t}\n\t\t\telse {\n\t\t\t\tsubrows[j] = [ segment ];\n\t\t\t}\n\t\t}\n\n\t\treturn subrows;\n\t}", "function buildSegmentSubrows(segments) {\n\n\t\t// Give preference to elements with certain criteria, so they have\n\t\t// a chance to be closer to the top.\n\t\tsegments.sort(compareDaySegments);\n\n\t\tvar subrows = [];\n\t\tfor (var i=0; i<segments.length; i++) {\n\t\t\tvar segment = segments[i];\n\n\t\t\t// loop through subrows, starting with the topmost, until the segment\n\t\t\t// doesn't collide with other segments.\n\t\t\tfor (var j=0; j<subrows.length; j++) {\n\t\t\t\tif (!isDaySegmentCollision(segment, subrows[j])) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\t// `j` now holds the desired subrow index\n\t\t\tif (subrows[j]) {\n\t\t\t\tsubrows[j].push(segment);\n\t\t\t}\n\t\t\telse {\n\t\t\t\tsubrows[j] = [ segment ];\n\t\t\t}\n\t\t}\n\n\t\treturn subrows;\n\t}", "function buildSegmentSubrows(segments) {\n\n\t\t// Give preference to elements with certain criteria, so they have\n\t\t// a chance to be closer to the top.\n\t\tsegments.sort(compareDaySegments);\n\n\t\tvar subrows = [];\n\t\tfor (var i=0; i<segments.length; i++) {\n\t\t\tvar segment = segments[i];\n\n\t\t\t// loop through subrows, starting with the topmost, until the segment\n\t\t\t// doesn't collide with other segments.\n\t\t\tfor (var j=0; j<subrows.length; j++) {\n\t\t\t\tif (!isDaySegmentCollision(segment, subrows[j])) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\t// `j` now holds the desired subrow index\n\t\t\tif (subrows[j]) {\n\t\t\t\tsubrows[j].push(segment);\n\t\t\t}\n\t\t\telse {\n\t\t\t\tsubrows[j] = [ segment ];\n\t\t\t}\n\t\t}\n\n\t\treturn subrows;\n\t}", "function createIntervals(data) {\n var newArr = [];\n var start = Math.min(...data);\n var end = 0;\n var max = Math.max(...data);\n var i = start;\n while (i <= max) {\n //find end of interval\n while ( data.includes(i + 1) && i <= max) {\n i++;\n }\n end = i;\n newArr.push([start, end]);\n i++;\n //find new start\n while ( !data.includes(i) && i <= max ) {\n i++;\n }\n start = i;\n }\n return newArr;\n}", "function getInterval(unit, range) {\n var intervals = [];\n for (let x of range.by(unit)) {\n intervals.push(x.format('YYYY-MM-DD'));\n }\n return intervals;\n}", "function createArrayFromAtoB(start, end){\n var range = [];\n while (start <= end){\n range.push(start);\n start ++;\n }\n return range;\n}", "function resliceDaySegs(segs, dayDate, colIndex) {\n var dayStart = dayDate;\n var dayEnd = common.addDays(dayStart, 1);\n var dayRange = { start: dayStart, end: dayEnd };\n var newSegs = [];\n for (var _i = 0, segs_2 = segs; _i < segs_2.length; _i++) {\n var seg = segs_2[_i];\n var eventRange = seg.eventRange;\n var origRange = eventRange.range;\n var slicedRange = common.intersectRanges(origRange, dayRange);\n if (slicedRange) {\n newSegs.push(\n tslib.__assign(tslib.__assign({}, seg), {\n firstCol: colIndex,\n lastCol: colIndex,\n eventRange: {\n def: eventRange.def,\n ui: tslib.__assign(tslib.__assign({}, eventRange.ui), {\n durationEditable: false,\n }),\n instance: eventRange.instance,\n range: slicedRange,\n },\n isStart:\n seg.isStart &&\n slicedRange.start.valueOf() === origRange.start.valueOf(),\n isEnd:\n seg.isEnd && slicedRange.end.valueOf() === origRange.end.valueOf(),\n })\n );\n }\n }\n return newSegs;\n}", "function resliceDaySegs(segs, dayDate, colIndex) {\n var dayStart = dayDate;\n var dayEnd = addDays(dayStart, 1);\n var dayRange = { start: dayStart, end: dayEnd };\n var newSegs = [];\n for (var _i = 0, segs_2 = segs; _i < segs_2.length; _i++) {\n var seg = segs_2[_i];\n var eventRange = seg.eventRange;\n var origRange = eventRange.range;\n var slicedRange = intersectRanges(origRange, dayRange);\n if (slicedRange) {\n newSegs.push(__assign(__assign({}, seg), {\n firstCol: colIndex, lastCol: colIndex, eventRange: {\n def: eventRange.def,\n ui: __assign(__assign({}, eventRange.ui), { durationEditable: false }),\n instance: eventRange.instance,\n range: slicedRange,\n }, isStart: seg.isStart && slicedRange.start.valueOf() === origRange.start.valueOf(), isEnd: seg.isEnd && slicedRange.end.valueOf() === origRange.end.valueOf()\n }));\n }\n }\n return newSegs;\n }", "function pointsToIntervals(points) {\n\t\t\tvar sections = [];\n\t\t\tfor (var i = 0; i < points.length - 1; i++) {\n\t\t\t\tsections.push({\n\t\t\t\t\tstart: points[i],\n\t\t\t\t\tend: points[i+1],\n\t\t\t\t});\n\t\t\t}\n\t\t\treturn sections;\n\t\t}", "function computeAlignedDayRange(timedRange) {\n var dayCnt = Math.floor(diffDays(timedRange.start, timedRange.end)) || 1;\n var start = startOfDay(timedRange.start);\n var end = addDays(start, dayCnt);\n return { start: start, end: end };\n}", "function getSliceBetweenTimes(data, from, to) {\n \n var fromIdx = _.sortedIndex(data, {t: from}, function(d) { return d.t; });\n var toIdx = _.sortedIndex(data, {t: to}, function(d) { return d.t; }); \n\n return data.slice(fromIdx, toIdx+1);\n }", "function computeAlignedDayRange(timedRange) {\n var dayCnt = Math.floor(diffDays(timedRange.start, timedRange.end)) || 1;\n var start = startOfDay(timedRange.start);\n var end = addDays(start, dayCnt);\n return { start: start, end: end };\n }", "function computeAlignedDayRange(timedRange) {\n var dayCnt = Math.floor(diffDays(timedRange.start, timedRange.end)) || 1;\n var start = startOfDay(timedRange.start);\n var end = addDays(start, dayCnt);\n return { start: start, end: end };\n }", "function computeAlignedDayRange(timedRange) {\n var dayCnt = Math.floor(diffDays(timedRange.start, timedRange.end)) || 1;\n var start = startOfDay(timedRange.start);\n var end = addDays(start, dayCnt);\n return { start: start, end: end };\n }", "function computeAlignedDayRange(timedRange) {\n var dayCnt = Math.floor(diffDays(timedRange.start, timedRange.end)) || 1;\n var start = startOfDay(timedRange.start);\n var end = addDays(start, dayCnt);\n return { start: start, end: end };\n }", "function range(start, end) {\n rangeArr = [];\n for(var i = start; i <= end; i++) {\n rangeArr.push(i);\n }\n return rangeArr;\n}", "function groupSegsByDay(segs) {\n var segsByDay = []; // sparse array\n var i;\n var seg;\n for (i = 0; i < segs.length; i += 1) {\n seg = segs[i];\n (segsByDay[seg.dayIndex] || (segsByDay[seg.dayIndex] = []))\n .push(seg);\n }\n return segsByDay;\n }", "function getDateRangeArray(date, dateRangeType, firstDayOfWeek, workWeekDays, daysToSelectInDayView) {\n if (daysToSelectInDayView === void 0) { daysToSelectInDayView = 1; }\n var datesArray = [];\n var startDate;\n var endDate = null;\n if (!workWeekDays) {\n workWeekDays = [_dateValues_dateValues__WEBPACK_IMPORTED_MODULE_1__.DayOfWeek.Monday, _dateValues_dateValues__WEBPACK_IMPORTED_MODULE_1__.DayOfWeek.Tuesday, _dateValues_dateValues__WEBPACK_IMPORTED_MODULE_1__.DayOfWeek.Wednesday, _dateValues_dateValues__WEBPACK_IMPORTED_MODULE_1__.DayOfWeek.Thursday, _dateValues_dateValues__WEBPACK_IMPORTED_MODULE_1__.DayOfWeek.Friday];\n }\n daysToSelectInDayView = Math.max(daysToSelectInDayView, 1);\n switch (dateRangeType) {\n case _dateValues_dateValues__WEBPACK_IMPORTED_MODULE_1__.DateRangeType.Day:\n startDate = getDatePart(date);\n endDate = addDays(startDate, daysToSelectInDayView);\n break;\n case _dateValues_dateValues__WEBPACK_IMPORTED_MODULE_1__.DateRangeType.Week:\n case _dateValues_dateValues__WEBPACK_IMPORTED_MODULE_1__.DateRangeType.WorkWeek:\n startDate = getStartDateOfWeek(getDatePart(date), firstDayOfWeek);\n endDate = addDays(startDate, _dateValues_timeConstants__WEBPACK_IMPORTED_MODULE_0__.TimeConstants.DaysInOneWeek);\n break;\n case _dateValues_dateValues__WEBPACK_IMPORTED_MODULE_1__.DateRangeType.Month:\n startDate = new Date(date.getFullYear(), date.getMonth(), 1);\n endDate = addMonths(startDate, 1);\n break;\n default:\n throw new Error('Unexpected object: ' + dateRangeType);\n }\n // Populate the dates array with the dates in range\n var nextDate = startDate;\n do {\n if (dateRangeType !== _dateValues_dateValues__WEBPACK_IMPORTED_MODULE_1__.DateRangeType.WorkWeek) {\n // push all days not in work week view\n datesArray.push(nextDate);\n }\n else if (workWeekDays.indexOf(nextDate.getDay()) !== -1) {\n datesArray.push(nextDate);\n }\n nextDate = addDays(nextDate, 1);\n } while (!compareDates(nextDate, endDate));\n return datesArray;\n}", "function buildIntervals(startPoint, endPoint, discontinuityPoints) {\n const result = [];\n let currentStart = startPoint;\n\n if (discontinuityPoints) {\n\n /* Sorting discontinuity points if they exist */\n let discArr = discontinuityPoints.slice().sort();\n\n /* Pushing discontinuities if within bounds */\n for (let i = 0; i < discArr.length; i++) {\n if (discArr[i] > startPoint && discArr[i] < endPoint) {\n result.push({\n start: currentStart,\n end: discArr[i] - EPS,\n discontinuity: discArr[i]\n });\n currentStart = discArr[i] + EPS;\n }\n }\n\n }\n\n result.push({\n start: currentStart,\n end: endPoint\n });\n\n return result\n}", "function getDates( dateStr ){\n var re = /\\s*(?:to|$)\\s*/;\n var dates = dateStr.split(re);\n var start = new Date( dates[0] );\n if (dates.length >1 ) {\n var end = new Date( dates[1] ); } else {var end= null; }\n\n return{ startDate: start, endDate: end };\n}", "function datesArray(startDate, endDate) {\n var oneDay = 24 * 60 * 60 * 1000;\n var numOfDays = ((endDate - startDate) / oneDay) + 1; //inculing the start and the end days\n var arr = new Array();\n if (numOfDays <= 10) {\n var tmp = new Date(startDate);\n arr[0] = changeDateFormat(tmp);\n for (var i = 1; tmp.getTime() < endDate.getTime(); i++) { //insert all the days to the array\n tmp = new Date(tmp.getTime() + oneDay);\n arr[i] = changeDateFormat(tmp);\n }\n }\n else {\n var average = (endDate.getTime() - startDate.getTime()) / (oneDay * 10); //how many milisec we jump between the dates\n var tmp = new Date(startDate);\n arr[0] = changeDateFormat(tmp);\n for (var i = 1; tmp.getTime() < endDate.getTime(); i++) { //insert all the days to the array\n tmp = new Date((tmp.getTime() + average * oneDay));\n arr[i] = changeDateFormat(tmp);\n }\n }\n return arr;\n}", "function buildViewArray(cm, from, to) {\n\t\t var array = [], nextPos;\n\t\t for (var pos = from; pos < to; pos = nextPos) {\n\t\t var view = new LineView(cm.doc, getLine(cm.doc, pos), pos);\n\t\t nextPos = pos + view.size;\n\t\t array.push(view);\n\t\t }\n\t\t return array;\n\t\t }", "function buildViewArray(cm, from, to) {\n\t\t var array = [], nextPos;\n\t\t for (var pos = from; pos < to; pos = nextPos) {\n\t\t var view = new LineView(cm.doc, getLine(cm.doc, pos), pos);\n\t\t nextPos = pos + view.size;\n\t\t array.push(view);\n\t\t }\n\t\t return array\n\t\t }", "function buildSegmentRows(segments) {\n\t\tvar rowCnt = getRowCnt();\n\t\tvar segmentRows = [];\n\t\tvar segmentI;\n\t\tvar segment;\n\t\tvar rowI;\n\n\t\t// group segments by row\n\t\tfor (segmentI=0; segmentI<segments.length; segmentI++) {\n\t\t\tsegment = segments[segmentI];\n\t\t\trowI = segment.row;\n\t\t\tif (segment.element) { // was rendered?\n\t\t\t\tif (segmentRows[rowI]) {\n\t\t\t\t\t// already other segments. append to array\n\t\t\t\t\tsegmentRows[rowI].push(segment);\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t// first segment in row. create new array\n\t\t\t\t\tsegmentRows[rowI] = [ segment ];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// sort each row\n\t\tfor (rowI=0; rowI<rowCnt; rowI++) {\n\t\t\tsegmentRows[rowI] = sortSegmentRow(\n\t\t\t\tsegmentRows[rowI] || [] // guarantee an array, even if no segments\n\t\t\t);\n\t\t}\n\n\t\treturn segmentRows;\n\t}", "function buildSegmentRows(segments) {\n\t\tvar rowCnt = getRowCnt();\n\t\tvar segmentRows = [];\n\t\tvar segmentI;\n\t\tvar segment;\n\t\tvar rowI;\n\n\t\t// group segments by row\n\t\tfor (segmentI=0; segmentI<segments.length; segmentI++) {\n\t\t\tsegment = segments[segmentI];\n\t\t\trowI = segment.row;\n\t\t\tif (segment.element) { // was rendered?\n\t\t\t\tif (segmentRows[rowI]) {\n\t\t\t\t\t// already other segments. append to array\n\t\t\t\t\tsegmentRows[rowI].push(segment);\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t// first segment in row. create new array\n\t\t\t\t\tsegmentRows[rowI] = [ segment ];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// sort each row\n\t\tfor (rowI=0; rowI<rowCnt; rowI++) {\n\t\t\tsegmentRows[rowI] = sortSegmentRow(\n\t\t\t\tsegmentRows[rowI] || [] // guarantee an array, even if no segments\n\t\t\t);\n\t\t}\n\n\t\treturn segmentRows;\n\t}", "function buildSegmentRows(segments) {\n\t\tvar rowCnt = getRowCnt();\n\t\tvar segmentRows = [];\n\t\tvar segmentI;\n\t\tvar segment;\n\t\tvar rowI;\n\n\t\t// group segments by row\n\t\tfor (segmentI=0; segmentI<segments.length; segmentI++) {\n\t\t\tsegment = segments[segmentI];\n\t\t\trowI = segment.row;\n\t\t\tif (segment.element) { // was rendered?\n\t\t\t\tif (segmentRows[rowI]) {\n\t\t\t\t\t// already other segments. append to array\n\t\t\t\t\tsegmentRows[rowI].push(segment);\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t// first segment in row. create new array\n\t\t\t\t\tsegmentRows[rowI] = [ segment ];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// sort each row\n\t\tfor (rowI=0; rowI<rowCnt; rowI++) {\n\t\t\tsegmentRows[rowI] = sortSegmentRow(\n\t\t\t\tsegmentRows[rowI] || [] // guarantee an array, even if no segments\n\t\t\t);\n\t\t}\n\n\t\treturn segmentRows;\n\t}", "function buildSegmentRows(segments) {\n\t\tvar rowCnt = getRowCnt();\n\t\tvar segmentRows = [];\n\t\tvar segmentI;\n\t\tvar segment;\n\t\tvar rowI;\n\n\t\t// group segments by row\n\t\tfor (segmentI=0; segmentI<segments.length; segmentI++) {\n\t\t\tsegment = segments[segmentI];\n\t\t\trowI = segment.row;\n\t\t\tif (segment.element) { // was rendered?\n\t\t\t\tif (segmentRows[rowI]) {\n\t\t\t\t\t// already other segments. append to array\n\t\t\t\t\tsegmentRows[rowI].push(segment);\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t// first segment in row. create new array\n\t\t\t\t\tsegmentRows[rowI] = [ segment ];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// sort each row\n\t\tfor (rowI=0; rowI<rowCnt; rowI++) {\n\t\t\tsegmentRows[rowI] = sortSegmentRow(\n\t\t\t\tsegmentRows[rowI] || [] // guarantee an array, even if no segments\n\t\t\t);\n\t\t}\n\n\t\treturn segmentRows;\n\t}", "function buildSegmentRows(segments) {\n\t\tvar rowCnt = getRowCnt();\n\t\tvar segmentRows = [];\n\t\tvar segmentI;\n\t\tvar segment;\n\t\tvar rowI;\n\n\t\t// group segments by row\n\t\tfor (segmentI=0; segmentI<segments.length; segmentI++) {\n\t\t\tsegment = segments[segmentI];\n\t\t\trowI = segment.row;\n\t\t\tif (segment.element) { // was rendered?\n\t\t\t\tif (segmentRows[rowI]) {\n\t\t\t\t\t// already other segments. append to array\n\t\t\t\t\tsegmentRows[rowI].push(segment);\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t// first segment in row. create new array\n\t\t\t\t\tsegmentRows[rowI] = [ segment ];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// sort each row\n\t\tfor (rowI=0; rowI<rowCnt; rowI++) {\n\t\t\tsegmentRows[rowI] = sortSegmentRow(\n\t\t\t\tsegmentRows[rowI] || [] // guarantee an array, even if no segments\n\t\t\t);\n\t\t}\n\n\t\treturn segmentRows;\n\t}", "function buildViewArray(cm, from, to) {\n var array = [], nextPos;\n for (var pos = from; pos < to; pos = nextPos) {\n var view = new LineView(cm.doc, getLine(cm.doc, pos), pos);\n nextPos = pos + view.size;\n array.push(view);\n }\n return array\n }", "function buildViewArray(cm, from, to) {\n var array = [], nextPos;\n for (var pos = from; pos < to; pos = nextPos) {\n var view = new LineView(cm.doc, getLine(cm.doc, pos), pos);\n nextPos = pos + view.size;\n array.push(view);\n }\n return array\n }", "function buildViewArray(cm, from, to) {\n var array = [], nextPos;\n for (var pos = from; pos < to; pos = nextPos) {\n var view = new LineView(cm.doc, getLine(cm.doc, pos), pos);\n nextPos = pos + view.size;\n array.push(view);\n }\n return array\n }", "function buildViewArray(cm, from, to) {\n var array = [], nextPos;\n for (var pos = from; pos < to; pos = nextPos) {\n var view = new LineView(cm.doc, getLine(cm.doc, pos), pos);\n nextPos = pos + view.size;\n array.push(view);\n }\n return array\n }", "function buildViewArray(cm, from, to) {\n var array = [], nextPos;\n for (var pos = from; pos < to; pos = nextPos) {\n var view = new LineView(cm.doc, getLine(cm.doc, pos), pos);\n nextPos = pos + view.size;\n array.push(view);\n }\n return array\n }", "function buildViewArray(cm, from, to) {\n var array = [], nextPos;\n for (var pos = from; pos < to; pos = nextPos) {\n var view = new LineView(cm.doc, getLine(cm.doc, pos), pos);\n nextPos = pos + view.size;\n array.push(view);\n }\n return array\n }", "function buildViewArray(cm, from, to) {\n var array = [], nextPos;\n for (var pos = from; pos < to; pos = nextPos) {\n var view = new LineView(cm.doc, getLine(cm.doc, pos), pos);\n nextPos = pos + view.size;\n array.push(view);\n }\n return array\n }", "function buildViewArray(cm, from, to) {\n var array = [], nextPos;\n for (var pos = from; pos < to; pos = nextPos) {\n var view = new LineView(cm.doc, getLine(cm.doc, pos), pos);\n nextPos = pos + view.size;\n array.push(view);\n }\n return array\n }", "function buildViewArray(cm, from, to) {\n var array = [], nextPos;\n for (var pos = from; pos < to; pos = nextPos) {\n var view = new LineView(cm.doc, getLine(cm.doc, pos), pos);\n nextPos = pos + view.size;\n array.push(view);\n }\n return array\n }", "function buildViewArray(cm, from, to) {\n var array = [], nextPos;\n for (var pos = from; pos < to; pos = nextPos) {\n var view = new LineView(cm.doc, getLine(cm.doc, pos), pos);\n nextPos = pos + view.size;\n array.push(view);\n }\n return array\n }", "function buildViewArray(cm, from, to) {\n var array = [], nextPos;\n for (var pos = from; pos < to; pos = nextPos) {\n var view = new LineView(cm.doc, getLine(cm.doc, pos), pos);\n nextPos = pos + view.size;\n array.push(view);\n }\n return array\n }", "function buildViewArray(cm, from, to) {\n var array = [], nextPos;\n for (var pos = from; pos < to; pos = nextPos) {\n var view = new LineView(cm.doc, getLine(cm.doc, pos), pos);\n nextPos = pos + view.size;\n array.push(view);\n }\n return array\n }", "function buildViewArray(cm, from, to) {\n var array = [], nextPos;\n for (var pos = from; pos < to; pos = nextPos) {\n var view = new LineView(cm.doc, getLine(cm.doc, pos), pos);\n nextPos = pos + view.size;\n array.push(view);\n }\n return array\n }", "function buildViewArray(cm, from, to) {\n var array = [], nextPos;\n for (var pos = from; pos < to; pos = nextPos) {\n var view = new LineView(cm.doc, getLine(cm.doc, pos), pos);\n nextPos = pos + view.size;\n array.push(view);\n }\n return array\n }", "function buildViewArray(cm, from, to) {\n var array = [], nextPos;\n for (var pos = from; pos < to; pos = nextPos) {\n var view = new LineView(cm.doc, getLine(cm.doc, pos), pos);\n nextPos = pos + view.size;\n array.push(view);\n }\n return array\n }", "function buildViewArray(cm, from, to) {\n var array = [], nextPos;\n for (var pos = from; pos < to; pos = nextPos) {\n var view = new LineView(cm.doc, getLine(cm.doc, pos), pos);\n nextPos = pos + view.size;\n array.push(view);\n }\n return array\n }", "function buildViewArray(cm, from, to) {\n var array = [], nextPos;\n for (var pos = from; pos < to; pos = nextPos) {\n var view = new LineView(cm.doc, getLine(cm.doc, pos), pos);\n nextPos = pos + view.size;\n array.push(view);\n }\n return array\n }", "function dataToArray(response_occupancy, startDate, endDate) {\n\n if (!response_occupancy) return;\n // a whole day in 5-minute increments\n var time_of_day = [];\n for (var hour = 0; hour < 24; hour++){\n var hourString = String(hour);\n for (var minute = 0; minute < 60; minute += 5 ){\n var minuteString = String(minute);\n if (minuteString.length == 1) {\n minuteString = '0' + minuteString;\n }\n time_of_day.push(hourString + \":\" + minuteString);\n }\n }\n // console.log(time_of_day);\n\n // a series for each weekday\n var sunday = [];\n var monday = [];\n var tuesday = [];\n var wednesday = [];\n var thursday = [];\n var friday = [];\n var saturday = [];\n\n for (var i = 0; i < response_occupancy.length; i++) {\n if (response_occupancy[i].r == rmID) {\n\n var datapoint = [];\n var sample_time = response_occupancy[i].s;\n var number_occupants = parseInt(response_occupancy[i].n);\n var datapoint = [sample_time, number_occupants];\n var sample_time_as_Date_object = new Date(sample_time);\n var weekday = sample_time_as_Date_object.getDay();\n var hour = sample_time_as_Date_object.getHours();\n var minute = sample_time_as_Date_object.getMinutes();\n // if (minute < 10){\n // minute = '0' + minute;\n // }\n var hourString = String(hour);\n var minuteString = String(minute);\n if (minuteString.length == 1) {\n minuteString = '0' + minuteString;\n }\n var time = hourString + \":\" + minuteString;\n\n // calculating average occupancy for a given time of day\n\n var occ_tracker = {sum: 0, counter: 0}\n for (var t = 0; t < time_of_day.length; t++){\n if (time == time_of_day[t]){\n occ_tracker.sum += number_occupants;\n occ_tracker.counter++;\n }\n }\n var occ_avg\n if (occ_tracker.counter === 0){\n occ_avg = 0;\n } else {\n occ_avg = occ_tracker.sum / occ_tracker.counter;\n }\n var datapoint_avg = [time, occ_avg];\n\n if (startDate <= sample_time_as_Date_object && sample_time_as_Date_object <= endDate) {\n \n // console.log(\"startDate: \" + startDate);\n // console.log(\"endDate: \" + endDate);\n // console.log(\"sample_time_as_Date_object: \" + sample_time_as_Date_object);\n\n // getDay() returns 0 for Sunday, 1 for Monday, 2 for Tuesday etc.\n if (weekday === 0) {\n sunday.push(datapoint_avg);\n }\n else if (weekday === 1){\n monday.push(datapoint_avg);\n }\n else if (weekday === 2){\n tuesday.push(datapoint_avg);\n }\n else if (weekday === 3){\n wednesday.push(datapoint_avg);\n }\n else if (weekday === 4){\n thursday.push(datapoint_avg);\n }\n else if (weekday === 5){\n friday.push(datapoint_avg);\n }\n else if (weekday === 6){\n saturday.push(datapoint_avg);\n }\n\n }\n }\n }\n\n dataToChart(time_of_day, sunday, monday, tuesday, wednesday, thursday, friday, saturday);\n }", "function buildViewArray(cm, from, to) {\n var array = [], nextPos;\n for (var pos = from; pos < to; pos = nextPos) {\n var view = new LineView(cm.doc, getLine(cm.doc, pos), pos);\n nextPos = pos + view.size;\n array.push(view);\n }\n return array;\n }", "function buildViewArray(cm, from, to) {\n var array = [], nextPos;\n for (var pos = from; pos < to; pos = nextPos) {\n var view = new LineView(cm.doc, getLine(cm.doc, pos), pos);\n nextPos = pos + view.size;\n array.push(view);\n }\n return array;\n }", "function buildViewArray(cm, from, to) {\n var array = [], nextPos;\n for (var pos = from; pos < to; pos = nextPos) {\n var view = new LineView(cm.doc, getLine(cm.doc, pos), pos);\n nextPos = pos + view.size;\n array.push(view);\n }\n return array;\n }", "function buildViewArray(cm, from, to) {\n var array = [], nextPos;\n for (var pos = from; pos < to; pos = nextPos) {\n var view = new LineView(cm.doc, getLine(cm.doc, pos), pos);\n nextPos = pos + view.size;\n array.push(view);\n }\n return array;\n }", "function buildViewArray(cm, from, to) {\n var array = [], nextPos;\n for (var pos = from; pos < to; pos = nextPos) {\n var view = new LineView(cm.doc, getLine(cm.doc, pos), pos);\n nextPos = pos + view.size;\n array.push(view);\n }\n return array;\n }", "function buildViewArray(cm, from, to) {\n var array = [], nextPos;\n for (var pos = from; pos < to; pos = nextPos) {\n var view = new LineView(cm.doc, getLine(cm.doc, pos), pos);\n nextPos = pos + view.size;\n array.push(view);\n }\n return array;\n }", "function buildViewArray(cm, from, to) {\n var array = [], nextPos;\n for (var pos = from; pos < to; pos = nextPos) {\n var view = new LineView(cm.doc, getLine(cm.doc, pos), pos);\n nextPos = pos + view.size;\n array.push(view);\n }\n return array;\n }", "function buildViewArray(cm, from, to) {\n var array = [], nextPos;\n for (var pos = from; pos < to; pos = nextPos) {\n var view = new LineView(cm.doc, getLine(cm.doc, pos), pos);\n nextPos = pos + view.size;\n array.push(view);\n }\n return array;\n }", "function GetClipSegments(clip_intervals, block_size, hop_size, x_length) {\n var clip_segments = [];\n var num_clip_segments = 0;\n\n var in_segment = false;\n var start_idx = 0;\n var stop_idx = start_idx + block_size - 1;\n var block_idx = 0;\n\n var segment_start_idx = -1;\n var segment_stop_idx = -1;\n while(stop_idx < x_length) {\n // We are in a segment.\n if(in_segment) {\n // We leave the segment. Store it and move on.\n if(!AreOverlapping(clip_intervals, start_idx, stop_idx)) {\n in_segment = false;\n segment_stop_idx = block_idx - 1;\n\n var new_segment = { start:segment_start_idx , stop:segment_stop_idx };\n clip_segments[num_clip_segments] = new_segment;\n num_clip_segments++;\n\n segment_start_idx = -1;\n segment_stop_idx = -1;\n }\n }\n // We are not in a segment.\n else {\n // We have entered a segment.\n if(AreOverlapping(clip_intervals, start_idx, stop_idx)) {\n in_segment = true;\n segment_start_idx = block_idx;\n }\n }\n\n block_idx++;\n start_idx = start_idx + hop_size;\n stop_idx = start_idx + block_size - 1;\n }\n\n // If we end while in a segment, we need to leave the segment and push the segment.\n if(in_segment) {\n in_segment = false;\n segment_stop_idx = block_idx - 1;\n\n var new_segment = { start:segment_start_idx , stop:segment_stop_idx };\n clip_segments[num_clip_segments] = new_segment;\n num_clip_segments++;\n\n segment_start_idx = -1;\n segment_stop_idx = -1;\n }\n\n return clip_segments;\n }", "function computeAlignedDayRange(timedRange) {\n var dayCnt = Math.floor(marker_1.diffDays(timedRange.start, timedRange.end)) || 1;\n var start = marker_1.startOfDay(timedRange.start);\n var end = marker_1.addDays(start, dayCnt);\n return {\n start: start,\n end: end\n };\n }", "function normalizeDates(startDate, endDate, { min, showMultiDayTimes }) {\n if (!showMultiDayTimes) {\n return [startDate, endDate]\n }\n\n const current = new Date(min) // today at midnight\n let c = new Date(current)\n let s = new Date(startDate)\n let e = new Date(endDate)\n\n // Use noon to compare dates to avoid DST issues.\n s.setHours(12, 0, 0, 0)\n e.setHours(12, 0, 0, 0)\n c.setHours(12, 0, 0, 0)\n\n // Current day is at the start, but it spans multiple days,\n // so we correct the end.\n if (+c === +s && c < e) {\n return [startDate, dates.endOf(startDate, 'day')]\n }\n\n // Current day is in between start and end dates,\n // so we make it span all day.\n if (c > s && c < e) {\n return [current, dates.endOf(current, 'day')]\n }\n\n // Current day is at the end of a multi day event,\n // so we make it start at midnight, and end normally.\n if (c > s && +c === +e) {\n return [current, endDate]\n }\n\n return [startDate, endDate]\n}", "function buildViewArray(cm, from, to) {\r\n var array = [], nextPos;\r\n for (var pos = from; pos < to; pos = nextPos) {\r\n var view = new LineView(cm.doc, getLine(cm.doc, pos), pos);\r\n nextPos = pos + view.size;\r\n array.push(view);\r\n }\r\n return array;\r\n }", "function range(start, end) {\n if (start >= end) {\n return [];\n } else {\n return [start].concat(range(start + 1, end));\n }\n}", "function buildViewArray(cm, from, to) {\n\t var array = [], nextPos;\n\t for (var pos = from; pos < to; pos = nextPos) {\n\t var view = new LineView(cm.doc, getLine(cm.doc, pos), pos);\n\t nextPos = pos + view.size;\n\t array.push(view);\n\t }\n\t return array;\n\t }", "function buildViewArray(cm, from, to) {\n\t var array = [], nextPos;\n\t for (var pos = from; pos < to; pos = nextPos) {\n\t var view = new LineView(cm.doc, getLine(cm.doc, pos), pos);\n\t nextPos = pos + view.size;\n\t array.push(view);\n\t }\n\t return array;\n\t }", "function buildViewArray(cm, from, to) {\n\t var array = [], nextPos;\n\t for (var pos = from; pos < to; pos = nextPos) {\n\t var view = new LineView(cm.doc, getLine(cm.doc, pos), pos);\n\t nextPos = pos + view.size;\n\t array.push(view);\n\t }\n\t return array;\n\t }", "_unixRangeForDatespan(startDate, endDate) {\n return {\n start: moment(startDate).unix(),\n end: moment(endDate).add(1, 'day').subtract(1, 'second').unix(),\n };\n }", "function rangeArray(start, end) {\n var arr = []\n for (var i=start; i <= end; i++) {\n\tarr.push(i)\n }\n return arr\n}", "function buildViewArray(cm, from, to) {\r\n var array = [], nextPos;\r\n for (var pos = from; pos < to; pos = nextPos) {\r\n var view = new LineView(cm.doc, getLine(cm.doc, pos), pos);\r\n nextPos = pos + view.size;\r\n array.push(view);\r\n }\r\n return array\r\n}", "function invertRanges(ranges, constraintRange) {\n var invertedRanges = [];\n var start = constraintRange.start; // the end of the previous range. the start of the new range\n\n var i;\n var dateRange; // ranges need to be in order. required for our date-walking algorithm\n\n ranges.sort(compareRanges);\n\n for (i = 0; i < ranges.length; i++) {\n dateRange = ranges[i]; // add the span of time before the event (if there is any)\n\n if (dateRange.start > start) {\n // compare millisecond time (skip any ambig logic)\n invertedRanges.push({\n start: start,\n end: dateRange.start\n });\n }\n\n if (dateRange.end > start) {\n start = dateRange.end;\n }\n } // add the span of time after the last event (if there is any)\n\n\n if (start < constraintRange.end) {\n // compare millisecond time (skip any ambig logic)\n invertedRanges.push({\n start: start,\n end: constraintRange.end\n });\n }\n\n return invertedRanges;\n }", "function dateRangeCalculator(){\n\n\t//start date\n\n\t//end date\n\n\t//Api call request that reloads page/section based off of time span requested OR trimming original data object/array based off of new specified date range \n\n\n}", "set range(range) {\n this.startDate = range.startDate;\n this.endDate = range.endDate;\n this.refresh();\n }", "function buildViewArray(cm, from, to) {\n var array = [], nextPos\n for (var pos = from; pos < to; pos = nextPos) {\n var view = new LineView(cm.doc, getLine(cm.doc, pos), pos)\n nextPos = pos + view.size\n array.push(view)\n }\n return array\n}", "function buildViewArray(cm, from, to) {\n var array = [], nextPos\n for (var pos = from; pos < to; pos = nextPos) {\n var view = new LineView(cm.doc, getLine(cm.doc, pos), pos)\n nextPos = pos + view.size\n array.push(view)\n }\n return array\n}" ]
[ "0.81465906", "0.81465906", "0.68557835", "0.68557835", "0.68557835", "0.62511235", "0.62511235", "0.6188441", "0.5745242", "0.57336265", "0.5602152", "0.5567534", "0.5527414", "0.5527414", "0.5527414", "0.5527414", "0.5527414", "0.54799587", "0.5439216", "0.5436408", "0.54314196", "0.53940266", "0.53782725", "0.53644615", "0.5357282", "0.53517216", "0.5343199", "0.5343199", "0.5343199", "0.5343199", "0.5343199", "0.5338995", "0.53298753", "0.5320535", "0.53145796", "0.5312124", "0.52721393", "0.5261235", "0.5250821", "0.5234206", "0.5234206", "0.5234206", "0.5234206", "0.5225061", "0.52229685", "0.5212465", "0.51862776", "0.5186152", "0.51852363", "0.5184167", "0.5180969", "0.5173083", "0.5173083", "0.5173083", "0.5173083", "0.5173083", "0.51666313", "0.51666313", "0.51666313", "0.51666313", "0.51666313", "0.51666313", "0.51666313", "0.51666313", "0.51666313", "0.51666313", "0.51666313", "0.51666313", "0.51666313", "0.51666313", "0.51666313", "0.51666313", "0.51666313", "0.5161894", "0.5157602", "0.5157602", "0.5157602", "0.5157602", "0.5157602", "0.5157602", "0.5157602", "0.5157602", "0.5148537", "0.51477146", "0.5144813", "0.51393414", "0.51378816", "0.5134923", "0.5134923", "0.5134923", "0.51277196", "0.51240396", "0.51197845", "0.51186395", "0.5117939", "0.5117935", "0.51134247", "0.51134247" ]
0.8138951
3
Render `events` onto the calendar, attach mouse event handlers, and call the `eventAfterRender` callback for each. Mouse event will be lazily applied, except if the event has an ID of `modifiedEventId`. Can only be called when the event container is empty (because it wipes out all innerHTML).
function renderDayEvents(events, modifiedEventId) { // do the actual rendering. Receive the intermediate "segment" data structures. var segments = _renderDayEvents( events, false, // don't append event elements true // set the heights of the rows ); // report the elements to the View, for general drag/resize utilities segmentElementEach(segments, function(segment, element) { reportEventElement(segment.event, element); }); // attach mouse handlers attachHandlers(segments, modifiedEventId); // call `eventAfterRender` callback for each event segmentElementEach(segments, function(segment, element) { trigger('eventAfterRender', segment.event, segment.event, element); }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function renderEvents() {\n var totalPercent = 100,\n currentEvent,\n curCol,\n width,\n height,\n leftOffset,\n eventText,\n i,\n j;\n \n // empty container before adding new events\n $el.empty();\n \n // go through all columns\n for (i=0; i<columns.length; i++) {\n \n // go through all events in single column\n for (j=0; j<columns[i].length; j++) {\n currentEvent = columns[i][j];\n \n width = totalPercent / (columnWidths[currentEvent.groupIndex] + 1);\n height = currentEvent.end - currentEvent.start;\n leftOffset = i * width;\n \n // If container is too short, only display event title\n if (height < 45) {\n eventText = \"<h2>Sample Event</h2>\";\n }\n // Otherwise, display event title & location\n else {\n eventText = \"<h2>Sample Event</h2><h3>Sample Location</h3>\";\n }\n \n $el.append('<div class=\"calendarSlot\" style=\"width: ' + width + '%; height:'+ height +'px; top:' + currentEvent.start + 'px; left: ' + leftOffset + '%\">' + eventText + '</div>');\n }\n }\n }", "renderEvent(events) {\n const domContainer = document.querySelector(\"#containerTwo\");\n domContainer.innerHTML = `<section id=\"containerTwoSection\"></section>`;\n eventContainer = document.querySelector(\"#containerTwoSection\");\n // sorts the list of events by date\n events.sort((a, b) => {\n if (a.date < b.date) {\n return -1;\n } else if (a.date > b.date) {\n return 1;\n } else {\n return 0;\n }\n });\n events.forEach(event => {\n eventContainer.innerHTML += eventHtml.makeEventList(event);\n });\n }", "function _renderDayEvents(events, doAppend, doRowHeights) {\n\n\t\t// where the DOM nodes will eventually end up\n\t\tvar finalContainer = getDaySegmentContainer();\n\n\t\t// the container where the initial HTML will be rendered.\n\t\t// If `doAppend`==true, uses a temporary container.\n\t\tvar renderContainer = doAppend ? $(\"<div/>\") : finalContainer;\n\n\t\tvar segments = buildSegments(events);\n\t\tvar html;\n\t\tvar elements;\n\n\t\t// calculate the desired `left` and `width` properties on each segment object\n\t\tcalculateHorizontals(segments);\n\n\t\t// build the HTML string. relies on `left` property\n\t\thtml = buildHTML(segments);\n\n\t\t// render the HTML. innerHTML is considerably faster than jQuery's .html()\n\t\trenderContainer[0].innerHTML = html;\n\n\t\t// retrieve the individual elements\n\t\telements = renderContainer.children();\n\n\t\t// if we were appending, and thus using a temporary container,\n\t\t// re-attach elements to the real container.\n\t\tif (doAppend) {\n\t\t\tfinalContainer.append(elements);\n\t\t}\n\n\t\t// assigns each element to `segment.event`, after filtering them through user callbacks\n\t\tresolveElements(segments, elements);\n\n\t\t// Calculate the left and right padding+margin for each element.\n\t\t// We need this for setting each element's desired outer width, because of the W3C box model.\n\t\t// It's important we do this in a separate pass from acually setting the width on the DOM elements\n\t\t// because alternating reading/writing dimensions causes reflow for every iteration.\n\t\tsegmentElementEach(segments, function(segment, element) {\n\t\t\tsegment.hsides = hsides(element, true); // include margins = `true`\n\t\t});\n\n\t\t// Set the width of each element\n\t\tsegmentElementEach(segments, function(segment, element) {\n\t\t\telement.width(\n\t\t\t\tMath.max(0, segment.outerWidth - segment.hsides)\n\t\t\t);\n\t\t});\n\n\t\t// Grab each element's outerHeight (setVerticals uses this).\n\t\t// To get an accurate reading, it's important to have each element's width explicitly set already.\n\t\tsegmentElementEach(segments, function(segment, element) {\n\t\t\tsegment.outerHeight = element.outerHeight(true); // include margins = `true`\n\t\t});\n\n\t\t// Set the top coordinate on each element (requires segment.outerHeight)\n\t\tsetVerticals(segments, doRowHeights);\n\n\t\treturn segments;\n\t}", "function _renderDayEvents(events, doAppend, doRowHeights) {\n\n\t\t// where the DOM nodes will eventually end up\n\t\tvar finalContainer = getDaySegmentContainer();\n\n\t\t// the container where the initial HTML will be rendered.\n\t\t// If `doAppend`==true, uses a temporary container.\n\t\tvar renderContainer = doAppend ? $(\"<div/>\") : finalContainer;\n\n\t\tvar segments = buildSegments(events);\n\t\tvar html;\n\t\tvar elements;\n\n\t\t// calculate the desired `left` and `width` properties on each segment object\n\t\tcalculateHorizontals(segments);\n\n\t\t// build the HTML string. relies on `left` property\n\t\thtml = buildHTML(segments);\n\n\t\t// render the HTML. innerHTML is considerably faster than jQuery's .html()\n\t\trenderContainer[0].innerHTML = html;\n\n\t\t// retrieve the individual elements\n\t\telements = renderContainer.children();\n\n\t\t// if we were appending, and thus using a temporary container,\n\t\t// re-attach elements to the real container.\n\t\tif (doAppend) {\n\t\t\tfinalContainer.append(elements);\n\t\t}\n\n\t\t// assigns each element to `segment.event`, after filtering them through user callbacks\n\t\tresolveElements(segments, elements);\n\n\t\t// Calculate the left and right padding+margin for each element.\n\t\t// We need this for setting each element's desired outer width, because of the W3C box model.\n\t\t// It's important we do this in a separate pass from acually setting the width on the DOM elements\n\t\t// because alternating reading/writing dimensions causes reflow for every iteration.\n\t\tsegmentElementEach(segments, function(segment, element) {\n\t\t\tsegment.hsides = hsides(element, true); // include margins = `true`\n\t\t});\n\n\t\t// Set the width of each element\n\t\tsegmentElementEach(segments, function(segment, element) {\n\t\t\telement.width(\n\t\t\t\tMath.max(0, segment.outerWidth - segment.hsides)\n\t\t\t);\n\t\t});\n\n\t\t// Grab each element's outerHeight (setVerticals uses this).\n\t\t// To get an accurate reading, it's important to have each element's width explicitly set already.\n\t\tsegmentElementEach(segments, function(segment, element) {\n\t\t\tsegment.outerHeight = element.outerHeight(true); // include margins = `true`\n\t\t});\n\n\t\t// Set the top coordinate on each element (requires segment.outerHeight)\n\t\tsetVerticals(segments, doRowHeights);\n\n\t\treturn segments;\n\t}", "function _renderDayEvents(events, doAppend, doRowHeights) {\n\n\t\t// where the DOM nodes will eventually end up\n\t\tvar finalContainer = getDaySegmentContainer();\n\n\t\t// the container where the initial HTML will be rendered.\n\t\t// If `doAppend`==true, uses a temporary container.\n\t\tvar renderContainer = doAppend ? $(\"<div/>\") : finalContainer;\n\n\t\tvar segments = buildSegments(events);\n\t\tvar html;\n\t\tvar elements;\n\n\t\t// calculate the desired `left` and `width` properties on each segment object\n\t\tcalculateHorizontals(segments);\n\n\t\t// build the HTML string. relies on `left` property\n\t\thtml = buildHTML(segments);\n\n\t\t// render the HTML. innerHTML is considerably faster than jQuery's .html()\n\t\trenderContainer[0].innerHTML = html;\n\n\t\t// retrieve the individual elements\n\t\telements = renderContainer.children();\n\n\t\t// if we were appending, and thus using a temporary container,\n\t\t// re-attach elements to the real container.\n\t\tif (doAppend) {\n\t\t\tfinalContainer.append(elements);\n\t\t}\n\n\t\t// assigns each element to `segment.event`, after filtering them through user callbacks\n\t\tresolveElements(segments, elements);\n\n\t\t// Calculate the left and right padding+margin for each element.\n\t\t// We need this for setting each element's desired outer width, because of the W3C box model.\n\t\t// It's important we do this in a separate pass from acually setting the width on the DOM elements\n\t\t// because alternating reading/writing dimensions causes reflow for every iteration.\n\t\tsegmentElementEach(segments, function(segment, element) {\n\t\t\tsegment.hsides = hsides(element, true); // include margins = `true`\n\t\t});\n\n\t\t// Set the width of each element\n\t\tsegmentElementEach(segments, function(segment, element) {\n\t\t\telement.width(\n\t\t\t\tMath.max(0, segment.outerWidth - segment.hsides)\n\t\t\t);\n\t\t});\n\n\t\t// Grab each element's outerHeight (setVerticals uses this).\n\t\t// To get an accurate reading, it's important to have each element's width explicitly set already.\n\t\tsegmentElementEach(segments, function(segment, element) {\n\t\t\tsegment.outerHeight = element.outerHeight(true); // include margins = `true`\n\t\t});\n\n\t\t// Set the top coordinate on each element (requires segment.outerHeight)\n\t\tsetVerticals(segments, doRowHeights);\n\n\t\treturn segments;\n\t}", "function _renderDayEvents(events, doAppend, doRowHeights) {\n\n\t\t// where the DOM nodes will eventually end up\n\t\tvar finalContainer = getDaySegmentContainer();\n\n\t\t// the container where the initial HTML will be rendered.\n\t\t// If `doAppend`==true, uses a temporary container.\n\t\tvar renderContainer = doAppend ? $(\"<div/>\") : finalContainer;\n\n\t\tvar segments = buildSegments(events);\n\t\tvar html;\n\t\tvar elements;\n\n\t\t// calculate the desired `left` and `width` properties on each segment object\n\t\tcalculateHorizontals(segments);\n\n\t\t// build the HTML string. relies on `left` property\n\t\thtml = buildHTML(segments);\n\n\t\t// render the HTML. innerHTML is considerably faster than jQuery's .html()\n\t\trenderContainer[0].innerHTML = html;\n\n\t\t// retrieve the individual elements\n\t\telements = renderContainer.children();\n\n\t\t// if we were appending, and thus using a temporary container,\n\t\t// re-attach elements to the real container.\n\t\tif (doAppend) {\n\t\t\tfinalContainer.append(elements);\n\t\t}\n\n\t\t// assigns each element to `segment.event`, after filtering them through user callbacks\n\t\tresolveElements(segments, elements);\n\n\t\t// Calculate the left and right padding+margin for each element.\n\t\t// We need this for setting each element's desired outer width, because of the W3C box model.\n\t\t// It's important we do this in a separate pass from acually setting the width on the DOM elements\n\t\t// because alternating reading/writing dimensions causes reflow for every iteration.\n\t\tsegmentElementEach(segments, function(segment, element) {\n\t\t\tsegment.hsides = hsides(element, true); // include margins = `true`\n\t\t});\n\n\t\t// Set the width of each element\n\t\tsegmentElementEach(segments, function(segment, element) {\n\t\t\telement.width(\n\t\t\t\tMath.max(0, segment.outerWidth - segment.hsides)\n\t\t\t);\n\t\t});\n\n\t\t// Grab each element's outerHeight (setVerticals uses this).\n\t\t// To get an accurate reading, it's important to have each element's width explicitly set already.\n\t\tsegmentElementEach(segments, function(segment, element) {\n\t\t\tsegment.outerHeight = element.outerHeight(true); // include margins = `true`\n\t\t});\n\n\t\t// Set the top coordinate on each element (requires segment.outerHeight)\n\t\tsetVerticals(segments, doRowHeights);\n\n\t\treturn segments;\n\t}", "function _renderDayEvents(events, doAppend, doRowHeights) {\n\n\t\t// where the DOM nodes will eventually end up\n\t\tvar finalContainer = getDaySegmentContainer();\n\n\t\t// the container where the initial HTML will be rendered.\n\t\t// If `doAppend`==true, uses a temporary container.\n\t\tvar renderContainer = doAppend ? $(\"<div/>\") : finalContainer;\n\n\t\tvar segments = buildSegments(events);\n\t\tvar html;\n\t\tvar elements;\n\n\t\t// calculate the desired `left` and `width` properties on each segment object\n\t\tcalculateHorizontals(segments);\n\n\t\t// build the HTML string. relies on `left` property\n\t\thtml = buildHTML(segments);\n\n\t\t// render the HTML. innerHTML is considerably faster than jQuery's .html()\n\t\trenderContainer[0].innerHTML = html;\n\n\t\t// retrieve the individual elements\n\t\telements = renderContainer.children();\n\n\t\t// if we were appending, and thus using a temporary container,\n\t\t// re-attach elements to the real container.\n\t\tif (doAppend) {\n\t\t\tfinalContainer.append(elements);\n\t\t}\n\n\t\t// assigns each element to `segment.event`, after filtering them through user callbacks\n\t\tresolveElements(segments, elements);\n\n\t\t// Calculate the left and right padding+margin for each element.\n\t\t// We need this for setting each element's desired outer width, because of the W3C box model.\n\t\t// It's important we do this in a separate pass from acually setting the width on the DOM elements\n\t\t// because alternating reading/writing dimensions causes reflow for every iteration.\n\t\tsegmentElementEach(segments, function(segment, element) {\n\t\t\tsegment.hsides = hsides(element, true); // include margins = `true`\n\t\t});\n\n\t\t// Set the width of each element\n\t\tsegmentElementEach(segments, function(segment, element) {\n\t\t\telement.width(\n\t\t\t\tMath.max(0, segment.outerWidth - segment.hsides)\n\t\t\t);\n\t\t});\n\n\t\t// Grab each element's outerHeight (setVerticals uses this).\n\t\t// To get an accurate reading, it's important to have each element's width explicitly set already.\n\t\tsegmentElementEach(segments, function(segment, element) {\n\t\t\tsegment.outerHeight = element.outerHeight(true); // include margins = `true`\n\t\t});\n\n\t\t// Set the top coordinate on each element (requires segment.outerHeight)\n\t\tsetVerticals(segments, doRowHeights);\n\n\t\treturn segments;\n\t}", "function renderEvent () {\n const daysContainer = document.querySelectorAll(\".current-month-day\");\n const currentMonth = date.getMonth() + 1;\n const currentYear = date.getFullYear();\n //* Calendar days divs pass by\n for (let div of daysContainer) {\n const dayNumber = div.firstChild.innerHTML;\n //* checking that day has events\n if (!!eventsByDate[`${currentYear}-${currentMonth}-${dayNumber}`]) {\n //* Looping thru events in array\n for (let eventObjectId of eventsByDate[`${currentYear}-${currentMonth}-${dayNumber}`]){\n //* Access to event data\n const eventTitle = eventsById[eventObjectId].title;\n const eventType = eventsById[eventObjectId].eventType;\n //* Create of the event element\n let newEvent = document.createElement(\"div\");\n newEvent.classList.add(\"event-in-calendar\");\n newEvent.innerHTML = eventTitle;\n newEvent.setAttribute(\"divEventId\", eventObjectId);\n //* choosing event color depending of event type\n switch (eventType) {\n case 'Study':\n newEvent.classList.add(\"blue-event\");\n break;\n case 'Meeting':\n newEvent.classList.add(\"green-event\");\n break;\n case 'Personal':\n newEvent.classList.add(\"orange-event\");\n break;\n default:\n break;\n }\n newEvent.addEventListener('click', eventModal);\n //* Insert element in DOM\n div.firstChild.insertAdjacentElement('afterend',newEvent);\n }\n }\n }\n}", "getEventsToRender() {}", "function renderEvents() {\n\t$(\"#event-items\").html(\"\");\n\n\tif (show_events) {\n\t\tvar i = 0;\n\t\t// if (eventsLogList.length > 10) {\n\t\t// \ti = eventsLogList.length - 10;\n\t\t// }\n\t\tfor (;i < eventsLogList.length; i++) {\n\t\t\tvar eventsListItem = $(\"#event-template\").clone();\n\t\t\teventsListItem.html(eventsLogList[i]);\n\t\t\t$(\"#event-items\").append(eventsListItem);\n\t\t\teventsListItem.show();\n\t\t}\n\t}\n\t\t$(\"#event-items\").scrollTop($(\"#event-items\")[0].scrollHeight);\n}", "function renderEvents() {\n markers.clearLayers();\n var eventsGeoJsonAPI = '/api/geojson/events';\n updateMap(eventsGeoJsonAPI);\n removeSpinner();\n}", "function displayEvents(events) {\n // Clear canvas\n canvas.innerHTML = '';\n // Add each event to canvas\n _.forEach(layOutDay(events), function(event) {\n canvas.appendChild(_createCalendarElement(event));\n });\n }", "function calendar_helper_populateCalendar(){\n\t// Event listeners for calendar and intiialize calendar\n\t$('#calendar').weekCalendar({\n timeslotsPerHour: TIMESLOTS_PER_HOUR,\n daysToShow: days_to_show,\n date: calendar_start_date,\n startOnFirstDayOfWeek: false,\n buttons: false,\n allowEventCreation: false,\n businessHours: {start: 8, end: 24, limitDisplay: true},\n height: function() {return window.innerHeight - 0.45*window.innerHeight - 105},\n eventRender : function(calEvent, $event) {\n },\n eventAfterRender : function(calEvent, $event) {\n // Update the database\n if (calEvent.id !=null){\n updateEvent(calEvent.db_id,calEvent.start,calEvent.end);\n }\n\n // Set event params\n setIsValid(calEvent); \n calEvent.event_dom_handler = $event;\n\n // Update backgrounds of all events\n calendar_helper_refreshEvents();\n },\n eventNew : function(calEvent, $event) {\n },\n eventDrag : function(calEvent, $event) {\n var next_event = calendar_helper_getNextEvent(calEvent);\n\n if (next_event!=null){\n events_to_be_refreshed.push(next_event);\n }\n },\n eventDrop : function(calEvent, $event) {\n // $event is not the dom handler but the calevent itsself \n // and there are 2 events of the same type on the calendar right now\n // making this a pretty useless event\n\n var next_event = calendar_helper_getNextEvent(calEvent);\n\n if (next_event!=null){\n events_to_be_refreshed.push(next_event);\n }\n\n events_to_be_refreshed.push(calEvent);\n // Update the daily lines on the map\n directions_api_addDailyDirections(calEvent);\n },\n eventResize : function(calEvent, $event) {\n setIsValid(calEvent);\n calendar_helper_refreshEvents();\n updateEvent(calEvent.db_id,calEvent.start,calEvent.end);\n //calendar_events[calEvent.id] = calEvent; //TODO\n },\n eventClick : function(calEvent, $event) {\n destination_selected_from_calendar(calEvent);\n },\n eventMouseover : function(calEvent, $event) {\n },\n eventMouseout : function(calEvent, $event) {\n },\n noEvents : function() {\n },\n data:{events:calendar_events}\n\t});\n\t// Activating tabs\n\t$(\".tabLink\").each(function(){\n\t $(this).click(function(){\n\t\ttabeId = $(this).attr('id');\n\t\t$(\".tabLink\").removeClass(\"activeLink\");\n\t\t$(this).addClass(\"activeLink\");\n\t\t$(\".tabcontent\").addClass(\"hide\");\n\t\t$(\"#\"+tabeId+\"-1\").removeClass(\"hide\") \n\t\treturn false;\t \n\t });\n\t});\n\n}", "function renderEvents() {\n const locationsDom = g.selectAll('.location')\n .data(domain.locations, d => d.id)\n\n locationsDom\n .exit()\n .remove();\n\n locationsDom\n .enter().append('g')\n .attr('class', 'location')\n .attr('transform', (d) => {\n d.LatLng = new L.LatLng(+d.latitude, +d.longitude);\n return `translate(${lMap.latLngToLayerPoint(d.LatLng).x},\n ${lMap.latLngToLayerPoint(d.LatLng).y})`;\n })\n .on('click', (location) => {\n methods.onSelect(location.events);\n });\n\n const eventsDom = g.selectAll('.location')\n .selectAll('.location-event-marker')\n .data((d, i) => getLocationEventsDistribution(domain.locations[i]))\n\n eventsDom\n .exit()\n .attr('r', 0)\n .remove();\n\n eventsDom\n .transition()\n .duration(500)\n .attr('r', d => (d) ? Math.sqrt(16 * d) + 3 : 0);\n\n eventsDom\n .enter().append('circle')\n .attr('class', 'location-event-marker')\n .style('fill', (d, i) => getCategoryColor(domain.categories[i].category))\n .transition()\n .duration(500)\n .attr('r', d => (d) ? Math.sqrt(16 * d) + 3 : 0);\n }", "function renderCal() {\n $('#calendar').fullCalendar('rerenderEvents');\n }", "function eventsRender(events, identifier) {\n if(activeTab == \"term1\"){\n for (var i = 0; i < events.length; i++) {\n calendar_term1.fullCalendar('renderEvent', events[i], true);\n }\n } else if(activeTab == \"term2\"){\n for (var i = 0; i < events.length; i++) {\n calendar_term2.fullCalendar('renderEvent', events[i], true);\n }\n }\n }", "function reportEvents(_events) {\n\t\t\tevents = _events;\n\t\t\trenderEvents();\n\t\t}", "function reportEvents(_events) {\n\t\tevents = _events;\n\t\trenderEvents();\n\t}", "function reportEvents(_events) {\n\t\tevents = _events;\n\t\trenderEvents();\n\t}", "function reportEvents(_events) {\n\t\tevents = _events;\n\t\trenderEvents();\n\t}", "function reportEvents(_events) {\n\t\tevents = _events;\n\t\trenderEvents();\n\t}", "function reportEvents(_events) {\n\t\tevents = _events;\n\t\trenderEvents();\n\t}", "function reportEvents(_events) {\n\t\tevents = _events;\n\t\trenderEvents();\n\t}", "function reportEvents(_events) {\n\t\tevents = _events;\n\t\trenderEvents();\n\t}", "function reportEvents(_events) {\n\t\tevents = _events;\n\t\trenderEvents();\n\t}", "function reportEvents(_events) {\n events = _events;\n renderEvents();\n }", "function handleEventData(events) {\n let now = new Date()\n // needed to handle overlapping events\n let timeMarkerAdded = false;\n // need to sort events by start/end times instead of IDs\n events.sort(compareEvents);\n\n // Looping through each event to handle it\n events.forEach(event => {\n // Getting strings for times\n let startDate = new Date(event.start); // convert ISO 8601 -> Date object\n let finishDate = undefined;\n let dateString = convertDate(startDate);\n if (event.finish) { // finish === null for instantaneous events\n finishDate = new Date(event.finish);\n let finishString = convertDate(finishDate);\n if (dateString.slice(-2) === finishString.slice(-2)) { // hide \"am/pm\" of first time if both are identical\n dateString = dateString.slice(0, -2);\n }\n dateString += \" - \" + convertDate(finishDate);\n }\n\n // calculate event container classes\n let divClasses = 'event';\n let liveIndicator = \"\";\n if (finishDate < now) {\n divClasses += ' event-complete';\n }\n else if (startDate < now && now < finishDate) {\n divClasses += ' event-live';\n liveIndicator = '<p class=\"live\">LIVE!</p>';\n }\n\n // adding event to the page\n var eventContainer;\n // Deciding which day content box it goes inside\n switch (startDate.getDate()) {\n case 5: eventContainer = $('#mar-5-content'); break;\n case 6: eventContainer = $('#mar-6-content'); break;\n }\n // If it doesn't fall into one of those event days, log the problem and quit trying to add it\n if (!eventContainer) {\n console.log(\"Event \" + event.title + \" date \" + startDate + \" out of range.\");\n return; // skip current iteration https://stackoverflow.com/a/31399448/1431900\n }\n // Building HTML and adding it to page\n let html = `<div class=\"${divClasses}\"><p class=\"time\">${dateString}</p><p>${event.title}</p>${liveIndicator}</div>`;\n const eventDiv = eventContainer.append(html);\n });\n}", "function renderCal() {\n $('#cal').empty();\n $('#cal').fullCalendar({\n // options\n header: {\n left: 'prev,next today',\n center: 'title',\n right: 'month,agendaWeek,agendaDay'\n },\n selectable: true,\n selectHelper: true,\n select: function(start, end, allDay) {\n var title = prompt('Event Title:');\n if (title) {\n var tmpEvent = {\n \"title\": title,\n \"start\": start,\n \"end\": end,\n \"allDay\": allDay,\n \"category\": 1 // faked category for now\n };\n eventAction(\"save\", tmpEvent);\n }\n $('#cal').fullCalendar('unselect');\n },\n editable: true,\n defaultView: 'month',\n eventSources: [{\n url: 'ajax.php',\n type: 'POST',\n data: {\n func: 'getevents',\n args: ''\n },\n error: function() {\n showMsg(\"There was an error while fetching events!\", true);\n },\n color: 'green', // a non-ajax option\n textColor: 'white' // a non-ajax option\n }],\n eventDrop: function(event, dayDelta, minuteDelta, allDay, revertFunc, jsEvent, ui, view) {\n if (typeof event.eid != \"undefined\") {\n eventAction(\"update\", event);\n }\n },\n eventClick: function(event, jsEvent, view) {\n // only allow editing of events with an eid property (from our db)\n if (typeof event.eid != \"undefined\") {\n // Was Control key pressed when the event was clicked? If so, this is a delete.\n if (jsEvent.ctrlKey == true) {\n var result = confirm('Delete event \"' + event.title + '\" ?');\n if (result == true) eventAction(\"delete\", event);\n }\n else { // No control key pressed, this is an edit.\n var title = prompt('Event Title:', event.title);\n if (title != \"\" && title != null) { // Capture empty title and cancel button (null)\n event.title = title;\n eventAction(\"update\", event);\n }\n }\n }\n }\n });\n}", "function eventsInitialRender() {\n //remove selection if it's there\n localStorage.setItem(\"mainContentCalendarSelectedCrn\", \"\");\n\n //manageClasses page\n if (document.getElementById(\"mc_manageClasses_input_crn\")) {\n manageClasses_eventsInitialRender();\n }\n\n //assign professors page\n\tif (document.getElementById(\"mc_assingProfessors_section\")) {\n assignProfessors_eventsInitialRender();\n }\n \n //scheduleRegistration\n if (document.getElementById(\"mc_scheduleRegistration_classTable\")) {\n scheduleRegistration_eventsInitialRender();\n }\n\n //TODO: handle other pages\n}", "function attachEvents(selection, renderItems) {\r\n var dragBehavior;\r\n \r\n // We want to know all the different types of events that exist in any of the elements. This cryptic oneliner does that.\r\n // Say we have one element with handlers for click and mouseover, and another one with handlers for mouseover and mouseout.\r\n // We will want an array that says [\"click\", \"mouseover\", \"mouseout\"]. We will have to attach all three events to all elements\r\n // because there is no (trivial) way to attach event handlers per element. The handlers will actually be functions that check\r\n // if the given handler exists and only then call it.\r\n var allEvents = _.uniq(_.flatten(_.map(_.pluck(renderItems, \"eventHandlers\"), function (eh) { return _.keys(eh); })));\r\n \r\n // Add all the handlers except for click and dblclick which we take special care of below.\r\n _.each(allEvents, function (ce) {\r\n if (ce === \"click\" || ce === \"dblclick\")\r\n return;\r\n \r\n // drag events aren't native to the browser so we need to attach D3's dragBehavior if such handlers exist.\r\n if (ce === \"dragstart\" || ce === \"drag\" || ce === \"dragend\") {\r\n if (!dragBehavior) {\r\n dragBehavior = d3.behavior.drag()\r\n .origin(function() { \r\n var t = d3.select(this);\r\n return {x: t.attr(\"x\"), y: t.attr(\"y\")};\r\n })\r\n }\r\n \r\n dragBehavior.on(ce, function (d, i) {\r\n d.eventHandlers[ce](d, i, d3.event);\r\n //d3.event.stopPropagation();\r\n });\r\n } else {\r\n selection.on(ce, function (d, i) {\r\n if (d.eventHandlers.hasOwnProperty(ce)) {\r\n d.eventHandlers[ce](d, i, d3.event);\r\n d3.event.stopPropagation();\r\n }\r\n });\r\n }\r\n });\r\n \r\n if (dragBehavior)\r\n selection.call(dragBehavior);\r\n \r\n var doubleClickDelay = 300;\r\n var singleClickTimer;\r\n var storedEvent;\r\n \r\n // Now, as for click and dblclick, we want to make sure they can work together. If only one of them is supplied, there is no problem\r\n // because we can simply attach to that event. However, if both are in use, we need to wait after the first click and see if the user\r\n // indeed meant to double click or not. If no secondary click is recorded within doubleClickDelay milliseconds, it's considered a single click.\r\n selection.on(\"click\", function (d, i) {\r\n if (d.eventHandlers.hasOwnProperty(\"click\") && d.eventHandlers.hasOwnProperty(\"dblclick\")) {\r\n if (singleClickTimer) {\r\n d.eventHandlers.dblclick(d, i, d3.event);\r\n clearTimeout(singleClickTimer);\r\n singleClickTimer = null;\r\n } else {\r\n storedEvent = d3.event;\r\n singleClickTimer = setTimeout(function () {\r\n d.eventHandlers.click(d, i, storedEvent);\r\n singleClickTimer = null;\r\n }, doubleClickDelay);\r\n }\r\n d3.event.stopPropagation();\r\n } else if (d.eventHandlers.hasOwnProperty(\"click\")) {\r\n d.eventHandlers.click(d, i, d3.event);\r\n d3.event.stopPropagation();\r\n }\r\n });\r\n \r\n selection.on(\"dblclick\", function (d, i) {\r\n if (d.eventHandlers.hasOwnProperty(\"dblclick\") && !d.eventHandlers.hasOwnProperty(\"click\")) {\r\n d.eventHandlers.dblclick(d, i, d3.event);\r\n d3.event.stopPropagation();\r\n }\r\n });\r\n }", "renderAllEvents() {\n // sort items\n switch (this._sortBy) {\n case SortTypes.time:\n this._eventsFiltered.sort((eventA, eventB) => eventA.duration < eventB.duration ? 1 : -1);\n break;\n case SortTypes.price:\n this._eventsFiltered.sort((eventA, eventB) => eventA.price < eventB.price ? 1 : -1);\n break;\n default:\n this._eventsFiltered.sort((eventA, eventB) => eventA.dateBegin > eventB.dateBegin ? 1 : -1);\n break;\n }\n\n this.elemTripDays.innerHTML = ``;\n\n // array of trip days\n let arrTripDays = [];\n if (this._sortBy !== SortTypes.event) {\n arrTripDays.push(SHOW_NO_DAY);\n } else {\n arrTripDays = uniqueDays(this._eventsFiltered);\n }\n\n // render all days\n if (arrTripDays.length) {\n arrTripDays.forEach(this.renderTripDay.bind(this));\n } else {\n // no event found\n render(this.elemTripEvents, (new NoPoints()).element);\n }\n }", "renderEvent(data) {\n const me = this,\n eventIdProperty = me.view.scheduledEventName + 'Id',\n eventId = data[eventIdProperty],\n layoutCache = me.cache.getTimeSpan(eventId, data.resourceId),\n renderedEvents = me.cache.getRenderedEvents(data.resourceId),\n meta = data.event.instanceMeta(me.scheduler),\n // Event might be flagged to require a new element in onEventAdd, but if it is a drag proxy it should still\n // reuse an existing element (it will be correctly linked to the drag proxy element)\n wrapperElement = me.renderTimeSpan(\n data,\n layoutCache,\n renderedEvents[data.id],\n meta.requireElement && !meta.fromDragProxy\n );\n\n if (data.assignment) {\n wrapperElement.dataset.assignmentId = data.assignment.id;\n }\n\n // Add event/task id to wrappers dataset\n // Otherwise event element won't have event id property in it's dataset and scheduler\n // won't be able to resolve event by element reference (#8943)\n if (eventId) {\n wrapperElement.dataset[eventIdProperty] = eventId;\n }\n\n renderedEvents[data.id] = data;\n\n if (meta.requireElement) {\n delete meta.requireElement;\n delete meta.fromDragProxy;\n }\n\n // This event is documented on Scheduler\n me.scheduler.trigger('renderEvent', {\n eventRecord: data.event,\n resourceRecord: data.resource,\n assignmentRecord: data.assignment,\n element: wrapperElement,\n tplData: data\n });\n }", "function updateEvents(forceRender) {\n\t\tif (!options.lazyFetching\n\t\t\t\t|| isFetchNeeded(currentView.visStart, currentView.visEnd)) {\n\t\t\trefetchEvents();\n\t\t} else if (forceRender) {\n\t\t\trerenderEvents();\n\t\t}\n\t}", "function refetchEvents() { // can be called as an API method\n\t\t\tfetchAndRenderEvents();\n\t\t}", "function refetchEvents() { // can be called as an API method\n\t\tfetchAndRenderEvents();\n\t}", "function renderCalendar() {\n // render month title\n renderMonthTitle(currentMonth, monthTitleEl);\n\n // render days\n renderDays(currentMonth, daysContainerEl);\n }", "function reportEventChange() {\n renderEvents();\n }", "function CalendarPage() { \n\tconst [openEventForm, setOpenEventForm] = useState(false);\n\tconst [openEventInfo, setOpenEventInfo] = useState(false);\n\tconst [eventInfo, setEventInfo] = useState({});\n\tconst [editingEvent, setEditingEvent] = useState({});\n\tconst [eventsList, setEventsList] = useState([]);\n\tconst [calendarEvents, setCalendarEvents] = useState([]);\n\tconst [sidebarEvents, setSidebarEvents] = useState([]);\n\tconst [groupedEvent, setGroupedEvent] = useState([]);\n\tconst [openGroupedList, setOpenGroupedList] = useState(false);\n\n\t//Get the list of events\n\tuseEffect(() => {\n\t\tgetAllEvents().then(events => {\n\t\t\tconst tempEvents = events.map(convertEvent);\n\t\t\tsetEventsList(sortEvents(tempEvents));\n\t\t\t//Note: calendarEvents has its own useEffect to update\n\t\t});\n\t}, []);\n\n\tconst handleOpenEventInfo = (data) => {\n\t\t//set data that will be passed into the event popup\n\t\tif(data.isGroup) {\n\t\t\t//Open a popup designed to display grouped events\n\t\t\tsetGroupedEvent(data.group);\n\t\t\tsetOpenGroupedList(true);\n\t\t} else {\n\t\t\t//Singular event info popup\n\t\t\tsetEventInfo({...data, organizer:(data.organizer ? data.organizer : 'Unknown')});\n\t\t\tsetOpenEventInfo(true);\n\t\t}\n\t}\n\tconst handleCloseEventInfo = () => {\n\t\tsetOpenEventInfo(false);\n\t}\n\n\tconst handleCloseGroupedList = () => {\n\t\tsetOpenGroupedList(false);\n\t}\n\n\tconst handleOpenEventForm = () => {\n\t\tsetOpenEventForm(true);\n\t}\n\n\tconst handleCloseEventForm = () => {\n\t\tsetOpenEventForm(false);\n\t\tsetEditingEvent({});\n\t}\n\n\tconst handleEditEventForm = (event) => {\n\t\tsetEditingEvent(event);\n\t\tsetOpenEventInfo(false);\n\t\tsetOpenEventForm(true);\n\t}\n\n\tconst refreshEvents = () => {\n\t\twindow.location.reload();\n\t}\n\n\tuseEffect(() => {\n\t\t//Update separate events lists whenever eventsList is updated\n\t\tsetCalendarEvents(groupEvents(eventsList));\n\t\tsetSidebarEvents(filterPastEvents(eventsList));\n\t}, [eventsList]);\n\n\tconst editEvent = useCallback(editedEvent => {\n\t\tconst withoutEdited = eventsList.filter(event => \n\t\t\tevent._id !== editedEvent._id);\n\t\tsetEventsList([...withoutEdited, editedEvent]);\n\t}, [eventsList]);\n\n\t//Siderbar functions and variables\n\tconst classes = useStyles();\n\tconst [openDrawer, setOpenDrawer] = useState(false);\n\t\n\tconst handleDrawerOpen = () => {\n\t\tsetOpenDrawer(true);\n\t};\t\n\tconst handleDrawerClose = () => {\n\t\tsetOpenDrawer(false);\n\t};\n\n\treturn (\n\t\t<>\n\t\t\t{/* Sidebar */}\n\t\t\t<AppBar position=\"relative\" elevation={4} color='primary'>\n\t\t\t\t<ToolbarMaterial>\n\t\t\t\t\t<IconButton>\n\t\t\t\t\t\t<EventIcon style={{ color: '#ffffff' }} />\n\t\t\t\t\t</IconButton>\n\t\t\t\t\t<Typography variant=\"h6\" className={classes.title} edge=\"start\">\n\t\t\t\t\t\tCalendar\n\t\t\t\t\t</Typography>\n\t\t\t\t\t<IconButton\n\t\t\t\t\t\tcolor=\"inherit\"\n\t\t\t\t\t\taria-label=\"open drawer\"\n\t\t\t\t\t\tonClick={handleDrawerOpen}\n\t\t\t\t\t\tclassName={clsx(openDrawer && classes.hide)}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t<MenuIcon />\n\t\t\t\t\t</IconButton>\n\t\t\t\t</ToolbarMaterial>\n\t\t\t</AppBar>\n\n\t\t\t<Box p={2} bgcolor=\"background\"/>\n\n\t\t\t<SideBar open={openDrawer} onClose={handleDrawerClose} events={sidebarEvents}/>\n\n\t\t\t{/* Calendar */}\n\t\t\t<Paper className={classes.paper} elevation={3}>\n\t\t\t\t<Scheduler data={calendarEvents}>\n\t\t\t\t<ViewState defaultCurrentViewName=\"Month\"/>\n\t\t\t\t<MonthView />\n\t\t\t\t<Toolbar />\n\t\t\t\t<MonthView />\n\t\t\t\t<WeekView \n\t\t\t\t\tstartDayHour={7}\n\t\t\t\t\tendDayHour={21}\n\t\t\t\t\tcellDuration={60}\n\t\t\t\t/>\n\t\t\t\t<DayView \n\t\t\t\t\tstartDayHour={7}\n\t\t\t\t\tendDayHour={21}\n\t\t\t\t\tcellDuration={60}\n\t\t\t\t/>\n\t\t\t\t<ViewSwitcher />\n\t\t\t\t<DateNavigator />\n\t\t\t\t<TodayButton />\n\t\t\t\t<Appointments\n\t\t\t\t\tappointmentComponent={provideCustomAppointment(handleOpenEventInfo)}\n\t\t\t\t/>\n\t\t\t\t</Scheduler>\n\t\t\t</Paper>\n\n\t\t\t{/* Add event button */}\n\t\t\t<Button\n\t\t\t\tclassName={classes.buttonShape}\n\t\t\t\tvariant='contained' \n\t\t\t\tcolor='secondary'\n\t\t\t\tstartIcon={<AddIcon/>}\n\t\t\t\tonClick={handleOpenEventForm}\n\t\t\t>\n\t\t\t\tCreate\n\t\t\t</Button>\n\t\t\t\n\t\t\t{/* Popup box for event form */}\n\t\t\t<Dialog \n\t\t\t\topen={openEventForm} \n\t\t\t\tonClose={handleCloseEventForm}\n\t\t\t\tdisableBackdropClick\n \t\t\tdisableEscapeKeyDown>\n\t\t\t\t<EventFormPage \n\t\t\t\t\tonClose={handleCloseEventForm} \n\t\t\t\t\trefreshEvents={refreshEvents}\n\t\t\t\t\teditEvent={editEvent}\n\t\t\t\t\tevent={editingEvent}\n\t\t\t\t/>\n\t\t\t</Dialog>\n\n\t\t\t{/* Popup box for event info */}\n\t\t\t<Dialog open={openEventInfo} onClose={handleCloseEventInfo}>\n\t\t\t\t<SingleEventPage\n\t\t\t\t\tevent={eventInfo}\n\t\t\t\t\tclosePopup={handleCloseEventInfo}\n\t\t\t\t\thandleEdit={handleEditEventForm}\n\t\t\t\t\trefreshEvents={refreshEvents}\n\t\t\t\t/>\n\t\t\t</Dialog>\n\n\t\t\t{/* Popup box for grouped event info */}\n\t\t\t<Dialog open={openGroupedList} onClose={handleCloseGroupedList}>\n\t\t\t\t<EventList eventList={groupedEvent}/>\n\t\t\t</Dialog>\n\t\t</>\n\t); \n}", "function renderCalendar() {\n\n function renderCalendarViewRender(view, element) {\n scheduled.currentViewType = view.type;\n // this event fires once the calendar has completed loading and when the date is changed - thus calling the new events\n var start = moment(view.start).format('DD-MM-YYYY');\n var end = moment(view.end).format('DD-MM-YYYY');\n if(scheduled.currentViewType == 'month') {\n // if the current 'start' date of the selected month is not the same as the actual month then set the scheduled.calendarDate to the first of the proper month\n var currentStartMonth = moment(start, 'DD-MM-YYYY').format('MM-YYYY');\n var currentMonth = moment(view.title, 'MMMM YYYY').format('MM-YYYY');\n if(currentStartMonth != currentMonth) {\n scheduled.calendarDate = moment(view.title, 'MMMM YYYY').startOf('month').format('DD-MM-YYYY');\n }\n else {\n scheduled.calendarDate = start;\n }\n } else {\n scheduled.calendarDate = start;\n }\n updateCalendar(start, end);\n }\n\n\n $('#schedule-calendar').fullCalendar({\n header: {\n left: 'prev,next today',\n center: 'title',\n right: 'month,agendaWeek,agendaDay',\n },\n eventRender: function (event, element) {\n //Show tooltip when hovering over an event title\n var toolTipContent = '<strong>' + event.title + '</strong><br/>' + moment(event.start).format('MMMM D, YYYY') + ' ' + moment(event.start).format('h:mma');\n /*element.qtip({\n content: toolTipContent,\n hide: {fixed: true, delay: 200},\n style: 'qtip-light',\n position: {\n my: 'bottom center',\n at: 'top center',\n target: 'mouse',\n viewport: $('#fullcalendar'),\n adjust: {\n x: 0,\n y: -10,\n mouse: false,\n scroll: false,\n },\n },\n });*/\n },\n\n viewRender: renderCalendarViewRender,\n\n timeFormat: 'h:mma',\n firstDay: 1,\n aspectRatio: 2,\n defaultView: scheduled.currentViewType,\n fixedWeekCount: false,\n editable: false,\n lazyFetch: false,\n defaultDate: moment(scheduled.calendarDate, 'DD-MM-YYYY')\n });\n\n log.info('calendar start date ' + moment(scheduled.calendarDate, 'DD-MM-YYYY').format('DD-MM-YYYY'))\n }", "function render() {\n component = new DayCalender(reRender)\n document.getElementById(\"app\").innerHTML = component.render();\n component.attachListener && component.attachListener(); // attach listener only once\n}", "function render_ICalReader_for_main_edt_one_day_all_event(collection, zone, timeInfo) {\n timeInfo = typeof timeInfo !== 'undefined' ? timeInfo : 7;\n var logo = '<img src=\"img/logos/calendar.png\"/>';\n zone.loadImage(\"img/logos/calendar.png\");\n var title = collection.name;\n var tableau = collection.events;\n var eventsNum = 0;\n var time = timeInfo;\n\n var eventsByDays = transform_in_days(tableau);\n\n var daysSort = Object.keys(eventsByDays).sort();\n\n for (var idays = 0; idays < daysSort.length; idays++) {\n var days = daysSort[idays];\n var sortObjectStart = function(a, b) {\n return (a.start - b.start);\n };\n\n eventsByDays[days][days].sort(sortObjectStart);\n\n var elementsCollec = eventsByDays[days];\n\n var start = elementsCollec['days'][0];\n var elementsArray = elementsCollec[start];\n\n var listDicoElts = new Array();\n\n var date = get_date_from_timestamp(start);\n eventsNum = 0;\n\n content = \"<div id='ICalReader' class='main_div_zone1'>\";\n\n if (is_same_date(date, get_current_date()))\n content += \"<div class='calendar_dates_multiple_element_hour_top'>Aujourd'hui</div>\";\n else\n content += \"<div class='calendar_dates_multiple_element_hour_top'>\" + date.day + \" \" + date.month + \"</div>\";\n\n content += \"<div class='calendar_one_day_all_event'>\";\n content += \"<table class='calendarTable' border='0'>\";\n\n for (var indice = 0; indice < elementsArray.length; indice++) {\n elements = elementsArray[indice];\n\n if (!pastEvent(elements)) {\n eventsNum++;\n if ((eventsNum) % 3 == 0) {\n var summary = elements.summary;\n if (elements.summary.length >= 100)\n summary = elements.summary.substring(0, 100) + \"...\";\n\n if (inProgress(elements))\n content += \"<tr class='inProgress_synth'>\";\n else\n content += \"<tr >\";\n content += \"<td class='tableDate'>\" + render_date_edt_synth(elements) + \"</td>\";\n if (elements.location) {\n content += \"<td class='tableSum'>\" + summary + \"</td>\";\n content += \"<td class='tableLoc'>\" + elements.location.substring(0, 20) + \"</td>\";\n }\n else {\n content += \"<td class='tableSum' colspan=2>\" + summary + \"</td>\";\n }\n content += \"</tr>\";\n\n content += \"</table>\";\n content += \"</div>\";\n content += \"</div>\";\n content += \"<div class='smooth'> </div>\";\n var dico = {\"content\": content, \"logo\": logo, \"title\": title, \"time\": time};\n zone.pushInfo(dico);\n\n content = \"<div id='ICalReader' class='main_div_zone1'>\";\n\n if (is_same_date(date, get_current_date()))\n content += \"<div class='calendar_dates_multiple_element_hour_top'>Aujourd'hui</div>\";\n else\n content += \"<div class='calendar_dates_multiple_element_hour_top'>\" + date.day + \" \" + date.month + \"</div>\";\n\n content += \"<div class='calendar_one_day_all_event'>\";\n content += \"<table class='calendarTable'>\";\n }\n else {\n var summary = elements.summary;\n if (elements.summary.length >= 100)\n summary = elements.summary.substring(0, 100) + \"...\";\n\n if (inProgress(elements))\n content += \"<tr class='inProgress_synth'>\";\n else\n content += \"<tr >\";\n content += \"<td class='tableDate'>\" + render_date_edt_synth(elements) + \"</td>\";\n if (elements.location) {\n content += \"<td class='tableSum'>\" + summary + \"</td>\";\n content += \"<td class='tableLoc'>\" + elements.location.substring(0, 20) + \"</td>\";\n }\n else {\n content += \"<td class='tableSum' colspan=2>\" + summary + \"</td>\";\n }\n content += \"</tr>\";\n }\n if (indice + 1 == elementsArray.length) {\n if ((eventsNum) % 3 != 0) {\n content += \"</table>\";\n content += \"</div>\";\n content += \"</div>\";\n content += \"<div class='smooth'> </div>\";\n var dico = {\"content\": content, \"logo\": logo, \"title\": title, \"time\": time};\n zone.pushInfo(dico);\n }\n }\n }\n }\n }\n}", "function Events_Prepare( day ) {\n\tvar DEBUG_Events_Prepare = false;\n\tif ( DEBUG_Events_Prepare ) { console.warn('Events_Prepare[day='+day+']'); }\n\tvar currentDay,\n\t currentEvent,\n\t eventKey,\n\t\t\t//heightMultiplier = ScheduleIncrementHeight / ScheduleTimeIncrement,\n\t left,\n\t overlappingEvents,\n\t width;\n\tEVENTS_READY = {};\n\tEvents_Sort(EVENTS_TO_DISPLAY);\n\tif ( DEBUG_Events_Prepare ) { console.log('EVENTS_TO_DISPLAY='+JSON.stringify(EVENTS_TO_DISPLAY)); }\n\tfor ( var i=0, l=EVENTS_TO_DISPLAY.length; i<l; i+=1 ) { // Loop thru EVENTS_TO_DISPLAY.\n\t\tif ( DEBUG_Events_Prepare ) { console.log('EVENTS_TO_DISPLAY['+i+']='+JSON.stringify(EVENTS_TO_DISPLAY[i])); }\n\t\tcurrentEvent = EVENTS_TO_DISPLAY[i];\n\t\teventKey = EVENTS_TO_DISPLAY[i].scmId;//currentEvent.begin+'*'+currentEvent.end+'*'+currentEvent.position;\n\t\toverlappingEvents = Events_Prepare_Check(EVENTS_OVERLAPPING[eventKey], eventKey, day);\n\t\twidth = overlappingEvents.width;\n\t\tleft = overlappingEvents.left;\n\t\tcurrentEvent.top = currentEvent.begin;// * heightMultiplier;\n\t\tcurrentEvent.width = width;\n\t\tcurrentEvent.left = left;\n\t\tcurrentEvent.height = ( currentEvent.end - currentEvent.begin );// * heightMultiplier;\n\t\tcurrentEvent.contentWidth = currentEvent.width - 4;\n\t\t\n\t\tEVENTS_READY[eventKey] = {\n\t\t\tleft: left,\n\t\t\twidth : width\n\t\t};\n\t\tif ( DEBUG_Events_Prepare ) { console.log('EVENTS_READY['+eventKey+']='+JSON.stringify(EVENTS_READY[eventKey])); }\n\t} // Loop thru EVENTS_TO_DISPLAY.\n\tif ( DEBUG_Events_Prepare ) { console.log('EVENTS_TO_DISPLAY='+JSON.stringify(EVENTS_TO_DISPLAY)); }\n\tif ( DEBUG_Events_Prepare ) { console.log('EVENTS_READY='+JSON.stringify(EVENTS_READY)); }\n} // END Events_Prepare.", "onRenderDone() {\n const {\n scheduler,\n rowMap\n } = this,\n visibleEventDOMConfigs = []; // Concat all rows event configs\n\n rowMap.forEach(eventDOMConfigs => visibleEventDOMConfigs.push.apply(visibleEventDOMConfigs, eventDOMConfigs));\n DomSync.sync({\n domConfig: {\n onlyChildren: true,\n children: visibleEventDOMConfigs\n },\n targetElement: scheduler.foregroundCanvas,\n syncIdField: 'syncId',\n\n // Called by DomHelper when it creates, releases or reuses elements\n callback({\n action,\n domConfig,\n lastDomConfig,\n targetElement\n }) {\n var _domConfig$className;\n\n // If element is a task wrap, trigger appropriate events\n if (action !== 'none' && (domConfig === null || domConfig === void 0 ? void 0 : (_domConfig$className = domConfig.className) === null || _domConfig$className === void 0 ? void 0 : _domConfig$className[`${scheduler.eventCls}-wrap`])) {\n const // Some actions are considered first a release and then a render (reusing another element).\n // This gives clients code a chance to clean up before reusing an element\n isRelease = releaseEventActions[action],\n isRender = renderEventActions[action]; // Trigger release for events (it might be a proxy element, skip those)\n\n if (isRelease && (lastDomConfig === null || lastDomConfig === void 0 ? void 0 : lastDomConfig.elementData)) {\n const {\n eventRecord,\n resourceRecord,\n assignmentRecord\n } = lastDomConfig.elementData,\n event = {\n renderData: lastDomConfig.elementData,\n element: targetElement,\n eventRecord,\n resourceRecord,\n assignmentRecord\n }; // Some browsers do not blur on set to display:none, so releasing the active element\n // must *explicitly* move focus outwards to the view.\n\n if (targetElement === document.activeElement) {\n scheduler.focusElement.focus();\n } // This event is documented on Scheduler\n\n scheduler.trigger('releaseEvent', event);\n }\n\n if (isRender) {\n const {\n eventRecord,\n resourceRecord,\n assignmentRecord\n } = domConfig.elementData,\n event = {\n renderData: domConfig.elementData,\n tplData: domConfig.elementData,\n // DEPRECATED IN 4.0\n element: targetElement,\n isReusingElement: action === 'reuseElement',\n isRepaint: action === 'reuseOwnElement',\n eventRecord,\n resourceRecord,\n assignmentRecord\n }; // This event is documented on Scheduler\n\n scheduler.trigger('renderEvent', event);\n }\n }\n }\n\n }); // There are multiple pathways that might lead to the first render of events. This is the first reliable\n // place were we can determine that something will be rendered\n\n visibleEventDOMConfigs.length && scheduler._firstRenderDone && scheduler._firstRenderDone();\n }", "_mouseEventsHandler(event) {\n const that = this;\n\n if (that.disabled || that.readonly) {\n return;\n }\n\n if (event.type === 'mouseenter') {\n that.$.setAttributeValue('hover', true);\n return;\n }\n else if (event.type === 'mouseleave') {\n that.$.setAttributeValue('hover', false);\n\n if (that.tooltip) {\n that.$.tooltip.close();\n }\n\n return;\n }\n\n const target = that.enableShadowDOM ? event.composedPath()[0] : event.target;\n\n if (!target.closest('.jqx-calendar-week')) {\n if (that.tooltip) {\n that.$.tooltip.close();\n }\n\n return;\n }\n\n let cell = target, isItemChild;\n\n while (cell && !(cell.value instanceof Date)) {\n cell = cell.parentElement;\n isItemChild = true;\n }\n\n if (!cell) {\n return;\n }\n\n if (!JQX.Utilities.Core.isMobile) {\n that._handleCalendarCellHover(event, cell);\n }\n\n if (that.tooltip) {\n if (cell.hasAttribute('important')) {\n if (event.type === 'mouseover') {\n that.$.tooltip.open();\n that.tooltipTemplate ? that.$.tooltip.value = cell.value + '' :\n that.$.tooltip.innerHTML = that.$.tooltip.innerHTML.trim().length === 0 ? 'Important day!' : that.$.tooltip.innerHTML;\n that.$.tooltip.selector = cell;\n\n if (that.$.tooltip.selector !== cell) {\n that.$.tooltip.close();\n }\n\n return;\n }\n }\n\n if (isItemChild || that.$.tooltip.selector === cell) {\n return;\n }\n\n that.$.tooltip.close();\n }\n }", "function renderEvents(eventInputs, stick) {\n\t\tvar renderedEvents = [];\n\t\tvar renderableEvents;\n\t\tvar abstractEvent;\n\t\tvar i, j, event;\n\n\t\tfor (i = 0; i < eventInputs.length; i++) {\n\t\t\tabstractEvent = buildEventFromInput(eventInputs[i]);\n\n\t\t\tif (abstractEvent) { // not false (a valid input)\n\t\t\t\trenderableEvents = expandEvent(abstractEvent);\n\n\t\t\t\tfor (j = 0; j < renderableEvents.length; j++) {\n\t\t\t\t\tevent = renderableEvents[j];\n\n\t\t\t\t\tif (!event.source) {\n\t\t\t\t\t\tif (stick) {\n\t\t\t\t\t\t\tstickySource.events.push(event);\n\t\t\t\t\t\t\tevent.source = stickySource;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tcache.push(event);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\trenderedEvents = renderedEvents.concat(renderableEvents);\n\t\t\t}\n\t\t}\n\n\t\tif (renderedEvents.length) { // any new events rendered?\n\t\t\treportEventChange();\n\t\t}\n\n\t\treturn renderedEvents;\n\t}", "function renderEvents(eventInputs, stick) {\n\t\tvar renderedEvents = [];\n\t\tvar renderableEvents;\n\t\tvar abstractEvent;\n\t\tvar i, j, event;\n\n\t\tfor (i = 0; i < eventInputs.length; i++) {\n\t\t\tabstractEvent = buildEventFromInput(eventInputs[i]);\n\n\t\t\tif (abstractEvent) { // not false (a valid input)\n\t\t\t\trenderableEvents = expandEvent(abstractEvent);\n\n\t\t\t\tfor (j = 0; j < renderableEvents.length; j++) {\n\t\t\t\t\tevent = renderableEvents[j];\n\n\t\t\t\t\tif (!event.source) {\n\t\t\t\t\t\tif (stick) {\n\t\t\t\t\t\t\tstickySource.events.push(event);\n\t\t\t\t\t\t\tevent.source = stickySource;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tcache.push(event);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\trenderedEvents = renderedEvents.concat(renderableEvents);\n\t\t\t}\n\t\t}\n\n\t\tif (renderedEvents.length) { // any new events rendered?\n\t\t\treportEventChange();\n\t\t}\n\n\t\treturn renderedEvents;\n\t}", "function renderEvents(eventInputs, stick) {\n\t\tvar renderedEvents = [];\n\t\tvar renderableEvents;\n\t\tvar abstractEvent;\n\t\tvar i, j, event;\n\n\t\tfor (i = 0; i < eventInputs.length; i++) {\n\t\t\tabstractEvent = buildEventFromInput(eventInputs[i]);\n\n\t\t\tif (abstractEvent) { // not false (a valid input)\n\t\t\t\trenderableEvents = expandEvent(abstractEvent);\n\n\t\t\t\tfor (j = 0; j < renderableEvents.length; j++) {\n\t\t\t\t\tevent = renderableEvents[j];\n\n\t\t\t\t\tif (!event.source) {\n\t\t\t\t\t\tif (stick) {\n\t\t\t\t\t\t\tstickySource.events.push(event);\n\t\t\t\t\t\t\tevent.source = stickySource;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tcache.push(event);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\trenderedEvents = renderedEvents.concat(renderableEvents);\n\t\t\t}\n\t\t}\n\n\t\tif (renderedEvents.length) { // any new events rendered?\n\t\t\treportEventChange();\n\t\t}\n\n\t\treturn renderedEvents;\n\t}", "function RenderEvent() {}", "function generateEvents(eventList) {\n for (let i = 0; i < eventList.length; i++) {\n $('#events').append(\n \"<div class='single-box'>\" +\n\t\t\t\t\t\"<div class='image-holder'>\" +\n\t\t\t\t\t\t\"<img src='./images/eventIcons/\" + eventList[i].image + \"'/>\" +\n\t\t\t\t\t\"</div>\" +\n\t\t\t\t\t\"<div class='grid flex-stretch'>\" +\n\t\t\t\t\t\t\"<div class='text-holder grid-col-1 grid-row-1'>\" +\n\t\t\t\t\t\t\t\"<h3><a href=\" + eventList[i].link + \"target='_blank'>\"+ eventList[i].title +\"</a></h3>\" +\n\t\t\t\t\t\t\"</div>\" +\n\t\t\t\t\t\t\"<div class='text-holder date grid-col-2 grid-row-1'>\" +\n\t\t\t\t\t\t\t\"<p>\" + eventList[i].date + \"</p>\" +\n\t\t\t\t\t\t\"</div>\" +\n\t\t\t\t\t\t\"<div class='grid-col-1-to-2 grid-row-2 text-holder'>\" +\n\t\t\t\t\t\t\t\"<p class='event-text'>\" + eventList[i].description + \"</p>\" +\n\t\t\t\t\t\t\"</div>\" +\n\t\t\t\t\t\t\"<div class='btns-box flex grid-col-3 grid-row-3'>\" +\n\t\t\t\t\t\t\t\"<a href=\" + eventList[i].link + \" target='_blank'>Learn more</a>\" +\n\t\t\t\t\t\t\"</div>\" +\n\t\t\t\t\t\"</div>\" +\n\t\t\t\t\"</div>\"\n\t\t\t);\n\t\t};\n\t}", "function reportEventChange() {\n\t\t\trenderEvents();\n\t\t}", "retrieveEvents() {\n if (this.updateInProgress) {\n return;\n }\n this.updateInProgress = true;\n this.resetWidget(true);\n // Set temporary method\n let label = CalendarUtility.label(_(\"No events found...\"), this.zoom, this.textcolor);\n this.window.add(label);\n var outputReceived = false;\n try {\n // Execute the command to retrieve the calendar events.\n let reader = new SpawnReader();\n reader.spawn(\"./\", this.getCalendarCommand(), (output) => {\n if (!outputReceived) {\n this.resetWidget();\n outputReceived = true;\n }\n let eventLine = output.toString();\n try {\n this.addEvent(eventLine);\n } catch (e) {\n global.logError(e);\n let label;\n if (eventLine.includes(\"https://accounts.google.com/o/oauth2/auth\")) {\n // Not authenticated\n label = CalendarUtility.label(_(\"Please configure gcalcli to continue\"), this.zoom, this.textcolor);\n } else {\n label = CalendarUtility.label(_(\"Unable to retrieve events...\"), this.zoom, this.textcolor);\n }\n this.window.add(label);\n }\n });\n } catch (e) {\n global.logError(e);\n } finally {\n this.updateInProgress = false;\n }\n }", "function populateCalendar(calEvents) {\n\t$('#calendar').fullCalendar({\n\t\tevents: calEvents, \n\t\theight: 770,\n\t\tdefaultDate: new Date(),\n\t\ttheme: true,\n\t\theader: {\n\t\t\tleft: 'prev',\n\t\t\tcenter: 'title',\n\t\t\tright: 'month,basicWeek, next'\n\t\t},\n\t\tthemeButtonIcons: {\n\t\t\tprev: 'odu_left-chevron',\n\t\t\tnext: 'odu_right-chevron'\n\t\t},\n\t\teventRender: function (event, element) {\n\t\t\telement.attr('href', 'javascript:void(0);');\n\t\t\telement.click(function() {\n\t\t\t\tpopulateEventPopUp(event);\n\t\t\t\t$(\"#calendarPopUp\").dialog({ modal: false, width:600, height: 500});\n\t\t\t});\t\t\t\t\n\t\t}\n\t});\n}", "function reportEvents(_events) {\n\t\tevents = _events;\n\t\trerenderEvents();\n\t}", "function reportEventChange() {\n\t\trenderEvents();\n\t}", "function reportEventChange() {\n\t\trenderEvents();\n\t}", "function reportEventChange() {\n\t\trenderEvents();\n\t}", "renderEventInput() {\n eventContainer.innerHTML = \"\";\n eventContainer.innerHTML = eventHtml.makeNewEventHtml();\n }", "function onRender() {\n\t\tvar args;\n\t\tvar i;\n\t\t__debug_475( 'Received a render event. Re-emitting...' );\n\t\targs = new Array( arguments.length+1 );\n\t\targs[ 0 ] = 'render';\n\t\tfor ( i = 0; i < arguments.length; i++ ) {\n\t\t\targs[ i+1 ] = arguments[ i ];\n\t\t}\n\t\tself.emit.apply( self, args );\n\t}", "function renderUI(rows) {\n for (var i = 0; i < rows.length; i++) {\n var columnWidth = 600 / rows[i].columns.length;\n var rowDiv = \"\",\n columnDiv = \"\",\n columnGroup = \"\",\n eventItem = \"\";\n for (var j = rows[i].columns.length - 1; j >= 0; j--) {\n var columns = rows[i].columns[j].events;\n eventItem = \"\";\n for (var k = 0; k < columns.length; k++) {\n eventItem = eventItem + '<div class=\"event-item\" style=\"width:' + columnWidth + 'px;top:' + columns[k].start + 'px;\"><div style=\"background-color:' + columns[k].color + '\"></div><div>' + columns[k].label + '</div></div>';\n }\n columnGroup = columnGroup + '<div class=\"column\" style=\"width:' + columnWidth + 'px;\">' + eventItem + '</div>';\n }\n rowDiv = rowDiv + '<div class=\"row\">' + columnGroup + '</div>';\n $('#eventDisplayArea').append(rowDiv);\n }\n}", "function onRender() {\n\t\tvar args;\n\t\tvar i;\n\t\t__debug_395( 'Received a render event. Re-emitting...' );\n\t\targs = new Array( arguments.length+1 );\n\t\targs[ 0 ] = 'render';\n\t\tfor ( i = 0; i < arguments.length; i++ ) {\n\t\t\targs[ i+1 ] = arguments[ i ];\n\t\t}\n\t\tself.emit.apply( self, args );\n\t}", "addClickEvents () {\n this.clickEvents.clickId.forEach((cid, i) => {\n let id = document.getElementById(cid)\n id.run = this.clickEvents.clickRun[i]\n id.addEventListener('mousedown', (e) => {\n e.currentTarget.run()\n this.checkItemStates()\n })\n })\n }", "function onRender() {\n\t\tvar args;\n\t\tvar i;\n\t\t__debug_587( 'Received a render event. Re-emitting...' );\n\t\targs = new Array( arguments.length+1 );\n\t\targs[ 0 ] = 'render';\n\t\tfor ( i = 0; i < arguments.length; i++ ) {\n\t\t\targs[ i+1 ] = arguments[ i ];\n\t\t}\n\t\tself.emit.apply( self, args );\n\t}", "function onRender() {\n\t\tvar args;\n\t\tvar i;\n\t\t__debug_429( 'Received a render event. Re-emitting...' );\n\t\targs = new Array( arguments.length+1 );\n\t\targs[ 0 ] = 'render';\n\t\tfor ( i = 0; i < arguments.length; i++ ) {\n\t\t\targs[ i+1 ] = arguments[ i ];\n\t\t}\n\t\tself.emit.apply( self, args );\n\t}", "function onRender() {\n\t\tvar args;\n\t\tvar i;\n\t\t__debug_520( 'Received a render event. Re-emitting...' );\n\t\targs = new Array( arguments.length+1 );\n\t\targs[ 0 ] = 'render';\n\t\tfor ( i = 0; i < arguments.length; i++ ) {\n\t\t\targs[ i+1 ] = arguments[ i ];\n\t\t}\n\t\tself.emit.apply( self, args );\n\t}", "function onRender() {\n\t\tvar args;\n\t\tvar i;\n\t\t__debug_488( 'Received a render event. Re-emitting...' );\n\t\targs = new Array( arguments.length+1 );\n\t\targs[ 0 ] = 'render';\n\t\tfor ( i = 0; i < arguments.length; i++ ) {\n\t\t\targs[ i+1 ] = arguments[ i ];\n\t\t}\n\t\tself.emit.apply( self, args );\n\t}", "getEventsToRender(resource, events) {\n return events;\n }", "function onRender() {\n\t\tvar args;\n\t\tvar i;\n\t\t__debug_452( 'Received a render event. Re-emitting...' );\n\t\targs = new Array( arguments.length+1 );\n\t\targs[ 0 ] = 'render';\n\t\tfor ( i = 0; i < arguments.length; i++ ) {\n\t\t\targs[ i+1 ] = arguments[ i ];\n\t\t}\n\t\tself.emit.apply( self, args );\n\t}", "function onRender() {\n\t\tvar args;\n\t\tvar i;\n\t\t__debug_457( 'Received a render event. Re-emitting...' );\n\t\targs = new Array( arguments.length+1 );\n\t\targs[ 0 ] = 'render';\n\t\tfor ( i = 0; i < arguments.length; i++ ) {\n\t\t\targs[ i+1 ] = arguments[ i ];\n\t\t}\n\t\tself.emit.apply( self, args );\n\t}", "function onRender() {\n\t\tvar args;\n\t\tvar i;\n\t\t__debug_330( 'Received a render event. Re-emitting...' );\n\t\targs = new Array( arguments.length+1 );\n\t\targs[ 0 ] = 'render';\n\t\tfor ( i = 0; i < arguments.length; i++ ) {\n\t\t\targs[ i+1 ] = arguments[ i ];\n\t\t}\n\t\tself.emit.apply( self, args );\n\t}", "getEventsToRender(resource, events) {\n return events;\n }", "function onRender() {\n\t\tvar args;\n\t\tvar i;\n\t\t__debug_577( 'Received a render event. Re-emitting...' );\n\t\targs = new Array( arguments.length+1 );\n\t\targs[ 0 ] = 'render';\n\t\tfor ( i = 0; i < arguments.length; i++ ) {\n\t\t\targs[ i+1 ] = arguments[ i ];\n\t\t}\n\t\tself.emit.apply( self, args );\n\t}", "function onRender() {\n\t\tvar args;\n\t\tvar i;\n\t\t__debug_412( 'Received a render event. Re-emitting...' );\n\t\targs = new Array( arguments.length+1 );\n\t\targs[ 0 ] = 'render';\n\t\tfor ( i = 0; i < arguments.length; i++ ) {\n\t\t\targs[ i+1 ] = arguments[ i ];\n\t\t}\n\t\tself.emit.apply( self, args );\n\t}", "function refetchEvents() { // can be called as an API method\n\t\tclearEvents();\n\t\tfetchAndRenderEvents();\n\t}", "function refetchEvents() { // can be called as an API method\n\t\tclearEvents();\n\t\tfetchAndRenderEvents();\n\t}", "function refetchEvents() { // can be called as an API method\n\t\tclearEvents();\n\t\tfetchAndRenderEvents();\n\t}", "function refetchEvents() { // can be called as an API method\n\t\tclearEvents();\n\t\tfetchAndRenderEvents();\n\t}", "function refetchEvents() { // can be called as an API method\n\t\tclearEvents();\n\t\tfetchAndRenderEvents();\n\t}", "function onRender() {\n\t\tvar args;\n\t\tvar i;\n\t\t__debug_332( 'Received a render event. Re-emitting...' );\n\t\targs = new Array( arguments.length+1 );\n\t\targs[ 0 ] = 'render';\n\t\tfor ( i = 0; i < arguments.length; i++ ) {\n\t\t\targs[ i+1 ] = arguments[ i ];\n\t\t}\n\t\tself.emit.apply( self, args );\n\t}", "getEventsToRender(resource, events) {\n return events;\n }", "function go(events, removeFunc, checkFunc, doneFunc) {\r\n\t\tvar called = false;\r\n\t\toptions.events = events;\r\n\t\toptions.eventAfterAllRender = function() {\r\n\t\t\tif (!called) { // don't execute on subsequent removeEvents/next/prev\r\n\t\t\t\tcalled = true;\r\n\r\n\t\t\t\tcheckAllEvents(); // make sure all events initially rendered correctly\r\n\t\t\t\tremoveFunc(); // remove the events\r\n\t\t\t\tcheckFunc(); // check correctness\r\n\r\n\t\t\t\t// move the calendar back out of view, then back in\r\n\t\t\t\t$('#cal').fullCalendar('next');\r\n\t\t\t\t$('#cal').fullCalendar('prev');\r\n\r\n\t\t\t\t// array event sources should maintain the same state\r\n\t\t\t\t// whereas \"dynamic\" event sources should refetch and reset the state\r\n\t\t\t\tif ($.isArray(events)) {\r\n\t\t\t\t\tcheckFunc(); // for issue 2187\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\tcheckAllEvents();\r\n\t\t\t\t}\r\n\r\n\t\t\t\tdoneFunc();\r\n\t\t\t}\r\n\t\t};\r\n\t\t$('#cal').fullCalendar(options);\r\n\t}", "function initExternalEvents(calElement){\n // Panel with the external events list\n var externalEvents = $('.external-events');\n\n // init the external events in the panel\n new ExternalEvent(externalEvents.children('div'));\n\n // External event color is danger-red by default\n var currColor = '#f6504d';\n // Color selector button\n var eventAddBtn = $('.external-event-add-btn');\n // New external event name input\n var eventNameInput = $('.external-event-name');\n // Color switchers\n var eventColorSelector = $('.external-event-color-selector .circle');\n\n // Trash events Droparea \n $('.external-events-trash').droppable({\n accept: '.fc-event',\n activeClass: 'active',\n hoverClass: 'hovered',\n tolerance: 'touch',\n drop: function(event, ui) {\n \n // You can use this function to send an ajax request\n // to remove the event from the repository\n \n if(draggingEvent) {\n var eid = draggingEvent.id || draggingEvent._id;\n // Remove the event\n calElement.fullCalendar('removeEvents', eid);\n // Remove the dom element\n ui.draggable.remove();\n // clear\n draggingEvent = null;\n }\n }\n });\n\n eventColorSelector.click(function(e) {\n e.preventDefault();\n var $this = $(this);\n\n // Save color\n currColor = $this.css('background-color');\n // De-select all and select the current one\n eventColorSelector.removeClass('selected');\n $this.addClass('selected');\n });\n\n eventAddBtn.click(function(e) {\n e.preventDefault();\n \n // Get event name from input\n var val = eventNameInput.val();\n // Dont allow empty values\n if ($.trim(val) === '') return;\n \n // Create new event element\n var newEvent = $('<div/>').css({\n 'background-color': currColor,\n 'border-color': currColor,\n 'color': '#fff'\n })\n .html(val);\n\n // Prepends to the external events list\n externalEvents.prepend(newEvent);\n // Initialize the new event element\n new ExternalEvent(newEvent);\n // Clear input\n eventNameInput.val('');\n });\n }", "function renderNewEventsView(newArray) {\n let programDiv = document.getElementById(\"programme\");\n programDiv.innerHTML = \"\";\n if (newArray.length === 0) {\n let errorDiv = document.createElement(\"div\");\n errorDiv.classList.add(\"error\");\n errorDiv.innerHTML = \"Oops! Nothing to show\";\n programDiv.appendChild(errorDiv);\n }\n\n newArray.forEach(event => {\n\n let sectionElement = document.createElement(\"section\");\n sectionElement.classList.add(\"event-entry\");\n sectionElement.setAttribute(\"id\", \"event-\" + event.id);\n let leftColumn = document.createElement(\"div\");\n leftColumn.classList.add(\"left-column\");\n let rightColumn = document.createElement(\"div\");\n rightColumn.classList.add(\"right-column\");\n sectionElement.appendChild(leftColumn);\n sectionElement.appendChild(rightColumn);\n programDiv.appendChild(sectionElement);\n\n //start of left column\n let aElement = document.createElement(\"a\");\n aElement.setAttribute(\"href\", event.link);\n aElement.setAttribute(\"alt\", \"read more about \" + event.title.rendered);\n\n if (event.featured_media != 0) {\n let imgElement = document.createElement(\"img\");\n imgElement.classList.add(\n \"attachment-medium\",\n \"size-medium\",\n \"wp-post-image\"\n );\n if (event._embedded == undefined || event._embedded[\"wp:featuredmedia\"] == undefined){\n imgElement.setAttribute(\n \"src\", \" \");\n }\n else if (event._embedded[\"wp:featuredmedia\"][0].media_details.sizes.medium != undefined) {\n imgElement.setAttribute(\n \"src\",\n event._embedded[\"wp:featuredmedia\"][0].media_details.sizes.medium.source_url\n );\n } else {\n imgElement.setAttribute(\n \"src\",\n event._embedded[\"wp:featuredmedia\"][0].source_url\n );\n }\n aElement.appendChild(imgElement);\n leftColumn.appendChild(aElement);\n }\n\n let links = document.createElement(\"div\"),\n linksArray = [];\n links.classList.add(\"links\");\n\n //website\n if (event.extra_meta._event_cpt_organizer_website) {\n linksArray['website'] = event.extra_meta._event_cpt_organizer_website;\n }\n //facebook\n if (event.extra_meta._event_cpt_organizer_facebook) {\n linksArray['facebook'] = event.extra_meta._event_cpt_organizer_facebook;\n }\n //twitter\n if (event.extra_meta._event_cpt_organizer_twitter) {\n linksArray['twitter'] = event.extra_meta._event_cpt_organizer_twitter;\n }\n //instagram\n if (event.extra_meta._event_cpt_organizer_instagram) {\n linksArray['instagram'] = event.extra_meta._event_cpt_organizer_instagram;\n }\n\n Object.keys(linksArray).forEach(linkTitle => {\n //console.log(linkTitle+' with url: '+linksArray[linkTitle]);\n let aEl = document.createElement(\"a\"),\n spanEl = document.createElement(\"span\"),\n imgEl = document.createElement(\"img\");\n\n aEl.setAttribute(\n \"href\",\n linksArray[linkTitle]\n );\n aEl.setAttribute(\"target\", \"_blank\");\n aEl.setAttribute(\"rel\", \"noopener\");\n\n spanEl.classList.add(\"screen-reader-text\");\n spanEl.innerHTML = linkTitle;\n\n aEl.appendChild(spanEl);\n //New SVG icon format <img src=\"your.svg\" onerror=\"this.src='your.png'\">\n imgEl.setAttribute('width', 22);\n imgEl.setAttribute('height', 22);\n imgEl.setAttribute('style', 'max-height:22px; margin-top:6px;');\n imgEl.classList.add('icon');\n imgEl.setAttribute('src', currentHost + '/wp-content/plugins/events_plugin/src/assets/img/' + linkTitle + '-icon.svg');\n imgEl.setAttribute('onerror', 'this.src='+ currentHost + '/wp-content/plugins/events_plugin/src/assets/img/' + linkTitle + '-icon.png');\n aEl.appendChild(imgEl);\n\n links.appendChild(aEl);\n\n });\n\n leftColumn.appendChild(links);\n\n //start of right column\n //header\n let headerEl = document.createElement('header'),\n headerTwo = document.createElement(\"h2\"),\n divEl = document.createElement('div');\n\n headerEl.classList.add('event-header');\n headerTwo.classList.add(\"event-title\");\n\n let aRightElement = document.createElement(\"a\");\n aRightElement.setAttribute(\"href\", event.link);\n aRightElement.setAttribute(\n \"alt\",\n \"read more about \" + event.title.rendered\n );\n aRightElement.innerHTML = event.title.rendered;\n\n headerTwo.appendChild(aRightElement);\n headerEl.appendChild(headerTwo);\n\n if (event.extra_meta._event_cpt_main_organizer) {\n let mainOrganiser = event.extra_meta._event_cpt_main_organizer[0];\n divEl.classList.add('event-by');\n divEl.innerHTML = 'by ' + mainOrganiser;\n headerEl.appendChild(divEl);\n }\n\n rightColumn.appendChild(headerEl);\n\n //event_types\n let typeDivElement = document.createElement(\"div\");\n typeDivElement.classList.add(\"entry-meta\");\n if (\n event._embedded != undefined &&\n event._embedded[\"wp:term\"] != undefined\n ) {\n let typesArray = event._embedded[\"wp:term\"][0],\n typesList = '';\n typesArray.forEach(function(t){\n typesList += t.name + ' | ';\n })\n typesList = typesList.substring(0, typesList.length - 3);\n typeDivElement.innerHTML = typesList;\n } else {\n typeDivElement.innerHTML = \"\";\n }\n\n // headerTwo.appendChild(titleDivElement);\n rightColumn.appendChild(typeDivElement);\n\n let eventDate = document.createElement(\"p\");\n eventDate.classList.add(\"date\");\n // eventDate.innerHTML = date;\n if (\n event.extra_meta._event_cpt_date_event === undefined ||\n event.extra_meta._event_cpt_startTime_event === undefined ||\n event.extra_meta._event_cpt_endTime_event === undefined\n ) {\n var span = document.createElement(\"span\");\n span.setAttribute(\"style\", \"color: #f00\");\n span.innerHTML = \"Date and/or time not set yet\";\n eventDate.appendChild(span);\n } else {\n eventDate.innerHTML =\n getLongDate(event.extra_meta._event_cpt_date_event) +\n \" \" +\n event.extra_meta._event_cpt_startTime_event +\n \" - \" +\n event.extra_meta._event_cpt_endTime_event;\n }\n rightColumn.appendChild(eventDate);\n\n let eventLocation = document.createElement(\"p\"),\n locationTxt = '';\n\n eventLocation.classList.add(\"location\");\n\n if (event.extra_meta._event_cpt_venue) {\n locationTxt += event.extra_meta._event_cpt_venue;\n }\n\n if (event.extra_meta._event_cpt_area) {\n locationTxt += \", \" + event.extra_meta._event_cpt_area;\n }\n\n eventLocation.innerHTML = locationTxt;\n\n rightColumn.appendChild(eventLocation);\n\n let eventPrice = document.createElement(\"p\");\n eventPrice.classList.add(\"Price\");\n if ((event.extra_meta._event_cpt_price_event == undefined) || event.extra_meta._event_cpt_price_event == '0.00') {\n eventPrice.innerHTML = \"Free \";\n } else if (event.extra_meta._event_cpt_price_event == '-1') {\n eventPrice.innerHTML = \"Entry by donation\";\n } else {\n eventPrice.innerHTML = \"£\" + parseFloat(event.extra_meta._event_cpt_price_event).toFixed(2);\n }\n rightColumn.appendChild(eventPrice);\n });\n}", "onEventDataGenerated(renderData) {\n const me = this,\n {\n eventRecord\n } = renderData;\n\n if (me.shouldInclude(eventRecord)) {\n if (me.scheduler.isVertical) {\n renderData.width = me.scheduler.resourceColumnWidth;\n } else {\n renderData.top = 0;\n } // Flag that we should fill entire row/col\n\n renderData.fillSize = true; // Add our own cls\n\n renderData.wrapperCls[me.rangeCls] = 1;\n renderData.wrapperCls[`b-sch-color-${eventRecord.timeRangeColor}`] = eventRecord.timeRangeColor; // Add label\n\n renderData.children.push(eventRecord.name); // Event data for DOMSync comparison\n\n renderData.eventId = `${me.idPrefix}-${eventRecord.id}`;\n }\n }", "render() {\n const { classes } = this.props;\n const children = [];\n\n // Build all of the events\n for (var i = 0; i < this.state.events.length; i += 1) {\n let event = this.state.events[i];\n let index = i;\n let date = this.getFormattedDate(event);\n var month = (1 + date.getMonth());\n month = month.length > 1 ? month : '0' + month;\n var day = date.getDate().toString();\n day = day.length > 1 ? day : '0' + day;\n var hours = date.getHours();\n var minutes = date.getMinutes().toString();\n minutes = minutes.length > 1 ? minutes : '0' + minutes;\n let startDate = date.getFullYear() + '-' + month + '-' + day + \" \" + this.timeString(hours, minutes);\n date.setMilliseconds(date.getMilliseconds() + (event[\"duration\"] * 60000));\n hours = date.getHours();\n minutes = date.getMinutes().toString();\n minutes = minutes.length > 1 ? minutes : '0' + minutes;\n let fullDate = startDate + \"-\" + this.timeString(hours, minutes);\n if (this.props.eventType === '/current-events') {\n if (this.state.adminSignedIn) {\n children.push(<CurrentChildComponent key={i} name={event[\"name\"]} date={fullDate} location={'Location: ' + event[\"location\"]} \n organization={'Group: ' + event[\"organization\"]} description={'Description: ' + event[\"description\"]} tags={'Tags: ' + event[\"tags\"]} image={this.state.urls[index]}\n webLink={'Web Link: ' + event[\"webLink\"]}\n editAction={() => this.editAction(event, index)} \n raffleOnclick={() => this.raffleOnclick(event,index)}\n downloadQR={() => this.downloadQR(event)}\n viewAttendees={() => this.viewAttendees(event)}\n />);\n } else {\n children.push(<CurrentChildComponent key={i} name={event[\"name\"]} date={fullDate} location={'Location: ' + event[\"location\"]} \n organization={'Group: ' + event[\"organization\"]} description={'Description: ' + event[\"description\"]} tags={'Tags: ' + event[\"tags\"]} image={this.state.urls[index]}\n webLink={'Web Link: ' + event[\"webLink\"]}\n editAction={() => this.handleBeginRequest()} \n raffleOnclick={() => this.raffleOnclick(event,index)}\n downloadQR={() => this.downloadQR(event)}\n viewAttendees={() => this.viewAttendees(event)}\n />); \n }\n \n } else {\n children.push(<PendingChildComponent key={i} name={event[\"name\"]} date={fullDate} location={'Location: ' + event[\"location\"]} \n organization={'Group: ' + event[\"organization\"]} description={'Description: ' + event[\"description\"]} tags={'Tags: ' + event[\"tags\"]} image={this.state.urls[index]}\n editAction={() => this.editAction(event, index)} email={event[\"status\"]} webLink={'Web Link: ' + event[\"webLink\"]}\n />);\n }\n \n };\n\n return (\n <div>\n <div style={{position: \"fixed\", top: \"50%\", left: \"50%\", margintop: \"-50px\", marginleft: \"-50px\", width: \"100px\", height: \"100px\"}}>\n <CircularProgress disableShrink style={{visibility: this.state.hidden}}></CircularProgress>\n </div>\n <div style={{textAlign: \"center\", marginBottom: 20}}>\n <div style={{position: 'relative', display: \"inline-block\"}}>\n <Paper style={{padding: '2px 4px', display: \"flex\", alignItems: \"center\", width: 400}} elevation={1}>\n <SearchIcon style={{padding: 10}}/>\n <InputBase\n style={{width: 300}}\n placeholder=\"Search Events\" \n value={this.state.searchText}\n onChange={this.handleSearchChange} />\n <IconButton onClick={this.handleClear}><CloseIcon/></IconButton>\n <Divider style={{width: 1, height: 28, margin: 4}} />\n <IconButton onClick={this.handleSortOpenClose}><SortIcon/></IconButton>\n </Paper>\n </div>\n </div>\n <div style={{textAlign: \"center\", marginBottom: 20, display: this.state.sortMenu}}>\n <div style={{position: 'relative', display: \"inline-block\"}}>\n <Paper style={{padding: '2px 4px', display: \"flex\", alignItems: \"center\", width: 400}} elevation={1}>\n <FormControl component=\"fieldset\" style={{paddingLeft: 10}}>\n <FormLabel component=\"legend\" style={{paddingTop: 10}}>Sort By:</FormLabel>\n <FormControlLabel\n control={\n <Switch\n checked={this.state.isAscending}\n onChange={this.handleToggle('isAscending')}\n value=\"isAscending\"\n color=\"primary\"\n />\n }\n label=\"Ascending\"\n />\n <RadioGroup\n aria-label=\"gender\"\n name=\"gender2\"\n value={this.state.sortBy}\n onChange={this.handleSort}\n >\n <FormControlLabel\n value=\"date\"\n control={<Radio color=\"primary\" />}\n label=\"Date\"\n labelPlacement=\"end\"\n />\n <FormControlLabel\n value=\"title\"\n control={<Radio color=\"primary\" />}\n label=\"Title\"\n labelPlacement=\"end\"\n />\n <FormControlLabel\n value=\"organization\"\n control={<Radio color=\"primary\" />}\n label=\"Group\"\n labelPlacement=\"end\"\n />\n </RadioGroup>\n </FormControl>\n </Paper>\n </div>\n </div>\n {this.addRafflePopUp()}\n \n <Dialog\n onClose={this.attendeesClose}\n open={this.state.attendeesOpen}>\n <DialogTitle onClose={this.attendeesClose}>Attendees</DialogTitle>\n <DialogContent>\n {this.state.attendeesList}\n </DialogContent>\n </Dialog>\n \n\n <ParentComponent>\n {children}\n </ParentComponent>\n <Dialog\n onClose={this.handleCloseEdit}\n aria-labelledby=\"customized-dialog-title\"\n open={this.state.editing}\n >\n <DialogTitle id=\"customized-dialog-title\" onClose={this.handleCloseEdit}>\n Edit Event\n </DialogTitle>\n <DialogContent>\n <MuiPickersUtilsProvider utils={MomentUtils}>\n <Grid container>\n <Grid item container direction=\"column\" spacing={0}>\n <Grid item>\n <TextField\n label=\"Event Title\"\n id=\"event-name\"\n margin=\"normal\"\n value={this.state.popUpEvent[\"name\"]}\n onChange={this.handleNameChange} /> \n </Grid>\n <Grid item>\n <DatePicker\n margin=\"normal\"\n label=\"Start Date\"\n value={this.state.date}\n onChange={this.handleDateChange} />\n </Grid>\n <Grid item>\n <TimePicker\n margin=\"normal\"\n label=\"Start Time\"\n value={this.state.date}\n onChange={this.handleDateChange} />\n </Grid>\n <Grid item>\n <TextField\n id=\"event-dur\"\n label=\"Duration (minutes)\"\n margin=\"normal\"\n value={this.state.popUpEvent[\"duration\"]}\n type=\"number\"\n onChange={this.handleDurationChange} />\n </Grid>\n <Grid item>\n <TextField\n id=\"event-org\"\n label=\"Location\"\n margin=\"normal\"\n value={this.state.popUpEvent[\"location\"]}\n onChange={this.handleLocationChange} />\n </Grid>\n <Grid item>\n <FormControl margin=\"normal\">\n <InputLabel>Group</InputLabel>\n <Select\n displayEmpty\n value={this.state.popUpEvent[\"organization\"]}\n style={{minWidth: 200, maxWidth: 200}}\n onChange={this.handleOrganizationChange}\n variant='outlined'\n >\n {this.state.groups.map(group => (\n <MenuItem key={group} value={group}>\n {group}\n </MenuItem>\n ))} \n </Select>\n </FormControl>\n </Grid>\n <Grid item> \n <FormControl margin=\"normal\">\n <InputLabel htmlFor=\"select-multiple\">Tags</InputLabel>\n <Select\n multiple\n displayEmpty\n input={<Input id=\"select-multiple\"/>}\n value={this.state.tags}\n style={{minWidth: 200, maxWidth: 200}}\n onChange={e => this.setState({ tags: e.target.value })}\n variant='outlined'\n >\n <MenuItem disabled value=\"\">\n <em>Select Tags</em>\n </MenuItem>\n {this.state.databaseTags.map(tag => (\n <MenuItem key={tag} value={tag}>\n {tag}\n </MenuItem>\n ))} \n </Select>\n </FormControl>\n </Grid>\n <Grid item>\n <TextField\n id=\"event-link\"\n label=\"Web Link (Optional)\"\n margin=\"normal\"\n value={this.state.popUpEvent[\"webLink\"]}\n onChange={this.handleWebLinkChange} />\n </Grid>\n <Grid item>\n <TextField\n id=\"event-desc\"\n label=\"Description\"\n multiline\n rows=\"5\"\n margin=\"normal\"\n variant=\"outlined\"\n value={this.state.popUpEvent[\"description\"]}\n onChange={this.handleDescriptionChange} />\n </Grid>\n <Grid item>\n <FilePicker\n extensions={['jpg', 'jpeg', 'png']}\n onChange={this.handleImageFileChanged}\n onError={errMsg => this.displayMessage(this, errMsg)} >\n <Button variant=\"contained\"\n disabled={this.state.uploading}>\n Select Image \n </Button>\n </FilePicker>\n </Grid>\n <Grid item>\n <Image\n style={{width: 192, height: 108}}\n source={{uri: this.state.image64}}\n />\n </Grid>\n </Grid>\n </Grid>\n </MuiPickersUtilsProvider>\n </DialogContent>\n <DialogActions style={{justifyContent: 'center'}}>\n <MuiThemeProvider theme={redTheme}>\n <Button variant=\"contained\" onClick={this.handleDeleteOpen} color=\"primary\">\n {this.state.cancelButton}\n <DeleteIcon/>\n </Button>\n </MuiThemeProvider>\n <Button variant=\"contained\" onClick={this.handleSaveEdit} color=\"primary\">\n {this.state.confirmButton}\n <SaveIcon/>\n </Button>\n </DialogActions>\n </Dialog>\n <Dialog onClose={this.handleCloseRequest}\n aria-labelledby=\"Request\"\n open={this.state.requesting}>\n <Card style={{minWidth: 150, minHeight: 125}}>\n <div style={{fontSize: 25, justifyContent: 'center', padding: 20}}>\n If you would like to make a change to your event, please email osleventsapp@augustana.edu with the change you would like for approval.\n </div>\n </Card>\n </Dialog>\n <Dialog\n open={this.state.openDelete}\n onClose={this.handleDeleteClose}\n aria-labelledby=\"alert-dialog-title\"\n aria-describedby=\"alert-dialog-description\"\n >\n <DialogTitle id=\"alert-dialog-title\">{\"Are you sure you want to \" + this.state.popUpText + \" the event?\"}</DialogTitle>\n <DialogActions>\n <Button onClick={this.handleDeleteClose} color=\"primary\">\n Cancel\n </Button>\n <MuiThemeProvider theme={redTheme}>\n <Button onClick={this.handleDelete} color=\"primary\" autoFocus>\n Confirm\n </Button>\n </MuiThemeProvider>\n </DialogActions>\n </Dialog>\n <Snackbar\n anchorOrigin={{\n vertical: 'bottom',\n horizontal: 'left',\n }}\n open={this.state.open}\n autoHideDuration={6000}\n onClose={this.handleClose}\n ContentProps={{\n 'aria-describedby': 'message-id',\n }}\n message={this.state.message}\n action={[\n <Button\n key=\"close\"\n aria-label=\"Close\"\n color=\"inherit\"\n onClick={this.handleClose}\n > X\n </Button>,\n ]}\n />\n </div>\n );\n }", "renderer() {\n const me = this,\n { scheduler } = me,\n { resourceStore } = scheduler,\n // Determine resource range to draw events for\n { firstResource, lastResource } = me.resourceRange,\n // Date at top and bottom for determining which events to include\n { topDate, bottomDate } = me.dateRange,\n syncConfigs = [];\n\n if (!me.initialized) {\n return;\n }\n\n // Update current time range, reflecting the change on the vertical time axis header\n if (!DateHelper.isEqual(topDate, me.topDate) || !DateHelper.isEqual(bottomDate, me.bottomDate)) {\n // Calculated values used by `renderResource()`\n me.topDate = topDate;\n me.bottomDate = bottomDate;\n me.topDateMS = topDate.getTime();\n me.bottomDateMS = bottomDate.getTime();\n\n me.timeView.range = { topDate, bottomDate };\n }\n\n if (firstResource !== -1 && lastResource !== -1) {\n // Collect all events for resources in view\n for (let i = firstResource; i <= lastResource; i++) {\n syncConfigs.push.apply(syncConfigs, me.renderResource(resourceStore.getAt(i)));\n }\n }\n\n DomHelper.sync({\n elementConfig: {\n onlyChildren: true,\n children: syncConfigs\n },\n targetElement: scheduler.foregroundCanvas,\n useSyncId: true,\n\n // Called by DomHelper when it creates, releases or reuses elements\n callback({ action, config, oldConfig, element }) {\n // If element is an event wrap, trigger appropriate events\n if (config && config.className && config.className[scheduler.eventCls + '-wrap']) {\n const // Some actions are considered first a release and then a render (reusing another element).\n // This gives clients code a chance to clean up before reusing an element\n isRelease = releaseEventActions[action],\n isRender = renderEventActions[action];\n\n // If we are reusing an element that was previously released we should not trigger again\n if (isRelease && oldConfig) {\n const data = oldConfig.elementData.tplData,\n event = {\n tplData: data,\n assignmentRecord: data.assignment,\n eventRecord: data.eventRecord,\n resourceRecord: data.resourceRecord,\n element\n };\n // This event is documented on Scheduler\n scheduler.trigger('releaseEvent', event);\n }\n\n if (isRender) {\n const data = config.elementData.tplData,\n event = {\n tplData: data,\n assignmentRecord: data.assignment,\n eventRecord: data.eventRecord,\n resourceRecord: data.resourceRecord,\n element\n };\n\n // Store element to allow easy mapping from record\n element.elementData.element = element;\n\n event.reusingElement = action === 'reuseElement';\n // This event is documented on Scheduler\n scheduler.trigger('renderEvent', event);\n }\n\n // No changes during sync, but might need to hook up element again in case cache was cleared\n if (action === 'none') {\n config.elementData.element = element;\n }\n }\n }\n });\n\n // Change in displayed resources?\n if (me.firstResource !== firstResource || me.lastResource !== lastResource) {\n // Update header to match\n me.resourceColumns.range = { firstResource, lastResource };\n\n // Store which resources are currently in view\n me.firstResource = firstResource;\n me.lastResource = lastResource;\n }\n }", "renderEvent(eventData) {\n // No point in rendering event that already has an element\n const data = eventData.tplData,\n { resourceRecord, eventRecord } = data,\n // Event element config, applied to existing element or used to create a new one below\n elementConfig = {\n className: data.wrapperCls,\n tabIndex: '0',\n children: [\n {\n className: data.cls,\n style: (data.internalStyle || '') + (data.style || ''),\n // Clone to be repeatable\n html: data.body.cloneNode(true),\n // Used for comparison, cheaper than comparing fragment from above\n compareHtml: data.eventContent\n }\n ],\n style: {\n transform: `translate(${data.left}px, ${data.top}px)`,\n // DomHelper appends px to dimensions when using numbers\n height: data.height,\n width: data.width,\n zIndex: data.zIndex\n },\n dataset: {\n resourceId: resourceRecord.id,\n eventId: data.eventId, // Not using eventRecord.id to distinguish between Event and ResourceTimeRange\n // Sync using assignment id in multi assignment mode or event id in single assignment mode\n syncId: data.assignment ? data.assignment.id : data.eventId\n },\n // Will not be part of DOM, but attached to the element\n elementData: eventData,\n // Dragging etc. flags element as retained, to not reuse/release it during that operation\n retainElement: eventRecord.instanceMeta(this.scheduler).retainElement\n };\n\n // Do not want to spam dataset with empty prop when not using assignments\n if (data.assignment) {\n elementConfig.dataset.assignmentId = data.assignment.id;\n }\n\n return elementConfig;\n }", "function refetchEvents() { // can be called as an API method\n destroyEvents(); // so that events are cleared before user starts waiting for AJAX\n fetchAndRenderEvents();\n }", "function showEventsInDOM(data){\n var allEvents = data.events;\n console.log(allEvents);\n var eventListing = [];\n const monthNames = [\"January\", \"February\", \"March\", \"April\", \"May\", \"June\",\"July\", \"August\", \"September\", \"October\", \"November\", \"December\"];\n for(let i=0; i < allEvents.length; i++)\n {\n var eventName=allEvents[i].name;\n var dateObject = new Date(allEvents[i].start_time);\n var eventMonth = monthNames[dateObject.getUTCMonth()];\n var eventLocation = allEvents[i].location;\n var eventDate = eventMonth + \" \" + dateObject.getUTCDay() + \", \" + dateObject.getUTCFullYear();\n //The first event listing will always have a special CSS class to is to account for the search bar\n if (i==0)\n {\n var HTMLWrite = '<div class=\"columns listingadjust\">\\\n <div class=\"column is-1\"></div>\\\n <div class=\"column is-2\">\\\n <h1 class=\"title is-6 has-text-centered\">'+eventMonth+'</h1>\\\n <h2 class=\"subtitle has-text-centered\"><b class=\"date\">'+eventDate+'</b></h2>\\\n </div>\\\n <div class=\"vertical\"></div>\\\n <div class=\"column is-6\">\\\n <h1 class=\"title is-6\">'+eventName+'</h1>\\\n <h2 class=\"subtitle is-7\">'+eventLocation+'</h2>\\\n <div class=\"tags\">\\\n <span class=\"tag is-link is-light\"><span class=\"icon\"><i class=\"fas fa-car\"></i></span>Drivers required</span>\\\n <span class=\"tag is-link is-light\"><span class=\"icon\"><i class=\"fas fa-sign-language\"></i></span>ASL</span>\\\n </div>\\\n <p class=\"learnmore\"><a>+ Learn More</a></p>\\\n </div>\\\n <div class=\"column is-2 \">\\\n <button class=\"button btncolor hidebtns\"><span class=\"icon\"><i class=\"fas fa-clipboard\"></i></span><b>RSVP</b></button>\\\n </div>\\\n <div class=\"column is-1\"></div>\\\n </div>'\n }\n //The subsequent classes won't require that special class and have their own styling\n else{\n var HTMLWrite = '<div class=\"columns afterlistings\">\\\n <div class=\"column is-1\"></div>\\\n <div class=\"column is-2\">\\\n <h1 class=\"title is-6 has-text-centered\">'+eventMonth+'</h1>\\\n <h2 class=\"subtitle has-text-centered\"><b class=\"date\">'+eventDate+'</b></h2>\\\n </div>\\\n <div class=\"vertical\"></div>\\\n <div class=\"column is-6\">\\\n <h1 class=\"title is-6\">'+eventName+'</h1>\\\n <h2 class=\"subtitle is-7\">'+eventLocation+'</h2>\\\n <div class=\"tags\">\\\n <span class=\"tag is-link is-light\"><span class=\"icon\"><i class=\"fas fa-car\"></i></span>Drivers required</span>\\\n <span class=\"tag is-link is-light\"><span class=\"icon\"><i class=\"fas fa-sign-language\"></i></span>ASL</span>\\\n </div>\\\n <p class=\"learnmore\"><a>+ Learn More</a></p>\\\n </div>\\\n <div class=\"column is-2 \">\\\n <button class=\"button btncolor hidebtns\"><span class=\"icon\"><i class=\"fas fa-clipboard\"></i></span><b>RSVP</b></button>\\\n </div>\\\n <div class=\"column is-1 \"></div>\\\n </div>'\n }\n eventListing.push(HTMLWrite);\n }\n document.getElementById(\"eventlisting\").innerHTML = eventListing.join(' ');\n}", "function renderEvents(appointments) {\n console.log('---', appointments);\n for (var i = 0; i < appointments.length; i++) {\n appointments[i].start = new Date(appointments[i].startDate);\n appointments[i].end = new Date(appointments[i].endDate);\n }\n setEventState(appointments)\n }", "function addMouseHandlers() {\n container.addEventListener('mousedown', function(evt) {\n // console.log('mousedown', evt);\n lastX = evt.screenX;\n container.addEventListener('mousemove', mousemove);\n container.addEventListener('mouseup', function(e) {\n container.removeEventListener('mousemove', mousemove);\n });\n container.addEventListener('mouseout', function(e) {\n container.removeEventListener('mousemove', mousemove);\n });\n });\n}", "function attachDrawHandlers() {\r\n if (current_overlay_canvas) {\r\n $(`#${current_overlay_canvas.id}`).off();\r\n }\r\n addOverlay(base_canvas, \"draw\");\r\n $(`#${current_overlay_canvas.id}`).on(\"mouseleave\", function (e) {\r\n var canvases = [...document.querySelectorAll(\".overlay-container\")]\r\n var lastCanvas = canvases.pop();\r\n $(`#${lastCanvas.id}`).remove();\r\n foo = true;\r\n if (canvases.length > 0) {\r\n $(`#${canvases[canvases.length-1].id}`).on(\"mouseenter\", function (e) {\r\n if (foo) {\r\n attachDrawHandlers();\r\n foo = false;\r\n }\r\n });\r\n } else {\r\n $(`#${base_canvas.id}`).on(\"mouseenter\", function (e) {\r\n if (foo) {\r\n attachDrawHandlers();\r\n foo = false;\r\n }\r\n });\r\n }\r\n });\r\n $(`#${current_overlay_canvas.id}`).on(\"mousedown\", drawHandler);\r\n $(`#${current_overlay_canvas.id}`).on(\"mousemove\", function (e) {\r\n redraw(current_overlay_context);\r\n drawCursor(\r\n base_canvas,\r\n current_overlay_canvas,\r\n current_overlay_context,\r\n e,\r\n currentClickSize\r\n );\r\n });\r\n }", "function loadEvents() {\n $.getJSON('/get_group_with_events', (res) => {\n var group = res.group;\n \n if (group) {\n var currentEvents = sortEvents(group.currentEvents);\n currentEvents.forEach(event => { \n $(\"#currentEvents\").append(displayEvent(event));\n });\n }\n })\n}", "function renderEvents(timing) {\n //Get today's date\n let dateNow = new Date();\n let eventList = events.map( (event,i) => {\n //Get the date of the event...\n let eventDate = new Date(event.date)\n //...and only render if it meets requirements\n if ( (eventDate<dateNow && timing==='past') || (eventDate>dateNow && timing==='upcoming') ) {\n return <EventWidget key={event.id} event={event} index={i}/>\n }\n }).filter(event=>event);\n\n console.log('The current eventList:',eventList,timing);\n \n\n if (eventList.length>0) {\n return eventList;\n } else {\n return <NoEventsMessage>There are no {timing} events.</NoEventsMessage>\n }\n }", "onEventDataGenerated(renderData) {\n const me = this,\n record = renderData.event || renderData.eventRecord; // Differs by mode\n\n if (record.isResourceTimeRange) {\n if (me.scheduler.isVertical) {\n renderData.width = me.scheduler.resourceColumnWidth;\n } else {\n renderData.top = 0;\n // Avoid colliding ids by using a prefix\n renderData.id = `${me.scheduler.id}-${me.idPrefix}-${record.id}`;\n }\n\n // Flag that we should fill entire row/col\n renderData.fillSize = true;\n // Needed for caching\n renderData.eventId = `${me.idPrefix}-${record.id}`;\n // Add our own cls\n renderData.wrapperCls[me.rangeCls] = 1;\n renderData.wrapperCls[`b-sch-color-${record.timeRangeColor}`] = record.timeRangeColor;\n // Add label\n renderData.body = document.createDocumentFragment();\n renderData.body.textContent = record.name;\n }\n }", "function refetchEvents() { // can be called as an API method\n\t\tdestroyEvents(); // so that events are cleared before user starts waiting for AJAX\n\t\tfetchAndRenderEvents();\n\t}", "function refetchEvents() { // can be called as an API method\n\t\tdestroyEvents(); // so that events are cleared before user starts waiting for AJAX\n\t\tfetchAndRenderEvents();\n\t}" ]
[ "0.6431365", "0.60822344", "0.592008", "0.592008", "0.592008", "0.592008", "0.592008", "0.5899054", "0.5792027", "0.57906884", "0.57150984", "0.5669562", "0.5661558", "0.5656712", "0.56449986", "0.5508188", "0.54560643", "0.5451107", "0.5451107", "0.5451107", "0.5451107", "0.5451107", "0.5451107", "0.5451107", "0.5451107", "0.54030246", "0.540142", "0.5373168", "0.5343265", "0.5339781", "0.53319937", "0.5322549", "0.5259391", "0.5248123", "0.5200836", "0.51492685", "0.51339936", "0.5117271", "0.5106457", "0.5100168", "0.50974244", "0.50878954", "0.5063863", "0.50619584", "0.50246143", "0.50246143", "0.50246143", "0.4988489", "0.4981747", "0.49786088", "0.4972988", "0.49571878", "0.49567145", "0.49462175", "0.49462175", "0.49462175", "0.4918533", "0.4910166", "0.490285", "0.49007598", "0.48995712", "0.48992136", "0.48897582", "0.48888472", "0.48878762", "0.48848504", "0.48842108", "0.4883841", "0.48820928", "0.48815513", "0.4879546", "0.487858", "0.48704422", "0.48704422", "0.48704422", "0.48704422", "0.48704422", "0.48675662", "0.48552644", "0.48452005", "0.48234132", "0.48050213", "0.48017406", "0.4797194", "0.47881487", "0.4782756", "0.47642434", "0.4756842", "0.4752008", "0.47445247", "0.4730959", "0.47163054", "0.4704117", "0.4694226", "0.469395", "0.469395" ]
0.7326243
3
Render an event on the calendar, but don't report them anywhere, and don't attach mouse handlers. Append this event element to the event container, which might already be populated with events. If an event's segment will have row equal to `adjustRow`, then explicitly set its top coordinate to `adjustTop`. This hack is used to maintain continuity when user is manually resizing an event. Returns an array of DOM elements for the event.
function renderTempDayEvent(event, adjustRow, adjustTop) { // actually render the event. `true` for appending element to container. // Recieve the intermediate "segment" data structures. var segments = _renderDayEvents( [ event ], true, // append event elements false // don't set the heights of the rows ); var elements = []; // Adjust certain elements' top coordinates segmentElementEach(segments, function(segment, element) { if (segment.row === adjustRow) { element.css('top', adjustTop); } elements.push(element[0]); // accumulate DOM nodes }); return elements; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function renderEvents() {\n var totalPercent = 100,\n currentEvent,\n curCol,\n width,\n height,\n leftOffset,\n eventText,\n i,\n j;\n \n // empty container before adding new events\n $el.empty();\n \n // go through all columns\n for (i=0; i<columns.length; i++) {\n \n // go through all events in single column\n for (j=0; j<columns[i].length; j++) {\n currentEvent = columns[i][j];\n \n width = totalPercent / (columnWidths[currentEvent.groupIndex] + 1);\n height = currentEvent.end - currentEvent.start;\n leftOffset = i * width;\n \n // If container is too short, only display event title\n if (height < 45) {\n eventText = \"<h2>Sample Event</h2>\";\n }\n // Otherwise, display event title & location\n else {\n eventText = \"<h2>Sample Event</h2><h3>Sample Location</h3>\";\n }\n \n $el.append('<div class=\"calendarSlot\" style=\"width: ' + width + '%; height:'+ height +'px; top:' + currentEvent.start + 'px; left: ' + leftOffset + '%\">' + eventText + '</div>');\n }\n }\n }", "function _renderDayEvents(events, doAppend, doRowHeights) {\n\n\t\t// where the DOM nodes will eventually end up\n\t\tvar finalContainer = getDaySegmentContainer();\n\n\t\t// the container where the initial HTML will be rendered.\n\t\t// If `doAppend`==true, uses a temporary container.\n\t\tvar renderContainer = doAppend ? $(\"<div/>\") : finalContainer;\n\n\t\tvar segments = buildSegments(events);\n\t\tvar html;\n\t\tvar elements;\n\n\t\t// calculate the desired `left` and `width` properties on each segment object\n\t\tcalculateHorizontals(segments);\n\n\t\t// build the HTML string. relies on `left` property\n\t\thtml = buildHTML(segments);\n\n\t\t// render the HTML. innerHTML is considerably faster than jQuery's .html()\n\t\trenderContainer[0].innerHTML = html;\n\n\t\t// retrieve the individual elements\n\t\telements = renderContainer.children();\n\n\t\t// if we were appending, and thus using a temporary container,\n\t\t// re-attach elements to the real container.\n\t\tif (doAppend) {\n\t\t\tfinalContainer.append(elements);\n\t\t}\n\n\t\t// assigns each element to `segment.event`, after filtering them through user callbacks\n\t\tresolveElements(segments, elements);\n\n\t\t// Calculate the left and right padding+margin for each element.\n\t\t// We need this for setting each element's desired outer width, because of the W3C box model.\n\t\t// It's important we do this in a separate pass from acually setting the width on the DOM elements\n\t\t// because alternating reading/writing dimensions causes reflow for every iteration.\n\t\tsegmentElementEach(segments, function(segment, element) {\n\t\t\tsegment.hsides = hsides(element, true); // include margins = `true`\n\t\t});\n\n\t\t// Set the width of each element\n\t\tsegmentElementEach(segments, function(segment, element) {\n\t\t\telement.width(\n\t\t\t\tMath.max(0, segment.outerWidth - segment.hsides)\n\t\t\t);\n\t\t});\n\n\t\t// Grab each element's outerHeight (setVerticals uses this).\n\t\t// To get an accurate reading, it's important to have each element's width explicitly set already.\n\t\tsegmentElementEach(segments, function(segment, element) {\n\t\t\tsegment.outerHeight = element.outerHeight(true); // include margins = `true`\n\t\t});\n\n\t\t// Set the top coordinate on each element (requires segment.outerHeight)\n\t\tsetVerticals(segments, doRowHeights);\n\n\t\treturn segments;\n\t}", "function _renderDayEvents(events, doAppend, doRowHeights) {\n\n\t\t// where the DOM nodes will eventually end up\n\t\tvar finalContainer = getDaySegmentContainer();\n\n\t\t// the container where the initial HTML will be rendered.\n\t\t// If `doAppend`==true, uses a temporary container.\n\t\tvar renderContainer = doAppend ? $(\"<div/>\") : finalContainer;\n\n\t\tvar segments = buildSegments(events);\n\t\tvar html;\n\t\tvar elements;\n\n\t\t// calculate the desired `left` and `width` properties on each segment object\n\t\tcalculateHorizontals(segments);\n\n\t\t// build the HTML string. relies on `left` property\n\t\thtml = buildHTML(segments);\n\n\t\t// render the HTML. innerHTML is considerably faster than jQuery's .html()\n\t\trenderContainer[0].innerHTML = html;\n\n\t\t// retrieve the individual elements\n\t\telements = renderContainer.children();\n\n\t\t// if we were appending, and thus using a temporary container,\n\t\t// re-attach elements to the real container.\n\t\tif (doAppend) {\n\t\t\tfinalContainer.append(elements);\n\t\t}\n\n\t\t// assigns each element to `segment.event`, after filtering them through user callbacks\n\t\tresolveElements(segments, elements);\n\n\t\t// Calculate the left and right padding+margin for each element.\n\t\t// We need this for setting each element's desired outer width, because of the W3C box model.\n\t\t// It's important we do this in a separate pass from acually setting the width on the DOM elements\n\t\t// because alternating reading/writing dimensions causes reflow for every iteration.\n\t\tsegmentElementEach(segments, function(segment, element) {\n\t\t\tsegment.hsides = hsides(element, true); // include margins = `true`\n\t\t});\n\n\t\t// Set the width of each element\n\t\tsegmentElementEach(segments, function(segment, element) {\n\t\t\telement.width(\n\t\t\t\tMath.max(0, segment.outerWidth - segment.hsides)\n\t\t\t);\n\t\t});\n\n\t\t// Grab each element's outerHeight (setVerticals uses this).\n\t\t// To get an accurate reading, it's important to have each element's width explicitly set already.\n\t\tsegmentElementEach(segments, function(segment, element) {\n\t\t\tsegment.outerHeight = element.outerHeight(true); // include margins = `true`\n\t\t});\n\n\t\t// Set the top coordinate on each element (requires segment.outerHeight)\n\t\tsetVerticals(segments, doRowHeights);\n\n\t\treturn segments;\n\t}", "function _renderDayEvents(events, doAppend, doRowHeights) {\n\n\t\t// where the DOM nodes will eventually end up\n\t\tvar finalContainer = getDaySegmentContainer();\n\n\t\t// the container where the initial HTML will be rendered.\n\t\t// If `doAppend`==true, uses a temporary container.\n\t\tvar renderContainer = doAppend ? $(\"<div/>\") : finalContainer;\n\n\t\tvar segments = buildSegments(events);\n\t\tvar html;\n\t\tvar elements;\n\n\t\t// calculate the desired `left` and `width` properties on each segment object\n\t\tcalculateHorizontals(segments);\n\n\t\t// build the HTML string. relies on `left` property\n\t\thtml = buildHTML(segments);\n\n\t\t// render the HTML. innerHTML is considerably faster than jQuery's .html()\n\t\trenderContainer[0].innerHTML = html;\n\n\t\t// retrieve the individual elements\n\t\telements = renderContainer.children();\n\n\t\t// if we were appending, and thus using a temporary container,\n\t\t// re-attach elements to the real container.\n\t\tif (doAppend) {\n\t\t\tfinalContainer.append(elements);\n\t\t}\n\n\t\t// assigns each element to `segment.event`, after filtering them through user callbacks\n\t\tresolveElements(segments, elements);\n\n\t\t// Calculate the left and right padding+margin for each element.\n\t\t// We need this for setting each element's desired outer width, because of the W3C box model.\n\t\t// It's important we do this in a separate pass from acually setting the width on the DOM elements\n\t\t// because alternating reading/writing dimensions causes reflow for every iteration.\n\t\tsegmentElementEach(segments, function(segment, element) {\n\t\t\tsegment.hsides = hsides(element, true); // include margins = `true`\n\t\t});\n\n\t\t// Set the width of each element\n\t\tsegmentElementEach(segments, function(segment, element) {\n\t\t\telement.width(\n\t\t\t\tMath.max(0, segment.outerWidth - segment.hsides)\n\t\t\t);\n\t\t});\n\n\t\t// Grab each element's outerHeight (setVerticals uses this).\n\t\t// To get an accurate reading, it's important to have each element's width explicitly set already.\n\t\tsegmentElementEach(segments, function(segment, element) {\n\t\t\tsegment.outerHeight = element.outerHeight(true); // include margins = `true`\n\t\t});\n\n\t\t// Set the top coordinate on each element (requires segment.outerHeight)\n\t\tsetVerticals(segments, doRowHeights);\n\n\t\treturn segments;\n\t}", "function _renderDayEvents(events, doAppend, doRowHeights) {\n\n\t\t// where the DOM nodes will eventually end up\n\t\tvar finalContainer = getDaySegmentContainer();\n\n\t\t// the container where the initial HTML will be rendered.\n\t\t// If `doAppend`==true, uses a temporary container.\n\t\tvar renderContainer = doAppend ? $(\"<div/>\") : finalContainer;\n\n\t\tvar segments = buildSegments(events);\n\t\tvar html;\n\t\tvar elements;\n\n\t\t// calculate the desired `left` and `width` properties on each segment object\n\t\tcalculateHorizontals(segments);\n\n\t\t// build the HTML string. relies on `left` property\n\t\thtml = buildHTML(segments);\n\n\t\t// render the HTML. innerHTML is considerably faster than jQuery's .html()\n\t\trenderContainer[0].innerHTML = html;\n\n\t\t// retrieve the individual elements\n\t\telements = renderContainer.children();\n\n\t\t// if we were appending, and thus using a temporary container,\n\t\t// re-attach elements to the real container.\n\t\tif (doAppend) {\n\t\t\tfinalContainer.append(elements);\n\t\t}\n\n\t\t// assigns each element to `segment.event`, after filtering them through user callbacks\n\t\tresolveElements(segments, elements);\n\n\t\t// Calculate the left and right padding+margin for each element.\n\t\t// We need this for setting each element's desired outer width, because of the W3C box model.\n\t\t// It's important we do this in a separate pass from acually setting the width on the DOM elements\n\t\t// because alternating reading/writing dimensions causes reflow for every iteration.\n\t\tsegmentElementEach(segments, function(segment, element) {\n\t\t\tsegment.hsides = hsides(element, true); // include margins = `true`\n\t\t});\n\n\t\t// Set the width of each element\n\t\tsegmentElementEach(segments, function(segment, element) {\n\t\t\telement.width(\n\t\t\t\tMath.max(0, segment.outerWidth - segment.hsides)\n\t\t\t);\n\t\t});\n\n\t\t// Grab each element's outerHeight (setVerticals uses this).\n\t\t// To get an accurate reading, it's important to have each element's width explicitly set already.\n\t\tsegmentElementEach(segments, function(segment, element) {\n\t\t\tsegment.outerHeight = element.outerHeight(true); // include margins = `true`\n\t\t});\n\n\t\t// Set the top coordinate on each element (requires segment.outerHeight)\n\t\tsetVerticals(segments, doRowHeights);\n\n\t\treturn segments;\n\t}", "function _renderDayEvents(events, doAppend, doRowHeights) {\n\n\t\t// where the DOM nodes will eventually end up\n\t\tvar finalContainer = getDaySegmentContainer();\n\n\t\t// the container where the initial HTML will be rendered.\n\t\t// If `doAppend`==true, uses a temporary container.\n\t\tvar renderContainer = doAppend ? $(\"<div/>\") : finalContainer;\n\n\t\tvar segments = buildSegments(events);\n\t\tvar html;\n\t\tvar elements;\n\n\t\t// calculate the desired `left` and `width` properties on each segment object\n\t\tcalculateHorizontals(segments);\n\n\t\t// build the HTML string. relies on `left` property\n\t\thtml = buildHTML(segments);\n\n\t\t// render the HTML. innerHTML is considerably faster than jQuery's .html()\n\t\trenderContainer[0].innerHTML = html;\n\n\t\t// retrieve the individual elements\n\t\telements = renderContainer.children();\n\n\t\t// if we were appending, and thus using a temporary container,\n\t\t// re-attach elements to the real container.\n\t\tif (doAppend) {\n\t\t\tfinalContainer.append(elements);\n\t\t}\n\n\t\t// assigns each element to `segment.event`, after filtering them through user callbacks\n\t\tresolveElements(segments, elements);\n\n\t\t// Calculate the left and right padding+margin for each element.\n\t\t// We need this for setting each element's desired outer width, because of the W3C box model.\n\t\t// It's important we do this in a separate pass from acually setting the width on the DOM elements\n\t\t// because alternating reading/writing dimensions causes reflow for every iteration.\n\t\tsegmentElementEach(segments, function(segment, element) {\n\t\t\tsegment.hsides = hsides(element, true); // include margins = `true`\n\t\t});\n\n\t\t// Set the width of each element\n\t\tsegmentElementEach(segments, function(segment, element) {\n\t\t\telement.width(\n\t\t\t\tMath.max(0, segment.outerWidth - segment.hsides)\n\t\t\t);\n\t\t});\n\n\t\t// Grab each element's outerHeight (setVerticals uses this).\n\t\t// To get an accurate reading, it's important to have each element's width explicitly set already.\n\t\tsegmentElementEach(segments, function(segment, element) {\n\t\t\tsegment.outerHeight = element.outerHeight(true); // include margins = `true`\n\t\t});\n\n\t\t// Set the top coordinate on each element (requires segment.outerHeight)\n\t\tsetVerticals(segments, doRowHeights);\n\n\t\treturn segments;\n\t}", "renderEvent(eventData) {\n // No point in rendering event that already has an element\n const data = eventData.tplData,\n { resourceRecord, eventRecord } = data,\n // Event element config, applied to existing element or used to create a new one below\n elementConfig = {\n className: data.wrapperCls,\n tabIndex: '0',\n children: [\n {\n className: data.cls,\n style: (data.internalStyle || '') + (data.style || ''),\n // Clone to be repeatable\n html: data.body.cloneNode(true),\n // Used for comparison, cheaper than comparing fragment from above\n compareHtml: data.eventContent\n }\n ],\n style: {\n transform: `translate(${data.left}px, ${data.top}px)`,\n // DomHelper appends px to dimensions when using numbers\n height: data.height,\n width: data.width,\n zIndex: data.zIndex\n },\n dataset: {\n resourceId: resourceRecord.id,\n eventId: data.eventId, // Not using eventRecord.id to distinguish between Event and ResourceTimeRange\n // Sync using assignment id in multi assignment mode or event id in single assignment mode\n syncId: data.assignment ? data.assignment.id : data.eventId\n },\n // Will not be part of DOM, but attached to the element\n elementData: eventData,\n // Dragging etc. flags element as retained, to not reuse/release it during that operation\n retainElement: eventRecord.instanceMeta(this.scheduler).retainElement\n };\n\n // Do not want to spam dataset with empty prop when not using assignments\n if (data.assignment) {\n elementConfig.dataset.assignmentId = data.assignment.id;\n }\n\n return elementConfig;\n }", "function renderUI(rows) {\n for (var i = 0; i < rows.length; i++) {\n var columnWidth = 600 / rows[i].columns.length;\n var rowDiv = \"\",\n columnDiv = \"\",\n columnGroup = \"\",\n eventItem = \"\";\n for (var j = rows[i].columns.length - 1; j >= 0; j--) {\n var columns = rows[i].columns[j].events;\n eventItem = \"\";\n for (var k = 0; k < columns.length; k++) {\n eventItem = eventItem + '<div class=\"event-item\" style=\"width:' + columnWidth + 'px;top:' + columns[k].start + 'px;\"><div style=\"background-color:' + columns[k].color + '\"></div><div>' + columns[k].label + '</div></div>';\n }\n columnGroup = columnGroup + '<div class=\"column\" style=\"width:' + columnWidth + 'px;\">' + eventItem + '</div>';\n }\n rowDiv = rowDiv + '<div class=\"row\">' + columnGroup + '</div>';\n $('#eventDisplayArea').append(rowDiv);\n }\n}", "renderEvent(data, rowHeight) {\n const {\n scheduler\n } = this,\n {\n resourceRecord,\n assignmentRecord,\n eventRecord\n } = data,\n // Sync using assignment id for events and event id for ResourceTimeRanges. Add eventId for occurrences to make them unique\n syncId = assignmentRecord // Assignment, might be an occurrence\n ? this.assignmentStore.getOccurrence(assignmentRecord, eventRecord).id // Some thine else, probably a ResourceTimeRange\n : data.eventId,\n // Event element config, applied to existing element or used to create a new one below\n elementConfig = {\n className: data.wrapperCls,\n tabIndex: '0',\n children: [{\n className: data.cls,\n style: data.style || '',\n children: data.children,\n dataset: {\n // Each feature putting contents in the event wrap should have this to simplify syncing and\n // element retrieval after sync\n taskFeature: 'event'\n },\n syncOptions: {\n syncIdField: 'taskBarFeature'\n }\n }, ...data.wrapperChildren],\n style: {\n transform: `translate(${data.left}px, ${data.absoluteTop}px)`,\n // ResourceTimeRanges fill row height, cannot be done earlier than this since row height is not\n // known initially\n height: data.fillSize ? rowHeight : data.height,\n // DomHelper appends px to dimensions when using numbers. Ignore width for milestones\n width: data.width > 0 ? data.width : null,\n zIndex: data.zIndex,\n style: data.wrapperStyle\n },\n dataset: {\n resourceId: resourceRecord.id,\n eventId: data.eventId,\n // Not using eventRecord.id to distinguish between Event and ResourceTimeRange\n syncId\n },\n // Will not be part of DOM, but attached to the element\n elementData: data,\n // Dragging etc. flags element as retained, to not reuse/release it during that operation. Events\n // always use assignments, but ResourceTimeRanges does not\n retainElement: (assignmentRecord || eventRecord).instanceMeta(scheduler).retainElement,\n // Options for this level of sync, lower levels can have their own\n syncOptions: {\n syncIdField: 'taskFeature',\n // Remove instead of release when a feature is disabled\n releaseThreshold: 0\n }\n }; // Do not want to spam dataset with empty prop when not using assignments (ResourceTimeRanges)\n\n if (assignmentRecord) {\n elementConfig.dataset.assignmentId = assignmentRecord.id;\n }\n\n data.elementConfig = elementConfig;\n scheduler.trigger('beforeRenderEvent', {\n renderData: data,\n domConfig: elementConfig\n });\n return elementConfig;\n }", "function initiateEventsFormatting(events, rows) {\n while (true) {\n var result = createRow(events);\n rows.push(result.row);\n if (result.noOverlapEvents.length) {\n events = result.noOverlapEvents;\n } else {\n break; //Exit loop once noOverlapEvents array is empty and no more events are available to be compared\n }\n }\n}", "function j(a){var b=\"\",c=y(\"isRTL\"),d=a.event,e=d.url,f=[\"fc-event\",\"fc-event-hori\"];A(d)&&f.push(\"fc-event-draggable\"),a.isStart&&f.push(\"fc-event-start\"),a.isEnd&&f.push(\"fc-event-end\"),\n// use the event's configured classNames\n// guaranteed to be an array via `buildEvent`\nf=f.concat(d.className),d.source&&(\n// use the event's source's classNames, if specified\nf=f.concat(d.source.className||[]));\n// generate a semicolon delimited CSS string for any of the \"skin\" properties\n// of the event object (`backgroundColor`, `borderColor` and such)\nvar g=J(d,y);\n// TODO:\n// When these elements are initially rendered, they will be briefly visibile on the screen,\n// even though their widths/heights are not set.\n// SOLUTION: initially set them as visibility:hidden ?\nreturn b+=e?\"<a href='\"+F(e)+\"'\":\"<div\",b+=\" class='\"+f.join(\" \")+\"' style='position:absolute;left:\"+a.left+\"px;\"+g+\"'><div class='fc-event-inner'>\",!d.allDay&&a.isStart&&(b+=\"<span class='fc-event-time'>\"+F(x.getEventTimeText(d))+\"</span>\"),b+=\"<span class='fc-event-title'>\"+F(d.title||\"\")+\"</span></div>\",d.allDay&&a.isEnd&&B(d)&&(b+=\"<div class='ui-resizable-handle ui-resizable-\"+(c?\"w\":\"e\")+\"'>&nbsp;&nbsp;&nbsp;</div>\"),b+=\"</\"+(e?\"a\":\"div\")+\">\"}", "styleEvents(events){\n const {\n day\n } = this.props;\n\n const columnEndTimes = [];\n\n return events.map((event) => {\n const { startDate, endDate } = event;\n\n const startOfDayUnix = day.startMoment.valueOf();\n const endOfDayUnix = day.endMoment.valueOf();\n\n let styles = {\n top:`${((startDate - startOfDayUnix)/(endOfDayUnix - startOfDayUnix))*100}%`,\n height: (DAY_COLUMN_HEIGHT/MS_IN_DAY)*(endDate-startDate)\n };\n\n // columns - this just offsets everything 45px*the col. We might want to change this to a percentage based on the total # of cols in the future.\n // loop through all the column event times and find the lowest column with no overlap\n for (let [idx, columnEndTime] of columnEndTimes.entries()) {\n if (startDate >= columnEndTime) {\n columnEndTimes[idx] = endDate;\n\n styles = {\n ...styles,\n left: `${idx*45}px`,\n zIndex: idx\n };\n\n break;\n }\n }\n\n // if there is STILL overlap, then we need to make a new column\n // with the current event's endTime there.\n if(!styles.left) {\n columnEndTimes.push(endDate);\n\n styles = {\n ...styles,\n left: `${(columnEndTimes.length - 1)*45}px`,\n zIndex: columnEndTimes.length - 1\n };\n\n }\n\n return {\n ...event,\n styles\n };\n });\n }", "onRenderDone() {\n const {\n scheduler,\n rowMap\n } = this,\n visibleEventDOMConfigs = []; // Concat all rows event configs\n\n rowMap.forEach(eventDOMConfigs => visibleEventDOMConfigs.push.apply(visibleEventDOMConfigs, eventDOMConfigs));\n DomSync.sync({\n domConfig: {\n onlyChildren: true,\n children: visibleEventDOMConfigs\n },\n targetElement: scheduler.foregroundCanvas,\n syncIdField: 'syncId',\n\n // Called by DomHelper when it creates, releases or reuses elements\n callback({\n action,\n domConfig,\n lastDomConfig,\n targetElement\n }) {\n var _domConfig$className;\n\n // If element is a task wrap, trigger appropriate events\n if (action !== 'none' && (domConfig === null || domConfig === void 0 ? void 0 : (_domConfig$className = domConfig.className) === null || _domConfig$className === void 0 ? void 0 : _domConfig$className[`${scheduler.eventCls}-wrap`])) {\n const // Some actions are considered first a release and then a render (reusing another element).\n // This gives clients code a chance to clean up before reusing an element\n isRelease = releaseEventActions[action],\n isRender = renderEventActions[action]; // Trigger release for events (it might be a proxy element, skip those)\n\n if (isRelease && (lastDomConfig === null || lastDomConfig === void 0 ? void 0 : lastDomConfig.elementData)) {\n const {\n eventRecord,\n resourceRecord,\n assignmentRecord\n } = lastDomConfig.elementData,\n event = {\n renderData: lastDomConfig.elementData,\n element: targetElement,\n eventRecord,\n resourceRecord,\n assignmentRecord\n }; // Some browsers do not blur on set to display:none, so releasing the active element\n // must *explicitly* move focus outwards to the view.\n\n if (targetElement === document.activeElement) {\n scheduler.focusElement.focus();\n } // This event is documented on Scheduler\n\n scheduler.trigger('releaseEvent', event);\n }\n\n if (isRender) {\n const {\n eventRecord,\n resourceRecord,\n assignmentRecord\n } = domConfig.elementData,\n event = {\n renderData: domConfig.elementData,\n tplData: domConfig.elementData,\n // DEPRECATED IN 4.0\n element: targetElement,\n isReusingElement: action === 'reuseElement',\n isRepaint: action === 'reuseOwnElement',\n eventRecord,\n resourceRecord,\n assignmentRecord\n }; // This event is documented on Scheduler\n\n scheduler.trigger('renderEvent', event);\n }\n }\n }\n\n }); // There are multiple pathways that might lead to the first render of events. This is the first reliable\n // place were we can determine that something will be rendered\n\n visibleEventDOMConfigs.length && scheduler._firstRenderDone && scheduler._firstRenderDone();\n }", "function renderEvent () {\n const daysContainer = document.querySelectorAll(\".current-month-day\");\n const currentMonth = date.getMonth() + 1;\n const currentYear = date.getFullYear();\n //* Calendar days divs pass by\n for (let div of daysContainer) {\n const dayNumber = div.firstChild.innerHTML;\n //* checking that day has events\n if (!!eventsByDate[`${currentYear}-${currentMonth}-${dayNumber}`]) {\n //* Looping thru events in array\n for (let eventObjectId of eventsByDate[`${currentYear}-${currentMonth}-${dayNumber}`]){\n //* Access to event data\n const eventTitle = eventsById[eventObjectId].title;\n const eventType = eventsById[eventObjectId].eventType;\n //* Create of the event element\n let newEvent = document.createElement(\"div\");\n newEvent.classList.add(\"event-in-calendar\");\n newEvent.innerHTML = eventTitle;\n newEvent.setAttribute(\"divEventId\", eventObjectId);\n //* choosing event color depending of event type\n switch (eventType) {\n case 'Study':\n newEvent.classList.add(\"blue-event\");\n break;\n case 'Meeting':\n newEvent.classList.add(\"green-event\");\n break;\n case 'Personal':\n newEvent.classList.add(\"orange-event\");\n break;\n default:\n break;\n }\n newEvent.addEventListener('click', eventModal);\n //* Insert element in DOM\n div.firstChild.insertAdjacentElement('afterend',newEvent);\n }\n }\n }\n}", "function renderEvents(eventInputs, stick) {\n\t\tvar renderedEvents = [];\n\t\tvar renderableEvents;\n\t\tvar abstractEvent;\n\t\tvar i, j, event;\n\n\t\tfor (i = 0; i < eventInputs.length; i++) {\n\t\t\tabstractEvent = buildEventFromInput(eventInputs[i]);\n\n\t\t\tif (abstractEvent) { // not false (a valid input)\n\t\t\t\trenderableEvents = expandEvent(abstractEvent);\n\n\t\t\t\tfor (j = 0; j < renderableEvents.length; j++) {\n\t\t\t\t\tevent = renderableEvents[j];\n\n\t\t\t\t\tif (!event.source) {\n\t\t\t\t\t\tif (stick) {\n\t\t\t\t\t\t\tstickySource.events.push(event);\n\t\t\t\t\t\t\tevent.source = stickySource;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tcache.push(event);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\trenderedEvents = renderedEvents.concat(renderableEvents);\n\t\t\t}\n\t\t}\n\n\t\tif (renderedEvents.length) { // any new events rendered?\n\t\t\treportEventChange();\n\t\t}\n\n\t\treturn renderedEvents;\n\t}", "function renderEvents(eventInputs, stick) {\n\t\tvar renderedEvents = [];\n\t\tvar renderableEvents;\n\t\tvar abstractEvent;\n\t\tvar i, j, event;\n\n\t\tfor (i = 0; i < eventInputs.length; i++) {\n\t\t\tabstractEvent = buildEventFromInput(eventInputs[i]);\n\n\t\t\tif (abstractEvent) { // not false (a valid input)\n\t\t\t\trenderableEvents = expandEvent(abstractEvent);\n\n\t\t\t\tfor (j = 0; j < renderableEvents.length; j++) {\n\t\t\t\t\tevent = renderableEvents[j];\n\n\t\t\t\t\tif (!event.source) {\n\t\t\t\t\t\tif (stick) {\n\t\t\t\t\t\t\tstickySource.events.push(event);\n\t\t\t\t\t\t\tevent.source = stickySource;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tcache.push(event);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\trenderedEvents = renderedEvents.concat(renderableEvents);\n\t\t\t}\n\t\t}\n\n\t\tif (renderedEvents.length) { // any new events rendered?\n\t\t\treportEventChange();\n\t\t}\n\n\t\treturn renderedEvents;\n\t}", "function renderEvents(eventInputs, stick) {\n\t\tvar renderedEvents = [];\n\t\tvar renderableEvents;\n\t\tvar abstractEvent;\n\t\tvar i, j, event;\n\n\t\tfor (i = 0; i < eventInputs.length; i++) {\n\t\t\tabstractEvent = buildEventFromInput(eventInputs[i]);\n\n\t\t\tif (abstractEvent) { // not false (a valid input)\n\t\t\t\trenderableEvents = expandEvent(abstractEvent);\n\n\t\t\t\tfor (j = 0; j < renderableEvents.length; j++) {\n\t\t\t\t\tevent = renderableEvents[j];\n\n\t\t\t\t\tif (!event.source) {\n\t\t\t\t\t\tif (stick) {\n\t\t\t\t\t\t\tstickySource.events.push(event);\n\t\t\t\t\t\t\tevent.source = stickySource;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tcache.push(event);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\trenderedEvents = renderedEvents.concat(renderableEvents);\n\t\t\t}\n\t\t}\n\n\t\tif (renderedEvents.length) { // any new events rendered?\n\t\t\treportEventChange();\n\t\t}\n\n\t\treturn renderedEvents;\n\t}", "function _createCalendarElement(event) {\n var element = document.createElement(\"div\"),\n style = element.style;\n\n element.className = \"event\";\n style.top = event.top + \"px\";\n style.left = MARGIN_LEFT + event.left + \"px\";\n style.width = event.width - BORDER.left - BORDER.right - PADDING_LEFT + \"px\";\n style.height = event.height - BORDER.top - BORDER.bottom + \"px\";\n\n element.innerHTML = \"<p>Event ID #\" + event.id + \"</p>\";\n element.title = element.innerHTML;\n return element;\n }", "function renderEvent(eventInput, stick) {\n var abstractEvent = buildEventFromInput(eventInput);\n var events;\n var i, event;\n\n if (abstractEvent) { // not false (a valid input)\n events = expandEvent(abstractEvent);\n\n for (i = 0; i < events.length; i++) {\n event = events[i];\n\n if (!event.source) {\n if (stick) {\n stickySource.events.push(event);\n event.source = stickySource;\n }\n cache.push(event);\n }\n }\n\n reportEvents(cache);\n\n return events;\n }\n\n return [];\n }", "drawEventList() {\n\n\n let FinalEventListObject = this.calcEventsPosition();\n let finalEventArray = [];\n\n Object.keys(FinalEventListObject).forEach(key => {\n let event = this.eventList.find(ele => {\n return ele.id == key;\n }) || {};\n event['width'] = FinalEventListObject[key]['width'];\n event['left'] = FinalEventListObject[key]['left'];\n finalEventArray.push(event);\n });\n\n finalEventArray.forEach((ele) => {\n ele['top'] = ele['start'] * 2;\n ele['height'] = (ele['end'] - ele['start']) * 2;\n ele['color'] = this.getRandomColor();\n });\n return finalEventArray;\n }", "function renderEvent(eventInput, stick) {\n\t\t\tvar abstractEvent = buildEventFromInput(eventInput);\n\t\t\tvar events;\n\t\t\tvar i, event;\n\n\t\t\tif (abstractEvent) { // not false (a valid input)\n\t\t\t\tevents = expandEvent(abstractEvent);\n\n\t\t\t\tfor (i = 0; i < events.length; i++) {\n\t\t\t\t\tevent = events[i];\n\n\t\t\t\t\tif (!event.source) {\n\t\t\t\t\t\tif (stick) {\n\t\t\t\t\t\t\tstickySource.events.push(event);\n\t\t\t\t\t\t\tevent.source = stickySource;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tcache.push(event);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\treportEvents(cache);\n\n\t\t\t\treturn events;\n\t\t\t}\n\n\t\t\treturn [];\n\t\t}", "function renderEvent(eventInput, stick) {\n\t\tvar abstractEvent = buildEventFromInput(eventInput);\n\t\tvar events;\n\t\tvar i, event;\n\n\t\tif (abstractEvent) { // not false (a valid input)\n\t\t\tevents = expandEvent(abstractEvent);\n\n\t\t\tfor (i = 0; i < events.length; i++) {\n\t\t\t\tevent = events[i];\n\n\t\t\t\tif (!event.source) {\n\t\t\t\t\tif (stick) {\n\t\t\t\t\t\tstickySource.events.push(event);\n\t\t\t\t\t\tevent.source = stickySource;\n\t\t\t\t\t}\n\t\t\t\t\tcache.push(event);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treportEvents(cache);\n\n\t\t\treturn events;\n\t\t}\n\n\t\treturn [];\n\t}", "function renderEvent(eventInput, stick) {\n\t\tvar abstractEvent = buildEventFromInput(eventInput);\n\t\tvar events;\n\t\tvar i, event;\n\n\t\tif (abstractEvent) { // not false (a valid input)\n\t\t\tevents = expandEvent(abstractEvent);\n\n\t\t\tfor (i = 0; i < events.length; i++) {\n\t\t\t\tevent = events[i];\n\n\t\t\t\tif (!event.source) {\n\t\t\t\t\tif (stick) {\n\t\t\t\t\t\tstickySource.events.push(event);\n\t\t\t\t\t\tevent.source = stickySource;\n\t\t\t\t\t}\n\t\t\t\t\tcache.push(event);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treportEvents(cache);\n\n\t\t\treturn events;\n\t\t}\n\n\t\treturn [];\n\t}", "function renderEvent(eventInput, stick) {\n\t\tvar abstractEvent = buildEventFromInput(eventInput);\n\t\tvar events;\n\t\tvar i, event;\n\n\t\tif (abstractEvent) { // not false (a valid input)\n\t\t\tevents = expandEvent(abstractEvent);\n\n\t\t\tfor (i = 0; i < events.length; i++) {\n\t\t\t\tevent = events[i];\n\n\t\t\t\tif (!event.source) {\n\t\t\t\t\tif (stick) {\n\t\t\t\t\t\tstickySource.events.push(event);\n\t\t\t\t\t\tevent.source = stickySource;\n\t\t\t\t\t}\n\t\t\t\t\tcache.push(event);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treportEvents(cache);\n\n\t\t\treturn events;\n\t\t}\n\n\t\treturn [];\n\t}", "function c(a,b,c){\n// actually render the event. `true` for appending element to container.\n// Recieve the intermediate \"segment\" data structures.\nvar e=d([a],!0,// append event elements\n!1),f=[];\n// Adjust certain elements' top coordinates\nreturn xa(e,function(a,d){a.row===b&&d.css(\"top\",c),f.push(d[0])}),f}", "function createRow(events) {\n //Create first row and first column with Nikki's object array\n //row stores the complete formatted events array object\n var row = {\n columns: [{\n events: [events.shift()]\n }]\n };\n\n return {\n noOverlapEvents: processEvent(events), //Pass events array which excludes Nikki's object\n row: row\n }\n\n /**\n * Method to check if an evnt is processed ie.placed in a column and track no overlapping events\n */\n function processEvent(remainingEvents) {\n var temp = []; //stores the list of items which doesnt overlap with already formed column items\n while (true) {\n //Loop current event items\n for (var i in remainingEvents) {\n var isProcessed = processRow(remainingEvents[i], row); //returns boolean if all event objects are placed in column array\n //track event item which does not overlap with exisisting row column arrays\n if (!isProcessed) {\n temp.push(remainingEvents[i]);\n }\n };\n /* RemainingEvents will now hold temp(non overlapping arrays) and the loop inspect\n continued till temp becomes empty */\n if (remainingEvents.length !== temp.length) {\n remainingEvents = temp.slice(0);\n temp = [];\n } else {\n break; //If no element exists in remainingEvents array\n }\n }\n return temp;\n }\n}", "function _getRow(event) {\n var fragment = document.createDocumentFragment(),\n tr = document.createElement(\"tr\"),\n dateCell, summaryCell, date;\n\n if (event.end && event.end.date) {\n // This is an All Day event\n\n // The API is returning a date range that is one day too many for \"All\n // day\" events. Set the correct end date.\n event.end.date = moment(event.end.date).add(-1, \"days\").format(\"YYYY-MM-DD\");\n\n // for demonstration purposes, just displaying the end date\n date = moment(event.end.date).format(\"MMMM Do YYYY\");\n } else {\n // This is a time based event\n\n // for demonstration purposes, just displaying the start date/time\n date = moment(event.start.dateTime).format(\"MMMM Do YYYY, h:mm:ss a\");\n }\n\n //this creates a td element in the table and sets it's inner HTML value to equal the date formed above\n dateCell = document.createElement(\"td\");\n dateCell.innerHTML = date;\n\n //this creates a td element in the table and sets it's inner HTML value to equal the summary of the event\n summaryCell = document.createElement(\"td\");\n summaryCell.innerHTML = event.summary;\n\n tr.appendChild(dateCell);\n tr.appendChild(summaryCell);\n\n fragment.appendChild(tr);\n\n return fragment;\n }", "renderEvent(events) {\n const domContainer = document.querySelector(\"#containerTwo\");\n domContainer.innerHTML = `<section id=\"containerTwoSection\"></section>`;\n eventContainer = document.querySelector(\"#containerTwoSection\");\n // sorts the list of events by date\n events.sort((a, b) => {\n if (a.date < b.date) {\n return -1;\n } else if (a.date > b.date) {\n return 1;\n } else {\n return 0;\n }\n });\n events.forEach(event => {\n eventContainer.innerHTML += eventHtml.makeEventList(event);\n });\n }", "function renderEvents() {\n\t$(\"#event-items\").html(\"\");\n\n\tif (show_events) {\n\t\tvar i = 0;\n\t\t// if (eventsLogList.length > 10) {\n\t\t// \ti = eventsLogList.length - 10;\n\t\t// }\n\t\tfor (;i < eventsLogList.length; i++) {\n\t\t\tvar eventsListItem = $(\"#event-template\").clone();\n\t\t\teventsListItem.html(eventsLogList[i]);\n\t\t\t$(\"#event-items\").append(eventsListItem);\n\t\t\teventsListItem.show();\n\t\t}\n\t}\n\t\t$(\"#event-items\").scrollTop($(\"#event-items\")[0].scrollHeight);\n}", "function prepareEvents(raddec) {\n let elements = [];\n\n raddec.events.forEach(function(event) {\n let i = document.createElement('i');\n let space = document.createTextNode(' ');\n i.setAttribute('class', EVENT_ICONS[event]);\n elements.push(i);\n elements.push(space);\n });\n\n return elements;\n}", "addEventToWidget(event) {\n // Create date header\n if (this.lastDate === null || event.startDate.diffDays(this.lastDate) <= -1) {\n let leadingNewline = \"\";\n if (this.lastDate) {\n leadingNewline = \"\\n\\n\";\n }\n this.lastDate = event.startDate;\n let label = CalendarUtility.label(leadingNewline + this.formatEventDate(event.startDateText) + SEPARATOR_LINE, this.zoom, this.textcolor);\n this.window.add(label);\n }\n\n // Create event row\n let box = CalendarUtility.container();\n let lblEvent = CalendarUtility.label(event.name, this.zoom, this.textcolor);\n box.add(lblEvent);\n\n let dateText = event.formatEventDuration(this.lastDate);\n if (dateText) {\n let lblDate = CalendarUtility.label(dateText, this.zoom, this.textcolor, false);\n lblEvent.width = TEXT_WIDTH;\n lblDate.width = DATE_WIDTH;\n box.add(lblDate);\n } else {\n lblEvent.width = TEXT_WIDTH + DATE_WIDTH;\n }\n\n this.window.add(box);\n }", "function renderDayEvents(events, modifiedEventId) {\n\n\t\t// do the actual rendering. Receive the intermediate \"segment\" data structures.\n\t\tvar segments = _renderDayEvents(\n\t\t\tevents,\n\t\t\tfalse, // don't append event elements\n\t\t\ttrue // set the heights of the rows\n\t\t);\n\n\t\t// report the elements to the View, for general drag/resize utilities\n\t\tsegmentElementEach(segments, function(segment, element) {\n\t\t\treportEventElement(segment.event, element);\n\t\t});\n\n\t\t// attach mouse handlers\n\t\tattachHandlers(segments, modifiedEventId);\n\n\t\t// call `eventAfterRender` callback for each event\n\t\tsegmentElementEach(segments, function(segment, element) {\n\t\t\ttrigger('eventAfterRender', segment.event, segment.event, element);\n\t\t});\n\t}", "function renderDayEvents(events, modifiedEventId) {\n\n\t\t// do the actual rendering. Receive the intermediate \"segment\" data structures.\n\t\tvar segments = _renderDayEvents(\n\t\t\tevents,\n\t\t\tfalse, // don't append event elements\n\t\t\ttrue // set the heights of the rows\n\t\t);\n\n\t\t// report the elements to the View, for general drag/resize utilities\n\t\tsegmentElementEach(segments, function(segment, element) {\n\t\t\treportEventElement(segment.event, element);\n\t\t});\n\n\t\t// attach mouse handlers\n\t\tattachHandlers(segments, modifiedEventId);\n\n\t\t// call `eventAfterRender` callback for each event\n\t\tsegmentElementEach(segments, function(segment, element) {\n\t\t\ttrigger('eventAfterRender', segment.event, segment.event, element);\n\t\t});\n\t}", "function renderDayEvents(events, modifiedEventId) {\n\n\t\t// do the actual rendering. Receive the intermediate \"segment\" data structures.\n\t\tvar segments = _renderDayEvents(\n\t\t\tevents,\n\t\t\tfalse, // don't append event elements\n\t\t\ttrue // set the heights of the rows\n\t\t);\n\n\t\t// report the elements to the View, for general drag/resize utilities\n\t\tsegmentElementEach(segments, function(segment, element) {\n\t\t\treportEventElement(segment.event, element);\n\t\t});\n\n\t\t// attach mouse handlers\n\t\tattachHandlers(segments, modifiedEventId);\n\n\t\t// call `eventAfterRender` callback for each event\n\t\tsegmentElementEach(segments, function(segment, element) {\n\t\t\ttrigger('eventAfterRender', segment.event, segment.event, element);\n\t\t});\n\t}", "function renderDayEvents(events, modifiedEventId) {\n\n\t\t// do the actual rendering. Receive the intermediate \"segment\" data structures.\n\t\tvar segments = _renderDayEvents(\n\t\t\tevents,\n\t\t\tfalse, // don't append event elements\n\t\t\ttrue // set the heights of the rows\n\t\t);\n\n\t\t// report the elements to the View, for general drag/resize utilities\n\t\tsegmentElementEach(segments, function(segment, element) {\n\t\t\treportEventElement(segment.event, element);\n\t\t});\n\n\t\t// attach mouse handlers\n\t\tattachHandlers(segments, modifiedEventId);\n\n\t\t// call `eventAfterRender` callback for each event\n\t\tsegmentElementEach(segments, function(segment, element) {\n\t\t\ttrigger('eventAfterRender', segment.event, segment.event, element);\n\t\t});\n\t}", "function renderDayEvents(events, modifiedEventId) {\n\n\t\t// do the actual rendering. Receive the intermediate \"segment\" data structures.\n\t\tvar segments = _renderDayEvents(\n\t\t\tevents,\n\t\t\tfalse, // don't append event elements\n\t\t\ttrue // set the heights of the rows\n\t\t);\n\n\t\t// report the elements to the View, for general drag/resize utilities\n\t\tsegmentElementEach(segments, function(segment, element) {\n\t\t\treportEventElement(segment.event, element);\n\t\t});\n\n\t\t// attach mouse handlers\n\t\tattachHandlers(segments, modifiedEventId);\n\n\t\t// call `eventAfterRender` callback for each event\n\t\tsegmentElementEach(segments, function(segment, element) {\n\t\t\ttrigger('eventAfterRender', segment.event, segment.event, element);\n\t\t});\n\t}", "function eventRestructurer(columns) {\n const containerWidth = 620;\n const resultArray = [];\n columns.forEach((group, columnsIndex) => {\n group.forEach(event => {\n const factorWL = widthLeftFactor(event, columnsIndex, columns);\n resultArray.push({\n id: `${event[0]}`,\n start: event[1].start,\n end: event[1].end,\n top: `${event[1].start}px`,\n width: containerWidth * factorWL[0],\n left: `${columnsIndex / factorWL[1] * 100}%`\n });\n });\n });\n return resultArray;\n }", "renderAllEvents() {\n // sort items\n switch (this._sortBy) {\n case SortTypes.time:\n this._eventsFiltered.sort((eventA, eventB) => eventA.duration < eventB.duration ? 1 : -1);\n break;\n case SortTypes.price:\n this._eventsFiltered.sort((eventA, eventB) => eventA.price < eventB.price ? 1 : -1);\n break;\n default:\n this._eventsFiltered.sort((eventA, eventB) => eventA.dateBegin > eventB.dateBegin ? 1 : -1);\n break;\n }\n\n this.elemTripDays.innerHTML = ``;\n\n // array of trip days\n let arrTripDays = [];\n if (this._sortBy !== SortTypes.event) {\n arrTripDays.push(SHOW_NO_DAY);\n } else {\n arrTripDays = uniqueDays(this._eventsFiltered);\n }\n\n // render all days\n if (arrTripDays.length) {\n arrTripDays.forEach(this.renderTripDay.bind(this));\n } else {\n // no event found\n render(this.elemTripEvents, (new NoPoints()).element);\n }\n }", "layoutResourceEvents(resourceRecord, includeOutside = false) {\n const me = this,\n {\n scheduler\n } = me,\n {\n eventStore,\n assignmentStore,\n timeAxis\n } = scheduler,\n // Events for this resource\n resourceEvents = eventStore.getEvents({\n includeOccurrences: scheduler.enableRecurringEvents,\n resourceRecord,\n startDate: timeAxis.startDate,\n endDate: timeAxis.endDate,\n filter: eventRecord => eventRecord.assignments.some(a => a.resource === resourceRecord && assignmentStore.includes(a))\n }),\n // Call a chainable template function on scheduler to allow features to add additional \"events\" to render\n // Currently used by ResourceTimeRanges\n allEvents = scheduler.getEventsToRender(resourceRecord, resourceEvents) || [],\n // Generate layout data\n eventsData = allEvents.reduce((result, eventRecord) => {\n // Only those in time axis (by default)\n if (includeOutside || timeAxis.isTimeSpanInAxis(eventRecord)) {\n const eventBox = scheduler.generateRenderData(eventRecord, resourceRecord, false); // Collect layouts of visible events\n\n if (eventBox) {\n result.push(eventBox);\n }\n }\n\n return result;\n }, []); // Ensure the events are rendered in natural order so that navigation works.\n\n eventsData.sort(me.eventSorter);\n let rowHeight = scheduler.rowHeight;\n const layout = scheduler.currentEventLayout,\n // Only events and tasks should be considered during layout (not resource time ranges if any)\n layoutEventData = eventsData.filter(d => d.eventRecord.isEvent); // Event data is now gathered, calculate layout properties for each event\n\n if (scheduler.eventLayout === 'stack') {\n const nbrOfBandsRequired = layout.applyLayout(layoutEventData, resourceRecord),\n heightPerEvent = scheduler.rowHeight - scheduler.resourceMargin * 2;\n rowHeight = nbrOfBandsRequired * heightPerEvent + (nbrOfBandsRequired - 1) * scheduler.barMargin + scheduler.resourceMargin * 2;\n } else if (scheduler.eventLayout === 'pack') {\n layout.applyLayout(layoutEventData, resourceRecord);\n }\n\n return {\n rowHeight,\n eventsData\n };\n }", "getEventsToRender() {}", "renderEvent(data) {\n const me = this,\n eventIdProperty = me.view.scheduledEventName + 'Id',\n eventId = data[eventIdProperty],\n layoutCache = me.cache.getTimeSpan(eventId, data.resourceId),\n renderedEvents = me.cache.getRenderedEvents(data.resourceId),\n meta = data.event.instanceMeta(me.scheduler),\n // Event might be flagged to require a new element in onEventAdd, but if it is a drag proxy it should still\n // reuse an existing element (it will be correctly linked to the drag proxy element)\n wrapperElement = me.renderTimeSpan(\n data,\n layoutCache,\n renderedEvents[data.id],\n meta.requireElement && !meta.fromDragProxy\n );\n\n if (data.assignment) {\n wrapperElement.dataset.assignmentId = data.assignment.id;\n }\n\n // Add event/task id to wrappers dataset\n // Otherwise event element won't have event id property in it's dataset and scheduler\n // won't be able to resolve event by element reference (#8943)\n if (eventId) {\n wrapperElement.dataset[eventIdProperty] = eventId;\n }\n\n renderedEvents[data.id] = data;\n\n if (meta.requireElement) {\n delete meta.requireElement;\n delete meta.fromDragProxy;\n }\n\n // This event is documented on Scheduler\n me.scheduler.trigger('renderEvent', {\n eventRecord: data.event,\n resourceRecord: data.resource,\n assignmentRecord: data.assignment,\n element: wrapperElement,\n tplData: data\n });\n }", "function getOverlappingEvents(crn) {\n\n var overlappingEvents = [];\n if (crn === undefined || parseInt(crn) == NaN) {\n var allEvents = $('#calendar').fullCalendar('clientEvents');\n } else {\n var allEvents = $('#calendar').fullCalendar('clientEvents', function (event) {\n return event._id.split(\"_\")[0] == crn;\n });\n }\n var len = allEvents.length;\n\n if (len == 0) {\n return overlappingEvents;\n }\n\n //sort by start time\n allEvents.sort(function (a, b) {\n return a.start._d.getTime() - b.start._d.getTime();\n });\n\n var prev = allEvents[0];\n var low = prev.start._d.getTime();\n var high = prev.end._d.getTime();\n for (var i = 1; i < len; i++) {\n var cur = allEvents[i];\n curStart = cur.start._d.getTime();\n curEnd = cur.end._d.getTime();\n\n //check for overlap\n if (curStart < high) {\n //overlap\n prev.color = \"\";\n cur.color = \"\";\n //push overlapping pair\n overlappingEvents.push([prev,cur]);\n }\n\n //adjust low/high for comparing against next event\n low = curStart;\n if (curEnd > high) {\n high = curEnd;\n prev = cur; //ensures overlap pair with furthest overlap\n }\n }\n\n return overlappingEvents;\n}", "function handleEventData(events) {\n let now = new Date()\n // needed to handle overlapping events\n let timeMarkerAdded = false;\n // need to sort events by start/end times instead of IDs\n events.sort(compareEvents);\n\n // Looping through each event to handle it\n events.forEach(event => {\n // Getting strings for times\n let startDate = new Date(event.start); // convert ISO 8601 -> Date object\n let finishDate = undefined;\n let dateString = convertDate(startDate);\n if (event.finish) { // finish === null for instantaneous events\n finishDate = new Date(event.finish);\n let finishString = convertDate(finishDate);\n if (dateString.slice(-2) === finishString.slice(-2)) { // hide \"am/pm\" of first time if both are identical\n dateString = dateString.slice(0, -2);\n }\n dateString += \" - \" + convertDate(finishDate);\n }\n\n // calculate event container classes\n let divClasses = 'event';\n let liveIndicator = \"\";\n if (finishDate < now) {\n divClasses += ' event-complete';\n }\n else if (startDate < now && now < finishDate) {\n divClasses += ' event-live';\n liveIndicator = '<p class=\"live\">LIVE!</p>';\n }\n\n // adding event to the page\n var eventContainer;\n // Deciding which day content box it goes inside\n switch (startDate.getDate()) {\n case 5: eventContainer = $('#mar-5-content'); break;\n case 6: eventContainer = $('#mar-6-content'); break;\n }\n // If it doesn't fall into one of those event days, log the problem and quit trying to add it\n if (!eventContainer) {\n console.log(\"Event \" + event.title + \" date \" + startDate + \" out of range.\");\n return; // skip current iteration https://stackoverflow.com/a/31399448/1431900\n }\n // Building HTML and adding it to page\n let html = `<div class=\"${divClasses}\"><p class=\"time\">${dateString}</p><p>${event.title}</p>${liveIndicator}</div>`;\n const eventDiv = eventContainer.append(html);\n });\n}", "updateEvents() {\n let me = this,\n timeAxis = me.timeAxis,\n endTime = timeAxis.getTime(timeAxis.endTime),\n startTime = timeAxis.getTime(timeAxis.startTime),\n totalTime = endTime - startTime,\n date = DateUtil.clone(me.firstColumnDate),\n eventStore = me.eventStore,\n vdom = me.vdom,\n content = me.getColumnContainer(),\n j = 0,\n len = eventStore.getCount(),\n column, duration, height, i, record, recordKey, startHours, top;\n\n // remove previous events from the vdom\n content.cn.forEach(item => item.cn = []);\n\n for (; j < 21; j++) {\n column = content.cn[j];\n\n for (i = 0; i < len; i++) {\n record = eventStore.items[i];\n\n // todo: we need a check for date overlaps => startDate < current day, endDate >= current day\n if (DateUtil.matchDate(date, record.startDate)) {\n if (DateUtil.matchDate(date, record.endDate)) {\n recordKey = record[eventStore.keyProperty];\n duration = (record.endDate - record.startDate) / 60 / 60 / 1000; // duration in hours\n height = Math.round(duration / totalTime * 100 * 1000) / 1000;\n startHours = (record.startDate.getHours() * 60 + record.startDate.getMinutes()) / 60;\n top = Math.round((startHours - startTime) / totalTime * 100 * 1000) / 1000;\n\n // console.log(j, record);\n // console.log(top);\n\n column.cn.push({\n cls : ['neo-event', 'neo-draggable'],\n flag : record[eventStore.keyProperty],\n id : me.id + '__' + recordKey,\n tabIndex: -1,\n\n cn: [{\n cls : ['neo-event-time'],\n html: me.intlFormat_time.format(record.startDate),\n id : me.id + '__time__' + recordKey\n }, {\n cls : ['neo-event-title'],\n html: record.title,\n id : me.id + '__title__' + recordKey\n }],\n\n style: {\n height: `calc(${height}% - 2px)`,\n top : `calc(${top}% + 1px)`,\n width : 'calc(100% - 1px)' // todo\n }\n });\n }\n }\n }\n\n date.setDate(date.getDate() + 1);\n }\n\n me.vdom = vdom;\n }", "updateRowTimeSpans(row, resource, forceLayout = false, fromHorizontalScroll = false) {\n const me = this,\n scheduler = me.scheduler,\n resourceId = resource.id;\n\n let renderedEvents = me.cache.getRenderedEvents(resourceId),\n resourceLayoutCache = me.cache.getRow(resourceId);\n\n // no need to relayout events if only scrolling horizontally\n if ((scheduler.forceLayout || forceLayout || !resourceLayoutCache) && !me.layoutEvents(scheduler, resource, row)) {\n return (resourceLayoutCache && resourceLayoutCache._rowHeight) || 0;\n }\n\n // might have been updated above\n resourceLayoutCache = me.cache.getRow(resourceId);\n\n if (!resourceLayoutCache) return 0;\n\n const eventsInView = resourceLayoutCache._allEvents.filter(\n (evt) =>\n // Keep events flagged by for example EventDrag\n evt.event.instanceMeta(scheduler).retainElement ||\n // Assignment might also be flagged if used\n (evt.assignment && evt.assignment.instanceMeta(scheduler).retainElement) ||\n // And keep events actually in view :)\n me.isEventInView(evt)\n );\n\n if (!renderedEvents) {\n renderedEvents = {};\n me.cache.addRenderedEvents(resourceId, renderedEvents);\n }\n\n // Add events not already in dom or refresh those that are\n for (let i = 0; i < eventsInView.length; i++) {\n const data = eventsInView[i];\n\n // There are multiple pathways that might lead to the first render of events. This is the first reliable\n // place were we can determine that something will be rendered\n scheduler._firstRenderDone && scheduler._firstRenderDone();\n\n // Do not render events whose element is retained, or if scrolling horizontally already has an element\n if (\n (!fromHorizontalScroll && !data.event.instanceMeta(scheduler).retainElement) ||\n (fromHorizontalScroll && !data.layoutCache.div)\n ) {\n const animation = scheduler.isFirstRender && data.top < scheduler.bodyHeight && scheduler.useInitialAnimation;\n\n if (animation) {\n data.wrapperCls.add('b-first-render');\n data.internalStyle = `animation-delay: ${data.row.index / 20}s;`;\n }\n\n me.renderEvent(data);\n\n data.wrapperCls['b-first-render'] = null;\n }\n }\n\n // Remove already rendered events that are now outside of view\n const renderedEventIds = Object.keys(renderedEvents);\n for (let i = 0; i < renderedEventIds.length; i++) {\n const eventId = renderedEventIds[i];\n if (!eventsInView.some((e) => e.id === eventId)) {\n me.releaseEvent(resourceId, eventId);\n }\n }\n\n return resourceLayoutCache._rowHeight;\n }", "function createDemoEvents() {\n // Date for the calendar events (dummy data)\n var date = new Date();\n var d = date.getDate(),\n m = date.getMonth(),\n y = date.getFullYear();\n\n return [\n {\n title: 'All Day Event',\n start: new Date(y, m, 1),\n backgroundColor: '#f56954', //red\n borderColor: '#f56954' //red\n },\n {\n title: 'Long Event',\n start: new Date(y, m, d - 5),\n end: new Date(y, m, d - 2),\n backgroundColor: '#f39c12', //yellow\n borderColor: '#f39c12' //yellow\n },\n {\n title: 'Meeting',\n start: new Date(y, m, d, 10, 30),\n allDay: false,\n backgroundColor: '#0073b7', //Blue\n borderColor: '#0073b7' //Blue\n },\n {\n title: 'Lunch',\n start: new Date(y, m, d, 12, 0),\n end: new Date(y, m, d, 14, 0),\n allDay: false,\n backgroundColor: '#00c0ef', //Info (aqua)\n borderColor: '#00c0ef' //Info (aqua)\n },\n {\n title: 'Birthday Party',\n start: new Date(y, m, d + 1, 19, 0),\n end: new Date(y, m, d + 1, 22, 30),\n allDay: false,\n backgroundColor: '#00a65a', //Success (green)\n borderColor: '#00a65a' //Success (green)\n },\n {\n title: 'Open Google',\n start: new Date(y, m, 28),\n end: new Date(y, m, 29),\n url: '//google.com/',\n backgroundColor: '#3c8dbc', //Primary (light-blue)\n borderColor: '#3c8dbc' //Primary (light-blue)\n }\n ];\n }", "function renderEvents(timing) {\n //Get today's date\n let dateNow = new Date();\n let eventList = events.map( (event,i) => {\n //Get the date of the event...\n let eventDate = new Date(event.date)\n //...and only render if it meets requirements\n if ( (eventDate<dateNow && timing==='past') || (eventDate>dateNow && timing==='upcoming') ) {\n return <EventWidget key={event.id} event={event} index={i}/>\n }\n }).filter(event=>event);\n\n console.log('The current eventList:',eventList,timing);\n \n\n if (eventList.length>0) {\n return eventList;\n } else {\n return <NoEventsMessage>There are no {timing} events.</NoEventsMessage>\n }\n }", "function convertEventObjectsToDiv(eventArray) {\r\n\t\tvar returnHtml = \"\";\r\n\r\n\t\t// Make a div for each event\r\n\t\tfor (var index in eventArray) {\r\n\t\t\t// Figure out what will be shown, fall back on default values if we need to\r\n\t\t\tvar backgroundImage = eventArray[index][\"picture\"] || \"./images/reindeer-logo.svg\";\r\n\t\t\tvar eventTitle = eventArray[index][\"title\"] || \"Untitled Event\";\r\n\t\t\tvar eventDate = eventArray[index][\"date\"];\r\n\t\t\tvar thisEvent = \"\";\r\n\r\n\t\t\t// Wrap it in a link tag, if we have one\r\n\t\t\tif (eventArray[index][\"link\"]) {\r\n\t\t\t\tthisEvent += '<a href=\"' + eventArray[index][\"link\"] + '\" target=\"_blank\" rel=\"noopener\">';\r\n\t\t\t}\r\n\r\n\t\t\t// Make the data into a pretty div\r\n\t\t\tthisEvent += '<div class=\"event\" style=\"background-image: url(' + backgroundImage + '), url(./images/reindeer-logo.svg)\">';\r\n\r\n\t\t\t// Add the date and title\r\n\t\t\tthisEvent += '<div class=\"event-date\">' + eventDate + '</div>' +\r\n\t\t\t\t'<div class=\"event-title\">' + eventTitle + '</div>';\r\n\r\n\t\t\t// Add the location, if we have one\r\n\t\t\tif (eventArray[index][\"location\"]) {\r\n\t\t\t\tthisEvent += '<div class=\"event-location\">' + eventArray[index][\"location\"] + '</div>';\r\n\t\t\t}\r\n\r\n\t\t\t// Close the beginning div tag\r\n\t\t\tthisEvent += '</div>';\r\n\r\n\t\t\t// Close that link tag\r\n\t\t\tif (eventArray[index][\"link\"]) {\r\n\t\t\t\tthisEvent += '</a>';\r\n\t\t\t}\r\n\r\n\t\t\t// Append it to the list of divs we have going\t\r\n\t\t\treturnHtml = returnHtml + thisEvent;\r\n\t\t}\r\n\r\n\t\t// Return all the divs\r\n\t\treturn returnHtml;\r\n\t}", "renderEvent(eventData) {\n // No point in rendering event that already has an element\n const data = eventData.renderData,\n {\n resourceRecord,\n assignmentRecord\n } = data,\n // Event element config, applied to existing element or used to create a new one below\n elementConfig = {\n className: data.wrapperCls,\n tabIndex: '0',\n children: [{\n className: data.cls,\n style: (data.internalStyle || '') + (data.style || ''),\n children: data.children,\n dataset: {\n // Each feature putting contents in the event wrap should have this to simplify syncing and\n // element retrieval after sync\n taskFeature: 'event'\n },\n syncOptions: {\n syncIdField: 'taskBarFeature'\n }\n }, ...data.wrapperChildren],\n style: {\n transform: `translate(${data.left}px, ${data.top}px)`,\n // DomHelper appends px to dimensions when using numbers\n height: data.height,\n width: data.width,\n zIndex: data.zIndex,\n style: data.wrapperStyle || ''\n },\n dataset: {\n resourceId: resourceRecord.id,\n eventId: data.eventId,\n // Not using eventRecord.id to distinguish between Event and ResourceTimeRange\n // Sync using assignment id for events and event id for ResourceTimeRanges\n syncId: assignmentRecord ? assignmentRecord.id : data.eventId\n },\n // Will not be part of DOM, but attached to the element\n elementData: eventData,\n // Dragging etc. flags element as retained, to not reuse/release it during that operation. Events\n // always use assignments, but ResourceTimeRanges does not\n retainElement: (assignmentRecord || data.eventRecord).instanceMeta(this.scheduler).retainElement,\n // Options for this level of sync, lower levels can have their own\n syncOptions: {\n syncIdField: 'taskFeature',\n // Remove instead of release when a feature is disabled\n releaseThreshold: 0\n }\n }; // Do not want to spam dataset with empty prop when not using assignments (ResourceTimeRanges)\n\n if (assignmentRecord) {\n elementConfig.dataset.assignmentId = assignmentRecord.id;\n }\n\n this.scheduler.trigger('beforeRenderEvent', {\n renderData: data,\n domConfig: elementConfig\n }); // Allows access to the used config later, for example to retrieve element\n\n eventData.elementConfig = elementConfig;\n return elementConfig;\n }", "function createDemoEvents() {\n // Date for the calendar events (dummy data)\n var date = new Date();\n var d = date.getDate(),\n m = date.getMonth(),\n y = date.getFullYear();\n\n return [\n {\n title: 'All Day Event',\n start: new Date(y, m, 1),\n backgroundColor: '#f56954', //red \n borderColor: '#f56954' //red\n },\n {\n title: 'Long Event',\n start: new Date(y, m, d - 5),\n end: new Date(y, m, d - 2),\n backgroundColor: '#f39c12', //yellow\n borderColor: '#f39c12' //yellow\n },\n {\n title: 'Meeting',\n start: new Date(y, m, d, 10, 30),\n allDay: false,\n backgroundColor: '#0073b7', //Blue\n borderColor: '#0073b7' //Blue\n },\n {\n title: 'Lunch',\n start: new Date(y, m, d, 12, 0),\n end: new Date(y, m, d, 14, 0),\n allDay: false,\n backgroundColor: '#00c0ef', //Info (aqua)\n borderColor: '#00c0ef' //Info (aqua)\n },\n {\n title: 'Birthday Party',\n start: new Date(y, m, d + 1, 19, 0),\n end: new Date(y, m, d + 1, 22, 30),\n allDay: false,\n backgroundColor: '#00a65a', //Success (green)\n borderColor: '#00a65a' //Success (green)\n },\n {\n title: 'Open Google',\n start: new Date(y, m, 28),\n end: new Date(y, m, 29),\n url: '//google.com/',\n backgroundColor: '#3c8dbc', //Primary (light-blue)\n borderColor: '#3c8dbc' //Primary (light-blue)\n }\n ];\n }", "function EventRenderWrapper() {\n /**\n * Related elements\n */\n this.Elements = [];\n }", "scrollUnrenderedEventIntoView(resourceRec, eventRec, options = defaultScrollOptions$3) {\n if (options.edgeOffset == null) {\n options.edgeOffset = 20;\n }\n\n const me = this,\n scroller = me.timeAxisSubGrid.scrollable,\n box = me.getResourceEventBox(eventRec, resourceRec), // TODO: have all \"box\" type objects use Rectangle\n scrollerViewport = scroller.viewport,\n targetRect = new Rectangle(box.start, box.top, box.end - box.start, box.bottom - box.top).translate(\n scrollerViewport.x - scroller.x,\n scrollerViewport.y - scroller.y\n ),\n result = scroller.scrollIntoView(targetRect, Object.assign({}, options, { highlight: false }));\n\n if (options.highlight || options.focus) {\n const detatcher = me.on({\n eventrepaint({ scheduler, eventRecord, resourceRecord, element }) {\n if (eventRecord === eventRec) {\n detatcher();\n result.then(() => {\n options.highlight && DomHelper.highlight(element);\n options.focus && element.focus();\n });\n }\n }\n });\n }\n\n return result;\n }", "function renderNewEventsView(newArray) {\n let programDiv = document.getElementById(\"programme\");\n programDiv.innerHTML = \"\";\n if (newArray.length === 0) {\n let errorDiv = document.createElement(\"div\");\n errorDiv.classList.add(\"error\");\n errorDiv.innerHTML = \"Oops! Nothing to show\";\n programDiv.appendChild(errorDiv);\n }\n\n newArray.forEach(event => {\n\n let sectionElement = document.createElement(\"section\");\n sectionElement.classList.add(\"event-entry\");\n sectionElement.setAttribute(\"id\", \"event-\" + event.id);\n let leftColumn = document.createElement(\"div\");\n leftColumn.classList.add(\"left-column\");\n let rightColumn = document.createElement(\"div\");\n rightColumn.classList.add(\"right-column\");\n sectionElement.appendChild(leftColumn);\n sectionElement.appendChild(rightColumn);\n programDiv.appendChild(sectionElement);\n\n //start of left column\n let aElement = document.createElement(\"a\");\n aElement.setAttribute(\"href\", event.link);\n aElement.setAttribute(\"alt\", \"read more about \" + event.title.rendered);\n\n if (event.featured_media != 0) {\n let imgElement = document.createElement(\"img\");\n imgElement.classList.add(\n \"attachment-medium\",\n \"size-medium\",\n \"wp-post-image\"\n );\n if (event._embedded == undefined || event._embedded[\"wp:featuredmedia\"] == undefined){\n imgElement.setAttribute(\n \"src\", \" \");\n }\n else if (event._embedded[\"wp:featuredmedia\"][0].media_details.sizes.medium != undefined) {\n imgElement.setAttribute(\n \"src\",\n event._embedded[\"wp:featuredmedia\"][0].media_details.sizes.medium.source_url\n );\n } else {\n imgElement.setAttribute(\n \"src\",\n event._embedded[\"wp:featuredmedia\"][0].source_url\n );\n }\n aElement.appendChild(imgElement);\n leftColumn.appendChild(aElement);\n }\n\n let links = document.createElement(\"div\"),\n linksArray = [];\n links.classList.add(\"links\");\n\n //website\n if (event.extra_meta._event_cpt_organizer_website) {\n linksArray['website'] = event.extra_meta._event_cpt_organizer_website;\n }\n //facebook\n if (event.extra_meta._event_cpt_organizer_facebook) {\n linksArray['facebook'] = event.extra_meta._event_cpt_organizer_facebook;\n }\n //twitter\n if (event.extra_meta._event_cpt_organizer_twitter) {\n linksArray['twitter'] = event.extra_meta._event_cpt_organizer_twitter;\n }\n //instagram\n if (event.extra_meta._event_cpt_organizer_instagram) {\n linksArray['instagram'] = event.extra_meta._event_cpt_organizer_instagram;\n }\n\n Object.keys(linksArray).forEach(linkTitle => {\n //console.log(linkTitle+' with url: '+linksArray[linkTitle]);\n let aEl = document.createElement(\"a\"),\n spanEl = document.createElement(\"span\"),\n imgEl = document.createElement(\"img\");\n\n aEl.setAttribute(\n \"href\",\n linksArray[linkTitle]\n );\n aEl.setAttribute(\"target\", \"_blank\");\n aEl.setAttribute(\"rel\", \"noopener\");\n\n spanEl.classList.add(\"screen-reader-text\");\n spanEl.innerHTML = linkTitle;\n\n aEl.appendChild(spanEl);\n //New SVG icon format <img src=\"your.svg\" onerror=\"this.src='your.png'\">\n imgEl.setAttribute('width', 22);\n imgEl.setAttribute('height', 22);\n imgEl.setAttribute('style', 'max-height:22px; margin-top:6px;');\n imgEl.classList.add('icon');\n imgEl.setAttribute('src', currentHost + '/wp-content/plugins/events_plugin/src/assets/img/' + linkTitle + '-icon.svg');\n imgEl.setAttribute('onerror', 'this.src='+ currentHost + '/wp-content/plugins/events_plugin/src/assets/img/' + linkTitle + '-icon.png');\n aEl.appendChild(imgEl);\n\n links.appendChild(aEl);\n\n });\n\n leftColumn.appendChild(links);\n\n //start of right column\n //header\n let headerEl = document.createElement('header'),\n headerTwo = document.createElement(\"h2\"),\n divEl = document.createElement('div');\n\n headerEl.classList.add('event-header');\n headerTwo.classList.add(\"event-title\");\n\n let aRightElement = document.createElement(\"a\");\n aRightElement.setAttribute(\"href\", event.link);\n aRightElement.setAttribute(\n \"alt\",\n \"read more about \" + event.title.rendered\n );\n aRightElement.innerHTML = event.title.rendered;\n\n headerTwo.appendChild(aRightElement);\n headerEl.appendChild(headerTwo);\n\n if (event.extra_meta._event_cpt_main_organizer) {\n let mainOrganiser = event.extra_meta._event_cpt_main_organizer[0];\n divEl.classList.add('event-by');\n divEl.innerHTML = 'by ' + mainOrganiser;\n headerEl.appendChild(divEl);\n }\n\n rightColumn.appendChild(headerEl);\n\n //event_types\n let typeDivElement = document.createElement(\"div\");\n typeDivElement.classList.add(\"entry-meta\");\n if (\n event._embedded != undefined &&\n event._embedded[\"wp:term\"] != undefined\n ) {\n let typesArray = event._embedded[\"wp:term\"][0],\n typesList = '';\n typesArray.forEach(function(t){\n typesList += t.name + ' | ';\n })\n typesList = typesList.substring(0, typesList.length - 3);\n typeDivElement.innerHTML = typesList;\n } else {\n typeDivElement.innerHTML = \"\";\n }\n\n // headerTwo.appendChild(titleDivElement);\n rightColumn.appendChild(typeDivElement);\n\n let eventDate = document.createElement(\"p\");\n eventDate.classList.add(\"date\");\n // eventDate.innerHTML = date;\n if (\n event.extra_meta._event_cpt_date_event === undefined ||\n event.extra_meta._event_cpt_startTime_event === undefined ||\n event.extra_meta._event_cpt_endTime_event === undefined\n ) {\n var span = document.createElement(\"span\");\n span.setAttribute(\"style\", \"color: #f00\");\n span.innerHTML = \"Date and/or time not set yet\";\n eventDate.appendChild(span);\n } else {\n eventDate.innerHTML =\n getLongDate(event.extra_meta._event_cpt_date_event) +\n \" \" +\n event.extra_meta._event_cpt_startTime_event +\n \" - \" +\n event.extra_meta._event_cpt_endTime_event;\n }\n rightColumn.appendChild(eventDate);\n\n let eventLocation = document.createElement(\"p\"),\n locationTxt = '';\n\n eventLocation.classList.add(\"location\");\n\n if (event.extra_meta._event_cpt_venue) {\n locationTxt += event.extra_meta._event_cpt_venue;\n }\n\n if (event.extra_meta._event_cpt_area) {\n locationTxt += \", \" + event.extra_meta._event_cpt_area;\n }\n\n eventLocation.innerHTML = locationTxt;\n\n rightColumn.appendChild(eventLocation);\n\n let eventPrice = document.createElement(\"p\");\n eventPrice.classList.add(\"Price\");\n if ((event.extra_meta._event_cpt_price_event == undefined) || event.extra_meta._event_cpt_price_event == '0.00') {\n eventPrice.innerHTML = \"Free \";\n } else if (event.extra_meta._event_cpt_price_event == '-1') {\n eventPrice.innerHTML = \"Entry by donation\";\n } else {\n eventPrice.innerHTML = \"£\" + parseFloat(event.extra_meta._event_cpt_price_event).toFixed(2);\n }\n rightColumn.appendChild(eventPrice);\n });\n}", "function Events_Prepare( day ) {\n\tvar DEBUG_Events_Prepare = false;\n\tif ( DEBUG_Events_Prepare ) { console.warn('Events_Prepare[day='+day+']'); }\n\tvar currentDay,\n\t currentEvent,\n\t eventKey,\n\t\t\t//heightMultiplier = ScheduleIncrementHeight / ScheduleTimeIncrement,\n\t left,\n\t overlappingEvents,\n\t width;\n\tEVENTS_READY = {};\n\tEvents_Sort(EVENTS_TO_DISPLAY);\n\tif ( DEBUG_Events_Prepare ) { console.log('EVENTS_TO_DISPLAY='+JSON.stringify(EVENTS_TO_DISPLAY)); }\n\tfor ( var i=0, l=EVENTS_TO_DISPLAY.length; i<l; i+=1 ) { // Loop thru EVENTS_TO_DISPLAY.\n\t\tif ( DEBUG_Events_Prepare ) { console.log('EVENTS_TO_DISPLAY['+i+']='+JSON.stringify(EVENTS_TO_DISPLAY[i])); }\n\t\tcurrentEvent = EVENTS_TO_DISPLAY[i];\n\t\teventKey = EVENTS_TO_DISPLAY[i].scmId;//currentEvent.begin+'*'+currentEvent.end+'*'+currentEvent.position;\n\t\toverlappingEvents = Events_Prepare_Check(EVENTS_OVERLAPPING[eventKey], eventKey, day);\n\t\twidth = overlappingEvents.width;\n\t\tleft = overlappingEvents.left;\n\t\tcurrentEvent.top = currentEvent.begin;// * heightMultiplier;\n\t\tcurrentEvent.width = width;\n\t\tcurrentEvent.left = left;\n\t\tcurrentEvent.height = ( currentEvent.end - currentEvent.begin );// * heightMultiplier;\n\t\tcurrentEvent.contentWidth = currentEvent.width - 4;\n\t\t\n\t\tEVENTS_READY[eventKey] = {\n\t\t\tleft: left,\n\t\t\twidth : width\n\t\t};\n\t\tif ( DEBUG_Events_Prepare ) { console.log('EVENTS_READY['+eventKey+']='+JSON.stringify(EVENTS_READY[eventKey])); }\n\t} // Loop thru EVENTS_TO_DISPLAY.\n\tif ( DEBUG_Events_Prepare ) { console.log('EVENTS_TO_DISPLAY='+JSON.stringify(EVENTS_TO_DISPLAY)); }\n\tif ( DEBUG_Events_Prepare ) { console.log('EVENTS_READY='+JSON.stringify(EVENTS_READY)); }\n} // END Events_Prepare.", "renderEventInput() {\n eventContainer.innerHTML = \"\";\n eventContainer.innerHTML = eventHtml.makeNewEventHtml();\n }", "function getRowContentElements() {\n\t\tvar i;\n\t\tvar rowCnt = getRowCnt();\n\t\tvar rowDivs = [];\n\t\tfor (i=0; i<rowCnt; i++) {\n\t\t\trowDivs[i] = allDayRow(i)\n\t\t\t\t.find('div.fc-day-content > div');\n\t\t}\n\t\treturn rowDivs;\n\t}", "function getRowContentElements() {\n\t\tvar i;\n\t\tvar rowCnt = getRowCnt();\n\t\tvar rowDivs = [];\n\t\tfor (i=0; i<rowCnt; i++) {\n\t\t\trowDivs[i] = allDayRow(i)\n\t\t\t\t.find('div.fc-day-content > div');\n\t\t}\n\t\treturn rowDivs;\n\t}", "function getRowContentElements() {\n\t\tvar i;\n\t\tvar rowCnt = getRowCnt();\n\t\tvar rowDivs = [];\n\t\tfor (i=0; i<rowCnt; i++) {\n\t\t\trowDivs[i] = allDayRow(i)\n\t\t\t\t.find('div.fc-day-content > div');\n\t\t}\n\t\treturn rowDivs;\n\t}", "function getRowContentElements() {\n\t\tvar i;\n\t\tvar rowCnt = getRowCnt();\n\t\tvar rowDivs = [];\n\t\tfor (i=0; i<rowCnt; i++) {\n\t\t\trowDivs[i] = allDayRow(i)\n\t\t\t\t.find('div.fc-day-content > div');\n\t\t}\n\t\treturn rowDivs;\n\t}", "function getRowContentElements() {\n\t\tvar i;\n\t\tvar rowCnt = getRowCnt();\n\t\tvar rowDivs = [];\n\t\tfor (i=0; i<rowCnt; i++) {\n\t\t\trowDivs[i] = allDayRow(i)\n\t\t\t\t.find('div.fc-day-content > div');\n\t\t}\n\t\treturn rowDivs;\n\t}", "function renderSlotSegs(segs, modifiedEventId) {\n\t\n\t\tvar i, segCnt=segs.length, seg,\n\t\t\tevent,\n\t\t\ttop,\n\t\t\tbottom,\n\t\t\tcolumnLeft,\n\t\t\tcolumnRight,\n\t\t\tcolumnWidth,\n\t\t\twidth,\n\t\t\tleft,\n\t\t\tright,\n\t\t\thtml = '',\n\t\t\teventElements,\n\t\t\teventElement,\n\t\t\ttriggerRes,\n\t\t\ttitleElement,\n\t\t\theight,\n\t\t\tslotSegmentContainer = getSlotSegmentContainer(),\n\t\t\tisRTL = opt('isRTL');\n\t\t\t\n\t\t// calculate position/dimensions, create html\n\t\tfor (i=0; i<segCnt; i++) {\n\t\t\tseg = segs[i];\n\t\t\tevent = seg.event;\n\t\t\ttop = computeDateTop(seg.start, seg.start);\n\t\t\tbottom = computeDateTop(seg.end, seg.start);\n\t\t\tcolumnLeft = colContentLeft(seg.col);\n\t\t\tcolumnRight = colContentRight(seg.col);\n\t\t\tcolumnWidth = columnRight - columnLeft;\n\n\t\t\t// shave off space on right near scrollbars (2.5%)\n\t\t\t// TODO: move this to CSS somehow\n\t\t\tcolumnRight -= columnWidth * .025;\n\t\t\tcolumnWidth = columnRight - columnLeft;\n\n\t\t\twidth = columnWidth * (seg.forwardCoord - seg.backwardCoord);\n\n\t\t\tif (opt('slotEventOverlap')) {\n\t\t\t\t// double the width while making sure resize handle is visible\n\t\t\t\t// (assumed to be 20px wide)\n\t\t\t\twidth = Math.max(\n\t\t\t\t\t(width - (20/2)) * 2,\n\t\t\t\t\twidth // narrow columns will want to make the segment smaller than\n\t\t\t\t\t\t// the natural width. don't allow it\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tif (isRTL) {\n\t\t\t\tright = columnRight - seg.backwardCoord * columnWidth;\n\t\t\t\tleft = right - width;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tleft = columnLeft + seg.backwardCoord * columnWidth;\n\t\t\t\tright = left + width;\n\t\t\t}\n\n\t\t\t// make sure horizontal coordinates are in bounds\n\t\t\tleft = Math.max(left, columnLeft);\n\t\t\tright = Math.min(right, columnRight);\n\t\t\twidth = right - left;\n\n\t\t\tseg.top = top;\n\t\t\tseg.left = left;\n\t\t\tseg.outerWidth = width;\n\t\t\tseg.outerHeight = bottom - top;\n\t\t\thtml += slotSegHtml(event, seg);\n\t\t}\n\n\t\tslotSegmentContainer[0].innerHTML = html; // faster than html()\n\t\teventElements = slotSegmentContainer.children();\n\t\t\n\t\t// retrieve elements, run through eventRender callback, bind event handlers\n\t\tfor (i=0; i<segCnt; i++) {\n\t\t\tseg = segs[i];\n\t\t\tevent = seg.event;\n\t\t\teventElement = $(eventElements[i]); // faster than eq()\n\t\t\ttriggerRes = trigger('eventRender', event, event, eventElement);\n\t\t\tif (triggerRes === false) {\n\t\t\t\teventElement.remove();\n\t\t\t}else{\n\t\t\t\tif (triggerRes && triggerRes !== true) {\n\t\t\t\t\teventElement.remove();\n\t\t\t\t\teventElement = $(triggerRes)\n\t\t\t\t\t\t.css({\n\t\t\t\t\t\t\tposition: 'absolute',\n\t\t\t\t\t\t\ttop: seg.top,\n\t\t\t\t\t\t\tleft: seg.left\n\t\t\t\t\t\t})\n\t\t\t\t\t\t.appendTo(slotSegmentContainer);\n\t\t\t\t}\n\t\t\t\tseg.element = eventElement;\n\t\t\t\tif (event._id === modifiedEventId) {\n\t\t\t\t\tbindSlotSeg(event, eventElement, seg);\n\t\t\t\t}else{\n\t\t\t\t\teventElement[0]._fci = i; // for lazySegBind\n\t\t\t\t}\n\t\t\t\treportEventElement(event, eventElement);\n\t\t\t}\n\t\t}\n\t\t\n\t\tlazySegBind(slotSegmentContainer, segs, bindSlotSeg);\n\t\t\n\t\t// record event sides and title positions\n\t\tfor (i=0; i<segCnt; i++) {\n\t\t\tseg = segs[i];\n\t\t\tif ((eventElement = seg.element)) {\n\t\t\t\tseg.vsides = vsides(eventElement, true);\n\t\t\t\tseg.hsides = hsides(eventElement, true);\n\t\t\t\ttitleElement = eventElement.find('.fc-event-title');\n\t\t\t\tif (titleElement.length) {\n\t\t\t\t\tseg.contentTop = titleElement[0].offsetTop;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t// set all positions/dimensions at once\n\t\tfor (i=0; i<segCnt; i++) {\n\t\t\tseg = segs[i];\n\t\t\tif ((eventElement = seg.element)) {\n\t\t\t\teventElement[0].style.width = Math.max(0, seg.outerWidth - seg.hsides) + 'px';\n\t\t\t\theight = Math.max(0, seg.outerHeight - seg.vsides);\n\t\t\t\teventElement[0].style.height = height + 'px';\n\t\t\t\tevent = seg.event;\n\t\t\t\tif (seg.contentTop !== undefined && height - seg.contentTop < 10) {\n\t\t\t\t\t// not enough room for title, put it in the time (TODO: maybe make both display:inline instead)\n\t\t\t\t\teventElement.find('div.fc-event-time')\n\t\t\t\t\t\t.text(\n\t\t\t\t\t\t\tformatDate(event.start, opt('timeFormat')) + ' - ' + event.title\n\t\t\t\t\t\t);\n\t\t\t\t\teventElement.find('div.fc-event-title')\n\t\t\t\t\t\t.remove();\n\t\t\t\t}\n\t\t\t\ttrigger('eventAfterRender', event, event, eventElement);\n\t\t\t}\n\t\t}\n\t\t\t\t\t\n\t}", "function renderSlotSegs(segs, modifiedEventId) {\n\t\n\t\tvar i, segCnt=segs.length, seg,\n\t\t\tevent,\n\t\t\ttop,\n\t\t\tbottom,\n\t\t\tcolumnLeft,\n\t\t\tcolumnRight,\n\t\t\tcolumnWidth,\n\t\t\twidth,\n\t\t\tleft,\n\t\t\tright,\n\t\t\thtml = '',\n\t\t\teventElements,\n\t\t\teventElement,\n\t\t\ttriggerRes,\n\t\t\ttitleElement,\n\t\t\theight,\n\t\t\tslotSegmentContainer = getSlotSegmentContainer(),\n\t\t\tisRTL = opt('isRTL');\n\t\t\t\n\t\t// calculate position/dimensions, create html\n\t\tfor (i=0; i<segCnt; i++) {\n\t\t\tseg = segs[i];\n\t\t\tevent = seg.event;\n\t\t\ttop = computeDateTop(seg.start, seg.start);\n\t\t\tbottom = computeDateTop(seg.end, seg.start);\n\t\t\tcolumnLeft = colContentLeft(seg.col);\n\t\t\tcolumnRight = colContentRight(seg.col);\n\t\t\tcolumnWidth = columnRight - columnLeft;\n\n\t\t\t// shave off space on right near scrollbars (2.5%)\n\t\t\t// TODO: move this to CSS somehow\n\t\t\tcolumnRight -= columnWidth * .025;\n\t\t\tcolumnWidth = columnRight - columnLeft;\n\n\t\t\twidth = columnWidth * (seg.forwardCoord - seg.backwardCoord);\n\n\t\t\tif (opt('slotEventOverlap')) {\n\t\t\t\t// double the width while making sure resize handle is visible\n\t\t\t\t// (assumed to be 20px wide)\n\t\t\t\twidth = Math.max(\n\t\t\t\t\t(width - (20/2)) * 2,\n\t\t\t\t\twidth // narrow columns will want to make the segment smaller than\n\t\t\t\t\t\t// the natural width. don't allow it\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tif (isRTL) {\n\t\t\t\tright = columnRight - seg.backwardCoord * columnWidth;\n\t\t\t\tleft = right - width;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tleft = columnLeft + seg.backwardCoord * columnWidth;\n\t\t\t\tright = left + width;\n\t\t\t}\n\n\t\t\t// make sure horizontal coordinates are in bounds\n\t\t\tleft = Math.max(left, columnLeft);\n\t\t\tright = Math.min(right, columnRight);\n\t\t\twidth = right - left;\n\n\t\t\tseg.top = top;\n\t\t\tseg.left = left;\n\t\t\tseg.outerWidth = width;\n\t\t\tseg.outerHeight = bottom - top;\n\t\t\thtml += slotSegHtml(event, seg);\n\t\t}\n\n\t\tslotSegmentContainer[0].innerHTML = html; // faster than html()\n\t\teventElements = slotSegmentContainer.children();\n\t\t\n\t\t// retrieve elements, run through eventRender callback, bind event handlers\n\t\tfor (i=0; i<segCnt; i++) {\n\t\t\tseg = segs[i];\n\t\t\tevent = seg.event;\n\t\t\teventElement = $(eventElements[i]); // faster than eq()\n\t\t\ttriggerRes = trigger('eventRender', event, event, eventElement);\n\t\t\tif (triggerRes === false) {\n\t\t\t\teventElement.remove();\n\t\t\t}else{\n\t\t\t\tif (triggerRes && triggerRes !== true) {\n\t\t\t\t\teventElement.remove();\n\t\t\t\t\teventElement = $(triggerRes)\n\t\t\t\t\t\t.css({\n\t\t\t\t\t\t\tposition: 'absolute',\n\t\t\t\t\t\t\ttop: seg.top,\n\t\t\t\t\t\t\tleft: seg.left\n\t\t\t\t\t\t})\n\t\t\t\t\t\t.appendTo(slotSegmentContainer);\n\t\t\t\t}\n\t\t\t\tseg.element = eventElement;\n\t\t\t\tif (event._id === modifiedEventId) {\n\t\t\t\t\tbindSlotSeg(event, eventElement, seg);\n\t\t\t\t}else{\n\t\t\t\t\teventElement[0]._fci = i; // for lazySegBind\n\t\t\t\t}\n\t\t\t\treportEventElement(event, eventElement);\n\t\t\t}\n\t\t}\n\t\t\n\t\tlazySegBind(slotSegmentContainer, segs, bindSlotSeg);\n\t\t\n\t\t// record event sides and title positions\n\t\tfor (i=0; i<segCnt; i++) {\n\t\t\tseg = segs[i];\n\t\t\tif ((eventElement = seg.element)) {\n\t\t\t\tseg.vsides = vsides(eventElement, true);\n\t\t\t\tseg.hsides = hsides(eventElement, true);\n\t\t\t\ttitleElement = eventElement.find('.fc-event-title');\n\t\t\t\tif (titleElement.length) {\n\t\t\t\t\tseg.contentTop = titleElement[0].offsetTop;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t// set all positions/dimensions at once\n\t\tfor (i=0; i<segCnt; i++) {\n\t\t\tseg = segs[i];\n\t\t\tif ((eventElement = seg.element)) {\n\t\t\t\teventElement[0].style.width = Math.max(0, seg.outerWidth - seg.hsides) + 'px';\n\t\t\t\theight = Math.max(0, seg.outerHeight - seg.vsides);\n\t\t\t\teventElement[0].style.height = height + 'px';\n\t\t\t\tevent = seg.event;\n\t\t\t\tif (seg.contentTop !== undefined && height - seg.contentTop < 10) {\n\t\t\t\t\t// not enough room for title, put it in the time (TODO: maybe make both display:inline instead)\n\t\t\t\t\teventElement.find('div.fc-event-time')\n\t\t\t\t\t\t.text(\n\t\t\t\t\t\t\tformatDate(event.start, opt('timeFormat')) + ' - ' + event.title\n\t\t\t\t\t\t);\n\t\t\t\t\teventElement.find('div.fc-event-title')\n\t\t\t\t\t\t.remove();\n\t\t\t\t}\n\t\t\t\ttrigger('eventAfterRender', event, event, eventElement);\n\t\t\t}\n\t\t}\n\t\t\t\t\t\n\t}", "function renderSlotSegs(segs, modifiedEventId) {\n\t\n\t\tvar i, segCnt=segs.length, seg,\n\t\t\tevent,\n\t\t\ttop,\n\t\t\tbottom,\n\t\t\tcolumnLeft,\n\t\t\tcolumnRight,\n\t\t\tcolumnWidth,\n\t\t\twidth,\n\t\t\tleft,\n\t\t\tright,\n\t\t\thtml = '',\n\t\t\teventElements,\n\t\t\teventElement,\n\t\t\ttriggerRes,\n\t\t\ttitleElement,\n\t\t\theight,\n\t\t\tslotSegmentContainer = getSlotSegmentContainer(),\n\t\t\tisRTL = opt('isRTL');\n\t\t\t\n\t\t// calculate position/dimensions, create html\n\t\tfor (i=0; i<segCnt; i++) {\n\t\t\tseg = segs[i];\n\t\t\tevent = seg.event;\n\t\t\ttop = computeDateTop(seg.start, seg.start);\n\t\t\tbottom = computeDateTop(seg.end, seg.start);\n\t\t\tcolumnLeft = colContentLeft(seg.col);\n\t\t\tcolumnRight = colContentRight(seg.col);\n\t\t\tcolumnWidth = columnRight - columnLeft;\n\n\t\t\t// shave off space on right near scrollbars (2.5%)\n\t\t\t// TODO: move this to CSS somehow\n\t\t\tcolumnRight -= columnWidth * .025;\n\t\t\tcolumnWidth = columnRight - columnLeft;\n\n\t\t\twidth = columnWidth * (seg.forwardCoord - seg.backwardCoord);\n\n\t\t\tif (opt('slotEventOverlap')) {\n\t\t\t\t// double the width while making sure resize handle is visible\n\t\t\t\t// (assumed to be 20px wide)\n\t\t\t\twidth = Math.max(\n\t\t\t\t\t(width - (20/2)) * 2,\n\t\t\t\t\twidth // narrow columns will want to make the segment smaller than\n\t\t\t\t\t\t// the natural width. don't allow it\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tif (isRTL) {\n\t\t\t\tright = columnRight - seg.backwardCoord * columnWidth;\n\t\t\t\tleft = right - width;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tleft = columnLeft + seg.backwardCoord * columnWidth;\n\t\t\t\tright = left + width;\n\t\t\t}\n\n\t\t\t// make sure horizontal coordinates are in bounds\n\t\t\tleft = Math.max(left, columnLeft);\n\t\t\tright = Math.min(right, columnRight);\n\t\t\twidth = right - left;\n\n\t\t\tseg.top = top;\n\t\t\tseg.left = left;\n\t\t\tseg.outerWidth = width;\n\t\t\tseg.outerHeight = bottom - top;\n\t\t\thtml += slotSegHtml(event, seg);\n\t\t}\n\n\t\tslotSegmentContainer[0].innerHTML = html; // faster than html()\n\t\teventElements = slotSegmentContainer.children();\n\t\t\n\t\t// retrieve elements, run through eventRender callback, bind event handlers\n\t\tfor (i=0; i<segCnt; i++) {\n\t\t\tseg = segs[i];\n\t\t\tevent = seg.event;\n\t\t\teventElement = $(eventElements[i]); // faster than eq()\n\t\t\ttriggerRes = trigger('eventRender', event, event, eventElement);\n\t\t\tif (triggerRes === false) {\n\t\t\t\teventElement.remove();\n\t\t\t}else{\n\t\t\t\tif (triggerRes && triggerRes !== true) {\n\t\t\t\t\teventElement.remove();\n\t\t\t\t\teventElement = $(triggerRes)\n\t\t\t\t\t\t.css({\n\t\t\t\t\t\t\tposition: 'absolute',\n\t\t\t\t\t\t\ttop: seg.top,\n\t\t\t\t\t\t\tleft: seg.left\n\t\t\t\t\t\t})\n\t\t\t\t\t\t.appendTo(slotSegmentContainer);\n\t\t\t\t}\n\t\t\t\tseg.element = eventElement;\n\t\t\t\tif (event._id === modifiedEventId) {\n\t\t\t\t\tbindSlotSeg(event, eventElement, seg);\n\t\t\t\t}else{\n\t\t\t\t\teventElement[0]._fci = i; // for lazySegBind\n\t\t\t\t}\n\t\t\t\treportEventElement(event, eventElement);\n\t\t\t}\n\t\t}\n\t\t\n\t\tlazySegBind(slotSegmentContainer, segs, bindSlotSeg);\n\t\t\n\t\t// record event sides and title positions\n\t\tfor (i=0; i<segCnt; i++) {\n\t\t\tseg = segs[i];\n\t\t\tif ((eventElement = seg.element)) {\n\t\t\t\tseg.vsides = vsides(eventElement, true);\n\t\t\t\tseg.hsides = hsides(eventElement, true);\n\t\t\t\ttitleElement = eventElement.find('.fc-event-title');\n\t\t\t\tif (titleElement.length) {\n\t\t\t\t\tseg.contentTop = titleElement[0].offsetTop;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t// set all positions/dimensions at once\n\t\tfor (i=0; i<segCnt; i++) {\n\t\t\tseg = segs[i];\n\t\t\tif ((eventElement = seg.element)) {\n\t\t\t\teventElement[0].style.width = Math.max(0, seg.outerWidth - seg.hsides) + 'px';\n\t\t\t\theight = Math.max(0, seg.outerHeight - seg.vsides);\n\t\t\t\teventElement[0].style.height = height + 'px';\n\t\t\t\tevent = seg.event;\n\t\t\t\tif (seg.contentTop !== undefined && height - seg.contentTop < 10) {\n\t\t\t\t\t// not enough room for title, put it in the time (TODO: maybe make both display:inline instead)\n\t\t\t\t\teventElement.find('div.fc-event-time')\n\t\t\t\t\t\t.text(\n\t\t\t\t\t\t\tformatDate(event.start, opt('timeFormat')) + ' - ' + event.title\n\t\t\t\t\t\t);\n\t\t\t\t\teventElement.find('div.fc-event-title')\n\t\t\t\t\t\t.remove();\n\t\t\t\t}\n\t\t\t\ttrigger('eventAfterRender', event, event, eventElement);\n\t\t\t}\n\t\t}\n\t\t\t\t\t\n\t}", "function fillEvents(user_id){ \n \n clearCalendar();\n\n events[user_id].map(function(event){\t\n obj = `<div class=\"row eve ui-widget-content draggable\">\n \t\t\t\t<div class=\"event card\">\n \t <h6>`+event.title+`</h6>\n \t </div>\n \t </div>`;\n $(\"#\"+event.day).append(obj); \n });\n}", "function processEvent(remainingEvents) {\n var temp = []; //stores the list of items which doesnt overlap with already formed column items\n while (true) {\n //Loop current event items\n for (var i in remainingEvents) {\n var isProcessed = processRow(remainingEvents[i], row); //returns boolean if all event objects are placed in column array\n //track event item which does not overlap with exisisting row column arrays\n if (!isProcessed) {\n temp.push(remainingEvents[i]);\n }\n };\n /* RemainingEvents will now hold temp(non overlapping arrays) and the loop inspect\n continued till temp becomes empty */\n if (remainingEvents.length !== temp.length) {\n remainingEvents = temp.slice(0);\n temp = [];\n } else {\n break; //If no element exists in remainingEvents array\n }\n }\n return temp;\n }", "function showEventsInDOM(data){\n var allEvents = data.events;\n console.log(allEvents);\n var eventListing = [];\n const monthNames = [\"January\", \"February\", \"March\", \"April\", \"May\", \"June\",\"July\", \"August\", \"September\", \"October\", \"November\", \"December\"];\n for(let i=0; i < allEvents.length; i++)\n {\n var eventName=allEvents[i].name;\n var dateObject = new Date(allEvents[i].start_time);\n var eventMonth = monthNames[dateObject.getUTCMonth()];\n var eventLocation = allEvents[i].location;\n var eventDate = eventMonth + \" \" + dateObject.getUTCDay() + \", \" + dateObject.getUTCFullYear();\n //The first event listing will always have a special CSS class to is to account for the search bar\n if (i==0)\n {\n var HTMLWrite = '<div class=\"columns listingadjust\">\\\n <div class=\"column is-1\"></div>\\\n <div class=\"column is-2\">\\\n <h1 class=\"title is-6 has-text-centered\">'+eventMonth+'</h1>\\\n <h2 class=\"subtitle has-text-centered\"><b class=\"date\">'+eventDate+'</b></h2>\\\n </div>\\\n <div class=\"vertical\"></div>\\\n <div class=\"column is-6\">\\\n <h1 class=\"title is-6\">'+eventName+'</h1>\\\n <h2 class=\"subtitle is-7\">'+eventLocation+'</h2>\\\n <div class=\"tags\">\\\n <span class=\"tag is-link is-light\"><span class=\"icon\"><i class=\"fas fa-car\"></i></span>Drivers required</span>\\\n <span class=\"tag is-link is-light\"><span class=\"icon\"><i class=\"fas fa-sign-language\"></i></span>ASL</span>\\\n </div>\\\n <p class=\"learnmore\"><a>+ Learn More</a></p>\\\n </div>\\\n <div class=\"column is-2 \">\\\n <button class=\"button btncolor hidebtns\"><span class=\"icon\"><i class=\"fas fa-clipboard\"></i></span><b>RSVP</b></button>\\\n </div>\\\n <div class=\"column is-1\"></div>\\\n </div>'\n }\n //The subsequent classes won't require that special class and have their own styling\n else{\n var HTMLWrite = '<div class=\"columns afterlistings\">\\\n <div class=\"column is-1\"></div>\\\n <div class=\"column is-2\">\\\n <h1 class=\"title is-6 has-text-centered\">'+eventMonth+'</h1>\\\n <h2 class=\"subtitle has-text-centered\"><b class=\"date\">'+eventDate+'</b></h2>\\\n </div>\\\n <div class=\"vertical\"></div>\\\n <div class=\"column is-6\">\\\n <h1 class=\"title is-6\">'+eventName+'</h1>\\\n <h2 class=\"subtitle is-7\">'+eventLocation+'</h2>\\\n <div class=\"tags\">\\\n <span class=\"tag is-link is-light\"><span class=\"icon\"><i class=\"fas fa-car\"></i></span>Drivers required</span>\\\n <span class=\"tag is-link is-light\"><span class=\"icon\"><i class=\"fas fa-sign-language\"></i></span>ASL</span>\\\n </div>\\\n <p class=\"learnmore\"><a>+ Learn More</a></p>\\\n </div>\\\n <div class=\"column is-2 \">\\\n <button class=\"button btncolor hidebtns\"><span class=\"icon\"><i class=\"fas fa-clipboard\"></i></span><b>RSVP</b></button>\\\n </div>\\\n <div class=\"column is-1 \"></div>\\\n </div>'\n }\n eventListing.push(HTMLWrite);\n }\n document.getElementById(\"eventlisting\").innerHTML = eventListing.join(' ');\n}", "mapEventComponent() {\r\n if (!this.state.events || typeof this.state.events !== 'object') {\r\n return;\r\n }\r\n\r\n let days = this.state.events;\r\n\r\n this.state.eventComponents = Object.keys(this.state.events).map((day) => {\r\n return (\r\n <div data-label={days[day].label} key={days[day].label} className=\"tag_tags_data\">\r\n <div className=\"date_cap\">{days[day].label}</div>\r\n {days[day].data.map((data, index) => {\r\n if (data.eventType === 'comment') {\r\n let style = this.state.eventType.comments === true ? {display: \"block\"} : {display: \"none\"};\r\n return <div style={style} key={index} className=\"timeline_container left\"><Comment data={data}/></div>;\r\n } else {\r\n if (data.eventType === 'action') {\r\n let style = this.state.eventType.actions === true ? {display: \"block\"} : {display: \"none\"};\r\n return <div style={style} key={index} className=\"timeline_container left\"><Action data={data}/></div>;\r\n } else {\r\n if (data.eventType === 'violation') {\r\n let style = !this.isViolationFiltered(data.priority) === true ? {display: \"block\"} : {display: \"none\"};\r\n return <div style={style} key={index + style} className=\"timeline_container right\"><Violation md5sum={this.state.md5sum} priorityFilter={this.state.priority} data={data}/></div>;\r\n }\r\n }\r\n }\r\n })}\r\n </div>\r\n )\r\n });\r\n }", "render() {\n\t\tlet width = this.details.width - 30;\n\t\tlet top = this.details.top;\n\t\tlet height = this.details.height;\n\t\tlet left = this.details.left;\n\t\tlet elem = document.createElement('div');\n\t\telem.setAttribute('class','event');\n\t\telem.innerHTML = `Event ID: ${this.details.id}`;\n\t\telem.style.top = `${top}px`;\n\t\telem.style.width = `${width}px`;\n\t\telem.style.height = `${height}px`;\n\t\telem.style.left = `${left}px`;\n\t\tmainElem.appendChild(elem);\n\t}", "function renderSlotSegs(segs, modifiedEventId) {\n\t\n\t\tvar i, segCnt=segs.length, seg,\n\t\t\tevent,\n\t\t\ttop,\n\t\t\tbottom,\n\t\t\tcolumnLeft,\n\t\t\tcolumnRight,\n\t\t\tcolumnWidth,\n\t\t\twidth,\n\t\t\tleft,\n\t\t\tright,\n\t\t\thtml = '',\n\t\t\teventElements,\n\t\t\teventElement,\n\t\t\ttriggerRes,\n\t\t\ttitleElement,\n\t\t\theight,\n\t\t\tslotSegmentContainer = getSlotSegmentContainer(),\n\t\t\tisRTL = opt('isRTL');\n\t\t\t\n\t\t// calculate position/dimensions, create html\n\t\tfor (i=0; i<segCnt; i++) {\n\t\t\tseg = segs[i];\n\t\t\tevent = seg.event;\n\t\t\ttop = timePosition(seg.start, seg.start);\n\t\t\tbottom = timePosition(seg.start, seg.end);\n\t\t\tcolumnLeft = colContentLeft(seg.col);\n\t\t\tcolumnRight = colContentRight(seg.col);\n\t\t\tcolumnWidth = columnRight - columnLeft;\n\n\t\t\t// shave off space on right near scrollbars (2.5%)\n\t\t\t// TODO: move this to CSS somehow\n\t\t\tcolumnRight -= columnWidth * .025;\n\t\t\tcolumnWidth = columnRight - columnLeft;\n\n\t\t\twidth = columnWidth * (seg.forwardCoord - seg.backwardCoord);\n\n\t\t\tif (opt('slotEventOverlap')) {\n\t\t\t\t// double the width while making sure resize handle is visible\n\t\t\t\t// (assumed to be 20px wide)\n\t\t\t\twidth = Math.max(\n\t\t\t\t\t(width - (20/2)) * 2,\n\t\t\t\t\twidth // narrow columns will want to make the segment smaller than\n\t\t\t\t\t\t// the natural width. don't allow it\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tif (isRTL) {\n\t\t\t\tright = columnRight - seg.backwardCoord * columnWidth;\n\t\t\t\tleft = right - width;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tleft = columnLeft + seg.backwardCoord * columnWidth;\n\t\t\t\tright = left + width;\n\t\t\t}\n\n\t\t\t// make sure horizontal coordinates are in bounds\n\t\t\tleft = Math.max(left, columnLeft);\n\t\t\tright = Math.min(right, columnRight);\n\t\t\twidth = right - left;\n\n\t\t\tseg.top = top;\n\t\t\tseg.left = left;\n\t\t\tseg.outerWidth = width;\n\t\t\tseg.outerHeight = bottom - top;\n\t\t\thtml += slotSegHtml(event, seg);\n\t\t}\n\n\t\tslotSegmentContainer[0].innerHTML = html; // faster than html()\n\t\teventElements = slotSegmentContainer.children();\n\t\t\n\t\t// retrieve elements, run through eventRender callback, bind event handlers\n\t\tfor (i=0; i<segCnt; i++) {\n\t\t\tseg = segs[i];\n\t\t\tevent = seg.event;\n\t\t\teventElement = $(eventElements[i]); // faster than eq()\n\t\t\ttriggerRes = trigger('eventRender', event, event, eventElement);\n\t\t\tif (triggerRes === false) {\n\t\t\t\teventElement.remove();\n\t\t\t}else{\n\t\t\t\tif (triggerRes && triggerRes !== true) {\n\t\t\t\t\teventElement.remove();\n\t\t\t\t\teventElement = $(triggerRes)\n\t\t\t\t\t\t.css({\n\t\t\t\t\t\t\tposition: 'absolute',\n\t\t\t\t\t\t\ttop: seg.top,\n\t\t\t\t\t\t\tleft: seg.left\n\t\t\t\t\t\t})\n\t\t\t\t\t\t.appendTo(slotSegmentContainer);\n\t\t\t\t}\n\t\t\t\tseg.element = eventElement;\n\t\t\t\tif (event._id === modifiedEventId) {\n\t\t\t\t\tbindSlotSeg(event, eventElement, seg);\n\t\t\t\t}else{\n\t\t\t\t\teventElement[0]._fci = i; // for lazySegBind\n\t\t\t\t}\n\t\t\t\treportEventElement(event, eventElement);\n\t\t\t}\n\t\t}\n\t\t\n\t\tlazySegBind(slotSegmentContainer, segs, bindSlotSeg);\n\t\t\n\t\t// record event sides and title positions\n\t\tfor (i=0; i<segCnt; i++) {\n\t\t\tseg = segs[i];\n\t\t\tif (eventElement = seg.element) {\n\t\t\t\tseg.vsides = vsides(eventElement, true);\n\t\t\t\tseg.hsides = hsides(eventElement, true);\n\t\t\t\ttitleElement = eventElement.find('.fc-event-title');\n\t\t\t\tif (titleElement.length) {\n\t\t\t\t\tseg.contentTop = titleElement[0].offsetTop;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t// set all positions/dimensions at once\n\t\tfor (i=0; i<segCnt; i++) {\n\t\t\tseg = segs[i];\n\t\t\tif (eventElement = seg.element) {\n\t\t\t\teventElement[0].style.width = Math.max(0, seg.outerWidth - seg.hsides) + 'px';\n\t\t\t\theight = Math.max(0, seg.outerHeight - seg.vsides);\n\t\t\t\teventElement[0].style.height = height + 'px';\n\t\t\t\tevent = seg.event;\n\t\t\t\tif (seg.contentTop !== undefined && height - seg.contentTop < 10) {\n\t\t\t\t\t// not enough room for title, put it in the time (TODO: maybe make both display:inline instead)\n\t\t\t\t\teventElement.find('div.fc-event-time')\n\t\t\t\t\t\t.text(formatDate(event.start, opt('timeFormat')) + ' - ' + event.title);\n\t\t\t\t\teventElement.find('div.fc-event-title')\n\t\t\t\t\t\t.remove();\n\t\t\t\t}\n\t\t\t\ttrigger('eventAfterRender', event, event, eventElement);\n\t\t\t}\n\t\t}\n\t\t\t\t\t\n\t}", "function renderSlotSegs(segs, modifiedEventId) {\n\t\n\t\tvar i, segCnt=segs.length, seg,\n\t\t\tevent,\n\t\t\ttop,\n\t\t\tbottom,\n\t\t\tcolumnLeft,\n\t\t\tcolumnRight,\n\t\t\tcolumnWidth,\n\t\t\twidth,\n\t\t\tleft,\n\t\t\tright,\n\t\t\thtml = '',\n\t\t\teventElements,\n\t\t\teventElement,\n\t\t\ttriggerRes,\n\t\t\ttitleElement,\n\t\t\theight,\n\t\t\tslotSegmentContainer = getSlotSegmentContainer(),\n\t\t\tisRTL = opt('isRTL');\n\t\t\t\n\t\t// calculate position/dimensions, create html\n\t\tfor (i=0; i<segCnt; i++) {\n\t\t\tseg = segs[i];\n\t\t\tevent = seg.event;\n\t\t\ttop = timePosition(seg.start, seg.start);\n\t\t\tbottom = timePosition(seg.start, seg.end);\n\t\t\tcolumnLeft = colContentLeft(seg.col);\n\t\t\tcolumnRight = colContentRight(seg.col);\n\t\t\tcolumnWidth = columnRight - columnLeft;\n\n\t\t\t// shave off space on right near scrollbars (2.5%)\n\t\t\t// TODO: move this to CSS somehow\n\t\t\tcolumnRight -= columnWidth * .025;\n\t\t\tcolumnWidth = columnRight - columnLeft;\n\n\t\t\twidth = columnWidth * (seg.forwardCoord - seg.backwardCoord);\n\n\t\t\tif (opt('slotEventOverlap')) {\n\t\t\t\t// double the width while making sure resize handle is visible\n\t\t\t\t// (assumed to be 20px wide)\n\t\t\t\twidth = Math.max(\n\t\t\t\t\t(width - (20/2)) * 2,\n\t\t\t\t\twidth // narrow columns will want to make the segment smaller than\n\t\t\t\t\t\t// the natural width. don't allow it\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tif (isRTL) {\n\t\t\t\tright = columnRight - seg.backwardCoord * columnWidth;\n\t\t\t\tleft = right - width;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tleft = columnLeft + seg.backwardCoord * columnWidth;\n\t\t\t\tright = left + width;\n\t\t\t}\n\n\t\t\t// make sure horizontal coordinates are in bounds\n\t\t\tleft = Math.max(left, columnLeft);\n\t\t\tright = Math.min(right, columnRight);\n\t\t\twidth = right - left;\n\n\t\t\tseg.top = top;\n\t\t\tseg.left = left;\n\t\t\tseg.outerWidth = width;\n\t\t\tseg.outerHeight = bottom - top;\n\t\t\thtml += slotSegHtml(event, seg);\n\t\t}\n\n\t\tslotSegmentContainer[0].innerHTML = html; // faster than html()\n\t\teventElements = slotSegmentContainer.children();\n\t\t\n\t\t// retrieve elements, run through eventRender callback, bind event handlers\n\t\tfor (i=0; i<segCnt; i++) {\n\t\t\tseg = segs[i];\n\t\t\tevent = seg.event;\n\t\t\teventElement = $(eventElements[i]); // faster than eq()\n\t\t\ttriggerRes = trigger('eventRender', event, event, eventElement);\n\t\t\tif (triggerRes === false) {\n\t\t\t\teventElement.remove();\n\t\t\t}else{\n\t\t\t\tif (triggerRes && triggerRes !== true) {\n\t\t\t\t\teventElement.remove();\n\t\t\t\t\teventElement = $(triggerRes)\n\t\t\t\t\t\t.css({\n\t\t\t\t\t\t\tposition: 'absolute',\n\t\t\t\t\t\t\ttop: seg.top,\n\t\t\t\t\t\t\tleft: seg.left\n\t\t\t\t\t\t})\n\t\t\t\t\t\t.appendTo(slotSegmentContainer);\n\t\t\t\t}\n\t\t\t\tseg.element = eventElement;\n\t\t\t\tif (event._id === modifiedEventId) {\n\t\t\t\t\tbindSlotSeg(event, eventElement, seg);\n\t\t\t\t}else{\n\t\t\t\t\teventElement[0]._fci = i; // for lazySegBind\n\t\t\t\t}\n\t\t\t\treportEventElement(event, eventElement);\n\t\t\t}\n\t\t}\n\t\t\n\t\tlazySegBind(slotSegmentContainer, segs, bindSlotSeg);\n\t\t\n\t\t// record event sides and title positions\n\t\tfor (i=0; i<segCnt; i++) {\n\t\t\tseg = segs[i];\n\t\t\tif (eventElement = seg.element) {\n\t\t\t\tseg.vsides = vsides(eventElement, true);\n\t\t\t\tseg.hsides = hsides(eventElement, true);\n\t\t\t\ttitleElement = eventElement.find('.fc-event-title');\n\t\t\t\tif (titleElement.length) {\n\t\t\t\t\tseg.contentTop = titleElement[0].offsetTop;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t// set all positions/dimensions at once\n\t\tfor (i=0; i<segCnt; i++) {\n\t\t\tseg = segs[i];\n\t\t\tif (eventElement = seg.element) {\n\t\t\t\teventElement[0].style.width = Math.max(0, seg.outerWidth - seg.hsides) + 'px';\n\t\t\t\theight = Math.max(0, seg.outerHeight - seg.vsides);\n\t\t\t\teventElement[0].style.height = height + 'px';\n\t\t\t\tevent = seg.event;\n\t\t\t\tif (seg.contentTop !== undefined && height - seg.contentTop < 10) {\n\t\t\t\t\t// not enough room for title, put it in the time (TODO: maybe make both display:inline instead)\n\t\t\t\t\teventElement.find('div.fc-event-time')\n\t\t\t\t\t\t.text(formatDate(event.start, opt('timeFormat')) + ' - ' + event.title);\n\t\t\t\t\teventElement.find('div.fc-event-title')\n\t\t\t\t\t\t.remove();\n\t\t\t\t}\n\t\t\t\ttrigger('eventAfterRender', event, event, eventElement);\n\t\t\t}\n\t\t}\n\t\t\t\t\t\n\t}", "function renderSlotSegs(segs, modifiedEventId) {\n\t\n\t\tvar i, segCnt=segs.length, seg,\n\t\t\tevent,\n\t\t\ttop,\n\t\t\tbottom,\n\t\t\tcolumnLeft,\n\t\t\tcolumnRight,\n\t\t\tcolumnWidth,\n\t\t\twidth,\n\t\t\tleft,\n\t\t\tright,\n\t\t\thtml = '',\n\t\t\teventElements,\n\t\t\teventElement,\n\t\t\ttriggerRes,\n\t\t\ttitleElement,\n\t\t\theight,\n\t\t\tslotSegmentContainer = getSlotSegmentContainer(),\n\t\t\tisRTL = opt('isRTL');\n\t\t\t\n\t\t// calculate position/dimensions, create html\n\t\tfor (i=0; i<segCnt; i++) {\n\t\t\tseg = segs[i];\n\t\t\tevent = seg.event;\n\t\t\ttop = timePosition(seg.start, seg.start);\n\t\t\tbottom = timePosition(seg.start, seg.end);\n\t\t\tcolumnLeft = colContentLeft(seg.col);\n\t\t\tcolumnRight = colContentRight(seg.col);\n\t\t\tcolumnWidth = columnRight - columnLeft;\n\n\t\t\t// shave off space on right near scrollbars (2.5%)\n\t\t\t// TODO: move this to CSS somehow\n\t\t\tcolumnRight -= columnWidth * .025;\n\t\t\tcolumnWidth = columnRight - columnLeft;\n\n\t\t\twidth = columnWidth * (seg.forwardCoord - seg.backwardCoord);\n\n\t\t\tif (opt('slotEventOverlap')) {\n\t\t\t\t// double the width while making sure resize handle is visible\n\t\t\t\t// (assumed to be 20px wide)\n\t\t\t\twidth = Math.max(\n\t\t\t\t\t(width - (20/2)) * 2,\n\t\t\t\t\twidth // narrow columns will want to make the segment smaller than\n\t\t\t\t\t\t// the natural width. don't allow it\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tif (isRTL) {\n\t\t\t\tright = columnRight - seg.backwardCoord * columnWidth;\n\t\t\t\tleft = right - width;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tleft = columnLeft + seg.backwardCoord * columnWidth;\n\t\t\t\tright = left + width;\n\t\t\t}\n\n\t\t\t// make sure horizontal coordinates are in bounds\n\t\t\tleft = Math.max(left, columnLeft);\n\t\t\tright = Math.min(right, columnRight);\n\t\t\twidth = right - left;\n\n\t\t\tseg.top = top;\n\t\t\tseg.left = left;\n\t\t\tseg.outerWidth = width;\n\t\t\tseg.outerHeight = bottom - top;\n\t\t\thtml += slotSegHtml(event, seg);\n\t\t}\n\n\t\tslotSegmentContainer[0].innerHTML = html; // faster than html()\n\t\teventElements = slotSegmentContainer.children();\n\t\t\n\t\t// retrieve elements, run through eventRender callback, bind event handlers\n\t\tfor (i=0; i<segCnt; i++) {\n\t\t\tseg = segs[i];\n\t\t\tevent = seg.event;\n\t\t\teventElement = $(eventElements[i]); // faster than eq()\n\t\t\ttriggerRes = trigger('eventRender', event, event, eventElement);\n\t\t\tif (triggerRes === false) {\n\t\t\t\teventElement.remove();\n\t\t\t}else{\n\t\t\t\tif (triggerRes && triggerRes !== true) {\n\t\t\t\t\teventElement.remove();\n\t\t\t\t\teventElement = $(triggerRes)\n\t\t\t\t\t\t.css({\n\t\t\t\t\t\t\tposition: 'absolute',\n\t\t\t\t\t\t\ttop: seg.top,\n\t\t\t\t\t\t\tleft: seg.left\n\t\t\t\t\t\t})\n\t\t\t\t\t\t.appendTo(slotSegmentContainer);\n\t\t\t\t}\n\t\t\t\tseg.element = eventElement;\n\t\t\t\tif (event._id === modifiedEventId) {\n\t\t\t\t\tbindSlotSeg(event, eventElement, seg);\n\t\t\t\t}else{\n\t\t\t\t\teventElement[0]._fci = i; // for lazySegBind\n\t\t\t\t}\n\t\t\t\treportEventElement(event, eventElement);\n\t\t\t}\n\t\t}\n\t\t\n\t\tlazySegBind(slotSegmentContainer, segs, bindSlotSeg);\n\t\t\n\t\t// record event sides and title positions\n\t\tfor (i=0; i<segCnt; i++) {\n\t\t\tseg = segs[i];\n\t\t\tif (eventElement = seg.element) {\n\t\t\t\tseg.vsides = vsides(eventElement, true);\n\t\t\t\tseg.hsides = hsides(eventElement, true);\n\t\t\t\ttitleElement = eventElement.find('.fc-event-title');\n\t\t\t\tif (titleElement.length) {\n\t\t\t\t\tseg.contentTop = titleElement[0].offsetTop;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t// set all positions/dimensions at once\n\t\tfor (i=0; i<segCnt; i++) {\n\t\t\tseg = segs[i];\n\t\t\tif (eventElement = seg.element) {\n\t\t\t\teventElement[0].style.width = Math.max(0, seg.outerWidth - seg.hsides) + 'px';\n\t\t\t\theight = Math.max(0, seg.outerHeight - seg.vsides);\n\t\t\t\teventElement[0].style.height = height + 'px';\n\t\t\t\tevent = seg.event;\n\t\t\t\tif (seg.contentTop !== undefined && height - seg.contentTop < 10) {\n\t\t\t\t\t// not enough room for title, put it in the time (TODO: maybe make both display:inline instead)\n\t\t\t\t\teventElement.find('div.fc-event-time')\n\t\t\t\t\t\t.text(formatDate(event.start, opt('timeFormat')) + ' - ' + event.title);\n\t\t\t\t\teventElement.find('div.fc-event-title')\n\t\t\t\t\t\t.remove();\n\t\t\t\t}\n\t\t\t\ttrigger('eventAfterRender', event, event, eventElement);\n\t\t\t}\n\t\t}\n\t\t\t\t\t\n\t}", "function displayEvents(events) {\n document.getElementById('results').innerHTML='';\n console.log(events[0])\n events.forEach(function(event) {\n // const event_name = String(event.eventName);\n // console.log(event_name);\n const card = document.createElement('div');\n // appending a new row\n document.getElementById('results').appendChild(card);\n\n // formatting the row by applying css classes\n card.classList.add('card');\n card.classList.add('bg-light');\n card.classList.add('card-body');\n card.classList.add('mb-3');\n var cardhtml = \" <div class=\\\"container\\\">\\n\" +\n \" <div class=\\\"row\\\">\\n\" +\n \" <div class=\\\"media w-100\\\">\\t<a class=\\\"float-left\\\" href=\\\"#\\\">\\n\" +\n \"\\n\";\n\n if(event.img != \"\") {\n cardhtml += \" <img src=\\\"/index/images/\" +event.img[0]+\"\\\" class=\\\"eventImg\\\">\"\n }\n\n cardhtml += \" </a>\\n\" +\n \" <div class=\\\"media-body\\\">\\n\" +\n \" <ul class=\\\"list-inline list-unstyled highlight\\\">\\n\" +\n \" <li class=\\\"list-inline-item\\\" style=\\\"font-size: 28px\\\"><b>&ensp;\" + event.eventname + \"</b></li>\\n\" +\n \" <li class=\\\"list-inline-item float-right char\\\"><b>Created By \" + event.firstname +\" \"+event.surname + \" </b></li>\\n\" +\n \" </ul>\\n\" +\n \" <p style=\\\"padding: 5px 0px 5px 25px;\\\">\" + event['description'] + \"</p>\\n\" +\n \" </div>\\n\" +\n \" </div>\\n\" +\n \" </div>\\n\" +\n \" <div class=\\\"row\\\">\\n\" +\n \" <ul class=\\\"list-inline list-unstyled w-100\\\" style=\\\"padding: 5px 0px 0px 0px;\\\">\\n\" +\n \" <li class=\\\"list-inline-item\\\"><span><i class=\\\"glyphicon glyphicon-calendar\\\"><b>Date: </b></i>\" + event.startdate.toString().substring(0, 10)+ \"<i><b> Time: </b></i> \"+ event.startdate.toString().substring(11, 16)+\"</span></li>\\n\" +\n \" <li class=\\\"list-inline-item\\\">~</li> <span><i class=\\\"glyphicon glyphicon-comment\\\"><b>Date: </b></i>\" + event.startdate.toString().substring(0, 10)+ \"<i><b> Time: </b></i>\"+ event.startdate.toString().substring(11, 16)+ \"</span>\\n\" +\n \" <li class=\\\"list-inline-item\\\">&ensp;|</li> <span><i class=\\\"glyphicon glyphicon-comment\\\"><b>Location: </b></i>\" + event.location+ \" \"+ event.city+\" \"+event.postcode+\"</span>\\n\" +\n \" <div>\\n\" +\n \" <button class=\\\"btn btn-info btn-md float-right\\\" style=\\\"margin-left:5px;\\\" onclick=\\\"window.location.href =\\'/viewStories/\"+event.event_id+\"\\' \\\">\\n\" +\n \" View Stories\\n\" +\n \" </button>\"+\n \" </div>\\n\" +\n \" <button type='button' class=\\\"btn btn-primary\\\" data-toggle=\\\"modal\\\" data-target=\\\"#model-\" + event.event_id+ \"\\\">\\n\" +\n \" View Images\\n\" +\n \" </button>\"+\n \" </ul>\\n\" +\n \" </div>\\n\" +\n \" </div>\\n\" +\n \" </div>\" +\n \"<!-- Modal -->\\n\" +\n \" <div class=\\\"modal fade\\\" id=\\\"model-\"+ event.event_id +\"\\\" tabindex=\\\"-1\\\" role=\\\"dialog\\\" aria-labelledby=\\\"model-\"+ event.event_id +\"\\\" aria-hidden=\\\"true\\\">\\n\" +\n \" <div class=\\\"modal-dialog modal-dialog-centered modal-lg\\\" role=\\\"document\\\">\\n\" +\n \" <div class=\\\"modal-content\\\">\\n\" +\n \" <div class=\\\"modal-header\\\">\\n\" +\n \" <h5 class=\\\"modal-title\\\" >Images - \"+ event.eventname+ \"</h5>\\n\" +\n \" <button type=\\\"button\\\" class=\\\"close\\\" data-dismiss=\\\"modal\\\" aria-label=\\\"Close\\\">\\n\" +\n \" <span aria-hidden=\\\"true\\\">&times;</span>\\n\" +\n \" </button>\\n\" +\n \" </div>\\n\"+\n \" <div class=\\\"modal-body\\\" id=\\\"model-body\\\">\\n\";\n\n event.img.forEach(function(img){\n if(event.img != \"\") {\n cardhtml += \"<img src=\\\"/index/images/\" +img+\"\\\" class=\\\"eventImg\\\" style=\\\"padding-right: 4px\\\">\"\n }\n });\n\n cardhtml += \" </div>\\n\" +\n \" <div class=\\\"modal-footer\\\">\\n\" +\n \" <button type=\\\"button\\\" class=\\\"btn btn-primary\\\" data-dismiss=\\\"modal\\\">Close</button>\\n\" +\n \" </div>\\n\" +\n \" </div>\\n\" +\n \" </div>\\n\" +\n \" </div>\"\n\n card.innerHTML = cardhtml;\n });\n}", "function MonthEvent(parent){var _this=_super.call(this,parent)||this;_this.renderedEvents=[];_this.monthHeaderHeight=0;_this.moreIndicatorHeight=19;_this.renderType='day';_this.element=_this.parent.activeView.getPanel();_this.fields=_this.parent.eventFields;_this.maxHeight=_this.parent.eventSettings.enableMaxHeight&&!_this.parent.eventSettings.enableIndicator&&!_this.parent.rowAutoHeight;_this.withIndicator=_this.parent.eventSettings.enableMaxHeight&&_this.parent.eventSettings.enableIndicator&&!_this.parent.rowAutoHeight;_this.maxOrIndicator=_this.maxHeight||_this.withIndicator;_this.moreIndicatorHeight=_this.parent.rowAutoHeight&&_this.parent.eventSettings.ignoreWhitespace?0:_this.moreIndicatorHeight;_this.addEventListener();return _this;}", "function getInsertEventsByPos(filePath, startRow, startCol, endRow, endCol) {\n \n //a list of the minimal events in the selected range\n var events = [];\n\n //get the file id associated with the file where the change takes place\n var fileId = getIdFromFilePath(filePath);\n \n //if there is a valid file id \n if(fileId) {\n\n //get the 2D event array that shadows the contents of a file based on the file id\n var allInsertEventsByPos = allInsertEventsByFile[fileId];\n\n //where the insert starts\n var row = startRow;\n var col = startCol;\n \n //while the current position is not equal to the end position\n while(row !== endRow || col !== endCol) {\n\n //get the current (minimal) event\n var currentEvent = allInsertEventsByPos[row][col];\n \n //add it list \n events.push(currentEvent);\n\n //if this code character was a newline\n if(currentEvent.character === \"\\n\") {\n\n //go to the next row\n row++;\n\n //set the column back to the beginning of the line\n col = 0;\n\n } else { //a non-newline character\n\n //move to the next column\n col++;\n }\n }\n }\n\n return events;\n}", "function buildEventsList() {\n\t\t\n\t\teventsList.length = 0;\n\n\t\tvar t = 0;\n\t\t\n\t\tfor(var i = 0; i < numRows; i++) {\n\n\t\t\taddEvent(t, that.EVENT_ROW_PLAYED, { row: i });\n\n\t\t\tfor(var j = 0; j < numColumns; j++) {\n\t\t\t\t\n\t\t\t\tvar cell = cells[i][j];\n\n\t\t\t\tif(cell.transposed !== null) {\n\t\t\t\t\taddEvent(t, that.EVENT_NOTE_ON, { voice: j, note: cell.transposed });\n\t\t\t\t\t// Also adding an automatic note off event, a row later\n\t\t\t\t\taddEvent(t + secondsPerRow * 0.5, that.EVENT_NOTE_OFF, { voice: j });\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\tt += secondsPerRow;\n\t\t}\n\n\t\taddEvent(t, that.EVENT_END_PLAYED);\n\n\t\teventsList.sort(function(a, b) {\n\t\t\treturn a.timestamp - b.timestamp;\n\t\t});\n\n\t\tupdateNextEventPosition();\n\n\t}", "function displayMyEvents(events) {\n document.getElementById('results').innerHTML='';\n console.log(events[0])\n events.forEach(function(event) {\n // const event_name = String(event.eventName);\n // console.log(event_name);\n const card = document.createElement('div');\n // appending a new row\n document.getElementById('results').appendChild(card);\n\n // formatting the row by applying css classes\n card.classList.add('card');\n card.classList.add('bg-light');\n card.classList.add('card-body');\n card.classList.add('mb-3');\n var cardhtml = \" <div class=\\\"container\\\">\\n\" +\n \" <div class=\\\"row\\\">\\n\" +\n \" <div class=\\\"media w-100\\\">\\t<a class=\\\"float-left\\\" href=\\\"#\\\">\\n\" +\n \"\\n\";\n if(event.img != \"\") {\n cardhtml += \" <img src=\\\"/index/images/\" +event.img[0]+\"\\\" class=\\\"eventImg\\\">\"\n }\n cardhtml += \" </a>\\n\" +\n \" <div class=\\\"media-body\\\">\\n\" +\n \" <ul class=\\\"list-inline list-unstyled highlight\\\">\\n\" +\n \" <li class=\\\"list-inline-item\\\" style=\\\"font-size: 28px\\\"><b>&ensp;\" + event.eventname + \"</b></li>\\n\" +\n \" <li class=\\\"list-inline-item float-right char\\\"><b>Created By \" + event.firstname +\" \"+event.surname + \" </b></li>\\n\" +\n \" </ul>\\n\" +\n \" <p style=\\\"padding: 5px 0px 5px 25px;\\\">\" + event['description'] + \"</p>\\n\" +\n \" </div>\\n\" +\n \" </div>\\n\" +\n \" </div>\\n\" +\n \" <div class=\\\"row\\\">\\n\" +\n \" <ul class=\\\"list-inline list-unstyled w-100\\\" style=\\\"padding: 5px 0px 0px 0px;\\\">\\n\" +\n \" <li class=\\\"list-inline-item\\\"><span><i class=\\\"glyphicon glyphicon-calendar\\\"><b>Date: </b></i>\" + event.startdate.toString().substring(0, 10)+ \"<i><b>Time: </b></i> \"+ event.startdate.toString().substring(11, 16)+\"</span></li>\\n\" +\n \" <li class=\\\"list-inline-item\\\">~</li> <span><i class=\\\"glyphicon glyphicon-comment\\\"><b>Date: </b></i>\" + event.enddate.toString().substring(0, 10)+ \"<i><b>Time: </b></i> \"+ event.enddate.toString().substring(11, 16)+ \"</span>\\n\" +\n \" <li class=\\\"list-inline-item\\\">&ensp;|</li> <span><i class=\\\"glyphicon glyphicon-comment\\\"><b>Location: </b></i>\" + event.location+ \" \"+ event.city+\" \"+event.postcode+\"</span>\\n\" +\n \" <form id=\\“xForm\\\" onsubmit=\\\"onSubmit('/MyEvents/deleteEvent/\"+ event.event_id +\"')\\\">\\n\" +\n \" <input class=\\\"btn btn-danger btn-md float-right\\\" style=\\\"margin-left:5px;\\\" type=\\\"submit\\\" name=\\\"delete\\\" value='Delete Event' onClick=\\\"return confirm('Are you sure you want to delete this event?')\\\" />\\n\" +\n \" </form>\\n\" +\n \" <form method=\\\"get\\\" action=\\\"/myEvents/editEvent/\"+event.event_id+\"\\\">\\n\" +\n \" <input class=\\\"btn btn-warning btn-md float-right\\\" style=\\\"margin-left:5px;\\\" type=\\\"submit\\\" name=\\\"edit\\\" value='Edit Event'/>\\n\" +\n \" </form>\\n\" +\n // \" <form method=\\\"get\\\" action=\\\"/viewStories/\"+event['event_id']+\"\\\" onsubmit=\\\"storyView('\"+ event.eventName + \"')\\\">\\n\" +\n // \" <input class=\\\"btn btn-info btn-md float-right\\\" style=\\\"margin-left:5px;\\\" type=\\\"submit\\\" name=\\\"viewstories\\\" value='View Stories'/>\\n\" +\n // \" </form>\\n\" +\n // \" <form >\\n\" +\n \" <div>\\n\" +\n \" <button class=\\\"btn btn-info btn-md float-right\\\" style=\\\"margin-left:5px;\\\" onclick=\\\"window.location.href =\\'/viewStories/\"+event.event_id+\"\\'\\\">\\n\" +\n \" View Stories\\n\" +\n \" </button>\"+\n \" </div>\\n\" +\n // \" </form>\\n\" +\n \" <form method=\\\"get\\\" action=\\\"/myEvents/createStory/\"+event['event_id']+\"\\\">\\n\" +\n \" <input class=\\\"btn btn-success btn-md float-right\\\" style=\\\"margin-left:5px;\\\" type=\\\"submit\\\" name=\\\"create\\\" value='Create Story'/>\\n\" +\n \" </form>\\n\" +\n \" <button type='button' class=\\\"btn btn-primary\\\" data-toggle=\\\"modal\\\" data-target=\\\"#model-\" + event.event_id+ \"\\\">\\n\" +\n \" View Images\\n\" +\n \" </button>\"+\n \" </ul>\\n\" +\n \" </div>\\n\" +\n \" </div>\\n\" +\n \" </div>\" +\n \"<div class=\\\"modal fade\\\" id=\\\"modelstories-\" + event.event_id+ \"\\\" tabindex=\\\"-1\\\" role=\\\"dialog\\\" aria-labelledby=\\\"modelstories-\"+ event.event_id+ \"\\\" aria-hidden=\\\"true\\\">\\n\" +\n \" <div class=\\\"modal-dialog modal-dialog-centered modal-lg\\\" role=\\\"document\\\">\\n\" +\n \" <div class=\\\"modal-content\\\">\\n\" +\n \" <div class=\\\"modal-header\\\">\\n\" +\n \" <h5 class=\\\"modal-title\\\" >Stories - \" + event.img+ \"</h5>\\n\" +\n \" <button type=\\\"button\\\" class=\\\"close\\\" data-dismiss=\\\"modal\\\" aria-label=\\\"Close\\\">\\n\" +\n \" <span aria-hidden=\\\"true\\\">&times;</span>\\n\" +\n \" </button>\\n\" +\n \" </div>\\n\" +\n \" <div class=\\\"modal-body\\\" id=\\\"model-body\\\">\\n\" +\n \" <div class=\\\"container\\\">\\n\" +\n \" <div id=\\\"displayStories\\\" class=\\\"card card-body mb-3\\\"></div>\\n\" +\n \" </div>\"+\n \" </div>\\n\" +\n \" <div class=\\\"modal-footer\\\">\\n\" +\n \" <button type=\\\"button\\\" class=\\\"btn btn-primary\\\" data-dismiss=\\\"modal\\\">Close</button>\\n\" +\n \" </div>\\n\" +\n \" </div>\\n\" +\n \" </div>\\n\" +\n \" </div>\" +\n \"<!-- Modal -->\\n\" +\n \" <div class=\\\"modal fade\\\" id=\\\"model-\"+ event.event_id +\"\\\" tabindex=\\\"-1\\\" role=\\\"dialog\\\" aria-labelledby=\\\"model-\"+ event.event_id +\"\\\" aria-hidden=\\\"true\\\">\\n\" +\n \" <div class=\\\"modal-dialog modal-dialog-centered modal-lg\\\" role=\\\"document\\\">\\n\" +\n \" <div class=\\\"modal-content\\\">\\n\" +\n \" <div class=\\\"modal-header\\\">\\n\" +\n \" <h5 class=\\\"modal-title\\\" >Images - \"+ event.eventname+ \"</h5>\\n\" +\n \" <button type=\\\"button\\\" class=\\\"close\\\" data-dismiss=\\\"modal\\\" aria-label=\\\"Close\\\">\\n\" +\n \" <span aria-hidden=\\\"true\\\">&times;</span>\\n\" +\n \" </button>\\n\" +\n \" </div>\\n\"+\n \" <div class=\\\"modal-body\\\" id=\\\"model-body\\\">\\n\";\n\n event.img.forEach(function(img){\n if(event.img != \"\") {\n cardhtml += \"<img src=\\\"/index/images/\" +img+\"\\\" class=\\\"eventImg\\\" style=\\\"padding-right: 4px\\\">\"\n }\n });\n\n cardhtml += \" </div>\\n\" +\n \" <div class=\\\"modal-footer\\\">\\n\" +\n \" <button type=\\\"button\\\" class=\\\"btn btn-primary\\\" data-dismiss=\\\"modal\\\">Close</button>\\n\" +\n \" </div>\\n\" +\n \" </div>\\n\" +\n \" </div>\\n\" +\n \" </div>\"\n\n card.innerHTML = cardhtml;\n });\n}", "scrollUnrenderedEventIntoView(resourceRec, eventRec, options = defaultScrollOptions$3) {\n // We must only resolve when the event's element has been painted\n // *and* the scroll has fully completed.\n return new Promise(resolve => {\n const me = this,\n // Knock out highlight and focus options. They must be applied after the scroll\n // has fully completed and we have an element. Use a default edgeOffset of 20.\n modifiedOptions = Object.assign({\n edgeOffset: 20\n }, options, unrenderedScrollOptions),\n scroller = me.timeAxisSubGrid.scrollable,\n box = me.getResourceEventBox(eventRec, resourceRec),\n scrollerViewport = scroller.viewport;\n\n if (!scrollerViewport) {\n resolve();\n return;\n }\n\n const targetRect = box.translate(scrollerViewport.x - scroller.x, scrollerViewport.y - scroller.y),\n delta = scroller.getDeltaTo(targetRect, modifiedOptions)[me.isHorizontal ? 'xDelta' : 'yDelta'],\n onEventRender = async ({\n eventRecord,\n element,\n targetElement\n }) => {\n if (eventRecord === eventRec) {\n // Vertical's renderEvent is different to eventPaint\n const el = element || targetElement;\n detatcher(); // Don't resolve until the scroll has fully completed.\n\n await initialScrollPromise; // If we were scrolling rightwards, then because the rectangle was only *estimated*\n // we must now ensure that the scroll position is fully correct for the *element*.\n // TODO: Needed? The position should be correct with the new rendering\n\n if (delta > 0) {\n await scroller.scrollIntoView(el, {\n edgeOffset: options.edgeOffset\n });\n }\n\n options.highlight && DomHelper.highlight(el);\n options.focus && el.focus();\n resolve();\n }\n },\n // On either paint or repaint of the event, resolve the scroll promise and detach the listeners.\n detatcher = me.on({\n renderEvent: onEventRender\n }),\n initialScrollPromise = scroller.scrollIntoView(targetRect, modifiedOptions);\n });\n }", "function k(b,c){for(var d=0;d<b.length;d++){var e=b[d],f=e.event,g=c.eq(d),h=z(\"eventRender\",f,f,g);h===!1?\n// if `false`, remove the event from the DOM and don't assign it to `segment.event`\ng.remove():(h&&h!==!0&&(\n// the trigger returned a new element, but not `true` (which means keep the existing element)\n// re-assign the important CSS dimension properties that were already assigned in `buildHTMLForSegment`\nh=a(h).css({position:\"absolute\",left:e.left}),g.replaceWith(h),g=h),e.element=g)}}", "function matchLunchEvent(eventsData) {\n var rows = []; //used to store processed event object\n $('#eventDisplayArea').empty(); //empty constents\n eventsData = assignColorIndication(eventsData); //Method to calculates overlap values\n initiateEventsFormatting(eventsData, rows); //Method to create rows based on overlap criteria\n renderUI(rows); //Method to display segregates rows containing event objects\n}", "function processEvents(element, index, array) {\r\r\n \tvar eventHtml = '';\r\r\n \teventHtml += '<div class=\"event clearfix\">';\r\r\n \teventHtml += '<div class=\"event-left\">';\r\r\n \tif(element.actor.hasOwnProperty('avatar_url')){\r\r\n \t\teventHtml += '<div class=\"event-field\">';\r\r\n \t\teventHtml += '<img src=\"' + element.actor.avatar_url + '\">';\r\r\n \t\teventHtml += '</div>';\r\r\n \t}\r\r\n \teventHtml += '</div>';\r\r\n \teventHtml += '<div class=\"event-right\">';\r\r\n \tif(element.actor.hasOwnProperty('login')){\r\r\n \t\teventHtml += '<div class=\"event-field\">';\r\r\n \t\teventHtml += '<h3>UserName: ' + element.actor.login + '</h3>';\r\r\n \t\teventHtml += '</div>';\r\r\n \t}\r\r\n \tif(element.hasOwnProperty('type')){\r\r\n \t\teventHtml += '<div class=\"event-field\">';\r\r\n \t\teventHtml += '<p>Type of Event: ' + element.type + '</p>';\r\r\n \t\teventHtml += '</div>';\r\r\n \t}\r\r\n \teventHtml += '<span>Click to show more details...</span>';\r\r\n \teventHtml += '<div class=\"event-details\">';\r\r\n \tif(element.hasOwnProperty('created_at')) {\r\r\n \t\tvar eventDate = convertDate(element.created_at);\r\r\n \t\teventHtml += '<div class=\"event-field\">';\r\r\n \t\teventHtml += 'Date Created: ' + eventDate;\r\r\n \t\teventHtml += '</div>';\r\r\n \t}\r\r\n \tif(element.repo.hasOwnProperty('name')){\r\r\n \t\teventHtml += '<div class=\"event-field\">';\r\r\n \t\teventHtml += '<p>Repo Name: ' + element.repo.name + '</p>';\r\r\n \t\teventHtml += '<a target=\"_blank\" href=\"https://github.com/' + element.repo.name + '\">Link to Repo</a>';\r\r\n \t\teventHtml += '</div>';\r\r\n \t}\r\r\n \teventHtml += '</div>';\r\r\n \teventHtml += '</div>';\r\r\n \teventHtml += '</div>';\r\r\n\r\r\n \t//checks where to place event for user or public github feed\r\r\n \tif (array.typeOfRequest == 'githubPublic') {\r\r\n \t\t$(\"#event-data\").append(eventHtml);\r\r\n \t}\r\r\n \telse if (array.typeOfRequest == 'githubUser') {\r\r\n \t\t$(\"#user-data\").append(eventHtml);\r\r\n \t}\r\r\n\r\r\n \t$('.event').click(function(){\r\r\n \t$(this).addClass(\"active\");\r\r\n\t\t})\r\r\n }", "function eventFunction(e){\r\n\t//drawAllEvents();\r\n\tvar dayevents = getSlot(e.startArray, EC);\r\n\tif (!dayEventDup(e,dayevents)){\r\n\t dayevents.push(e);\r\n\t dayevents.sort(sortByEventTime);\r\n\t // show number of events, if it is amongst currently shown queries\r\n\t if (queryStates[e.qid]==1){\r\n\t\teventSource.loadQueryEvents([e]);\r\n\t }\r\n\t} \r\n }", "function showCalendar(month, year, event) {\n\n let today = new Date();\n let firstDay = new Date(year, month).getDay();\n let totalDays = 32 - new Date(year, month, 32).getDate();\n // Calendar container with monthly numbers of days\n let calendarCont = document.querySelector('.month-num');\n // 'month - year' in selection of previous and nest \n let monthYear = document.querySelector('.month-year');\n let viewedMonth = monthsArr[month]; // test\n console.log(viewedMonth);\n monthYear.innerHTML = `${monthsArr[month]} ${year}`;\n calendarCont.innerHTML = \"\";\n // scheduled events for a specific month of the year\n let theseEvents = event.filter(even => even.date.getFullYear() == year && even.date.getMonth() == month);\n console.log(theseEvents); // test\n\n let date = 1;\n\n for (let i = 0; i < 6; i++) {\n let week = document.createElement('div');\n week.classList.add('weeks');\n\n for (let j = 0; j < 7; j++) {\n\n if (i == 0 && j < firstDay) {\n let emptyCell = document.createElement('div');\n emptyCell.classList.add('empty');\n week.appendChild(emptyCell);\n\n } else if (date <= totalDays) {\n let numCell = document.createElement('div');\n numCell.classList.add('num');\n\n if (date == today.getDate() && month == today.getMonth() && year == today.getFullYear()) {\n numCell.classList.add('today');\n };\n\n let numCellEvent = \"\";\n\n let w = window.innerWidth;\n let eventPlan = document.querySelector('.event-plan');\n let leftSideBlue = document.querySelector('.blue');\n let rightSideRed = document.querySelector('.red');\n\n if (theseEvents.length) {\n let todayEvent = theseEvents.filter(eve => eve.date.getDate() == date);\n console.log(todayEvent); // test\n\n if (todayEvent.length && w > 992) {\n numCell.classList.add('event');\n\n todayEvent.forEach(ev => {\n numCellEvent += `<div class=\"eve\" style=\"border-left:4px solid ${ev.bgColor}\"><div>${ev.title}</div><div>${ev.time}</div><div>${ev.day}</div></div><span style=\"color:white !important\">${date}</span>`;\n numCell.style.backgroundColor = ev.bgColor;\n numCell.style.color = ev.color;\n });\n };\n\n // extra for tablet and mobile start \n\n if (todayEvent.length && w < 993) {\n numCell.classList.remove('event');\n\n todayEvent.forEach(ev => {\n console.log(todayEvent); // test\n if (ev.date.getMonth() == monthsArr.indexOf(viewedMonth)) {\n console.log(monthsArr.indexOf(viewedMonth)); // test 4 i ne se menuva, juni vo 5\n eventPlan.style.display = 'block';\n console.log(ev.date.getMonth()); // test 4\n\n if (ev.bgColor == 'blue') {\n leftSideBlue.innerHTML += `<div class=\"left-event\">\n <p class=\"date\">${ev.date.getDate()}/${ev.date.getMonth()}/${ev.date.getFullYear()}</p>\n <h5 class=\"title\">${ev.title}</h5>\n <p class=\"hours\">${ev.time}ч</p>\n </div>`;\n numCell.style.backgroundColor = ev.bgColor;\n numCell.style.color = ev.color;\n }\n\n if (ev.bgColor == 'red') {\n rightSideRed.innerHTML += `<div class=\"right-event\">\n <p class=\"date\">${ev.date.getDate()}/${ev.date.getMonth()}/${ev.date.getFullYear()}</p>\n <h5 class=\"title\">${ev.title}</h5>\n <p class=\"hours\">${ev.time}ч</p>\n </div>`;\n numCell.style.backgroundColor = ev.bgColor;\n numCell.style.color = ev.color;\n }\n\n if (ev.bgColor == 'orange') {\n leftSideBlue.innerHTML += `<div class=\"left-event-orange\">\n <p class=\"date\">${ev.date.getDate()}/${ev.date.getMonth()}/${ev.date.getFullYear()}</p>\n <h5 class=\"title\">${ev.title}</h5>\n <p class=\"hours\">${ev.time}ч</p>\n </div>`;\n numCell.style.backgroundColor = ev.bgColor;\n numCell.style.color = ev.color;\n }\n\n }\n\n });\n\n };\n\n } else if (!theseEvents.length) { // ova raboti \n leftSideBlue.innerHTML = '';\n rightSideRed.innerHTML = '';\n eventPlan.style.display = 'none';\n };\n // extra for tablet and mobile ends here\n\n numCell.innerHTML = (numCellEvent == \"\") ?\n `<span>${date}</span>` : numCellEvent;\n\n week.appendChild(numCell);\n\n date++;\n\n } else if (date > totalDays) {\n let emptyCell = document.createElement('div');\n emptyCell.classList.add('empty');\n week.appendChild(emptyCell);\n };\n\n };\n\n calendarCont.appendChild(week);\n };\n\n}", "showEventTimespans() {\n const sortedEvents = [];\n for (const e of Object.keys(this.events.aggregates)) {\n const event = {\n 'name': e,\n };\n const eventInfo = this.events.aggregates[e];\n event.count = eventInfo.count;\n if (e.indexOf('visited-or-redrawn') >= 0) {\n /** Deprecated event for which timespan did not make sense. */\n event.avgTimeMS = '';\n } else {\n event.avgTimeMS = eventInfo.timeMS / eventInfo.count;\n }\n sortedEvents.push(event);\n }\n sortedEvents.sort((e1, e2) => {\n const t1 = e1.avgTimeMS || 0;\n const t2 = e2.avgTimeMS || 0;\n return t2 - t1;\n });\n for (const event of sortedEvents) {\n let rowHTML = '<tr>';\n rowHTML += '<td>' + event.name + '</td>';\n rowHTML += '<td>' + event.count + '</td>';\n let t = event.avgTimeMS;\n if (t) {\n t = Math.round(t);\n }\n rowHTML += '<td>' + t + '</td>';\n rowHTML += '</tr>\\n';\n this.eventsTable.insertAdjacentHTML('beforeend', rowHTML);\n }\n }", "function createEventBubble(event) {\n var bubble = document.createElement('div');\n bubble.className = 'event';\n\n if (event.hidden)\n bubble.className += ' hidden';\n\n bubble.textContent = event.name;\n\n var prefix = '';\n {\n var start = new Date(event.begin * 1000);\n var end = new Date(event.end * 1000);\n\n var padTime = value => ('0' + value).substr(-2);\n\n var startTime = padTime(start.getHours()) + ':' + padTime(start.getMinutes());\n var endTime = padTime(end.getHours()) + ':' + padTime(end.getMinutes());\n\n prefix = '[' + startTime + ' - ' + endTime + '] ';\n }\n\n bubble.title = prefix + event.name;\n bubble.style.width = (((event.end - event.begin) / 3600) * 50 - 5) + 'px';\n\n return bubble;\n }", "function getEvents(element) {\n if(element.children.length === 0) {\n let events = [];\n $.each($._data(element, \"events\"), function(i, event) {\n events.push(event);\n });\n\n if(events.length > 0) {\n events.forEach(event => {\n placeHandler(element, event[0][\"type\"]);\n });\n }\n }\n else {\n for (let i = 0; i < element.children.length; i++)\n getEvents(element.children[i]);\n }\n}", "function VerticalEvent(parent){var _this=_super.call(this,parent)||this;_this.dateRender=[];_this.renderedEvents=[];_this.renderedAllDayEvents=[];_this.overlapEvents=[];_this.moreEvents=[];_this.overlapList=[];_this.allDayEvents=[];_this.slotCount=_this.parent.activeViewOptions.timeScale.slotCount;_this.interval=_this.parent.activeViewOptions.timeScale.interval;_this.allDayLevel=0;_this.startHour=_this.parent.activeView.getStartHour();_this.endHour=_this.parent.activeView.getEndHour();_this.element=_this.parent.activeView.getPanel();_this.fields=_this.parent.eventFields;_this.animation=new sf.base.Animation({progress:_this.animationUiUpdate.bind(_this)});_this.addEventListener();return _this;}", "function generateEvents(eventList) {\n for (let i = 0; i < eventList.length; i++) {\n $('#events').append(\n \"<div class='single-box'>\" +\n\t\t\t\t\t\"<div class='image-holder'>\" +\n\t\t\t\t\t\t\"<img src='./images/eventIcons/\" + eventList[i].image + \"'/>\" +\n\t\t\t\t\t\"</div>\" +\n\t\t\t\t\t\"<div class='grid flex-stretch'>\" +\n\t\t\t\t\t\t\"<div class='text-holder grid-col-1 grid-row-1'>\" +\n\t\t\t\t\t\t\t\"<h3><a href=\" + eventList[i].link + \"target='_blank'>\"+ eventList[i].title +\"</a></h3>\" +\n\t\t\t\t\t\t\"</div>\" +\n\t\t\t\t\t\t\"<div class='text-holder date grid-col-2 grid-row-1'>\" +\n\t\t\t\t\t\t\t\"<p>\" + eventList[i].date + \"</p>\" +\n\t\t\t\t\t\t\"</div>\" +\n\t\t\t\t\t\t\"<div class='grid-col-1-to-2 grid-row-2 text-holder'>\" +\n\t\t\t\t\t\t\t\"<p class='event-text'>\" + eventList[i].description + \"</p>\" +\n\t\t\t\t\t\t\"</div>\" +\n\t\t\t\t\t\t\"<div class='btns-box flex grid-col-3 grid-row-3'>\" +\n\t\t\t\t\t\t\t\"<a href=\" + eventList[i].link + \" target='_blank'>Learn more</a>\" +\n\t\t\t\t\t\t\"</div>\" +\n\t\t\t\t\t\"</div>\" +\n\t\t\t\t\"</div>\"\n\t\t\t);\n\t\t};\n\t}", "renderRow(event) {\n return <EventItem event={event} />;\n }", "function PackEvents( columns, block_width )\n{\n var n = columns.length;\n for (var i = 0; i < n; i++) {\n var col = columns[ i ];\n for (var j = 0; j < col.length; j++)\n {\n var bubble = col[j];\n var colSpan = ExpandEvent(bubble, i, columns);\n bubble.obj.css( 'left', (i / n)*100 + '%' );\n bubble.obj.css( 'width', block_width * colSpan / n - 1 );\n }\n }\n}", "function getCalendarRow() {\n var $table = $('table');\n var $tr = $('<tr/>');\n for (var i = 0, len = 7; i < len; i++) {\n $tr.append($('<td/>'));\n }\n $table.append($tr);\n return $tr;\n}", "function setEvents(events, elementID, from){\n var container = document.getElementById(elementID);\n while(container.firstChild){ container.removeChild(container.firstChild) }\n for(let i=0; i<events.length; i++){\n var div = document.createElement('div');\n div.className = \"event card-1\";\n div.onclick = () => goToEvent(events[i].id, from);\n \n var img = document.createElement('img');\n img.className = \"event_image\";\n img.src = events[i].image;\n div.appendChild(img);\n \n var title = document.createElement('p');\n title.className = \"eventBox_borderBottom\";\n var title_txt = document.createTextNode(events[i].title);\n title.append(title_txt);\n div.appendChild(title);\n \n var date = document.createElement('p');\n date.className = \"date_text\"\n var date_txt = document.createTextNode(createDateString(events[i].date));\n date.append(date_txt);\n div.appendChild(date);\n \n container.appendChild(div);\n }\n}", "getEventsToRender(resource, events) {\n if (resource.timeRanges && resource.timeRanges.length && !this.disabled) {\n events.push(...resource.timeRanges);\n }\n\n return events;\n }", "function displayEvents(events) {\n // Clear canvas\n canvas.innerHTML = '';\n // Add each event to canvas\n _.forEach(layOutDay(events), function(event) {\n canvas.appendChild(_createCalendarElement(event));\n });\n }", "getEventsToRender(resource, events) {\n if (resource.timeRanges && resource.timeRanges.length) {\n events.push(...resource.timeRanges);\n }\n return events;\n }", "function appendMainEvent(x){\n\tvar i;\n\tvar parent = document.getElementById(\"MainEventOutput\");\n\tvar newLine = document.createElement(\"br\");\n\tfor (i = 0; i < x; i++){\n\t\tvar holder = i + 1;\n\t\tvar elementName = \"Event\" + holder;\n\t\t\n\t\t// Creating of Main event Div \n\t\tvar MainEvent = document.createElement(\"div\");\n\t\tMainEvent.setAttribute(\"id\", elementName);\n\n\t\t// Event ID\n\t\tvar eventID = elementName;\n\n\t\t// Event Title Creation\n\t\tvar eventTitle = document.createElement(\"h1\");\n\t\teventTitle.setAttribute(\"id\", eventID+ \"Title\");\n\t\tvar node = document.createTextNode(\"MainEvent \" + holder);\n\t\teventTitle.appendChild(node);\n\t\tMainEvent.appendChild(eventTitle);\n\n\t\t// Creation of Form aspect\n\t\tvar eventForm = document.createElement(\"form\");\n\n\t\t// Event Name Creation\n\t\tvar eventName = document.createElement(\"h2\");\n\t\teventName.appendChild(document.createTextNode(\"EventName: \"));\n\t\tvar eventNameInput = document.createElement(\"input\");\n\t\teventNameInput.setAttribute(\"placeholder\", \"Book of Moron\")\n\t\teventForm.appendChild(eventName);\n\t\teventForm.appendChild(eventNameInput);\n\n\t\t// For now assume its under wordpress but make sure we can render it as a graphic\n\t\tvar eventGraphic = document.createElement(\"h2\");\n\t\teventGraphic.appendChild(document.createTextNode(\"EventGraphic: \"));\n\t\tvar eventGraphicInput = document.createElement(\"input\");\n\t\teventGraphicInput.setAttribute(\"placeholder\", \"Image Graphic URL\");\n\t\teventForm.appendChild(eventGraphic);\n\t\teventForm.appendChild(eventGraphicInput);\n\n\t\t// Event Dates Creation\n\t\tvar eventDates = document.createElement(\"h2\");\n\t\teventDates.appendChild(document.createTextNode(\"Dates: \"));\n\t\tvar eventDatesInput = document.createElement(\"input\");\n\t\teventDatesInput.setAttribute(\"type\", \"date\");\n\t\t// eventDatesInput.setAttribute(\"placeholder\", \"place ,'s between each date if multiple\");\n\t\teventForm.appendChild(eventDates);\n\t\teventForm.appendChild(eventDatesInput);\n\n\t\t// Event Description\n\t\tvar eventDescription = document.createElement(\"h2\");\n\t\teventDescription.appendChild(document.createTextNode(\"Description: \"));\n\t\tvar eventDescriptionInput = document.createElement(\"textarea\");\n\t\teventDescriptionInput.setAttribute(\"placeholder\", \"Description\");\n\t\teventForm.appendChild(eventDescription);\n\t\teventForm.appendChild(eventDescriptionInput);\t\n\n\t\t// Event Ticket\n\t\tvar eventTicket = document.createElement(\"h2\");\n\t\teventTicket.appendChild(document.createTextNode(\"ticketLink: \"));\n\t\tvar eventTicketInput = document.createElement(\"input\");\n\t\teventTicketInput.setAttribute(\"placeholder\", \"Ticket link\");\n\n\t\teventForm.appendChild(eventTicket);\n\t\teventForm.appendChild(eventTicketInput);\n\t\teventForm.appendChild(newLine);\n\t\tMainEvent.appendChild(eventForm);\n\n\t\t// Clear button\n\t\tvar clearButton = document.createElement(\"input\");\n\t\tclearButton.setAttribute(\"type\", \"button\");\n\t\tclearButton.setAttribute(\"id\", eventID);\n\t\tclearButton.setAttribute(\"value\", \"clearButton\");\n\t\tclearButton.setAttribute(\"onclick\", \"clearEvent(this.id); return false;\");\n\t\tMainEvent.appendChild(clearButton);\n\t\tMainEvent.appendChild(newLine);\n\n\t\t// Appending it to Main EventOutput\n\t\tparent.appendChild(MainEvent);\n\t}\n\tvar addNewEvent = document.createElement(\"input\");\n\taddNewEvent.setAttribute(\"type\", \"button\");\n\taddNewEvent.setAttribute(\"value\", \"add Another Event\");\n\taddNewEvent.setAttribute(\"onclick\", \"createMainEvent(); return false;\");\n\tparent.appendChild(addNewEvent);\n}", "renderer() {\n const me = this,\n { scheduler } = me,\n { resourceStore } = scheduler,\n // Determine resource range to draw events for\n { firstResource, lastResource } = me.resourceRange,\n // Date at top and bottom for determining which events to include\n { topDate, bottomDate } = me.dateRange,\n syncConfigs = [];\n\n if (!me.initialized) {\n return;\n }\n\n // Update current time range, reflecting the change on the vertical time axis header\n if (!DateHelper.isEqual(topDate, me.topDate) || !DateHelper.isEqual(bottomDate, me.bottomDate)) {\n // Calculated values used by `renderResource()`\n me.topDate = topDate;\n me.bottomDate = bottomDate;\n me.topDateMS = topDate.getTime();\n me.bottomDateMS = bottomDate.getTime();\n\n me.timeView.range = { topDate, bottomDate };\n }\n\n if (firstResource !== -1 && lastResource !== -1) {\n // Collect all events for resources in view\n for (let i = firstResource; i <= lastResource; i++) {\n syncConfigs.push.apply(syncConfigs, me.renderResource(resourceStore.getAt(i)));\n }\n }\n\n DomHelper.sync({\n elementConfig: {\n onlyChildren: true,\n children: syncConfigs\n },\n targetElement: scheduler.foregroundCanvas,\n useSyncId: true,\n\n // Called by DomHelper when it creates, releases or reuses elements\n callback({ action, config, oldConfig, element }) {\n // If element is an event wrap, trigger appropriate events\n if (config && config.className && config.className[scheduler.eventCls + '-wrap']) {\n const // Some actions are considered first a release and then a render (reusing another element).\n // This gives clients code a chance to clean up before reusing an element\n isRelease = releaseEventActions[action],\n isRender = renderEventActions[action];\n\n // If we are reusing an element that was previously released we should not trigger again\n if (isRelease && oldConfig) {\n const data = oldConfig.elementData.tplData,\n event = {\n tplData: data,\n assignmentRecord: data.assignment,\n eventRecord: data.eventRecord,\n resourceRecord: data.resourceRecord,\n element\n };\n // This event is documented on Scheduler\n scheduler.trigger('releaseEvent', event);\n }\n\n if (isRender) {\n const data = config.elementData.tplData,\n event = {\n tplData: data,\n assignmentRecord: data.assignment,\n eventRecord: data.eventRecord,\n resourceRecord: data.resourceRecord,\n element\n };\n\n // Store element to allow easy mapping from record\n element.elementData.element = element;\n\n event.reusingElement = action === 'reuseElement';\n // This event is documented on Scheduler\n scheduler.trigger('renderEvent', event);\n }\n\n // No changes during sync, but might need to hook up element again in case cache was cleared\n if (action === 'none') {\n config.elementData.element = element;\n }\n }\n }\n });\n\n // Change in displayed resources?\n if (me.firstResource !== firstResource || me.lastResource !== lastResource) {\n // Update header to match\n me.resourceColumns.range = { firstResource, lastResource };\n\n // Store which resources are currently in view\n me.firstResource = firstResource;\n me.lastResource = lastResource;\n }\n }" ]
[ "0.6346088", "0.61836183", "0.61836183", "0.61836183", "0.61836183", "0.61836183", "0.5974763", "0.5743679", "0.5692324", "0.563062", "0.5603325", "0.5543619", "0.55421126", "0.55203176", "0.5512747", "0.5512747", "0.5512747", "0.5484708", "0.54687274", "0.54385126", "0.5429567", "0.54107636", "0.54107636", "0.54107636", "0.539754", "0.5336831", "0.5316845", "0.53117335", "0.52902627", "0.52622324", "0.52579623", "0.5229423", "0.5229423", "0.5229423", "0.5229423", "0.5229423", "0.52220637", "0.51961505", "0.51916665", "0.5178158", "0.5150598", "0.514466", "0.510173", "0.50998753", "0.5098656", "0.509125", "0.5088363", "0.50850445", "0.50792974", "0.5060868", "0.50475585", "0.50375175", "0.5036008", "0.50170803", "0.5007312", "0.49954054", "0.49954054", "0.49954054", "0.49954054", "0.49954054", "0.49876145", "0.49876145", "0.49876145", "0.49841884", "0.49458206", "0.4942512", "0.49424487", "0.49338722", "0.4894812", "0.4894812", "0.4894812", "0.4874352", "0.48722968", "0.48678336", "0.48468432", "0.48345935", "0.48232034", "0.48191217", "0.47876388", "0.47597826", "0.4746705", "0.47425303", "0.47391367", "0.47330323", "0.47255284", "0.47139165", "0.47110403", "0.47083086", "0.47080868", "0.46941906", "0.468865", "0.4687877", "0.46872234", "0.46805343", "0.46654525", "0.46576452" ]
0.73439074
3
Render events onto the calendar. Only responsible for the VISUAL aspect. Not responsible for attaching handlers or calling callbacks. Set `doAppend` to `true` for rendering elements without clearing the existing container. Set `doRowHeights` to allow setting the height of each row, to compensate for vertical event overflow.
function _renderDayEvents(events, doAppend, doRowHeights) { // where the DOM nodes will eventually end up var finalContainer = getDaySegmentContainer(); // the container where the initial HTML will be rendered. // If `doAppend`==true, uses a temporary container. var renderContainer = doAppend ? $("<div/>") : finalContainer; var segments = buildSegments(events); var html; var elements; // calculate the desired `left` and `width` properties on each segment object calculateHorizontals(segments); // build the HTML string. relies on `left` property html = buildHTML(segments); // render the HTML. innerHTML is considerably faster than jQuery's .html() renderContainer[0].innerHTML = html; // retrieve the individual elements elements = renderContainer.children(); // if we were appending, and thus using a temporary container, // re-attach elements to the real container. if (doAppend) { finalContainer.append(elements); } // assigns each element to `segment.event`, after filtering them through user callbacks resolveElements(segments, elements); // Calculate the left and right padding+margin for each element. // We need this for setting each element's desired outer width, because of the W3C box model. // It's important we do this in a separate pass from acually setting the width on the DOM elements // because alternating reading/writing dimensions causes reflow for every iteration. segmentElementEach(segments, function(segment, element) { segment.hsides = hsides(element, true); // include margins = `true` }); // Set the width of each element segmentElementEach(segments, function(segment, element) { element.width( Math.max(0, segment.outerWidth - segment.hsides) ); }); // Grab each element's outerHeight (setVerticals uses this). // To get an accurate reading, it's important to have each element's width explicitly set already. segmentElementEach(segments, function(segment, element) { segment.outerHeight = element.outerHeight(true); // include margins = `true` }); // Set the top coordinate on each element (requires segment.outerHeight) setVerticals(segments, doRowHeights); return segments; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function renderEvents() {\n var totalPercent = 100,\n currentEvent,\n curCol,\n width,\n height,\n leftOffset,\n eventText,\n i,\n j;\n \n // empty container before adding new events\n $el.empty();\n \n // go through all columns\n for (i=0; i<columns.length; i++) {\n \n // go through all events in single column\n for (j=0; j<columns[i].length; j++) {\n currentEvent = columns[i][j];\n \n width = totalPercent / (columnWidths[currentEvent.groupIndex] + 1);\n height = currentEvent.end - currentEvent.start;\n leftOffset = i * width;\n \n // If container is too short, only display event title\n if (height < 45) {\n eventText = \"<h2>Sample Event</h2>\";\n }\n // Otherwise, display event title & location\n else {\n eventText = \"<h2>Sample Event</h2><h3>Sample Location</h3>\";\n }\n \n $el.append('<div class=\"calendarSlot\" style=\"width: ' + width + '%; height:'+ height +'px; top:' + currentEvent.start + 'px; left: ' + leftOffset + '%\">' + eventText + '</div>');\n }\n }\n }", "function renderUI(rows) {\n for (var i = 0; i < rows.length; i++) {\n var columnWidth = 600 / rows[i].columns.length;\n var rowDiv = \"\",\n columnDiv = \"\",\n columnGroup = \"\",\n eventItem = \"\";\n for (var j = rows[i].columns.length - 1; j >= 0; j--) {\n var columns = rows[i].columns[j].events;\n eventItem = \"\";\n for (var k = 0; k < columns.length; k++) {\n eventItem = eventItem + '<div class=\"event-item\" style=\"width:' + columnWidth + 'px;top:' + columns[k].start + 'px;\"><div style=\"background-color:' + columns[k].color + '\"></div><div>' + columns[k].label + '</div></div>';\n }\n columnGroup = columnGroup + '<div class=\"column\" style=\"width:' + columnWidth + 'px;\">' + eventItem + '</div>';\n }\n rowDiv = rowDiv + '<div class=\"row\">' + columnGroup + '</div>';\n $('#eventDisplayArea').append(rowDiv);\n }\n}", "function renderEvents() {\n\t$(\"#event-items\").html(\"\");\n\n\tif (show_events) {\n\t\tvar i = 0;\n\t\t// if (eventsLogList.length > 10) {\n\t\t// \ti = eventsLogList.length - 10;\n\t\t// }\n\t\tfor (;i < eventsLogList.length; i++) {\n\t\t\tvar eventsListItem = $(\"#event-template\").clone();\n\t\t\teventsListItem.html(eventsLogList[i]);\n\t\t\t$(\"#event-items\").append(eventsListItem);\n\t\t\teventsListItem.show();\n\t\t}\n\t}\n\t\t$(\"#event-items\").scrollTop($(\"#event-items\")[0].scrollHeight);\n}", "function renderDayEvents(events, modifiedEventId) {\n\n\t\t// do the actual rendering. Receive the intermediate \"segment\" data structures.\n\t\tvar segments = _renderDayEvents(\n\t\t\tevents,\n\t\t\tfalse, // don't append event elements\n\t\t\ttrue // set the heights of the rows\n\t\t);\n\n\t\t// report the elements to the View, for general drag/resize utilities\n\t\tsegmentElementEach(segments, function(segment, element) {\n\t\t\treportEventElement(segment.event, element);\n\t\t});\n\n\t\t// attach mouse handlers\n\t\tattachHandlers(segments, modifiedEventId);\n\n\t\t// call `eventAfterRender` callback for each event\n\t\tsegmentElementEach(segments, function(segment, element) {\n\t\t\ttrigger('eventAfterRender', segment.event, segment.event, element);\n\t\t});\n\t}", "function renderDayEvents(events, modifiedEventId) {\n\n\t\t// do the actual rendering. Receive the intermediate \"segment\" data structures.\n\t\tvar segments = _renderDayEvents(\n\t\t\tevents,\n\t\t\tfalse, // don't append event elements\n\t\t\ttrue // set the heights of the rows\n\t\t);\n\n\t\t// report the elements to the View, for general drag/resize utilities\n\t\tsegmentElementEach(segments, function(segment, element) {\n\t\t\treportEventElement(segment.event, element);\n\t\t});\n\n\t\t// attach mouse handlers\n\t\tattachHandlers(segments, modifiedEventId);\n\n\t\t// call `eventAfterRender` callback for each event\n\t\tsegmentElementEach(segments, function(segment, element) {\n\t\t\ttrigger('eventAfterRender', segment.event, segment.event, element);\n\t\t});\n\t}", "function renderDayEvents(events, modifiedEventId) {\n\n\t\t// do the actual rendering. Receive the intermediate \"segment\" data structures.\n\t\tvar segments = _renderDayEvents(\n\t\t\tevents,\n\t\t\tfalse, // don't append event elements\n\t\t\ttrue // set the heights of the rows\n\t\t);\n\n\t\t// report the elements to the View, for general drag/resize utilities\n\t\tsegmentElementEach(segments, function(segment, element) {\n\t\t\treportEventElement(segment.event, element);\n\t\t});\n\n\t\t// attach mouse handlers\n\t\tattachHandlers(segments, modifiedEventId);\n\n\t\t// call `eventAfterRender` callback for each event\n\t\tsegmentElementEach(segments, function(segment, element) {\n\t\t\ttrigger('eventAfterRender', segment.event, segment.event, element);\n\t\t});\n\t}", "function renderDayEvents(events, modifiedEventId) {\n\n\t\t// do the actual rendering. Receive the intermediate \"segment\" data structures.\n\t\tvar segments = _renderDayEvents(\n\t\t\tevents,\n\t\t\tfalse, // don't append event elements\n\t\t\ttrue // set the heights of the rows\n\t\t);\n\n\t\t// report the elements to the View, for general drag/resize utilities\n\t\tsegmentElementEach(segments, function(segment, element) {\n\t\t\treportEventElement(segment.event, element);\n\t\t});\n\n\t\t// attach mouse handlers\n\t\tattachHandlers(segments, modifiedEventId);\n\n\t\t// call `eventAfterRender` callback for each event\n\t\tsegmentElementEach(segments, function(segment, element) {\n\t\t\ttrigger('eventAfterRender', segment.event, segment.event, element);\n\t\t});\n\t}", "function renderDayEvents(events, modifiedEventId) {\n\n\t\t// do the actual rendering. Receive the intermediate \"segment\" data structures.\n\t\tvar segments = _renderDayEvents(\n\t\t\tevents,\n\t\t\tfalse, // don't append event elements\n\t\t\ttrue // set the heights of the rows\n\t\t);\n\n\t\t// report the elements to the View, for general drag/resize utilities\n\t\tsegmentElementEach(segments, function(segment, element) {\n\t\t\treportEventElement(segment.event, element);\n\t\t});\n\n\t\t// attach mouse handlers\n\t\tattachHandlers(segments, modifiedEventId);\n\n\t\t// call `eventAfterRender` callback for each event\n\t\tsegmentElementEach(segments, function(segment, element) {\n\t\t\ttrigger('eventAfterRender', segment.event, segment.event, element);\n\t\t});\n\t}", "function displayEvents(events) {\n // Clear canvas\n canvas.innerHTML = '';\n // Add each event to canvas\n _.forEach(layOutDay(events), function(event) {\n canvas.appendChild(_createCalendarElement(event));\n });\n }", "function renderEvent () {\n const daysContainer = document.querySelectorAll(\".current-month-day\");\n const currentMonth = date.getMonth() + 1;\n const currentYear = date.getFullYear();\n //* Calendar days divs pass by\n for (let div of daysContainer) {\n const dayNumber = div.firstChild.innerHTML;\n //* checking that day has events\n if (!!eventsByDate[`${currentYear}-${currentMonth}-${dayNumber}`]) {\n //* Looping thru events in array\n for (let eventObjectId of eventsByDate[`${currentYear}-${currentMonth}-${dayNumber}`]){\n //* Access to event data\n const eventTitle = eventsById[eventObjectId].title;\n const eventType = eventsById[eventObjectId].eventType;\n //* Create of the event element\n let newEvent = document.createElement(\"div\");\n newEvent.classList.add(\"event-in-calendar\");\n newEvent.innerHTML = eventTitle;\n newEvent.setAttribute(\"divEventId\", eventObjectId);\n //* choosing event color depending of event type\n switch (eventType) {\n case 'Study':\n newEvent.classList.add(\"blue-event\");\n break;\n case 'Meeting':\n newEvent.classList.add(\"green-event\");\n break;\n case 'Personal':\n newEvent.classList.add(\"orange-event\");\n break;\n default:\n break;\n }\n newEvent.addEventListener('click', eventModal);\n //* Insert element in DOM\n div.firstChild.insertAdjacentElement('afterend',newEvent);\n }\n }\n }\n}", "function initiateEventsFormatting(events, rows) {\n while (true) {\n var result = createRow(events);\n rows.push(result.row);\n if (result.noOverlapEvents.length) {\n events = result.noOverlapEvents;\n } else {\n break; //Exit loop once noOverlapEvents array is empty and no more events are available to be compared\n }\n }\n}", "renderEvent(events) {\n const domContainer = document.querySelector(\"#containerTwo\");\n domContainer.innerHTML = `<section id=\"containerTwoSection\"></section>`;\n eventContainer = document.querySelector(\"#containerTwoSection\");\n // sorts the list of events by date\n events.sort((a, b) => {\n if (a.date < b.date) {\n return -1;\n } else if (a.date > b.date) {\n return 1;\n } else {\n return 0;\n }\n });\n events.forEach(event => {\n eventContainer.innerHTML += eventHtml.makeEventList(event);\n });\n }", "function renderCal() {\n $('#calendar').fullCalendar('rerenderEvents');\n }", "renderAllEvents() {\n // sort items\n switch (this._sortBy) {\n case SortTypes.time:\n this._eventsFiltered.sort((eventA, eventB) => eventA.duration < eventB.duration ? 1 : -1);\n break;\n case SortTypes.price:\n this._eventsFiltered.sort((eventA, eventB) => eventA.price < eventB.price ? 1 : -1);\n break;\n default:\n this._eventsFiltered.sort((eventA, eventB) => eventA.dateBegin > eventB.dateBegin ? 1 : -1);\n break;\n }\n\n this.elemTripDays.innerHTML = ``;\n\n // array of trip days\n let arrTripDays = [];\n if (this._sortBy !== SortTypes.event) {\n arrTripDays.push(SHOW_NO_DAY);\n } else {\n arrTripDays = uniqueDays(this._eventsFiltered);\n }\n\n // render all days\n if (arrTripDays.length) {\n arrTripDays.forEach(this.renderTripDay.bind(this));\n } else {\n // no event found\n render(this.elemTripEvents, (new NoPoints()).element);\n }\n }", "function createDemoEvents() {\n // Date for the calendar events (dummy data)\n var date = new Date();\n var d = date.getDate(),\n m = date.getMonth(),\n y = date.getFullYear();\n\n return [\n {\n title: 'All Day Event',\n start: new Date(y, m, 1),\n backgroundColor: '#f56954', //red \n borderColor: '#f56954' //red\n },\n {\n title: 'Long Event',\n start: new Date(y, m, d - 5),\n end: new Date(y, m, d - 2),\n backgroundColor: '#f39c12', //yellow\n borderColor: '#f39c12' //yellow\n },\n {\n title: 'Meeting',\n start: new Date(y, m, d, 10, 30),\n allDay: false,\n backgroundColor: '#0073b7', //Blue\n borderColor: '#0073b7' //Blue\n },\n {\n title: 'Lunch',\n start: new Date(y, m, d, 12, 0),\n end: new Date(y, m, d, 14, 0),\n allDay: false,\n backgroundColor: '#00c0ef', //Info (aqua)\n borderColor: '#00c0ef' //Info (aqua)\n },\n {\n title: 'Birthday Party',\n start: new Date(y, m, d + 1, 19, 0),\n end: new Date(y, m, d + 1, 22, 30),\n allDay: false,\n backgroundColor: '#00a65a', //Success (green)\n borderColor: '#00a65a' //Success (green)\n },\n {\n title: 'Open Google',\n start: new Date(y, m, 28),\n end: new Date(y, m, 29),\n url: '//google.com/',\n backgroundColor: '#3c8dbc', //Primary (light-blue)\n borderColor: '#3c8dbc' //Primary (light-blue)\n }\n ];\n }", "function createDemoEvents() {\n // Date for the calendar events (dummy data)\n var date = new Date();\n var d = date.getDate(),\n m = date.getMonth(),\n y = date.getFullYear();\n\n return [\n {\n title: 'All Day Event',\n start: new Date(y, m, 1),\n backgroundColor: '#f56954', //red\n borderColor: '#f56954' //red\n },\n {\n title: 'Long Event',\n start: new Date(y, m, d - 5),\n end: new Date(y, m, d - 2),\n backgroundColor: '#f39c12', //yellow\n borderColor: '#f39c12' //yellow\n },\n {\n title: 'Meeting',\n start: new Date(y, m, d, 10, 30),\n allDay: false,\n backgroundColor: '#0073b7', //Blue\n borderColor: '#0073b7' //Blue\n },\n {\n title: 'Lunch',\n start: new Date(y, m, d, 12, 0),\n end: new Date(y, m, d, 14, 0),\n allDay: false,\n backgroundColor: '#00c0ef', //Info (aqua)\n borderColor: '#00c0ef' //Info (aqua)\n },\n {\n title: 'Birthday Party',\n start: new Date(y, m, d + 1, 19, 0),\n end: new Date(y, m, d + 1, 22, 30),\n allDay: false,\n backgroundColor: '#00a65a', //Success (green)\n borderColor: '#00a65a' //Success (green)\n },\n {\n title: 'Open Google',\n start: new Date(y, m, 28),\n end: new Date(y, m, 29),\n url: '//google.com/',\n backgroundColor: '#3c8dbc', //Primary (light-blue)\n borderColor: '#3c8dbc' //Primary (light-blue)\n }\n ];\n }", "onRenderDone() {\n const {\n scheduler,\n rowMap\n } = this,\n visibleEventDOMConfigs = []; // Concat all rows event configs\n\n rowMap.forEach(eventDOMConfigs => visibleEventDOMConfigs.push.apply(visibleEventDOMConfigs, eventDOMConfigs));\n DomSync.sync({\n domConfig: {\n onlyChildren: true,\n children: visibleEventDOMConfigs\n },\n targetElement: scheduler.foregroundCanvas,\n syncIdField: 'syncId',\n\n // Called by DomHelper when it creates, releases or reuses elements\n callback({\n action,\n domConfig,\n lastDomConfig,\n targetElement\n }) {\n var _domConfig$className;\n\n // If element is a task wrap, trigger appropriate events\n if (action !== 'none' && (domConfig === null || domConfig === void 0 ? void 0 : (_domConfig$className = domConfig.className) === null || _domConfig$className === void 0 ? void 0 : _domConfig$className[`${scheduler.eventCls}-wrap`])) {\n const // Some actions are considered first a release and then a render (reusing another element).\n // This gives clients code a chance to clean up before reusing an element\n isRelease = releaseEventActions[action],\n isRender = renderEventActions[action]; // Trigger release for events (it might be a proxy element, skip those)\n\n if (isRelease && (lastDomConfig === null || lastDomConfig === void 0 ? void 0 : lastDomConfig.elementData)) {\n const {\n eventRecord,\n resourceRecord,\n assignmentRecord\n } = lastDomConfig.elementData,\n event = {\n renderData: lastDomConfig.elementData,\n element: targetElement,\n eventRecord,\n resourceRecord,\n assignmentRecord\n }; // Some browsers do not blur on set to display:none, so releasing the active element\n // must *explicitly* move focus outwards to the view.\n\n if (targetElement === document.activeElement) {\n scheduler.focusElement.focus();\n } // This event is documented on Scheduler\n\n scheduler.trigger('releaseEvent', event);\n }\n\n if (isRender) {\n const {\n eventRecord,\n resourceRecord,\n assignmentRecord\n } = domConfig.elementData,\n event = {\n renderData: domConfig.elementData,\n tplData: domConfig.elementData,\n // DEPRECATED IN 4.0\n element: targetElement,\n isReusingElement: action === 'reuseElement',\n isRepaint: action === 'reuseOwnElement',\n eventRecord,\n resourceRecord,\n assignmentRecord\n }; // This event is documented on Scheduler\n\n scheduler.trigger('renderEvent', event);\n }\n }\n }\n\n }); // There are multiple pathways that might lead to the first render of events. This is the first reliable\n // place were we can determine that something will be rendered\n\n visibleEventDOMConfigs.length && scheduler._firstRenderDone && scheduler._firstRenderDone();\n }", "function renderCalendar() {\n // render month title\n renderMonthTitle(currentMonth, monthTitleEl);\n\n // render days\n renderDays(currentMonth, daysContainerEl);\n }", "function generateEvents(eventList) {\n for (let i = 0; i < eventList.length; i++) {\n $('#events').append(\n \"<div class='single-box'>\" +\n\t\t\t\t\t\"<div class='image-holder'>\" +\n\t\t\t\t\t\t\"<img src='./images/eventIcons/\" + eventList[i].image + \"'/>\" +\n\t\t\t\t\t\"</div>\" +\n\t\t\t\t\t\"<div class='grid flex-stretch'>\" +\n\t\t\t\t\t\t\"<div class='text-holder grid-col-1 grid-row-1'>\" +\n\t\t\t\t\t\t\t\"<h3><a href=\" + eventList[i].link + \"target='_blank'>\"+ eventList[i].title +\"</a></h3>\" +\n\t\t\t\t\t\t\"</div>\" +\n\t\t\t\t\t\t\"<div class='text-holder date grid-col-2 grid-row-1'>\" +\n\t\t\t\t\t\t\t\"<p>\" + eventList[i].date + \"</p>\" +\n\t\t\t\t\t\t\"</div>\" +\n\t\t\t\t\t\t\"<div class='grid-col-1-to-2 grid-row-2 text-holder'>\" +\n\t\t\t\t\t\t\t\"<p class='event-text'>\" + eventList[i].description + \"</p>\" +\n\t\t\t\t\t\t\"</div>\" +\n\t\t\t\t\t\t\"<div class='btns-box flex grid-col-3 grid-row-3'>\" +\n\t\t\t\t\t\t\t\"<a href=\" + eventList[i].link + \" target='_blank'>Learn more</a>\" +\n\t\t\t\t\t\t\"</div>\" +\n\t\t\t\t\t\"</div>\" +\n\t\t\t\t\"</div>\"\n\t\t\t);\n\t\t};\n\t}", "renderEvent(data, rowHeight) {\n const {\n scheduler\n } = this,\n {\n resourceRecord,\n assignmentRecord,\n eventRecord\n } = data,\n // Sync using assignment id for events and event id for ResourceTimeRanges. Add eventId for occurrences to make them unique\n syncId = assignmentRecord // Assignment, might be an occurrence\n ? this.assignmentStore.getOccurrence(assignmentRecord, eventRecord).id // Some thine else, probably a ResourceTimeRange\n : data.eventId,\n // Event element config, applied to existing element or used to create a new one below\n elementConfig = {\n className: data.wrapperCls,\n tabIndex: '0',\n children: [{\n className: data.cls,\n style: data.style || '',\n children: data.children,\n dataset: {\n // Each feature putting contents in the event wrap should have this to simplify syncing and\n // element retrieval after sync\n taskFeature: 'event'\n },\n syncOptions: {\n syncIdField: 'taskBarFeature'\n }\n }, ...data.wrapperChildren],\n style: {\n transform: `translate(${data.left}px, ${data.absoluteTop}px)`,\n // ResourceTimeRanges fill row height, cannot be done earlier than this since row height is not\n // known initially\n height: data.fillSize ? rowHeight : data.height,\n // DomHelper appends px to dimensions when using numbers. Ignore width for milestones\n width: data.width > 0 ? data.width : null,\n zIndex: data.zIndex,\n style: data.wrapperStyle\n },\n dataset: {\n resourceId: resourceRecord.id,\n eventId: data.eventId,\n // Not using eventRecord.id to distinguish between Event and ResourceTimeRange\n syncId\n },\n // Will not be part of DOM, but attached to the element\n elementData: data,\n // Dragging etc. flags element as retained, to not reuse/release it during that operation. Events\n // always use assignments, but ResourceTimeRanges does not\n retainElement: (assignmentRecord || eventRecord).instanceMeta(scheduler).retainElement,\n // Options for this level of sync, lower levels can have their own\n syncOptions: {\n syncIdField: 'taskFeature',\n // Remove instead of release when a feature is disabled\n releaseThreshold: 0\n }\n }; // Do not want to spam dataset with empty prop when not using assignments (ResourceTimeRanges)\n\n if (assignmentRecord) {\n elementConfig.dataset.assignmentId = assignmentRecord.id;\n }\n\n data.elementConfig = elementConfig;\n scheduler.trigger('beforeRenderEvent', {\n renderData: data,\n domConfig: elementConfig\n });\n return elementConfig;\n }", "render() {\n return (\n <div className='calendar-div'>\n {this.renderColumns()}\n {this.renderForm()}\n </div>\n );\n }", "function fillEvents(user_id){ \n \n clearCalendar();\n\n events[user_id].map(function(event){\t\n obj = `<div class=\"row eve ui-widget-content draggable\">\n \t\t\t\t<div class=\"event card\">\n \t <h6>`+event.title+`</h6>\n \t </div>\n \t </div>`;\n $(\"#\"+event.day).append(obj); \n });\n}", "render(){\r\n\r\n\t//If the day of the week falls on the first day of the month, create a Date\r\n // object, otherwise create an empty table data object\r\n var tableRow = [];\r\n var tableRows = [];\r\n var counter = 0;\r\n\r\n //Work out if its the current month, and if so provide today's date\r\n var isThisMonth = false;\r\n var dateFunc = getDateProps();\r\n\r\n if(this.props.year === dateFunc.year && this.props.month === dateFunc.month){\r\n isThisMonth = true\r\n var todaysDate = dateFunc.todaysDate\r\n }\r\n \r\n for(let i = 1; i < 44; i++) {\r\n if(tableRow.length > 6) { //Assign all dates to a row\r\n tableRows.push(<tr key={i}>{tableRow}</tr>);\r\n tableRow = [];\r\n };\r\n if(i === this.props.start) { //Check if the correct first day of the week\r\n counter++ //then activate the counter for the loop below\r\n }\r\n\r\n if(counter >= 1 && counter <= this.props.end) { //Populate with this month's dates\r\n \r\n\t\t\tlet date = new Date(this.props.year + \"-\" + this.props.month + \"-\" + counter)\r\n\t\t\tlet dayEvents = []\r\n\t\t\tlet dayToday;\r\n\t\t\tif(isThisMonth) {\r\n\t\t\t\tif(counter === todaysDate) {\r\n\t\t\t\t\tdayToday = true;\r\n\t\t\t\t} else {\r\n\t\t\t\tdayToday = false;\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\tdayToday = false\r\n\t\t\t}\r\n\t\t\ttableRow.push(<DateObj\r\n\t\t\t key={i} \r\n\t\t\t date={date} \r\n\t\t\t day={counter}\r\n\t\t\t dayToday={dayToday}\r\n\t\t\t dayEvents={dayEvents}/>);\r\n\r\n counter++;\r\n } else if(counter > this.props.end) { //Start again, with the dates for the next month\r\n tableRow.push(<td key={i}></td>)\r\n counter ++;\r\n } else { //For dates that exist in the previous month.\r\n tableRow.push(<td key={i}></td>)\r\n };\r\n };\r\n \r\n\treturn (\r\n <div id=\"calender\" className=\"container-fluid\">\r\n <table className=\"table\" id=\"calender\">\r\n <thead>\r\n <tr id=\"daysOfWeek\">\r\n <th>M</th>\r\n <th>T</th>\r\n <th>W</th>\r\n <th>T</th>\r\n <th>F</th>\r\n <th>S</th>\r\n <th>S</th>\r\n </tr>\r\n </thead>\r\n <tbody>\r\n {tableRows}\r\n </tbody>\r\n </table>\r\n </div>\r\n )\r\n }", "function render() {\n component = new DayCalender(reRender)\n document.getElementById(\"app\").innerHTML = component.render();\n component.attachListener && component.attachListener(); // attach listener only once\n}", "getEventsToRender() {}", "function render_ICalReader_for_main_edt_one_day_all_event(collection, zone, timeInfo) {\n timeInfo = typeof timeInfo !== 'undefined' ? timeInfo : 7;\n var logo = '<img src=\"img/logos/calendar.png\"/>';\n zone.loadImage(\"img/logos/calendar.png\");\n var title = collection.name;\n var tableau = collection.events;\n var eventsNum = 0;\n var time = timeInfo;\n\n var eventsByDays = transform_in_days(tableau);\n\n var daysSort = Object.keys(eventsByDays).sort();\n\n for (var idays = 0; idays < daysSort.length; idays++) {\n var days = daysSort[idays];\n var sortObjectStart = function(a, b) {\n return (a.start - b.start);\n };\n\n eventsByDays[days][days].sort(sortObjectStart);\n\n var elementsCollec = eventsByDays[days];\n\n var start = elementsCollec['days'][0];\n var elementsArray = elementsCollec[start];\n\n var listDicoElts = new Array();\n\n var date = get_date_from_timestamp(start);\n eventsNum = 0;\n\n content = \"<div id='ICalReader' class='main_div_zone1'>\";\n\n if (is_same_date(date, get_current_date()))\n content += \"<div class='calendar_dates_multiple_element_hour_top'>Aujourd'hui</div>\";\n else\n content += \"<div class='calendar_dates_multiple_element_hour_top'>\" + date.day + \" \" + date.month + \"</div>\";\n\n content += \"<div class='calendar_one_day_all_event'>\";\n content += \"<table class='calendarTable' border='0'>\";\n\n for (var indice = 0; indice < elementsArray.length; indice++) {\n elements = elementsArray[indice];\n\n if (!pastEvent(elements)) {\n eventsNum++;\n if ((eventsNum) % 3 == 0) {\n var summary = elements.summary;\n if (elements.summary.length >= 100)\n summary = elements.summary.substring(0, 100) + \"...\";\n\n if (inProgress(elements))\n content += \"<tr class='inProgress_synth'>\";\n else\n content += \"<tr >\";\n content += \"<td class='tableDate'>\" + render_date_edt_synth(elements) + \"</td>\";\n if (elements.location) {\n content += \"<td class='tableSum'>\" + summary + \"</td>\";\n content += \"<td class='tableLoc'>\" + elements.location.substring(0, 20) + \"</td>\";\n }\n else {\n content += \"<td class='tableSum' colspan=2>\" + summary + \"</td>\";\n }\n content += \"</tr>\";\n\n content += \"</table>\";\n content += \"</div>\";\n content += \"</div>\";\n content += \"<div class='smooth'> </div>\";\n var dico = {\"content\": content, \"logo\": logo, \"title\": title, \"time\": time};\n zone.pushInfo(dico);\n\n content = \"<div id='ICalReader' class='main_div_zone1'>\";\n\n if (is_same_date(date, get_current_date()))\n content += \"<div class='calendar_dates_multiple_element_hour_top'>Aujourd'hui</div>\";\n else\n content += \"<div class='calendar_dates_multiple_element_hour_top'>\" + date.day + \" \" + date.month + \"</div>\";\n\n content += \"<div class='calendar_one_day_all_event'>\";\n content += \"<table class='calendarTable'>\";\n }\n else {\n var summary = elements.summary;\n if (elements.summary.length >= 100)\n summary = elements.summary.substring(0, 100) + \"...\";\n\n if (inProgress(elements))\n content += \"<tr class='inProgress_synth'>\";\n else\n content += \"<tr >\";\n content += \"<td class='tableDate'>\" + render_date_edt_synth(elements) + \"</td>\";\n if (elements.location) {\n content += \"<td class='tableSum'>\" + summary + \"</td>\";\n content += \"<td class='tableLoc'>\" + elements.location.substring(0, 20) + \"</td>\";\n }\n else {\n content += \"<td class='tableSum' colspan=2>\" + summary + \"</td>\";\n }\n content += \"</tr>\";\n }\n if (indice + 1 == elementsArray.length) {\n if ((eventsNum) % 3 != 0) {\n content += \"</table>\";\n content += \"</div>\";\n content += \"</div>\";\n content += \"<div class='smooth'> </div>\";\n var dico = {\"content\": content, \"logo\": logo, \"title\": title, \"time\": time};\n zone.pushInfo(dico);\n }\n }\n }\n }\n }\n}", "function renderEvents(timing) {\n //Get today's date\n let dateNow = new Date();\n let eventList = events.map( (event,i) => {\n //Get the date of the event...\n let eventDate = new Date(event.date)\n //...and only render if it meets requirements\n if ( (eventDate<dateNow && timing==='past') || (eventDate>dateNow && timing==='upcoming') ) {\n return <EventWidget key={event.id} event={event} index={i}/>\n }\n }).filter(event=>event);\n\n console.log('The current eventList:',eventList,timing);\n \n\n if (eventList.length>0) {\n return eventList;\n } else {\n return <NoEventsMessage>There are no {timing} events.</NoEventsMessage>\n }\n }", "function renderCalendar() {\n\n function renderCalendarViewRender(view, element) {\n scheduled.currentViewType = view.type;\n // this event fires once the calendar has completed loading and when the date is changed - thus calling the new events\n var start = moment(view.start).format('DD-MM-YYYY');\n var end = moment(view.end).format('DD-MM-YYYY');\n if(scheduled.currentViewType == 'month') {\n // if the current 'start' date of the selected month is not the same as the actual month then set the scheduled.calendarDate to the first of the proper month\n var currentStartMonth = moment(start, 'DD-MM-YYYY').format('MM-YYYY');\n var currentMonth = moment(view.title, 'MMMM YYYY').format('MM-YYYY');\n if(currentStartMonth != currentMonth) {\n scheduled.calendarDate = moment(view.title, 'MMMM YYYY').startOf('month').format('DD-MM-YYYY');\n }\n else {\n scheduled.calendarDate = start;\n }\n } else {\n scheduled.calendarDate = start;\n }\n updateCalendar(start, end);\n }\n\n\n $('#schedule-calendar').fullCalendar({\n header: {\n left: 'prev,next today',\n center: 'title',\n right: 'month,agendaWeek,agendaDay',\n },\n eventRender: function (event, element) {\n //Show tooltip when hovering over an event title\n var toolTipContent = '<strong>' + event.title + '</strong><br/>' + moment(event.start).format('MMMM D, YYYY') + ' ' + moment(event.start).format('h:mma');\n /*element.qtip({\n content: toolTipContent,\n hide: {fixed: true, delay: 200},\n style: 'qtip-light',\n position: {\n my: 'bottom center',\n at: 'top center',\n target: 'mouse',\n viewport: $('#fullcalendar'),\n adjust: {\n x: 0,\n y: -10,\n mouse: false,\n scroll: false,\n },\n },\n });*/\n },\n\n viewRender: renderCalendarViewRender,\n\n timeFormat: 'h:mma',\n firstDay: 1,\n aspectRatio: 2,\n defaultView: scheduled.currentViewType,\n fixedWeekCount: false,\n editable: false,\n lazyFetch: false,\n defaultDate: moment(scheduled.calendarDate, 'DD-MM-YYYY')\n });\n\n log.info('calendar start date ' + moment(scheduled.calendarDate, 'DD-MM-YYYY').format('DD-MM-YYYY'))\n }", "function showCalendar(month, year, event) {\n\n let today = new Date();\n let firstDay = new Date(year, month).getDay();\n let totalDays = 32 - new Date(year, month, 32).getDate();\n // Calendar container with monthly numbers of days\n let calendarCont = document.querySelector('.month-num');\n // 'month - year' in selection of previous and nest \n let monthYear = document.querySelector('.month-year');\n let viewedMonth = monthsArr[month]; // test\n console.log(viewedMonth);\n monthYear.innerHTML = `${monthsArr[month]} ${year}`;\n calendarCont.innerHTML = \"\";\n // scheduled events for a specific month of the year\n let theseEvents = event.filter(even => even.date.getFullYear() == year && even.date.getMonth() == month);\n console.log(theseEvents); // test\n\n let date = 1;\n\n for (let i = 0; i < 6; i++) {\n let week = document.createElement('div');\n week.classList.add('weeks');\n\n for (let j = 0; j < 7; j++) {\n\n if (i == 0 && j < firstDay) {\n let emptyCell = document.createElement('div');\n emptyCell.classList.add('empty');\n week.appendChild(emptyCell);\n\n } else if (date <= totalDays) {\n let numCell = document.createElement('div');\n numCell.classList.add('num');\n\n if (date == today.getDate() && month == today.getMonth() && year == today.getFullYear()) {\n numCell.classList.add('today');\n };\n\n let numCellEvent = \"\";\n\n let w = window.innerWidth;\n let eventPlan = document.querySelector('.event-plan');\n let leftSideBlue = document.querySelector('.blue');\n let rightSideRed = document.querySelector('.red');\n\n if (theseEvents.length) {\n let todayEvent = theseEvents.filter(eve => eve.date.getDate() == date);\n console.log(todayEvent); // test\n\n if (todayEvent.length && w > 992) {\n numCell.classList.add('event');\n\n todayEvent.forEach(ev => {\n numCellEvent += `<div class=\"eve\" style=\"border-left:4px solid ${ev.bgColor}\"><div>${ev.title}</div><div>${ev.time}</div><div>${ev.day}</div></div><span style=\"color:white !important\">${date}</span>`;\n numCell.style.backgroundColor = ev.bgColor;\n numCell.style.color = ev.color;\n });\n };\n\n // extra for tablet and mobile start \n\n if (todayEvent.length && w < 993) {\n numCell.classList.remove('event');\n\n todayEvent.forEach(ev => {\n console.log(todayEvent); // test\n if (ev.date.getMonth() == monthsArr.indexOf(viewedMonth)) {\n console.log(monthsArr.indexOf(viewedMonth)); // test 4 i ne se menuva, juni vo 5\n eventPlan.style.display = 'block';\n console.log(ev.date.getMonth()); // test 4\n\n if (ev.bgColor == 'blue') {\n leftSideBlue.innerHTML += `<div class=\"left-event\">\n <p class=\"date\">${ev.date.getDate()}/${ev.date.getMonth()}/${ev.date.getFullYear()}</p>\n <h5 class=\"title\">${ev.title}</h5>\n <p class=\"hours\">${ev.time}ч</p>\n </div>`;\n numCell.style.backgroundColor = ev.bgColor;\n numCell.style.color = ev.color;\n }\n\n if (ev.bgColor == 'red') {\n rightSideRed.innerHTML += `<div class=\"right-event\">\n <p class=\"date\">${ev.date.getDate()}/${ev.date.getMonth()}/${ev.date.getFullYear()}</p>\n <h5 class=\"title\">${ev.title}</h5>\n <p class=\"hours\">${ev.time}ч</p>\n </div>`;\n numCell.style.backgroundColor = ev.bgColor;\n numCell.style.color = ev.color;\n }\n\n if (ev.bgColor == 'orange') {\n leftSideBlue.innerHTML += `<div class=\"left-event-orange\">\n <p class=\"date\">${ev.date.getDate()}/${ev.date.getMonth()}/${ev.date.getFullYear()}</p>\n <h5 class=\"title\">${ev.title}</h5>\n <p class=\"hours\">${ev.time}ч</p>\n </div>`;\n numCell.style.backgroundColor = ev.bgColor;\n numCell.style.color = ev.color;\n }\n\n }\n\n });\n\n };\n\n } else if (!theseEvents.length) { // ova raboti \n leftSideBlue.innerHTML = '';\n rightSideRed.innerHTML = '';\n eventPlan.style.display = 'none';\n };\n // extra for tablet and mobile ends here\n\n numCell.innerHTML = (numCellEvent == \"\") ?\n `<span>${date}</span>` : numCellEvent;\n\n week.appendChild(numCell);\n\n date++;\n\n } else if (date > totalDays) {\n let emptyCell = document.createElement('div');\n emptyCell.classList.add('empty');\n week.appendChild(emptyCell);\n };\n\n };\n\n calendarCont.appendChild(week);\n };\n\n}", "renderEvent(data) {\n const me = this,\n eventIdProperty = me.view.scheduledEventName + 'Id',\n eventId = data[eventIdProperty],\n layoutCache = me.cache.getTimeSpan(eventId, data.resourceId),\n renderedEvents = me.cache.getRenderedEvents(data.resourceId),\n meta = data.event.instanceMeta(me.scheduler),\n // Event might be flagged to require a new element in onEventAdd, but if it is a drag proxy it should still\n // reuse an existing element (it will be correctly linked to the drag proxy element)\n wrapperElement = me.renderTimeSpan(\n data,\n layoutCache,\n renderedEvents[data.id],\n meta.requireElement && !meta.fromDragProxy\n );\n\n if (data.assignment) {\n wrapperElement.dataset.assignmentId = data.assignment.id;\n }\n\n // Add event/task id to wrappers dataset\n // Otherwise event element won't have event id property in it's dataset and scheduler\n // won't be able to resolve event by element reference (#8943)\n if (eventId) {\n wrapperElement.dataset[eventIdProperty] = eventId;\n }\n\n renderedEvents[data.id] = data;\n\n if (meta.requireElement) {\n delete meta.requireElement;\n delete meta.fromDragProxy;\n }\n\n // This event is documented on Scheduler\n me.scheduler.trigger('renderEvent', {\n eventRecord: data.event,\n resourceRecord: data.resource,\n assignmentRecord: data.assignment,\n element: wrapperElement,\n tplData: data\n });\n }", "function renderNewEventsView(newArray) {\n let programDiv = document.getElementById(\"programme\");\n programDiv.innerHTML = \"\";\n if (newArray.length === 0) {\n let errorDiv = document.createElement(\"div\");\n errorDiv.classList.add(\"error\");\n errorDiv.innerHTML = \"Oops! Nothing to show\";\n programDiv.appendChild(errorDiv);\n }\n\n newArray.forEach(event => {\n\n let sectionElement = document.createElement(\"section\");\n sectionElement.classList.add(\"event-entry\");\n sectionElement.setAttribute(\"id\", \"event-\" + event.id);\n let leftColumn = document.createElement(\"div\");\n leftColumn.classList.add(\"left-column\");\n let rightColumn = document.createElement(\"div\");\n rightColumn.classList.add(\"right-column\");\n sectionElement.appendChild(leftColumn);\n sectionElement.appendChild(rightColumn);\n programDiv.appendChild(sectionElement);\n\n //start of left column\n let aElement = document.createElement(\"a\");\n aElement.setAttribute(\"href\", event.link);\n aElement.setAttribute(\"alt\", \"read more about \" + event.title.rendered);\n\n if (event.featured_media != 0) {\n let imgElement = document.createElement(\"img\");\n imgElement.classList.add(\n \"attachment-medium\",\n \"size-medium\",\n \"wp-post-image\"\n );\n if (event._embedded == undefined || event._embedded[\"wp:featuredmedia\"] == undefined){\n imgElement.setAttribute(\n \"src\", \" \");\n }\n else if (event._embedded[\"wp:featuredmedia\"][0].media_details.sizes.medium != undefined) {\n imgElement.setAttribute(\n \"src\",\n event._embedded[\"wp:featuredmedia\"][0].media_details.sizes.medium.source_url\n );\n } else {\n imgElement.setAttribute(\n \"src\",\n event._embedded[\"wp:featuredmedia\"][0].source_url\n );\n }\n aElement.appendChild(imgElement);\n leftColumn.appendChild(aElement);\n }\n\n let links = document.createElement(\"div\"),\n linksArray = [];\n links.classList.add(\"links\");\n\n //website\n if (event.extra_meta._event_cpt_organizer_website) {\n linksArray['website'] = event.extra_meta._event_cpt_organizer_website;\n }\n //facebook\n if (event.extra_meta._event_cpt_organizer_facebook) {\n linksArray['facebook'] = event.extra_meta._event_cpt_organizer_facebook;\n }\n //twitter\n if (event.extra_meta._event_cpt_organizer_twitter) {\n linksArray['twitter'] = event.extra_meta._event_cpt_organizer_twitter;\n }\n //instagram\n if (event.extra_meta._event_cpt_organizer_instagram) {\n linksArray['instagram'] = event.extra_meta._event_cpt_organizer_instagram;\n }\n\n Object.keys(linksArray).forEach(linkTitle => {\n //console.log(linkTitle+' with url: '+linksArray[linkTitle]);\n let aEl = document.createElement(\"a\"),\n spanEl = document.createElement(\"span\"),\n imgEl = document.createElement(\"img\");\n\n aEl.setAttribute(\n \"href\",\n linksArray[linkTitle]\n );\n aEl.setAttribute(\"target\", \"_blank\");\n aEl.setAttribute(\"rel\", \"noopener\");\n\n spanEl.classList.add(\"screen-reader-text\");\n spanEl.innerHTML = linkTitle;\n\n aEl.appendChild(spanEl);\n //New SVG icon format <img src=\"your.svg\" onerror=\"this.src='your.png'\">\n imgEl.setAttribute('width', 22);\n imgEl.setAttribute('height', 22);\n imgEl.setAttribute('style', 'max-height:22px; margin-top:6px;');\n imgEl.classList.add('icon');\n imgEl.setAttribute('src', currentHost + '/wp-content/plugins/events_plugin/src/assets/img/' + linkTitle + '-icon.svg');\n imgEl.setAttribute('onerror', 'this.src='+ currentHost + '/wp-content/plugins/events_plugin/src/assets/img/' + linkTitle + '-icon.png');\n aEl.appendChild(imgEl);\n\n links.appendChild(aEl);\n\n });\n\n leftColumn.appendChild(links);\n\n //start of right column\n //header\n let headerEl = document.createElement('header'),\n headerTwo = document.createElement(\"h2\"),\n divEl = document.createElement('div');\n\n headerEl.classList.add('event-header');\n headerTwo.classList.add(\"event-title\");\n\n let aRightElement = document.createElement(\"a\");\n aRightElement.setAttribute(\"href\", event.link);\n aRightElement.setAttribute(\n \"alt\",\n \"read more about \" + event.title.rendered\n );\n aRightElement.innerHTML = event.title.rendered;\n\n headerTwo.appendChild(aRightElement);\n headerEl.appendChild(headerTwo);\n\n if (event.extra_meta._event_cpt_main_organizer) {\n let mainOrganiser = event.extra_meta._event_cpt_main_organizer[0];\n divEl.classList.add('event-by');\n divEl.innerHTML = 'by ' + mainOrganiser;\n headerEl.appendChild(divEl);\n }\n\n rightColumn.appendChild(headerEl);\n\n //event_types\n let typeDivElement = document.createElement(\"div\");\n typeDivElement.classList.add(\"entry-meta\");\n if (\n event._embedded != undefined &&\n event._embedded[\"wp:term\"] != undefined\n ) {\n let typesArray = event._embedded[\"wp:term\"][0],\n typesList = '';\n typesArray.forEach(function(t){\n typesList += t.name + ' | ';\n })\n typesList = typesList.substring(0, typesList.length - 3);\n typeDivElement.innerHTML = typesList;\n } else {\n typeDivElement.innerHTML = \"\";\n }\n\n // headerTwo.appendChild(titleDivElement);\n rightColumn.appendChild(typeDivElement);\n\n let eventDate = document.createElement(\"p\");\n eventDate.classList.add(\"date\");\n // eventDate.innerHTML = date;\n if (\n event.extra_meta._event_cpt_date_event === undefined ||\n event.extra_meta._event_cpt_startTime_event === undefined ||\n event.extra_meta._event_cpt_endTime_event === undefined\n ) {\n var span = document.createElement(\"span\");\n span.setAttribute(\"style\", \"color: #f00\");\n span.innerHTML = \"Date and/or time not set yet\";\n eventDate.appendChild(span);\n } else {\n eventDate.innerHTML =\n getLongDate(event.extra_meta._event_cpt_date_event) +\n \" \" +\n event.extra_meta._event_cpt_startTime_event +\n \" - \" +\n event.extra_meta._event_cpt_endTime_event;\n }\n rightColumn.appendChild(eventDate);\n\n let eventLocation = document.createElement(\"p\"),\n locationTxt = '';\n\n eventLocation.classList.add(\"location\");\n\n if (event.extra_meta._event_cpt_venue) {\n locationTxt += event.extra_meta._event_cpt_venue;\n }\n\n if (event.extra_meta._event_cpt_area) {\n locationTxt += \", \" + event.extra_meta._event_cpt_area;\n }\n\n eventLocation.innerHTML = locationTxt;\n\n rightColumn.appendChild(eventLocation);\n\n let eventPrice = document.createElement(\"p\");\n eventPrice.classList.add(\"Price\");\n if ((event.extra_meta._event_cpt_price_event == undefined) || event.extra_meta._event_cpt_price_event == '0.00') {\n eventPrice.innerHTML = \"Free \";\n } else if (event.extra_meta._event_cpt_price_event == '-1') {\n eventPrice.innerHTML = \"Entry by donation\";\n } else {\n eventPrice.innerHTML = \"£\" + parseFloat(event.extra_meta._event_cpt_price_event).toFixed(2);\n }\n rightColumn.appendChild(eventPrice);\n });\n}", "function drawDayEvent() {\r\n if (eventSource != null) {\r\n $.each(eventSource, function (i, result) {\r\n $(\"#evxDay\" + formatJsonSimple(result.StartDate)).append('<tr><td width=\"100%\" valign=\"top\"><img id=\"imgApproved' + result.Id + '\" style=\"display:none\" border=\"0\" align=\"absmiddle\" title=\"Đã chấp nhận\" src=\"' + urlRoot + 'images/img_Calendar/icon_approved.gif\"><img id=\"imgRejected' + result.Id + '\" style=\"display:none\" border=\"0\" align=\"absmiddle\" title=\"Đã từ chối\" src=\"' + urlRoot + 'images/img_Calendar/icon_rejected.gif\"><a id=\"lnkViewId' + result.Id + '\" href=\"javascript:;\" onclick=\"viewEventDetail(' + result.Id + ')\">' + formatDateTime(result.StartDate) + ' ' + result.Title + '</a></td></tr>');\r\n /* cai dat hien thi cac icon trang thai */\r\n if (result.Status == 2) {\r\n $(\"#imgApproved\" + result.Id).attr(\"style\", \"\");\r\n }\r\n else if (result.Status == 3) {\r\n $(\"#imgRejected\" + result.Id).attr(\"style\", \"\");\r\n }\r\n else if (result.Status == 4) {\r\n $(\"#lnkViewId\" + result.Id).html('<strike>' + $(\"#lnkViewId\" + result.Id).text() + '</strike>');\r\n $(\"#lnkViewId\" + result.Id).attr(\"style\", \"color: red\");\r\n $(\"#lnkViewId\" + result.Id).attr(\"title\", \"Đã hủy\");\r\n $(\"#lnkViewId\" + result.Id).attr(\"alt\", \"Đã hủy\");\r\n }\r\n });\r\n }\r\n}", "render() {\n\n let result;\n\n if (Object.keys(this.props.eventObj).length === 0 && this.props.eventObj.constructor === Object) {\n result = (\n <div>\n </div>\n );\n } else {\n let dateArray = this.props.eventObj.dateArray;\n\n result = (\n <div>\n <br />\n <div className='row center-xs'>\n <label style={styles.formLabel}> {this.getEventInformation()} </label>\n </div>\n <br />\n <div className='row center-xs'>\n <label style={styles.formLabel}> The Event Table </label>\n </div>\n <br />\n <div className='row'>\n <div className='col-xs-offset-2 col-xs-4'>\n <label style={styles.formLabel3}> No of people who entered the available dates: </label>\n </div>\n <div className='col-xs'>\n <label style={styles.formLabel2}> {this.props.eventObj.attendees.length} </label>\n </div>\n </div>\n <br />\n <div className='row center-xs'>\n <Table\n rowsCount={dateArray.length}\n rowHeight={50}\n width={800}\n height={50 * (dateArray.length + 1)}\n headerHeight={50}\n >\n <Column\n header={<Cell>Dates</Cell>}\n cell={props => (\n <Cell {...props}>\n {dateArray[props.rowIndex]}\n </Cell>\n )}\n fixed={true}\n width={180}\n />\n {this.fillFreeStatus()}\n {this.fillMaybeStatus()}\n {this.fillBusyStatus()}\n {this.fillAttendeeDetails()}\n </Table>\n </div>\n <br />\n {this.toggleCastAttendance()}\n </div>\n );\n }\n return result;\n }", "function renderEntries() {\n //For each holiday array in holidaysAvailable\n $holidaysAvailable.forEach(function (holiday) {\n //Create a div object of class \"holidayEntry\"\n var $div = $('<div class=\"holidayEntry\"></div>');\n //Set the css of the div, setting it's background image and size, width, minimum height...\n //...margins, padding, position and overflow\n $div.css({'background-image': 'url(' + holiday.image + ')',\n 'width': '100%',\n 'min-height': '460px',\n 'background-repeat': 'no-repeat',\n '-webkit-background-size': '100% 460px',\n '-moz-background-size': '100% 460px',\n '-o-background-size': '100% 460px',\n 'background-size': '100% 460px',\n 'margin-bottom': '50px',\n 'margin-left': '0px',\n 'margin-right': '0px',\n 'margin-top': '0px',\n 'padding': '0px',\n 'position': 'relative',\n 'overflow': 'auto'\n });\n //Create a div of class \"row1\" and set it's display, align and width css values\n var $divRow1 = $('<div class=\"row1\"></div>').css({\n 'display': 'inline-flex',\n 'vertical-align': 'top',\n 'width': '100%'\n });\n //Create a div of class \"row1names\", setting it's width, height, background colour (transparent)...\n //...padding, text align and sizing css values\n var $divR1Pt1 = $('<div class=\"row1names\"></div>').css({\n 'width': '75%',\n 'height': 'auto',\n 'background-color': 'rgba(212,240,255,0.9)',\n 'padding-left': '13px',\n 'padding-right': '20%',\n 'vertical-align': 'top',\n 'text-align': 'left',\n '-webkit-box-sizing': 'border-box', /* Safari/Chrome, other WebKit */\n '-moz-box-sizing': 'border-box', /* Firefox, other Gecko */\n 'box-sizing': 'border-box' /* Opera/IE 8+ */\n });\n //Create a paragraph object of class \"hotelName\", setting it's colour, font size, overflow, word break...\n //...and hyphens css values\n var $text1 = $('<p><strong class=\"hotelName\">' + holiday.hotelName + '</strong></p>').css({\n 'color': '#000080',\n 'font-size': '22px',\n 'overflow-wrap': 'break-all',\n 'word-break': 'break-all',\n /* Adds a hyphen where the word breaks, if supported (No Blink) */\n '-ms-hyphens': 'auto',\n '-moz-hyphens': 'auto',\n '-webkit-hyphens': 'auto',\n '-o-hyphens': 'auto',\n 'hyphens': 'auto'\n });\n //Create a span for the star rating column, setting it's float and white-space css values\n var $starCol = $('<span></span>').append({\n 'float': 'left',\n 'white-space': 'nowrap'\n });\n //From 0 to the holiday's starRating value\n for (var i = 0; i < holiday.starRating; i++) {\n //Create an img element of class \"starRatingImg\", setting it's src and it's width, height...\n //...display and sizing css values\n var $star = $('<img class=\"starRatingImg\" src=\"assets/star.png\"></img>').css({\n 'width': '15px',\n 'height': '15px',\n 'display': 'inline',\n '-webkit-box-sizing': 'border-box'\n });\n //If the counting index is 0 (i.e. the beginning)\n if (i === 0) {\n //Set this star instance a left margin of 6 pixels\n $star.css({'margin-left': '6px'});\n }\n //Append the current star img element inside the starCol\n $starCol.append($star);\n }\n //Append the star column inside the text1 \"hotelName\" element\n $text1.append($starCol);\n //Create a paragraph element of class \"cityAndCountry\", setting it's colour and font size css values.\n //This element will store the holiday's city and country values\n var $text2 = $('<p class=\"cityAndCountry\">' + holiday.location.city + ', ' + holiday.location.country + '</p>').css({\n 'color': '#000080',\n 'font-size': '16px'\n });\n //Create a div elemnet of class \"row1price\", setting it's background colour, width, height, left border...\n //...line height, white space, position, padding, alignment and sizing css values\n var $divR1Pt2 = $('<div class=\"row1price\"></div>').css({'background-color': '#FFFF00',\n 'width': '25%',\n 'height': 'auto',\n 'border-left': '2px solid #000080',\n 'line-height': '2px',\n 'white-space': 'normal',\n 'position': 'relative',\n 'padding': '10px',\n 'vertical-align': 'center',\n 'text-align': 'left',\n '-webkit-box-sizing': 'border-box', /* Safari/Chrome, other WebKit */\n '-moz-box-sizing': 'border-box', /* Firefox, other Gecko */\n 'box-sizing': 'border-box' /* Opera/IE 8+ */\n });\n //Create a paragraph object of class \"priceText\", setting it's colour and font size css values\n var $text3 = $('<p class=\"priceText\"><strong>Holiday Price</strong></p>').css({\n 'color': '#000080',\n 'font-size': '16px'\n });\n //Create a paragraph object of class \"priceDouble\", setting it's colour and font size css values...\n //...This element stores the holiday's price value, using toFixed to convert the number ...\n //...to string as well as limit decimal places to 2\n var $text4 = $('<p><strong class=\"priceDouble\">&pound' + holiday.price.toFixed(2) + '</strong></p>').css({\n 'color': '#000080',\n 'font-size': '26px'\n });\n //Append the first text element (hotelName) to div row 1 part 1\n $divR1Pt1.append($text1);\n //Append the second text element (cityAndCountry) to div row 1 part 1\n $divR1Pt1.append($text2);\n //Append the third text element (priceText) to div row 1 part 2\n $divR1Pt2.append($text3);\n //Append the fouth text element (priceDouble) to div row 1 part 2\n $divR1Pt2.append($text4);\n //Append the div row 1 part 1 to the first div row\n $divRow1.append($divR1Pt1);\n //Append the div row 1 part 2 to the first div row\n $divRow1.append($divR1Pt2);\n //Append the first div row to the main div\n $div.append($divRow1);\n //Create div object of class \"row2\", setting the box shadow, background colour, width, height, position...\n //...margin top, overflow and float css values\n var $divRow2 = $('<div class=\"row2\"></div>').css({\n 'box-shadow': '0 3px 2px -2px gray',\n 'background-color': '#0080FF',\n 'width': '100%',\n 'height': 'auto',\n 'position': 'inherit',\n 'margin-top': '286px',\n 'overflow': 'hidden',\n 'float': 'left'\n });\n //Create a div of class row2pt1, setting it's width, height, vertical and text align, left and right padding...\n //...colour, display and float css values\n var $divRow2pt1 = $('<div class=\"row2pt1\"></div>').css({\n 'width': '75%',\n 'height': 'auto',\n 'vertical-align': 'top',\n 'text-align': 'left',\n 'padding-left': '15px',\n 'padding-right': '15px',\n 'color': '#FFF',\n 'display': 'inline',\n 'float': 'left'\n\n });\n //Variable for offspring (children and infant values)\n var offspring;\n //If the number of children and infants do not equal 0\n if (holiday.passengers.children !== 0 && holiday.passengers.infants !== 0) {\n //Set the offspring variable as a string featuring the number of children and infants\n offspring = \", <strong>\" + holiday.passengers.children + \"</strong> children & <strong>\" + holiday.passengers.infants + \"</strong> infants\";\n //If the number of children equals 1\n if (holiday.passengers.children === 1) {\n //Replace the word \"children\" in the offspring string as \"child\"\n offspring = offspring.replace(\"children\", \"child\");\n }\n //If the number of infants equals 1\n if (holiday.passengers.infants === 1) {\n //Replace the word \"infants\" in the offspring string as \"infant\"\n offspring = offspring.replace(\"infants\", \"infant\");\n }\n //Otherwise, if the number of children does not equal, but the number of infants does\n } else if (holiday.passengers.children !== 0 && holiday.passengers.infants === 0) {\n //Set the offspring variable as a string featuring the number of children\n offspring = \" & <strong>\" + holiday.passengers.children + \"</strong> children\";\n //If the number of children equals 1\n if (holiday.passengers.children === 1) {\n //Replace the word \"children\" in the offspring string as \"child\"\n offspring = offspring.replace(\"children\", \"child\");\n }\n //Otherwise, if the number of children equal 0, but the number of infants do not\n } else if (holiday.passengers.children === 0 && holiday.passengers.infants !== 0) {\n //Set the offspring variable as a string featuring the number of infants\n offspring = \" & <strong>\" + holiday.passengers.infants + \"</strong> infants\";\n //If the number of infants equals 1\n if (holiday.passengers.infants === 1) {\n //Replace the word \"infants\" in the offspring string as \"infant\"\n offspring = offspring.replace(\"infants\", \"infant\");\n }\n }\n //Create a div storing a paragraph of class \"row2Text\", itself containing the day, month and year...\n //...of the start date, the number of days, the departFrom value and the adults, children and infants.\n //Set the font size and float css values\n var $text5 = $(\"<div><p class='row2Text'><strong>\"\n + holiday.startDate.day + \" \" + holiday.startDate.month + \" \" + holiday.startDate.year + \"</strong> for <strong>\"\n + holiday.days + \"</strong> days from \"\n + holiday.departFrom + \", <strong>\"\n + holiday.passengers.adults + \"</strong> Adults\" + offspring + \"</p></div>\").css({\n 'font-size': '18px',\n 'float': 'left'\n });\n //Append the row2Text to div row 2 part 1\n $divRow2pt1.append($text5);\n //Append div row 2 part 1 to the main div row 2\n $divRow2.append($divRow2pt1);\n //Create a div element of class \"row2pt2\", setting it's width, height, vertical and text align, float...\n //...display and padding css elemnents\n var $divRow2pt2 = $('<div class=\"row2pt2\"></div>').css({\n 'width': '10%',\n 'height': 'auto',\n 'vertical-align': 'top',\n 'text-align': 'right',\n 'float': 'right',\n 'display': 'inline-block',\n 'padding': '10px'\n });\n //Create an img element of class \"arrowbtt\", setting its width, float, height and top and right margin...\n //...css elements\n var $arrButton = $(\"<img class='arrowBtt' src='assets/arrow.png'/>\").css({\n 'width': '20px',\n 'float': 'right',\n 'height': '40px',\n 'margin-top': '8px',\n 'margin-right': '8px'\n });\n //Create an empty div for storing elements, which will be shown or hidden depending on the state of the...\n //...arrow img button. Set the background colour, width, height, text align, colour, padding, float...\n //...and box shadow css elements.\n var $extendDiv = $('<div></div>').css({\n 'background-color': '#FFF',\n 'width': '99%',\n 'height': 'auto',\n 'text-align': 'center',\n 'color': '#00bfff',\n 'padding': '3%',\n 'display': 'block',\n 'float': 'left',\n 'padding-left': '10px',\n 'padding-right': '10px',\n 'box-shadow': '0 3px 2px -2px gray'\n });\n //Create a paragraph object storing the holiday's details, setting the width, font size, text align...\n //...and display css values\n var $extendDivText = $('<p>' + holiday.details + '</p>').css({\n 'width': '95%',\n 'font-size': '1.2em',\n 'text-align': 'justify',\n 'display': 'block'\n });\n //Append the extended div text inside the extendDiv\n $extendDiv.append($extendDivText);\n //Append a line break inside the extendDiv, putting it below the text\n $extendDiv.append('<br/>');\n //Create a button element of class \"button\", giving it text of \"BOOK NOW\" in bold text and setting...\n //...it's border and background colour, font colour, font size and bottom margin css values\n var $bookNowButton = $('<button class=\"button\"><strong>BOOK NOW</strong></button>').css({\n 'border-color': '#000080',\n 'background-color': '#000080',\n 'color': '#FFF',\n 'font-size': '24px',\n 'margin-bottom': '30px'\n });\n //Append the button inside the extended div\n $extendDiv.append($bookNowButton);\n //Attach a click listener to the arrow button, calling a function every time it is clicked\n $arrButton.click(function () {\n //If the extended div is not visible\n if ($extendDiv.is(':visible') === false) {\n //Show the extended div\n $extendDiv.show();\n //Set the arrow button's css values in a way that rotates it 90 degrees clockwise\n $arrButton.css({\n /* Safari */\n '-webkit-transform': 'rotate(90deg)',\n /* Firefox */\n '-moz-transform': 'rotate(90deg)',\n /* IE */\n '-ms-transform': 'rotate(90deg)',\n /* Opera */\n '-o-transform': 'rotate(90deg)',\n /* Internet Explorer */\n 'filter': 'progid:DXImageTransform.Microsoft.BasicImage(rotation=3)'\n });\n //Otherwise, if the extended div is visible\n } else {\n //Hide the extended div\n $extendDiv.hide();\n //Set the arrow button's css values in a way that reverts it back to it's original angle\n $arrButton.css({\n /* Safari */\n '-webkit-transform': 'rotate(0deg)',\n /* Firefox */\n '-moz-transform': 'rotate(0deg)',\n /* IE */\n '-ms-transform': 'rotate(0deg)',\n /* Opera */\n '-o-transform': 'rotate(0deg)',\n /* Internet Explorer */\n 'filter': 'progid:DXImageTransform.Microsoft.BasicImage(rotation=3)'\n });\n }\n });\n //Append the arrow button inside div row 2 part 2\n $divRow2pt2.append($arrButton);\n //Append div row 2 part 2 inside div row 2\n $divRow2.append($divRow2pt2);\n //Append the extended text div to div row 2\n $divRow2.append($extendDiv);\n //Hide the extended div as default\n $extendDiv.hide();\n //Append div row 2 inside the main div\n $div.append($divRow2);\n //Append the main div to the holidayListings element\n $(\".holidayListings\").append($div);\n });\n }", "function init_calendar(date) {\n $(\".tbody\").empty();\n $(\".events-container\").empty();\n var calendar_days = $(\".tbody\");\n var month = date.getMonth();\n var year = date.getFullYear();\n var day_count = days_in_month(month, year);\n var row = $(\"<tr class='table-row'></tr>\");\n var today = date.getDate();\n // Set date to 1 to find the first day of the month\n date.setDate(1);\n var first_day = date.getDay();\n var notfirstweek = false;\n // 35+firstDay is the number of date elements to be added to the dates table\n // 35 is from (7 days in a week) * (up to 5 rows of dates in a month)\n for(var i=0; i<42+first_day; i++) {\n // Since some of the elements will be blank, \n // need to calculate actual date from index\n var day = i-first_day+1;\n // If it is a sunday, make a new row\n if(i%7===0) {\n if (notfirstweek && (day > day_count)) {\n break;\n }\n calendar_days.append(row);\n row = $(\"<tr class='table-row'></tr>\");\n notfirstweek = true;\n }\n // if current index isn't a day in this month, make it blank\n if(i < first_day || day > day_count) {\n var curr_date = $(\"<td class='table-date nil'>\"+\"</td>\");\n row.append(curr_date);\n } \n else {\n var curr_date = $(\"<td class='table-date'>\"+day+\"</td>\");\n var events = check_events(day, month+1, year);\n if(today===day && $(\".active-date\").length===0) {\n curr_date.addClass(\"active-date\");\n }\n // If this date has any events, style it with .event-date\n if(events.length!==0) {\n if(events[0].state===1) {\n curr_date.addClass(\"event-date-green\");\n }\n if(events[0].state===2) {\n curr_date.addClass(\"event-date-yellow\");\n }\n if(events[0].state===3) {\n curr_date.addClass(\"event-date-red\");\n }\n }\n else {\n curr_date.addClass(\"event-date-yellow\");\n }\n // Set onClick handler for clicking a date\n curr_date.click({events: events, month: months[month], day:day}, date_click);\n row.append(curr_date);\n }\n }\n // Append the last row and set the current year\n calendar_days.append(row);\n $(\".year\").text(year);\n}", "addEventToWidget(event) {\n // Create date header\n if (this.lastDate === null || event.startDate.diffDays(this.lastDate) <= -1) {\n let leadingNewline = \"\";\n if (this.lastDate) {\n leadingNewline = \"\\n\\n\";\n }\n this.lastDate = event.startDate;\n let label = CalendarUtility.label(leadingNewline + this.formatEventDate(event.startDateText) + SEPARATOR_LINE, this.zoom, this.textcolor);\n this.window.add(label);\n }\n\n // Create event row\n let box = CalendarUtility.container();\n let lblEvent = CalendarUtility.label(event.name, this.zoom, this.textcolor);\n box.add(lblEvent);\n\n let dateText = event.formatEventDuration(this.lastDate);\n if (dateText) {\n let lblDate = CalendarUtility.label(dateText, this.zoom, this.textcolor, false);\n lblEvent.width = TEXT_WIDTH;\n lblDate.width = DATE_WIDTH;\n box.add(lblDate);\n } else {\n lblEvent.width = TEXT_WIDTH + DATE_WIDTH;\n }\n\n this.window.add(box);\n }", "updateEvents() {\n let me = this,\n timeAxis = me.timeAxis,\n endTime = timeAxis.getTime(timeAxis.endTime),\n startTime = timeAxis.getTime(timeAxis.startTime),\n totalTime = endTime - startTime,\n date = DateUtil.clone(me.firstColumnDate),\n eventStore = me.eventStore,\n vdom = me.vdom,\n content = me.getColumnContainer(),\n j = 0,\n len = eventStore.getCount(),\n column, duration, height, i, record, recordKey, startHours, top;\n\n // remove previous events from the vdom\n content.cn.forEach(item => item.cn = []);\n\n for (; j < 21; j++) {\n column = content.cn[j];\n\n for (i = 0; i < len; i++) {\n record = eventStore.items[i];\n\n // todo: we need a check for date overlaps => startDate < current day, endDate >= current day\n if (DateUtil.matchDate(date, record.startDate)) {\n if (DateUtil.matchDate(date, record.endDate)) {\n recordKey = record[eventStore.keyProperty];\n duration = (record.endDate - record.startDate) / 60 / 60 / 1000; // duration in hours\n height = Math.round(duration / totalTime * 100 * 1000) / 1000;\n startHours = (record.startDate.getHours() * 60 + record.startDate.getMinutes()) / 60;\n top = Math.round((startHours - startTime) / totalTime * 100 * 1000) / 1000;\n\n // console.log(j, record);\n // console.log(top);\n\n column.cn.push({\n cls : ['neo-event', 'neo-draggable'],\n flag : record[eventStore.keyProperty],\n id : me.id + '__' + recordKey,\n tabIndex: -1,\n\n cn: [{\n cls : ['neo-event-time'],\n html: me.intlFormat_time.format(record.startDate),\n id : me.id + '__time__' + recordKey\n }, {\n cls : ['neo-event-title'],\n html: record.title,\n id : me.id + '__title__' + recordKey\n }],\n\n style: {\n height: `calc(${height}% - 2px)`,\n top : `calc(${top}% + 1px)`,\n width : 'calc(100% - 1px)' // todo\n }\n });\n }\n }\n }\n\n date.setDate(date.getDate() + 1);\n }\n\n me.vdom = vdom;\n }", "onEventDataGenerated(renderData) {\n const me = this,\n {\n eventRecord\n } = renderData;\n\n if (me.shouldInclude(eventRecord)) {\n if (me.scheduler.isVertical) {\n renderData.width = me.scheduler.resourceColumnWidth;\n } else {\n renderData.top = 0;\n } // Flag that we should fill entire row/col\n\n renderData.fillSize = true; // Add our own cls\n\n renderData.wrapperCls[me.rangeCls] = 1;\n renderData.wrapperCls[`b-sch-color-${eventRecord.timeRangeColor}`] = eventRecord.timeRangeColor; // Add label\n\n renderData.children.push(eventRecord.name); // Event data for DOMSync comparison\n\n renderData.eventId = `${me.idPrefix}-${eventRecord.id}`;\n }\n }", "function fillCalendar() {\n console.log(\"inside the fill calendar\");\n // for (let i = 0; i < events.length; i++) {\n // console.log(events[i].title);\n // }\n let currentMonth = date.getMonth()+1;\n let dateComp = new Date(date.getFullYear()+yearCounter, currentMonth-1+monthCounter, date.getDate(), date.getHours(), date.getMinutes(), date.getSeconds(), date.getMilliseconds());\n let year = new Date(date.getFullYear()+yearCounter, currentMonth+monthCounter, 0).getFullYear();\n let month = new Date(date.getFullYear()+yearCounter, currentMonth+monthCounter, 0).getMonth();\n let numDaysInMonth = new Date(date.getFullYear()+yearCounter, currentMonth+monthCounter, 0).getDate();\n let monthStartingDay = new Date(date.getFullYear()+yearCounter, currentMonth+-1+monthCounter, 1).getDay();\n let numDaysLastMonth = new Date(date.getFullYear()+yearCounter, currentMonth+monthCounter-1, 0).getDate();\n let monthStartingDayCopy = monthStartingDay;\n let counter = 1;\n let counter2 = 0;\n let counter3 = 0;\n let counter4 = 1;\n //\n //prints month and year above calendar\n //\n $(\"#month\").html(`${months[month]}`);\n $(\"#year\").html(`${year}`);\n //\n //clears all day boxes on calendar\n //\n $(\".day-box\").html(\" \"); \n // while loop fills in boxes for last month\n // first for-loop fills in first row for curreny month\n // second for-loop fills in the rest of the rows for current month\n // third for-loop fills in the rest of the rows for next month\n while (counter2 < monthStartingDay) {\n $(`#c${counter2}`).append(`<span class=\"faded\">${numDaysLastMonth-monthStartingDayCopy+1}</span>`);\n counter2++;\n monthStartingDayCopy--;\n }\n for (let j = monthStartingDay; j < 7; j++) {\n $(`#c${j}`).append(`<span class=\"bold\">${counter}</span>`);\n for (let i = 0 ; i < events.length; i++) {\n //\n // If the current date is equal to the date generated by fillCalender()\n // then highlight current day's box to lightgreen using currentDay class\n //\n if (currentMonth + monthCounter == parseInt(events[i].startMonth) && counter == parseInt(events[i].startDay)) {\n $(`#c${j}`).append(`<p class=\"event ${events[i].tag}\">${events[i].startHour}:${events[i].startMinutes} ${events[i].title}</p>`);\n }\n }\n counter++;\n }\n for (let j = 7; counter <= numDaysInMonth; j++) {\n $(`#c${j}`).append(`<span class=\"bold\">${counter}</span>`);\n if (date.getMonth() == dateComp.getMonth() && date.getDate() == dateComp.getDate() && date.getFullYear() == dateComp.getFullYear()) {\n currentDayIDNum = date.getDate()-monthStartingDay+1;\n $(`#c${currentDayIDNum}`).find(\"span\").addClass(\"currentDay\");\n } else {\n $(`#c${currentDayIDNum}`).find(\"span\").removeClass(\"currentDay\");\n }\n for (let i = 0 ; i < events.length; i++) {\n // console.log(\"Event index: \" + i)\n if (currentMonth + monthCounter == parseInt(events[i].startMonth) && counter == parseInt(events[i].startDay)) {\n $(`#c${j}`).append(`<p class=\"event ${events[i].tag}\">${events[i].startHour}:${events[i].startMinutes} ${events[i].title}</p>`);\n }\n }\n counter++;\n counter3 = j+1;\n }\n for (j = counter3; j < 42; j++) {\n $(`#c${j}`).append(`<span class=\"faded\">${counter4}</span>`);\n counter3++;\n counter4++;\n }\n console.log(\"Outside fill calendar\");\n}", "function renderEvents(appointments) {\n console.log('---', appointments);\n for (var i = 0; i < appointments.length; i++) {\n appointments[i].start = new Date(appointments[i].startDate);\n appointments[i].end = new Date(appointments[i].endDate);\n }\n setEventState(appointments)\n }", "function displayEvents(events) {\n document.getElementById('results').innerHTML='';\n console.log(events[0])\n events.forEach(function(event) {\n // const event_name = String(event.eventName);\n // console.log(event_name);\n const card = document.createElement('div');\n // appending a new row\n document.getElementById('results').appendChild(card);\n\n // formatting the row by applying css classes\n card.classList.add('card');\n card.classList.add('bg-light');\n card.classList.add('card-body');\n card.classList.add('mb-3');\n var cardhtml = \" <div class=\\\"container\\\">\\n\" +\n \" <div class=\\\"row\\\">\\n\" +\n \" <div class=\\\"media w-100\\\">\\t<a class=\\\"float-left\\\" href=\\\"#\\\">\\n\" +\n \"\\n\";\n\n if(event.img != \"\") {\n cardhtml += \" <img src=\\\"/index/images/\" +event.img[0]+\"\\\" class=\\\"eventImg\\\">\"\n }\n\n cardhtml += \" </a>\\n\" +\n \" <div class=\\\"media-body\\\">\\n\" +\n \" <ul class=\\\"list-inline list-unstyled highlight\\\">\\n\" +\n \" <li class=\\\"list-inline-item\\\" style=\\\"font-size: 28px\\\"><b>&ensp;\" + event.eventname + \"</b></li>\\n\" +\n \" <li class=\\\"list-inline-item float-right char\\\"><b>Created By \" + event.firstname +\" \"+event.surname + \" </b></li>\\n\" +\n \" </ul>\\n\" +\n \" <p style=\\\"padding: 5px 0px 5px 25px;\\\">\" + event['description'] + \"</p>\\n\" +\n \" </div>\\n\" +\n \" </div>\\n\" +\n \" </div>\\n\" +\n \" <div class=\\\"row\\\">\\n\" +\n \" <ul class=\\\"list-inline list-unstyled w-100\\\" style=\\\"padding: 5px 0px 0px 0px;\\\">\\n\" +\n \" <li class=\\\"list-inline-item\\\"><span><i class=\\\"glyphicon glyphicon-calendar\\\"><b>Date: </b></i>\" + event.startdate.toString().substring(0, 10)+ \"<i><b> Time: </b></i> \"+ event.startdate.toString().substring(11, 16)+\"</span></li>\\n\" +\n \" <li class=\\\"list-inline-item\\\">~</li> <span><i class=\\\"glyphicon glyphicon-comment\\\"><b>Date: </b></i>\" + event.startdate.toString().substring(0, 10)+ \"<i><b> Time: </b></i>\"+ event.startdate.toString().substring(11, 16)+ \"</span>\\n\" +\n \" <li class=\\\"list-inline-item\\\">&ensp;|</li> <span><i class=\\\"glyphicon glyphicon-comment\\\"><b>Location: </b></i>\" + event.location+ \" \"+ event.city+\" \"+event.postcode+\"</span>\\n\" +\n \" <div>\\n\" +\n \" <button class=\\\"btn btn-info btn-md float-right\\\" style=\\\"margin-left:5px;\\\" onclick=\\\"window.location.href =\\'/viewStories/\"+event.event_id+\"\\' \\\">\\n\" +\n \" View Stories\\n\" +\n \" </button>\"+\n \" </div>\\n\" +\n \" <button type='button' class=\\\"btn btn-primary\\\" data-toggle=\\\"modal\\\" data-target=\\\"#model-\" + event.event_id+ \"\\\">\\n\" +\n \" View Images\\n\" +\n \" </button>\"+\n \" </ul>\\n\" +\n \" </div>\\n\" +\n \" </div>\\n\" +\n \" </div>\" +\n \"<!-- Modal -->\\n\" +\n \" <div class=\\\"modal fade\\\" id=\\\"model-\"+ event.event_id +\"\\\" tabindex=\\\"-1\\\" role=\\\"dialog\\\" aria-labelledby=\\\"model-\"+ event.event_id +\"\\\" aria-hidden=\\\"true\\\">\\n\" +\n \" <div class=\\\"modal-dialog modal-dialog-centered modal-lg\\\" role=\\\"document\\\">\\n\" +\n \" <div class=\\\"modal-content\\\">\\n\" +\n \" <div class=\\\"modal-header\\\">\\n\" +\n \" <h5 class=\\\"modal-title\\\" >Images - \"+ event.eventname+ \"</h5>\\n\" +\n \" <button type=\\\"button\\\" class=\\\"close\\\" data-dismiss=\\\"modal\\\" aria-label=\\\"Close\\\">\\n\" +\n \" <span aria-hidden=\\\"true\\\">&times;</span>\\n\" +\n \" </button>\\n\" +\n \" </div>\\n\"+\n \" <div class=\\\"modal-body\\\" id=\\\"model-body\\\">\\n\";\n\n event.img.forEach(function(img){\n if(event.img != \"\") {\n cardhtml += \"<img src=\\\"/index/images/\" +img+\"\\\" class=\\\"eventImg\\\" style=\\\"padding-right: 4px\\\">\"\n }\n });\n\n cardhtml += \" </div>\\n\" +\n \" <div class=\\\"modal-footer\\\">\\n\" +\n \" <button type=\\\"button\\\" class=\\\"btn btn-primary\\\" data-dismiss=\\\"modal\\\">Close</button>\\n\" +\n \" </div>\\n\" +\n \" </div>\\n\" +\n \" </div>\\n\" +\n \" </div>\"\n\n card.innerHTML = cardhtml;\n });\n}", "function displayMyEvents(events) {\n document.getElementById('results').innerHTML='';\n console.log(events[0])\n events.forEach(function(event) {\n // const event_name = String(event.eventName);\n // console.log(event_name);\n const card = document.createElement('div');\n // appending a new row\n document.getElementById('results').appendChild(card);\n\n // formatting the row by applying css classes\n card.classList.add('card');\n card.classList.add('bg-light');\n card.classList.add('card-body');\n card.classList.add('mb-3');\n var cardhtml = \" <div class=\\\"container\\\">\\n\" +\n \" <div class=\\\"row\\\">\\n\" +\n \" <div class=\\\"media w-100\\\">\\t<a class=\\\"float-left\\\" href=\\\"#\\\">\\n\" +\n \"\\n\";\n if(event.img != \"\") {\n cardhtml += \" <img src=\\\"/index/images/\" +event.img[0]+\"\\\" class=\\\"eventImg\\\">\"\n }\n cardhtml += \" </a>\\n\" +\n \" <div class=\\\"media-body\\\">\\n\" +\n \" <ul class=\\\"list-inline list-unstyled highlight\\\">\\n\" +\n \" <li class=\\\"list-inline-item\\\" style=\\\"font-size: 28px\\\"><b>&ensp;\" + event.eventname + \"</b></li>\\n\" +\n \" <li class=\\\"list-inline-item float-right char\\\"><b>Created By \" + event.firstname +\" \"+event.surname + \" </b></li>\\n\" +\n \" </ul>\\n\" +\n \" <p style=\\\"padding: 5px 0px 5px 25px;\\\">\" + event['description'] + \"</p>\\n\" +\n \" </div>\\n\" +\n \" </div>\\n\" +\n \" </div>\\n\" +\n \" <div class=\\\"row\\\">\\n\" +\n \" <ul class=\\\"list-inline list-unstyled w-100\\\" style=\\\"padding: 5px 0px 0px 0px;\\\">\\n\" +\n \" <li class=\\\"list-inline-item\\\"><span><i class=\\\"glyphicon glyphicon-calendar\\\"><b>Date: </b></i>\" + event.startdate.toString().substring(0, 10)+ \"<i><b>Time: </b></i> \"+ event.startdate.toString().substring(11, 16)+\"</span></li>\\n\" +\n \" <li class=\\\"list-inline-item\\\">~</li> <span><i class=\\\"glyphicon glyphicon-comment\\\"><b>Date: </b></i>\" + event.enddate.toString().substring(0, 10)+ \"<i><b>Time: </b></i> \"+ event.enddate.toString().substring(11, 16)+ \"</span>\\n\" +\n \" <li class=\\\"list-inline-item\\\">&ensp;|</li> <span><i class=\\\"glyphicon glyphicon-comment\\\"><b>Location: </b></i>\" + event.location+ \" \"+ event.city+\" \"+event.postcode+\"</span>\\n\" +\n \" <form id=\\“xForm\\\" onsubmit=\\\"onSubmit('/MyEvents/deleteEvent/\"+ event.event_id +\"')\\\">\\n\" +\n \" <input class=\\\"btn btn-danger btn-md float-right\\\" style=\\\"margin-left:5px;\\\" type=\\\"submit\\\" name=\\\"delete\\\" value='Delete Event' onClick=\\\"return confirm('Are you sure you want to delete this event?')\\\" />\\n\" +\n \" </form>\\n\" +\n \" <form method=\\\"get\\\" action=\\\"/myEvents/editEvent/\"+event.event_id+\"\\\">\\n\" +\n \" <input class=\\\"btn btn-warning btn-md float-right\\\" style=\\\"margin-left:5px;\\\" type=\\\"submit\\\" name=\\\"edit\\\" value='Edit Event'/>\\n\" +\n \" </form>\\n\" +\n // \" <form method=\\\"get\\\" action=\\\"/viewStories/\"+event['event_id']+\"\\\" onsubmit=\\\"storyView('\"+ event.eventName + \"')\\\">\\n\" +\n // \" <input class=\\\"btn btn-info btn-md float-right\\\" style=\\\"margin-left:5px;\\\" type=\\\"submit\\\" name=\\\"viewstories\\\" value='View Stories'/>\\n\" +\n // \" </form>\\n\" +\n // \" <form >\\n\" +\n \" <div>\\n\" +\n \" <button class=\\\"btn btn-info btn-md float-right\\\" style=\\\"margin-left:5px;\\\" onclick=\\\"window.location.href =\\'/viewStories/\"+event.event_id+\"\\'\\\">\\n\" +\n \" View Stories\\n\" +\n \" </button>\"+\n \" </div>\\n\" +\n // \" </form>\\n\" +\n \" <form method=\\\"get\\\" action=\\\"/myEvents/createStory/\"+event['event_id']+\"\\\">\\n\" +\n \" <input class=\\\"btn btn-success btn-md float-right\\\" style=\\\"margin-left:5px;\\\" type=\\\"submit\\\" name=\\\"create\\\" value='Create Story'/>\\n\" +\n \" </form>\\n\" +\n \" <button type='button' class=\\\"btn btn-primary\\\" data-toggle=\\\"modal\\\" data-target=\\\"#model-\" + event.event_id+ \"\\\">\\n\" +\n \" View Images\\n\" +\n \" </button>\"+\n \" </ul>\\n\" +\n \" </div>\\n\" +\n \" </div>\\n\" +\n \" </div>\" +\n \"<div class=\\\"modal fade\\\" id=\\\"modelstories-\" + event.event_id+ \"\\\" tabindex=\\\"-1\\\" role=\\\"dialog\\\" aria-labelledby=\\\"modelstories-\"+ event.event_id+ \"\\\" aria-hidden=\\\"true\\\">\\n\" +\n \" <div class=\\\"modal-dialog modal-dialog-centered modal-lg\\\" role=\\\"document\\\">\\n\" +\n \" <div class=\\\"modal-content\\\">\\n\" +\n \" <div class=\\\"modal-header\\\">\\n\" +\n \" <h5 class=\\\"modal-title\\\" >Stories - \" + event.img+ \"</h5>\\n\" +\n \" <button type=\\\"button\\\" class=\\\"close\\\" data-dismiss=\\\"modal\\\" aria-label=\\\"Close\\\">\\n\" +\n \" <span aria-hidden=\\\"true\\\">&times;</span>\\n\" +\n \" </button>\\n\" +\n \" </div>\\n\" +\n \" <div class=\\\"modal-body\\\" id=\\\"model-body\\\">\\n\" +\n \" <div class=\\\"container\\\">\\n\" +\n \" <div id=\\\"displayStories\\\" class=\\\"card card-body mb-3\\\"></div>\\n\" +\n \" </div>\"+\n \" </div>\\n\" +\n \" <div class=\\\"modal-footer\\\">\\n\" +\n \" <button type=\\\"button\\\" class=\\\"btn btn-primary\\\" data-dismiss=\\\"modal\\\">Close</button>\\n\" +\n \" </div>\\n\" +\n \" </div>\\n\" +\n \" </div>\\n\" +\n \" </div>\" +\n \"<!-- Modal -->\\n\" +\n \" <div class=\\\"modal fade\\\" id=\\\"model-\"+ event.event_id +\"\\\" tabindex=\\\"-1\\\" role=\\\"dialog\\\" aria-labelledby=\\\"model-\"+ event.event_id +\"\\\" aria-hidden=\\\"true\\\">\\n\" +\n \" <div class=\\\"modal-dialog modal-dialog-centered modal-lg\\\" role=\\\"document\\\">\\n\" +\n \" <div class=\\\"modal-content\\\">\\n\" +\n \" <div class=\\\"modal-header\\\">\\n\" +\n \" <h5 class=\\\"modal-title\\\" >Images - \"+ event.eventname+ \"</h5>\\n\" +\n \" <button type=\\\"button\\\" class=\\\"close\\\" data-dismiss=\\\"modal\\\" aria-label=\\\"Close\\\">\\n\" +\n \" <span aria-hidden=\\\"true\\\">&times;</span>\\n\" +\n \" </button>\\n\" +\n \" </div>\\n\"+\n \" <div class=\\\"modal-body\\\" id=\\\"model-body\\\">\\n\";\n\n event.img.forEach(function(img){\n if(event.img != \"\") {\n cardhtml += \"<img src=\\\"/index/images/\" +img+\"\\\" class=\\\"eventImg\\\" style=\\\"padding-right: 4px\\\">\"\n }\n });\n\n cardhtml += \" </div>\\n\" +\n \" <div class=\\\"modal-footer\\\">\\n\" +\n \" <button type=\\\"button\\\" class=\\\"btn btn-primary\\\" data-dismiss=\\\"modal\\\">Close</button>\\n\" +\n \" </div>\\n\" +\n \" </div>\\n\" +\n \" </div>\\n\" +\n \" </div>\"\n\n card.innerHTML = cardhtml;\n });\n}", "function buildEvents(calendar) {\n var start = startDate(calendar);\n var end = endDate(calendar);\n\n clearEvents(calendar);\n\n // Extract current filters from table\n var table_options = $(table).bootstrapTable('getOptions');\n var filters = table_options.query_params || {};\n\n filters.min_date = start;\n filters.max_date = end;\n filters.part_detail = true;\n\n // Request build orders from the server within specified date range\n inventreeGet(\n '{% url \"api-build-list\" %}',\n filters,\n {\n success: function(response) {\n\n for (var idx = 0; idx < response.length; idx++) {\n\n var order = response[idx];\n\n var date = order.creation_date;\n\n if (order.completion_date) {\n date = order.completion_date;\n } else if (order.target_date) {\n date = order.target_date;\n }\n\n var title = `${order.reference}`;\n\n var color = '#4c68f5';\n\n if (order.completed) {\n color = '#25c234';\n } else if (order.overdue) {\n color = '#c22525';\n }\n\n var event = {\n title: title,\n start: date,\n end: date,\n url: `/build/${order.pk}/`,\n backgroundColor: color,\n };\n\n calendar.addEvent(event);\n }\n }\n }\n );\n }", "function eventsRender(events, identifier) {\n if(activeTab == \"term1\"){\n for (var i = 0; i < events.length; i++) {\n calendar_term1.fullCalendar('renderEvent', events[i], true);\n }\n } else if(activeTab == \"term2\"){\n for (var i = 0; i < events.length; i++) {\n calendar_term2.fullCalendar('renderEvent', events[i], true);\n }\n }\n }", "function calendar_helper_populateCalendar(){\n\t// Event listeners for calendar and intiialize calendar\n\t$('#calendar').weekCalendar({\n timeslotsPerHour: TIMESLOTS_PER_HOUR,\n daysToShow: days_to_show,\n date: calendar_start_date,\n startOnFirstDayOfWeek: false,\n buttons: false,\n allowEventCreation: false,\n businessHours: {start: 8, end: 24, limitDisplay: true},\n height: function() {return window.innerHeight - 0.45*window.innerHeight - 105},\n eventRender : function(calEvent, $event) {\n },\n eventAfterRender : function(calEvent, $event) {\n // Update the database\n if (calEvent.id !=null){\n updateEvent(calEvent.db_id,calEvent.start,calEvent.end);\n }\n\n // Set event params\n setIsValid(calEvent); \n calEvent.event_dom_handler = $event;\n\n // Update backgrounds of all events\n calendar_helper_refreshEvents();\n },\n eventNew : function(calEvent, $event) {\n },\n eventDrag : function(calEvent, $event) {\n var next_event = calendar_helper_getNextEvent(calEvent);\n\n if (next_event!=null){\n events_to_be_refreshed.push(next_event);\n }\n },\n eventDrop : function(calEvent, $event) {\n // $event is not the dom handler but the calevent itsself \n // and there are 2 events of the same type on the calendar right now\n // making this a pretty useless event\n\n var next_event = calendar_helper_getNextEvent(calEvent);\n\n if (next_event!=null){\n events_to_be_refreshed.push(next_event);\n }\n\n events_to_be_refreshed.push(calEvent);\n // Update the daily lines on the map\n directions_api_addDailyDirections(calEvent);\n },\n eventResize : function(calEvent, $event) {\n setIsValid(calEvent);\n calendar_helper_refreshEvents();\n updateEvent(calEvent.db_id,calEvent.start,calEvent.end);\n //calendar_events[calEvent.id] = calEvent; //TODO\n },\n eventClick : function(calEvent, $event) {\n destination_selected_from_calendar(calEvent);\n },\n eventMouseover : function(calEvent, $event) {\n },\n eventMouseout : function(calEvent, $event) {\n },\n noEvents : function() {\n },\n data:{events:calendar_events}\n\t});\n\t// Activating tabs\n\t$(\".tabLink\").each(function(){\n\t $(this).click(function(){\n\t\ttabeId = $(this).attr('id');\n\t\t$(\".tabLink\").removeClass(\"activeLink\");\n\t\t$(this).addClass(\"activeLink\");\n\t\t$(\".tabcontent\").addClass(\"hide\");\n\t\t$(\"#\"+tabeId+\"-1\").removeClass(\"hide\") \n\t\treturn false;\t \n\t });\n\t});\n\n}", "function fillCalendar(month,year){\n var start = new Date(year,month,1);\n //update global values\n gMonth = start.getMonth();\n gYear = start.getFullYear();\n var firstday = start.getDay();\n //Update the month text\n $('#month h1').html(months[ start.getMonth() ]);\n $('#month h1').append(' '+ start.getFullYear() );\n //clear calendar's values\n //$('.calendar td div, .calendar td span').empty();\n //$('.calendar').remove('.event');\n //fill cells with dates and events\n var date = 1;\n for (var i = 0; i< 42 ; i++){\n $('.calendar td:eq('+i+') span').text(\"\");\n var day = new Date(year,month,date);\n var d = day.getDate();\n var m = day.getMonth();\n var y = day.getFullYear();\n var dayIndex = firstday+date-1;\n if ( i < firstday || m >month) {\n $('.calendar td:eq('+i+') div').text(\"\");\n }\n else {\n $('.calendar td:eq('+dayIndex+') div').text(date);\n //check for events\n events.forEach(function(ele) {\n if ( d == ele.day && m == ele.month && y == ele.year){\n //print text\n $('.calendar td:eq('+dayIndex+')').append('<span class=\"event\">'+ele.text+'</span>');\n //create handler for text\n $('.calendar td:eq('+dayIndex+') span:last()').click(function(){\n $(this).hide();\n var tmpText = $(this).text();\n $(this).after('<input type=\"text\" value=\"'+tmpText+'\" day=\"'+ele.day+'\" month=\"'+ele.month+'\" year=\"'+ele.year+'\" prevtext=\"'+ele.text+'\">');\n $(\"input\").focus();\n });\n }\n });\n date++;\n }\n }\n}", "function showEventsInDOM(data){\n var allEvents = data.events;\n console.log(allEvents);\n var eventListing = [];\n const monthNames = [\"January\", \"February\", \"March\", \"April\", \"May\", \"June\",\"July\", \"August\", \"September\", \"October\", \"November\", \"December\"];\n for(let i=0; i < allEvents.length; i++)\n {\n var eventName=allEvents[i].name;\n var dateObject = new Date(allEvents[i].start_time);\n var eventMonth = monthNames[dateObject.getUTCMonth()];\n var eventLocation = allEvents[i].location;\n var eventDate = eventMonth + \" \" + dateObject.getUTCDay() + \", \" + dateObject.getUTCFullYear();\n //The first event listing will always have a special CSS class to is to account for the search bar\n if (i==0)\n {\n var HTMLWrite = '<div class=\"columns listingadjust\">\\\n <div class=\"column is-1\"></div>\\\n <div class=\"column is-2\">\\\n <h1 class=\"title is-6 has-text-centered\">'+eventMonth+'</h1>\\\n <h2 class=\"subtitle has-text-centered\"><b class=\"date\">'+eventDate+'</b></h2>\\\n </div>\\\n <div class=\"vertical\"></div>\\\n <div class=\"column is-6\">\\\n <h1 class=\"title is-6\">'+eventName+'</h1>\\\n <h2 class=\"subtitle is-7\">'+eventLocation+'</h2>\\\n <div class=\"tags\">\\\n <span class=\"tag is-link is-light\"><span class=\"icon\"><i class=\"fas fa-car\"></i></span>Drivers required</span>\\\n <span class=\"tag is-link is-light\"><span class=\"icon\"><i class=\"fas fa-sign-language\"></i></span>ASL</span>\\\n </div>\\\n <p class=\"learnmore\"><a>+ Learn More</a></p>\\\n </div>\\\n <div class=\"column is-2 \">\\\n <button class=\"button btncolor hidebtns\"><span class=\"icon\"><i class=\"fas fa-clipboard\"></i></span><b>RSVP</b></button>\\\n </div>\\\n <div class=\"column is-1\"></div>\\\n </div>'\n }\n //The subsequent classes won't require that special class and have their own styling\n else{\n var HTMLWrite = '<div class=\"columns afterlistings\">\\\n <div class=\"column is-1\"></div>\\\n <div class=\"column is-2\">\\\n <h1 class=\"title is-6 has-text-centered\">'+eventMonth+'</h1>\\\n <h2 class=\"subtitle has-text-centered\"><b class=\"date\">'+eventDate+'</b></h2>\\\n </div>\\\n <div class=\"vertical\"></div>\\\n <div class=\"column is-6\">\\\n <h1 class=\"title is-6\">'+eventName+'</h1>\\\n <h2 class=\"subtitle is-7\">'+eventLocation+'</h2>\\\n <div class=\"tags\">\\\n <span class=\"tag is-link is-light\"><span class=\"icon\"><i class=\"fas fa-car\"></i></span>Drivers required</span>\\\n <span class=\"tag is-link is-light\"><span class=\"icon\"><i class=\"fas fa-sign-language\"></i></span>ASL</span>\\\n </div>\\\n <p class=\"learnmore\"><a>+ Learn More</a></p>\\\n </div>\\\n <div class=\"column is-2 \">\\\n <button class=\"button btncolor hidebtns\"><span class=\"icon\"><i class=\"fas fa-clipboard\"></i></span><b>RSVP</b></button>\\\n </div>\\\n <div class=\"column is-1 \"></div>\\\n </div>'\n }\n eventListing.push(HTMLWrite);\n }\n document.getElementById(\"eventlisting\").innerHTML = eventListing.join(' ');\n}", "function buildEventsList() {\n\t\t\n\t\teventsList.length = 0;\n\n\t\tvar t = 0;\n\t\t\n\t\tfor(var i = 0; i < numRows; i++) {\n\n\t\t\taddEvent(t, that.EVENT_ROW_PLAYED, { row: i });\n\n\t\t\tfor(var j = 0; j < numColumns; j++) {\n\t\t\t\t\n\t\t\t\tvar cell = cells[i][j];\n\n\t\t\t\tif(cell.transposed !== null) {\n\t\t\t\t\taddEvent(t, that.EVENT_NOTE_ON, { voice: j, note: cell.transposed });\n\t\t\t\t\t// Also adding an automatic note off event, a row later\n\t\t\t\t\taddEvent(t + secondsPerRow * 0.5, that.EVENT_NOTE_OFF, { voice: j });\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\tt += secondsPerRow;\n\t\t}\n\n\t\taddEvent(t, that.EVENT_END_PLAYED);\n\n\t\teventsList.sort(function(a, b) {\n\t\t\treturn a.timestamp - b.timestamp;\n\t\t});\n\n\t\tupdateNextEventPosition();\n\n\t}", "function show_events(events, month, day) {\r\n\t// limpiar de datos los dos container\r\n\t$(\".events-container\").empty(); /* */\r\n\t// $(\".events-container\").show(250);\r\n\t console.log(event_data[\"events\"]);\r\n\t// var date = event.data.date;\r\n\t// Si no hay eventos para esta fecha, notifique al usuario\r\n\tif (events.length === 0) {\r\n\t\tvar event_card = $(\"<div class='event-card'></div>\");\r\n\t var event_name = $(\"<div class='event-name'>There are no events planned for \" + month + \" \" + day + \".</div>\");\r\n\t\t$(event_card).css({ \"border-left\": \"10px solid #FF1744\" });\r\n\t\t$(event_card).append(event_name);\r\n\t\t$(\".events-container\").append(event_card);\r\n\t}\r\n\telse {\r\n\t\t// Go through and add each event as a card to the events container\r\n\t\tfor (var i = 0; i < events.length; i++) {\r\n\t\t\tvar event_card = $(\"<div class='event-card'></div>\");\r\n\t\t\tvar event_name = $(\"<div class='event-name'>\" + events[i][\"occasion\"] + \":</div>\");\r\n\t\t\tvar event_count = $(\"<div class='event-count'>\" + events[i][\"invited_count\"] + \" Invited</div>\");\r\n\t\t\tif (events[i][\"cancelled\"] === true) {\r\n\t\t\t\t$(event_card).css({\r\n\t\t\t\t\t\"border-left\": \"10px solid #FF1744\"\r\n\t\t\t\t});\r\n\t\t\t\tevent_count = $(\"<div class='event-cancelled'>Cancelled</div>\");\r\n\t\t\t}\r\n\t\t\t$(event_card).append(event_name).append(event_count);\r\n\t\t\t$(\".events-container\").append(event_card);\r\n\t\t}\r\n\t}\r\n}", "function handleEventData(events) {\n let now = new Date()\n // needed to handle overlapping events\n let timeMarkerAdded = false;\n // need to sort events by start/end times instead of IDs\n events.sort(compareEvents);\n\n // Looping through each event to handle it\n events.forEach(event => {\n // Getting strings for times\n let startDate = new Date(event.start); // convert ISO 8601 -> Date object\n let finishDate = undefined;\n let dateString = convertDate(startDate);\n if (event.finish) { // finish === null for instantaneous events\n finishDate = new Date(event.finish);\n let finishString = convertDate(finishDate);\n if (dateString.slice(-2) === finishString.slice(-2)) { // hide \"am/pm\" of first time if both are identical\n dateString = dateString.slice(0, -2);\n }\n dateString += \" - \" + convertDate(finishDate);\n }\n\n // calculate event container classes\n let divClasses = 'event';\n let liveIndicator = \"\";\n if (finishDate < now) {\n divClasses += ' event-complete';\n }\n else if (startDate < now && now < finishDate) {\n divClasses += ' event-live';\n liveIndicator = '<p class=\"live\">LIVE!</p>';\n }\n\n // adding event to the page\n var eventContainer;\n // Deciding which day content box it goes inside\n switch (startDate.getDate()) {\n case 5: eventContainer = $('#mar-5-content'); break;\n case 6: eventContainer = $('#mar-6-content'); break;\n }\n // If it doesn't fall into one of those event days, log the problem and quit trying to add it\n if (!eventContainer) {\n console.log(\"Event \" + event.title + \" date \" + startDate + \" out of range.\");\n return; // skip current iteration https://stackoverflow.com/a/31399448/1431900\n }\n // Building HTML and adding it to page\n let html = `<div class=\"${divClasses}\"><p class=\"time\">${dateString}</p><p>${event.title}</p>${liveIndicator}</div>`;\n const eventDiv = eventContainer.append(html);\n });\n}", "renderer() {\n const me = this,\n { scheduler } = me,\n { resourceStore } = scheduler,\n // Determine resource range to draw events for\n { firstResource, lastResource } = me.resourceRange,\n // Date at top and bottom for determining which events to include\n { topDate, bottomDate } = me.dateRange,\n syncConfigs = [];\n\n if (!me.initialized) {\n return;\n }\n\n // Update current time range, reflecting the change on the vertical time axis header\n if (!DateHelper.isEqual(topDate, me.topDate) || !DateHelper.isEqual(bottomDate, me.bottomDate)) {\n // Calculated values used by `renderResource()`\n me.topDate = topDate;\n me.bottomDate = bottomDate;\n me.topDateMS = topDate.getTime();\n me.bottomDateMS = bottomDate.getTime();\n\n me.timeView.range = { topDate, bottomDate };\n }\n\n if (firstResource !== -1 && lastResource !== -1) {\n // Collect all events for resources in view\n for (let i = firstResource; i <= lastResource; i++) {\n syncConfigs.push.apply(syncConfigs, me.renderResource(resourceStore.getAt(i)));\n }\n }\n\n DomHelper.sync({\n elementConfig: {\n onlyChildren: true,\n children: syncConfigs\n },\n targetElement: scheduler.foregroundCanvas,\n useSyncId: true,\n\n // Called by DomHelper when it creates, releases or reuses elements\n callback({ action, config, oldConfig, element }) {\n // If element is an event wrap, trigger appropriate events\n if (config && config.className && config.className[scheduler.eventCls + '-wrap']) {\n const // Some actions are considered first a release and then a render (reusing another element).\n // This gives clients code a chance to clean up before reusing an element\n isRelease = releaseEventActions[action],\n isRender = renderEventActions[action];\n\n // If we are reusing an element that was previously released we should not trigger again\n if (isRelease && oldConfig) {\n const data = oldConfig.elementData.tplData,\n event = {\n tplData: data,\n assignmentRecord: data.assignment,\n eventRecord: data.eventRecord,\n resourceRecord: data.resourceRecord,\n element\n };\n // This event is documented on Scheduler\n scheduler.trigger('releaseEvent', event);\n }\n\n if (isRender) {\n const data = config.elementData.tplData,\n event = {\n tplData: data,\n assignmentRecord: data.assignment,\n eventRecord: data.eventRecord,\n resourceRecord: data.resourceRecord,\n element\n };\n\n // Store element to allow easy mapping from record\n element.elementData.element = element;\n\n event.reusingElement = action === 'reuseElement';\n // This event is documented on Scheduler\n scheduler.trigger('renderEvent', event);\n }\n\n // No changes during sync, but might need to hook up element again in case cache was cleared\n if (action === 'none') {\n config.elementData.element = element;\n }\n }\n }\n });\n\n // Change in displayed resources?\n if (me.firstResource !== firstResource || me.lastResource !== lastResource) {\n // Update header to match\n me.resourceColumns.range = { firstResource, lastResource };\n\n // Store which resources are currently in view\n me.firstResource = firstResource;\n me.lastResource = lastResource;\n }\n }", "function renderCal() {\n $('#cal').empty();\n $('#cal').fullCalendar({\n // options\n header: {\n left: 'prev,next today',\n center: 'title',\n right: 'month,agendaWeek,agendaDay'\n },\n selectable: true,\n selectHelper: true,\n select: function(start, end, allDay) {\n var title = prompt('Event Title:');\n if (title) {\n var tmpEvent = {\n \"title\": title,\n \"start\": start,\n \"end\": end,\n \"allDay\": allDay,\n \"category\": 1 // faked category for now\n };\n eventAction(\"save\", tmpEvent);\n }\n $('#cal').fullCalendar('unselect');\n },\n editable: true,\n defaultView: 'month',\n eventSources: [{\n url: 'ajax.php',\n type: 'POST',\n data: {\n func: 'getevents',\n args: ''\n },\n error: function() {\n showMsg(\"There was an error while fetching events!\", true);\n },\n color: 'green', // a non-ajax option\n textColor: 'white' // a non-ajax option\n }],\n eventDrop: function(event, dayDelta, minuteDelta, allDay, revertFunc, jsEvent, ui, view) {\n if (typeof event.eid != \"undefined\") {\n eventAction(\"update\", event);\n }\n },\n eventClick: function(event, jsEvent, view) {\n // only allow editing of events with an eid property (from our db)\n if (typeof event.eid != \"undefined\") {\n // Was Control key pressed when the event was clicked? If so, this is a delete.\n if (jsEvent.ctrlKey == true) {\n var result = confirm('Delete event \"' + event.title + '\" ?');\n if (result == true) eventAction(\"delete\", event);\n }\n else { // No control key pressed, this is an edit.\n var title = prompt('Event Title:', event.title);\n if (title != \"\" && title != null) { // Capture empty title and cancel button (null)\n event.title = title;\n eventAction(\"update\", event);\n }\n }\n }\n }\n });\n}", "function fillEventsTable()\n{\n\tviewSort(\"eventActions\");\n\t// Get the (existing) table\n\t\n\tvar table = document.getElementById(\"eventsTable\");\n\t\t\n\t// Add a row for each item\n\tfor (var i = 0; i < events.length; i++) {\n\t\t\t// New row\n\t\t\tvar tr = document.createElement(\"tr\");\n\n\t\t\t// Left hand cell, containing image\n\t\t\tvar td1 = document.createElement(\"td\");\n\t\t\tvar img = document.createElement(\"img\");\n\t\t\timg.setAttribute(\"src\", events[i].imgUrl[events[i].imgUrl.length-1].innerHTML);\n\n\t\t\ttd1.appendChild(img);\n\n\t\t\t// Right hand cell, containing item details\n\t\t\tvar td2 = document.createElement(\"td\");\n\t\t\n\t\t\t// Title\n\t\t\tvar divTitle = document.createElement(\"div\");\n\t\t\tvar link = document.createElement(\"a\");\t\n\t\t\tlink.setAttribute(\"href\", events[i].url.innerHTML);\n\n\t\t\tlink.innerHTML = events[i].title.innerHTML;\n\t\t\tdivTitle.appendChild(link);\n\t\t\ttd2.appendChild(divTitle);\n\n\t\t\t//artist details\n\t\t\tvar divArtist = document.createElement(\"div\");\n\t\t\tvar divHeadline = document.createElement(\"div\");\n\t\t\tvar divArtistList = document.createElement(\"div\");\n\n\t\t\tvar artistArray = events[i].artists.children;\n\t\t\tvar artistList = \"<b>Line-up: </b>\" + artistArray[0].innerHTML;\n\n\t\t\tfor (var j = 1; j < artistArray.length-1; j++)\n\t\t\t{\n\t\t\t\tartistList = artistList + \", \" + artistArray[j].innerHTML;\n\t\t\t}\n\n\t\t\tvar headliner = \"<b> Headline Artist: \" + artistArray[j].innerHTML + \"</b>\";\n\t\t\tdivHeadline.innerHTML = headliner;\n\t\t\tdivArtistList.innerHTML = artistList;\n\t\t\tdivArtist.appendChild(divHeadline);\n\t\t\tdivArtist.appendChild(divArtistList);\n\t\t\ttd2.appendChild(divArtist);\n\n\t\t\t//event date\n\t\t\tvar divDate = document.createElement(\"div\");\n\t\t\tdivDate.innerHTML = \"<b>Start Date: </b>\" + events[i].startDate.innerHTML;\n\t\t\ttd2.appendChild(divDate);\n\t\t\t\n\t\t\t//tags\n\t\t\tvar divTags = document.createElement(\"div\");\n\t\t\tdivTags.innerHTML = \"<b> Tags: </b>\";\n\t\t\tvar tagArray = events[i].tags.children\n\t\t\n\t\t\tvar tag = document.createElement(\"tag\");\n\t\t\t\ttag.innerHTML = tagArray[0].innerHTML;\n\t\t\t\tdivTags.appendChild(tag);\n\n\t\t\tfor (var j = 1; j < tagArray.length-1; j++)\n\t\t\t{\n\t\t\t\tvar tag = document.createElement(\"tag\");\n\t\t\t\ttag.innerHTML = \", \" +tagArray[j].innerHTML;\n\t\t\t\tdivTags.appendChild(tag);\n\t\t\t}\n\t\t\t\t\n\t\t\ttd2.appendChild(divTags);\n\n\t\t\t//add to table\n\t\t\ttr.appendChild(td1);\n\t\t\ttr.appendChild(td2);\n\t\t\ttable.appendChild(tr);\n\t}\n\n}", "refreshEvents() {\n this.iterateDays().iterate(d => {\n if (d.inCalendar || this.eventsOutside) {\n d.events = this.eventsForDay(d, this.listTimes, this.repeatCovers);\n }\n });\n if (this.updateRows) {\n this.refreshRows();\n }\n if (this.updateColumns) {\n this.refreshColumns();\n }\n return this;\n }", "function drawEvents(evts) {\n evts.exit()\n .on(\"mouseover\", null)\n .on(\"mouseout\", null)\n .remove();\n evts.enter().append(\"rect\")\n .attr('class', 'event')\n .attr('width', function(d) { return Math.max((scaleX(d.tsEndAligned) - scaleX(d.tsStartAligned)), 2); })\n .attr('height', function(d) { return (d.name == \"Radiation\" || d.name == \"Drug\") ? (rowHeight - 2) / 2 : rowHeight - 2; })\n .attr('y', function(d) { return ((d.name == \"Radiation\") ? rowHeight / 2 : 1); })\n .attr('x', function(d) { return scaleX(d.tsStartAligned); })\n .style('fill', function(d) { return d.color; })\n .on(\"mouseover\", elTip.show)\n .on(\"mouseout\", elTip.hide);\n evts\n .attr('width', function(d) { return Math.max((scaleX(d.tsEndAligned) - scaleX(d.tsStartAligned)), 2); })\n .attr('height', function(d) { return (d.name == \"Radiation\" || d.name == \"Drug\") ? rowHeight / 2 : rowHeight; })\n .attr('y', function(d) { return ((d.name == \"Radiation\") ? rowHeight / 2 : 0); })\n .attr('x', function(d) { return scaleX(d.tsStartAligned); })\n .style('fill', function(d) { return d.color; });\n }", "function calDays(calDate) {\r\n //Determine the starting days of the month\r\n let day = new Date(calDate.getFullYear(), calDate.getMonth(), 1);\r\n let weekDay = day.getDay();\r\n\r\n //Write blank cells preceding the starting day\r\n let htmlCode = \"<tr >\";\r\n for (let i = 0; i < weekDay; i++) {\r\n htmlCode += \"<td class='day'></td>\";\r\n }\r\n\r\n //Write the cells for each day of the month\r\n let totalDays = daysInMonth(calDate);\r\n\r\n let highlightDay = calDate.getDate();\r\n for (let i = 1; i <= totalDays; i++) {\r\n day.setDate(i);\r\n weekDay = day.getDay();\r\n\r\n if (weekDay === 0) htmlCode += \"<tr>\";\r\n \r\n // Checks if highlightDay is today and if there are more than one event listed in eventList\r\n if (i === highlightDay && dayEvent[i] !== \"\" && dayEvent2[i] !== \"\") {\r\n \r\n // Concats the table data for today with up to 2 events\r\n htmlCode += \"<td class='weekDates' id='today'><div class='date'>\" + i + \"</div> <div class='event'>\" + dayEvent[i] + \" <br />\" + dayEvent2[i] + \"</div></td>\";\r\n\r\n // Checks if highlightDay is today and there is an event on dayEvent[i]\r\n } else if (i === highlightDay && dayEvent[i] !== \"\") {\r\n\r\n // Concats the table data for today with event tags and event info\r\n htmlCode += \"<td class='weekDates' id='today'><div class='date'>\" + i + \"</div> <div class='event'>\" + dayEvent[i] + \"</td>\";\r\n\r\n // Checks if there event on dayEvent[i] is an empty string\r\n } else if (i === highlightDay) {\r\n\r\n // Concats the table data for today with up to 2 events\r\n htmlCode += \"<td class='weekDates' id='today'><div class='date'>\" + i + \"</div></td>\";\r\n\r\n } else if (dayEvent[i] === \"\") {\r\n\r\n // Concats ONLY the table data and the date\r\n htmlCode += \"<td class='weekDates'><div class='date'>\" + i + \"</div></td>\";\r\n\r\n // Checks for a second event\r\n } else if (dayEvent2[i] !== \"\") {\r\n\r\n // Concats the table data for 2 events on any day but the today.\r\n htmlCode += \"<td class='weekDates'><div class='date'>\" + i + \"</div> <div class='event'>\" + dayEvent[i] + \"</div> <div class='event'>\" + dayEvent2[i] + \"</div></td>\";\r\n\r\n } else {\r\n // Concats table data for every day except today with a single event for the day\r\n htmlCode += \"<td class='weekDates'><div class='date'>\" + i + \"</div> <div class='event'>\" + dayEvent[i] + \"</div></td>\";\r\n\r\n }\r\n\r\n if (weekDay === 6) htmlCode += \"</tr>\";\r\n }\r\n return htmlCode;\r\n}", "function renderEvents(eventInputs, stick) {\n\t\tvar renderedEvents = [];\n\t\tvar renderableEvents;\n\t\tvar abstractEvent;\n\t\tvar i, j, event;\n\n\t\tfor (i = 0; i < eventInputs.length; i++) {\n\t\t\tabstractEvent = buildEventFromInput(eventInputs[i]);\n\n\t\t\tif (abstractEvent) { // not false (a valid input)\n\t\t\t\trenderableEvents = expandEvent(abstractEvent);\n\n\t\t\t\tfor (j = 0; j < renderableEvents.length; j++) {\n\t\t\t\t\tevent = renderableEvents[j];\n\n\t\t\t\t\tif (!event.source) {\n\t\t\t\t\t\tif (stick) {\n\t\t\t\t\t\t\tstickySource.events.push(event);\n\t\t\t\t\t\t\tevent.source = stickySource;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tcache.push(event);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\trenderedEvents = renderedEvents.concat(renderableEvents);\n\t\t\t}\n\t\t}\n\n\t\tif (renderedEvents.length) { // any new events rendered?\n\t\t\treportEventChange();\n\t\t}\n\n\t\treturn renderedEvents;\n\t}", "function renderEvents(eventInputs, stick) {\n\t\tvar renderedEvents = [];\n\t\tvar renderableEvents;\n\t\tvar abstractEvent;\n\t\tvar i, j, event;\n\n\t\tfor (i = 0; i < eventInputs.length; i++) {\n\t\t\tabstractEvent = buildEventFromInput(eventInputs[i]);\n\n\t\t\tif (abstractEvent) { // not false (a valid input)\n\t\t\t\trenderableEvents = expandEvent(abstractEvent);\n\n\t\t\t\tfor (j = 0; j < renderableEvents.length; j++) {\n\t\t\t\t\tevent = renderableEvents[j];\n\n\t\t\t\t\tif (!event.source) {\n\t\t\t\t\t\tif (stick) {\n\t\t\t\t\t\t\tstickySource.events.push(event);\n\t\t\t\t\t\t\tevent.source = stickySource;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tcache.push(event);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\trenderedEvents = renderedEvents.concat(renderableEvents);\n\t\t\t}\n\t\t}\n\n\t\tif (renderedEvents.length) { // any new events rendered?\n\t\t\treportEventChange();\n\t\t}\n\n\t\treturn renderedEvents;\n\t}", "function renderEvents(eventInputs, stick) {\n\t\tvar renderedEvents = [];\n\t\tvar renderableEvents;\n\t\tvar abstractEvent;\n\t\tvar i, j, event;\n\n\t\tfor (i = 0; i < eventInputs.length; i++) {\n\t\t\tabstractEvent = buildEventFromInput(eventInputs[i]);\n\n\t\t\tif (abstractEvent) { // not false (a valid input)\n\t\t\t\trenderableEvents = expandEvent(abstractEvent);\n\n\t\t\t\tfor (j = 0; j < renderableEvents.length; j++) {\n\t\t\t\t\tevent = renderableEvents[j];\n\n\t\t\t\t\tif (!event.source) {\n\t\t\t\t\t\tif (stick) {\n\t\t\t\t\t\t\tstickySource.events.push(event);\n\t\t\t\t\t\t\tevent.source = stickySource;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tcache.push(event);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\trenderedEvents = renderedEvents.concat(renderableEvents);\n\t\t\t}\n\t\t}\n\n\t\tif (renderedEvents.length) { // any new events rendered?\n\t\t\treportEventChange();\n\t\t}\n\n\t\treturn renderedEvents;\n\t}", "renderEvent(eventData) {\n // No point in rendering event that already has an element\n const data = eventData.tplData,\n { resourceRecord, eventRecord } = data,\n // Event element config, applied to existing element or used to create a new one below\n elementConfig = {\n className: data.wrapperCls,\n tabIndex: '0',\n children: [\n {\n className: data.cls,\n style: (data.internalStyle || '') + (data.style || ''),\n // Clone to be repeatable\n html: data.body.cloneNode(true),\n // Used for comparison, cheaper than comparing fragment from above\n compareHtml: data.eventContent\n }\n ],\n style: {\n transform: `translate(${data.left}px, ${data.top}px)`,\n // DomHelper appends px to dimensions when using numbers\n height: data.height,\n width: data.width,\n zIndex: data.zIndex\n },\n dataset: {\n resourceId: resourceRecord.id,\n eventId: data.eventId, // Not using eventRecord.id to distinguish between Event and ResourceTimeRange\n // Sync using assignment id in multi assignment mode or event id in single assignment mode\n syncId: data.assignment ? data.assignment.id : data.eventId\n },\n // Will not be part of DOM, but attached to the element\n elementData: eventData,\n // Dragging etc. flags element as retained, to not reuse/release it during that operation\n retainElement: eventRecord.instanceMeta(this.scheduler).retainElement\n };\n\n // Do not want to spam dataset with empty prop when not using assignments\n if (data.assignment) {\n elementConfig.dataset.assignmentId = data.assignment.id;\n }\n\n return elementConfig;\n }", "renderSectionListContent(events) {\n let dates = this.getDates(events);\n let sectionContents = [];\n for (let i = 0; i < dates.length; i++) {\n sectionContents.push({\n title: dates[i],\n data: this.renderEventsCard(dates[i], events)\n });\n }\n return sectionContents;\n }", "renderer({\n row,\n record: resourceRecord,\n size = {}\n }) {\n // Bail out for group headers/footers\n if (resourceRecord.meta.specialRow) {\n // Clear any cached layout for row retooled to special row, and bail out\n this.rowMap.delete(row);\n return;\n }\n\n const me = this,\n {\n startMS,\n endMS\n } = me.visibleDateRange,\n eventDOMConfigs = []; // Used stored layouts if available\n\n let resourceLayout = me.resourceMap.get(resourceRecord.id);\n\n if (!resourceLayout || resourceLayout.invalid) {\n // Previously we would bail out here if engine wasn't ready. Now we instead allow drawing in most cases,\n // since data can be read and written during commit (previously it could not)\n if (me.suspended) {\n return;\n }\n\n resourceLayout = me.layoutResourceEvents(resourceRecord);\n me.resourceMap.set(resourceRecord.id, resourceLayout);\n } // Size row\n\n size.height = resourceLayout.rowHeight; // Only collect configs for those actually in view\n\n resourceLayout.eventsData.forEach(layout => {\n if (layout.endMS >= startMS && layout.startMS <= endMS) {\n layout.absoluteTop = layout.top + row.top;\n eventDOMConfigs.push(me.renderEvent(layout, resourceLayout.rowHeight));\n }\n });\n this.rowMap.set(row, eventDOMConfigs);\n }", "function createRowsCalendar(){\r\n var numDias=arrayDias[document.getElementById(\"month\").selectedIndex-1];\r\n var html; \r\n var numDiaAdd=1;\r\n $( \".fc-row \" ).remove(); \r\n for (var i = 1; i <= 6; i++) { \r\n html=\"\"; \r\n html+=\" <div class='fc-row fc-week fc-widget-content' style='height: 80px;'>\";\r\n //se crean los encabezados para los calendarios\r\n html+=\" <div class='fc-bg'>\";\r\n html+=\" <table> <tbody> <tr>\";\r\n for (var j = 0; j < 6; j++) { \r\n html+=\" <td class='fc-day fc-widget-content fc-sun fc-other-month fc-past' ></td>\";\r\n }\r\n html+=\" </tr> </tbody> </table> </div> \";\r\n //termino de encabezados para el calendario\r\n\r\n //inicia la creacion de valores para el calendario\r\n html+=\" <div class='fc-content-skeleton'> \";\r\n html+=\" <table> \";\r\n html+=\" <tbody> <tr> \";\r\n for (var j = 0; j < 6; j++) { \r\n if(numDiaAdd<=numDias){\r\n html+=\" <td id='td_\"+numDiaAdd+\"' class='fc-day-number fc-sun fc-today fc-state-highlight'>\"+numDiaAdd;\r\n html+=\"<a id='btnadd_\"+numDiaAdd+\"' class='fc-day-grid-event fc-event fc-start fc-end fc-draggable' style='background-color:#fff;border-color:#fff'>\";\r\n html+=\"<div class='fc-content'>\"; \r\n html+=\"<button class='btn btn-primary' data-toggle='tooltip' data-placement='top' title='Crear visita' onclick='showModalCreate(\\\"\"+numDiaAdd+\"\\\",\\\"\"+$(\"#month\").val()+\"\\\",\\\"\"+$(\"#year\").val()+\"\\\");'> <i class='fa fa-plus-square'></i> </button>\" \r\n html+=\"</div></a>\";\r\n\r\n html+=\"<a id='btnadd2_\"+numDiaAdd+\"' class='fc-day-grid-event fc-event fc-start fc-end fc-draggable' style='background-color:#00a65a;border-color:#fff'>\";\r\n html+=\"<div class='fc-content'>\"; \r\n html+=getNameDay(numDiaAdd,$(\"#month\").val(),$(\"#year\").val()); \r\n html+=\"</div></a>\";\r\n\r\n html+=\"</td>\";\r\n }else {\r\n html+=\" <td class='fc-day-number fc-sun fc-today fc-state-highlight'></td>\";\r\n }\r\n \r\n numDiaAdd++;\r\n }\r\n html+=\" </tr> </tbody> </table> </div> \"; \r\n $( \"#containerCalendar\" ).append(html); \r\n } \r\n }", "onEventDataGenerated(renderData) {\n const me = this,\n record = renderData.event || renderData.eventRecord; // Differs by mode\n\n if (record.isResourceTimeRange) {\n if (me.scheduler.isVertical) {\n renderData.width = me.scheduler.resourceColumnWidth;\n } else {\n renderData.top = 0;\n // Avoid colliding ids by using a prefix\n renderData.id = `${me.scheduler.id}-${me.idPrefix}-${record.id}`;\n }\n\n // Flag that we should fill entire row/col\n renderData.fillSize = true;\n // Needed for caching\n renderData.eventId = `${me.idPrefix}-${record.id}`;\n // Add our own cls\n renderData.wrapperCls[me.rangeCls] = 1;\n renderData.wrapperCls[`b-sch-color-${record.timeRangeColor}`] = record.timeRangeColor;\n // Add label\n renderData.body = document.createDocumentFragment();\n renderData.body.textContent = record.name;\n }\n }", "function createEvents(events){\n\n\n todaysEvents.innerHTML = '';\n upcomingEvents.innerHTML = '';\n\n events.forEach(function(ev) {\n var container = document.createElement('section');\n var when = ev.when.split('T');\n var day = when[0].split('-');\n var getWeekday = months[day[1] - 1] + ' ' + day[2] + ', ' + day[0] + ' 00:00:00';\n var isThismonth = false;\n\n var my_date = new Date(getWeekday);\n\n\n var eventDiv = document.createElement('div');\n eventDiv.id = 'eventday';\n\n container.appendChild(eventDiv);\n\n var div = document.createElement('div');\n div.classList.add('weekday');\n if(my_date.getDay() == 0){\n div.textContent = weekdays[6];\n }else {\n div.textContent = weekdays[my_date.getDay() - 1];\n }\n\n\n eventDiv.appendChild(div);\n\n div = document.createElement('div');\n div.classList.add('day');\n div.textContent = day[2];\n eventDiv.appendChild(div);\n\n div = document.createElement('div');\n div.classList.add('month');\n div.textContent = months[day[1] - 1];\n if(div.textContent == currentMonth.textContent){\n isThismonth = true;\n }\n eventDiv.appendChild(div);\n\n\n\n var elem = document.createElement('h1');\n elem.textContent = ev.name;\n elem.dataset.id = ev.id;\n container.appendChild(elem);\n\n elem = document.createElement('p');\n elem.textContent = ev.desc;\n elem.id = 'eventdesc';\n container.appendChild(elem);\n\n\n if(ev.start == 'all day'){\n eventtime = 'all day';\n }\n else {\n eventtime = 'From ' + ev.start + ' to ' + ev.finish;\n }\n\n elem = document.createElement('p');\n elem.textContent = eventtime;\n container.appendChild(elem);\n\n elem = document.createElement('p');\n elem.dataset.id = ev.id;\n elem.textContent = 'x';\n elem.id = 'remove';\n elem.onclick = deleteEvent;\n container.appendChild(elem);\n\n var alldays = window.days.children;\n\n if(day[1] < 10){\n mth = day[1].split('0');\n }\n\n for(var i = 0; i < alldays.length; i++){\n if(alldays[i].textContent == day[2] && currentM.textContent == months[mth[1] - 1] && year == day[0]){\n alldays[i].classList.add('hasEvent');\n }\n }\n\n if(isThismonth == true){\n todaysEvents.appendChild(container);\n }else {\n upcomingEvents.appendChild(container);\n }\n\n\n\n });\n\n if(upcomingEvents.textContent == ''){\n upcomingEvents.textContent = 'no events scheduled yet';\n }\n\n if(todaysEvents.textContent == ''){\n upcomingEvents.textContent = 'no events scheduled yet';\n }\n\n\n}", "updateRowTimeSpans(row, resource, forceLayout = false, fromHorizontalScroll = false) {\n const me = this,\n scheduler = me.scheduler,\n resourceId = resource.id;\n\n let renderedEvents = me.cache.getRenderedEvents(resourceId),\n resourceLayoutCache = me.cache.getRow(resourceId);\n\n // no need to relayout events if only scrolling horizontally\n if ((scheduler.forceLayout || forceLayout || !resourceLayoutCache) && !me.layoutEvents(scheduler, resource, row)) {\n return (resourceLayoutCache && resourceLayoutCache._rowHeight) || 0;\n }\n\n // might have been updated above\n resourceLayoutCache = me.cache.getRow(resourceId);\n\n if (!resourceLayoutCache) return 0;\n\n const eventsInView = resourceLayoutCache._allEvents.filter(\n (evt) =>\n // Keep events flagged by for example EventDrag\n evt.event.instanceMeta(scheduler).retainElement ||\n // Assignment might also be flagged if used\n (evt.assignment && evt.assignment.instanceMeta(scheduler).retainElement) ||\n // And keep events actually in view :)\n me.isEventInView(evt)\n );\n\n if (!renderedEvents) {\n renderedEvents = {};\n me.cache.addRenderedEvents(resourceId, renderedEvents);\n }\n\n // Add events not already in dom or refresh those that are\n for (let i = 0; i < eventsInView.length; i++) {\n const data = eventsInView[i];\n\n // There are multiple pathways that might lead to the first render of events. This is the first reliable\n // place were we can determine that something will be rendered\n scheduler._firstRenderDone && scheduler._firstRenderDone();\n\n // Do not render events whose element is retained, or if scrolling horizontally already has an element\n if (\n (!fromHorizontalScroll && !data.event.instanceMeta(scheduler).retainElement) ||\n (fromHorizontalScroll && !data.layoutCache.div)\n ) {\n const animation = scheduler.isFirstRender && data.top < scheduler.bodyHeight && scheduler.useInitialAnimation;\n\n if (animation) {\n data.wrapperCls.add('b-first-render');\n data.internalStyle = `animation-delay: ${data.row.index / 20}s;`;\n }\n\n me.renderEvent(data);\n\n data.wrapperCls['b-first-render'] = null;\n }\n }\n\n // Remove already rendered events that are now outside of view\n const renderedEventIds = Object.keys(renderedEvents);\n for (let i = 0; i < renderedEventIds.length; i++) {\n const eventId = renderedEventIds[i];\n if (!eventsInView.some((e) => e.id === eventId)) {\n me.releaseEvent(resourceId, eventId);\n }\n }\n\n return resourceLayoutCache._rowHeight;\n }", "function MonthEvent(parent){var _this=_super.call(this,parent)||this;_this.renderedEvents=[];_this.monthHeaderHeight=0;_this.moreIndicatorHeight=19;_this.renderType='day';_this.element=_this.parent.activeView.getPanel();_this.fields=_this.parent.eventFields;_this.maxHeight=_this.parent.eventSettings.enableMaxHeight&&!_this.parent.eventSettings.enableIndicator&&!_this.parent.rowAutoHeight;_this.withIndicator=_this.parent.eventSettings.enableMaxHeight&&_this.parent.eventSettings.enableIndicator&&!_this.parent.rowAutoHeight;_this.maxOrIndicator=_this.maxHeight||_this.withIndicator;_this.moreIndicatorHeight=_this.parent.rowAutoHeight&&_this.parent.eventSettings.ignoreWhitespace?0:_this.moreIndicatorHeight;_this.addEventListener();return _this;}", "renderCells() {\n const { currentMonth, today, booked } = this.state;\n const monthStart = dateFns.startOfMonth(currentMonth);\n const monthEnd = dateFns.endOfMonth(monthStart);\n const startDate = dateFns.startOfWeek(monthStart);\n const endDate = dateFns.endOfWeek(monthEnd);\n\n const dateFormat = \"D\";\n const rows = [];\n\n let days = [];\n let day = startDate;\n let formattedDate = \"\";\n\n // loop from startDate to endDate to show all the dates\n while (day <= endDate) {\n for (let i = 0; i < 7; i++) {\n formattedDate = dateFns.format(day, dateFormat);\n const cloneDay = day;\n // determine if day is disabled, today or has event and assign the style\n days.push(\n <div\n className={`col cell ${\n !dateFns.isSameMonth(day, monthStart)\n ? \"disabled\"\n : dateFns.isSameDay(day, today) ? \"selected\" : \"\"\n }${booked.map((book) => dateFns.isSameDay(day, book) ? \"booked\" : \"\").join('')}\n ` }\n \n key={day}\n onClick={() => this.onDateClick(dateFns.parse(cloneDay))}\n >\n <span className=\"number\">{formattedDate}</span>\n <span className=\"bg\">{formattedDate}</span>\n \n </div>\n );\n day = dateFns.addDays(day, 1);\n }\n rows.push(\n <div className=\"row\" key={day}>\n {days}\n </div>\n );\n days = [];\n }\n return <div className=\"body\">{rows}</div>;\n }", "function renderTempDayEvent(event, adjustRow, adjustTop) {\n\n\t\t// actually render the event. `true` for appending element to container.\n\t\t// Recieve the intermediate \"segment\" data structures.\n\t\tvar segments = _renderDayEvents(\n\t\t\t[ event ],\n\t\t\ttrue, // append event elements\n\t\t\tfalse // don't set the heights of the rows\n\t\t);\n\n\t\tvar elements = [];\n\n\t\t// Adjust certain elements' top coordinates\n\t\tsegmentElementEach(segments, function(segment, element) {\n\t\t\tif (segment.row === adjustRow) {\n\t\t\t\telement.css('top', adjustTop);\n\t\t\t}\n\t\t\telements.push(element[0]); // accumulate DOM nodes\n\t\t});\n\n\t\treturn elements;\n\t}", "function renderTempDayEvent(event, adjustRow, adjustTop) {\n\n\t\t// actually render the event. `true` for appending element to container.\n\t\t// Recieve the intermediate \"segment\" data structures.\n\t\tvar segments = _renderDayEvents(\n\t\t\t[ event ],\n\t\t\ttrue, // append event elements\n\t\t\tfalse // don't set the heights of the rows\n\t\t);\n\n\t\tvar elements = [];\n\n\t\t// Adjust certain elements' top coordinates\n\t\tsegmentElementEach(segments, function(segment, element) {\n\t\t\tif (segment.row === adjustRow) {\n\t\t\t\telement.css('top', adjustTop);\n\t\t\t}\n\t\t\telements.push(element[0]); // accumulate DOM nodes\n\t\t});\n\n\t\treturn elements;\n\t}", "function renderTempDayEvent(event, adjustRow, adjustTop) {\n\n\t\t// actually render the event. `true` for appending element to container.\n\t\t// Recieve the intermediate \"segment\" data structures.\n\t\tvar segments = _renderDayEvents(\n\t\t\t[ event ],\n\t\t\ttrue, // append event elements\n\t\t\tfalse // don't set the heights of the rows\n\t\t);\n\n\t\tvar elements = [];\n\n\t\t// Adjust certain elements' top coordinates\n\t\tsegmentElementEach(segments, function(segment, element) {\n\t\t\tif (segment.row === adjustRow) {\n\t\t\t\telement.css('top', adjustTop);\n\t\t\t}\n\t\t\telements.push(element[0]); // accumulate DOM nodes\n\t\t});\n\n\t\treturn elements;\n\t}", "function renderTempDayEvent(event, adjustRow, adjustTop) {\n\n\t\t// actually render the event. `true` for appending element to container.\n\t\t// Recieve the intermediate \"segment\" data structures.\n\t\tvar segments = _renderDayEvents(\n\t\t\t[ event ],\n\t\t\ttrue, // append event elements\n\t\t\tfalse // don't set the heights of the rows\n\t\t);\n\n\t\tvar elements = [];\n\n\t\t// Adjust certain elements' top coordinates\n\t\tsegmentElementEach(segments, function(segment, element) {\n\t\t\tif (segment.row === adjustRow) {\n\t\t\t\telement.css('top', adjustTop);\n\t\t\t}\n\t\t\telements.push(element[0]); // accumulate DOM nodes\n\t\t});\n\n\t\treturn elements;\n\t}", "function renderTempDayEvent(event, adjustRow, adjustTop) {\n\n\t\t// actually render the event. `true` for appending element to container.\n\t\t// Recieve the intermediate \"segment\" data structures.\n\t\tvar segments = _renderDayEvents(\n\t\t\t[ event ],\n\t\t\ttrue, // append event elements\n\t\t\tfalse // don't set the heights of the rows\n\t\t);\n\n\t\tvar elements = [];\n\n\t\t// Adjust certain elements' top coordinates\n\t\tsegmentElementEach(segments, function(segment, element) {\n\t\t\tif (segment.row === adjustRow) {\n\t\t\t\telement.css('top', adjustTop);\n\t\t\t}\n\t\t\telements.push(element[0]); // accumulate DOM nodes\n\t\t});\n\n\t\treturn elements;\n\t}", "function RenderEvent() {}", "styleEvents(events){\n const {\n day\n } = this.props;\n\n const columnEndTimes = [];\n\n return events.map((event) => {\n const { startDate, endDate } = event;\n\n const startOfDayUnix = day.startMoment.valueOf();\n const endOfDayUnix = day.endMoment.valueOf();\n\n let styles = {\n top:`${((startDate - startOfDayUnix)/(endOfDayUnix - startOfDayUnix))*100}%`,\n height: (DAY_COLUMN_HEIGHT/MS_IN_DAY)*(endDate-startDate)\n };\n\n // columns - this just offsets everything 45px*the col. We might want to change this to a percentage based on the total # of cols in the future.\n // loop through all the column event times and find the lowest column with no overlap\n for (let [idx, columnEndTime] of columnEndTimes.entries()) {\n if (startDate >= columnEndTime) {\n columnEndTimes[idx] = endDate;\n\n styles = {\n ...styles,\n left: `${idx*45}px`,\n zIndex: idx\n };\n\n break;\n }\n }\n\n // if there is STILL overlap, then we need to make a new column\n // with the current event's endTime there.\n if(!styles.left) {\n columnEndTimes.push(endDate);\n\n styles = {\n ...styles,\n left: `${(columnEndTimes.length - 1)*45}px`,\n zIndex: columnEndTimes.length - 1\n };\n\n }\n\n return {\n ...event,\n styles\n };\n });\n }", "function render() {\n\t\tvar options = calendar.options;\n\t\tvar sections = options.header;\n\n\t\ttm = options.theme ? 'ui' : 'fc';\n\n\t\tif (sections) {\n\t\t\tif (!el) {\n\t\t\t\tel = this.el = $(\"<div class='fc-toolbar'/>\");\n\t\t\t}\n\t\t\telse {\n\t\t\t\tel.empty();\n\t\t\t}\n\t\t\tel.append(renderSection('left'))\n\t\t\t\t.append(renderSection('right'))\n\t\t\t\t.append(renderSection('center'))\n\t\t\t\t.append('<div class=\"fc-clear\"/>');\n\t\t}\n\t\telse {\n\t\t\tremoveElement();\n\t\t}\n\t}", "function render() {\n\t\t\tvar options = calendar.options;\n\t\t\tvar sections = options.header;\n\n\t\t\ttm = options.theme ? 'ui' : 'fc';\n\n\t\t\tif (sections) {\n\t\t\t\tif (!el) {\n\t\t\t\t\tel = this.el = $(\"<div class='fc-toolbar'/>\");\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tel.empty();\n\t\t\t\t}\n\t\t\t\tel.append(renderSection('left'))\n\t\t\t\t\t.append(renderSection('right'))\n\t\t\t\t\t.append(renderSection('center'))\n\t\t\t\t\t.append('<div class=\"fc-clear\"/>');\n\t\t\t}\n\t\t\telse {\n\t\t\t\tremoveElement();\n\t\t\t}\n\t\t}", "function renderEvents() {\n markers.clearLayers();\n var eventsGeoJsonAPI = '/api/geojson/events';\n updateMap(eventsGeoJsonAPI);\n removeSpinner();\n}", "function matchLunchEvent(eventsData) {\n var rows = []; //used to store processed event object\n $('#eventDisplayArea').empty(); //empty constents\n eventsData = assignColorIndication(eventsData); //Method to calculates overlap values\n initiateEventsFormatting(eventsData, rows); //Method to create rows based on overlap criteria\n renderUI(rows); //Method to display segregates rows containing event objects\n}", "function renderAll() {\n\t\tchart.each(render);\n\t\ttimeline1.updateData(bornDate.top(99999));\n\t}", "function loadEventTable(json) {\n var response = JSON.parse(json.responseText);\n var parsedEvent;\n\n var events;\n var datetime;\n var page;\n var img;\n var category;\n let startDate;\n let startTime;\n let endDate;\n let endTime;\n for (var i = 0; i < response.length; i++) {\n parsedEvent = JSON.parse(transformResponseEvent(response[i]));\n startDate = parsedEvent.start_date;\n startTime = parsedEvent.start_time;\n endDate = parsedEvent.end_date;\n endTime = parsedEvent.end_time;\n if (startDate === endDate) {\n\n if (parsedEvent.allday === true) {\n datetime = startDate + \"<br>\" + \"All day\";\n } else {\n datetime = startDate + \"<br>\" + startTime + \"-\" + endTime;\n }\n } else {\n if (parsedEvent.allday === true) {\n datetime = startDate + \"<br>-<br>\" + endDate;\n } else {\n datetime = startDate + \" \" + startTime + \"<br>-<br>\" + endDate + \" \" + endTime;\n }\n }\n if (parsedEvent.webpage) {\n\n page = parsedEvent.webpage;\n } else {\n page = \"No page\";\n }\n if (parsedEvent.imageurl === null) {\n img = \"No image\";\n } else {\n img = \"<img alt='Image upload' src=\\\"\" + parsedEvent.imageurl + \"\\\" width=\\\"50\\\"\\>\";\n }\n if (parsedEvent.categories.length === 0) {\n\n category = \"No category\";\n } else {\n category = parsedEvent.categories[0].name;\n }\n events = events +\n \"<tr>\" +\n \"<td>\" + parsedEvent.title + \"</td>\" +\n \"<td width=\\\"75\\\">\" + parsedEvent.status + \"</td>\" +\n \"<td width=\\\"100\\\">\" + parsedEvent.location + \"</td><td>\" +\n \"<a href=\\\"mailto:\" + parsedEvent.organizer + \"\\\">\" + parsedEvent.organizer + \"</a>\" + \"</td>\" +\n \"<td width=\\\"125\\\">\" + datetime + \"</td>\" +\n \"<td>\" + \"<a href=\\\"\" + parsedEvent.webpage + \"\\\">\" + page + \"</a>\" + \"</td>\" +\n \"<td width=\\\"50\\\">\" + img + \"</td>\" +\n \"<td width=\\\"75\\\">\" + category + \"</td>\" +\n \"<td>\" + \"<button onclick=\\\"editData(\\'events\\',\" + parsedEvent.id + \")\\\" style=\\\"width: 100%\\\">Edit</button>\" + \"<br>\" + \"<button onclick=\\\"confirmDeletion(\\'events\\',\" + parsedEvent.id + \")\\\" style=\\\"width: 100%\\\">Delete</button>\" + \"</td>\" +\n \"</tr>\";\n\n // Add starts for the alarms\n alarmTimes.push([parsedEvent.extra, startDate, startTime, parsedEvent.title]);\n }\n document.getElementById(\"event_table\").innerHTML = addEventTableHeader() + events;\n setAlarms(alarmTimes);\n}", "function appendMainEvent(x){\n\tvar i;\n\tvar parent = document.getElementById(\"MainEventOutput\");\n\tvar newLine = document.createElement(\"br\");\n\tfor (i = 0; i < x; i++){\n\t\tvar holder = i + 1;\n\t\tvar elementName = \"Event\" + holder;\n\t\t\n\t\t// Creating of Main event Div \n\t\tvar MainEvent = document.createElement(\"div\");\n\t\tMainEvent.setAttribute(\"id\", elementName);\n\n\t\t// Event ID\n\t\tvar eventID = elementName;\n\n\t\t// Event Title Creation\n\t\tvar eventTitle = document.createElement(\"h1\");\n\t\teventTitle.setAttribute(\"id\", eventID+ \"Title\");\n\t\tvar node = document.createTextNode(\"MainEvent \" + holder);\n\t\teventTitle.appendChild(node);\n\t\tMainEvent.appendChild(eventTitle);\n\n\t\t// Creation of Form aspect\n\t\tvar eventForm = document.createElement(\"form\");\n\n\t\t// Event Name Creation\n\t\tvar eventName = document.createElement(\"h2\");\n\t\teventName.appendChild(document.createTextNode(\"EventName: \"));\n\t\tvar eventNameInput = document.createElement(\"input\");\n\t\teventNameInput.setAttribute(\"placeholder\", \"Book of Moron\")\n\t\teventForm.appendChild(eventName);\n\t\teventForm.appendChild(eventNameInput);\n\n\t\t// For now assume its under wordpress but make sure we can render it as a graphic\n\t\tvar eventGraphic = document.createElement(\"h2\");\n\t\teventGraphic.appendChild(document.createTextNode(\"EventGraphic: \"));\n\t\tvar eventGraphicInput = document.createElement(\"input\");\n\t\teventGraphicInput.setAttribute(\"placeholder\", \"Image Graphic URL\");\n\t\teventForm.appendChild(eventGraphic);\n\t\teventForm.appendChild(eventGraphicInput);\n\n\t\t// Event Dates Creation\n\t\tvar eventDates = document.createElement(\"h2\");\n\t\teventDates.appendChild(document.createTextNode(\"Dates: \"));\n\t\tvar eventDatesInput = document.createElement(\"input\");\n\t\teventDatesInput.setAttribute(\"type\", \"date\");\n\t\t// eventDatesInput.setAttribute(\"placeholder\", \"place ,'s between each date if multiple\");\n\t\teventForm.appendChild(eventDates);\n\t\teventForm.appendChild(eventDatesInput);\n\n\t\t// Event Description\n\t\tvar eventDescription = document.createElement(\"h2\");\n\t\teventDescription.appendChild(document.createTextNode(\"Description: \"));\n\t\tvar eventDescriptionInput = document.createElement(\"textarea\");\n\t\teventDescriptionInput.setAttribute(\"placeholder\", \"Description\");\n\t\teventForm.appendChild(eventDescription);\n\t\teventForm.appendChild(eventDescriptionInput);\t\n\n\t\t// Event Ticket\n\t\tvar eventTicket = document.createElement(\"h2\");\n\t\teventTicket.appendChild(document.createTextNode(\"ticketLink: \"));\n\t\tvar eventTicketInput = document.createElement(\"input\");\n\t\teventTicketInput.setAttribute(\"placeholder\", \"Ticket link\");\n\n\t\teventForm.appendChild(eventTicket);\n\t\teventForm.appendChild(eventTicketInput);\n\t\teventForm.appendChild(newLine);\n\t\tMainEvent.appendChild(eventForm);\n\n\t\t// Clear button\n\t\tvar clearButton = document.createElement(\"input\");\n\t\tclearButton.setAttribute(\"type\", \"button\");\n\t\tclearButton.setAttribute(\"id\", eventID);\n\t\tclearButton.setAttribute(\"value\", \"clearButton\");\n\t\tclearButton.setAttribute(\"onclick\", \"clearEvent(this.id); return false;\");\n\t\tMainEvent.appendChild(clearButton);\n\t\tMainEvent.appendChild(newLine);\n\n\t\t// Appending it to Main EventOutput\n\t\tparent.appendChild(MainEvent);\n\t}\n\tvar addNewEvent = document.createElement(\"input\");\n\taddNewEvent.setAttribute(\"type\", \"button\");\n\taddNewEvent.setAttribute(\"value\", \"add Another Event\");\n\taddNewEvent.setAttribute(\"onclick\", \"createMainEvent(); return false;\");\n\tparent.appendChild(addNewEvent);\n}", "renderContents() {\n const me = this,\n element = me.appendTo,\n headerContainer = me.headerContainer,\n footerContainer = me.footerContainer;\n\n me.emptyCache();\n\n // columns will be \"drawn\" on render anyway, bail out\n if (!me.rendered) return;\n\n // reset measured header height, to make next call to get headerHeight measure it\n me._headerHeight = null;\n\n me.callEachSubGrid('refreshHeader', headerContainer);\n me.callEachSubGrid('refreshFooter', footerContainer);\n\n // Note that these are hook methods for features to plug in to. They do not do anything.\n me.renderHeader(headerContainer, element);\n me.renderFooter(footerContainer, element);\n\n me.fixSizes();\n me.renderRows(false);\n }", "function renderEvents() {\n // Check if there are any stored events that match data-time of each row\n $descriptionArray.each(function () {\n for (var i = 0; i < storedEventsArray.length; i++) {\n if ($(this).parent().attr(\"data-time\") === storedEventsArray[i].hour) {\n $(this).text(storedEventsArray[i].userInput);\n }\n }\n })\n}", "function generateEvents(evntJson){\n\t\tfor (var i = 0; i < evntJson.length; i++) {\n\t\t\t//if(evntJson[i].ID === \"6\"){\n\t\t\teventList.push({\n\t\t\t\ttitle: evntJson[i].NAME,\n\t\t\t\tstart: evntJson[i].DATE \n\t\t\t});\n\t\t\t//}\n\t\t}\n\t\t\tcreateCalender();\n\t\t\tconsole.log(eventList);\t\t\t\n\t\t}", "function renderCalendar() {\r\n calendar.innerHTML = '';\r\n var dateCounter = new Date(pickerElement.value);\r\n var month = dateCounter.getMonth();\r\n\r\n dateCounter.setDate(1);\r\n\r\n while (dateCounter.getMonth() === month) {\r\n var dayObject = document.createElement('SPAN');\r\n dayObject.classList.add('vjsdate-day' + dateCounter.getDate());\r\n if (dateCounter < startDate || dateCounter > endDate) dayObject.classList.add('vjsdate-day-disabled');\r\n dayObject.innerHTML = dateCounter.getDate();\r\n calendar.appendChild(dayObject);\r\n if (new Date(pickerElement.value).getDate() === dateCounter.getDate()) dayObject.classList.add('vjsdate-day-selected');\r\n\r\n if (parseInt(dayObject.innerHTML) == 1) {\r\n /*If we are the first date, we need to make N spacers for Nth day of the week*/\r\n for (i = 0; i < dateCounter.getDay(); i++) {\r\n var daySpacer = document.createElement('SPAN');\r\n daySpacer.classList.add('vjsdate-day');\r\n dayObject.parentElement.insertBefore(daySpacer, dayObject);\r\n }\r\n }\r\n dateCounter.setDate(dateCounter.getDate() + 1);\r\n }\r\n }", "function createCalendar() {\n addCalendar();\n displayDates();\n}", "function addEvents(ccs) {\r\n var dragging = false,\r\n start_el, selected, docs;\r\n var root_el = ccs.templated.root.parentNode;\r\n root_el.addEventListener('click', function(e) {\r\n src_el = e.target || e.srcElement;\r\n /*\r\n handle the column calendar elements\r\n such as the days, years, and months\r\n */\r\n if (hasClass(src_el, \"ccs_col\")) {\r\n if (hasClass(src_el, \"ccs_col_months\")) {\r\n var month = moment(src_el.id).startOf('month');\r\n ccs.next(month);\r\n } else if (hasClass(src_el, \"ccs_col_years\")) {\r\n var year = moment(src_el.id).startOf('year');\r\n ccs.next(year);\r\n }\r\n }\r\n /*\r\n handle some of the controls\r\n */\r\n else if (hasClass(src_el, 'ccs_control')) {\r\n if (hasClass(src_el, 'ccs_back')) {\r\n ccs.prev();\r\n } else if (hasClass(src_el, 'ccs_up')) {\r\n ccs.scroll(-1);\r\n } else if (hasClass(src_el, 'ccs_down')) {\r\n ccs.scroll(1);\r\n }\r\n } else if (hasClass(src_el, 'ccs_today')) {\r\n //console.log('Wow');\r\n ccs.goto(moment(), 'days', true);\r\n }\r\n e.stopPropagation();\r\n });\r\n //drag over dates and such\r\n root_el.addEventListener(\"mousedown\",function(e){\r\n selected = [];\r\n src_el = e.target || e.srcElement;\r\n if(hasClass(src_el, \"ccs_col_days\")){\r\n docs = root_el.querySelectorAll(\".ccs_col_days\");\r\n src_el.classList.toggle(\"ccs_col_selected\");\r\n start_el = src_el;\r\n dragging = true;\r\n }\r\n });\r\n root_el.addEventListener(\"mouseup\",function(e){\r\n if(!dragging) return false;\r\n if (hasClass(src_el, \"ccs_col_days\")) {\r\n var day = moment(e.srcElement.id);\r\n if (hasClass(src_el, 'ccs_col_selected')) {\r\n runEvents('select', {\r\n //selection: day\r\n });\r\n ccs.addSelection(day);\r\n } else {\r\n runEvents('deselect', {\r\n //selection: day\r\n });\r\n ccs.removeSelection(day);\r\n }\r\n ccs.next(day);\r\n dragging = false;\r\n }\r\n });\r\n\r\n root_el.addEventListener(\"mousemove\",function(e){\r\n src_el = e.target || e.srcElement;\r\n if(src_el == start_el || !dragging) return false;\r\n if(hasClass(src_el, \"ccs_col_days\")){\r\n //get all td between this one and start_el\r\n var populating = false, \r\n doc;\r\n for(var i=0;i<docs.length;i++){\r\n doc = docs[i];\r\n if(doc == src_el || doc == start_el){\r\n populating = !populating;\r\n }\r\n if(populating){\r\n if(start_el.classList.contains(\"ccs_col_selected\")){\r\n doc.classList.add(\"ccs_col_selected\");\r\n }else{\r\n doc.classList.remove(\"ccs_col_selected\");\r\n }//doc.classList.toggle(\"ccs_col_selected\");\r\n }else{\r\n doc.classList.remove(\"ccs_col_selected\");\r\n }\r\n }\r\n\r\n }\r\n });\r\n }", "layoutResourceEvents(resourceRecord, includeOutside = false) {\n const me = this,\n {\n scheduler\n } = me,\n {\n eventStore,\n assignmentStore,\n timeAxis\n } = scheduler,\n // Events for this resource\n resourceEvents = eventStore.getEvents({\n includeOccurrences: scheduler.enableRecurringEvents,\n resourceRecord,\n startDate: timeAxis.startDate,\n endDate: timeAxis.endDate,\n filter: eventRecord => eventRecord.assignments.some(a => a.resource === resourceRecord && assignmentStore.includes(a))\n }),\n // Call a chainable template function on scheduler to allow features to add additional \"events\" to render\n // Currently used by ResourceTimeRanges\n allEvents = scheduler.getEventsToRender(resourceRecord, resourceEvents) || [],\n // Generate layout data\n eventsData = allEvents.reduce((result, eventRecord) => {\n // Only those in time axis (by default)\n if (includeOutside || timeAxis.isTimeSpanInAxis(eventRecord)) {\n const eventBox = scheduler.generateRenderData(eventRecord, resourceRecord, false); // Collect layouts of visible events\n\n if (eventBox) {\n result.push(eventBox);\n }\n }\n\n return result;\n }, []); // Ensure the events are rendered in natural order so that navigation works.\n\n eventsData.sort(me.eventSorter);\n let rowHeight = scheduler.rowHeight;\n const layout = scheduler.currentEventLayout,\n // Only events and tasks should be considered during layout (not resource time ranges if any)\n layoutEventData = eventsData.filter(d => d.eventRecord.isEvent); // Event data is now gathered, calculate layout properties for each event\n\n if (scheduler.eventLayout === 'stack') {\n const nbrOfBandsRequired = layout.applyLayout(layoutEventData, resourceRecord),\n heightPerEvent = scheduler.rowHeight - scheduler.resourceMargin * 2;\n rowHeight = nbrOfBandsRequired * heightPerEvent + (nbrOfBandsRequired - 1) * scheduler.barMargin + scheduler.resourceMargin * 2;\n } else if (scheduler.eventLayout === 'pack') {\n layout.applyLayout(layoutEventData, resourceRecord);\n }\n\n return {\n rowHeight,\n eventsData\n };\n }", "render(){\n let elements = [];\n let setDay = false;\n if (this.state.dataReceived){\n let properData = this.state.data;\n\n for (let i = 0; i < properData.length; i++){\n if (i === 0 || properData[i-1]['start_time'].getMonth() !== properData[i]['start_time'].getMonth()){\n elements.push(<h2 key={i + ' month'}>{extraFunctions.turnNumberToMonth(properData[i]['start_time'].getMonth())}</h2>)\n }\n if (i === 0 || properData[i-1]['start_time'].getDay() !== properData[i]['start_time'].getDay()){\n setDay = true;\n }\n elements.push(<CalendarCard setDay={setDay} key={i} info={properData[i]} />);\n setDay = false;\n };\n }\n\n if (this.state['failed']) {\n elements = <h2>Data returned is wrong. Check console for more info.</h2>\n }\n \n return <div className='calendar-widget-container'>\n <h1 className='calendar-widget-title'>Upcoming Events</h1>\n <div className='calendar-widget'>{elements}</div>\n </div>\n }", "function getTodaysEvents(sortedCalendar, focusDate)\n{\n\n\t\tvar millisecondtoDays = (60*60*24*1000);\n\n\t\t//The cutoffs for what affects each day is midnight today (focusDate) =>midnight tomorrow (tomorrowDate).\n\t\tvar tomorrowDate = new Date(focusDate.getTime()+millisecondtoDays);\n\n\t\t//This string will hold all the HTML until the render engine is finished.\n\t\tvar HTMLforThisDay = \"<DIV>\";\n\t\tdurationOfEvent = 0; //Flags used later. durationOfEvent 0: St<Today, End=Today; | 1: St<Today, End>Today; | 2: St=Today, End=Today; | 3: St=today end>today. | 4: St<Today, End>Today; | 9:\n\t\t\t\t\t\t\t//Not added.\n\n\t\t$.each(Object.keys(sortedCalendar), function()\n\t\t{\n\n\t\t\t//Set default values to null, and assign actual values later if they exist. These variables exist only to use for\n\t\t\t//substitution & readibility in the date evaluations.\n\t\t\tplannedStart = null;\n\t\t\tplannedEnd = null;\n\t\t\treqStart = null;\n\t\t\treqEnd = null;\n\t\t\tsolutionDate = null;\n\n\t\t\t//Assigning values, if the exist.\n\t\t\t\tif(!isEmpty(sortedCalendar[this]['SOLUTION_DATE']))\n\t\t\t\t\t{\tsolutionDate = new Date(sortedCalendar[this]['SOLUTION_DATE']);\t\t}\n\n\t\t\t\tif(!isEmpty(sortedCalendar[this]['PLANNED_START_DATE']))\n\t\t\t\t\t{\tplannedStart = new Date(sortedCalendar[this]['PLANNED_START_DATE']);\t}\n\n\t\t\t\tif(!isEmpty(sortedCalendar[this]['PLANNED_END_DATE']))\n\t\t\t\t\t{\tplannedEnd = new Date(sortedCalendar[this]['PLANNED_END_DATE']);\t\t}\n\n\t\t\t\tif(!isEmpty(sortedCalendar[this]['REQUESTED_START_DATE']))\n\t\t\t\t\t{\treqStart = new Date(sortedCalendar[this]['REQUESTED_START_DATE']);\t}\n\n\t\t\t\tif(!isEmpty(sortedCalendar[this]['REQUESTED_END_DATE']))\n\t\t\t\t\t{\treqEnd = new Date(sortedCalendar[this]['REQUESTED_END_DATE']);\t\t}\n\n/*The order of precedence for dates in change management with regards for calendaring purposes is that solution dates are the most important because they are completed changes. Next is planned changes, because these are Normal changes and have been planned by a change manager. Finally, requested dates, because they are for non-Normal changes, and changes that are still in play.*/\n\n\t\t\tif(!isEmpty(solutionDate) && sortedCalendar[this]['includeMe'] == true)\n\t\t\t{\n\t\t\t\tif(solutionDate.getTime()>focusDate.getTime() && solutionDate.getTime()<tomorrowDate.getTime())\n\t\t\t\t{\n\t\t\t\t\tdurationOfEvent = 2;\n\t\t\t\t\tHTMLforThisDay += renderItem(sortedCalendar[this], durationOfEvent, 2);\n\t\t\t\t\tsortedCalendar[this]['includeMe']= false;\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse if(!isEmpty(plannedStart) && !isEmpty(plannedEnd) && sortedCalendar[this]['includeMe']==true)\n\t\t\t{\n\t\t\t\tif(plannedStart.getTime() < tomorrowDate.getTime()) //Planned to start on or before today.\n\t\t\t\t\t{\n\t\t\t\t\t\tif(plannedStart.getTime() >= focusDate.getTime() && plannedStart.getTime()<tomorrowDate.getTime()) //If it is starting today.\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif(plannedEnd.getTime() == null || plannedEnd.getTime() < tomorrowDate.getTime()) //started today and ending today.\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tdurationOfEvent = 2;\n\t\t\t\t\t\t\t\tHTMLforThisDay += renderItem(sortedCalendar[this], durationOfEvent, 0);\n\t\t\t\t\t\t\t\tsortedCalendar[this]['includeMe'] = false;\n\t\t\t\t\t\t\t\treturn true;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\telse if(plannedEnd.getTime()>tomorrowDate.getTime()) //started today, and ending past midnight.\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tdurationOfEvent= 3;\n\t\t\t\t\t\t\t\tHTMLforThisDay += renderItem(sortedCalendar[this], durationOfEvent,0);\n\t\t\t\t\t\t\t\treturn true;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if(plannedStart.getTime()<focusDate.getTime()) //Starting before today.\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif(plannedEnd.getTime()>focusDate.getTime() && plannedEnd.getTime()<tomorrowDate.getTime()) //Started before today, and ending today.\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tdurationOfEvent = 1;\n\t\t\t\t\t\t\t\tHTMLforThisDay += renderItem(sortedCalendar[this], durationOfEvent,0);\n\t\t\t\t\t\t\t\tsortedCalendar[this]['includeMe'] = false;\n\t\t\t\t\t\t\t\treturn true;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse if(plannedEnd.getTime()>=tomorrowDate.getTime()) //Started before today and ending past midnight.\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tdurationOfEvent = 4;\n\t\t\t\t\t\t\t\tHTMLforThisDay += renderItem(sortedCalendar[this], durationOfEvent,0);\n\t\t\t\t\t\t\t\treturn true;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t}\n\n\t\t\telse if(!isEmpty(reqStart) && !isEmpty(reqEnd) && sortedCalendar[this]['includeMe'] == true)\n\t\t\t{\n\n\t\t\t\tif(reqStart.getTime() < tomorrowDate.getTime()) //Req to start on or before today.\n\t\t\t\t\t{\n\n\t\t\t\t\t\tif(reqStart.getTime() >= focusDate.getTime() && reqStart.getTime() < tomorrowDate.getTime()) //If it is starting today.\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif(reqEnd.getTime() == null || reqEnd.getTime() <= tomorrowDate.getTime()) //started today and ending today.\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tdurationOfEvent=2;\n\t\t\t\t\t\t\t\tHTMLforThisDay += renderItem(sortedCalendar[this], durationOfEvent,1);\n\t\t\t\t\t\t\t\tsortedCalendar[this]['includeMe'] = false;\n\t\t\t\t\t\t\t\treturn true;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\telse if(reqEnd.getTime()>tomorrowDate.getTime()) //started today, and ending past midnight.\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tdurationOfEvent=3;\n\t\t\t\t\t\t\t\tHTMLforThisDay += renderItem(sortedCalendar[this], durationOfEvent,1);\n\t\t\t\t\t\t\t\treturn true;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if(reqStart.getTime()<focusDate.getTime()) //Starting before today.\n\t\t\t\t\t\t{\n\n\t\t\t\t\t\t\tif(reqEnd.getTime()>focusDate.getTime() && reqEnd.getTime()<tomorrowDate.getTime()) //Started before today, and ending today.\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tdurationOfEvent=1;\n\t\t\t\t\t\t\t\tHTMLforThisDay += renderItem(sortedCalendar[this], durationOfEvent,1);\n\t\t\t\t\t\t\t\tsortedCalendar[this]['includeMe'] = false;\n\t\t\t\t\t\t\t\treturn true;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse if(reqEnd.getTime()>=tomorrowDate.getTime()) //Started before today and ending past midnight.\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tdurationOfEvent=4;\n\t\t\t\t\t\t\t\tHTMLforThisDay += renderItem(sortedCalendar[this], durationOfEvent,1);\n\t\t\t\t\t\t\t\treturn true;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t}\n\t\t});\n\n\t\treturn String(HTMLforThisDay+\"</DIV>\");\n\n}", "function initializeRows() {\n eventFeed.empty();\n const eventsToAdd = [];\n for (let i = 0; i < events.length; i++) {\n eventsToAdd.push(createNewRow(events[i]));\n }\n eventFeed.append(eventsToAdd);\n }", "renderDateGrid(dateObj) {\n // We basing all the calculations with Sunday being 0, Monday = 1 etc\n\n const gridBody = document.querySelector('#dateGrid');\n\n if(typeof(gridBody) != 'undefined' && gridBody != null){\n while (gridBody.firstChild) {\n gridBody.removeChild(gridBody.firstChild);\n }\n } else{\n console.log('Element does not exist!');\n }\n\n const start = parseInt(dateObj.startOfMonth, 10); \n let dayCounter = parseInt(dateObj.daysInMonth, 10);\n let runningTotal = 0;\n let dateTotal = 1;\n let maxRows = 0;\n\n // To determine how many rows, based on start of month and how many days in the month\n if (dayCounter > 30 && start >= 5) {\n maxRows = 6;\n } else if (dayCounter >= 30 && start >= 6) {\n maxRows = 6;\n } \n else {\n maxRows = 5;\n }\n\n // Here is the meet of the grid, where we do our calculation based on Moment data\n for (let i = 0; i < maxRows; i++) {\n const row = document.createElement('tr');\n gridBody.appendChild(row);\n \n for (let j = 0; j < 7; j++) {\n const cell = document.createElement('td');\n\n if (runningTotal < start) {\n cell.classList.add('not_in_month');\n runningTotal++;\n } else if (dateTotal <= dayCounter) {\n cell.classList.add('in_month');\n\n cell.textContent = dateTotal;\n cell.addEventListener('click', event => {\n let day = cell.textContent;\n console.log(day, 'hello');\n this.calcBookingDate(dateObj, day);\n popBack.classList.remove('displayBlock');\n popBack.classList.add('displayNone');\n });\n dateTotal++;\n } else {\n cell.classList.add('not_in_month');\n }\n \n row.appendChild(cell);\n \n // to break to next row\n if (j > 6) {\n break;\n }\n }\n }\n }", "function Events_Prepare( day ) {\n\tvar DEBUG_Events_Prepare = false;\n\tif ( DEBUG_Events_Prepare ) { console.warn('Events_Prepare[day='+day+']'); }\n\tvar currentDay,\n\t currentEvent,\n\t eventKey,\n\t\t\t//heightMultiplier = ScheduleIncrementHeight / ScheduleTimeIncrement,\n\t left,\n\t overlappingEvents,\n\t width;\n\tEVENTS_READY = {};\n\tEvents_Sort(EVENTS_TO_DISPLAY);\n\tif ( DEBUG_Events_Prepare ) { console.log('EVENTS_TO_DISPLAY='+JSON.stringify(EVENTS_TO_DISPLAY)); }\n\tfor ( var i=0, l=EVENTS_TO_DISPLAY.length; i<l; i+=1 ) { // Loop thru EVENTS_TO_DISPLAY.\n\t\tif ( DEBUG_Events_Prepare ) { console.log('EVENTS_TO_DISPLAY['+i+']='+JSON.stringify(EVENTS_TO_DISPLAY[i])); }\n\t\tcurrentEvent = EVENTS_TO_DISPLAY[i];\n\t\teventKey = EVENTS_TO_DISPLAY[i].scmId;//currentEvent.begin+'*'+currentEvent.end+'*'+currentEvent.position;\n\t\toverlappingEvents = Events_Prepare_Check(EVENTS_OVERLAPPING[eventKey], eventKey, day);\n\t\twidth = overlappingEvents.width;\n\t\tleft = overlappingEvents.left;\n\t\tcurrentEvent.top = currentEvent.begin;// * heightMultiplier;\n\t\tcurrentEvent.width = width;\n\t\tcurrentEvent.left = left;\n\t\tcurrentEvent.height = ( currentEvent.end - currentEvent.begin );// * heightMultiplier;\n\t\tcurrentEvent.contentWidth = currentEvent.width - 4;\n\t\t\n\t\tEVENTS_READY[eventKey] = {\n\t\t\tleft: left,\n\t\t\twidth : width\n\t\t};\n\t\tif ( DEBUG_Events_Prepare ) { console.log('EVENTS_READY['+eventKey+']='+JSON.stringify(EVENTS_READY[eventKey])); }\n\t} // Loop thru EVENTS_TO_DISPLAY.\n\tif ( DEBUG_Events_Prepare ) { console.log('EVENTS_TO_DISPLAY='+JSON.stringify(EVENTS_TO_DISPLAY)); }\n\tif ( DEBUG_Events_Prepare ) { console.log('EVENTS_READY='+JSON.stringify(EVENTS_READY)); }\n} // END Events_Prepare.", "function createCalendar(calDate) {\r\n var calendarHTML = \"<table id= 'calendar_table'>\";\r\n calendarHTML += calCaption(calDate);\r\n calendarHTML += calWeekdayRow();\r\n calendarHTML += calDays(calDate);\r\n calendarHTML += \"</table\"; \r\n return calendarHTML;\r\n\r\n}", "function printCalendar(calendarMatrix){\n while(calendarBody.children[0]){\n calendarBody.removeChild(calendarBody.children[0]);\n }\n deleteAppointments();\n title = document.getElementById(\"calendarTitle\").getElementsByTagName(\"h2\")[0];\n title.innerText = mesi[month]+\" \"+year //Cambio il titolo\n\n //Ogni riga della matrice è un tr nella tabella in html\n for(i=0; i<calendarMatrix.length; i++){\n tr = document.createElement(\"tr\");\n for(j=0; j<7; j++){\n td = document.createElement(\"td\");\n\n //calendarMatrix[i][j]==0 vuol dire che l'elemento è vuoto, ossia che è uno di quelli che,\n //nella stessa settimana, appartengono ad un mese diverso\n if(calendarMatrix[i][j]!=0){\n td.innerText = calendarMatrix[i][j];\n\n //Verifico se il giorno è passato\n if (today.getFullYear()>year ||\n (today.getFullYear()==year && today.getMonth()>month) ||\n (today.getFullYear()==year && today.getMonth()==month && today.getDate()>calendarMatrix[i][j]))td.setAttribute(\"class\",\"past\");\n \n //Se il giorno non è passato, gli assegno la funzione che da una parte mi stampa gli eventuali appuntamenti,\n //dall'altra mi permette di aggiungere il giorno di ambulatorio / modificarne lo stato\n else{\n (function(d,m,y){\n td.onclick = function(){getAppointments(d,m,y)}\n })(calendarMatrix[i][j],month,year);\n }\n\n //Verifico se è già un giorno tra quelli di ambulatorio\n for(k=0; k<usedDays.length; k++){\n usedDay= new Date(usedDays[k]['data']);\n if(usedDay.getDate()==calendarMatrix[i][j]){\n if(usedDays[k]['stato']==1){\n td.setAttribute(\"class\",\"accessibleDay\");\n }\n else td.setAttribute(\"class\",\"removedDay\");\n break;\n }\n }\n }\n else{\n td.setAttribute(\"class\",\"empty\");\n }\n tr.appendChild(td);\n }\n calendarBody.appendChild(tr);\n }\n}" ]
[ "0.76297015", "0.69982445", "0.66769207", "0.6400507", "0.6400507", "0.6400507", "0.6400507", "0.6400507", "0.6303442", "0.628121", "0.61521935", "0.6136223", "0.61312723", "0.6083419", "0.5957453", "0.59519196", "0.58935326", "0.587446", "0.5813661", "0.5755863", "0.57521236", "0.5741583", "0.5730503", "0.5713549", "0.57006305", "0.5681295", "0.5658093", "0.56473064", "0.5626846", "0.5624986", "0.5616797", "0.5604599", "0.55979335", "0.5591614", "0.55876076", "0.5575533", "0.5563488", "0.55622154", "0.55479753", "0.5545205", "0.553355", "0.5528372", "0.5514744", "0.5510351", "0.54921293", "0.549202", "0.5480231", "0.5467463", "0.5434124", "0.5427918", "0.5421098", "0.54128116", "0.5400242", "0.5400081", "0.53972965", "0.53931487", "0.5390206", "0.5390206", "0.5390206", "0.53889525", "0.53725564", "0.53626835", "0.5317806", "0.53128225", "0.5303293", "0.5301734", "0.52999264", "0.52935296", "0.52852887", "0.52852887", "0.52852887", "0.52852887", "0.52852887", "0.52826846", "0.5280589", "0.5277594", "0.5269076", "0.52562875", "0.5252952", "0.5232587", "0.5232176", "0.5214522", "0.5204557", "0.5188372", "0.518666", "0.5185438", "0.51707906", "0.5165373", "0.51616275", "0.5158883", "0.51582533", "0.51582086", "0.51555425", "0.51461625", "0.5139244", "0.51344883" ]
0.7676453
3
Generate an array of "segments" for all events.
function buildSegments(events) { var segments = []; for (var i=0; i<events.length; i++) { var eventSegments = buildSegmentsForEvent(events[i]); segments.push.apply(segments, eventSegments); // append an array to an array } return segments; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function buildSegmentsForEvent(event) {\n\t\tvar segments = rangeToSegments(event.start, getEventEnd(event));\n\t\tfor (var i=0; i<segments.length; i++) {\n\t\t\tsegments[i].event = event;\n\t\t}\n\t\treturn segments;\n\t}", "function buildSegmentsForEvent(event) {\n\t\tvar segments = rangeToSegments(event.start, getEventEnd(event));\n\t\tfor (var i=0; i<segments.length; i++) {\n\t\t\tsegments[i].event = event;\n\t\t}\n\t\treturn segments;\n\t}", "function buildSegmentsForEvent(event) {\n\t\tvar startDate = event.start;\n\t\tvar endDate = exclEndDay(event);\n\t\tvar segments = rangeToSegments(startDate, endDate);\n\t\tfor (var i=0; i<segments.length; i++) {\n\t\t\tsegments[i].event = event;\n\t\t}\n\t\treturn segments;\n\t}", "function buildSegmentsForEvent(event) {\n\t\tvar startDate = event.start;\n\t\tvar endDate = exclEndDay(event);\n\t\tvar segments = rangeToSegments(startDate, endDate);\n\t\tfor (var i=0; i<segments.length; i++) {\n\t\t\tsegments[i].event = event;\n\t\t}\n\t\treturn segments;\n\t}", "function buildSegmentsForEvent(event) {\n\t\tvar startDate = event.start;\n\t\tvar endDate = exclEndDay(event);\n\t\tvar segments = rangeToSegments(startDate, endDate);\n\t\tfor (var i=0; i<segments.length; i++) {\n\t\t\tsegments[i].event = event;\n\t\t}\n\t\treturn segments;\n\t}", "computeControlSegments() {\n if (this.controlSteps.length) {\n this.controlSegments = [];\n let segment = { start : 0, end : 0, human : this.controlSteps[0] }\n for (let i = 0; i < this.controlSteps.length; ++i) {\n const humanStep = this.controlSteps[i];\n if (humanStep != segment.human) {\n this.controlSegments.push(segment);\n segment = { start : i, end : i, human : humanStep };\n } else {\n segment.end = i;\n }\n }\n this.controlSegments.push(segment);\n }\n }", "function getEvents(duration){\n\n if (gazeCallback == null){\n\n return [];\n \n }\n\n let gaze = gazeCallback();\n\n if (!gaze){\n\n return [];\n\n }\n\n const extra = {\n 'ik': ['Time'],\n 'iv': [utils.getDataPointDuration(duration)],\n 'fk': [],\n 'fv': []\n };\n\n return [['vadrGaze', gaze, extra]];\n\n}", "function addSegEndsFromSequences(){\n //Add all the starting segEnds and internal segJoins\n for(var i=0;i<seqArr.length;i++){\n var length=parseInt(seqArr[i]['length']),\n seqId=seqArr[i]['id'];\n segEndArr[segEndArr.length]=[seqId,0,'POS_STRAND']\n segEndArr[segEndArr.length]=[seqId,length-1,'NEG_STRAND']\n segJoinArr[segJoinArr.length]=[[seqId,0,'POS_STRAND'],[seqId,length-1,'NEG_STRAND'],'internal',length]\n }\n segmentize();\n}", "function computeSegHorizontals(segs, eventOrderSpecs) {\n // IMPORTANT TO CLEAR OLD RESULTS :(\n for (var _i = 0, segs_2 = segs; _i < segs_2.length; _i++) {\n var seg = segs_2[_i];\n seg.level = null;\n seg.forwardCoord = null;\n seg.backwardCoord = null;\n seg.forwardPressure = null;\n }\n\n segs = Object(_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__[\"sortEventSegs\"])(segs, eventOrderSpecs);\n var level0;\n var levels = buildSlotSegLevels(segs);\n computeForwardSlotSegs(levels);\n\n if (level0 = levels[0]) {\n for (var _a = 0, level0_1 = level0; _a < level0_1.length; _a++) {\n var seg = level0_1[_a];\n computeSlotSegPressures(seg);\n }\n\n for (var _b = 0, level0_2 = level0; _b < level0_2.length; _b++) {\n var seg = level0_2[_b];\n computeSegForwardBack(seg, 0, 0, eventOrderSpecs);\n }\n }\n\n return segs;\n } // Builds an array of segments \"levels\". The first level will be the leftmost tier of segments if the calendar is", "function rangeToSegments(startDate, endDate) {\n\t\tvar rowCnt = t.getRowCnt();\n\t\tvar colCnt = t.getColCnt();\n\t\tvar segments = []; // array of segments to return\n\n\t\t// day offset for given date range\n\t\tvar rangeDayOffsetStart = dateToDayOffset(startDate);\n\t\tvar rangeDayOffsetEnd = dateToDayOffset(endDate); // exclusive\n\n\t\t// first and last cell offset for the given date range\n\t\t// \"last\" implies inclusivity\n\t\tvar rangeCellOffsetFirst = dayOffsetToCellOffset(rangeDayOffsetStart);\n\t\tvar rangeCellOffsetLast = dayOffsetToCellOffset(rangeDayOffsetEnd) - 1;\n\n\t\t// loop through all the rows in the view\n\t\tfor (var row=0; row<rowCnt; row++) {\n\n\t\t\t// first and last cell offset for the row\n\t\t\tvar rowCellOffsetFirst = row * colCnt;\n\t\t\tvar rowCellOffsetLast = rowCellOffsetFirst + colCnt - 1;\n\n\t\t\t// get the segment's cell offsets by constraining the range's cell offsets to the bounds of the row\n\t\t\tvar segmentCellOffsetFirst = Math.max(rangeCellOffsetFirst, rowCellOffsetFirst);\n\t\t\tvar segmentCellOffsetLast = Math.min(rangeCellOffsetLast, rowCellOffsetLast);\n\n\t\t\t// make sure segment's offsets are valid and in view\n\t\t\tif (segmentCellOffsetFirst <= segmentCellOffsetLast) {\n\n\t\t\t\t// translate to cells\n\t\t\t\tvar segmentCellFirst = cellOffsetToCell(segmentCellOffsetFirst);\n\t\t\t\tvar segmentCellLast = cellOffsetToCell(segmentCellOffsetLast);\n\n\t\t\t\t// view might be RTL, so order by leftmost column\n\t\t\t\tvar cols = [ segmentCellFirst.col, segmentCellLast.col ].sort();\n\n\t\t\t\t// Determine if segment's first/last cell is the beginning/end of the date range.\n\t\t\t\t// We need to compare \"day offset\" because \"cell offsets\" are often ambiguous and\n\t\t\t\t// can translate to multiple days, and an edge case reveals itself when we the\n\t\t\t\t// range's first cell is hidden (we don't want isStart to be true).\n\t\t\t\tvar isStart = cellOffsetToDayOffset(segmentCellOffsetFirst) == rangeDayOffsetStart;\n\t\t\t\tvar isEnd = cellOffsetToDayOffset(segmentCellOffsetLast) + 1 == rangeDayOffsetEnd; // +1 for comparing exclusively\n\n\t\t\t\tsegments.push({\n\t\t\t\t\trow: row,\n\t\t\t\t\tleftCol: cols[0],\n\t\t\t\t\trightCol: cols[1],\n\t\t\t\t\tisStart: isStart,\n\t\t\t\t\tisEnd: isEnd\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\n\t\treturn segments;\n\t}", "function rangeToSegments(startDate, endDate) {\n\t\tvar rowCnt = t.getRowCnt();\n\t\tvar colCnt = t.getColCnt();\n\t\tvar segments = []; // array of segments to return\n\n\t\t// day offset for given date range\n\t\tvar rangeDayOffsetStart = dateToDayOffset(startDate);\n\t\tvar rangeDayOffsetEnd = dateToDayOffset(endDate); // exclusive\n\n\t\t// first and last cell offset for the given date range\n\t\t// \"last\" implies inclusivity\n\t\tvar rangeCellOffsetFirst = dayOffsetToCellOffset(rangeDayOffsetStart);\n\t\tvar rangeCellOffsetLast = dayOffsetToCellOffset(rangeDayOffsetEnd) - 1;\n\n\t\t// loop through all the rows in the view\n\t\tfor (var row=0; row<rowCnt; row++) {\n\n\t\t\t// first and last cell offset for the row\n\t\t\tvar rowCellOffsetFirst = row * colCnt;\n\t\t\tvar rowCellOffsetLast = rowCellOffsetFirst + colCnt - 1;\n\n\t\t\t// get the segment's cell offsets by constraining the range's cell offsets to the bounds of the row\n\t\t\tvar segmentCellOffsetFirst = Math.max(rangeCellOffsetFirst, rowCellOffsetFirst);\n\t\t\tvar segmentCellOffsetLast = Math.min(rangeCellOffsetLast, rowCellOffsetLast);\n\n\t\t\t// make sure segment's offsets are valid and in view\n\t\t\tif (segmentCellOffsetFirst <= segmentCellOffsetLast) {\n\n\t\t\t\t// translate to cells\n\t\t\t\tvar segmentCellFirst = cellOffsetToCell(segmentCellOffsetFirst);\n\t\t\t\tvar segmentCellLast = cellOffsetToCell(segmentCellOffsetLast);\n\n\t\t\t\t// view might be RTL, so order by leftmost column\n\t\t\t\tvar cols = [ segmentCellFirst.col, segmentCellLast.col ].sort();\n\n\t\t\t\t// Determine if segment's first/last cell is the beginning/end of the date range.\n\t\t\t\t// We need to compare \"day offset\" because \"cell offsets\" are often ambiguous and\n\t\t\t\t// can translate to multiple days, and an edge case reveals itself when we the\n\t\t\t\t// range's first cell is hidden (we don't want isStart to be true).\n\t\t\t\tvar isStart = cellOffsetToDayOffset(segmentCellOffsetFirst) == rangeDayOffsetStart;\n\t\t\t\tvar isEnd = cellOffsetToDayOffset(segmentCellOffsetLast) + 1 == rangeDayOffsetEnd; // +1 for comparing exclusively\n\n\t\t\t\tsegments.push({\n\t\t\t\t\trow: row,\n\t\t\t\t\tleftCol: cols[0],\n\t\t\t\t\trightCol: cols[1],\n\t\t\t\t\tisStart: isStart,\n\t\t\t\t\tisEnd: isEnd\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\n\t\treturn segments;\n\t}", "function rangeToSegments(startDate, endDate) {\n\t\tvar rowCnt = t.getRowCnt();\n\t\tvar colCnt = t.getColCnt();\n\t\tvar segments = []; // array of segments to return\n\n\t\t// day offset for given date range\n\t\tvar rangeDayOffsetStart = dateToDayOffset(startDate);\n\t\tvar rangeDayOffsetEnd = dateToDayOffset(endDate); // exclusive\n\n\t\t// first and last cell offset for the given date range\n\t\t// \"last\" implies inclusivity\n\t\tvar rangeCellOffsetFirst = dayOffsetToCellOffset(rangeDayOffsetStart);\n\t\tvar rangeCellOffsetLast = dayOffsetToCellOffset(rangeDayOffsetEnd) - 1;\n\n\t\t// loop through all the rows in the view\n\t\tfor (var row=0; row<rowCnt; row++) {\n\n\t\t\t// first and last cell offset for the row\n\t\t\tvar rowCellOffsetFirst = row * colCnt;\n\t\t\tvar rowCellOffsetLast = rowCellOffsetFirst + colCnt - 1;\n\n\t\t\t// get the segment's cell offsets by constraining the range's cell offsets to the bounds of the row\n\t\t\tvar segmentCellOffsetFirst = Math.max(rangeCellOffsetFirst, rowCellOffsetFirst);\n\t\t\tvar segmentCellOffsetLast = Math.min(rangeCellOffsetLast, rowCellOffsetLast);\n\n\t\t\t// make sure segment's offsets are valid and in view\n\t\t\tif (segmentCellOffsetFirst <= segmentCellOffsetLast) {\n\n\t\t\t\t// translate to cells\n\t\t\t\tvar segmentCellFirst = cellOffsetToCell(segmentCellOffsetFirst);\n\t\t\t\tvar segmentCellLast = cellOffsetToCell(segmentCellOffsetLast);\n\n\t\t\t\t// view might be RTL, so order by leftmost column\n\t\t\t\tvar cols = [ segmentCellFirst.col, segmentCellLast.col ].sort();\n\n\t\t\t\t// Determine if segment's first/last cell is the beginning/end of the date range.\n\t\t\t\t// We need to compare \"day offset\" because \"cell offsets\" are often ambiguous and\n\t\t\t\t// can translate to multiple days, and an edge case reveals itself when we the\n\t\t\t\t// range's first cell is hidden (we don't want isStart to be true).\n\t\t\t\tvar isStart = cellOffsetToDayOffset(segmentCellOffsetFirst) == rangeDayOffsetStart;\n\t\t\t\tvar isEnd = cellOffsetToDayOffset(segmentCellOffsetLast) + 1 == rangeDayOffsetEnd; // +1 for comparing exclusively\n\n\t\t\t\tsegments.push({\n\t\t\t\t\trow: row,\n\t\t\t\t\tleftCol: cols[0],\n\t\t\t\t\trightCol: cols[1],\n\t\t\t\t\tisStart: isStart,\n\t\t\t\t\tisEnd: isEnd\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\n\t\treturn segments;\n\t}", "function segments(n, segSize) {\n return range(segSize, n, segSize).map(min => [min + 1, Math.min(min + segSize, n)]);\n}", "function rangeToSegments(start, end) {\n\n\t\tvar rowCnt = t.getRowCnt();\n\t\tvar colCnt = t.getColCnt();\n\t\tvar segments = []; // array of segments to return\n\n\t\t// day offset for given date range\n\t\tvar rangeDayOffsetStart = dateToDayOffset(start);\n\t\tvar rangeDayOffsetEnd = dateToDayOffset(end); // an exclusive value\n\t\tvar endTimeMS = +end.time();\n\t\tif (endTimeMS && endTimeMS >= nextDayThreshold) {\n\t\t\trangeDayOffsetEnd++;\n\t\t}\n\t\trangeDayOffsetEnd = Math.max(rangeDayOffsetEnd, rangeDayOffsetStart + 1);\n\n\t\t// first and last cell offset for the given date range\n\t\t// \"last\" implies inclusivity\n\t\tvar rangeCellOffsetFirst = dayOffsetToCellOffset(rangeDayOffsetStart);\n\t\tvar rangeCellOffsetLast = dayOffsetToCellOffset(rangeDayOffsetEnd) - 1;\n\n\t\t// loop through all the rows in the view\n\t\tfor (var row=0; row<rowCnt; row++) {\n\n\t\t\t// first and last cell offset for the row\n\t\t\tvar rowCellOffsetFirst = row * colCnt;\n\t\t\tvar rowCellOffsetLast = rowCellOffsetFirst + colCnt - 1;\n\n\t\t\t// get the segment's cell offsets by constraining the range's cell offsets to the bounds of the row\n\t\t\tvar segmentCellOffsetFirst = Math.max(rangeCellOffsetFirst, rowCellOffsetFirst);\n\t\t\tvar segmentCellOffsetLast = Math.min(rangeCellOffsetLast, rowCellOffsetLast);\n\n\t\t\t// make sure segment's offsets are valid and in view\n\t\t\tif (segmentCellOffsetFirst <= segmentCellOffsetLast) {\n\n\t\t\t\t// translate to cells\n\t\t\t\tvar segmentCellFirst = cellOffsetToCell(segmentCellOffsetFirst);\n\t\t\t\tvar segmentCellLast = cellOffsetToCell(segmentCellOffsetLast);\n\n\t\t\t\t// view might be RTL, so order by leftmost column\n\t\t\t\tvar cols = [ segmentCellFirst.col, segmentCellLast.col ].sort();\n\n\t\t\t\t// Determine if segment's first/last cell is the beginning/end of the date range.\n\t\t\t\t// We need to compare \"day offset\" because \"cell offsets\" are often ambiguous and\n\t\t\t\t// can translate to multiple days, and an edge case reveals itself when we the\n\t\t\t\t// range's first cell is hidden (we don't want isStart to be true).\n\t\t\t\tvar isStart = cellOffsetToDayOffset(segmentCellOffsetFirst) == rangeDayOffsetStart;\n\t\t\t\tvar isEnd = cellOffsetToDayOffset(segmentCellOffsetLast) + 1 == rangeDayOffsetEnd; // +1 for comparing exclusively\n\n\t\t\t\tsegments.push({\n\t\t\t\t\trow: row,\n\t\t\t\t\tleftCol: cols[0],\n\t\t\t\t\trightCol: cols[1],\n\t\t\t\t\tisStart: isStart,\n\t\t\t\t\tisEnd: isEnd\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\n\t\treturn segments;\n\t}", "function rangeToSegments(start, end) {\n\n\t\tvar rowCnt = t.getRowCnt();\n\t\tvar colCnt = t.getColCnt();\n\t\tvar segments = []; // array of segments to return\n\n\t\t// day offset for given date range\n\t\tvar rangeDayOffsetStart = dateToDayOffset(start);\n\t\tvar rangeDayOffsetEnd = dateToDayOffset(end); // an exclusive value\n\t\tvar endTimeMS = +end.time();\n\t\tif (endTimeMS && endTimeMS >= nextDayThreshold) {\n\t\t\trangeDayOffsetEnd++;\n\t\t}\n\t\trangeDayOffsetEnd = Math.max(rangeDayOffsetEnd, rangeDayOffsetStart + 1);\n\n\t\t// first and last cell offset for the given date range\n\t\t// \"last\" implies inclusivity\n\t\tvar rangeCellOffsetFirst = dayOffsetToCellOffset(rangeDayOffsetStart);\n\t\tvar rangeCellOffsetLast = dayOffsetToCellOffset(rangeDayOffsetEnd) - 1;\n\n\t\t// loop through all the rows in the view\n\t\tfor (var row=0; row<rowCnt; row++) {\n\n\t\t\t// first and last cell offset for the row\n\t\t\tvar rowCellOffsetFirst = row * colCnt;\n\t\t\tvar rowCellOffsetLast = rowCellOffsetFirst + colCnt - 1;\n\n\t\t\t// get the segment's cell offsets by constraining the range's cell offsets to the bounds of the row\n\t\t\tvar segmentCellOffsetFirst = Math.max(rangeCellOffsetFirst, rowCellOffsetFirst);\n\t\t\tvar segmentCellOffsetLast = Math.min(rangeCellOffsetLast, rowCellOffsetLast);\n\n\t\t\t// make sure segment's offsets are valid and in view\n\t\t\tif (segmentCellOffsetFirst <= segmentCellOffsetLast) {\n\n\t\t\t\t// translate to cells\n\t\t\t\tvar segmentCellFirst = cellOffsetToCell(segmentCellOffsetFirst);\n\t\t\t\tvar segmentCellLast = cellOffsetToCell(segmentCellOffsetLast);\n\n\t\t\t\t// view might be RTL, so order by leftmost column\n\t\t\t\tvar cols = [ segmentCellFirst.col, segmentCellLast.col ].sort();\n\n\t\t\t\t// Determine if segment's first/last cell is the beginning/end of the date range.\n\t\t\t\t// We need to compare \"day offset\" because \"cell offsets\" are often ambiguous and\n\t\t\t\t// can translate to multiple days, and an edge case reveals itself when we the\n\t\t\t\t// range's first cell is hidden (we don't want isStart to be true).\n\t\t\t\tvar isStart = cellOffsetToDayOffset(segmentCellOffsetFirst) == rangeDayOffsetStart;\n\t\t\t\tvar isEnd = cellOffsetToDayOffset(segmentCellOffsetLast) + 1 == rangeDayOffsetEnd; // +1 for comparing exclusively\n\n\t\t\t\tsegments.push({\n\t\t\t\t\trow: row,\n\t\t\t\t\tleftCol: cols[0],\n\t\t\t\t\trightCol: cols[1],\n\t\t\t\t\tisStart: isStart,\n\t\t\t\t\tisEnd: isEnd\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\n\t\treturn segments;\n\t}", "getSegmentIds() {\n return _.keys(this.mapping);\n }", "function groupSegsByDay(segs) {\n var segsByDay = []; // sparse array\n var i;\n var seg;\n for (i = 0; i < segs.length; i += 1) {\n seg = segs[i];\n (segsByDay[seg.dayIndex] || (segsByDay[seg.dayIndex] = []))\n .push(seg);\n }\n return segsByDay;\n }", "function traceSegment(options) {\n var segments = [];\n var segCollector = [];\n // inject interceptor\n Object(_interceptors_xhr__WEBPACK_IMPORTED_MODULE_1__[\"default\"])();\n Object(_interceptors_fetch__WEBPACK_IMPORTED_MODULE_5__[\"default\"])();\n window.addEventListener('xhrReadyStateChange', function (event) {\n var segment = {\n traceId: '',\n service: options.service + _services_constant__WEBPACK_IMPORTED_MODULE_4__[\"ServiceTag\"],\n spans: [],\n serviceInstance: options.serviceVersion,\n traceSegmentId: '',\n };\n var xhrState = event.detail.readyState;\n var config = event.detail.getRequestConfig;\n var url = {};\n if (config[1].startsWith('http://') || config[1].startsWith('https://') || config[1].startsWith('//')) {\n url = new URL(config[1]);\n }\n else {\n url = new URL(window.location.href);\n url.pathname = config[1];\n }\n if ([_services_constant__WEBPACK_IMPORTED_MODULE_4__[\"ReportTypes\"].ERROR, _services_constant__WEBPACK_IMPORTED_MODULE_4__[\"ReportTypes\"].PERF, _services_constant__WEBPACK_IMPORTED_MODULE_4__[\"ReportTypes\"].SEGMENTS].includes(url.pathname) &&\n !options.traceSDKInternal) {\n return;\n }\n // The values of xhrState are from https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest/readyState\n if (xhrState === _services_constant__WEBPACK_IMPORTED_MODULE_4__[\"ReadyStatus\"].OPENED) {\n var traceId = Object(_services_uuid__WEBPACK_IMPORTED_MODULE_2__[\"default\"])();\n var traceSegmentId = Object(_services_uuid__WEBPACK_IMPORTED_MODULE_2__[\"default\"])();\n segCollector.push({\n event: event.detail,\n startTime: new Date().getTime(),\n traceId: traceId,\n traceSegmentId: traceSegmentId,\n });\n var traceIdStr = String(Object(js_base64__WEBPACK_IMPORTED_MODULE_0__[\"encode\"])(traceId));\n var segmentId = String(Object(js_base64__WEBPACK_IMPORTED_MODULE_0__[\"encode\"])(traceSegmentId));\n var service = String(Object(js_base64__WEBPACK_IMPORTED_MODULE_0__[\"encode\"])(segment.service));\n var instance = String(Object(js_base64__WEBPACK_IMPORTED_MODULE_0__[\"encode\"])(segment.serviceInstance));\n var endpoint = String(Object(js_base64__WEBPACK_IMPORTED_MODULE_0__[\"encode\"])(options.pagePath));\n var peer = String(Object(js_base64__WEBPACK_IMPORTED_MODULE_0__[\"encode\"])(url.host));\n var index = segment.spans.length;\n var values = 1 + \"-\" + traceIdStr + \"-\" + segmentId + \"-\" + index + \"-\" + service + \"-\" + instance + \"-\" + endpoint + \"-\" + peer;\n event.detail.setRequestHeader('sw8', values);\n }\n if (xhrState === _services_constant__WEBPACK_IMPORTED_MODULE_4__[\"ReadyStatus\"].DONE) {\n var endTime = new Date().getTime();\n for (var i = 0; i < segCollector.length; i++) {\n if (segCollector[i].event.readyState === _services_constant__WEBPACK_IMPORTED_MODULE_4__[\"ReadyStatus\"].DONE) {\n var url_1 = {};\n if (segCollector[i].event.status) {\n url_1 = new URL(segCollector[i].event.responseURL);\n }\n var exitSpan = {\n operationName: options.pagePath,\n startTime: segCollector[i].startTime,\n endTime: endTime,\n spanId: segment.spans.length,\n spanLayer: _services_constant__WEBPACK_IMPORTED_MODULE_4__[\"SpanLayer\"],\n spanType: _services_constant__WEBPACK_IMPORTED_MODULE_4__[\"SpanType\"],\n isError: event.detail.status === 0 || event.detail.status >= 400 ? true : false,\n parentSpanId: segment.spans.length - 1,\n componentId: _services_constant__WEBPACK_IMPORTED_MODULE_4__[\"ComponentId\"],\n peer: url_1.host,\n tags: options.detailMode\n ? [\n {\n key: 'http.method',\n value: config[0],\n },\n {\n key: 'url',\n value: segCollector[i].event.responseURL,\n },\n ]\n : undefined,\n };\n segment = __assign(__assign({}, segment), { traceId: segCollector[i].traceId, traceSegmentId: segCollector[i].traceSegmentId });\n segment.spans.push(exitSpan);\n segCollector.splice(i, 1);\n }\n }\n segments.push(segment);\n }\n });\n window.onbeforeunload = function (e) {\n if (!segments.length) {\n return;\n }\n new _services_report__WEBPACK_IMPORTED_MODULE_3__[\"default\"]('SEGMENTS', options.collector).sendByXhr(segments);\n };\n //report per 5min\n setInterval(function () {\n if (!segments.length) {\n return;\n }\n new _services_report__WEBPACK_IMPORTED_MODULE_3__[\"default\"]('SEGMENTS', options.collector).sendByXhr(segments);\n segments = [];\n }, 300000);\n }", "getEventsToRender(resource, events) {\n if (resource.timeRanges && resource.timeRanges.length) {\n events.push(...resource.timeRanges);\n }\n return events;\n }", "listSegments(marker, options = {}) {\n return tslib.__asyncGenerator(this, arguments, function* listSegments_1() {\n let listContainersSegmentResponse;\n if (!!marker || marker === undefined) {\n do {\n listContainersSegmentResponse = yield tslib.__await(this.listContainersSegment(marker, options));\n listContainersSegmentResponse.containerItems =\n listContainersSegmentResponse.containerItems || [];\n marker = listContainersSegmentResponse.continuationToken;\n yield yield tslib.__await(yield tslib.__await(listContainersSegmentResponse));\n } while (marker);\n }\n });\n }", "listSegments(marker, options = {}) {\n return tslib.__asyncGenerator(this, arguments, function* listSegments_1() {\n let listContainersSegmentResponse;\n if (!!marker || marker === undefined) {\n do {\n listContainersSegmentResponse = yield tslib.__await(this.listContainersSegment(marker, options));\n listContainersSegmentResponse.containerItems =\n listContainersSegmentResponse.containerItems || [];\n marker = listContainersSegmentResponse.continuationToken;\n yield yield tslib.__await(yield tslib.__await(listContainersSegmentResponse));\n } while (marker);\n }\n });\n }", "function createSegmentsArray(subPolygon) {\n // Q1. Declare the \"segments\" multidimensional array\n segments = [];\n // Q2. Create \"points\" array consisting of anchor points comprising the subPolygon polygon\n points = [];\n for (var j = 0; j < subPolygon.pathPoints.length; j++) {\n points.push(subPolygon.pathPoints[j].anchor);\n }\n var n = points.length;\n // Q3. Append first segment\n P0 = points[n-1];\n P1 = points[0]; // First point of line segment\n P2 = points[1]; // Second point of line segment\n P3 = points[2];\n appendSegmentsArray(P0, P1, P2, P3);\n // Q4. Append middle segments\n for (var j = 1; j < n-2; j++) {\n P0 = points[j-1];\n P1 = points[j]; // First point of line segment\n P2 = points[j+1]; // Second point of line segment\n P3 = points[j+2];\n appendSegmentsArray(P0, P1, P2, P3);\n }\n // Q5. Append second to last segment\n P0 = points[n-3];\n P1 = points[n-2]; // First point of line segment\n P2 = points[n-1]; // Second point of line segment\n P3 = points[0];\n appendSegmentsArray(P0, P1, P2, P3);\n // Q6. Append last segment \n P0 = points[n-2];\n P1 = points[n-1]; // First point of line segment\n P2 = points[0]; // Second point of line segment\n P3 = points[1];\n appendSegmentsArray(P0, P1, P2, P3); \n}", "function Segments(props) {\n var value = props.value,\n children = props.children,\n name = props.name,\n size = props.size,\n onChange = props.onChange,\n className = props.className;\n var classes = (0,_node_modules_classnames_index_js__WEBPACK_IMPORTED_MODULE_2__.default)('kt-segments', className);\n var contextValue = (0,react__WEBPACK_IMPORTED_MODULE_0__.useMemo)(function () {\n return {\n value: value,\n name: name,\n onChange: onChange,\n size: size\n };\n }, [value, name, onChange, size]);\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_context_js__WEBPACK_IMPORTED_MODULE_3__.SegmentsContext.Provider, {\n value: contextValue\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(\"div\", {\n className: classes\n }, children));\n}", "function split(events) {\n return events.match(/[^ ]+/g);\n }", "function split(events) {\n return events.match(/[^ ]+/g);\n }", "function split(events) {\n return events.match(/[^ ]+/g);\n }", "function split(events) {\n return events.match(/[^ ]+/g);\n }", "function split(events) {\n return events.match(/[^ ]+/g);\n }", "function split(events) {\n return events.match(/[^ ]+/g);\n }", "dumpEvents(source) {\n const parser = this.instantiateParser();\n const lines = [];\n parser.on(\"*\", (event, data) => {\n /* ignore token events as it becomes to verbose */\n if (event === \"token\") {\n return;\n }\n lines.push({ event, data });\n });\n source.forEach((src) => parser.parseHtml(src));\n return lines;\n }", "getEvents(){\n return this.events.slice();\n }", "function asArray(){\n logtime = moment();\n var rtnArr =[];\n for (var i in events)\n {\n rtnArr.push(events[i]);\n }\n console.debug(moment().diff(logtime)+\" to AsArray()\");\n return rtnArr;\n }", "function n(a){var b,c,d,e=M(),f=[];\n// group segments by row\nfor(b=0;b<a.length;b++)c=a[b],d=c.row,c.element&&(// was rendered?\nf[d]?\n// already other segments. append to array\nf[d].push(c):\n// first segment in row. create new array\nf[d]=[c]);\n// sort each row\nfor(d=0;d<e;d++)f[d]=o(f[d]||[]);return f}", "function renderSlotSegs(segs, modifiedEventId) {\n\t\n\t\tvar i, segCnt=segs.length, seg,\n\t\t\tevent,\n\t\t\ttop,\n\t\t\tbottom,\n\t\t\tcolumnLeft,\n\t\t\tcolumnRight,\n\t\t\tcolumnWidth,\n\t\t\twidth,\n\t\t\tleft,\n\t\t\tright,\n\t\t\thtml = '',\n\t\t\teventElements,\n\t\t\teventElement,\n\t\t\ttriggerRes,\n\t\t\ttitleElement,\n\t\t\theight,\n\t\t\tslotSegmentContainer = getSlotSegmentContainer(),\n\t\t\tisRTL = opt('isRTL');\n\t\t\t\n\t\t// calculate position/dimensions, create html\n\t\tfor (i=0; i<segCnt; i++) {\n\t\t\tseg = segs[i];\n\t\t\tevent = seg.event;\n\t\t\ttop = computeDateTop(seg.start, seg.start);\n\t\t\tbottom = computeDateTop(seg.end, seg.start);\n\t\t\tcolumnLeft = colContentLeft(seg.col);\n\t\t\tcolumnRight = colContentRight(seg.col);\n\t\t\tcolumnWidth = columnRight - columnLeft;\n\n\t\t\t// shave off space on right near scrollbars (2.5%)\n\t\t\t// TODO: move this to CSS somehow\n\t\t\tcolumnRight -= columnWidth * .025;\n\t\t\tcolumnWidth = columnRight - columnLeft;\n\n\t\t\twidth = columnWidth * (seg.forwardCoord - seg.backwardCoord);\n\n\t\t\tif (opt('slotEventOverlap')) {\n\t\t\t\t// double the width while making sure resize handle is visible\n\t\t\t\t// (assumed to be 20px wide)\n\t\t\t\twidth = Math.max(\n\t\t\t\t\t(width - (20/2)) * 2,\n\t\t\t\t\twidth // narrow columns will want to make the segment smaller than\n\t\t\t\t\t\t// the natural width. don't allow it\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tif (isRTL) {\n\t\t\t\tright = columnRight - seg.backwardCoord * columnWidth;\n\t\t\t\tleft = right - width;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tleft = columnLeft + seg.backwardCoord * columnWidth;\n\t\t\t\tright = left + width;\n\t\t\t}\n\n\t\t\t// make sure horizontal coordinates are in bounds\n\t\t\tleft = Math.max(left, columnLeft);\n\t\t\tright = Math.min(right, columnRight);\n\t\t\twidth = right - left;\n\n\t\t\tseg.top = top;\n\t\t\tseg.left = left;\n\t\t\tseg.outerWidth = width;\n\t\t\tseg.outerHeight = bottom - top;\n\t\t\thtml += slotSegHtml(event, seg);\n\t\t}\n\n\t\tslotSegmentContainer[0].innerHTML = html; // faster than html()\n\t\teventElements = slotSegmentContainer.children();\n\t\t\n\t\t// retrieve elements, run through eventRender callback, bind event handlers\n\t\tfor (i=0; i<segCnt; i++) {\n\t\t\tseg = segs[i];\n\t\t\tevent = seg.event;\n\t\t\teventElement = $(eventElements[i]); // faster than eq()\n\t\t\ttriggerRes = trigger('eventRender', event, event, eventElement);\n\t\t\tif (triggerRes === false) {\n\t\t\t\teventElement.remove();\n\t\t\t}else{\n\t\t\t\tif (triggerRes && triggerRes !== true) {\n\t\t\t\t\teventElement.remove();\n\t\t\t\t\teventElement = $(triggerRes)\n\t\t\t\t\t\t.css({\n\t\t\t\t\t\t\tposition: 'absolute',\n\t\t\t\t\t\t\ttop: seg.top,\n\t\t\t\t\t\t\tleft: seg.left\n\t\t\t\t\t\t})\n\t\t\t\t\t\t.appendTo(slotSegmentContainer);\n\t\t\t\t}\n\t\t\t\tseg.element = eventElement;\n\t\t\t\tif (event._id === modifiedEventId) {\n\t\t\t\t\tbindSlotSeg(event, eventElement, seg);\n\t\t\t\t}else{\n\t\t\t\t\teventElement[0]._fci = i; // for lazySegBind\n\t\t\t\t}\n\t\t\t\treportEventElement(event, eventElement);\n\t\t\t}\n\t\t}\n\t\t\n\t\tlazySegBind(slotSegmentContainer, segs, bindSlotSeg);\n\t\t\n\t\t// record event sides and title positions\n\t\tfor (i=0; i<segCnt; i++) {\n\t\t\tseg = segs[i];\n\t\t\tif ((eventElement = seg.element)) {\n\t\t\t\tseg.vsides = vsides(eventElement, true);\n\t\t\t\tseg.hsides = hsides(eventElement, true);\n\t\t\t\ttitleElement = eventElement.find('.fc-event-title');\n\t\t\t\tif (titleElement.length) {\n\t\t\t\t\tseg.contentTop = titleElement[0].offsetTop;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t// set all positions/dimensions at once\n\t\tfor (i=0; i<segCnt; i++) {\n\t\t\tseg = segs[i];\n\t\t\tif ((eventElement = seg.element)) {\n\t\t\t\teventElement[0].style.width = Math.max(0, seg.outerWidth - seg.hsides) + 'px';\n\t\t\t\theight = Math.max(0, seg.outerHeight - seg.vsides);\n\t\t\t\teventElement[0].style.height = height + 'px';\n\t\t\t\tevent = seg.event;\n\t\t\t\tif (seg.contentTop !== undefined && height - seg.contentTop < 10) {\n\t\t\t\t\t// not enough room for title, put it in the time (TODO: maybe make both display:inline instead)\n\t\t\t\t\teventElement.find('div.fc-event-time')\n\t\t\t\t\t\t.text(\n\t\t\t\t\t\t\tformatDate(event.start, opt('timeFormat')) + ' - ' + event.title\n\t\t\t\t\t\t);\n\t\t\t\t\teventElement.find('div.fc-event-title')\n\t\t\t\t\t\t.remove();\n\t\t\t\t}\n\t\t\t\ttrigger('eventAfterRender', event, event, eventElement);\n\t\t\t}\n\t\t}\n\t\t\t\t\t\n\t}", "function renderSlotSegs(segs, modifiedEventId) {\n\t\n\t\tvar i, segCnt=segs.length, seg,\n\t\t\tevent,\n\t\t\ttop,\n\t\t\tbottom,\n\t\t\tcolumnLeft,\n\t\t\tcolumnRight,\n\t\t\tcolumnWidth,\n\t\t\twidth,\n\t\t\tleft,\n\t\t\tright,\n\t\t\thtml = '',\n\t\t\teventElements,\n\t\t\teventElement,\n\t\t\ttriggerRes,\n\t\t\ttitleElement,\n\t\t\theight,\n\t\t\tslotSegmentContainer = getSlotSegmentContainer(),\n\t\t\tisRTL = opt('isRTL');\n\t\t\t\n\t\t// calculate position/dimensions, create html\n\t\tfor (i=0; i<segCnt; i++) {\n\t\t\tseg = segs[i];\n\t\t\tevent = seg.event;\n\t\t\ttop = computeDateTop(seg.start, seg.start);\n\t\t\tbottom = computeDateTop(seg.end, seg.start);\n\t\t\tcolumnLeft = colContentLeft(seg.col);\n\t\t\tcolumnRight = colContentRight(seg.col);\n\t\t\tcolumnWidth = columnRight - columnLeft;\n\n\t\t\t// shave off space on right near scrollbars (2.5%)\n\t\t\t// TODO: move this to CSS somehow\n\t\t\tcolumnRight -= columnWidth * .025;\n\t\t\tcolumnWidth = columnRight - columnLeft;\n\n\t\t\twidth = columnWidth * (seg.forwardCoord - seg.backwardCoord);\n\n\t\t\tif (opt('slotEventOverlap')) {\n\t\t\t\t// double the width while making sure resize handle is visible\n\t\t\t\t// (assumed to be 20px wide)\n\t\t\t\twidth = Math.max(\n\t\t\t\t\t(width - (20/2)) * 2,\n\t\t\t\t\twidth // narrow columns will want to make the segment smaller than\n\t\t\t\t\t\t// the natural width. don't allow it\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tif (isRTL) {\n\t\t\t\tright = columnRight - seg.backwardCoord * columnWidth;\n\t\t\t\tleft = right - width;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tleft = columnLeft + seg.backwardCoord * columnWidth;\n\t\t\t\tright = left + width;\n\t\t\t}\n\n\t\t\t// make sure horizontal coordinates are in bounds\n\t\t\tleft = Math.max(left, columnLeft);\n\t\t\tright = Math.min(right, columnRight);\n\t\t\twidth = right - left;\n\n\t\t\tseg.top = top;\n\t\t\tseg.left = left;\n\t\t\tseg.outerWidth = width;\n\t\t\tseg.outerHeight = bottom - top;\n\t\t\thtml += slotSegHtml(event, seg);\n\t\t}\n\n\t\tslotSegmentContainer[0].innerHTML = html; // faster than html()\n\t\teventElements = slotSegmentContainer.children();\n\t\t\n\t\t// retrieve elements, run through eventRender callback, bind event handlers\n\t\tfor (i=0; i<segCnt; i++) {\n\t\t\tseg = segs[i];\n\t\t\tevent = seg.event;\n\t\t\teventElement = $(eventElements[i]); // faster than eq()\n\t\t\ttriggerRes = trigger('eventRender', event, event, eventElement);\n\t\t\tif (triggerRes === false) {\n\t\t\t\teventElement.remove();\n\t\t\t}else{\n\t\t\t\tif (triggerRes && triggerRes !== true) {\n\t\t\t\t\teventElement.remove();\n\t\t\t\t\teventElement = $(triggerRes)\n\t\t\t\t\t\t.css({\n\t\t\t\t\t\t\tposition: 'absolute',\n\t\t\t\t\t\t\ttop: seg.top,\n\t\t\t\t\t\t\tleft: seg.left\n\t\t\t\t\t\t})\n\t\t\t\t\t\t.appendTo(slotSegmentContainer);\n\t\t\t\t}\n\t\t\t\tseg.element = eventElement;\n\t\t\t\tif (event._id === modifiedEventId) {\n\t\t\t\t\tbindSlotSeg(event, eventElement, seg);\n\t\t\t\t}else{\n\t\t\t\t\teventElement[0]._fci = i; // for lazySegBind\n\t\t\t\t}\n\t\t\t\treportEventElement(event, eventElement);\n\t\t\t}\n\t\t}\n\t\t\n\t\tlazySegBind(slotSegmentContainer, segs, bindSlotSeg);\n\t\t\n\t\t// record event sides and title positions\n\t\tfor (i=0; i<segCnt; i++) {\n\t\t\tseg = segs[i];\n\t\t\tif ((eventElement = seg.element)) {\n\t\t\t\tseg.vsides = vsides(eventElement, true);\n\t\t\t\tseg.hsides = hsides(eventElement, true);\n\t\t\t\ttitleElement = eventElement.find('.fc-event-title');\n\t\t\t\tif (titleElement.length) {\n\t\t\t\t\tseg.contentTop = titleElement[0].offsetTop;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t// set all positions/dimensions at once\n\t\tfor (i=0; i<segCnt; i++) {\n\t\t\tseg = segs[i];\n\t\t\tif ((eventElement = seg.element)) {\n\t\t\t\teventElement[0].style.width = Math.max(0, seg.outerWidth - seg.hsides) + 'px';\n\t\t\t\theight = Math.max(0, seg.outerHeight - seg.vsides);\n\t\t\t\teventElement[0].style.height = height + 'px';\n\t\t\t\tevent = seg.event;\n\t\t\t\tif (seg.contentTop !== undefined && height - seg.contentTop < 10) {\n\t\t\t\t\t// not enough room for title, put it in the time (TODO: maybe make both display:inline instead)\n\t\t\t\t\teventElement.find('div.fc-event-time')\n\t\t\t\t\t\t.text(\n\t\t\t\t\t\t\tformatDate(event.start, opt('timeFormat')) + ' - ' + event.title\n\t\t\t\t\t\t);\n\t\t\t\t\teventElement.find('div.fc-event-title')\n\t\t\t\t\t\t.remove();\n\t\t\t\t}\n\t\t\t\ttrigger('eventAfterRender', event, event, eventElement);\n\t\t\t}\n\t\t}\n\t\t\t\t\t\n\t}", "function renderSlotSegs(segs, modifiedEventId) {\n\t\n\t\tvar i, segCnt=segs.length, seg,\n\t\t\tevent,\n\t\t\ttop,\n\t\t\tbottom,\n\t\t\tcolumnLeft,\n\t\t\tcolumnRight,\n\t\t\tcolumnWidth,\n\t\t\twidth,\n\t\t\tleft,\n\t\t\tright,\n\t\t\thtml = '',\n\t\t\teventElements,\n\t\t\teventElement,\n\t\t\ttriggerRes,\n\t\t\ttitleElement,\n\t\t\theight,\n\t\t\tslotSegmentContainer = getSlotSegmentContainer(),\n\t\t\tisRTL = opt('isRTL');\n\t\t\t\n\t\t// calculate position/dimensions, create html\n\t\tfor (i=0; i<segCnt; i++) {\n\t\t\tseg = segs[i];\n\t\t\tevent = seg.event;\n\t\t\ttop = computeDateTop(seg.start, seg.start);\n\t\t\tbottom = computeDateTop(seg.end, seg.start);\n\t\t\tcolumnLeft = colContentLeft(seg.col);\n\t\t\tcolumnRight = colContentRight(seg.col);\n\t\t\tcolumnWidth = columnRight - columnLeft;\n\n\t\t\t// shave off space on right near scrollbars (2.5%)\n\t\t\t// TODO: move this to CSS somehow\n\t\t\tcolumnRight -= columnWidth * .025;\n\t\t\tcolumnWidth = columnRight - columnLeft;\n\n\t\t\twidth = columnWidth * (seg.forwardCoord - seg.backwardCoord);\n\n\t\t\tif (opt('slotEventOverlap')) {\n\t\t\t\t// double the width while making sure resize handle is visible\n\t\t\t\t// (assumed to be 20px wide)\n\t\t\t\twidth = Math.max(\n\t\t\t\t\t(width - (20/2)) * 2,\n\t\t\t\t\twidth // narrow columns will want to make the segment smaller than\n\t\t\t\t\t\t// the natural width. don't allow it\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tif (isRTL) {\n\t\t\t\tright = columnRight - seg.backwardCoord * columnWidth;\n\t\t\t\tleft = right - width;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tleft = columnLeft + seg.backwardCoord * columnWidth;\n\t\t\t\tright = left + width;\n\t\t\t}\n\n\t\t\t// make sure horizontal coordinates are in bounds\n\t\t\tleft = Math.max(left, columnLeft);\n\t\t\tright = Math.min(right, columnRight);\n\t\t\twidth = right - left;\n\n\t\t\tseg.top = top;\n\t\t\tseg.left = left;\n\t\t\tseg.outerWidth = width;\n\t\t\tseg.outerHeight = bottom - top;\n\t\t\thtml += slotSegHtml(event, seg);\n\t\t}\n\n\t\tslotSegmentContainer[0].innerHTML = html; // faster than html()\n\t\teventElements = slotSegmentContainer.children();\n\t\t\n\t\t// retrieve elements, run through eventRender callback, bind event handlers\n\t\tfor (i=0; i<segCnt; i++) {\n\t\t\tseg = segs[i];\n\t\t\tevent = seg.event;\n\t\t\teventElement = $(eventElements[i]); // faster than eq()\n\t\t\ttriggerRes = trigger('eventRender', event, event, eventElement);\n\t\t\tif (triggerRes === false) {\n\t\t\t\teventElement.remove();\n\t\t\t}else{\n\t\t\t\tif (triggerRes && triggerRes !== true) {\n\t\t\t\t\teventElement.remove();\n\t\t\t\t\teventElement = $(triggerRes)\n\t\t\t\t\t\t.css({\n\t\t\t\t\t\t\tposition: 'absolute',\n\t\t\t\t\t\t\ttop: seg.top,\n\t\t\t\t\t\t\tleft: seg.left\n\t\t\t\t\t\t})\n\t\t\t\t\t\t.appendTo(slotSegmentContainer);\n\t\t\t\t}\n\t\t\t\tseg.element = eventElement;\n\t\t\t\tif (event._id === modifiedEventId) {\n\t\t\t\t\tbindSlotSeg(event, eventElement, seg);\n\t\t\t\t}else{\n\t\t\t\t\teventElement[0]._fci = i; // for lazySegBind\n\t\t\t\t}\n\t\t\t\treportEventElement(event, eventElement);\n\t\t\t}\n\t\t}\n\t\t\n\t\tlazySegBind(slotSegmentContainer, segs, bindSlotSeg);\n\t\t\n\t\t// record event sides and title positions\n\t\tfor (i=0; i<segCnt; i++) {\n\t\t\tseg = segs[i];\n\t\t\tif ((eventElement = seg.element)) {\n\t\t\t\tseg.vsides = vsides(eventElement, true);\n\t\t\t\tseg.hsides = hsides(eventElement, true);\n\t\t\t\ttitleElement = eventElement.find('.fc-event-title');\n\t\t\t\tif (titleElement.length) {\n\t\t\t\t\tseg.contentTop = titleElement[0].offsetTop;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t// set all positions/dimensions at once\n\t\tfor (i=0; i<segCnt; i++) {\n\t\t\tseg = segs[i];\n\t\t\tif ((eventElement = seg.element)) {\n\t\t\t\teventElement[0].style.width = Math.max(0, seg.outerWidth - seg.hsides) + 'px';\n\t\t\t\theight = Math.max(0, seg.outerHeight - seg.vsides);\n\t\t\t\teventElement[0].style.height = height + 'px';\n\t\t\t\tevent = seg.event;\n\t\t\t\tif (seg.contentTop !== undefined && height - seg.contentTop < 10) {\n\t\t\t\t\t// not enough room for title, put it in the time (TODO: maybe make both display:inline instead)\n\t\t\t\t\teventElement.find('div.fc-event-time')\n\t\t\t\t\t\t.text(\n\t\t\t\t\t\t\tformatDate(event.start, opt('timeFormat')) + ' - ' + event.title\n\t\t\t\t\t\t);\n\t\t\t\t\teventElement.find('div.fc-event-title')\n\t\t\t\t\t\t.remove();\n\t\t\t\t}\n\t\t\t\ttrigger('eventAfterRender', event, event, eventElement);\n\t\t\t}\n\t\t}\n\t\t\t\t\t\n\t}", "function split(events) {\n return events.match(/[^ ]+/g);\n }", "function renderSlotSegs(segs, modifiedEventId) {\n\t\n\t\tvar i, segCnt=segs.length, seg,\n\t\t\tevent,\n\t\t\ttop,\n\t\t\tbottom,\n\t\t\tcolumnLeft,\n\t\t\tcolumnRight,\n\t\t\tcolumnWidth,\n\t\t\twidth,\n\t\t\tleft,\n\t\t\tright,\n\t\t\thtml = '',\n\t\t\teventElements,\n\t\t\teventElement,\n\t\t\ttriggerRes,\n\t\t\ttitleElement,\n\t\t\theight,\n\t\t\tslotSegmentContainer = getSlotSegmentContainer(),\n\t\t\tisRTL = opt('isRTL');\n\t\t\t\n\t\t// calculate position/dimensions, create html\n\t\tfor (i=0; i<segCnt; i++) {\n\t\t\tseg = segs[i];\n\t\t\tevent = seg.event;\n\t\t\ttop = timePosition(seg.start, seg.start);\n\t\t\tbottom = timePosition(seg.start, seg.end);\n\t\t\tcolumnLeft = colContentLeft(seg.col);\n\t\t\tcolumnRight = colContentRight(seg.col);\n\t\t\tcolumnWidth = columnRight - columnLeft;\n\n\t\t\t// shave off space on right near scrollbars (2.5%)\n\t\t\t// TODO: move this to CSS somehow\n\t\t\tcolumnRight -= columnWidth * .025;\n\t\t\tcolumnWidth = columnRight - columnLeft;\n\n\t\t\twidth = columnWidth * (seg.forwardCoord - seg.backwardCoord);\n\n\t\t\tif (opt('slotEventOverlap')) {\n\t\t\t\t// double the width while making sure resize handle is visible\n\t\t\t\t// (assumed to be 20px wide)\n\t\t\t\twidth = Math.max(\n\t\t\t\t\t(width - (20/2)) * 2,\n\t\t\t\t\twidth // narrow columns will want to make the segment smaller than\n\t\t\t\t\t\t// the natural width. don't allow it\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tif (isRTL) {\n\t\t\t\tright = columnRight - seg.backwardCoord * columnWidth;\n\t\t\t\tleft = right - width;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tleft = columnLeft + seg.backwardCoord * columnWidth;\n\t\t\t\tright = left + width;\n\t\t\t}\n\n\t\t\t// make sure horizontal coordinates are in bounds\n\t\t\tleft = Math.max(left, columnLeft);\n\t\t\tright = Math.min(right, columnRight);\n\t\t\twidth = right - left;\n\n\t\t\tseg.top = top;\n\t\t\tseg.left = left;\n\t\t\tseg.outerWidth = width;\n\t\t\tseg.outerHeight = bottom - top;\n\t\t\thtml += slotSegHtml(event, seg);\n\t\t}\n\n\t\tslotSegmentContainer[0].innerHTML = html; // faster than html()\n\t\teventElements = slotSegmentContainer.children();\n\t\t\n\t\t// retrieve elements, run through eventRender callback, bind event handlers\n\t\tfor (i=0; i<segCnt; i++) {\n\t\t\tseg = segs[i];\n\t\t\tevent = seg.event;\n\t\t\teventElement = $(eventElements[i]); // faster than eq()\n\t\t\ttriggerRes = trigger('eventRender', event, event, eventElement);\n\t\t\tif (triggerRes === false) {\n\t\t\t\teventElement.remove();\n\t\t\t}else{\n\t\t\t\tif (triggerRes && triggerRes !== true) {\n\t\t\t\t\teventElement.remove();\n\t\t\t\t\teventElement = $(triggerRes)\n\t\t\t\t\t\t.css({\n\t\t\t\t\t\t\tposition: 'absolute',\n\t\t\t\t\t\t\ttop: seg.top,\n\t\t\t\t\t\t\tleft: seg.left\n\t\t\t\t\t\t})\n\t\t\t\t\t\t.appendTo(slotSegmentContainer);\n\t\t\t\t}\n\t\t\t\tseg.element = eventElement;\n\t\t\t\tif (event._id === modifiedEventId) {\n\t\t\t\t\tbindSlotSeg(event, eventElement, seg);\n\t\t\t\t}else{\n\t\t\t\t\teventElement[0]._fci = i; // for lazySegBind\n\t\t\t\t}\n\t\t\t\treportEventElement(event, eventElement);\n\t\t\t}\n\t\t}\n\t\t\n\t\tlazySegBind(slotSegmentContainer, segs, bindSlotSeg);\n\t\t\n\t\t// record event sides and title positions\n\t\tfor (i=0; i<segCnt; i++) {\n\t\t\tseg = segs[i];\n\t\t\tif (eventElement = seg.element) {\n\t\t\t\tseg.vsides = vsides(eventElement, true);\n\t\t\t\tseg.hsides = hsides(eventElement, true);\n\t\t\t\ttitleElement = eventElement.find('.fc-event-title');\n\t\t\t\tif (titleElement.length) {\n\t\t\t\t\tseg.contentTop = titleElement[0].offsetTop;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t// set all positions/dimensions at once\n\t\tfor (i=0; i<segCnt; i++) {\n\t\t\tseg = segs[i];\n\t\t\tif (eventElement = seg.element) {\n\t\t\t\teventElement[0].style.width = Math.max(0, seg.outerWidth - seg.hsides) + 'px';\n\t\t\t\theight = Math.max(0, seg.outerHeight - seg.vsides);\n\t\t\t\teventElement[0].style.height = height + 'px';\n\t\t\t\tevent = seg.event;\n\t\t\t\tif (seg.contentTop !== undefined && height - seg.contentTop < 10) {\n\t\t\t\t\t// not enough room for title, put it in the time (TODO: maybe make both display:inline instead)\n\t\t\t\t\teventElement.find('div.fc-event-time')\n\t\t\t\t\t\t.text(formatDate(event.start, opt('timeFormat')) + ' - ' + event.title);\n\t\t\t\t\teventElement.find('div.fc-event-title')\n\t\t\t\t\t\t.remove();\n\t\t\t\t}\n\t\t\t\ttrigger('eventAfterRender', event, event, eventElement);\n\t\t\t}\n\t\t}\n\t\t\t\t\t\n\t}", "function renderSlotSegs(segs, modifiedEventId) {\n\t\n\t\tvar i, segCnt=segs.length, seg,\n\t\t\tevent,\n\t\t\ttop,\n\t\t\tbottom,\n\t\t\tcolumnLeft,\n\t\t\tcolumnRight,\n\t\t\tcolumnWidth,\n\t\t\twidth,\n\t\t\tleft,\n\t\t\tright,\n\t\t\thtml = '',\n\t\t\teventElements,\n\t\t\teventElement,\n\t\t\ttriggerRes,\n\t\t\ttitleElement,\n\t\t\theight,\n\t\t\tslotSegmentContainer = getSlotSegmentContainer(),\n\t\t\tisRTL = opt('isRTL');\n\t\t\t\n\t\t// calculate position/dimensions, create html\n\t\tfor (i=0; i<segCnt; i++) {\n\t\t\tseg = segs[i];\n\t\t\tevent = seg.event;\n\t\t\ttop = timePosition(seg.start, seg.start);\n\t\t\tbottom = timePosition(seg.start, seg.end);\n\t\t\tcolumnLeft = colContentLeft(seg.col);\n\t\t\tcolumnRight = colContentRight(seg.col);\n\t\t\tcolumnWidth = columnRight - columnLeft;\n\n\t\t\t// shave off space on right near scrollbars (2.5%)\n\t\t\t// TODO: move this to CSS somehow\n\t\t\tcolumnRight -= columnWidth * .025;\n\t\t\tcolumnWidth = columnRight - columnLeft;\n\n\t\t\twidth = columnWidth * (seg.forwardCoord - seg.backwardCoord);\n\n\t\t\tif (opt('slotEventOverlap')) {\n\t\t\t\t// double the width while making sure resize handle is visible\n\t\t\t\t// (assumed to be 20px wide)\n\t\t\t\twidth = Math.max(\n\t\t\t\t\t(width - (20/2)) * 2,\n\t\t\t\t\twidth // narrow columns will want to make the segment smaller than\n\t\t\t\t\t\t// the natural width. don't allow it\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tif (isRTL) {\n\t\t\t\tright = columnRight - seg.backwardCoord * columnWidth;\n\t\t\t\tleft = right - width;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tleft = columnLeft + seg.backwardCoord * columnWidth;\n\t\t\t\tright = left + width;\n\t\t\t}\n\n\t\t\t// make sure horizontal coordinates are in bounds\n\t\t\tleft = Math.max(left, columnLeft);\n\t\t\tright = Math.min(right, columnRight);\n\t\t\twidth = right - left;\n\n\t\t\tseg.top = top;\n\t\t\tseg.left = left;\n\t\t\tseg.outerWidth = width;\n\t\t\tseg.outerHeight = bottom - top;\n\t\t\thtml += slotSegHtml(event, seg);\n\t\t}\n\n\t\tslotSegmentContainer[0].innerHTML = html; // faster than html()\n\t\teventElements = slotSegmentContainer.children();\n\t\t\n\t\t// retrieve elements, run through eventRender callback, bind event handlers\n\t\tfor (i=0; i<segCnt; i++) {\n\t\t\tseg = segs[i];\n\t\t\tevent = seg.event;\n\t\t\teventElement = $(eventElements[i]); // faster than eq()\n\t\t\ttriggerRes = trigger('eventRender', event, event, eventElement);\n\t\t\tif (triggerRes === false) {\n\t\t\t\teventElement.remove();\n\t\t\t}else{\n\t\t\t\tif (triggerRes && triggerRes !== true) {\n\t\t\t\t\teventElement.remove();\n\t\t\t\t\teventElement = $(triggerRes)\n\t\t\t\t\t\t.css({\n\t\t\t\t\t\t\tposition: 'absolute',\n\t\t\t\t\t\t\ttop: seg.top,\n\t\t\t\t\t\t\tleft: seg.left\n\t\t\t\t\t\t})\n\t\t\t\t\t\t.appendTo(slotSegmentContainer);\n\t\t\t\t}\n\t\t\t\tseg.element = eventElement;\n\t\t\t\tif (event._id === modifiedEventId) {\n\t\t\t\t\tbindSlotSeg(event, eventElement, seg);\n\t\t\t\t}else{\n\t\t\t\t\teventElement[0]._fci = i; // for lazySegBind\n\t\t\t\t}\n\t\t\t\treportEventElement(event, eventElement);\n\t\t\t}\n\t\t}\n\t\t\n\t\tlazySegBind(slotSegmentContainer, segs, bindSlotSeg);\n\t\t\n\t\t// record event sides and title positions\n\t\tfor (i=0; i<segCnt; i++) {\n\t\t\tseg = segs[i];\n\t\t\tif (eventElement = seg.element) {\n\t\t\t\tseg.vsides = vsides(eventElement, true);\n\t\t\t\tseg.hsides = hsides(eventElement, true);\n\t\t\t\ttitleElement = eventElement.find('.fc-event-title');\n\t\t\t\tif (titleElement.length) {\n\t\t\t\t\tseg.contentTop = titleElement[0].offsetTop;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t// set all positions/dimensions at once\n\t\tfor (i=0; i<segCnt; i++) {\n\t\t\tseg = segs[i];\n\t\t\tif (eventElement = seg.element) {\n\t\t\t\teventElement[0].style.width = Math.max(0, seg.outerWidth - seg.hsides) + 'px';\n\t\t\t\theight = Math.max(0, seg.outerHeight - seg.vsides);\n\t\t\t\teventElement[0].style.height = height + 'px';\n\t\t\t\tevent = seg.event;\n\t\t\t\tif (seg.contentTop !== undefined && height - seg.contentTop < 10) {\n\t\t\t\t\t// not enough room for title, put it in the time (TODO: maybe make both display:inline instead)\n\t\t\t\t\teventElement.find('div.fc-event-time')\n\t\t\t\t\t\t.text(formatDate(event.start, opt('timeFormat')) + ' - ' + event.title);\n\t\t\t\t\teventElement.find('div.fc-event-title')\n\t\t\t\t\t\t.remove();\n\t\t\t\t}\n\t\t\t\ttrigger('eventAfterRender', event, event, eventElement);\n\t\t\t}\n\t\t}\n\t\t\t\t\t\n\t}", "function renderSlotSegs(segs, modifiedEventId) {\n\t\n\t\tvar i, segCnt=segs.length, seg,\n\t\t\tevent,\n\t\t\ttop,\n\t\t\tbottom,\n\t\t\tcolumnLeft,\n\t\t\tcolumnRight,\n\t\t\tcolumnWidth,\n\t\t\twidth,\n\t\t\tleft,\n\t\t\tright,\n\t\t\thtml = '',\n\t\t\teventElements,\n\t\t\teventElement,\n\t\t\ttriggerRes,\n\t\t\ttitleElement,\n\t\t\theight,\n\t\t\tslotSegmentContainer = getSlotSegmentContainer(),\n\t\t\tisRTL = opt('isRTL');\n\t\t\t\n\t\t// calculate position/dimensions, create html\n\t\tfor (i=0; i<segCnt; i++) {\n\t\t\tseg = segs[i];\n\t\t\tevent = seg.event;\n\t\t\ttop = timePosition(seg.start, seg.start);\n\t\t\tbottom = timePosition(seg.start, seg.end);\n\t\t\tcolumnLeft = colContentLeft(seg.col);\n\t\t\tcolumnRight = colContentRight(seg.col);\n\t\t\tcolumnWidth = columnRight - columnLeft;\n\n\t\t\t// shave off space on right near scrollbars (2.5%)\n\t\t\t// TODO: move this to CSS somehow\n\t\t\tcolumnRight -= columnWidth * .025;\n\t\t\tcolumnWidth = columnRight - columnLeft;\n\n\t\t\twidth = columnWidth * (seg.forwardCoord - seg.backwardCoord);\n\n\t\t\tif (opt('slotEventOverlap')) {\n\t\t\t\t// double the width while making sure resize handle is visible\n\t\t\t\t// (assumed to be 20px wide)\n\t\t\t\twidth = Math.max(\n\t\t\t\t\t(width - (20/2)) * 2,\n\t\t\t\t\twidth // narrow columns will want to make the segment smaller than\n\t\t\t\t\t\t// the natural width. don't allow it\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tif (isRTL) {\n\t\t\t\tright = columnRight - seg.backwardCoord * columnWidth;\n\t\t\t\tleft = right - width;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tleft = columnLeft + seg.backwardCoord * columnWidth;\n\t\t\t\tright = left + width;\n\t\t\t}\n\n\t\t\t// make sure horizontal coordinates are in bounds\n\t\t\tleft = Math.max(left, columnLeft);\n\t\t\tright = Math.min(right, columnRight);\n\t\t\twidth = right - left;\n\n\t\t\tseg.top = top;\n\t\t\tseg.left = left;\n\t\t\tseg.outerWidth = width;\n\t\t\tseg.outerHeight = bottom - top;\n\t\t\thtml += slotSegHtml(event, seg);\n\t\t}\n\n\t\tslotSegmentContainer[0].innerHTML = html; // faster than html()\n\t\teventElements = slotSegmentContainer.children();\n\t\t\n\t\t// retrieve elements, run through eventRender callback, bind event handlers\n\t\tfor (i=0; i<segCnt; i++) {\n\t\t\tseg = segs[i];\n\t\t\tevent = seg.event;\n\t\t\teventElement = $(eventElements[i]); // faster than eq()\n\t\t\ttriggerRes = trigger('eventRender', event, event, eventElement);\n\t\t\tif (triggerRes === false) {\n\t\t\t\teventElement.remove();\n\t\t\t}else{\n\t\t\t\tif (triggerRes && triggerRes !== true) {\n\t\t\t\t\teventElement.remove();\n\t\t\t\t\teventElement = $(triggerRes)\n\t\t\t\t\t\t.css({\n\t\t\t\t\t\t\tposition: 'absolute',\n\t\t\t\t\t\t\ttop: seg.top,\n\t\t\t\t\t\t\tleft: seg.left\n\t\t\t\t\t\t})\n\t\t\t\t\t\t.appendTo(slotSegmentContainer);\n\t\t\t\t}\n\t\t\t\tseg.element = eventElement;\n\t\t\t\tif (event._id === modifiedEventId) {\n\t\t\t\t\tbindSlotSeg(event, eventElement, seg);\n\t\t\t\t}else{\n\t\t\t\t\teventElement[0]._fci = i; // for lazySegBind\n\t\t\t\t}\n\t\t\t\treportEventElement(event, eventElement);\n\t\t\t}\n\t\t}\n\t\t\n\t\tlazySegBind(slotSegmentContainer, segs, bindSlotSeg);\n\t\t\n\t\t// record event sides and title positions\n\t\tfor (i=0; i<segCnt; i++) {\n\t\t\tseg = segs[i];\n\t\t\tif (eventElement = seg.element) {\n\t\t\t\tseg.vsides = vsides(eventElement, true);\n\t\t\t\tseg.hsides = hsides(eventElement, true);\n\t\t\t\ttitleElement = eventElement.find('.fc-event-title');\n\t\t\t\tif (titleElement.length) {\n\t\t\t\t\tseg.contentTop = titleElement[0].offsetTop;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t// set all positions/dimensions at once\n\t\tfor (i=0; i<segCnt; i++) {\n\t\t\tseg = segs[i];\n\t\t\tif (eventElement = seg.element) {\n\t\t\t\teventElement[0].style.width = Math.max(0, seg.outerWidth - seg.hsides) + 'px';\n\t\t\t\theight = Math.max(0, seg.outerHeight - seg.vsides);\n\t\t\t\teventElement[0].style.height = height + 'px';\n\t\t\t\tevent = seg.event;\n\t\t\t\tif (seg.contentTop !== undefined && height - seg.contentTop < 10) {\n\t\t\t\t\t// not enough room for title, put it in the time (TODO: maybe make both display:inline instead)\n\t\t\t\t\teventElement.find('div.fc-event-time')\n\t\t\t\t\t\t.text(formatDate(event.start, opt('timeFormat')) + ' - ' + event.title);\n\t\t\t\t\teventElement.find('div.fc-event-title')\n\t\t\t\t\t\t.remove();\n\t\t\t\t}\n\t\t\t\ttrigger('eventAfterRender', event, event, eventElement);\n\t\t\t}\n\t\t}\n\t\t\t\t\t\n\t}", "listSegments(marker, options = {}) {\n return tslib.__asyncGenerator(this, arguments, function* listSegments_1() {\n let listBlobsFlatSegmentResponse;\n if (!!marker || marker === undefined) {\n do {\n listBlobsFlatSegmentResponse = yield tslib.__await(this.listBlobFlatSegment(marker, options));\n marker = listBlobsFlatSegmentResponse.continuationToken;\n yield yield tslib.__await(yield tslib.__await(listBlobsFlatSegmentResponse));\n } while (marker);\n }\n });\n }", "listSegments(marker, options = {}) {\n return tslib.__asyncGenerator(this, arguments, function* listSegments_1() {\n let listBlobsFlatSegmentResponse;\n if (!!marker || marker === undefined) {\n do {\n listBlobsFlatSegmentResponse = yield tslib.__await(this.listBlobFlatSegment(marker, options));\n marker = listBlobsFlatSegmentResponse.continuationToken;\n yield yield tslib.__await(yield tslib.__await(listBlobsFlatSegmentResponse));\n } while (marker);\n }\n });\n }", "function GetClipSegments(clip_intervals, block_size, hop_size, x_length) {\n var clip_segments = [];\n var num_clip_segments = 0;\n\n var in_segment = false;\n var start_idx = 0;\n var stop_idx = start_idx + block_size - 1;\n var block_idx = 0;\n\n var segment_start_idx = -1;\n var segment_stop_idx = -1;\n while(stop_idx < x_length) {\n // We are in a segment.\n if(in_segment) {\n // We leave the segment. Store it and move on.\n if(!AreOverlapping(clip_intervals, start_idx, stop_idx)) {\n in_segment = false;\n segment_stop_idx = block_idx - 1;\n\n var new_segment = { start:segment_start_idx , stop:segment_stop_idx };\n clip_segments[num_clip_segments] = new_segment;\n num_clip_segments++;\n\n segment_start_idx = -1;\n segment_stop_idx = -1;\n }\n }\n // We are not in a segment.\n else {\n // We have entered a segment.\n if(AreOverlapping(clip_intervals, start_idx, stop_idx)) {\n in_segment = true;\n segment_start_idx = block_idx;\n }\n }\n\n block_idx++;\n start_idx = start_idx + hop_size;\n stop_idx = start_idx + block_size - 1;\n }\n\n // If we end while in a segment, we need to leave the segment and push the segment.\n if(in_segment) {\n in_segment = false;\n segment_stop_idx = block_idx - 1;\n\n var new_segment = { start:segment_start_idx , stop:segment_stop_idx };\n clip_segments[num_clip_segments] = new_segment;\n num_clip_segments++;\n\n segment_start_idx = -1;\n segment_stop_idx = -1;\n }\n\n return clip_segments;\n }", "function createRegions() {\n regions = [];\n\n var fullWidth = absolute(timelineController.timeExtents[1]);\n var chunkWidth = 500;\n var chunks = Math.ceil(fullWidth / chunkWidth);\n var offset = 0;\n\n // avoid creating lots of chunks - cap and only generate around the\n // current view\n // if we scroll out of bounds of the chunks we *do* have, we can throw\n // away our regions + purge regions in memory\n if (chunks > 30) {\n var startX = absolute(timelineController.viewExtents[0]);\n var endX = absolute(timelineController.viewExtents[1]);\n var midX = startX + (endX - startX) / 2;\n\n chunks = 50;\n offset = Math.max(0, midX - (chunkWidth * 15));\n }\n\n for (var i = 0; i < chunks; i++) {\n // for each desired chunk, find the bounds and managed data points\n // then, calculate positions for each data point\n var w = Math.min(fullWidth - offset, chunkWidth);\n var min = absolute.invert(offset);\n var max = absolute.invert(offset + w);\n var data = timelineController.dstatInBounds(min, max);\n\n regions.push({\n x: offset, width: w, min: min, max: max,\n data: data,\n c: null,\n dirty: true,\n index: regions.length\n });\n\n offset += w;\n }\n }", "function selectSegments(numOfColumns) {\n const segments = [];\n const secondSegments = [];\n\n for(let i=0; i<numOfColumns; i++){\n segments.push(document.querySelector(`.${createColumnsName().segmentsName[i]}`));\n secondSegments.push(document.querySelector(`.${createColumnsName().secondSegmentsName[i]}`));\n }\n\n return {segments, secondSegments}\n}", "formatSegments (isProtein) {\n\t\tvar variants = isProtein ? this.attributes.variantDataProtein : this.attributes.variantDataDna;\n\t\tvar sequences = isProtein ? this.attributes.alignedProteinSequences : this.attributes.alignedDnaSequences;\n\t\t// make sure they're sorted by start\n\t\tvariants = _.sortBy(variants, d => {\n\t\t\treturn d.start;\n\t\t});\n\n\t\t// merge segments\n\t\tvar mergedSegments = _.reduce(variants, (memo, d) => {\n\t\t\treturn this._mergeOrAddSegment(memo, d);\n\t\t}, []);\n\n\t\t// add in needed summarized segments\n\t\t// first one\n\t\tif (mergedSegments[0].start > 1) {\n\t\t\tmergedSegments.push({\n\t\t\t\tvisible: false,\n\t\t\t\tstart: 1,\n\t\t\t\tend: mergedSegments[0].start\n\t\t\t});\n\t\t}\n\t\t// loop through and connect visible segments with summarized segments\n\t\tvar _visibleSegments = _.where(mergedSegments, { visible: true });\n\t\t_visibleSegments.forEach( (d, i) => {\n\t\t\t// must not be last or visible\n\t\t\tif (d.visible && i < _visibleSegments.length - 1) {\n\t\t\t\tmergedSegments.push({\n\t\t\t\t\tvisible: false,\n\t\t\t\t\tstart: d.end,\n\t\t\t\t\tend: _visibleSegments[i + 1].start\n\t\t\t\t});\n\t\t\t}\n\t\t});\n\t\t\n\t\tvar _last = _.max(mergedSegments, d => { return d.end; });\n\t\tvar _maxLength = _.max(sequences, d => { return d.sequence.length; }).sequence.length;\n\t\t// add last if last segment is visible and not at the end\n\t\tif (_last.end < _maxLength) {\n\t\t\tmergedSegments.push({\n\t\t\t\tstart: _last.end,\n\t\t\t\tend: _maxLength,\n\t\t\t\tvisible: false\n\t\t\t});\n\t\t// add last if visible\n\t\t} else {\n\t\t\tmergedSegments.push({\n\t\t\t\tstart: _last.end,\n\t\t\t\tend: _maxLength + 1,\n\t\t\t\tvisible: true\n\t\t\t});\n\t\t}\n\t\t\n\t\t// change starts and ends to domains\n\t\tmergedSegments = _.map(mergedSegments, d => {\n\t\t\td.domain = [d.start, d.end];\n\t\t\treturn d;\n\t\t});\n\t\t// sort\n\t\tmergedSegments = _.sortBy(mergedSegments, d => {\n\t\t\treturn d.start;\n\t\t});\n\t\treturn mergedSegments;\n\t}", "function buildSegmentSubrows(segments) {\n\n\t\t// Give preference to elements with certain criteria, so they have\n\t\t// a chance to be closer to the top.\n\t\tsegments.sort(compareDaySegments);\n\n\t\tvar subrows = [];\n\t\tfor (var i=0; i<segments.length; i++) {\n\t\t\tvar segment = segments[i];\n\n\t\t\t// loop through subrows, starting with the topmost, until the segment\n\t\t\t// doesn't collide with other segments.\n\t\t\tfor (var j=0; j<subrows.length; j++) {\n\t\t\t\tif (!isDaySegmentCollision(segment, subrows[j])) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\t// `j` now holds the desired subrow index\n\t\t\tif (subrows[j]) {\n\t\t\t\tsubrows[j].push(segment);\n\t\t\t}\n\t\t\telse {\n\t\t\t\tsubrows[j] = [ segment ];\n\t\t\t}\n\t\t}\n\n\t\treturn subrows;\n\t}", "function buildSegmentSubrows(segments) {\n\n\t\t// Give preference to elements with certain criteria, so they have\n\t\t// a chance to be closer to the top.\n\t\tsegments.sort(compareDaySegments);\n\n\t\tvar subrows = [];\n\t\tfor (var i=0; i<segments.length; i++) {\n\t\t\tvar segment = segments[i];\n\n\t\t\t// loop through subrows, starting with the topmost, until the segment\n\t\t\t// doesn't collide with other segments.\n\t\t\tfor (var j=0; j<subrows.length; j++) {\n\t\t\t\tif (!isDaySegmentCollision(segment, subrows[j])) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\t// `j` now holds the desired subrow index\n\t\t\tif (subrows[j]) {\n\t\t\t\tsubrows[j].push(segment);\n\t\t\t}\n\t\t\telse {\n\t\t\t\tsubrows[j] = [ segment ];\n\t\t\t}\n\t\t}\n\n\t\treturn subrows;\n\t}", "function buildSegmentSubrows(segments) {\n\n\t\t// Give preference to elements with certain criteria, so they have\n\t\t// a chance to be closer to the top.\n\t\tsegments.sort(compareDaySegments);\n\n\t\tvar subrows = [];\n\t\tfor (var i=0; i<segments.length; i++) {\n\t\t\tvar segment = segments[i];\n\n\t\t\t// loop through subrows, starting with the topmost, until the segment\n\t\t\t// doesn't collide with other segments.\n\t\t\tfor (var j=0; j<subrows.length; j++) {\n\t\t\t\tif (!isDaySegmentCollision(segment, subrows[j])) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\t// `j` now holds the desired subrow index\n\t\t\tif (subrows[j]) {\n\t\t\t\tsubrows[j].push(segment);\n\t\t\t}\n\t\t\telse {\n\t\t\t\tsubrows[j] = [ segment ];\n\t\t\t}\n\t\t}\n\n\t\treturn subrows;\n\t}", "function buildSegmentSubrows(segments) {\n\n\t\t// Give preference to elements with certain criteria, so they have\n\t\t// a chance to be closer to the top.\n\t\tsegments.sort(compareDaySegments);\n\n\t\tvar subrows = [];\n\t\tfor (var i=0; i<segments.length; i++) {\n\t\t\tvar segment = segments[i];\n\n\t\t\t// loop through subrows, starting with the topmost, until the segment\n\t\t\t// doesn't collide with other segments.\n\t\t\tfor (var j=0; j<subrows.length; j++) {\n\t\t\t\tif (!isDaySegmentCollision(segment, subrows[j])) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\t// `j` now holds the desired subrow index\n\t\t\tif (subrows[j]) {\n\t\t\t\tsubrows[j].push(segment);\n\t\t\t}\n\t\t\telse {\n\t\t\t\tsubrows[j] = [ segment ];\n\t\t\t}\n\t\t}\n\n\t\treturn subrows;\n\t}", "function buildSegmentSubrows(segments) {\n\n\t\t// Give preference to elements with certain criteria, so they have\n\t\t// a chance to be closer to the top.\n\t\tsegments.sort(compareDaySegments);\n\n\t\tvar subrows = [];\n\t\tfor (var i=0; i<segments.length; i++) {\n\t\t\tvar segment = segments[i];\n\n\t\t\t// loop through subrows, starting with the topmost, until the segment\n\t\t\t// doesn't collide with other segments.\n\t\t\tfor (var j=0; j<subrows.length; j++) {\n\t\t\t\tif (!isDaySegmentCollision(segment, subrows[j])) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\t// `j` now holds the desired subrow index\n\t\t\tif (subrows[j]) {\n\t\t\t\tsubrows[j].push(segment);\n\t\t\t}\n\t\t\telse {\n\t\t\t\tsubrows[j] = [ segment ];\n\t\t\t}\n\t\t}\n\n\t\treturn subrows;\n\t}", "getEventsToRender(resource, events) {\n if (resource.timeRanges && resource.timeRanges.length && !this.disabled) {\n events.push(...resource.timeRanges);\n }\n\n return events;\n }", "function computeSegCoords(segs, dayDate, slatCoords, eventMinHeight, eventOrderSpecs) {\n computeSegVerticals(segs, dayDate, slatCoords, eventMinHeight);\n return computeSegHorizontals(segs, eventOrderSpecs); // requires top/bottom from computeSegVerticals\n } // For each segment in an array, computes and assigns its top and bottom properties", "function split(array, segments) {\n segments = segments || 2;\n\n var output = [],\n segmentLength = Math.floor(array.length / segments),\n remainder = array.length % segments,\n start = 0,\n i = 0,\n n = array.length,\n len;\n\n while (start < n) {\n len = i++ < remainder ? segmentLength + 1 : segmentLength;\n output.push(array.slice(start, start + len));\n start += len;\n }\n\n return output;\n }", "function getEvents(events) {\n if (Array.isArray(events))\n return events\n if (typeof events !== 'string')\n throw new TypeError('Must be a string or an array.')\n return events.trim().split(/\\s+/)\n}", "function parseEvents(events){\n const parser_events = [];\n events.map(x => {\n let event = {\n title: x.event_title,\n start: x.event_start_date,\n end: x.event_end_time,\n color:\"#FFFFFF\",\n allDay : false,\n id: x.event_id,\n description : x.event_description,\n event_url: x.event_url,\n event_type: x.event_type,\n event_logo: x.event_logo\n }\n parser_events.push(event);\n });\n\n return parser_events;\n}", "function createEventList (eventsTimeline) {\n return eventsTimeline.reduce(function(allEvents, event) {\n // If time does not exist in array add this time with initial value 0\n if (!allEvents[event.time]) {\n allEvents[event.time] = 0;\n }\n\n // Counting of events at time\n if (event.type === DriveOptions.ENTER_TO_PARKING) {\n allEvents[event.time] += 1;\n } else if (event.type === DriveOptions.LEAVE_PARKING) {\n allEvents[event.time] -= 1;\n }\n\n return allEvents;\n }, {});\n }", "function eventStoreToRanges(eventStore) {\n var instances = eventStore.instances;\n var ranges = [];\n for (var instanceId in instances) {\n ranges.push(instances[instanceId].range);\n }\n return ranges;\n}", "function computeSegVerticals(segs, dayDate, slatCoords, eventMinHeight) {\n for (var _i = 0, segs_1 = segs; _i < segs_1.length; _i++) {\n var seg = segs_1[_i];\n seg.top = slatCoords.computeDateTop(seg.start, dayDate);\n seg.bottom = Math.max(seg.top + (eventMinHeight || 0), // yuck\n slatCoords.computeDateTop(seg.end, dayDate));\n }\n }", "function eventStoreToRanges(eventStore) {\n var instances = eventStore.instances;\n var ranges = [];\n for (var instanceId in instances) {\n ranges.push(instances[instanceId].range);\n }\n return ranges;\n }", "function eventStoreToRanges(eventStore) {\n var instances = eventStore.instances;\n var ranges = [];\n for (var instanceId in instances) {\n ranges.push(instances[instanceId].range);\n }\n return ranges;\n }", "function eventStoreToRanges(eventStore) {\n var instances = eventStore.instances;\n var ranges = [];\n for (var instanceId in instances) {\n ranges.push(instances[instanceId].range);\n }\n return ranges;\n }", "function eventStoreToRanges(eventStore) {\n var instances = eventStore.instances;\n var ranges = [];\n for (var instanceId in instances) {\n ranges.push(instances[instanceId].range);\n }\n return ranges;\n }", "function eventStoreToRanges$1(eventStore) {\n var instances = eventStore.instances;\n var ranges = [];\n for (var instanceId in instances) {\n ranges.push(instances[instanceId].range);\n }\n return ranges;\n }", "function buildSegmentRows(segments) {\n\t\tvar rowCnt = getRowCnt();\n\t\tvar segmentRows = [];\n\t\tvar segmentI;\n\t\tvar segment;\n\t\tvar rowI;\n\n\t\t// group segments by row\n\t\tfor (segmentI=0; segmentI<segments.length; segmentI++) {\n\t\t\tsegment = segments[segmentI];\n\t\t\trowI = segment.row;\n\t\t\tif (segment.element) { // was rendered?\n\t\t\t\tif (segmentRows[rowI]) {\n\t\t\t\t\t// already other segments. append to array\n\t\t\t\t\tsegmentRows[rowI].push(segment);\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t// first segment in row. create new array\n\t\t\t\t\tsegmentRows[rowI] = [ segment ];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// sort each row\n\t\tfor (rowI=0; rowI<rowCnt; rowI++) {\n\t\t\tsegmentRows[rowI] = sortSegmentRow(\n\t\t\t\tsegmentRows[rowI] || [] // guarantee an array, even if no segments\n\t\t\t);\n\t\t}\n\n\t\treturn segmentRows;\n\t}", "function buildSegmentRows(segments) {\n\t\tvar rowCnt = getRowCnt();\n\t\tvar segmentRows = [];\n\t\tvar segmentI;\n\t\tvar segment;\n\t\tvar rowI;\n\n\t\t// group segments by row\n\t\tfor (segmentI=0; segmentI<segments.length; segmentI++) {\n\t\t\tsegment = segments[segmentI];\n\t\t\trowI = segment.row;\n\t\t\tif (segment.element) { // was rendered?\n\t\t\t\tif (segmentRows[rowI]) {\n\t\t\t\t\t// already other segments. append to array\n\t\t\t\t\tsegmentRows[rowI].push(segment);\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t// first segment in row. create new array\n\t\t\t\t\tsegmentRows[rowI] = [ segment ];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// sort each row\n\t\tfor (rowI=0; rowI<rowCnt; rowI++) {\n\t\t\tsegmentRows[rowI] = sortSegmentRow(\n\t\t\t\tsegmentRows[rowI] || [] // guarantee an array, even if no segments\n\t\t\t);\n\t\t}\n\n\t\treturn segmentRows;\n\t}", "function buildSegmentRows(segments) {\n\t\tvar rowCnt = getRowCnt();\n\t\tvar segmentRows = [];\n\t\tvar segmentI;\n\t\tvar segment;\n\t\tvar rowI;\n\n\t\t// group segments by row\n\t\tfor (segmentI=0; segmentI<segments.length; segmentI++) {\n\t\t\tsegment = segments[segmentI];\n\t\t\trowI = segment.row;\n\t\t\tif (segment.element) { // was rendered?\n\t\t\t\tif (segmentRows[rowI]) {\n\t\t\t\t\t// already other segments. append to array\n\t\t\t\t\tsegmentRows[rowI].push(segment);\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t// first segment in row. create new array\n\t\t\t\t\tsegmentRows[rowI] = [ segment ];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// sort each row\n\t\tfor (rowI=0; rowI<rowCnt; rowI++) {\n\t\t\tsegmentRows[rowI] = sortSegmentRow(\n\t\t\t\tsegmentRows[rowI] || [] // guarantee an array, even if no segments\n\t\t\t);\n\t\t}\n\n\t\treturn segmentRows;\n\t}", "function buildSegmentRows(segments) {\n\t\tvar rowCnt = getRowCnt();\n\t\tvar segmentRows = [];\n\t\tvar segmentI;\n\t\tvar segment;\n\t\tvar rowI;\n\n\t\t// group segments by row\n\t\tfor (segmentI=0; segmentI<segments.length; segmentI++) {\n\t\t\tsegment = segments[segmentI];\n\t\t\trowI = segment.row;\n\t\t\tif (segment.element) { // was rendered?\n\t\t\t\tif (segmentRows[rowI]) {\n\t\t\t\t\t// already other segments. append to array\n\t\t\t\t\tsegmentRows[rowI].push(segment);\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t// first segment in row. create new array\n\t\t\t\t\tsegmentRows[rowI] = [ segment ];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// sort each row\n\t\tfor (rowI=0; rowI<rowCnt; rowI++) {\n\t\t\tsegmentRows[rowI] = sortSegmentRow(\n\t\t\t\tsegmentRows[rowI] || [] // guarantee an array, even if no segments\n\t\t\t);\n\t\t}\n\n\t\treturn segmentRows;\n\t}", "function buildSegmentRows(segments) {\n\t\tvar rowCnt = getRowCnt();\n\t\tvar segmentRows = [];\n\t\tvar segmentI;\n\t\tvar segment;\n\t\tvar rowI;\n\n\t\t// group segments by row\n\t\tfor (segmentI=0; segmentI<segments.length; segmentI++) {\n\t\t\tsegment = segments[segmentI];\n\t\t\trowI = segment.row;\n\t\t\tif (segment.element) { // was rendered?\n\t\t\t\tif (segmentRows[rowI]) {\n\t\t\t\t\t// already other segments. append to array\n\t\t\t\t\tsegmentRows[rowI].push(segment);\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t// first segment in row. create new array\n\t\t\t\t\tsegmentRows[rowI] = [ segment ];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// sort each row\n\t\tfor (rowI=0; rowI<rowCnt; rowI++) {\n\t\t\tsegmentRows[rowI] = sortSegmentRow(\n\t\t\t\tsegmentRows[rowI] || [] // guarantee an array, even if no segments\n\t\t\t);\n\t\t}\n\n\t\treturn segmentRows;\n\t}", "function getLogEventStrings() {\n var eventsArr = [];\n var str = Logger.getLog();\n var arr = str.split(\"\\n\");\n// Logger.log(\"arr=\" + arr.length);\n for (var i in arr) {\n// Logger.log(\"arr[\" + i + \"]=\" + arr[i]);\n if ( arr[i].length > 0 ) {\n var regexResult = /.+?INFO: \\[EVENT\\] (.+)/.exec(arr[i]); //Is log string of [EVENT] type\n if (regexResult && regexResult[0].length>0) eventsArr.push(regexResult[1]);\n }\n }\n return eventsArr;\n}", "function _list() {\r\n\t\tvar len = _events.length,\r\n\t\t\ti, out = '';\r\n\t\tfor (i = 0; i < len; i += 1) {\r\n\t\t\tout += _events[i].name + ' ' + _events[i].time + '\\n';\r\n\t\t}\r\n\t\tconsole.log(out);\r\n\t}", "function appendSegmentsArray(P0, P1, P2, P3) {\n var length = distance(P1, P2);\n var mid = midpoint(P1, P2);\n var d = distance(mid, focalPoint);\n var U1 = unitVector(P1, P0);\n var V1 = unitVector(P1, P2);\n var angle1 = vectorAngle(U1, V1);\n var U2 = unitVector(P2, P1);\n var V2 = unitVector(P2, P3);\n var angle2 = vectorAngle(U2, V2);\n segments.push([P1, P2, length, mid, d, U1, V1, angle1, U2, V2, angle2]);\n}", "function add_segments() {\r\n for (let i = 0; i < new_segments; i++) {\r\n the_snake_square_on_the_grid_board_game.push({\r\n ...the_snake_square_on_the_grid_board_game[the_snake_square_on_the_grid_board_game.length - 1]\r\n });\r\n }\r\n\r\n new_segments = 0;\r\n}", "function split(array, segments) {\n\t segments = segments || 2;\n\t var results = [];\n\t if (array == null) {\n\t return results;\n\t }\n\n\t var minLength = Math.floor(array.length / segments),\n\t remainder = array.length % segments,\n\t i = 0,\n\t len = array.length,\n\t segmentIndex = 0,\n\t segmentLength;\n\n\t while (i < len) {\n\t segmentLength = minLength;\n\t if (segmentIndex < remainder) {\n\t segmentLength++;\n\t }\n\n\t results.push(array.slice(i, i + segmentLength));\n\n\t segmentIndex++;\n\t i += segmentLength;\n\t }\n\n\t return results;\n\t }", "parseEvents() {\n return {\n onStart: createEventCallback('onStart', this.pathNavigator).bind(this),\n onPause: createEventCallback('onPause', this.pathNavigator).bind(this),\n onMove: createEventCallback('onMove', this.pathNavigator).bind(this),\n onStop: createEventCallback('onStop', this.pathNavigator).bind(this),\n };\n }", "function randomSegments(n, min, max, gapmin, gapmax) {\n var segments = [];\n var x = 0;\n var addInterval = function () {\n var len = (Math.random() * (max - min)) + min;\n segments.push({ start: x, end: x + len });\n x += len;\n };\n var addGap = function () {\n x += (Math.random() * (gapmax - gapmin)) + gapmin;\n };\n if (Math.random() > 0.5) {\n addGap();\n }\n for (var i = 0; i < n; i++) {\n addInterval();\n addGap();\n }\n return segments;\n}", "endpoints() {\n if (isNaN(this.theta)) {\n console.log(\"NaN for \" + this.point);\n }\n\n if (this.pointDefines == \"start\") {\n throw new Error(\"UNIMPLEMENTED\");\n } else if (this.pointDefines == \"center\") {\n var r = this.length / 2;\n return [\n [this.point[0] + Math.cos(this.theta) * -r, this.point[1] + Math.sin(this.theta) * -r],\n [this.point[0] + Math.cos(this.theta) * r, this.point[1] + Math.sin(this.theta) * r]\n ];\n } else if (this.pointDefines == \"end\") {\n throw new Error(\"UNIMPLEMENTED\");\n } else {\n throw new Error(\"UNIMPLEMENTED\");\n }\n }", "function getEventsPage(e){\n var events = [];\n\n events.y = (typeof e.pageY !== 'undefined' && (e.pageY || e.pageX) ? e.pageY : e.touches[0].pageY);\n events.x = (typeof e.pageX !== 'undefined' && (e.pageY || e.pageX) ? e.pageX : e.touches[0].pageX);\n\n //in touch devices with scrollBar:true, e.pageY is detected, but we have to deal with touch events. #1008\n if(isTouch && isReallyTouch(e) && options.scrollBar && typeof e.touches !== 'undefined'){\n events.y = e.touches[0].pageY;\n events.x = e.touches[0].pageX;\n }\n\n return events;\n }", "function getEventsPage(e){\n var events = [];\n\n events.y = (typeof e.pageY !== 'undefined' && (e.pageY || e.pageX) ? e.pageY : e.touches[0].pageY);\n events.x = (typeof e.pageX !== 'undefined' && (e.pageY || e.pageX) ? e.pageX : e.touches[0].pageX);\n\n //in touch devices with scrollBar:true, e.pageY is detected, but we have to deal with touch events. #1008\n if(isTouch && isReallyTouch(e) && options.scrollBar && typeof e.touches !== 'undefined'){\n events.y = e.touches[0].pageY;\n events.x = e.touches[0].pageX;\n }\n\n return events;\n }", "function getEventsPage(e){\n var events = [];\n\n events.y = (typeof e.pageY !== 'undefined' && (e.pageY || e.pageX) ? e.pageY : e.touches[0].pageY);\n events.x = (typeof e.pageX !== 'undefined' && (e.pageY || e.pageX) ? e.pageX : e.touches[0].pageX);\n\n //in touch devices with scrollBar:true, e.pageY is detected, but we have to deal with touch events. #1008\n if(isTouch && isReallyTouch(e) && options.scrollBar && typeof e.touches !== 'undefined'){\n events.y = e.touches[0].pageY;\n events.x = e.touches[0].pageX;\n }\n\n return events;\n }", "function getEventsPage(e){\n var events = [];\n\n events.y = (typeof e.pageY !== 'undefined' && (e.pageY || e.pageX) ? e.pageY : e.touches[0].pageY);\n events.x = (typeof e.pageX !== 'undefined' && (e.pageY || e.pageX) ? e.pageX : e.touches[0].pageX);\n\n //in touch devices with scrollBar:true, e.pageY is detected, but we have to deal with touch events. #1008\n if(isTouch && isReallyTouch(e) && options.scrollBar){\n events.y = e.touches[0].pageY;\n events.x = e.touches[0].pageX;\n }\n\n return events;\n }", "function getEventsPage(e){\n var events = [];\n\n events.y = (typeof e.pageY !== 'undefined' && (e.pageY || e.pageX) ? e.pageY : e.touches[0].pageY);\n events.x = (typeof e.pageX !== 'undefined' && (e.pageY || e.pageX) ? e.pageX : e.touches[0].pageX);\n\n //in touch devices with scrollBar:true, e.pageY is detected, but we have to deal with touch events. #1008\n if(isTouch && isReallyTouch(e) && options.scrollBar){\n events.y = e.touches[0].pageY;\n events.x = e.touches[0].pageX;\n }\n\n return events;\n }", "function getEventsPage(e){\n var events = [];\n\n events.y = (typeof e.pageY !== 'undefined' && (e.pageY || e.pageX) ? e.pageY : e.touches[0].pageY);\n events.x = (typeof e.pageX !== 'undefined' && (e.pageY || e.pageX) ? e.pageX : e.touches[0].pageX);\n\n //in touch devices with scrollBar:true, e.pageY is detected, but we have to deal with touch events. #1008\n if(isTouch && isReallyTouch(e) && options.scrollBar){\n events.y = e.touches[0].pageY;\n events.x = e.touches[0].pageX;\n }\n\n return events;\n }", "function getEventsPage(e){\n var events = [];\n\n events.y = (typeof e.pageY !== 'undefined' && (e.pageY || e.pageX) ? e.pageY : e.touches[0].pageY);\n events.x = (typeof e.pageX !== 'undefined' && (e.pageY || e.pageX) ? e.pageX : e.touches[0].pageX);\n\n //in touch devices with scrollBar:true, e.pageY is detected, but we have to deal with touch events. #1008\n if(isTouch && isReallyTouch(e) && options.scrollBar){\n events.y = e.touches[0].pageY;\n events.x = e.touches[0].pageX;\n }\n\n return events;\n }", "drawEventList() {\n\n\n let FinalEventListObject = this.calcEventsPosition();\n let finalEventArray = [];\n\n Object.keys(FinalEventListObject).forEach(key => {\n let event = this.eventList.find(ele => {\n return ele.id == key;\n }) || {};\n event['width'] = FinalEventListObject[key]['width'];\n event['left'] = FinalEventListObject[key]['left'];\n finalEventArray.push(event);\n });\n\n finalEventArray.forEach((ele) => {\n ele['top'] = ele['start'] * 2;\n ele['height'] = (ele['end'] - ele['start']) * 2;\n ele['color'] = this.getRandomColor();\n });\n return finalEventArray;\n }", "function computeSegHorizontals(segs, eventOrderSpecs) {\n // IMPORTANT TO CLEAR OLD RESULTS :(\n for (var _i = 0, segs_2 = segs; _i < segs_2.length; _i++) {\n var seg = segs_2[_i];\n seg.level = null;\n seg.forwardCoord = null;\n seg.backwardCoord = null;\n seg.forwardPressure = null;\n }\n segs = sortEventSegs(segs, eventOrderSpecs);\n var level0;\n var levels = buildSlotSegLevels(segs);\n computeForwardSlotSegs(levels);\n if ((level0 = levels[0])) {\n for (var _a = 0, level0_1 = level0; _a < level0_1.length; _a++) {\n var seg = level0_1[_a];\n computeSlotSegPressures(seg);\n }\n for (var _b = 0, level0_2 = level0; _b < level0_2.length; _b++) {\n var seg = level0_2[_b];\n computeSegForwardBack(seg, 0, 0, eventOrderSpecs);\n }\n }\n return segs;\n }", "function getSelectedSegments(report) {\n var segments = [];\n if(report.segmentation) {\n report.tab.find('.segment-' + report.segmentation + ' .segment-toggle:checked').each(function() {\n segments.push($(this).val());\n });\n }\n return segments;\n}", "function getEventsPage(e){\r\n var events = [];\r\n\r\n events.y = (typeof e.pageY !== 'undefined' && (e.pageY || e.pageX) ? e.pageY : e.touches[0].pageY);\r\n events.x = (typeof e.pageX !== 'undefined' && (e.pageY || e.pageX) ? e.pageX : e.touches[0].pageX);\r\n\r\n //in touch devices with scrollBar:true, e.pageY is detected, but we have to deal with touch events. #1008\r\n if(isTouch && isReallyTouch(e) && options.scrollBar && typeof e.touches !== 'undefined'){\r\n events.y = e.touches[0].pageY;\r\n events.x = e.touches[0].pageX;\r\n }\r\n\r\n return events;\r\n }", "function getEventsPage(e){\r\n var events = [];\r\n\r\n events.y = (typeof e.pageY !== 'undefined' && (e.pageY || e.pageX) ? e.pageY : e.touches[0].pageY);\r\n events.x = (typeof e.pageX !== 'undefined' && (e.pageY || e.pageX) ? e.pageX : e.touches[0].pageX);\r\n\r\n //in touch devices with scrollBar:true, e.pageY is detected, but we have to deal with touch events. #1008\r\n if(isTouch && isReallyTouch(e) && options.scrollBar && typeof e.touches !== 'undefined'){\r\n events.y = e.touches[0].pageY;\r\n events.x = e.touches[0].pageX;\r\n }\r\n\r\n return events;\r\n }", "function eventSegregation(val){\n var current = new Date();\n var eArr = [];\n val.map(function(item, i){\n if(item.date>=current){\n obj = {\n topic : item.topic,\n topicImgURL : item.topicImgURL,\n subtopic : item.subtopic,\n date : item.date\n };\n eArr.push(obj);\n }\n })\n return eArr; //returns array\n}", "function getEventsPage(e){\r\n var events = [];\r\n\r\n events.y = (typeof e.pageY !== 'undefined' && (e.pageY || e.pageX) ? e.pageY : e.touches[0].pageY);\r\n events.x = (typeof e.pageX !== 'undefined' && (e.pageY || e.pageX) ? e.pageX : e.touches[0].pageX);\r\n\r\n //in touch devices with scrollBar:true, e.pageY is detected, but we have to deal with touch events. #1008\r\n if(isTouch && isReallyTouch(e) && options.scrollBar){\r\n events.y = e.touches[0].pageY;\r\n events.x = e.touches[0].pageX;\r\n }\r\n\r\n return events;\r\n }", "function getEventsPage(e){\r\n var events = [];\r\n\r\n events.y = (typeof e.pageY !== 'undefined' && (e.pageY || e.pageX) ? e.pageY : e.touches[0].pageY);\r\n events.x = (typeof e.pageX !== 'undefined' && (e.pageY || e.pageX) ? e.pageX : e.touches[0].pageX);\r\n\r\n //in touch devices with scrollBar:true, e.pageY is detected, but we have to deal with touch events. #1008\r\n if(isTouch && isReallyTouch(e) && options.scrollBar){\r\n events.y = e.touches[0].pageY;\r\n events.x = e.touches[0].pageX;\r\n }\r\n\r\n return events;\r\n }", "normalize(events) {\n if (events.length == 0) {\n return events;\n }\n\n return events.map((e) => e.split('.').shift());\n }", "function getEventsPage(e) {\n var events = [];\n\n events.y = (typeof e.pageY !== 'undefined' && (e.pageY || e.pageX) ? e.pageY : e.touches[0].pageY);\n events.x = (typeof e.pageX !== 'undefined' && (e.pageY || e.pageX) ? e.pageX : e.touches[0].pageX);\n\n //in touch devices with scroll bar, e.pageY is detected, but we have to deal with touch events. #1008\n if (isTouch && isReallyTouch(e) && (options.scrollBar || !options.autoScrolling)) {\n events.y = e.touches[0].pageY;\n events.x = e.touches[0].pageX;\n }\n\n return events;\n }", "getSegments() {\n return this.version\n .match(/[0-9]+|[a-z]+/gi)\n .map((s) => (/^\\d+$/.test(s) ? Number(s) : s));\n }", "function getEventsPage(e){\n var events = new Array();\n\n events.y = (typeof e.pageY !== 'undefined' && (e.pageY || e.pageX) ? e.pageY : e.touches[0].pageY);\n events.x = (typeof e.pageX !== 'undefined' && (e.pageY || e.pageX) ? e.pageX : e.touches[0].pageX);\n\n return events;\n }" ]
[ "0.74764097", "0.74764097", "0.73861265", "0.73861265", "0.73861265", "0.57995147", "0.5690146", "0.56633604", "0.5631998", "0.55718815", "0.55718815", "0.55718815", "0.55708164", "0.5524673", "0.5524673", "0.54720145", "0.5427073", "0.54232", "0.5364946", "0.53481823", "0.53481823", "0.53215694", "0.53212684", "0.5317325", "0.5317325", "0.5317325", "0.5297655", "0.5297655", "0.5297655", "0.5283685", "0.5273356", "0.5261075", "0.52520883", "0.5244052", "0.5244052", "0.5244052", "0.5234233", "0.5234102", "0.5234102", "0.5234102", "0.52291715", "0.52291715", "0.5209834", "0.52045655", "0.5171867", "0.5165196", "0.5129218", "0.5129218", "0.5129218", "0.5129218", "0.5129218", "0.5112408", "0.5101805", "0.51017094", "0.50936234", "0.50720537", "0.5064533", "0.50624585", "0.50547814", "0.5046279", "0.5046279", "0.5046279", "0.5046279", "0.50448984", "0.5044046", "0.5044046", "0.5044046", "0.5044046", "0.5044046", "0.5024518", "0.50178546", "0.5009807", "0.50053537", "0.4955271", "0.49487716", "0.494823", "0.49369773", "0.49239203", "0.49239203", "0.49239203", "0.49148932", "0.49148932", "0.49148932", "0.49148932", "0.49090368", "0.49003226", "0.4897281", "0.489718", "0.489718", "0.4893382", "0.48858577", "0.48858577", "0.4883606", "0.48805413", "0.48748207", "0.4866303" ]
0.7994129
3
Generate an array of segments for a single event. A "segment" is the same data structure that View.rangeToSegments produces, with the addition of the `event` property being set to reference the original event.
function buildSegmentsForEvent(event) { var startDate = event.start; var endDate = exclEndDay(event); var segments = rangeToSegments(startDate, endDate); for (var i=0; i<segments.length; i++) { segments[i].event = event; } return segments; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function buildSegmentsForEvent(event) {\n\t\tvar segments = rangeToSegments(event.start, getEventEnd(event));\n\t\tfor (var i=0; i<segments.length; i++) {\n\t\t\tsegments[i].event = event;\n\t\t}\n\t\treturn segments;\n\t}", "function buildSegmentsForEvent(event) {\n\t\tvar segments = rangeToSegments(event.start, getEventEnd(event));\n\t\tfor (var i=0; i<segments.length; i++) {\n\t\t\tsegments[i].event = event;\n\t\t}\n\t\treturn segments;\n\t}", "function buildSegments(events) {\n\t\tvar segments = [];\n\t\tfor (var i=0; i<events.length; i++) {\n\t\t\tvar eventSegments = buildSegmentsForEvent(events[i]);\n\t\t\tsegments.push.apply(segments, eventSegments); // append an array to an array\n\t\t}\n\t\treturn segments;\n\t}", "function buildSegments(events) {\n\t\tvar segments = [];\n\t\tfor (var i=0; i<events.length; i++) {\n\t\t\tvar eventSegments = buildSegmentsForEvent(events[i]);\n\t\t\tsegments.push.apply(segments, eventSegments); // append an array to an array\n\t\t}\n\t\treturn segments;\n\t}", "function buildSegments(events) {\n\t\tvar segments = [];\n\t\tfor (var i=0; i<events.length; i++) {\n\t\t\tvar eventSegments = buildSegmentsForEvent(events[i]);\n\t\t\tsegments.push.apply(segments, eventSegments); // append an array to an array\n\t\t}\n\t\treturn segments;\n\t}", "function buildSegments(events) {\n\t\tvar segments = [];\n\t\tfor (var i=0; i<events.length; i++) {\n\t\t\tvar eventSegments = buildSegmentsForEvent(events[i]);\n\t\t\tsegments.push.apply(segments, eventSegments); // append an array to an array\n\t\t}\n\t\treturn segments;\n\t}", "function buildSegments(events) {\n\t\tvar segments = [];\n\t\tfor (var i=0; i<events.length; i++) {\n\t\t\tvar eventSegments = buildSegmentsForEvent(events[i]);\n\t\t\tsegments.push.apply(segments, eventSegments); // append an array to an array\n\t\t}\n\t\treturn segments;\n\t}", "function rangeToSegments(start, end) {\n\n\t\tvar rowCnt = t.getRowCnt();\n\t\tvar colCnt = t.getColCnt();\n\t\tvar segments = []; // array of segments to return\n\n\t\t// day offset for given date range\n\t\tvar rangeDayOffsetStart = dateToDayOffset(start);\n\t\tvar rangeDayOffsetEnd = dateToDayOffset(end); // an exclusive value\n\t\tvar endTimeMS = +end.time();\n\t\tif (endTimeMS && endTimeMS >= nextDayThreshold) {\n\t\t\trangeDayOffsetEnd++;\n\t\t}\n\t\trangeDayOffsetEnd = Math.max(rangeDayOffsetEnd, rangeDayOffsetStart + 1);\n\n\t\t// first and last cell offset for the given date range\n\t\t// \"last\" implies inclusivity\n\t\tvar rangeCellOffsetFirst = dayOffsetToCellOffset(rangeDayOffsetStart);\n\t\tvar rangeCellOffsetLast = dayOffsetToCellOffset(rangeDayOffsetEnd) - 1;\n\n\t\t// loop through all the rows in the view\n\t\tfor (var row=0; row<rowCnt; row++) {\n\n\t\t\t// first and last cell offset for the row\n\t\t\tvar rowCellOffsetFirst = row * colCnt;\n\t\t\tvar rowCellOffsetLast = rowCellOffsetFirst + colCnt - 1;\n\n\t\t\t// get the segment's cell offsets by constraining the range's cell offsets to the bounds of the row\n\t\t\tvar segmentCellOffsetFirst = Math.max(rangeCellOffsetFirst, rowCellOffsetFirst);\n\t\t\tvar segmentCellOffsetLast = Math.min(rangeCellOffsetLast, rowCellOffsetLast);\n\n\t\t\t// make sure segment's offsets are valid and in view\n\t\t\tif (segmentCellOffsetFirst <= segmentCellOffsetLast) {\n\n\t\t\t\t// translate to cells\n\t\t\t\tvar segmentCellFirst = cellOffsetToCell(segmentCellOffsetFirst);\n\t\t\t\tvar segmentCellLast = cellOffsetToCell(segmentCellOffsetLast);\n\n\t\t\t\t// view might be RTL, so order by leftmost column\n\t\t\t\tvar cols = [ segmentCellFirst.col, segmentCellLast.col ].sort();\n\n\t\t\t\t// Determine if segment's first/last cell is the beginning/end of the date range.\n\t\t\t\t// We need to compare \"day offset\" because \"cell offsets\" are often ambiguous and\n\t\t\t\t// can translate to multiple days, and an edge case reveals itself when we the\n\t\t\t\t// range's first cell is hidden (we don't want isStart to be true).\n\t\t\t\tvar isStart = cellOffsetToDayOffset(segmentCellOffsetFirst) == rangeDayOffsetStart;\n\t\t\t\tvar isEnd = cellOffsetToDayOffset(segmentCellOffsetLast) + 1 == rangeDayOffsetEnd; // +1 for comparing exclusively\n\n\t\t\t\tsegments.push({\n\t\t\t\t\trow: row,\n\t\t\t\t\tleftCol: cols[0],\n\t\t\t\t\trightCol: cols[1],\n\t\t\t\t\tisStart: isStart,\n\t\t\t\t\tisEnd: isEnd\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\n\t\treturn segments;\n\t}", "function rangeToSegments(start, end) {\n\n\t\tvar rowCnt = t.getRowCnt();\n\t\tvar colCnt = t.getColCnt();\n\t\tvar segments = []; // array of segments to return\n\n\t\t// day offset for given date range\n\t\tvar rangeDayOffsetStart = dateToDayOffset(start);\n\t\tvar rangeDayOffsetEnd = dateToDayOffset(end); // an exclusive value\n\t\tvar endTimeMS = +end.time();\n\t\tif (endTimeMS && endTimeMS >= nextDayThreshold) {\n\t\t\trangeDayOffsetEnd++;\n\t\t}\n\t\trangeDayOffsetEnd = Math.max(rangeDayOffsetEnd, rangeDayOffsetStart + 1);\n\n\t\t// first and last cell offset for the given date range\n\t\t// \"last\" implies inclusivity\n\t\tvar rangeCellOffsetFirst = dayOffsetToCellOffset(rangeDayOffsetStart);\n\t\tvar rangeCellOffsetLast = dayOffsetToCellOffset(rangeDayOffsetEnd) - 1;\n\n\t\t// loop through all the rows in the view\n\t\tfor (var row=0; row<rowCnt; row++) {\n\n\t\t\t// first and last cell offset for the row\n\t\t\tvar rowCellOffsetFirst = row * colCnt;\n\t\t\tvar rowCellOffsetLast = rowCellOffsetFirst + colCnt - 1;\n\n\t\t\t// get the segment's cell offsets by constraining the range's cell offsets to the bounds of the row\n\t\t\tvar segmentCellOffsetFirst = Math.max(rangeCellOffsetFirst, rowCellOffsetFirst);\n\t\t\tvar segmentCellOffsetLast = Math.min(rangeCellOffsetLast, rowCellOffsetLast);\n\n\t\t\t// make sure segment's offsets are valid and in view\n\t\t\tif (segmentCellOffsetFirst <= segmentCellOffsetLast) {\n\n\t\t\t\t// translate to cells\n\t\t\t\tvar segmentCellFirst = cellOffsetToCell(segmentCellOffsetFirst);\n\t\t\t\tvar segmentCellLast = cellOffsetToCell(segmentCellOffsetLast);\n\n\t\t\t\t// view might be RTL, so order by leftmost column\n\t\t\t\tvar cols = [ segmentCellFirst.col, segmentCellLast.col ].sort();\n\n\t\t\t\t// Determine if segment's first/last cell is the beginning/end of the date range.\n\t\t\t\t// We need to compare \"day offset\" because \"cell offsets\" are often ambiguous and\n\t\t\t\t// can translate to multiple days, and an edge case reveals itself when we the\n\t\t\t\t// range's first cell is hidden (we don't want isStart to be true).\n\t\t\t\tvar isStart = cellOffsetToDayOffset(segmentCellOffsetFirst) == rangeDayOffsetStart;\n\t\t\t\tvar isEnd = cellOffsetToDayOffset(segmentCellOffsetLast) + 1 == rangeDayOffsetEnd; // +1 for comparing exclusively\n\n\t\t\t\tsegments.push({\n\t\t\t\t\trow: row,\n\t\t\t\t\tleftCol: cols[0],\n\t\t\t\t\trightCol: cols[1],\n\t\t\t\t\tisStart: isStart,\n\t\t\t\t\tisEnd: isEnd\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\n\t\treturn segments;\n\t}", "function rangeToSegments(startDate, endDate) {\n\t\tvar rowCnt = t.getRowCnt();\n\t\tvar colCnt = t.getColCnt();\n\t\tvar segments = []; // array of segments to return\n\n\t\t// day offset for given date range\n\t\tvar rangeDayOffsetStart = dateToDayOffset(startDate);\n\t\tvar rangeDayOffsetEnd = dateToDayOffset(endDate); // exclusive\n\n\t\t// first and last cell offset for the given date range\n\t\t// \"last\" implies inclusivity\n\t\tvar rangeCellOffsetFirst = dayOffsetToCellOffset(rangeDayOffsetStart);\n\t\tvar rangeCellOffsetLast = dayOffsetToCellOffset(rangeDayOffsetEnd) - 1;\n\n\t\t// loop through all the rows in the view\n\t\tfor (var row=0; row<rowCnt; row++) {\n\n\t\t\t// first and last cell offset for the row\n\t\t\tvar rowCellOffsetFirst = row * colCnt;\n\t\t\tvar rowCellOffsetLast = rowCellOffsetFirst + colCnt - 1;\n\n\t\t\t// get the segment's cell offsets by constraining the range's cell offsets to the bounds of the row\n\t\t\tvar segmentCellOffsetFirst = Math.max(rangeCellOffsetFirst, rowCellOffsetFirst);\n\t\t\tvar segmentCellOffsetLast = Math.min(rangeCellOffsetLast, rowCellOffsetLast);\n\n\t\t\t// make sure segment's offsets are valid and in view\n\t\t\tif (segmentCellOffsetFirst <= segmentCellOffsetLast) {\n\n\t\t\t\t// translate to cells\n\t\t\t\tvar segmentCellFirst = cellOffsetToCell(segmentCellOffsetFirst);\n\t\t\t\tvar segmentCellLast = cellOffsetToCell(segmentCellOffsetLast);\n\n\t\t\t\t// view might be RTL, so order by leftmost column\n\t\t\t\tvar cols = [ segmentCellFirst.col, segmentCellLast.col ].sort();\n\n\t\t\t\t// Determine if segment's first/last cell is the beginning/end of the date range.\n\t\t\t\t// We need to compare \"day offset\" because \"cell offsets\" are often ambiguous and\n\t\t\t\t// can translate to multiple days, and an edge case reveals itself when we the\n\t\t\t\t// range's first cell is hidden (we don't want isStart to be true).\n\t\t\t\tvar isStart = cellOffsetToDayOffset(segmentCellOffsetFirst) == rangeDayOffsetStart;\n\t\t\t\tvar isEnd = cellOffsetToDayOffset(segmentCellOffsetLast) + 1 == rangeDayOffsetEnd; // +1 for comparing exclusively\n\n\t\t\t\tsegments.push({\n\t\t\t\t\trow: row,\n\t\t\t\t\tleftCol: cols[0],\n\t\t\t\t\trightCol: cols[1],\n\t\t\t\t\tisStart: isStart,\n\t\t\t\t\tisEnd: isEnd\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\n\t\treturn segments;\n\t}", "function rangeToSegments(startDate, endDate) {\n\t\tvar rowCnt = t.getRowCnt();\n\t\tvar colCnt = t.getColCnt();\n\t\tvar segments = []; // array of segments to return\n\n\t\t// day offset for given date range\n\t\tvar rangeDayOffsetStart = dateToDayOffset(startDate);\n\t\tvar rangeDayOffsetEnd = dateToDayOffset(endDate); // exclusive\n\n\t\t// first and last cell offset for the given date range\n\t\t// \"last\" implies inclusivity\n\t\tvar rangeCellOffsetFirst = dayOffsetToCellOffset(rangeDayOffsetStart);\n\t\tvar rangeCellOffsetLast = dayOffsetToCellOffset(rangeDayOffsetEnd) - 1;\n\n\t\t// loop through all the rows in the view\n\t\tfor (var row=0; row<rowCnt; row++) {\n\n\t\t\t// first and last cell offset for the row\n\t\t\tvar rowCellOffsetFirst = row * colCnt;\n\t\t\tvar rowCellOffsetLast = rowCellOffsetFirst + colCnt - 1;\n\n\t\t\t// get the segment's cell offsets by constraining the range's cell offsets to the bounds of the row\n\t\t\tvar segmentCellOffsetFirst = Math.max(rangeCellOffsetFirst, rowCellOffsetFirst);\n\t\t\tvar segmentCellOffsetLast = Math.min(rangeCellOffsetLast, rowCellOffsetLast);\n\n\t\t\t// make sure segment's offsets are valid and in view\n\t\t\tif (segmentCellOffsetFirst <= segmentCellOffsetLast) {\n\n\t\t\t\t// translate to cells\n\t\t\t\tvar segmentCellFirst = cellOffsetToCell(segmentCellOffsetFirst);\n\t\t\t\tvar segmentCellLast = cellOffsetToCell(segmentCellOffsetLast);\n\n\t\t\t\t// view might be RTL, so order by leftmost column\n\t\t\t\tvar cols = [ segmentCellFirst.col, segmentCellLast.col ].sort();\n\n\t\t\t\t// Determine if segment's first/last cell is the beginning/end of the date range.\n\t\t\t\t// We need to compare \"day offset\" because \"cell offsets\" are often ambiguous and\n\t\t\t\t// can translate to multiple days, and an edge case reveals itself when we the\n\t\t\t\t// range's first cell is hidden (we don't want isStart to be true).\n\t\t\t\tvar isStart = cellOffsetToDayOffset(segmentCellOffsetFirst) == rangeDayOffsetStart;\n\t\t\t\tvar isEnd = cellOffsetToDayOffset(segmentCellOffsetLast) + 1 == rangeDayOffsetEnd; // +1 for comparing exclusively\n\n\t\t\t\tsegments.push({\n\t\t\t\t\trow: row,\n\t\t\t\t\tleftCol: cols[0],\n\t\t\t\t\trightCol: cols[1],\n\t\t\t\t\tisStart: isStart,\n\t\t\t\t\tisEnd: isEnd\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\n\t\treturn segments;\n\t}", "function rangeToSegments(startDate, endDate) {\n\t\tvar rowCnt = t.getRowCnt();\n\t\tvar colCnt = t.getColCnt();\n\t\tvar segments = []; // array of segments to return\n\n\t\t// day offset for given date range\n\t\tvar rangeDayOffsetStart = dateToDayOffset(startDate);\n\t\tvar rangeDayOffsetEnd = dateToDayOffset(endDate); // exclusive\n\n\t\t// first and last cell offset for the given date range\n\t\t// \"last\" implies inclusivity\n\t\tvar rangeCellOffsetFirst = dayOffsetToCellOffset(rangeDayOffsetStart);\n\t\tvar rangeCellOffsetLast = dayOffsetToCellOffset(rangeDayOffsetEnd) - 1;\n\n\t\t// loop through all the rows in the view\n\t\tfor (var row=0; row<rowCnt; row++) {\n\n\t\t\t// first and last cell offset for the row\n\t\t\tvar rowCellOffsetFirst = row * colCnt;\n\t\t\tvar rowCellOffsetLast = rowCellOffsetFirst + colCnt - 1;\n\n\t\t\t// get the segment's cell offsets by constraining the range's cell offsets to the bounds of the row\n\t\t\tvar segmentCellOffsetFirst = Math.max(rangeCellOffsetFirst, rowCellOffsetFirst);\n\t\t\tvar segmentCellOffsetLast = Math.min(rangeCellOffsetLast, rowCellOffsetLast);\n\n\t\t\t// make sure segment's offsets are valid and in view\n\t\t\tif (segmentCellOffsetFirst <= segmentCellOffsetLast) {\n\n\t\t\t\t// translate to cells\n\t\t\t\tvar segmentCellFirst = cellOffsetToCell(segmentCellOffsetFirst);\n\t\t\t\tvar segmentCellLast = cellOffsetToCell(segmentCellOffsetLast);\n\n\t\t\t\t// view might be RTL, so order by leftmost column\n\t\t\t\tvar cols = [ segmentCellFirst.col, segmentCellLast.col ].sort();\n\n\t\t\t\t// Determine if segment's first/last cell is the beginning/end of the date range.\n\t\t\t\t// We need to compare \"day offset\" because \"cell offsets\" are often ambiguous and\n\t\t\t\t// can translate to multiple days, and an edge case reveals itself when we the\n\t\t\t\t// range's first cell is hidden (we don't want isStart to be true).\n\t\t\t\tvar isStart = cellOffsetToDayOffset(segmentCellOffsetFirst) == rangeDayOffsetStart;\n\t\t\t\tvar isEnd = cellOffsetToDayOffset(segmentCellOffsetLast) + 1 == rangeDayOffsetEnd; // +1 for comparing exclusively\n\n\t\t\t\tsegments.push({\n\t\t\t\t\trow: row,\n\t\t\t\t\tleftCol: cols[0],\n\t\t\t\t\trightCol: cols[1],\n\t\t\t\t\tisStart: isStart,\n\t\t\t\t\tisEnd: isEnd\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\n\t\treturn segments;\n\t}", "function segments(n, segSize) {\n return range(segSize, n, segSize).map(min => [min + 1, Math.min(min + segSize, n)]);\n}", "function Segments(props) {\n var value = props.value,\n children = props.children,\n name = props.name,\n size = props.size,\n onChange = props.onChange,\n className = props.className;\n var classes = (0,_node_modules_classnames_index_js__WEBPACK_IMPORTED_MODULE_2__.default)('kt-segments', className);\n var contextValue = (0,react__WEBPACK_IMPORTED_MODULE_0__.useMemo)(function () {\n return {\n value: value,\n name: name,\n onChange: onChange,\n size: size\n };\n }, [value, name, onChange, size]);\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_context_js__WEBPACK_IMPORTED_MODULE_3__.SegmentsContext.Provider, {\n value: contextValue\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(\"div\", {\n className: classes\n }, children));\n}", "function renderSlotSegs(segs, modifiedEventId) {\n\t\n\t\tvar i, segCnt=segs.length, seg,\n\t\t\tevent,\n\t\t\ttop,\n\t\t\tbottom,\n\t\t\tcolumnLeft,\n\t\t\tcolumnRight,\n\t\t\tcolumnWidth,\n\t\t\twidth,\n\t\t\tleft,\n\t\t\tright,\n\t\t\thtml = '',\n\t\t\teventElements,\n\t\t\teventElement,\n\t\t\ttriggerRes,\n\t\t\ttitleElement,\n\t\t\theight,\n\t\t\tslotSegmentContainer = getSlotSegmentContainer(),\n\t\t\tisRTL = opt('isRTL');\n\t\t\t\n\t\t// calculate position/dimensions, create html\n\t\tfor (i=0; i<segCnt; i++) {\n\t\t\tseg = segs[i];\n\t\t\tevent = seg.event;\n\t\t\ttop = computeDateTop(seg.start, seg.start);\n\t\t\tbottom = computeDateTop(seg.end, seg.start);\n\t\t\tcolumnLeft = colContentLeft(seg.col);\n\t\t\tcolumnRight = colContentRight(seg.col);\n\t\t\tcolumnWidth = columnRight - columnLeft;\n\n\t\t\t// shave off space on right near scrollbars (2.5%)\n\t\t\t// TODO: move this to CSS somehow\n\t\t\tcolumnRight -= columnWidth * .025;\n\t\t\tcolumnWidth = columnRight - columnLeft;\n\n\t\t\twidth = columnWidth * (seg.forwardCoord - seg.backwardCoord);\n\n\t\t\tif (opt('slotEventOverlap')) {\n\t\t\t\t// double the width while making sure resize handle is visible\n\t\t\t\t// (assumed to be 20px wide)\n\t\t\t\twidth = Math.max(\n\t\t\t\t\t(width - (20/2)) * 2,\n\t\t\t\t\twidth // narrow columns will want to make the segment smaller than\n\t\t\t\t\t\t// the natural width. don't allow it\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tif (isRTL) {\n\t\t\t\tright = columnRight - seg.backwardCoord * columnWidth;\n\t\t\t\tleft = right - width;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tleft = columnLeft + seg.backwardCoord * columnWidth;\n\t\t\t\tright = left + width;\n\t\t\t}\n\n\t\t\t// make sure horizontal coordinates are in bounds\n\t\t\tleft = Math.max(left, columnLeft);\n\t\t\tright = Math.min(right, columnRight);\n\t\t\twidth = right - left;\n\n\t\t\tseg.top = top;\n\t\t\tseg.left = left;\n\t\t\tseg.outerWidth = width;\n\t\t\tseg.outerHeight = bottom - top;\n\t\t\thtml += slotSegHtml(event, seg);\n\t\t}\n\n\t\tslotSegmentContainer[0].innerHTML = html; // faster than html()\n\t\teventElements = slotSegmentContainer.children();\n\t\t\n\t\t// retrieve elements, run through eventRender callback, bind event handlers\n\t\tfor (i=0; i<segCnt; i++) {\n\t\t\tseg = segs[i];\n\t\t\tevent = seg.event;\n\t\t\teventElement = $(eventElements[i]); // faster than eq()\n\t\t\ttriggerRes = trigger('eventRender', event, event, eventElement);\n\t\t\tif (triggerRes === false) {\n\t\t\t\teventElement.remove();\n\t\t\t}else{\n\t\t\t\tif (triggerRes && triggerRes !== true) {\n\t\t\t\t\teventElement.remove();\n\t\t\t\t\teventElement = $(triggerRes)\n\t\t\t\t\t\t.css({\n\t\t\t\t\t\t\tposition: 'absolute',\n\t\t\t\t\t\t\ttop: seg.top,\n\t\t\t\t\t\t\tleft: seg.left\n\t\t\t\t\t\t})\n\t\t\t\t\t\t.appendTo(slotSegmentContainer);\n\t\t\t\t}\n\t\t\t\tseg.element = eventElement;\n\t\t\t\tif (event._id === modifiedEventId) {\n\t\t\t\t\tbindSlotSeg(event, eventElement, seg);\n\t\t\t\t}else{\n\t\t\t\t\teventElement[0]._fci = i; // for lazySegBind\n\t\t\t\t}\n\t\t\t\treportEventElement(event, eventElement);\n\t\t\t}\n\t\t}\n\t\t\n\t\tlazySegBind(slotSegmentContainer, segs, bindSlotSeg);\n\t\t\n\t\t// record event sides and title positions\n\t\tfor (i=0; i<segCnt; i++) {\n\t\t\tseg = segs[i];\n\t\t\tif ((eventElement = seg.element)) {\n\t\t\t\tseg.vsides = vsides(eventElement, true);\n\t\t\t\tseg.hsides = hsides(eventElement, true);\n\t\t\t\ttitleElement = eventElement.find('.fc-event-title');\n\t\t\t\tif (titleElement.length) {\n\t\t\t\t\tseg.contentTop = titleElement[0].offsetTop;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t// set all positions/dimensions at once\n\t\tfor (i=0; i<segCnt; i++) {\n\t\t\tseg = segs[i];\n\t\t\tif ((eventElement = seg.element)) {\n\t\t\t\teventElement[0].style.width = Math.max(0, seg.outerWidth - seg.hsides) + 'px';\n\t\t\t\theight = Math.max(0, seg.outerHeight - seg.vsides);\n\t\t\t\teventElement[0].style.height = height + 'px';\n\t\t\t\tevent = seg.event;\n\t\t\t\tif (seg.contentTop !== undefined && height - seg.contentTop < 10) {\n\t\t\t\t\t// not enough room for title, put it in the time (TODO: maybe make both display:inline instead)\n\t\t\t\t\teventElement.find('div.fc-event-time')\n\t\t\t\t\t\t.text(\n\t\t\t\t\t\t\tformatDate(event.start, opt('timeFormat')) + ' - ' + event.title\n\t\t\t\t\t\t);\n\t\t\t\t\teventElement.find('div.fc-event-title')\n\t\t\t\t\t\t.remove();\n\t\t\t\t}\n\t\t\t\ttrigger('eventAfterRender', event, event, eventElement);\n\t\t\t}\n\t\t}\n\t\t\t\t\t\n\t}", "function renderSlotSegs(segs, modifiedEventId) {\n\t\n\t\tvar i, segCnt=segs.length, seg,\n\t\t\tevent,\n\t\t\ttop,\n\t\t\tbottom,\n\t\t\tcolumnLeft,\n\t\t\tcolumnRight,\n\t\t\tcolumnWidth,\n\t\t\twidth,\n\t\t\tleft,\n\t\t\tright,\n\t\t\thtml = '',\n\t\t\teventElements,\n\t\t\teventElement,\n\t\t\ttriggerRes,\n\t\t\ttitleElement,\n\t\t\theight,\n\t\t\tslotSegmentContainer = getSlotSegmentContainer(),\n\t\t\tisRTL = opt('isRTL');\n\t\t\t\n\t\t// calculate position/dimensions, create html\n\t\tfor (i=0; i<segCnt; i++) {\n\t\t\tseg = segs[i];\n\t\t\tevent = seg.event;\n\t\t\ttop = computeDateTop(seg.start, seg.start);\n\t\t\tbottom = computeDateTop(seg.end, seg.start);\n\t\t\tcolumnLeft = colContentLeft(seg.col);\n\t\t\tcolumnRight = colContentRight(seg.col);\n\t\t\tcolumnWidth = columnRight - columnLeft;\n\n\t\t\t// shave off space on right near scrollbars (2.5%)\n\t\t\t// TODO: move this to CSS somehow\n\t\t\tcolumnRight -= columnWidth * .025;\n\t\t\tcolumnWidth = columnRight - columnLeft;\n\n\t\t\twidth = columnWidth * (seg.forwardCoord - seg.backwardCoord);\n\n\t\t\tif (opt('slotEventOverlap')) {\n\t\t\t\t// double the width while making sure resize handle is visible\n\t\t\t\t// (assumed to be 20px wide)\n\t\t\t\twidth = Math.max(\n\t\t\t\t\t(width - (20/2)) * 2,\n\t\t\t\t\twidth // narrow columns will want to make the segment smaller than\n\t\t\t\t\t\t// the natural width. don't allow it\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tif (isRTL) {\n\t\t\t\tright = columnRight - seg.backwardCoord * columnWidth;\n\t\t\t\tleft = right - width;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tleft = columnLeft + seg.backwardCoord * columnWidth;\n\t\t\t\tright = left + width;\n\t\t\t}\n\n\t\t\t// make sure horizontal coordinates are in bounds\n\t\t\tleft = Math.max(left, columnLeft);\n\t\t\tright = Math.min(right, columnRight);\n\t\t\twidth = right - left;\n\n\t\t\tseg.top = top;\n\t\t\tseg.left = left;\n\t\t\tseg.outerWidth = width;\n\t\t\tseg.outerHeight = bottom - top;\n\t\t\thtml += slotSegHtml(event, seg);\n\t\t}\n\n\t\tslotSegmentContainer[0].innerHTML = html; // faster than html()\n\t\teventElements = slotSegmentContainer.children();\n\t\t\n\t\t// retrieve elements, run through eventRender callback, bind event handlers\n\t\tfor (i=0; i<segCnt; i++) {\n\t\t\tseg = segs[i];\n\t\t\tevent = seg.event;\n\t\t\teventElement = $(eventElements[i]); // faster than eq()\n\t\t\ttriggerRes = trigger('eventRender', event, event, eventElement);\n\t\t\tif (triggerRes === false) {\n\t\t\t\teventElement.remove();\n\t\t\t}else{\n\t\t\t\tif (triggerRes && triggerRes !== true) {\n\t\t\t\t\teventElement.remove();\n\t\t\t\t\teventElement = $(triggerRes)\n\t\t\t\t\t\t.css({\n\t\t\t\t\t\t\tposition: 'absolute',\n\t\t\t\t\t\t\ttop: seg.top,\n\t\t\t\t\t\t\tleft: seg.left\n\t\t\t\t\t\t})\n\t\t\t\t\t\t.appendTo(slotSegmentContainer);\n\t\t\t\t}\n\t\t\t\tseg.element = eventElement;\n\t\t\t\tif (event._id === modifiedEventId) {\n\t\t\t\t\tbindSlotSeg(event, eventElement, seg);\n\t\t\t\t}else{\n\t\t\t\t\teventElement[0]._fci = i; // for lazySegBind\n\t\t\t\t}\n\t\t\t\treportEventElement(event, eventElement);\n\t\t\t}\n\t\t}\n\t\t\n\t\tlazySegBind(slotSegmentContainer, segs, bindSlotSeg);\n\t\t\n\t\t// record event sides and title positions\n\t\tfor (i=0; i<segCnt; i++) {\n\t\t\tseg = segs[i];\n\t\t\tif ((eventElement = seg.element)) {\n\t\t\t\tseg.vsides = vsides(eventElement, true);\n\t\t\t\tseg.hsides = hsides(eventElement, true);\n\t\t\t\ttitleElement = eventElement.find('.fc-event-title');\n\t\t\t\tif (titleElement.length) {\n\t\t\t\t\tseg.contentTop = titleElement[0].offsetTop;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t// set all positions/dimensions at once\n\t\tfor (i=0; i<segCnt; i++) {\n\t\t\tseg = segs[i];\n\t\t\tif ((eventElement = seg.element)) {\n\t\t\t\teventElement[0].style.width = Math.max(0, seg.outerWidth - seg.hsides) + 'px';\n\t\t\t\theight = Math.max(0, seg.outerHeight - seg.vsides);\n\t\t\t\teventElement[0].style.height = height + 'px';\n\t\t\t\tevent = seg.event;\n\t\t\t\tif (seg.contentTop !== undefined && height - seg.contentTop < 10) {\n\t\t\t\t\t// not enough room for title, put it in the time (TODO: maybe make both display:inline instead)\n\t\t\t\t\teventElement.find('div.fc-event-time')\n\t\t\t\t\t\t.text(\n\t\t\t\t\t\t\tformatDate(event.start, opt('timeFormat')) + ' - ' + event.title\n\t\t\t\t\t\t);\n\t\t\t\t\teventElement.find('div.fc-event-title')\n\t\t\t\t\t\t.remove();\n\t\t\t\t}\n\t\t\t\ttrigger('eventAfterRender', event, event, eventElement);\n\t\t\t}\n\t\t}\n\t\t\t\t\t\n\t}", "function renderSlotSegs(segs, modifiedEventId) {\n\t\n\t\tvar i, segCnt=segs.length, seg,\n\t\t\tevent,\n\t\t\ttop,\n\t\t\tbottom,\n\t\t\tcolumnLeft,\n\t\t\tcolumnRight,\n\t\t\tcolumnWidth,\n\t\t\twidth,\n\t\t\tleft,\n\t\t\tright,\n\t\t\thtml = '',\n\t\t\teventElements,\n\t\t\teventElement,\n\t\t\ttriggerRes,\n\t\t\ttitleElement,\n\t\t\theight,\n\t\t\tslotSegmentContainer = getSlotSegmentContainer(),\n\t\t\tisRTL = opt('isRTL');\n\t\t\t\n\t\t// calculate position/dimensions, create html\n\t\tfor (i=0; i<segCnt; i++) {\n\t\t\tseg = segs[i];\n\t\t\tevent = seg.event;\n\t\t\ttop = computeDateTop(seg.start, seg.start);\n\t\t\tbottom = computeDateTop(seg.end, seg.start);\n\t\t\tcolumnLeft = colContentLeft(seg.col);\n\t\t\tcolumnRight = colContentRight(seg.col);\n\t\t\tcolumnWidth = columnRight - columnLeft;\n\n\t\t\t// shave off space on right near scrollbars (2.5%)\n\t\t\t// TODO: move this to CSS somehow\n\t\t\tcolumnRight -= columnWidth * .025;\n\t\t\tcolumnWidth = columnRight - columnLeft;\n\n\t\t\twidth = columnWidth * (seg.forwardCoord - seg.backwardCoord);\n\n\t\t\tif (opt('slotEventOverlap')) {\n\t\t\t\t// double the width while making sure resize handle is visible\n\t\t\t\t// (assumed to be 20px wide)\n\t\t\t\twidth = Math.max(\n\t\t\t\t\t(width - (20/2)) * 2,\n\t\t\t\t\twidth // narrow columns will want to make the segment smaller than\n\t\t\t\t\t\t// the natural width. don't allow it\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tif (isRTL) {\n\t\t\t\tright = columnRight - seg.backwardCoord * columnWidth;\n\t\t\t\tleft = right - width;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tleft = columnLeft + seg.backwardCoord * columnWidth;\n\t\t\t\tright = left + width;\n\t\t\t}\n\n\t\t\t// make sure horizontal coordinates are in bounds\n\t\t\tleft = Math.max(left, columnLeft);\n\t\t\tright = Math.min(right, columnRight);\n\t\t\twidth = right - left;\n\n\t\t\tseg.top = top;\n\t\t\tseg.left = left;\n\t\t\tseg.outerWidth = width;\n\t\t\tseg.outerHeight = bottom - top;\n\t\t\thtml += slotSegHtml(event, seg);\n\t\t}\n\n\t\tslotSegmentContainer[0].innerHTML = html; // faster than html()\n\t\teventElements = slotSegmentContainer.children();\n\t\t\n\t\t// retrieve elements, run through eventRender callback, bind event handlers\n\t\tfor (i=0; i<segCnt; i++) {\n\t\t\tseg = segs[i];\n\t\t\tevent = seg.event;\n\t\t\teventElement = $(eventElements[i]); // faster than eq()\n\t\t\ttriggerRes = trigger('eventRender', event, event, eventElement);\n\t\t\tif (triggerRes === false) {\n\t\t\t\teventElement.remove();\n\t\t\t}else{\n\t\t\t\tif (triggerRes && triggerRes !== true) {\n\t\t\t\t\teventElement.remove();\n\t\t\t\t\teventElement = $(triggerRes)\n\t\t\t\t\t\t.css({\n\t\t\t\t\t\t\tposition: 'absolute',\n\t\t\t\t\t\t\ttop: seg.top,\n\t\t\t\t\t\t\tleft: seg.left\n\t\t\t\t\t\t})\n\t\t\t\t\t\t.appendTo(slotSegmentContainer);\n\t\t\t\t}\n\t\t\t\tseg.element = eventElement;\n\t\t\t\tif (event._id === modifiedEventId) {\n\t\t\t\t\tbindSlotSeg(event, eventElement, seg);\n\t\t\t\t}else{\n\t\t\t\t\teventElement[0]._fci = i; // for lazySegBind\n\t\t\t\t}\n\t\t\t\treportEventElement(event, eventElement);\n\t\t\t}\n\t\t}\n\t\t\n\t\tlazySegBind(slotSegmentContainer, segs, bindSlotSeg);\n\t\t\n\t\t// record event sides and title positions\n\t\tfor (i=0; i<segCnt; i++) {\n\t\t\tseg = segs[i];\n\t\t\tif ((eventElement = seg.element)) {\n\t\t\t\tseg.vsides = vsides(eventElement, true);\n\t\t\t\tseg.hsides = hsides(eventElement, true);\n\t\t\t\ttitleElement = eventElement.find('.fc-event-title');\n\t\t\t\tif (titleElement.length) {\n\t\t\t\t\tseg.contentTop = titleElement[0].offsetTop;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t// set all positions/dimensions at once\n\t\tfor (i=0; i<segCnt; i++) {\n\t\t\tseg = segs[i];\n\t\t\tif ((eventElement = seg.element)) {\n\t\t\t\teventElement[0].style.width = Math.max(0, seg.outerWidth - seg.hsides) + 'px';\n\t\t\t\theight = Math.max(0, seg.outerHeight - seg.vsides);\n\t\t\t\teventElement[0].style.height = height + 'px';\n\t\t\t\tevent = seg.event;\n\t\t\t\tif (seg.contentTop !== undefined && height - seg.contentTop < 10) {\n\t\t\t\t\t// not enough room for title, put it in the time (TODO: maybe make both display:inline instead)\n\t\t\t\t\teventElement.find('div.fc-event-time')\n\t\t\t\t\t\t.text(\n\t\t\t\t\t\t\tformatDate(event.start, opt('timeFormat')) + ' - ' + event.title\n\t\t\t\t\t\t);\n\t\t\t\t\teventElement.find('div.fc-event-title')\n\t\t\t\t\t\t.remove();\n\t\t\t\t}\n\t\t\t\ttrigger('eventAfterRender', event, event, eventElement);\n\t\t\t}\n\t\t}\n\t\t\t\t\t\n\t}", "function renderSlotSegs(segs, modifiedEventId) {\n\t\n\t\tvar i, segCnt=segs.length, seg,\n\t\t\tevent,\n\t\t\ttop,\n\t\t\tbottom,\n\t\t\tcolumnLeft,\n\t\t\tcolumnRight,\n\t\t\tcolumnWidth,\n\t\t\twidth,\n\t\t\tleft,\n\t\t\tright,\n\t\t\thtml = '',\n\t\t\teventElements,\n\t\t\teventElement,\n\t\t\ttriggerRes,\n\t\t\ttitleElement,\n\t\t\theight,\n\t\t\tslotSegmentContainer = getSlotSegmentContainer(),\n\t\t\tisRTL = opt('isRTL');\n\t\t\t\n\t\t// calculate position/dimensions, create html\n\t\tfor (i=0; i<segCnt; i++) {\n\t\t\tseg = segs[i];\n\t\t\tevent = seg.event;\n\t\t\ttop = timePosition(seg.start, seg.start);\n\t\t\tbottom = timePosition(seg.start, seg.end);\n\t\t\tcolumnLeft = colContentLeft(seg.col);\n\t\t\tcolumnRight = colContentRight(seg.col);\n\t\t\tcolumnWidth = columnRight - columnLeft;\n\n\t\t\t// shave off space on right near scrollbars (2.5%)\n\t\t\t// TODO: move this to CSS somehow\n\t\t\tcolumnRight -= columnWidth * .025;\n\t\t\tcolumnWidth = columnRight - columnLeft;\n\n\t\t\twidth = columnWidth * (seg.forwardCoord - seg.backwardCoord);\n\n\t\t\tif (opt('slotEventOverlap')) {\n\t\t\t\t// double the width while making sure resize handle is visible\n\t\t\t\t// (assumed to be 20px wide)\n\t\t\t\twidth = Math.max(\n\t\t\t\t\t(width - (20/2)) * 2,\n\t\t\t\t\twidth // narrow columns will want to make the segment smaller than\n\t\t\t\t\t\t// the natural width. don't allow it\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tif (isRTL) {\n\t\t\t\tright = columnRight - seg.backwardCoord * columnWidth;\n\t\t\t\tleft = right - width;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tleft = columnLeft + seg.backwardCoord * columnWidth;\n\t\t\t\tright = left + width;\n\t\t\t}\n\n\t\t\t// make sure horizontal coordinates are in bounds\n\t\t\tleft = Math.max(left, columnLeft);\n\t\t\tright = Math.min(right, columnRight);\n\t\t\twidth = right - left;\n\n\t\t\tseg.top = top;\n\t\t\tseg.left = left;\n\t\t\tseg.outerWidth = width;\n\t\t\tseg.outerHeight = bottom - top;\n\t\t\thtml += slotSegHtml(event, seg);\n\t\t}\n\n\t\tslotSegmentContainer[0].innerHTML = html; // faster than html()\n\t\teventElements = slotSegmentContainer.children();\n\t\t\n\t\t// retrieve elements, run through eventRender callback, bind event handlers\n\t\tfor (i=0; i<segCnt; i++) {\n\t\t\tseg = segs[i];\n\t\t\tevent = seg.event;\n\t\t\teventElement = $(eventElements[i]); // faster than eq()\n\t\t\ttriggerRes = trigger('eventRender', event, event, eventElement);\n\t\t\tif (triggerRes === false) {\n\t\t\t\teventElement.remove();\n\t\t\t}else{\n\t\t\t\tif (triggerRes && triggerRes !== true) {\n\t\t\t\t\teventElement.remove();\n\t\t\t\t\teventElement = $(triggerRes)\n\t\t\t\t\t\t.css({\n\t\t\t\t\t\t\tposition: 'absolute',\n\t\t\t\t\t\t\ttop: seg.top,\n\t\t\t\t\t\t\tleft: seg.left\n\t\t\t\t\t\t})\n\t\t\t\t\t\t.appendTo(slotSegmentContainer);\n\t\t\t\t}\n\t\t\t\tseg.element = eventElement;\n\t\t\t\tif (event._id === modifiedEventId) {\n\t\t\t\t\tbindSlotSeg(event, eventElement, seg);\n\t\t\t\t}else{\n\t\t\t\t\teventElement[0]._fci = i; // for lazySegBind\n\t\t\t\t}\n\t\t\t\treportEventElement(event, eventElement);\n\t\t\t}\n\t\t}\n\t\t\n\t\tlazySegBind(slotSegmentContainer, segs, bindSlotSeg);\n\t\t\n\t\t// record event sides and title positions\n\t\tfor (i=0; i<segCnt; i++) {\n\t\t\tseg = segs[i];\n\t\t\tif (eventElement = seg.element) {\n\t\t\t\tseg.vsides = vsides(eventElement, true);\n\t\t\t\tseg.hsides = hsides(eventElement, true);\n\t\t\t\ttitleElement = eventElement.find('.fc-event-title');\n\t\t\t\tif (titleElement.length) {\n\t\t\t\t\tseg.contentTop = titleElement[0].offsetTop;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t// set all positions/dimensions at once\n\t\tfor (i=0; i<segCnt; i++) {\n\t\t\tseg = segs[i];\n\t\t\tif (eventElement = seg.element) {\n\t\t\t\teventElement[0].style.width = Math.max(0, seg.outerWidth - seg.hsides) + 'px';\n\t\t\t\theight = Math.max(0, seg.outerHeight - seg.vsides);\n\t\t\t\teventElement[0].style.height = height + 'px';\n\t\t\t\tevent = seg.event;\n\t\t\t\tif (seg.contentTop !== undefined && height - seg.contentTop < 10) {\n\t\t\t\t\t// not enough room for title, put it in the time (TODO: maybe make both display:inline instead)\n\t\t\t\t\teventElement.find('div.fc-event-time')\n\t\t\t\t\t\t.text(formatDate(event.start, opt('timeFormat')) + ' - ' + event.title);\n\t\t\t\t\teventElement.find('div.fc-event-title')\n\t\t\t\t\t\t.remove();\n\t\t\t\t}\n\t\t\t\ttrigger('eventAfterRender', event, event, eventElement);\n\t\t\t}\n\t\t}\n\t\t\t\t\t\n\t}", "function renderSlotSegs(segs, modifiedEventId) {\n\t\n\t\tvar i, segCnt=segs.length, seg,\n\t\t\tevent,\n\t\t\ttop,\n\t\t\tbottom,\n\t\t\tcolumnLeft,\n\t\t\tcolumnRight,\n\t\t\tcolumnWidth,\n\t\t\twidth,\n\t\t\tleft,\n\t\t\tright,\n\t\t\thtml = '',\n\t\t\teventElements,\n\t\t\teventElement,\n\t\t\ttriggerRes,\n\t\t\ttitleElement,\n\t\t\theight,\n\t\t\tslotSegmentContainer = getSlotSegmentContainer(),\n\t\t\tisRTL = opt('isRTL');\n\t\t\t\n\t\t// calculate position/dimensions, create html\n\t\tfor (i=0; i<segCnt; i++) {\n\t\t\tseg = segs[i];\n\t\t\tevent = seg.event;\n\t\t\ttop = timePosition(seg.start, seg.start);\n\t\t\tbottom = timePosition(seg.start, seg.end);\n\t\t\tcolumnLeft = colContentLeft(seg.col);\n\t\t\tcolumnRight = colContentRight(seg.col);\n\t\t\tcolumnWidth = columnRight - columnLeft;\n\n\t\t\t// shave off space on right near scrollbars (2.5%)\n\t\t\t// TODO: move this to CSS somehow\n\t\t\tcolumnRight -= columnWidth * .025;\n\t\t\tcolumnWidth = columnRight - columnLeft;\n\n\t\t\twidth = columnWidth * (seg.forwardCoord - seg.backwardCoord);\n\n\t\t\tif (opt('slotEventOverlap')) {\n\t\t\t\t// double the width while making sure resize handle is visible\n\t\t\t\t// (assumed to be 20px wide)\n\t\t\t\twidth = Math.max(\n\t\t\t\t\t(width - (20/2)) * 2,\n\t\t\t\t\twidth // narrow columns will want to make the segment smaller than\n\t\t\t\t\t\t// the natural width. don't allow it\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tif (isRTL) {\n\t\t\t\tright = columnRight - seg.backwardCoord * columnWidth;\n\t\t\t\tleft = right - width;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tleft = columnLeft + seg.backwardCoord * columnWidth;\n\t\t\t\tright = left + width;\n\t\t\t}\n\n\t\t\t// make sure horizontal coordinates are in bounds\n\t\t\tleft = Math.max(left, columnLeft);\n\t\t\tright = Math.min(right, columnRight);\n\t\t\twidth = right - left;\n\n\t\t\tseg.top = top;\n\t\t\tseg.left = left;\n\t\t\tseg.outerWidth = width;\n\t\t\tseg.outerHeight = bottom - top;\n\t\t\thtml += slotSegHtml(event, seg);\n\t\t}\n\n\t\tslotSegmentContainer[0].innerHTML = html; // faster than html()\n\t\teventElements = slotSegmentContainer.children();\n\t\t\n\t\t// retrieve elements, run through eventRender callback, bind event handlers\n\t\tfor (i=0; i<segCnt; i++) {\n\t\t\tseg = segs[i];\n\t\t\tevent = seg.event;\n\t\t\teventElement = $(eventElements[i]); // faster than eq()\n\t\t\ttriggerRes = trigger('eventRender', event, event, eventElement);\n\t\t\tif (triggerRes === false) {\n\t\t\t\teventElement.remove();\n\t\t\t}else{\n\t\t\t\tif (triggerRes && triggerRes !== true) {\n\t\t\t\t\teventElement.remove();\n\t\t\t\t\teventElement = $(triggerRes)\n\t\t\t\t\t\t.css({\n\t\t\t\t\t\t\tposition: 'absolute',\n\t\t\t\t\t\t\ttop: seg.top,\n\t\t\t\t\t\t\tleft: seg.left\n\t\t\t\t\t\t})\n\t\t\t\t\t\t.appendTo(slotSegmentContainer);\n\t\t\t\t}\n\t\t\t\tseg.element = eventElement;\n\t\t\t\tif (event._id === modifiedEventId) {\n\t\t\t\t\tbindSlotSeg(event, eventElement, seg);\n\t\t\t\t}else{\n\t\t\t\t\teventElement[0]._fci = i; // for lazySegBind\n\t\t\t\t}\n\t\t\t\treportEventElement(event, eventElement);\n\t\t\t}\n\t\t}\n\t\t\n\t\tlazySegBind(slotSegmentContainer, segs, bindSlotSeg);\n\t\t\n\t\t// record event sides and title positions\n\t\tfor (i=0; i<segCnt; i++) {\n\t\t\tseg = segs[i];\n\t\t\tif (eventElement = seg.element) {\n\t\t\t\tseg.vsides = vsides(eventElement, true);\n\t\t\t\tseg.hsides = hsides(eventElement, true);\n\t\t\t\ttitleElement = eventElement.find('.fc-event-title');\n\t\t\t\tif (titleElement.length) {\n\t\t\t\t\tseg.contentTop = titleElement[0].offsetTop;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t// set all positions/dimensions at once\n\t\tfor (i=0; i<segCnt; i++) {\n\t\t\tseg = segs[i];\n\t\t\tif (eventElement = seg.element) {\n\t\t\t\teventElement[0].style.width = Math.max(0, seg.outerWidth - seg.hsides) + 'px';\n\t\t\t\theight = Math.max(0, seg.outerHeight - seg.vsides);\n\t\t\t\teventElement[0].style.height = height + 'px';\n\t\t\t\tevent = seg.event;\n\t\t\t\tif (seg.contentTop !== undefined && height - seg.contentTop < 10) {\n\t\t\t\t\t// not enough room for title, put it in the time (TODO: maybe make both display:inline instead)\n\t\t\t\t\teventElement.find('div.fc-event-time')\n\t\t\t\t\t\t.text(formatDate(event.start, opt('timeFormat')) + ' - ' + event.title);\n\t\t\t\t\teventElement.find('div.fc-event-title')\n\t\t\t\t\t\t.remove();\n\t\t\t\t}\n\t\t\t\ttrigger('eventAfterRender', event, event, eventElement);\n\t\t\t}\n\t\t}\n\t\t\t\t\t\n\t}", "function renderSlotSegs(segs, modifiedEventId) {\n\t\n\t\tvar i, segCnt=segs.length, seg,\n\t\t\tevent,\n\t\t\ttop,\n\t\t\tbottom,\n\t\t\tcolumnLeft,\n\t\t\tcolumnRight,\n\t\t\tcolumnWidth,\n\t\t\twidth,\n\t\t\tleft,\n\t\t\tright,\n\t\t\thtml = '',\n\t\t\teventElements,\n\t\t\teventElement,\n\t\t\ttriggerRes,\n\t\t\ttitleElement,\n\t\t\theight,\n\t\t\tslotSegmentContainer = getSlotSegmentContainer(),\n\t\t\tisRTL = opt('isRTL');\n\t\t\t\n\t\t// calculate position/dimensions, create html\n\t\tfor (i=0; i<segCnt; i++) {\n\t\t\tseg = segs[i];\n\t\t\tevent = seg.event;\n\t\t\ttop = timePosition(seg.start, seg.start);\n\t\t\tbottom = timePosition(seg.start, seg.end);\n\t\t\tcolumnLeft = colContentLeft(seg.col);\n\t\t\tcolumnRight = colContentRight(seg.col);\n\t\t\tcolumnWidth = columnRight - columnLeft;\n\n\t\t\t// shave off space on right near scrollbars (2.5%)\n\t\t\t// TODO: move this to CSS somehow\n\t\t\tcolumnRight -= columnWidth * .025;\n\t\t\tcolumnWidth = columnRight - columnLeft;\n\n\t\t\twidth = columnWidth * (seg.forwardCoord - seg.backwardCoord);\n\n\t\t\tif (opt('slotEventOverlap')) {\n\t\t\t\t// double the width while making sure resize handle is visible\n\t\t\t\t// (assumed to be 20px wide)\n\t\t\t\twidth = Math.max(\n\t\t\t\t\t(width - (20/2)) * 2,\n\t\t\t\t\twidth // narrow columns will want to make the segment smaller than\n\t\t\t\t\t\t// the natural width. don't allow it\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tif (isRTL) {\n\t\t\t\tright = columnRight - seg.backwardCoord * columnWidth;\n\t\t\t\tleft = right - width;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tleft = columnLeft + seg.backwardCoord * columnWidth;\n\t\t\t\tright = left + width;\n\t\t\t}\n\n\t\t\t// make sure horizontal coordinates are in bounds\n\t\t\tleft = Math.max(left, columnLeft);\n\t\t\tright = Math.min(right, columnRight);\n\t\t\twidth = right - left;\n\n\t\t\tseg.top = top;\n\t\t\tseg.left = left;\n\t\t\tseg.outerWidth = width;\n\t\t\tseg.outerHeight = bottom - top;\n\t\t\thtml += slotSegHtml(event, seg);\n\t\t}\n\n\t\tslotSegmentContainer[0].innerHTML = html; // faster than html()\n\t\teventElements = slotSegmentContainer.children();\n\t\t\n\t\t// retrieve elements, run through eventRender callback, bind event handlers\n\t\tfor (i=0; i<segCnt; i++) {\n\t\t\tseg = segs[i];\n\t\t\tevent = seg.event;\n\t\t\teventElement = $(eventElements[i]); // faster than eq()\n\t\t\ttriggerRes = trigger('eventRender', event, event, eventElement);\n\t\t\tif (triggerRes === false) {\n\t\t\t\teventElement.remove();\n\t\t\t}else{\n\t\t\t\tif (triggerRes && triggerRes !== true) {\n\t\t\t\t\teventElement.remove();\n\t\t\t\t\teventElement = $(triggerRes)\n\t\t\t\t\t\t.css({\n\t\t\t\t\t\t\tposition: 'absolute',\n\t\t\t\t\t\t\ttop: seg.top,\n\t\t\t\t\t\t\tleft: seg.left\n\t\t\t\t\t\t})\n\t\t\t\t\t\t.appendTo(slotSegmentContainer);\n\t\t\t\t}\n\t\t\t\tseg.element = eventElement;\n\t\t\t\tif (event._id === modifiedEventId) {\n\t\t\t\t\tbindSlotSeg(event, eventElement, seg);\n\t\t\t\t}else{\n\t\t\t\t\teventElement[0]._fci = i; // for lazySegBind\n\t\t\t\t}\n\t\t\t\treportEventElement(event, eventElement);\n\t\t\t}\n\t\t}\n\t\t\n\t\tlazySegBind(slotSegmentContainer, segs, bindSlotSeg);\n\t\t\n\t\t// record event sides and title positions\n\t\tfor (i=0; i<segCnt; i++) {\n\t\t\tseg = segs[i];\n\t\t\tif (eventElement = seg.element) {\n\t\t\t\tseg.vsides = vsides(eventElement, true);\n\t\t\t\tseg.hsides = hsides(eventElement, true);\n\t\t\t\ttitleElement = eventElement.find('.fc-event-title');\n\t\t\t\tif (titleElement.length) {\n\t\t\t\t\tseg.contentTop = titleElement[0].offsetTop;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t// set all positions/dimensions at once\n\t\tfor (i=0; i<segCnt; i++) {\n\t\t\tseg = segs[i];\n\t\t\tif (eventElement = seg.element) {\n\t\t\t\teventElement[0].style.width = Math.max(0, seg.outerWidth - seg.hsides) + 'px';\n\t\t\t\theight = Math.max(0, seg.outerHeight - seg.vsides);\n\t\t\t\teventElement[0].style.height = height + 'px';\n\t\t\t\tevent = seg.event;\n\t\t\t\tif (seg.contentTop !== undefined && height - seg.contentTop < 10) {\n\t\t\t\t\t// not enough room for title, put it in the time (TODO: maybe make both display:inline instead)\n\t\t\t\t\teventElement.find('div.fc-event-time')\n\t\t\t\t\t\t.text(formatDate(event.start, opt('timeFormat')) + ' - ' + event.title);\n\t\t\t\t\teventElement.find('div.fc-event-title')\n\t\t\t\t\t\t.remove();\n\t\t\t\t}\n\t\t\t\ttrigger('eventAfterRender', event, event, eventElement);\n\t\t\t}\n\t\t}\n\t\t\t\t\t\n\t}", "function split(array, segments) {\n segments = segments || 2;\n\n var output = [],\n segmentLength = Math.floor(array.length / segments),\n remainder = array.length % segments,\n start = 0,\n i = 0,\n n = array.length,\n len;\n\n while (start < n) {\n len = i++ < remainder ? segmentLength + 1 : segmentLength;\n output.push(array.slice(start, start + len));\n start += len;\n }\n\n return output;\n }", "listSegments(marker, options = {}) {\n return tslib.__asyncGenerator(this, arguments, function* listSegments_1() {\n let listContainersSegmentResponse;\n if (!!marker || marker === undefined) {\n do {\n listContainersSegmentResponse = yield tslib.__await(this.listContainersSegment(marker, options));\n listContainersSegmentResponse.containerItems =\n listContainersSegmentResponse.containerItems || [];\n marker = listContainersSegmentResponse.continuationToken;\n yield yield tslib.__await(yield tslib.__await(listContainersSegmentResponse));\n } while (marker);\n }\n });\n }", "listSegments(marker, options = {}) {\n return tslib.__asyncGenerator(this, arguments, function* listSegments_1() {\n let listContainersSegmentResponse;\n if (!!marker || marker === undefined) {\n do {\n listContainersSegmentResponse = yield tslib.__await(this.listContainersSegment(marker, options));\n listContainersSegmentResponse.containerItems =\n listContainersSegmentResponse.containerItems || [];\n marker = listContainersSegmentResponse.continuationToken;\n yield yield tslib.__await(yield tslib.__await(listContainersSegmentResponse));\n } while (marker);\n }\n });\n }", "function computeSegHorizontals(segs, eventOrderSpecs) {\n // IMPORTANT TO CLEAR OLD RESULTS :(\n for (var _i = 0, segs_2 = segs; _i < segs_2.length; _i++) {\n var seg = segs_2[_i];\n seg.level = null;\n seg.forwardCoord = null;\n seg.backwardCoord = null;\n seg.forwardPressure = null;\n }\n\n segs = Object(_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__[\"sortEventSegs\"])(segs, eventOrderSpecs);\n var level0;\n var levels = buildSlotSegLevels(segs);\n computeForwardSlotSegs(levels);\n\n if (level0 = levels[0]) {\n for (var _a = 0, level0_1 = level0; _a < level0_1.length; _a++) {\n var seg = level0_1[_a];\n computeSlotSegPressures(seg);\n }\n\n for (var _b = 0, level0_2 = level0; _b < level0_2.length; _b++) {\n var seg = level0_2[_b];\n computeSegForwardBack(seg, 0, 0, eventOrderSpecs);\n }\n }\n\n return segs;\n } // Builds an array of segments \"levels\". The first level will be the leftmost tier of segments if the calendar is", "formatSegments (isProtein) {\n\t\tvar variants = isProtein ? this.attributes.variantDataProtein : this.attributes.variantDataDna;\n\t\tvar sequences = isProtein ? this.attributes.alignedProteinSequences : this.attributes.alignedDnaSequences;\n\t\t// make sure they're sorted by start\n\t\tvariants = _.sortBy(variants, d => {\n\t\t\treturn d.start;\n\t\t});\n\n\t\t// merge segments\n\t\tvar mergedSegments = _.reduce(variants, (memo, d) => {\n\t\t\treturn this._mergeOrAddSegment(memo, d);\n\t\t}, []);\n\n\t\t// add in needed summarized segments\n\t\t// first one\n\t\tif (mergedSegments[0].start > 1) {\n\t\t\tmergedSegments.push({\n\t\t\t\tvisible: false,\n\t\t\t\tstart: 1,\n\t\t\t\tend: mergedSegments[0].start\n\t\t\t});\n\t\t}\n\t\t// loop through and connect visible segments with summarized segments\n\t\tvar _visibleSegments = _.where(mergedSegments, { visible: true });\n\t\t_visibleSegments.forEach( (d, i) => {\n\t\t\t// must not be last or visible\n\t\t\tif (d.visible && i < _visibleSegments.length - 1) {\n\t\t\t\tmergedSegments.push({\n\t\t\t\t\tvisible: false,\n\t\t\t\t\tstart: d.end,\n\t\t\t\t\tend: _visibleSegments[i + 1].start\n\t\t\t\t});\n\t\t\t}\n\t\t});\n\t\t\n\t\tvar _last = _.max(mergedSegments, d => { return d.end; });\n\t\tvar _maxLength = _.max(sequences, d => { return d.sequence.length; }).sequence.length;\n\t\t// add last if last segment is visible and not at the end\n\t\tif (_last.end < _maxLength) {\n\t\t\tmergedSegments.push({\n\t\t\t\tstart: _last.end,\n\t\t\t\tend: _maxLength,\n\t\t\t\tvisible: false\n\t\t\t});\n\t\t// add last if visible\n\t\t} else {\n\t\t\tmergedSegments.push({\n\t\t\t\tstart: _last.end,\n\t\t\t\tend: _maxLength + 1,\n\t\t\t\tvisible: true\n\t\t\t});\n\t\t}\n\t\t\n\t\t// change starts and ends to domains\n\t\tmergedSegments = _.map(mergedSegments, d => {\n\t\t\td.domain = [d.start, d.end];\n\t\t\treturn d;\n\t\t});\n\t\t// sort\n\t\tmergedSegments = _.sortBy(mergedSegments, d => {\n\t\t\treturn d.start;\n\t\t});\n\t\treturn mergedSegments;\n\t}", "function resliceDaySegs(segs, dayDate, colIndex) {\n var dayStart = dayDate;\n var dayEnd = common.addDays(dayStart, 1);\n var dayRange = { start: dayStart, end: dayEnd };\n var newSegs = [];\n for (var _i = 0, segs_2 = segs; _i < segs_2.length; _i++) {\n var seg = segs_2[_i];\n var eventRange = seg.eventRange;\n var origRange = eventRange.range;\n var slicedRange = common.intersectRanges(origRange, dayRange);\n if (slicedRange) {\n newSegs.push(\n tslib.__assign(tslib.__assign({}, seg), {\n firstCol: colIndex,\n lastCol: colIndex,\n eventRange: {\n def: eventRange.def,\n ui: tslib.__assign(tslib.__assign({}, eventRange.ui), {\n durationEditable: false,\n }),\n instance: eventRange.instance,\n range: slicedRange,\n },\n isStart:\n seg.isStart &&\n slicedRange.start.valueOf() === origRange.start.valueOf(),\n isEnd:\n seg.isEnd && slicedRange.end.valueOf() === origRange.end.valueOf(),\n })\n );\n }\n }\n return newSegs;\n}", "function addSegEndsFromSequences(){\n //Add all the starting segEnds and internal segJoins\n for(var i=0;i<seqArr.length;i++){\n var length=parseInt(seqArr[i]['length']),\n seqId=seqArr[i]['id'];\n segEndArr[segEndArr.length]=[seqId,0,'POS_STRAND']\n segEndArr[segEndArr.length]=[seqId,length-1,'NEG_STRAND']\n segJoinArr[segJoinArr.length]=[[seqId,0,'POS_STRAND'],[seqId,length-1,'NEG_STRAND'],'internal',length]\n }\n segmentize();\n}", "function resliceDaySegs(segs, dayDate, colIndex) {\n var dayStart = dayDate;\n var dayEnd = addDays(dayStart, 1);\n var dayRange = { start: dayStart, end: dayEnd };\n var newSegs = [];\n for (var _i = 0, segs_2 = segs; _i < segs_2.length; _i++) {\n var seg = segs_2[_i];\n var eventRange = seg.eventRange;\n var origRange = eventRange.range;\n var slicedRange = intersectRanges(origRange, dayRange);\n if (slicedRange) {\n newSegs.push(__assign(__assign({}, seg), {\n firstCol: colIndex, lastCol: colIndex, eventRange: {\n def: eventRange.def,\n ui: __assign(__assign({}, eventRange.ui), { durationEditable: false }),\n instance: eventRange.instance,\n range: slicedRange,\n }, isStart: seg.isStart && slicedRange.start.valueOf() === origRange.start.valueOf(), isEnd: seg.isEnd && slicedRange.end.valueOf() === origRange.end.valueOf()\n }));\n }\n }\n return newSegs;\n }", "function traceSegment(options) {\n var segments = [];\n var segCollector = [];\n // inject interceptor\n Object(_interceptors_xhr__WEBPACK_IMPORTED_MODULE_1__[\"default\"])();\n Object(_interceptors_fetch__WEBPACK_IMPORTED_MODULE_5__[\"default\"])();\n window.addEventListener('xhrReadyStateChange', function (event) {\n var segment = {\n traceId: '',\n service: options.service + _services_constant__WEBPACK_IMPORTED_MODULE_4__[\"ServiceTag\"],\n spans: [],\n serviceInstance: options.serviceVersion,\n traceSegmentId: '',\n };\n var xhrState = event.detail.readyState;\n var config = event.detail.getRequestConfig;\n var url = {};\n if (config[1].startsWith('http://') || config[1].startsWith('https://') || config[1].startsWith('//')) {\n url = new URL(config[1]);\n }\n else {\n url = new URL(window.location.href);\n url.pathname = config[1];\n }\n if ([_services_constant__WEBPACK_IMPORTED_MODULE_4__[\"ReportTypes\"].ERROR, _services_constant__WEBPACK_IMPORTED_MODULE_4__[\"ReportTypes\"].PERF, _services_constant__WEBPACK_IMPORTED_MODULE_4__[\"ReportTypes\"].SEGMENTS].includes(url.pathname) &&\n !options.traceSDKInternal) {\n return;\n }\n // The values of xhrState are from https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest/readyState\n if (xhrState === _services_constant__WEBPACK_IMPORTED_MODULE_4__[\"ReadyStatus\"].OPENED) {\n var traceId = Object(_services_uuid__WEBPACK_IMPORTED_MODULE_2__[\"default\"])();\n var traceSegmentId = Object(_services_uuid__WEBPACK_IMPORTED_MODULE_2__[\"default\"])();\n segCollector.push({\n event: event.detail,\n startTime: new Date().getTime(),\n traceId: traceId,\n traceSegmentId: traceSegmentId,\n });\n var traceIdStr = String(Object(js_base64__WEBPACK_IMPORTED_MODULE_0__[\"encode\"])(traceId));\n var segmentId = String(Object(js_base64__WEBPACK_IMPORTED_MODULE_0__[\"encode\"])(traceSegmentId));\n var service = String(Object(js_base64__WEBPACK_IMPORTED_MODULE_0__[\"encode\"])(segment.service));\n var instance = String(Object(js_base64__WEBPACK_IMPORTED_MODULE_0__[\"encode\"])(segment.serviceInstance));\n var endpoint = String(Object(js_base64__WEBPACK_IMPORTED_MODULE_0__[\"encode\"])(options.pagePath));\n var peer = String(Object(js_base64__WEBPACK_IMPORTED_MODULE_0__[\"encode\"])(url.host));\n var index = segment.spans.length;\n var values = 1 + \"-\" + traceIdStr + \"-\" + segmentId + \"-\" + index + \"-\" + service + \"-\" + instance + \"-\" + endpoint + \"-\" + peer;\n event.detail.setRequestHeader('sw8', values);\n }\n if (xhrState === _services_constant__WEBPACK_IMPORTED_MODULE_4__[\"ReadyStatus\"].DONE) {\n var endTime = new Date().getTime();\n for (var i = 0; i < segCollector.length; i++) {\n if (segCollector[i].event.readyState === _services_constant__WEBPACK_IMPORTED_MODULE_4__[\"ReadyStatus\"].DONE) {\n var url_1 = {};\n if (segCollector[i].event.status) {\n url_1 = new URL(segCollector[i].event.responseURL);\n }\n var exitSpan = {\n operationName: options.pagePath,\n startTime: segCollector[i].startTime,\n endTime: endTime,\n spanId: segment.spans.length,\n spanLayer: _services_constant__WEBPACK_IMPORTED_MODULE_4__[\"SpanLayer\"],\n spanType: _services_constant__WEBPACK_IMPORTED_MODULE_4__[\"SpanType\"],\n isError: event.detail.status === 0 || event.detail.status >= 400 ? true : false,\n parentSpanId: segment.spans.length - 1,\n componentId: _services_constant__WEBPACK_IMPORTED_MODULE_4__[\"ComponentId\"],\n peer: url_1.host,\n tags: options.detailMode\n ? [\n {\n key: 'http.method',\n value: config[0],\n },\n {\n key: 'url',\n value: segCollector[i].event.responseURL,\n },\n ]\n : undefined,\n };\n segment = __assign(__assign({}, segment), { traceId: segCollector[i].traceId, traceSegmentId: segCollector[i].traceSegmentId });\n segment.spans.push(exitSpan);\n segCollector.splice(i, 1);\n }\n }\n segments.push(segment);\n }\n });\n window.onbeforeunload = function (e) {\n if (!segments.length) {\n return;\n }\n new _services_report__WEBPACK_IMPORTED_MODULE_3__[\"default\"]('SEGMENTS', options.collector).sendByXhr(segments);\n };\n //report per 5min\n setInterval(function () {\n if (!segments.length) {\n return;\n }\n new _services_report__WEBPACK_IMPORTED_MODULE_3__[\"default\"]('SEGMENTS', options.collector).sendByXhr(segments);\n segments = [];\n }, 300000);\n }", "listSegments(marker, options = {}) {\n return tslib.__asyncGenerator(this, arguments, function* listSegments_1() {\n let listBlobsFlatSegmentResponse;\n if (!!marker || marker === undefined) {\n do {\n listBlobsFlatSegmentResponse = yield tslib.__await(this.listBlobFlatSegment(marker, options));\n marker = listBlobsFlatSegmentResponse.continuationToken;\n yield yield tslib.__await(yield tslib.__await(listBlobsFlatSegmentResponse));\n } while (marker);\n }\n });\n }", "listSegments(marker, options = {}) {\n return tslib.__asyncGenerator(this, arguments, function* listSegments_1() {\n let listBlobsFlatSegmentResponse;\n if (!!marker || marker === undefined) {\n do {\n listBlobsFlatSegmentResponse = yield tslib.__await(this.listBlobFlatSegment(marker, options));\n marker = listBlobsFlatSegmentResponse.continuationToken;\n yield yield tslib.__await(yield tslib.__await(listBlobsFlatSegmentResponse));\n } while (marker);\n }\n });\n }", "computeControlSegments() {\n if (this.controlSteps.length) {\n this.controlSegments = [];\n let segment = { start : 0, end : 0, human : this.controlSteps[0] }\n for (let i = 0; i < this.controlSteps.length; ++i) {\n const humanStep = this.controlSteps[i];\n if (humanStep != segment.human) {\n this.controlSegments.push(segment);\n segment = { start : i, end : i, human : humanStep };\n } else {\n segment.end = i;\n }\n }\n this.controlSegments.push(segment);\n }\n }", "function createRegions() {\n regions = [];\n\n var fullWidth = absolute(timelineController.timeExtents[1]);\n var chunkWidth = 500;\n var chunks = Math.ceil(fullWidth / chunkWidth);\n var offset = 0;\n\n // avoid creating lots of chunks - cap and only generate around the\n // current view\n // if we scroll out of bounds of the chunks we *do* have, we can throw\n // away our regions + purge regions in memory\n if (chunks > 30) {\n var startX = absolute(timelineController.viewExtents[0]);\n var endX = absolute(timelineController.viewExtents[1]);\n var midX = startX + (endX - startX) / 2;\n\n chunks = 50;\n offset = Math.max(0, midX - (chunkWidth * 15));\n }\n\n for (var i = 0; i < chunks; i++) {\n // for each desired chunk, find the bounds and managed data points\n // then, calculate positions for each data point\n var w = Math.min(fullWidth - offset, chunkWidth);\n var min = absolute.invert(offset);\n var max = absolute.invert(offset + w);\n var data = timelineController.dstatInBounds(min, max);\n\n regions.push({\n x: offset, width: w, min: min, max: max,\n data: data,\n c: null,\n dirty: true,\n index: regions.length\n });\n\n offset += w;\n }\n }", "function split(array, segments) {\n\t segments = segments || 2;\n\t var results = [];\n\t if (array == null) {\n\t return results;\n\t }\n\n\t var minLength = Math.floor(array.length / segments),\n\t remainder = array.length % segments,\n\t i = 0,\n\t len = array.length,\n\t segmentIndex = 0,\n\t segmentLength;\n\n\t while (i < len) {\n\t segmentLength = minLength;\n\t if (segmentIndex < remainder) {\n\t segmentLength++;\n\t }\n\n\t results.push(array.slice(i, i + segmentLength));\n\n\t segmentIndex++;\n\t i += segmentLength;\n\t }\n\n\t return results;\n\t }", "getSegmentIds() {\n return _.keys(this.mapping);\n }", "function randomSegments(n, min, max, gapmin, gapmax) {\n var segments = [];\n var x = 0;\n var addInterval = function () {\n var len = (Math.random() * (max - min)) + min;\n segments.push({ start: x, end: x + len });\n x += len;\n };\n var addGap = function () {\n x += (Math.random() * (gapmax - gapmin)) + gapmin;\n };\n if (Math.random() > 0.5) {\n addGap();\n }\n for (var i = 0; i < n; i++) {\n addInterval();\n addGap();\n }\n return segments;\n}", "function eventStoreToRanges$1(eventStore) {\n var instances = eventStore.instances;\n var ranges = [];\n for (var instanceId in instances) {\n ranges.push(instances[instanceId].range);\n }\n return ranges;\n }", "function selectSegments(numOfColumns) {\n const segments = [];\n const secondSegments = [];\n\n for(let i=0; i<numOfColumns; i++){\n segments.push(document.querySelector(`.${createColumnsName().segmentsName[i]}`));\n secondSegments.push(document.querySelector(`.${createColumnsName().secondSegmentsName[i]}`));\n }\n\n return {segments, secondSegments}\n}", "function n(a){var b,c,d,e=M(),f=[];\n// group segments by row\nfor(b=0;b<a.length;b++)c=a[b],d=c.row,c.element&&(// was rendered?\nf[d]?\n// already other segments. append to array\nf[d].push(c):\n// first segment in row. create new array\nf[d]=[c]);\n// sort each row\nfor(d=0;d<e;d++)f[d]=o(f[d]||[]);return f}", "function GetClipSegments(clip_intervals, block_size, hop_size, x_length) {\n var clip_segments = [];\n var num_clip_segments = 0;\n\n var in_segment = false;\n var start_idx = 0;\n var stop_idx = start_idx + block_size - 1;\n var block_idx = 0;\n\n var segment_start_idx = -1;\n var segment_stop_idx = -1;\n while(stop_idx < x_length) {\n // We are in a segment.\n if(in_segment) {\n // We leave the segment. Store it and move on.\n if(!AreOverlapping(clip_intervals, start_idx, stop_idx)) {\n in_segment = false;\n segment_stop_idx = block_idx - 1;\n\n var new_segment = { start:segment_start_idx , stop:segment_stop_idx };\n clip_segments[num_clip_segments] = new_segment;\n num_clip_segments++;\n\n segment_start_idx = -1;\n segment_stop_idx = -1;\n }\n }\n // We are not in a segment.\n else {\n // We have entered a segment.\n if(AreOverlapping(clip_intervals, start_idx, stop_idx)) {\n in_segment = true;\n segment_start_idx = block_idx;\n }\n }\n\n block_idx++;\n start_idx = start_idx + hop_size;\n stop_idx = start_idx + block_size - 1;\n }\n\n // If we end while in a segment, we need to leave the segment and push the segment.\n if(in_segment) {\n in_segment = false;\n segment_stop_idx = block_idx - 1;\n\n var new_segment = { start:segment_start_idx , stop:segment_stop_idx };\n clip_segments[num_clip_segments] = new_segment;\n num_clip_segments++;\n\n segment_start_idx = -1;\n segment_stop_idx = -1;\n }\n\n return clip_segments;\n }", "function groupSegsByDay(segs) {\n var segsByDay = []; // sparse array\n var i;\n var seg;\n for (i = 0; i < segs.length; i += 1) {\n seg = segs[i];\n (segsByDay[seg.dayIndex] || (segsByDay[seg.dayIndex] = []))\n .push(seg);\n }\n return segsByDay;\n }", "async listPageRangesSegment(offset = 0, count, marker, options = {}) {\n var _a;\n const { span, updatedOptions } = createSpan(\"PageBlobClient-getPageRangesSegment\", options);\n try {\n return await this.pageBlobContext.getPageRanges(Object.assign({ abortSignal: options.abortSignal, leaseAccessConditions: options.conditions, modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), range: rangeToString({ offset, count }), marker: marker, maxPageSize: options.maxPageSize }, convertTracingToRequestOptionsBase(updatedOptions)));\n }\n catch (e) {\n span.setStatus({\n code: coreTracing.SpanStatusCode.ERROR,\n message: e.message,\n });\n throw e;\n }\n finally {\n span.end();\n }\n }", "async listPageRangesSegment(offset = 0, count, marker, options = {}) {\n var _a;\n const { span, updatedOptions } = createSpan(\"PageBlobClient-getPageRangesSegment\", options);\n try {\n return await this.pageBlobContext.getPageRanges(Object.assign({ abortSignal: options.abortSignal, leaseAccessConditions: options.conditions, modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), range: rangeToString({ offset, count }), marker: marker, maxPageSize: options.maxPageSize }, convertTracingToRequestOptionsBase(updatedOptions)));\n }\n catch (e) {\n span.setStatus({\n code: coreTracing.SpanStatusCode.ERROR,\n message: e.message,\n });\n throw e;\n }\n finally {\n span.end();\n }\n }", "function createSegmentsArray(subPolygon) {\n // Q1. Declare the \"segments\" multidimensional array\n segments = [];\n // Q2. Create \"points\" array consisting of anchor points comprising the subPolygon polygon\n points = [];\n for (var j = 0; j < subPolygon.pathPoints.length; j++) {\n points.push(subPolygon.pathPoints[j].anchor);\n }\n var n = points.length;\n // Q3. Append first segment\n P0 = points[n-1];\n P1 = points[0]; // First point of line segment\n P2 = points[1]; // Second point of line segment\n P3 = points[2];\n appendSegmentsArray(P0, P1, P2, P3);\n // Q4. Append middle segments\n for (var j = 1; j < n-2; j++) {\n P0 = points[j-1];\n P1 = points[j]; // First point of line segment\n P2 = points[j+1]; // Second point of line segment\n P3 = points[j+2];\n appendSegmentsArray(P0, P1, P2, P3);\n }\n // Q5. Append second to last segment\n P0 = points[n-3];\n P1 = points[n-2]; // First point of line segment\n P2 = points[n-1]; // Second point of line segment\n P3 = points[0];\n appendSegmentsArray(P0, P1, P2, P3);\n // Q6. Append last segment \n P0 = points[n-2];\n P1 = points[n-1]; // First point of line segment\n P2 = points[0]; // Second point of line segment\n P3 = points[1];\n appendSegmentsArray(P0, P1, P2, P3); \n}", "function getSelectedSegments(report) {\n var segments = [];\n if(report.segmentation) {\n report.tab.find('.segment-' + report.segmentation + ' .segment-toggle:checked').each(function() {\n segments.push($(this).val());\n });\n }\n return segments;\n}", "function computeSegCoords(segs, dayDate, slatCoords, eventMinHeight, eventOrderSpecs) {\n computeSegVerticals(segs, dayDate, slatCoords, eventMinHeight);\n return computeSegHorizontals(segs, eventOrderSpecs); // requires top/bottom from computeSegVerticals\n } // For each segment in an array, computes and assigns its top and bottom properties", "function buildHTMLForSegment(segment) {\n\t\tvar html = '';\n\t\tvar isRTL = opt('isRTL');\n\t\tvar event = segment.event;\n\t\tvar url = event.url;\n\n\t\t// generate the list of CSS classNames\n\t\tvar classNames = [ 'fc-event', 'fc-event-hori' ];\n\t\tif (isEventDraggable(event)) {\n\t\t\tclassNames.push('fc-event-draggable');\n\t\t}\n\t\tif (segment.isStart) {\n\t\t\tclassNames.push('fc-event-start');\n\t\t}\n\t\tif (segment.isEnd) {\n\t\t\tclassNames.push('fc-event-end');\n\t\t}\n\t\t// use the event's configured classNames\n\t\t// guaranteed to be an array via `normalizeEvent`\n\t\tclassNames = classNames.concat(event.className);\n\t\tif (event.source) {\n\t\t\t// use the event's source's classNames, if specified\n\t\t\tclassNames = classNames.concat(event.source.className || []);\n\t\t}\n\n\t\t// generate a semicolon delimited CSS string for any of the \"skin\" properties\n\t\t// of the event object (`backgroundColor`, `borderColor` and such)\n\t\tvar skinCss = getSkinCss(event, opt);\n\n\t\tif (url) {\n\t\t\thtml += \"<a href='\" + htmlEscape(url) + \"'\";\n\t\t}else{\n\t\t\thtml += \"<div\";\n\t\t}\n\t\thtml +=\n\t\t\t\" class='\" + classNames.join(' ') + \"'\" +\n\t\t\t\" style=\" +\n\t\t\t\t\"'\" +\n\t\t\t\t\"position:absolute;\" +\n\t\t\t\t\"left:\" + segment.left + \"px;\" +\n\t\t\t\tskinCss +\n\t\t\t\t\"'\" +\n\t\t\t\">\" +\n\t\t\t\"<div class='fc-event-inner'>\";\n\t\tif (!event.allDay && segment.isStart) {\n\t\t\thtml +=\n\t\t\t\t\"<span class='fc-event-time'>\" +\n\t\t\t\thtmlEscape(\n\t\t\t\t\tformatDates(event.start, event.end, opt('timeFormat'))\n\t\t\t\t) +\n\t\t\t\t\"</span>\";\n\t\t}\n\t\thtml +=\n\t\t\t\"<span class='fc-event-title'>\" +\n\t\t\thtmlEscape(event.title || '') +\n\t\t\t\"</span>\" +\n\t\t\t\"</div>\";\n\t\tif (segment.isEnd && isEventResizable(event)) {\n\t\t\thtml +=\n\t\t\t\t\"<div class='ui-resizable-handle ui-resizable-\" + (isRTL ? 'w' : 'e') + \"'>\" +\n\t\t\t\t\"&nbsp;&nbsp;&nbsp;\" + // makes hit area a lot better for IE6/7\n\t\t\t\t\"</div>\";\n\t\t}\n\t\thtml += \"</\" + (url ? \"a\" : \"div\") + \">\";\n\n\t\t// TODO:\n\t\t// When these elements are initially rendered, they will be briefly visibile on the screen,\n\t\t// even though their widths/heights are not set.\n\t\t// SOLUTION: initially set them as visibility:hidden ?\n\n\t\treturn html;\n\t}", "function buildHTMLForSegment(segment) {\n\t\tvar html = '';\n\t\tvar isRTL = opt('isRTL');\n\t\tvar event = segment.event;\n\t\tvar url = event.url;\n\n\t\t// generate the list of CSS classNames\n\t\tvar classNames = [ 'fc-event', 'fc-event-hori' ];\n\t\tif (isEventDraggable(event)) {\n\t\t\tclassNames.push('fc-event-draggable');\n\t\t}\n\t\tif (segment.isStart) {\n\t\t\tclassNames.push('fc-event-start');\n\t\t}\n\t\tif (segment.isEnd) {\n\t\t\tclassNames.push('fc-event-end');\n\t\t}\n\t\t// use the event's configured classNames\n\t\t// guaranteed to be an array via `normalizeEvent`\n\t\tclassNames = classNames.concat(event.className);\n\t\tif (event.source) {\n\t\t\t// use the event's source's classNames, if specified\n\t\t\tclassNames = classNames.concat(event.source.className || []);\n\t\t}\n\n\t\t// generate a semicolon delimited CSS string for any of the \"skin\" properties\n\t\t// of the event object (`backgroundColor`, `borderColor` and such)\n\t\tvar skinCss = getSkinCss(event, opt);\n\n\t\tif (url) {\n\t\t\thtml += \"<a href='\" + htmlEscape(url) + \"'\";\n\t\t}else{\n\t\t\thtml += \"<div\";\n\t\t}\n\t\thtml +=\n\t\t\t\" class='\" + classNames.join(' ') + \"'\" +\n\t\t\t\" style=\" +\n\t\t\t\t\"'\" +\n\t\t\t\t\"position:absolute;\" +\n\t\t\t\t\"left:\" + segment.left + \"px;\" +\n\t\t\t\tskinCss +\n\t\t\t\t\"'\" +\n\t\t\t\">\" +\n\t\t\t\"<div class='fc-event-inner'>\";\n\t\tif (!event.allDay && segment.isStart) {\n\t\t\thtml +=\n\t\t\t\t\"<span class='fc-event-time'>\" +\n\t\t\t\thtmlEscape(\n\t\t\t\t\tformatDates(event.start, event.end, opt('timeFormat'))\n\t\t\t\t) +\n\t\t\t\t\"</span>\";\n\t\t}\n\t\thtml +=\n\t\t\t\"<span class='fc-event-title'>\" +\n\t\t\thtmlEscape(event.title || '') +\n\t\t\t\"</span>\" +\n\t\t\t\"</div>\";\n\t\tif (segment.isEnd && isEventResizable(event)) {\n\t\t\thtml +=\n\t\t\t\t\"<div class='ui-resizable-handle ui-resizable-\" + (isRTL ? 'w' : 'e') + \"'>\" +\n\t\t\t\t\"   \" + // makes hit area a lot better for IE6/7\n\t\t\t\t\"</div>\";\n\t\t}\n\t\thtml += \"</\" + (url ? \"a\" : \"div\") + \">\";\n\n\t\t// TODO:\n\t\t// When these elements are initially rendered, they will be briefly visibile on the screen,\n\t\t// even though their widths/heights are not set.\n\t\t// SOLUTION: initially set them as visibility:hidden ?\n\n\t\treturn html;\n\t}", "function buildHTMLForSegment(segment) {\n\t\tvar html = '';\n\t\tvar isRTL = opt('isRTL');\n\t\tvar event = segment.event;\n\t\tvar url = event.url;\n\n\t\t// generate the list of CSS classNames\n\t\tvar classNames = [ 'fc-event', 'fc-event-hori' ];\n\t\tif (isEventDraggable(event)) {\n\t\t\tclassNames.push('fc-event-draggable');\n\t\t}\n\t\tif (segment.isStart) {\n\t\t\tclassNames.push('fc-event-start');\n\t\t}\n\t\tif (segment.isEnd) {\n\t\t\tclassNames.push('fc-event-end');\n\t\t}\n\t\t// use the event's configured classNames\n\t\t// guaranteed to be an array via `normalizeEvent`\n\t\tclassNames = classNames.concat(event.className);\n\t\tif (event.source) {\n\t\t\t// use the event's source's classNames, if specified\n\t\t\tclassNames = classNames.concat(event.source.className || []);\n\t\t}\n\n\t\t// generate a semicolon delimited CSS string for any of the \"skin\" properties\n\t\t// of the event object (`backgroundColor`, `borderColor` and such)\n\t\tvar skinCss = getSkinCss(event, opt);\n\n\t\tif (url) {\n\t\t\thtml += \"<a href='\" + htmlEscape(url) + \"'\";\n\t\t}else{\n\t\t\thtml += \"<div\";\n\t\t}\n\t\thtml +=\n\t\t\t\" class='\" + classNames.join(' ') + \"'\" +\n\t\t\t\" style=\" +\n\t\t\t\t\"'\" +\n\t\t\t\t\"position:absolute;\" +\n\t\t\t\t\"left:\" + segment.left + \"px;\" +\n\t\t\t\tskinCss +\n\t\t\t\t\"'\" +\n\t\t\t\">\" +\n\t\t\t\"<div class='fc-event-inner'>\";\n\t\tif (!event.allDay && segment.isStart) {\n\t\t\thtml +=\n\t\t\t\t\"<span class='fc-event-time'>\" +\n\t\t\t\thtmlEscape(\n\t\t\t\t\tformatDates(event.start, event.end, opt('timeFormat'))\n\t\t\t\t) +\n\t\t\t\t\"</span>\";\n\t\t}\n\t\thtml +=\n\t\t\t\"<span class='fc-event-title'>\" +\n\t\t\thtmlEscape(event.title || '') +\n\t\t\t\"</span>\" +\n\t\t\t\"</div>\";\n\t\tif (segment.isEnd && isEventResizable(event)) {\n\t\t\thtml +=\n\t\t\t\t\"<div class='ui-resizable-handle ui-resizable-\" + (isRTL ? 'w' : 'e') + \"'>\" +\n\t\t\t\t\"&nbsp;&nbsp;&nbsp;\" + // makes hit area a lot better for IE6/7\n\t\t\t\t\"</div>\";\n\t\t}\n\t\thtml += \"</\" + (url ? \"a\" : \"div\") + \">\";\n\n\t\t// TODO:\n\t\t// When these elements are initially rendered, they will be briefly visibile on the screen,\n\t\t// even though their widths/heights are not set.\n\t\t// SOLUTION: initially set them as visibility:hidden ?\n\n\t\treturn html;\n\t}", "function buildHTMLForSegment(segment) {\n\t\tvar html = '';\n\t\tvar isRTL = opt('isRTL');\n\t\tvar event = segment.event;\n\t\tvar url = event.url;\n\n\t\t// generate the list of CSS classNames\n\t\tvar classNames = [ 'fc-event', 'fc-event-hori' ];\n\t\tif (isEventDraggable(event)) {\n\t\t\tclassNames.push('fc-event-draggable');\n\t\t}\n\t\tif (segment.isStart) {\n\t\t\tclassNames.push('fc-event-start');\n\t\t}\n\t\tif (segment.isEnd) {\n\t\t\tclassNames.push('fc-event-end');\n\t\t}\n\t\t// use the event's configured classNames\n\t\t// guaranteed to be an array via `buildEvent`\n\t\tclassNames = classNames.concat(event.className);\n\t\tif (event.source) {\n\t\t\t// use the event's source's classNames, if specified\n\t\t\tclassNames = classNames.concat(event.source.className || []);\n\t\t}\n\n\t\t// generate a semicolon delimited CSS string for any of the \"skin\" properties\n\t\t// of the event object (`backgroundColor`, `borderColor` and such)\n\t\tvar skinCss = getSkinCss(event, opt);\n\n\t\tif (url) {\n\t\t\thtml += \"<a href='\" + htmlEscape(url) + \"'\";\n\t\t}else{\n\t\t\thtml += \"<div\";\n\t\t}\n\t\thtml +=\n\t\t\t\" class='\" + classNames.join(' ') + \"'\" +\n\t\t\t\" style=\" +\n\t\t\t\t\"'\" +\n\t\t\t\t\"position:absolute;\" +\n\t\t\t\t\"left:\" + segment.left + \"px;\" +\n\t\t\t\tskinCss +\n\t\t\t\t\"'\" +\n\t\t\t\">\" +\n\t\t\t\"<div class='fc-event-inner'>\";\n\t\tif (!event.allDay && segment.isStart) {\n\t\t\thtml +=\n\t\t\t\t\"<span class='fc-event-time'>\" +\n\t\t\t\thtmlEscape(t.getEventTimeText(event)) +\n\t\t\t\t\"</span>\";\n\t\t}\n\t\thtml +=\n\t\t\t\"<span class='fc-event-title'>\" +\n\t\t\thtmlEscape(event.title || '') +\n\t\t\t\"</span>\" +\n\t\t\t\"</div>\";\n\t\tif (event.allDay && segment.isEnd && isEventResizable(event)) {\n\t\t\thtml +=\n\t\t\t\t\"<div class='ui-resizable-handle ui-resizable-\" + (isRTL ? 'w' : 'e') + \"'>\" +\n\t\t\t\t\"&nbsp;&nbsp;&nbsp;\" + // makes hit area a lot better for IE6/7\n\t\t\t\t\"</div>\";\n\t\t}\n\t\thtml += \"</\" + (url ? \"a\" : \"div\") + \">\";\n\n\t\t// TODO:\n\t\t// When these elements are initially rendered, they will be briefly visibile on the screen,\n\t\t// even though their widths/heights are not set.\n\t\t// SOLUTION: initially set them as visibility:hidden ?\n\n\t\treturn html;\n\t}", "function eventStoreToRanges(eventStore) {\n var instances = eventStore.instances;\n var ranges = [];\n for (var instanceId in instances) {\n ranges.push(instances[instanceId].range);\n }\n return ranges;\n }", "function eventStoreToRanges(eventStore) {\n var instances = eventStore.instances;\n var ranges = [];\n for (var instanceId in instances) {\n ranges.push(instances[instanceId].range);\n }\n return ranges;\n }", "function eventStoreToRanges(eventStore) {\n var instances = eventStore.instances;\n var ranges = [];\n for (var instanceId in instances) {\n ranges.push(instances[instanceId].range);\n }\n return ranges;\n }", "function eventStoreToRanges(eventStore) {\n var instances = eventStore.instances;\n var ranges = [];\n for (var instanceId in instances) {\n ranges.push(instances[instanceId].range);\n }\n return ranges;\n }", "function buildViewArray(cm, from, to) {\n\t\t var array = [], nextPos;\n\t\t for (var pos = from; pos < to; pos = nextPos) {\n\t\t var view = new LineView(cm.doc, getLine(cm.doc, pos), pos);\n\t\t nextPos = pos + view.size;\n\t\t array.push(view);\n\t\t }\n\t\t return array;\n\t\t }", "function buildViewArray(cm, from, to) {\n var array = [], nextPos;\n for (var pos = from; pos < to; pos = nextPos) {\n var view = new LineView(cm.doc, getLine(cm.doc, pos), pos);\n nextPos = pos + view.size;\n array.push(view);\n }\n return array\n }", "function buildViewArray(cm, from, to) {\n var array = [], nextPos;\n for (var pos = from; pos < to; pos = nextPos) {\n var view = new LineView(cm.doc, getLine(cm.doc, pos), pos);\n nextPos = pos + view.size;\n array.push(view);\n }\n return array\n }", "function buildViewArray(cm, from, to) {\n var array = [], nextPos;\n for (var pos = from; pos < to; pos = nextPos) {\n var view = new LineView(cm.doc, getLine(cm.doc, pos), pos);\n nextPos = pos + view.size;\n array.push(view);\n }\n return array\n }", "function buildViewArray(cm, from, to) {\n var array = [], nextPos;\n for (var pos = from; pos < to; pos = nextPos) {\n var view = new LineView(cm.doc, getLine(cm.doc, pos), pos);\n nextPos = pos + view.size;\n array.push(view);\n }\n return array\n }", "function buildViewArray(cm, from, to) {\n var array = [], nextPos;\n for (var pos = from; pos < to; pos = nextPos) {\n var view = new LineView(cm.doc, getLine(cm.doc, pos), pos);\n nextPos = pos + view.size;\n array.push(view);\n }\n return array\n }", "function buildViewArray(cm, from, to) {\n var array = [], nextPos;\n for (var pos = from; pos < to; pos = nextPos) {\n var view = new LineView(cm.doc, getLine(cm.doc, pos), pos);\n nextPos = pos + view.size;\n array.push(view);\n }\n return array\n }", "function buildViewArray(cm, from, to) {\n var array = [], nextPos;\n for (var pos = from; pos < to; pos = nextPos) {\n var view = new LineView(cm.doc, getLine(cm.doc, pos), pos);\n nextPos = pos + view.size;\n array.push(view);\n }\n return array\n }", "function buildViewArray(cm, from, to) {\n var array = [], nextPos;\n for (var pos = from; pos < to; pos = nextPos) {\n var view = new LineView(cm.doc, getLine(cm.doc, pos), pos);\n nextPos = pos + view.size;\n array.push(view);\n }\n return array\n }", "function buildViewArray(cm, from, to) {\n var array = [], nextPos;\n for (var pos = from; pos < to; pos = nextPos) {\n var view = new LineView(cm.doc, getLine(cm.doc, pos), pos);\n nextPos = pos + view.size;\n array.push(view);\n }\n return array\n }", "function buildViewArray(cm, from, to) {\n var array = [], nextPos;\n for (var pos = from; pos < to; pos = nextPos) {\n var view = new LineView(cm.doc, getLine(cm.doc, pos), pos);\n nextPos = pos + view.size;\n array.push(view);\n }\n return array\n }", "function buildViewArray(cm, from, to) {\n var array = [], nextPos;\n for (var pos = from; pos < to; pos = nextPos) {\n var view = new LineView(cm.doc, getLine(cm.doc, pos), pos);\n nextPos = pos + view.size;\n array.push(view);\n }\n return array\n }", "function buildViewArray(cm, from, to) {\n var array = [], nextPos;\n for (var pos = from; pos < to; pos = nextPos) {\n var view = new LineView(cm.doc, getLine(cm.doc, pos), pos);\n nextPos = pos + view.size;\n array.push(view);\n }\n return array\n }", "function buildViewArray(cm, from, to) {\n var array = [], nextPos;\n for (var pos = from; pos < to; pos = nextPos) {\n var view = new LineView(cm.doc, getLine(cm.doc, pos), pos);\n nextPos = pos + view.size;\n array.push(view);\n }\n return array\n }", "function buildViewArray(cm, from, to) {\n var array = [], nextPos;\n for (var pos = from; pos < to; pos = nextPos) {\n var view = new LineView(cm.doc, getLine(cm.doc, pos), pos);\n nextPos = pos + view.size;\n array.push(view);\n }\n return array\n }", "function buildViewArray(cm, from, to) {\n var array = [], nextPos;\n for (var pos = from; pos < to; pos = nextPos) {\n var view = new LineView(cm.doc, getLine(cm.doc, pos), pos);\n nextPos = pos + view.size;\n array.push(view);\n }\n return array\n }", "function buildViewArray(cm, from, to) {\n var array = [], nextPos;\n for (var pos = from; pos < to; pos = nextPos) {\n var view = new LineView(cm.doc, getLine(cm.doc, pos), pos);\n nextPos = pos + view.size;\n array.push(view);\n }\n return array\n }", "function buildViewArray(cm, from, to) {\n var array = [], nextPos;\n for (var pos = from; pos < to; pos = nextPos) {\n var view = new LineView(cm.doc, getLine(cm.doc, pos), pos);\n nextPos = pos + view.size;\n array.push(view);\n }\n return array\n }", "function buildSegmentRows(segments) {\n\t\tvar rowCnt = getRowCnt();\n\t\tvar segmentRows = [];\n\t\tvar segmentI;\n\t\tvar segment;\n\t\tvar rowI;\n\n\t\t// group segments by row\n\t\tfor (segmentI=0; segmentI<segments.length; segmentI++) {\n\t\t\tsegment = segments[segmentI];\n\t\t\trowI = segment.row;\n\t\t\tif (segment.element) { // was rendered?\n\t\t\t\tif (segmentRows[rowI]) {\n\t\t\t\t\t// already other segments. append to array\n\t\t\t\t\tsegmentRows[rowI].push(segment);\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t// first segment in row. create new array\n\t\t\t\t\tsegmentRows[rowI] = [ segment ];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// sort each row\n\t\tfor (rowI=0; rowI<rowCnt; rowI++) {\n\t\t\tsegmentRows[rowI] = sortSegmentRow(\n\t\t\t\tsegmentRows[rowI] || [] // guarantee an array, even if no segments\n\t\t\t);\n\t\t}\n\n\t\treturn segmentRows;\n\t}", "function buildSegmentRows(segments) {\n\t\tvar rowCnt = getRowCnt();\n\t\tvar segmentRows = [];\n\t\tvar segmentI;\n\t\tvar segment;\n\t\tvar rowI;\n\n\t\t// group segments by row\n\t\tfor (segmentI=0; segmentI<segments.length; segmentI++) {\n\t\t\tsegment = segments[segmentI];\n\t\t\trowI = segment.row;\n\t\t\tif (segment.element) { // was rendered?\n\t\t\t\tif (segmentRows[rowI]) {\n\t\t\t\t\t// already other segments. append to array\n\t\t\t\t\tsegmentRows[rowI].push(segment);\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t// first segment in row. create new array\n\t\t\t\t\tsegmentRows[rowI] = [ segment ];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// sort each row\n\t\tfor (rowI=0; rowI<rowCnt; rowI++) {\n\t\t\tsegmentRows[rowI] = sortSegmentRow(\n\t\t\t\tsegmentRows[rowI] || [] // guarantee an array, even if no segments\n\t\t\t);\n\t\t}\n\n\t\treturn segmentRows;\n\t}", "function buildSegmentRows(segments) {\n\t\tvar rowCnt = getRowCnt();\n\t\tvar segmentRows = [];\n\t\tvar segmentI;\n\t\tvar segment;\n\t\tvar rowI;\n\n\t\t// group segments by row\n\t\tfor (segmentI=0; segmentI<segments.length; segmentI++) {\n\t\t\tsegment = segments[segmentI];\n\t\t\trowI = segment.row;\n\t\t\tif (segment.element) { // was rendered?\n\t\t\t\tif (segmentRows[rowI]) {\n\t\t\t\t\t// already other segments. append to array\n\t\t\t\t\tsegmentRows[rowI].push(segment);\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t// first segment in row. create new array\n\t\t\t\t\tsegmentRows[rowI] = [ segment ];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// sort each row\n\t\tfor (rowI=0; rowI<rowCnt; rowI++) {\n\t\t\tsegmentRows[rowI] = sortSegmentRow(\n\t\t\t\tsegmentRows[rowI] || [] // guarantee an array, even if no segments\n\t\t\t);\n\t\t}\n\n\t\treturn segmentRows;\n\t}", "function buildSegmentRows(segments) {\n\t\tvar rowCnt = getRowCnt();\n\t\tvar segmentRows = [];\n\t\tvar segmentI;\n\t\tvar segment;\n\t\tvar rowI;\n\n\t\t// group segments by row\n\t\tfor (segmentI=0; segmentI<segments.length; segmentI++) {\n\t\t\tsegment = segments[segmentI];\n\t\t\trowI = segment.row;\n\t\t\tif (segment.element) { // was rendered?\n\t\t\t\tif (segmentRows[rowI]) {\n\t\t\t\t\t// already other segments. append to array\n\t\t\t\t\tsegmentRows[rowI].push(segment);\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t// first segment in row. create new array\n\t\t\t\t\tsegmentRows[rowI] = [ segment ];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// sort each row\n\t\tfor (rowI=0; rowI<rowCnt; rowI++) {\n\t\t\tsegmentRows[rowI] = sortSegmentRow(\n\t\t\t\tsegmentRows[rowI] || [] // guarantee an array, even if no segments\n\t\t\t);\n\t\t}\n\n\t\treturn segmentRows;\n\t}", "function buildSegmentRows(segments) {\n\t\tvar rowCnt = getRowCnt();\n\t\tvar segmentRows = [];\n\t\tvar segmentI;\n\t\tvar segment;\n\t\tvar rowI;\n\n\t\t// group segments by row\n\t\tfor (segmentI=0; segmentI<segments.length; segmentI++) {\n\t\t\tsegment = segments[segmentI];\n\t\t\trowI = segment.row;\n\t\t\tif (segment.element) { // was rendered?\n\t\t\t\tif (segmentRows[rowI]) {\n\t\t\t\t\t// already other segments. append to array\n\t\t\t\t\tsegmentRows[rowI].push(segment);\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t// first segment in row. create new array\n\t\t\t\t\tsegmentRows[rowI] = [ segment ];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// sort each row\n\t\tfor (rowI=0; rowI<rowCnt; rowI++) {\n\t\t\tsegmentRows[rowI] = sortSegmentRow(\n\t\t\t\tsegmentRows[rowI] || [] // guarantee an array, even if no segments\n\t\t\t);\n\t\t}\n\n\t\treturn segmentRows;\n\t}", "function Segment(t,e,n){this.path=t,this.length=t.getTotalLength(),this.path.style.strokeDashoffset=2*this.length,this.begin=e?this.valueOf(e):0,this.end=n?this.valueOf(n):this.length,this.timer=null,this.draw(this.begin,this.end)}", "function buildViewArray(cm, from, to) {\n var array = [], nextPos;\n for (var pos = from; pos < to; pos = nextPos) {\n var view = new LineView(cm.doc, getLine(cm.doc, pos), pos);\n nextPos = pos + view.size;\n array.push(view);\n }\n return array;\n }", "function buildViewArray(cm, from, to) {\n var array = [], nextPos;\n for (var pos = from; pos < to; pos = nextPos) {\n var view = new LineView(cm.doc, getLine(cm.doc, pos), pos);\n nextPos = pos + view.size;\n array.push(view);\n }\n return array;\n }", "function buildViewArray(cm, from, to) {\n var array = [], nextPos;\n for (var pos = from; pos < to; pos = nextPos) {\n var view = new LineView(cm.doc, getLine(cm.doc, pos), pos);\n nextPos = pos + view.size;\n array.push(view);\n }\n return array;\n }", "function buildViewArray(cm, from, to) {\n var array = [], nextPos;\n for (var pos = from; pos < to; pos = nextPos) {\n var view = new LineView(cm.doc, getLine(cm.doc, pos), pos);\n nextPos = pos + view.size;\n array.push(view);\n }\n return array;\n }", "function buildViewArray(cm, from, to) {\n var array = [], nextPos;\n for (var pos = from; pos < to; pos = nextPos) {\n var view = new LineView(cm.doc, getLine(cm.doc, pos), pos);\n nextPos = pos + view.size;\n array.push(view);\n }\n return array;\n }", "function buildViewArray(cm, from, to) {\n var array = [], nextPos;\n for (var pos = from; pos < to; pos = nextPos) {\n var view = new LineView(cm.doc, getLine(cm.doc, pos), pos);\n nextPos = pos + view.size;\n array.push(view);\n }\n return array;\n }", "function buildViewArray(cm, from, to) {\n var array = [], nextPos;\n for (var pos = from; pos < to; pos = nextPos) {\n var view = new LineView(cm.doc, getLine(cm.doc, pos), pos);\n nextPos = pos + view.size;\n array.push(view);\n }\n return array;\n }", "function buildViewArray(cm, from, to) {\n var array = [], nextPos;\n for (var pos = from; pos < to; pos = nextPos) {\n var view = new LineView(cm.doc, getLine(cm.doc, pos), pos);\n nextPos = pos + view.size;\n array.push(view);\n }\n return array;\n }", "function buildHTMLForSegment(segment) {\n\t\tvar html = '';\n\t\tvar isRTL = opt('isRTL');\n\t\tvar event = segment.event;\n\t\tvar url = event.url;\n\n\t\t// generate the list of CSS classNames\n\t\tvar classNames = [ 'fc-event', 'fc-event-hori' ];\n\t\tif (isEventDraggable(event)) {\n\t\t\tclassNames.push('fc-event-draggable');\n\t\t}\n\t\tif (segment.isStart) {\n\t\t\tclassNames.push('fc-event-start');\n\t\t}\n\t\tif (segment.isEnd) {\n\t\t\tclassNames.push('fc-event-end');\n\t\t}\n\t\t// use the event's configured classNames\n\t\t// guaranteed to be an array via `buildEvent`\n\t\tclassNames = classNames.concat(event.className);\n\t\tif (event.source) {\n\t\t\t// use the event's source's classNames, if specified\n\t\t\tclassNames = classNames.concat(event.source.className || []);\n\t\t}\n\n\t\t// generate a semicolon delimited CSS string for any of the \"skin\" properties\n\t\t// of the event object (`backgroundColor`, `borderColor` and such)\n\t\tvar skinCss = getSkinCss(event, opt);\n\n\t\tif (url) {\n\t\t\thtml += \"<a href='\" + htmlEscape(url) + \"'\";\n\t\t}else{\n\t\t\thtml += \"<div\";\n\t\t}\n\t\thtml +=\n\t\t\t\" class='\" + classNames.join(' ') + \"'\" +\n\t\t\t\" style=\" +\n\t\t\t\t\"'\" +\n\t\t\t\t\"position:absolute;\" +\n\t\t\t\t\"left:\" + segment.left + \"px;\" +\n\t\t\t\tskinCss +\n\t\t\t\t\"'\" +\n\t\t\t\">\" +\n\t\t\t\"<div class='fc-event-inner'>\";\n\t\tif (!event.allDay && segment.isStart) {\n\t\t\thtml +=\n\t\t\t\t\"<span class='fc-event-time'>\" +\n\t\t\t\thtmlEscape(\n\t\t\t\t\tformatDate(event.start, opt('timeFormat'))\n\t\t\t\t) +\n\t\t\t\t\"</span>\";\n\t\t}\n\t\thtml +=\n\t\t\t\"<span class='fc-event-title'>\" +\n\t\t\thtmlEscape(event.title || '') +\n\t\t\t\"</span>\" +\n\t\t\t\"</div>\";\n\t\tif (event.allDay && segment.isEnd && isEventResizable(event)) {\n\t\t\thtml +=\n\t\t\t\t\"<div class='ui-resizable-handle ui-resizable-\" + (isRTL ? 'w' : 'e') + \"'>\" +\n\t\t\t\t\"&nbsp;&nbsp;&nbsp;\" + // makes hit area a lot better for IE6/7\n\t\t\t\t\"</div>\";\n\t\t}\n\t\thtml += \"</\" + (url ? \"a\" : \"div\") + \">\";\n\n\t\t// TODO:\n\t\t// When these elements are initially rendered, they will be briefly visibile on the screen,\n\t\t// even though their widths/heights are not set.\n\t\t// SOLUTION: initially set them as visibility:hidden ?\n\n\t\treturn html;\n\t}", "function buildViewArray(cm, from, to) {\n\t\t var array = [], nextPos;\n\t\t for (var pos = from; pos < to; pos = nextPos) {\n\t\t var view = new LineView(cm.doc, getLine(cm.doc, pos), pos);\n\t\t nextPos = pos + view.size;\n\t\t array.push(view);\n\t\t }\n\t\t return array\n\t\t }", "function eventStoreToRanges(eventStore) {\n var instances = eventStore.instances;\n var ranges = [];\n for (var instanceId in instances) {\n ranges.push(instances[instanceId].range);\n }\n return ranges;\n}", "function add_segments() {\r\n for (let i = 0; i < new_segments; i++) {\r\n the_snake_square_on_the_grid_board_game.push({\r\n ...the_snake_square_on_the_grid_board_game[the_snake_square_on_the_grid_board_game.length - 1]\r\n });\r\n }\r\n\r\n new_segments = 0;\r\n}", "getEventsToRender(resource, events) {\n if (resource.timeRanges && resource.timeRanges.length) {\n events.push(...resource.timeRanges);\n }\n return events;\n }", "function DocumentWithSegments() {\n _classCallCheck(this, DocumentWithSegments);\n\n DocumentWithSegments.initialize(this);\n }", "function buildViewArray(cm, from, to) {\n\t var array = [], nextPos;\n\t for (var pos = from; pos < to; pos = nextPos) {\n\t var view = new LineView(cm.doc, getLine(cm.doc, pos), pos);\n\t nextPos = pos + view.size;\n\t array.push(view);\n\t }\n\t return array;\n\t }", "function buildViewArray(cm, from, to) {\n\t var array = [], nextPos;\n\t for (var pos = from; pos < to; pos = nextPos) {\n\t var view = new LineView(cm.doc, getLine(cm.doc, pos), pos);\n\t nextPos = pos + view.size;\n\t array.push(view);\n\t }\n\t return array;\n\t }", "function buildViewArray(cm, from, to) {\n\t var array = [], nextPos;\n\t for (var pos = from; pos < to; pos = nextPos) {\n\t var view = new LineView(cm.doc, getLine(cm.doc, pos), pos);\n\t nextPos = pos + view.size;\n\t array.push(view);\n\t }\n\t return array;\n\t }", "function buildViewArray(cm, from, to) {\r\n var array = [], nextPos;\r\n for (var pos = from; pos < to; pos = nextPos) {\r\n var view = new LineView(cm.doc, getLine(cm.doc, pos), pos);\r\n nextPos = pos + view.size;\r\n array.push(view);\r\n }\r\n return array;\r\n }", "function selectSegments() {\n var peaks = wavesurfer.backend.peaks;\n var length = peaks.length;\n var duration = wavesurfer.getDuration();\n\n var start = 0;\n var min = 0.001;\n for (var i = start; i < length; i += 1) {\n if (peaks[i] <= min && i > start + (1 / duration) * length) {\n var color = [\n ~~(Math.random() * 255),\n ~~(Math.random() * 255),\n ~~(Math.random() * 255),\n 0.1\n ];\n wavesurfer.addRegion({\n color: 'rgba(' + color + ')',\n start: (start / length) * duration,\n end: (i / length) * duration\n });\n while (peaks[i] <= min) {\n i += 1;\n }\n start = i;\n }\n }\n}", "function segmentNew(start, end){\n\t\treturn {\n\t\t\tid: buildLog ? buildLog.segmentId() : -1,\n\t\t\tstart: start,\n\t\t\tend: end,\n\t\t\tmyFill: {\n\t\t\t\tabove: null, // is there fill above us?\n\t\t\t\tbelow: null // is there fill below us?\n\t\t\t},\n\t\t\totherFill: null\n\t\t};\n\t}" ]
[ "0.78401405", "0.78401405", "0.6865044", "0.6865044", "0.6865044", "0.6865044", "0.6865044", "0.6294114", "0.6294114", "0.6216291", "0.6216291", "0.6216291", "0.5960649", "0.57300764", "0.55104256", "0.55104256", "0.55104256", "0.5481302", "0.5481302", "0.5481302", "0.5268088", "0.52666676", "0.52666676", "0.5256201", "0.5247495", "0.52295476", "0.5208865", "0.5207224", "0.5184939", "0.5112655", "0.5112655", "0.51055515", "0.509326", "0.5090265", "0.50202495", "0.5009712", "0.49822938", "0.49650505", "0.49456203", "0.4911795", "0.4906596", "0.48951232", "0.48951232", "0.4883779", "0.48754758", "0.48414168", "0.47807628", "0.47807628", "0.47807628", "0.47663733", "0.47479033", "0.47479033", "0.47479033", "0.47479033", "0.47440097", "0.47429457", "0.47429457", "0.47429457", "0.47429457", "0.47429457", "0.47429457", "0.47429457", "0.47429457", "0.47429457", "0.47429457", "0.47429457", "0.47429457", "0.47429457", "0.47429457", "0.47429457", "0.47429457", "0.47429457", "0.47420418", "0.47420418", "0.47420418", "0.47420418", "0.47420418", "0.47417834", "0.47409007", "0.47409007", "0.47409007", "0.47409007", "0.47409007", "0.47409007", "0.47409007", "0.47409007", "0.47388202", "0.4738657", "0.4736634", "0.47356343", "0.47283086", "0.47200286", "0.471945", "0.471945", "0.471945", "0.47076207", "0.47033316", "0.47023073" ]
0.77801394
3
Sets the `left` and `outerWidth` property of each segment. These values are the desired dimensions for the eventual DOM elements.
function calculateHorizontals(segments) { var isRTL = opt('isRTL'); for (var i=0; i<segments.length; i++) { var segment = segments[i]; // Determine functions used for calulating the elements left/right coordinates, // depending on whether the view is RTL or not. // NOTE: // colLeft/colRight returns the coordinate butting up the edge of the cell. // colContentLeft/colContentRight is indented a little bit from the edge. var leftFunc = (isRTL ? segment.isEnd : segment.isStart) ? colContentLeft : colLeft; var rightFunc = (isRTL ? segment.isStart : segment.isEnd) ? colContentRight : colRight; var left = leftFunc(segment.leftCol); var right = rightFunc(segment.rightCol); segment.left = left; segment.outerWidth = right - left; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function setBoxWidths() {\n var leftWidth = dragBarPos - 2,\n rightWidth = outerWidth - dragBarPos - 12;\n\n left.css('width', '' + toPercent(leftWidth) + '%');\n right.css('width', '' + toPercent(rightWidth) + '%');\n }", "function d(b,c,d){\n// where the DOM nodes will eventually end up\nvar f,g,j=T(),m=c?a(\"<div/>\"):j,n=e(b);\n// calculate the desired `left` and `width` properties on each segment object\n// build the HTML string. relies on `left` property\n// render the HTML. innerHTML is considerably faster than jQuery's .html()\n// retrieve the individual elements\n// if we were appending, and thus using a temporary container,\n// re-attach elements to the real container.\n// assigns each element to `segment.event`, after filtering them through user callbacks\n// Calculate the left and right padding+margin for each element.\n// We need this for setting each element's desired outer width, because of the W3C box model.\n// It's important we do this in a separate pass from acually setting the width on the DOM elements\n// because alternating reading/writing dimensions causes reflow for every iteration.\n// Set the width of each element\n// Grab each element's outerHeight (setVerticals uses this).\n// To get an accurate reading, it's important to have each element's width explicitly set already.\n// Set the top coordinate on each element (requires segment.outerHeight)\nreturn h(n),f=i(n),m[0].innerHTML=f,g=m.children(),c&&j.append(g),k(n,g),xa(n,function(a,b){a.hsides=t(b,!0)}),xa(n,function(a,b){b.width(Math.max(0,a.outerWidth-a.hsides))}),xa(n,function(a,b){a.outerHeight=b.outerHeight(!0)}),l(n,d),n}", "function setOuterWidth() {\n outerWidth = wrap.offsetWidth;\n dragBarPos = calcDragBarPosFromCss() || Math.floor(outerWidth / 2) - 5;\n }", "updateChildWidgetLeft(left) {\n // TODO: Cell spacing calculation.\n let spacing = 0;\n if (this.ownerTable.tableFormat.cellSpacing > 0) {\n spacing = this.ownerTable.tableFormat.cellSpacing;\n }\n for (let i = 0; i < this.childWidgets.length; i++) {\n let cellWidget = this.childWidgets[i];\n left += spacing + cellWidget.margin.left;\n cellWidget.x = left;\n cellWidget.updateChildWidgetLeft(cellWidget.x);\n left += cellWidget.width + cellWidget.margin.right;\n }\n }", "function setLeftPosition() {\n let leftPercentage = (-(initialSlideLengthQS - 1) * 100);\n initialLeftPercentage = leftPercentage;\n leftPercentage += '%';\n if ($(window).outerWidth() < 768) {\n $(sliderWrapperQS).css('left', leftPercentage);\n } else {\n // leftPercentage = (-(slides.length - 2) * ($(sliderWrapperQS + ' .slide').outerWidth() + tabMargin));\n // leftPercentage = 0;\n leftPercentage = -($(sliderWrapperQS + ' .slide').outerWidth() + tabMargin);\n initialLeftPercentage = leftPercentage;\n leftPercentage += 'px';\n $('#quickSwap .tabs-wrapper').css('left', leftPercentage);\n $('#quickSwap .slider-wrapper').css('left', '0%');\n }\n }", "function computeSegHorizontals(segs, eventOrderSpecs) {\n // IMPORTANT TO CLEAR OLD RESULTS :(\n for (var _i = 0, segs_2 = segs; _i < segs_2.length; _i++) {\n var seg = segs_2[_i];\n seg.level = null;\n seg.forwardCoord = null;\n seg.backwardCoord = null;\n seg.forwardPressure = null;\n }\n\n segs = Object(_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__[\"sortEventSegs\"])(segs, eventOrderSpecs);\n var level0;\n var levels = buildSlotSegLevels(segs);\n computeForwardSlotSegs(levels);\n\n if (level0 = levels[0]) {\n for (var _a = 0, level0_1 = level0; _a < level0_1.length; _a++) {\n var seg = level0_1[_a];\n computeSlotSegPressures(seg);\n }\n\n for (var _b = 0, level0_2 = level0; _b < level0_2.length; _b++) {\n var seg = level0_2[_b];\n computeSegForwardBack(seg, 0, 0, eventOrderSpecs);\n }\n }\n\n return segs;\n } // Builds an array of segments \"levels\". The first level will be the leftmost tier of segments if the calendar is", "function Splitter() {\n this.LastX = 0;\n\tthis.OrigX = null;\t\t// default width of LeftEl\n\tthis.EventRef1 = null;// Stores reference for event removal in EndDrag method\n\tthis.LeftEl = null;\t\t// element left of resize handle\n\tthis.RightEl = null;\t// element right of resize handle\n\tthis.Open = true;\t\t\t// LeftPane open/closed\n}", "function setWidth(){\n var width = 500/(columnCounter + 1);\n\n for(var i=0; i<=columnCounter; i++){\n for(var j=0; j<columns[i].length; j++) {\n columns[i][j].style.width = (width - 3) + 'px';\n columns[i][j].style.marginLeft = width * i + 'px';\n }\n }\n }", "function initHorizontal(){\n $(\".horizontalMenu\").each(function(){\n let id = makeid();\n $(this).attr(\"id\", id);\n let mainWidth = $(this).width();\n console.log(\"masud width: \"+mainWidth);\n let arrowWidth = $(this).children('i').outerWidth(true);\n let calculatedWidth = mainWidth - (arrowWidth*2);\n $(this).children('.menuContainer').css('width', calculatedWidth);\n });\n }", "setCenterAlignmentGarph() {\n\t\tconst parentBoundary = _.find(this.dataContainer.boundary, {'parent': null});\n\n\t\tconst rightScrollWidth = 10;\n\t\tconst marginTop = 10;\n\t\tconst marginLeft = 5;\n\t\tconst marginRight = 5;\n\n\t\tlet newX = marginLeft;\n\t\tconst newY = marginTop;\n\n\t\tif (parentBoundary) {\n\t\t\t$('.left-svg').css('width', parentBoundary.width + rightScrollWidth + marginLeft + marginRight);\n\t\t\t$('.middle-svg').css('left', parentBoundary.width + rightScrollWidth + marginLeft + marginRight);\n\n\t\t\tconst inputRec = $('.left-svg')[0].getBoundingClientRect();\n\t\t\tconst outputRec = $('.right-svg')[0].getBoundingClientRect();\n\t\t\t$('.middle-svg').css('width', `calc(100% - ${inputRec.width + outputRec.width}px)`);\n\n\t\t\tconst containerRect = $(`#${parentBoundary.svgId}`)[0].parentNode.getBoundingClientRect();\n\n\t\t\tif ( containerRect.width - rightScrollWidth - marginLeft - marginRight >= parentBoundary.width ) {\n\t\t\t\tnewX = newX + ((containerRect.width - rightScrollWidth - marginLeft - marginRight - parentBoundary.width) / 2);\n\t\t\t}\n\n\t\t\tconst offsetX = newX - parentBoundary.x;\n const offsetY = newY - parentBoundary.y;\n\t\t\tif (offsetX != 0 || offsetY != 0) {\n\t\t\t\tparentBoundary.move(offsetX, offsetY);\n\t\t\t}\n\t\t}\n\t}", "function set_sizes() {\n tab_width = $nav_tab.outerWidth();\n list_width = $nav_list.outerWidth();\n tabs_displayed = list_width / tab_width;\n //recalculate height of the currently displayed slide\n var this_sectionHeight = $('.slick-active').outerHeight();\n $sections.css('height', this_sectionHeight + 'px');\n //use tab width and tab index to set horizontal spacing\n $nav_tab.each(function() {\n var index = $(this).index();\n var left_pos = (tab_width * (index - pos_counter)) + 'px';\n $(this).css('left', left_pos);\n });\n}", "constructor(left, right, splitter, leftMin, rightMin, initialPosition, percentage) {\n this.left = left;\n this.right = right;\n this.splitter = splitter;\n this.leftMin = leftMin;\n this.rightMin = rightMin;\n this.initialPosition = initialPosition;\n this.percentage = percentage;\n\n this.container = this.splitter.parentNode;\n this.dragging = false;\n\n this.leftWidth = getDimension(this.left, \"width\");\n this.rightWidth = getDimension(this.right, \"width\")\n this.totalWidth = this.leftWidth + this.rightWidth;\n\n if (typeof this.initialPosition != \"undefined\") {\n this.updateTotalWidth();\n this.setWidths((typeof this.percentage != \"undefined\")\n ? this.totalWidth * this.initialPosition / 100\n : this.initialPosition);\n\n this.totalHeight = getDimension(this.container, \"height\");\n this.setHeights();\n }\n\n this.splitter.onmousedown = ev => {\n this.dragging = true;\n this.latestX = ev.clientX;\n };\n\n this.container.onmousemove =\n ev => {\n if (this.dragging) {\n let delta = ev.clientX - this.latestX;\n this.latestX = ev.clientX;\n this.setWidths(this.leftWidth + delta);\n }\n };\n\n this.container.onmouseup =\n this.container.onmouseleave =\n ev => { this.dragging = false; };\n\n this.container.onresize = ev => {\n this.totalHeight = getDimension(this.container, \"height\");\n this.setHeights();\n\n let proportion = this.leftWidth / this.totalWidth;\n this.updateTotalWidth();\n this.setWidths(this.totalWidth * proportion);\n };\n }", "function setupSliderWidth() {\n // resets sliderElement\n sliderElement.style.width = '0px';\n\n var totalWidth = 0;\n elements.forEach(function (element, index) {\n slideWidth = element.offsetWidth;\n totalWidth = totalWidth += slideWidth;\n });\n sliderElement.style.width = totalWidth + 'px';\n }", "function calcWidth(obj){\n \n var titles = $(obj).siblings('.space').children('.route').children('.title');\n \n $(titles).each(function(index, element){\n var pTitleWidth = parseInt($(obj).css('width'));\n var leftOffset = parseInt($(obj).siblings('.space').css('margin-left'));\n \n var newWidth = pTitleWidth - leftOffset;\n \n if ($(obj).attr('id') == 'title0'){\n newWidth = newWidth - 10;\n }\n \n $(element).css({\n 'width': newWidth,\n })\n \n calcWidth(element);\n });\n \n sorting();\n }", "_setX (x) {\n this._xPosition = x;\n this._dotElement.style.left = `${x}px`;\n\n // X position relative to center to simplify calculations\n let halfSliderWidth = this._sliderElement.offsetWidth / 2;\n let relativeX = x - halfSliderWidth;\n\n // Update style\n this._fillElement.style.width = `${Math.abs(relativeX)}px`;\n if (relativeX < 0) {\n this._fillElement.style.left = halfSliderWidth - Math.abs(relativeX) + \"px\";\n } else {\n this._fillElement.style.left = halfSliderWidth + \"px\";\n }\n }", "setSlidePosition() {\n this.slides.forEach((slide, i) => {\n slide.style.left = this.slideWidth * i + \"px\";\n });\n }", "setWidth(_width) {\n this.right = this.left + _width;\n this.updateSecondaryValues();\n return this;\n }", "function computeSegHorizontals(segs, eventOrderSpecs) {\n // IMPORTANT TO CLEAR OLD RESULTS :(\n for (var _i = 0, segs_2 = segs; _i < segs_2.length; _i++) {\n var seg = segs_2[_i];\n seg.level = null;\n seg.forwardCoord = null;\n seg.backwardCoord = null;\n seg.forwardPressure = null;\n }\n segs = sortEventSegs(segs, eventOrderSpecs);\n var level0;\n var levels = buildSlotSegLevels(segs);\n computeForwardSlotSegs(levels);\n if ((level0 = levels[0])) {\n for (var _a = 0, level0_1 = level0; _a < level0_1.length; _a++) {\n var seg = level0_1[_a];\n computeSlotSegPressures(seg);\n }\n for (var _b = 0, level0_2 = level0; _b < level0_2.length; _b++) {\n var seg = level0_2[_b];\n computeSegForwardBack(seg, 0, 0, eventOrderSpecs);\n }\n }\n return segs;\n }", "setPosX(x) {\n this.x = x;\n this.DOM.el.style.left = `${this.x}px`;\n }", "constructor(left, top) {\n this.top = top;\n this.left = left;\n this.numSegments = LATCH_WIDTH / SEGMENT_WIDTH;\n this.segments = [];\n }", "updateInnerWidthDependingOnChilds(){}", "function resizeWidth(event) {\n horizontalDivide = 100 * ((event.clientX - $('#editing-panes').offset().left) / $('#editing-panes').width());\n resizePanels('horizontal')\n}", "function refreshWidths() {\n slideWidth = $slideshow.width();\n\n // ...pulling currSlide from global :/\n var left = slideLeftPos( currSlide );\n $slideReel.css(\"left\", left);\n }", "set leftMargin(value) {\n this.leftMarginIn = value;\n this.notifyPropertyChanged('leftMargin');\n }", "function PosCenterLeft() {\n var leftOnNode = M.PInt($imgItem.css('left')), leftCur = ~~((va.wSlide - M.OuterWidth($imgItem, true)) / 2);\n // Setup css 'left'\n if (leftOnNode !== leftCur)\n $imgItem.css('left', leftCur);\n }", "setFlexLeft(_flag, _px) {\n if (this.isNullOrUndefined(_flag)) {\n _flag = true;\n }\n this.flexLeft = _flag;\n if ((_px || _px === 0) && this.rect) {\n this.rect.setLeft(_px);\n }\n return this;\n }", "function leftAlign(){\n\tvar baseX = 999999;\n\tfor(var i=0; i<currentShapes.length; i++){\n\t\tif(baseX>currentShapes[i].getX()){\n\t\t\tbaseX = currentShapes[i].getX();\n\t\t}\n\t}\n\tfor(var k=0; k<currentShapes.length; k++){\n\t\tcurrentShapes[k].setX(baseX);\n\t}\n\tlayer.draw();\n\thatioGroupRevised();\n}", "function setMiddleX() {\r\n self.middleX = (self.left + self.right) / 2;\r\n }", "function horizontal() {\n if (event.edges.left && (parseInt(target.style.left) + x < 0) && (event.dx < 0)) return false;\n if (event.edges.right && (parseInt(target.style.left) + x + parseInt(target.style.width) + event.dx + parseInt(target.style.borderWidth) * 2 > parseInt(target.parentNode.style.width)) && event.dx > 0) return false;\n if (event.edges.left && parseInt(target.style.width) === 0 && event.dx > 0) return false;\n if (event.edges.left && parseInt(target.style.width) - event.dx >= 0) x += event.dx;\n if (event.edges.left && (parseInt(target.style.left) + x < 30) && (event.dx < 0)) {\n target.style.width = parseInt(target.style.width) + x + parseInt(target.style.left) + 'px';\n x = -parseInt(target.style.left);\n }\n if (event.edges.right && (parseInt(target.style.left) + x + parseInt(target.style.width) + event.dx + parseInt(target.style.borderWidth) * 2 > parseInt(target.parentNode.style.width) - 30) && event.dx > 0) {\n target.style.width = (parseInt(target.parentNode.style.width) - parseInt(target.style.left) - parseInt(target.style.borderWidth) * 2 - x) + 'px';\n return false;\n }\n if (event.edges.right) target.style.width = parseInt(target.style.width) + event.dx + 'px';\n if (event.edges.left) target.style.width = parseInt(target.style.width) - event.dx + 'px';\n target.setAttribute('data-x', x);\n target.style.webkitTransform = target.style.transform =\n 'translate(' + x + 'px,' + y + 'px)';\n }", "set x(val) {\n this.width = val;\n }", "function setWidth(val) {\n\tbookshelf.width = val;\n\tvoronoi.setDimensions(bookshelf.width,bookshelf.height);\n}", "function finalAdjustments(){\n for(var i=0; i<idCounter; i++){\n if(eventsOverlap['event'+i] === undefined){\n document.getElementById('event'+i).style.width = '497px';\n } else if(eventsOverlap['event'+i].length < columnCounter){\n var newWidth = 500/(eventsOverlap['event'+i].length + 1);\n var thisEvent = document.getElementById('event'+i);\n // thisEvent.style.width = (newWidth - 3) + 'px';\n adjust(thisEvent, eventsOverlap['event'+i], newWidth);\n }\n }\n }", "function goLeft() {\n leftMargin = $(\".inner-liner\").css(\"margin-left\").replace(\"px\", \"\") * 1;\n newLeftMargin = (leftMargin + 650);\n $(\".inner-liner\").animate({ marginLeft: newLeftMargin }, 500);\n }", "function correctHorizontalAlignment () {\n var dropdown = elements.scrollContainer.getBoundingClientRect(),\n styles = {};\n if (dropdown.right > root.right) {\n styles.left = (hrect.right - dropdown.width) + 'px';\n }\n elements.$.scrollContainer.css(styles);\n }", "function setupSplitter() {\n // adjust splitter within next sibling node's width|height\n opts.panelAfterSize = opts.containerSize - opts.panelBeforeSize - opts.elSize;\n\n drawSplitter();\n\n // On window resize event after adjusting size of left and right nodes of splitter,\n // container size increases too. Not sure why? This code to check that extra increment.\n adjustPanelAfterWindowResize();\n }", "function changeCanvasElementsWidth() {\n canvasWrapperParentElement.style.width = `calc(100% - ${rightSideBar.width + leftSideBar.width}px)`;\n // could be the reason for uneven results\n zoomOverflowWrapperParentElement.style.width = `calc(100% - ${rightSideBar.width + leftSideBar.width + 1}px)`;\n}", "function leftResize(d) {\n if(isUser || in_progress) { // user page\n return;\n }\n\n // get event id\n var groupNum = d.groupNum;\n\n // get event object\n var ev = getEventFromId(groupNum);\n \n // get new left x\n var width = getWidth(ev);\n var rightX = ev.x + width;\n var newX = d3.event.x - (d3.event.x%(STEP_WIDTH)) - DRAGBAR_WIDTH/2;\n if(newX < 0){\n newX = 0;\n }\n var newWidth = width + (ev.x - newX);\n if (newWidth < 30)\n return;\n \n // update x and draw event\n ev.x = newX;\n ev.min_x = newX;\n ev.duration = durationForWidth(newWidth);\n \n var startHr = startHrForX(newX);\n var startMin = startMinForX(newX);\n ev.startHr = startHr;\n ev.startMin = startMin;\n ev.startTime = startHr * 60 + startMin;\n\n drawEvent(ev, false);\n}", "function alignLeft (){\n\t\t\tvar selectedGr = canvas.getActiveGroup();\n\t\t\tif (!selectedGr) return;\n\t\t\tvar pointC = new fabric.Point(0,0);\n\t\t\tvar deltaX = 0;\n\t\t\tvar coordY1 = 0;\n\t\t\tvar coordY2 = 0;\n\t\t\t\n\t\t\ti=0;\n\t\t\tselectedGr.forEachObject(function(obj) {\n\t\t\ti++;\n\t\t\tobj.setOriginX('left');\n\t\t\tobj.setOriginY('top');\n\t\t\n\t\t\t//console.log( i + ' Point Left = ' + obj.left );\n\t\t\t\n\t\t\tvar boundObj = obj.getBoundingRect();\n\t\n\t\t\tif (i > 1 ){\n\t\t\t\t\tpointC.x = obj.left;\n\t\t\t\t\tdeltaX = boundObj.left - coordY1;\n\t\t\t\t\t//console.log(i + ' DELTA= ' + deltaX);\n\t\t\t\t\tpointC.x -= deltaX;\t\n\t\t\t\t\tpointC.y = obj.top;\n\t\t\t\t\tobj.setLeft(pointC.x); \n \n\t\t\t}\n\t\t\telse {\n\t\t\t\t\tcoordY1 = boundObj.left;\n\n\t\t\t}\n\t\t\t\t\t//console.log(' LEFT N '+i + ' = ' + boundObj.left + ' LEFT1 = ' + coordY1 );\n\t\t\t});\n\t\t\t\t\tcanvas.discardActiveGroup();\n\t\t\t\t\tselectGrpParam();\n\t\t\t\t\tcanvas.renderAll();\n\t\t\t}", "function setDragBarLeft() {\n dragBar.css('left', '' + toPercent(dragBarPos) + '%');\n }", "function setPaneDimensions() {\n\t\t\t\tpane_width = element.width();\n\t\t\t\tpanes.each( function () {\n\t\t\t\t\t$( this ).width( pane_width );\n\t\t\t\t} );\n\t\t\t\tcontainer.width( pane_width * pane_count );\n\t\t\t}", "_updateHandles() {\n const positions = this._positions;\n const values = this._mouseActive ? this._activeValues\n : this._values;\n let handleOffset = null;\n\n this._$handles.children().each((i, el) => {\n const $el = $(el);\n\n if (handleOffset === null) {\n handleOffset = Math.floor($el.width() / 2);\n }\n\n const left = (positions[values[i]] - handleOffset);\n\n $el.css('left', `${left}px`);\n });\n\n if (this._numHandles === 2) {\n this._$range.css({\n 'left': positions[values[0]] + 'px',\n 'width': positions[values[1] - values[0]] + 'px',\n });\n }\n }", "function setEltLeft (elt, x) {\n if (is.nav4) elt.left=x;\n else if (is.ie4up) elt.style.pixelLeft=x;\n else if (is.gecko) elt.style.left = (x + \"px\");\n}", "function setWidth() {\n\t\t\t\tvar width;\n\t\t\t\tvar style = window.getComputedStyle ? window.getComputedStyle(ta, null) : false;\n\t\t\t\t\n\t\t\t\tif (style) {\n\n\t\t\t\t\twidth = ta.getBoundingClientRect().width;\n\n\t\t\t\t\tif (width === 0) {\n\t\t\t\t\t\twidth = parseInt(style.width,10);\n\t\t\t\t\t}\n\n\t\t\t\t\t$.each(['paddingLeft', 'paddingRight', 'borderLeftWidth', 'borderRightWidth'], function(i,val){\n\t\t\t\t\t\twidth -= parseInt(style[val],10);\n\t\t\t\t\t});\n\t\t\t\t} else {\n\t\t\t\t\twidth = Math.max($ta.width(), 0);\n\t\t\t\t}\n\n\t\t\t\tmirror.style.width = width + 'px';\n\t\t\t}", "function IveriAnimaX_DragHorizontal(elID, boundLeft, boundRight, recoilPercentage, recoilSpeed) {\n _dragType = \"horizontal\";\n _boundaryLeft = parseInt(boundLeft);\n _boundaryRight = parseInt(boundRight);\n InitDragDrop();\n}", "function setStyles() {\n // Assign the proper width to the wrapper\n SELECTORS.$slideWrapper.css('width', NUMBERS.WRAPPER_WIDTH + 'px');\n\n // Loop through all the slides and assign their proper widths\n var i = 0;\n\n for(i; i < SELECTORS.$slides.length;i++) {\n SELECTORS.$slides.css({\n 'width': NUMBERS.SLIDE_WIDTH + 'px',\n 'margin-left': NUMBERS.SLIDE_GUTTER + 'px'\n });\n }\n\n return this;\n }", "setStyle (){\n // console.log(\"style\")\n let ratio = this.items.length / this.slidesVisible\n this.container.style.width = (ratio * 100)+ \"%\"\n this.items.forEach(item => item.style.width= ((100 / this.slidesVisible )/ ratio) + \"%\")\n }", "function setPaneDimensions() {\n pane_width = element.width();\n $(options.paneItemsSelector, element).each(function () {\n $(this).width(pane_width);\n });\n container.width(pane_width * pane_count);\n }", "getRenderedLeft(){return e.System.Services.controlManager.checkControlGeometryByControl(this),this.__renderedSizeCache.left}", "function setLeft(x) {\n // Only if the scroll is not what it was last time we did this.\n if (x != lastOffsetLeft) {\n // Move the target element horizontally relative to its original\n // horizontal position.\n target.css('left', offsetLeft - x);\n\n // Hold the last horizontal position set.\n lastOffsetLeft = x;\n }\n }", "function adjustToX() {\n\t\t\t\tnewWidth = startWidth + factorX * moveDiffX;\n\t\t\t\tnewHeight = Math.round(newWidth / ratio);\n\t\t\t}", "function setContainerWidth(val) {\n switch (val) {\n case \"16\":\n ul.style.width = \"480px\";\n break;\n\n case \"36\":\n ul.style.width = \"720px\";\n break;\n\n case \"64\":\n ul.style.width = \"960px\";\n break;\n }\n }", "calPosLeft(e) {\n let left = null\n\n let deltaX = e.clientX - this.getLandPoint().x\n let eleWidth = this.getEleWidth()\n let margin = this.margin\n let viewWidth = this.getViewportWidth()\n\n if (this.position === 'fixed') {\n\n if (deltaX >= margin && deltaX <= viewWidth - eleWidth - margin) {\n left = `${deltaX}px`\n } else if (deltaX < margin) { // left border overflow\n left = `${margin}px`\n } else if (deltaX > viewWidth - eleWidth - margin) { // right border overflow\n left = `${viewWidth - eleWidth - margin}px`\n }\n\n } else if (this.position === 'absolute') {\n let parentEle = this.getPosNotStaticParent()\n let parentRect = parentEle.getBoundingClientRect()\n let parentLeft = parentRect.left\n let parentWidth = parentRect.width\n\n if (deltaX >= margin + parentLeft && deltaX <= parentWidth + parentLeft - eleWidth - margin) {\n left = `${deltaX - parentLeft}px`\n } else if (deltaX < margin + parentLeft) { // left border overflow\n left = `${margin}px`\n } else if (deltaX > parentWidth + parentLeft - eleWidth - margin) { // right border overflow\n left = `${parentWidth - eleWidth - margin}px`\n }\n\n } else if (this.position === 'relative') {\n let parentEle = this.getPosNotStaticParent()\n let parentRect = parentEle.getBoundingClientRect()\n let parentLeft = parentRect.left\n\n left = `${e.clientX - parentLeft - this.getLandPoint().x}px`\n }\n \n return left\n }", "function setLeft(x) {\r\n // Only if the scroll is not what it was last time we did this.\r\n if (x != lastOffsetLeft) {\r\n // Move the target element horizontally relative to its original\r\n // horizontal position.\r\n target.css('left', offsetLeft - x);\r\n\r\n // Hold the last horizontal position set.\r\n lastOffsetLeft = x;\r\n }\r\n }", "function changeHorizontal(d) {\n // console.clear();\n // findNodeSources(d)\n // console.log(findNodeHeight(d))\n // d.x = 100;\n}", "set leftMargin(value) {\n if (value === this.leftMarginIn) {\n return;\n }\n this.leftMarginIn = value;\n this.notifyPropertyChanged('leftMargin');\n }", "set leftMargin(value) {\n if (value === this.leftMarginIn) {\n return;\n }\n this.leftMarginIn = value;\n this.notifyPropertyChanged('leftMargin');\n }", "function init_resize_bars() {\r\n for (var i = 0; i < array.length; i++) {\r\n for (var x = 0; x < res_types.length; x++) {\r\n var inner = document.getElementById('p_' + i + '_' + x);\r\n var el = array[i][x+1];\r\n inner.style.left = 100*(el[0]-res_min)/(res_max-res_min) + \"%\";\r\n inner.style.width = 100*(el[1]-el[0])/(res_max-res_min) + \"%\";\r\n }\r\n document.getElementById(label_prefix + i).innerHTML = array[i][0];\r\n }\r\n}", "function paginationLeft(){\n\t\tvar window_w = $(window).width()/2;\n\t\tvar swiper_pagination = $('.swiper-pagination-switch').width()/2;\n\t\tvar swiper_pagination_active = $('.swiper-active-switch').position().left;\n\t\tvar pagination_left = (window_w-swiper_pagination-swiper_pagination_active)*100/$(window).width();\n\t\t$('.swiper-container-horiz .pagination').animate({left:pagination_left+'%'});\t\t\n\t}", "function setWidth() {\r\n\t\t\t\tvar width;\r\n\t\t\t\tvar style = window.getComputedStyle ? window.getComputedStyle(ta, null) : false;\r\n\t\t\t\t\r\n\t\t\t\tif (style) {\r\n\r\n\t\t\t\t\twidth = ta.getBoundingClientRect().width;\r\n\r\n\t\t\t\t\tif (width === 0 || typeof width !== 'number') {\r\n\t\t\t\t\t\twidth = parseInt(style.width,10);\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t$.each(['paddingLeft', 'paddingRight', 'borderLeftWidth', 'borderRightWidth'], function(i,val){\r\n\t\t\t\t\t\twidth -= parseInt(style[val],10);\r\n\t\t\t\t\t});\r\n\t\t\t\t} else {\r\n\t\t\t\t\twidth = $ta.width();\r\n\t\t\t\t}\r\n\r\n\t\t\t\tmirror.style.width = Math.max(width,0) + 'px';\r\n\t\t\t}", "function setWidth() {\n\t\t\t\tvar width;\n\t\t\t\tvar style = window.getComputedStyle ? window.getComputedStyle(ta, null) : false;\n\t\t\t\t\n\t\t\t\tif (style) {\n\n\t\t\t\t\twidth = ta.getBoundingClientRect().width;\n\n\t\t\t\t\tif (width === 0 || typeof width !== 'number') {\n\t\t\t\t\t\twidth = parseInt(style.width,10);\n\t\t\t\t\t}\n\n\t\t\t\t\t$.each(['paddingLeft', 'paddingRight', 'borderLeftWidth', 'borderRightWidth'], function(i,val){\n\t\t\t\t\t\twidth -= parseInt(style[val],10);\n\t\t\t\t\t});\n\t\t\t\t} else {\n\t\t\t\t\twidth = $ta.width();\n\t\t\t\t}\n\n\t\t\t\tmirror.style.width = Math.max(width,0) + 'px';\n\t\t\t}", "function setWidth() {\n\t\t\t\tvar width;\n\t\t\t\tvar style = window.getComputedStyle ? window.getComputedStyle(ta, null) : false;\n\t\t\t\t\n\t\t\t\tif (style) {\n\n\t\t\t\t\twidth = ta.getBoundingClientRect().width;\n\n\t\t\t\t\tif (width === 0 || typeof width !== 'number') {\n\t\t\t\t\t\twidth = parseInt(style.width,10);\n\t\t\t\t\t}\n\n\t\t\t\t\t$.each(['paddingLeft', 'paddingRight', 'borderLeftWidth', 'borderRightWidth'], function(i,val){\n\t\t\t\t\t\twidth -= parseInt(style[val],10);\n\t\t\t\t\t});\n\t\t\t\t} else {\n\t\t\t\t\twidth = $ta.width();\n\t\t\t\t}\n\n\t\t\t\tmirror.style.width = Math.max(width,0) + 'px';\n\t\t\t}", "function setWidth() {\n\t\t\t\tvar width;\n\t\t\t\tvar style = window.getComputedStyle ? window.getComputedStyle(ta, null) : false;\n\t\t\t\t\n\t\t\t\tif (style) {\n\n\t\t\t\t\twidth = ta.getBoundingClientRect().width;\n\n\t\t\t\t\tif (width === 0 || typeof width !== 'number') {\n\t\t\t\t\t\twidth = parseInt(style.width,10);\n\t\t\t\t\t}\n\n\t\t\t\t\t$.each(['paddingLeft', 'paddingRight', 'borderLeftWidth', 'borderRightWidth'], function(i,val){\n\t\t\t\t\t\twidth -= parseInt(style[val],10);\n\t\t\t\t\t});\n\t\t\t\t} else {\n\t\t\t\t\twidth = $ta.width();\n\t\t\t\t}\n\n\t\t\t\tmirror.style.width = Math.max(width,0) + 'px';\n\t\t\t}", "left(value = '') {\n this._rightOffset = '';\n this._leftOffset = value;\n this._justifyContent = 'flex-start';\n return this;\n }", "function makeLeftTemplate() {\n var startX = width;\n var jogLeft = startX - parenWidth;\n var nearLeft = -(width * nearFactor);\n var farLeft = -(width * farFactor);\n\n return makeSVGTemplate(width, height,\n [['M', [startX, top]],\n ['L', [jogLeft, top]],\n // Draw the far edge.\n ['Q', [farLeft, midY, jogLeft, bottom]],\n ['M', [jogLeft, bottom]],\n ['L', [startX, bottom]],\n // Draw the near edge.\n ['Q', [nearLeft, midY, startX, top]]]);\n }", "function setPaneDimensions() {\n\t\tpane_width = element.width();\n\t\tpanes.each(function() {\n\t\t\t$(this).width(pane_width);\n\t\t});\n\t\tcontainer.width(pane_width*pane_count);\n\t\t}", "setLeftColapsedMenuSize() {\n\t\t// When counting position we need compensate a pixel\n\t\tconst fixOffsetPosition = 1;\n\t\tif (this.isWindowFixed && this._window) {\n\t\t\tconst height = this._window.bodyEl.offsetHeight - this._window.defaultBorderSize - fixOffsetPosition;\n\t\t\tconst diff = (this.element.offsetLeft - this._window._dialog.offsetLeft) - this._window.bodyEl.offsetLeft;\n\t\t\tlet width = this._window.bodyEl.offsetWidth - diff - this._window.defaultBorderSize - fixOffsetPosition;\n\t\t\tthis.element.style.height = height + 'px';\n\t\t\tthis.element.style['min-height'] = height + 'px';\n\t\t\tthis.element.style['max-width'] = width + 'px';\n\t\t} else {\n\t\t\tthis.element.style.height = '100%';\n\t\t\tthis.element.style['max-height'] = '100%';\n\t\t}\n\t}", "_moveHandles() {\n const calculatePercent = (value) => (value - this.min) / (this.max - this.min) * 100;\n const labelValue = [];\n\n // Set the handle position as a percentage based on the stored values\n if (this._elements.handles.length === 1) {\n const handle = this._elements.handles[0];\n const percent = calculatePercent(this._values[0]);\n handle.style.left = `${percent}%`;\n\n handle.previousElementSibling.style.width = `${percent}%`;\n handle.nextElementSibling.style.width = `${100 - percent}%`;\n\n labelValue.push(this._getLabel(this._values[0]));\n } else {\n const leftHandle = this._elements.handles[0];\n const leftPercent = calculatePercent(this._values[0]);\n leftHandle.style.left = `${leftPercent}%`;\n\n const rightHandle = this._elements.handles[1];\n const rightPercent = calculatePercent(this._values[1]);\n rightHandle.style.left = `${rightPercent}%`;\n\n leftHandle.previousElementSibling.style.width = `${leftPercent}%`;\n leftHandle.nextElementSibling.style.left = `${leftPercent}%`;\n\n const middlePercent = 100 - rightPercent;\n leftHandle.nextElementSibling.style.right = `${middlePercent}%`;\n rightHandle.nextElementSibling.style.width = `${middlePercent}%`;\n\n labelValue.push(this._getLabel(this._values[0]));\n labelValue.push(this._getLabel(this._values[1]));\n }\n\n this._elements.labelValue.textContent = labelValue.length > 1 ? labelValue.join(' - ') : labelValue[0];\n }", "function setSlidePositions () {\n slidePositions = [0];\n var attr = horizontal ? 'left' : 'top',\n attr2 = horizontal ? 'right' : 'bottom',\n base = slideItems[0].getBoundingClientRect()[attr];\n\n forEach(slideItems, function(item, i) {\n // skip the first slide\n if (i) { slidePositions.push(item.getBoundingClientRect()[attr] - base); }\n // add the end edge\n if (i === slideCountNew - 1) { slidePositions.push(item.getBoundingClientRect()[attr2] - base); }\n });\n }", "get _width() {\n // The container event's width is determined by the maximum number of\n // events in any of its rows.\n if (this.rows) {\n const columns =\n this.rows.reduce((max, row) => {\n return Math.max(max, row.leaves.length + 1) // add itself\n }, 0) + 1 // add the container\n\n return 100 / columns\n }\n\n const availableWidth = 100 - this.container._width\n\n // The row event's width is the space left by the container, divided\n // among itself and its leaves.\n if (this.leaves) {\n return availableWidth / (this.leaves.length + 1)\n }\n\n // The leaf event's width is determined by its row's width\n return this.row._width\n }", "function setWidths() {\n var unitWidth = getUnitWidth() - 20; // adjust for padding. for padding:0, make this 1\n $isocontainer.children(\":not(.width2)\").css({ width: unitWidth });\n $isocontainer.children(\".width2\").css({ width: (unitWidth * 2) });\n }", "function W(){var t=l.getBoundingClientRect(),e=\"offset\"+[\"Width\",\"Height\"][i.ort];return 0===i.ort?t.width||l[e]:t.height||l[e]}", "resizeToChildren() {\n let totalBounds = this.recurseThroughChildren(this, []);\n let minX;\n let minY;\n let maxX;\n let maxY;\n for (let bound in totalBounds) {\n if (!minX) {\n minX = this.x;\n maxX = totalBounds[bound].x + totalBounds[bound].width;\n minY = this.y;\n maxY = totalBounds[bound].y + totalBounds[bound].height\n continue;\n }\n if (totalBounds[bound].x + totalBounds[bound].width > maxX) {\n maxX = totalBounds[bound].x + totalBounds[bound].width\n }\n if (totalBounds[bound].y + totalBounds[bound].height > maxY) {\n maxY = totalBounds[bound].y + totalBounds[bound].height\n }\n }\n this.x = minX;\n this.y = minY;\n this.width = maxX - minX;\n this.height = maxY - minY;\n this.sizeUpdated = true;\n }", "function SetDimentions(){\r\n\r\n refresh();\r\n\r\n var dd_height;\r\n var dd_width;\r\n \r\n // Set width\r\n if (options.width==\"related\") {dd_width=parent_element_width;};\r\n if (options.width.search(\"px\")>=0) {dd_width=options.width; }\r\n if (options.width==\"auto\") { dd_width=\"auto\"; }\r\n if (options.width.search(\"%\")>=0) {\r\n if (options.position==\"absolute\") {\r\n\r\n\r\n if (options.direction==\"right bottom\" || options.direction==\"right top\" || options.direction==\"right center\") {\r\n if (options.parent_distance==true) {\r\n var jj=screen_width-parent_element_width-offsetleft;\r\n var o_w=options.width.replace('%','');\r\n dd_width=(jj*o_w)/100;\r\n }\r\n else {\r\n \r\n var jj=screen_width-offsetleft;\r\n var o_w=options.width.replace('%','');\r\n dd_width=(jj*o_w)/100;\r\n }\r\n }\r\n if (options.direction==\"left bottom\" || options.direction==\"left top\" || options.direction==\"left center\" || options.direction==\"bottom left\" || options.direction==\"top left\" ) {\r\n if (options.parent_distance==true) {\r\n var jj=offsetleft;\r\n var o_w=options.width.replace('%','');\r\n dd_width=(jj*o_w)/100;\r\n }\r\n else {\r\n var jj=offsetleft+parent_element_width;\r\n var o_w=options.width.replace('%','');\r\n dd_width=(jj*o_w)/100;\r\n }\r\n }\r\n if (options.direction==\"bottom left\" || options.direction==\"top left\" ) {\r\n\r\n var jj=screen_width-offsetleft;\r\n var o_w=options.width.replace('%','');\r\n dd_width=(jj*o_w)/100;\r\n }\r\n if (options.direction==\"bottom right\" || options.direction==\"top right\" ) {\r\n\r\n var jj=offsetleft+parent_element_width;\r\n var o_w=options.width.replace('%','');\r\n dd_width=(jj*o_w)/100;\r\n \r\n }\r\n if (options.direction==\"bottom center\" || options.direction==\"top center\" || options.direction==\"center center\" ) {\r\n var jj=screen_width;\r\n var o_w=options.width.replace('%','');\r\n dd_width=(jj*o_w)/100;\r\n }\r\n\r\n if (options.constrain_element!='none' && options.parent_distance==false) {\r\n \r\n var jj=parent_element_width;\r\n var o_w=options.width.replace('%','');\r\n dd_width=(jj*o_w)/100;\r\n\r\n \r\n }\r\n \r\n dd_width=dd_width+\"px\";\r\n }\r\n\r\n if (options.position==\"relative\" || options.position==\"fixed\") {\r\n dd_width=options.width;\r\n }\r\n \r\n }\r\n\r\n // set Height\r\n\r\n if (options.height==\"related\") {dd_height=parent_element_height;};\r\n if (options.height.search(\"px\")>=0) {dd_height=options.height; }\r\n if (options.height==\"auto\") { dd_height=\"auto\"; }\r\n if (options.height.search(\"%\")>=0) {\r\n if (options.position==\"absolute\") {\r\n \r\n\r\n if (options.direction==\"bottom right\" || options.direction==\"bottom left\" || options.direction==\"bottom center\" ) {\r\n \r\n \r\n kk=$(document).height()-screen_height;\r\n\r\n if (offsettop<kk) {\r\n var jj=screen_height;\r\n var o_w=options.height.replace('%','');\r\n dd_height=(jj*o_w)/100;\r\n }\r\n else {\r\n \r\n if (options.parent_distance==true) {\r\n var jj=$(document).height()-offsettop-parent_element_height;\r\n var o_w=options.height.replace('%','');\r\n dd_height=(jj*o_w)/100;\r\n \r\n }\r\n if (options.parent_distance==false) {\r\n\r\n var jj=$(document).height()-offsettop;\r\n var o_w=options.height.replace('%','');\r\n dd_height=(jj*o_w)/100;\r\n }\r\n }\r\n \r\n }\r\n if (options.direction==\"right bottom\" || options.direction==\"left bottom\"){\r\n \r\n kk=$(document).height()-screen_height;\r\n\r\n if (offsettop<kk) {\r\n var jj=screen_height;\r\n var o_w=options.height.replace('%','');\r\n dd_height=(jj*o_w)/100;\r\n }\r\n\r\n else {\r\n \r\n var jj=$(document).height()-offsettop;\r\n var o_w=options.height.replace('%','');\r\n dd_height=(jj*o_w)/100;\r\n }\r\n }\r\n \r\n if (options.direction==\"top right\" || options.direction==\"top left\" || options.direction==\"top center\" ) {\r\n if (options.parent_distance==true) {\r\n var jj=offsettop;\r\n var o_w=options.height.replace('%','');\r\n dd_height=(jj*o_w)/100;\r\n\r\n }\r\n else {\r\n var jj=offsettop+parent_element_height;\r\n var o_w=options.height.replace('%','');\r\n dd_height=(jj*o_w)/100;\r\n }\r\n if (offsettop>screen_height) {\r\n var jj=screen_height;\r\n var o_w=options.height.replace('%','');\r\n dd_height=(jj*o_w)/100;\r\n };\r\n }\r\n\r\n if (options.direction==\"right top\" || options.direction==\"left top\"){\r\n var jj=offsettop+parent_element_height;\r\n var o_w=options.height.replace('%','');\r\n dd_height=(jj*o_w)/100;\r\n if (offsettop>screen_height) {\r\n var jj=screen_height;\r\n var o_w=options.height.replace('%','');\r\n dd_height=(jj*o_w)/100;\r\n };\r\n }\r\n if (options.direction==\"left center\" || options.direction==\"right center\" || options.direction==\"center center\" ) {\r\n var jj=screen_height;\r\n var o_w=options.height.replace('%','');\r\n dd_height=(jj*o_w)/100;\r\n }\r\n if (options.constrain_element!='none' && options.parent_distance==false) {\r\n \r\n var jj=parent_element_height;\r\n var o_w=options.height.replace('%','');\r\n dd_height=(jj*o_w)/100;\r\n\r\n \r\n }\r\n \r\n dd_height=dd_height+\"px\";\r\n }\r\n if (options.position==\"relative\" || options.position==\"fixed\") {\r\n dd_height=options.height;\r\n }\r\n }\r\n\r\n //Set the Height and Width in the element \r\n \r\n\r\n if (options.height.search(\"px\")>=0 || options.height.search(\"%\")>=0 && options.position!=\"relative\") {\r\n child_element_height=dd_height.replace('px','');}\r\n if (options.width.search(\"px\")>=0 || options.width.search(\"%\")>=0 && options.position!=\"relative\") {\r\n child_element_width=dd_width.replace('px','');}\r\n\r\n if (options.position==\"relative\" && options.height.search(\"%\")>=0) {\r\n child_element_height=dd_height;\r\n }\r\n if (options.position==\"relative\" && options.width.search(\"%\")>=0) {\r\n child_element_width=dd_width;\r\n }\r\n\r\n if (options.height==\"related\" ) { child_element_height=dd_height; }\r\n if (options.width==\"related\" ) { child_element_width=dd_width; }\r\n\r\n \r\n \r\n\r\n\r\n child_element.css({ width: dd_width, height: dd_height });\r\n\r\n }", "function setPaneDimensions() {\n pane_width = $(window).width();\n\t\t\t\n panes.each(function() {\n $(this).width(pane_width);\n });\n\n container.width(pane_width*pane_count);\n\t\t\t\n\t\t\t\n\t\t\n\n }", "function setPaneDimensions() {\n pane_width = $(window).width();\n\t\t\t\n panes.each(function() {\n $(this).width(pane_width);\n });\n\n container.width(pane_width*pane_count);\n\t\t\t\n\t\t\t\n\t\t\n\n }", "_getExtraLeftWidth(_id) {\n return this._getExtraSize(_id, 'left');\n }", "_getExtraLeftWidth(_id) {\n return this._getExtraSize(_id, 'left');\n }", "function drawLeftRight(left, n) {\n\t \t\tif(left) {\n\t \t\t\t\tvar a = [(main.segments[0].point.x + main.segments[3].point.x)/2, (main.segments[0].point.y + main.segments[3].point.y)/2]\n\t \t\t\t//console.log(a);\n\t \t\t\tvar b = [(main.segments[4].point.x + main.segments[5].point.x)/2, (main.segments[4].point.y + main.segments[5].point.y)/2];\n\t \t\t\t}\n\t \t\t\telse {\n\t \t\t\t\tvar a = [(main.segments[0].point.x + main.segments[3].point.x)/2, (main.segments[0].point.y + main.segments[3].point.y)/2]\n\t \t\t\t//console.log(a);\n\t \t\t\tvar b = [(main.segments[1].point.x + main.segments[2].point.x)/2, (main.segments[1].point.y + main.segments[2].point.y)/2];\n\t \t\t\t}\n\n\t \t\tvar x = a[0]-b[0];\n\t \t\tvar y = a[1]-b[1];\n\t \t\tvar dist = Math.sqrt(x*x + y*y);\n\t \t\t// depending on the number of figures\n\t \t\tvar step = dist/(n+1);\n\t \t\tfor (var i = 1; i <= n; i++) {\n\t \t\t\tvar new_x = a[0]-((step*i)*(a[0]-b[0]))/dist;\n\t \t\t\tvar new_y = a[1]-((step*i)*(a[1]-b[1]))/dist;\n\t \t\t\tvar new_coord = [new_x, new_y];\n\t \t\t\tvar raster = getFigur(fig);\n\t \t\t\traster.bounds.x = 0;\n\t\t \t\traster.bounds.y = 0;\n\t\t \t\traster.bounds.width = max*0.4;\n\t\t \t\traster.bounds.height = max*0.4;\n\t\t \t\traster.position = new paper.Point(new_x, new_y);\n\n\t\t \t\tgroup.addChild(raster);\n\t \t\t}\n\t \t}", "function setLeftColumnWidth(width) {\n document.getElementById(\"leftColumn\").style.width = width + \"px\";\n}", "function setWidths(evt) {\n let newColWidth = (resize.colStartWidth + evt.clientX - resize.startX),\n newSibWidth = (resize.sibStartWidth - evt.clientX + resize.startX),\n numToPercentString = (num) => {\n return num.toString() + '%';\n },\n percent = (width) => {\n return (width / resize.rowWidth * 100);\n },\n colWidthPercent = percent(newColWidth),\n sibWidthPercent = percent(newSibWidth);\n\n column.dataset.colWidth = numToPercentString(Math.round(colWidthPercent));\n sibling.dataset.colWidth = numToPercentString(Math.round(sibWidthPercent));\n\n column.style.width = numToPercentString(colWidthPercent);\n sibling.style.width = numToPercentString(sibWidthPercent);\n }", "function positionSlides(slides){\nfor (let index=0; index<slides.length;index++){\nslides[index].style.left=slideWidth * index +\"px\";\n}\n\n}", "set LeftCenter(value) {}", "cutFromLeft(x) {\n if (x < this.clientActiveArea.x) {\n x = this.clientActiveArea.x;\n }\n if (x > this.clientActiveArea.right && this.textWrap) {\n x = this.clientActiveArea.right;\n }\n this.clientActiveArea.width = this.clientActiveArea.right > x ? this.clientActiveArea.right - x : 0;\n this.clientActiveArea.x = x;\n }", "function setStyle(val) {\n document.getElementById(\" \").style.left = val + \"px\";\n}", "function moveLeft () {\n\t\tvar hiddenRight \t= $(window).width() - $ps_albums.offset().left;\n\t\n\t\tvar cnt = 0;\n\t\tvar last= first+3;\n\t\t$ps_albums.children('div:nth-child('+last+')').animate({'left': hiddenRight + 'px','opacity':0},500,function(){\n\t\t\t\tvar $this = $(this);\n\t\t\t\t$ps_albums.children('div').slice(parseInt(last-4),parseInt(last-1)).each(\n\t\t\t\t\tfunction(i){\n\t\t\t\t\t\tvar $elem = $(this);\n\t\t\t\t\t\t$elem.animate({'left': positions[i+1] + 'px'},800,function(){\n\t\t\t\t\t\t\t++cnt;\n\t\t\t\t\t\t\tif(cnt == 3){\n\t\t\t\t\t\t\t\t$ps_albums.children('div:nth-child('+parseInt(last-4)+')').animate({'left': positions[0] + 'px','opacity':1},500,function(){\n\t\t\t\t\t\t\t\t\t//$this.hide();\n\t\t\t\t\t\t\t\t\t--first;\n\t\t\t\t\t\t\t\t\tenableNavRight();\n\t\t\t\t\t\t\t\t\tif(first > 1){\n\t\t\t\t\t\t\t\t\t\tenableNavLeft();\n\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\tTempdisableNavLeft();\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t}\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t);\n\t\t});\n\t}", "function correctHorizontalAlignment(){var dropdown=elements.scrollContainer.getBoundingClientRect(),styles={};if(dropdown.right>root.right-MENU_PADDING){styles.left=hrect.right-dropdown.width+'px';}elements.$.scrollContainer.css(styles);}", "function updateContainers() {\n\n\t\tvar width = editor.duration * scale;\n\n\t\telements.setWidth( width + 'px' );\n\t\t// curves.setWidth( width + 'px' );\n\n\t}", "function setWidth() {\n\t\t\t\tvar width;\n\t\t\t\tvar style = window.getComputedStyle ? window.getComputedStyle(ta, null) : null;\n\n\t\t\t\tif (style) {\n\t\t\t\t\twidth = parseFloat(style.width);\n\t\t\t\t\tif (style.boxSizing === 'border-box' || style.webkitBoxSizing === 'border-box' || style.mozBoxSizing === 'border-box') {\n\t\t\t\t\t\t$.each(['paddingLeft', 'paddingRight', 'borderLeftWidth', 'borderRightWidth'], function(i,val){\n\t\t\t\t\t\t\twidth -= parseFloat(style[val]);\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\twidth = $ta.width();\n\t\t\t\t}\n\n\t\t\t\tmirror.style.width = Math.max(width,0) + 'px';\n\t\t\t}", "set width (width) { this._width = width }", "function setWidth() {\r\n /*determind the siblings of the box in focus*/\r\n var boxSiblings = $(this).siblings();\r\n /*count the number of siblings a box has*/\r\n var numberOfSiblings = boxSiblings.length;\r\n /*determine the size the box should scale to*/\r\n var lg = newFeatureBoxWidth;\r\n var lgString = lg + \"%\";\r\n /*determine the remaining space int eh row after the box has scaled*/\r\n var rem = (100 - lg) / numberOfSiblings;\r\n var remString = rem + \"%\";\r\n /*determine which box should be scaled*/\r\n var boxFocus = $(this);\r\n\r\n /*disable box scaling on mobile/devices smaller than 769px*/\r\n if ($(window).width() >= 769) {\r\n TweenLite.to(boxFocus, 0.5, {width: lgString});\r\n TweenLite.to(boxSiblings, 0.5, {width: remString});\r\n }\r\n }", "get left () { return this.x - this.size / 2 }", "putLeft(b, xOffset = 0, yOffset = 0) {\n let a = this\n b.x = (a.x - b.width) + xOffset\n b.y = (a.y + a.halfHeight - b.halfHeight) + yOffset\n }", "function correctHorizontalAlignment () {\n var dropdown = elements.scrollContainer.getBoundingClientRect(),\n styles = {};\n if (dropdown.right > root.right - MENU_PADDING) {\n styles.left = (hrect.right - dropdown.width) + 'px';\n }\n elements.$.scrollContainer.css(styles);\n }", "function correctHorizontalAlignment () {\n var dropdown = elements.scrollContainer.getBoundingClientRect(),\n styles = {};\n if (dropdown.right > root.right - MENU_PADDING) {\n styles.left = (hrect.right - dropdown.width) + 'px';\n }\n elements.$.scrollContainer.css(styles);\n }", "function correctHorizontalAlignment () {\n var dropdown = elements.scrollContainer.getBoundingClientRect(),\n styles = {};\n if (dropdown.right > root.right - MENU_PADDING) {\n styles.left = (hrect.right - dropdown.width) + 'px';\n }\n elements.$.scrollContainer.css(styles);\n }", "function _increaseWidth(){\n layout.changeWidth(1);\n }" ]
[ "0.60891944", "0.6068485", "0.5977803", "0.5767581", "0.56749994", "0.5655121", "0.5632199", "0.5585059", "0.54951835", "0.5461566", "0.5442458", "0.54317987", "0.5415897", "0.5406584", "0.5394419", "0.537315", "0.53341174", "0.52927583", "0.5290128", "0.52874357", "0.52577084", "0.52227265", "0.52078897", "0.51873", "0.51772153", "0.5114018", "0.5113138", "0.50961584", "0.5089537", "0.50810856", "0.5078674", "0.5066341", "0.5053406", "0.5047442", "0.50400203", "0.50347537", "0.5032873", "0.5021378", "0.5020586", "0.50097126", "0.5009596", "0.50082815", "0.5007042", "0.49924365", "0.49880424", "0.4986368", "0.49835867", "0.4978325", "0.49677303", "0.4963019", "0.49603167", "0.4947699", "0.49406922", "0.49402824", "0.4937037", "0.4937037", "0.49297294", "0.49290738", "0.4924821", "0.4921315", "0.4921315", "0.4921315", "0.49194872", "0.4902524", "0.4900723", "0.4899374", "0.48976785", "0.48916394", "0.48873162", "0.48864096", "0.48848522", "0.48804164", "0.48789683", "0.48689535", "0.48689535", "0.4864717", "0.4864717", "0.48643368", "0.48642617", "0.48641363", "0.4863801", "0.4860122", "0.48345044", "0.48280406", "0.4824945", "0.48230067", "0.48216528", "0.48186946", "0.48109618", "0.48034668", "0.47980496", "0.47966513", "0.47955582", "0.47955582", "0.47955582", "0.47893894" ]
0.705896
3
Build a concatenated HTML string for an array of segments
function buildHTML(segments) { var html = ''; for (var i=0; i<segments.length; i++) { html += buildHTMLForSegment(segments[i]); } return html; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function combineSegments() {\n\t\tvar result = '';\n\t\ttotalSegments = segments.length;\n\t\tfor (var i = 0; i < segments.length; i++) {\n\t\t\tif (segments[i].isEmpty()) {\n\t\t\t\ttotalSegments--;\n\t\t\t\tcontinue;\n\t\t\t\t\n\t\t\t}\n\t\t\tresult += segments[i].asText();\n\t\t}\n\t\treturn result;\n\t}", "function buildHTMLForSegment(segment) {\n\t\tvar html = '';\n\t\tvar isRTL = opt('isRTL');\n\t\tvar event = segment.event;\n\t\tvar url = event.url;\n\n\t\t// generate the list of CSS classNames\n\t\tvar classNames = [ 'fc-event', 'fc-event-hori' ];\n\t\tif (isEventDraggable(event)) {\n\t\t\tclassNames.push('fc-event-draggable');\n\t\t}\n\t\tif (segment.isStart) {\n\t\t\tclassNames.push('fc-event-start');\n\t\t}\n\t\tif (segment.isEnd) {\n\t\t\tclassNames.push('fc-event-end');\n\t\t}\n\t\t// use the event's configured classNames\n\t\t// guaranteed to be an array via `normalizeEvent`\n\t\tclassNames = classNames.concat(event.className);\n\t\tif (event.source) {\n\t\t\t// use the event's source's classNames, if specified\n\t\t\tclassNames = classNames.concat(event.source.className || []);\n\t\t}\n\n\t\t// generate a semicolon delimited CSS string for any of the \"skin\" properties\n\t\t// of the event object (`backgroundColor`, `borderColor` and such)\n\t\tvar skinCss = getSkinCss(event, opt);\n\n\t\tif (url) {\n\t\t\thtml += \"<a href='\" + htmlEscape(url) + \"'\";\n\t\t}else{\n\t\t\thtml += \"<div\";\n\t\t}\n\t\thtml +=\n\t\t\t\" class='\" + classNames.join(' ') + \"'\" +\n\t\t\t\" style=\" +\n\t\t\t\t\"'\" +\n\t\t\t\t\"position:absolute;\" +\n\t\t\t\t\"left:\" + segment.left + \"px;\" +\n\t\t\t\tskinCss +\n\t\t\t\t\"'\" +\n\t\t\t\">\" +\n\t\t\t\"<div class='fc-event-inner'>\";\n\t\tif (!event.allDay && segment.isStart) {\n\t\t\thtml +=\n\t\t\t\t\"<span class='fc-event-time'>\" +\n\t\t\t\thtmlEscape(\n\t\t\t\t\tformatDates(event.start, event.end, opt('timeFormat'))\n\t\t\t\t) +\n\t\t\t\t\"</span>\";\n\t\t}\n\t\thtml +=\n\t\t\t\"<span class='fc-event-title'>\" +\n\t\t\thtmlEscape(event.title || '') +\n\t\t\t\"</span>\" +\n\t\t\t\"</div>\";\n\t\tif (segment.isEnd && isEventResizable(event)) {\n\t\t\thtml +=\n\t\t\t\t\"<div class='ui-resizable-handle ui-resizable-\" + (isRTL ? 'w' : 'e') + \"'>\" +\n\t\t\t\t\"&nbsp;&nbsp;&nbsp;\" + // makes hit area a lot better for IE6/7\n\t\t\t\t\"</div>\";\n\t\t}\n\t\thtml += \"</\" + (url ? \"a\" : \"div\") + \">\";\n\n\t\t// TODO:\n\t\t// When these elements are initially rendered, they will be briefly visibile on the screen,\n\t\t// even though their widths/heights are not set.\n\t\t// SOLUTION: initially set them as visibility:hidden ?\n\n\t\treturn html;\n\t}", "function buildHTMLForSegment(segment) {\n\t\tvar html = '';\n\t\tvar isRTL = opt('isRTL');\n\t\tvar event = segment.event;\n\t\tvar url = event.url;\n\n\t\t// generate the list of CSS classNames\n\t\tvar classNames = [ 'fc-event', 'fc-event-hori' ];\n\t\tif (isEventDraggable(event)) {\n\t\t\tclassNames.push('fc-event-draggable');\n\t\t}\n\t\tif (segment.isStart) {\n\t\t\tclassNames.push('fc-event-start');\n\t\t}\n\t\tif (segment.isEnd) {\n\t\t\tclassNames.push('fc-event-end');\n\t\t}\n\t\t// use the event's configured classNames\n\t\t// guaranteed to be an array via `normalizeEvent`\n\t\tclassNames = classNames.concat(event.className);\n\t\tif (event.source) {\n\t\t\t// use the event's source's classNames, if specified\n\t\t\tclassNames = classNames.concat(event.source.className || []);\n\t\t}\n\n\t\t// generate a semicolon delimited CSS string for any of the \"skin\" properties\n\t\t// of the event object (`backgroundColor`, `borderColor` and such)\n\t\tvar skinCss = getSkinCss(event, opt);\n\n\t\tif (url) {\n\t\t\thtml += \"<a href='\" + htmlEscape(url) + \"'\";\n\t\t}else{\n\t\t\thtml += \"<div\";\n\t\t}\n\t\thtml +=\n\t\t\t\" class='\" + classNames.join(' ') + \"'\" +\n\t\t\t\" style=\" +\n\t\t\t\t\"'\" +\n\t\t\t\t\"position:absolute;\" +\n\t\t\t\t\"left:\" + segment.left + \"px;\" +\n\t\t\t\tskinCss +\n\t\t\t\t\"'\" +\n\t\t\t\">\" +\n\t\t\t\"<div class='fc-event-inner'>\";\n\t\tif (!event.allDay && segment.isStart) {\n\t\t\thtml +=\n\t\t\t\t\"<span class='fc-event-time'>\" +\n\t\t\t\thtmlEscape(\n\t\t\t\t\tformatDates(event.start, event.end, opt('timeFormat'))\n\t\t\t\t) +\n\t\t\t\t\"</span>\";\n\t\t}\n\t\thtml +=\n\t\t\t\"<span class='fc-event-title'>\" +\n\t\t\thtmlEscape(event.title || '') +\n\t\t\t\"</span>\" +\n\t\t\t\"</div>\";\n\t\tif (segment.isEnd && isEventResizable(event)) {\n\t\t\thtml +=\n\t\t\t\t\"<div class='ui-resizable-handle ui-resizable-\" + (isRTL ? 'w' : 'e') + \"'>\" +\n\t\t\t\t\"&nbsp;&nbsp;&nbsp;\" + // makes hit area a lot better for IE6/7\n\t\t\t\t\"</div>\";\n\t\t}\n\t\thtml += \"</\" + (url ? \"a\" : \"div\") + \">\";\n\n\t\t// TODO:\n\t\t// When these elements are initially rendered, they will be briefly visibile on the screen,\n\t\t// even though their widths/heights are not set.\n\t\t// SOLUTION: initially set them as visibility:hidden ?\n\n\t\treturn html;\n\t}", "function buildHTMLForSegment(segment) {\n\t\tvar html = '';\n\t\tvar isRTL = opt('isRTL');\n\t\tvar event = segment.event;\n\t\tvar url = event.url;\n\n\t\t// generate the list of CSS classNames\n\t\tvar classNames = [ 'fc-event', 'fc-event-hori' ];\n\t\tif (isEventDraggable(event)) {\n\t\t\tclassNames.push('fc-event-draggable');\n\t\t}\n\t\tif (segment.isStart) {\n\t\t\tclassNames.push('fc-event-start');\n\t\t}\n\t\tif (segment.isEnd) {\n\t\t\tclassNames.push('fc-event-end');\n\t\t}\n\t\t// use the event's configured classNames\n\t\t// guaranteed to be an array via `normalizeEvent`\n\t\tclassNames = classNames.concat(event.className);\n\t\tif (event.source) {\n\t\t\t// use the event's source's classNames, if specified\n\t\t\tclassNames = classNames.concat(event.source.className || []);\n\t\t}\n\n\t\t// generate a semicolon delimited CSS string for any of the \"skin\" properties\n\t\t// of the event object (`backgroundColor`, `borderColor` and such)\n\t\tvar skinCss = getSkinCss(event, opt);\n\n\t\tif (url) {\n\t\t\thtml += \"<a href='\" + htmlEscape(url) + \"'\";\n\t\t}else{\n\t\t\thtml += \"<div\";\n\t\t}\n\t\thtml +=\n\t\t\t\" class='\" + classNames.join(' ') + \"'\" +\n\t\t\t\" style=\" +\n\t\t\t\t\"'\" +\n\t\t\t\t\"position:absolute;\" +\n\t\t\t\t\"left:\" + segment.left + \"px;\" +\n\t\t\t\tskinCss +\n\t\t\t\t\"'\" +\n\t\t\t\">\" +\n\t\t\t\"<div class='fc-event-inner'>\";\n\t\tif (!event.allDay && segment.isStart) {\n\t\t\thtml +=\n\t\t\t\t\"<span class='fc-event-time'>\" +\n\t\t\t\thtmlEscape(\n\t\t\t\t\tformatDates(event.start, event.end, opt('timeFormat'))\n\t\t\t\t) +\n\t\t\t\t\"</span>\";\n\t\t}\n\t\thtml +=\n\t\t\t\"<span class='fc-event-title'>\" +\n\t\t\thtmlEscape(event.title || '') +\n\t\t\t\"</span>\" +\n\t\t\t\"</div>\";\n\t\tif (segment.isEnd && isEventResizable(event)) {\n\t\t\thtml +=\n\t\t\t\t\"<div class='ui-resizable-handle ui-resizable-\" + (isRTL ? 'w' : 'e') + \"'>\" +\n\t\t\t\t\"   \" + // makes hit area a lot better for IE6/7\n\t\t\t\t\"</div>\";\n\t\t}\n\t\thtml += \"</\" + (url ? \"a\" : \"div\") + \">\";\n\n\t\t// TODO:\n\t\t// When these elements are initially rendered, they will be briefly visibile on the screen,\n\t\t// even though their widths/heights are not set.\n\t\t// SOLUTION: initially set them as visibility:hidden ?\n\n\t\treturn html;\n\t}", "function buildHTMLForSegment(segment) {\n\t\tvar html = '';\n\t\tvar isRTL = opt('isRTL');\n\t\tvar event = segment.event;\n\t\tvar url = event.url;\n\n\t\t// generate the list of CSS classNames\n\t\tvar classNames = [ 'fc-event', 'fc-event-hori' ];\n\t\tif (isEventDraggable(event)) {\n\t\t\tclassNames.push('fc-event-draggable');\n\t\t}\n\t\tif (segment.isStart) {\n\t\t\tclassNames.push('fc-event-start');\n\t\t}\n\t\tif (segment.isEnd) {\n\t\t\tclassNames.push('fc-event-end');\n\t\t}\n\t\t// use the event's configured classNames\n\t\t// guaranteed to be an array via `buildEvent`\n\t\tclassNames = classNames.concat(event.className);\n\t\tif (event.source) {\n\t\t\t// use the event's source's classNames, if specified\n\t\t\tclassNames = classNames.concat(event.source.className || []);\n\t\t}\n\n\t\t// generate a semicolon delimited CSS string for any of the \"skin\" properties\n\t\t// of the event object (`backgroundColor`, `borderColor` and such)\n\t\tvar skinCss = getSkinCss(event, opt);\n\n\t\tif (url) {\n\t\t\thtml += \"<a href='\" + htmlEscape(url) + \"'\";\n\t\t}else{\n\t\t\thtml += \"<div\";\n\t\t}\n\t\thtml +=\n\t\t\t\" class='\" + classNames.join(' ') + \"'\" +\n\t\t\t\" style=\" +\n\t\t\t\t\"'\" +\n\t\t\t\t\"position:absolute;\" +\n\t\t\t\t\"left:\" + segment.left + \"px;\" +\n\t\t\t\tskinCss +\n\t\t\t\t\"'\" +\n\t\t\t\">\" +\n\t\t\t\"<div class='fc-event-inner'>\";\n\t\tif (!event.allDay && segment.isStart) {\n\t\t\thtml +=\n\t\t\t\t\"<span class='fc-event-time'>\" +\n\t\t\t\thtmlEscape(t.getEventTimeText(event)) +\n\t\t\t\t\"</span>\";\n\t\t}\n\t\thtml +=\n\t\t\t\"<span class='fc-event-title'>\" +\n\t\t\thtmlEscape(event.title || '') +\n\t\t\t\"</span>\" +\n\t\t\t\"</div>\";\n\t\tif (event.allDay && segment.isEnd && isEventResizable(event)) {\n\t\t\thtml +=\n\t\t\t\t\"<div class='ui-resizable-handle ui-resizable-\" + (isRTL ? 'w' : 'e') + \"'>\" +\n\t\t\t\t\"&nbsp;&nbsp;&nbsp;\" + // makes hit area a lot better for IE6/7\n\t\t\t\t\"</div>\";\n\t\t}\n\t\thtml += \"</\" + (url ? \"a\" : \"div\") + \">\";\n\n\t\t// TODO:\n\t\t// When these elements are initially rendered, they will be briefly visibile on the screen,\n\t\t// even though their widths/heights are not set.\n\t\t// SOLUTION: initially set them as visibility:hidden ?\n\n\t\treturn html;\n\t}", "function buildHTMLForSegment(segment) {\n\t\tvar html = '';\n\t\tvar isRTL = opt('isRTL');\n\t\tvar event = segment.event;\n\t\tvar url = event.url;\n\n\t\t// generate the list of CSS classNames\n\t\tvar classNames = [ 'fc-event', 'fc-event-hori' ];\n\t\tif (isEventDraggable(event)) {\n\t\t\tclassNames.push('fc-event-draggable');\n\t\t}\n\t\tif (segment.isStart) {\n\t\t\tclassNames.push('fc-event-start');\n\t\t}\n\t\tif (segment.isEnd) {\n\t\t\tclassNames.push('fc-event-end');\n\t\t}\n\t\t// use the event's configured classNames\n\t\t// guaranteed to be an array via `buildEvent`\n\t\tclassNames = classNames.concat(event.className);\n\t\tif (event.source) {\n\t\t\t// use the event's source's classNames, if specified\n\t\t\tclassNames = classNames.concat(event.source.className || []);\n\t\t}\n\n\t\t// generate a semicolon delimited CSS string for any of the \"skin\" properties\n\t\t// of the event object (`backgroundColor`, `borderColor` and such)\n\t\tvar skinCss = getSkinCss(event, opt);\n\n\t\tif (url) {\n\t\t\thtml += \"<a href='\" + htmlEscape(url) + \"'\";\n\t\t}else{\n\t\t\thtml += \"<div\";\n\t\t}\n\t\thtml +=\n\t\t\t\" class='\" + classNames.join(' ') + \"'\" +\n\t\t\t\" style=\" +\n\t\t\t\t\"'\" +\n\t\t\t\t\"position:absolute;\" +\n\t\t\t\t\"left:\" + segment.left + \"px;\" +\n\t\t\t\tskinCss +\n\t\t\t\t\"'\" +\n\t\t\t\">\" +\n\t\t\t\"<div class='fc-event-inner'>\";\n\t\tif (!event.allDay && segment.isStart) {\n\t\t\thtml +=\n\t\t\t\t\"<span class='fc-event-time'>\" +\n\t\t\t\thtmlEscape(\n\t\t\t\t\tformatDate(event.start, opt('timeFormat'))\n\t\t\t\t) +\n\t\t\t\t\"</span>\";\n\t\t}\n\t\thtml +=\n\t\t\t\"<span class='fc-event-title'>\" +\n\t\t\thtmlEscape(event.title || '') +\n\t\t\t\"</span>\" +\n\t\t\t\"</div>\";\n\t\tif (event.allDay && segment.isEnd && isEventResizable(event)) {\n\t\t\thtml +=\n\t\t\t\t\"<div class='ui-resizable-handle ui-resizable-\" + (isRTL ? 'w' : 'e') + \"'>\" +\n\t\t\t\t\"&nbsp;&nbsp;&nbsp;\" + // makes hit area a lot better for IE6/7\n\t\t\t\t\"</div>\";\n\t\t}\n\t\thtml += \"</\" + (url ? \"a\" : \"div\") + \">\";\n\n\t\t// TODO:\n\t\t// When these elements are initially rendered, they will be briefly visibile on the screen,\n\t\t// even though their widths/heights are not set.\n\t\t// SOLUTION: initially set them as visibility:hidden ?\n\n\t\treturn html;\n\t}", "function html(h, ...values){ return h.join('');}", "function writeHTML(array) { \n return `\n <!DOCTYPE html>\n <html lang=\"en\">\n \n <head>\n <meta charset=\"UTF-8\">\n <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">\n <meta http-equiv=\"X-UA-Compatible\" content=\"ie=edge\">\n <title>Team Profile Generator</title>\n <link rel=\"stylesheet\" href=\"https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.2/css/all.min.css\" integrity=\"sha512-HK5fgLBL+xu6dm/Ii3z4xhlSUyZgTT9tuc/hSrtw6uzJOvgRr2a9jyxxT1ely+B+xFAmJKVSTbpM/CuL7qxO8w==\" crossorigin=\"anonymous\" />\n <link rel=\"stylesheet\" href=\"./dist/style.css\">\n </head>\n\n <body>\n <header>\n <h1>\n Team Profile \n </h1>\n </header>\n\n <main>\n <div class=\"main\">\n ${writeEmployees(array)}\n </div>\n </main>\n </body>\n `\n}", "function printRoute (){\n for (i = 0; i < segmentKind.length; i++) {\n $('#routeText').append('<em>' + segmentKind[i] + '</em> ' + segmentNames[i] + ' <em>' + segmentDuration[i] + ' min</em><br>');\n }\n}", "function render(){\n var i = spans.length,\n span;\n while (i-- > 0) {\n span = spans[i];\n renderSpan(span.start, span.end);\n }\n}", "function recipes_steps_render(arrays){\n let html = '';\n arrays.forEach(function(e){\n html += `<li class=\"list-group-item pl-2\">${e}</li>`;\n });\n return html;\n }", "function createLabels(startIdx, nParts, nPartLen, interval, intervalStrings, segmentInterval){\n var lstring = new Array();\n var nextDate;\n \n //lets now try to compute the overall label for all these parts first before the for loop gets incremented\n // and throws it off by one. \n var datelabel = getDateLabel(segmentInterval);\n \n lstring.push('<table class=\"partstable\"><tbody><tr>');\n //add the total part labels to each segment\n if (interval != \"hours\")\n nextDate = parseInt(getNextDate(currentDate, interval,0));\n else\n nextDate = 0;\n for (var j = startIdx; j < nParts; j++){\n if (intervalStrings){\n lstring.push('<td id=\"part-' + interval + j + '\" class=\"parts commontreb\" style=\"width:' + nPartLen + 'px\">' + intervalStrings[nextDate] + '</td>');\n }\n else{\n lstring.push('<td id=\"part-' + interval + j + '\" class=\"parts commontreb\" style=\"width:' + nPartLen + 'px\">' + nextDate + '</td>'); \n }\n if (interval != \"hours\"){\n nextDate = parseInt(getNextDate(currentDate, interval,1));\n }\n else\n nextDate = j + 1;\n \n if ((interval == \"weeks\") && (j < (nParts - 1))){\n datelabel += getDateLabel(segmentInterval);\n }\n } //for ends\n lstring.push('</tr>');\n \n //now add the overall label for these parts\n if (segmentInterval == \"weeks\"){\n lstring.push('<tr>');\n lstring.push(datelabel);\n lstring.push('</tr>');\n }\n else{\n lstring.push('<tr><td class=\"tdates commontreb\" colspan = \"' + nParts + 'style=\"width:' + nPartLen * nParts + 'px\">' + datelabel + '</td></tr>');\n }\n lstring.push('</tbody></table>');\n \n //add all the segments to the content holder\n var labelstring = lstring.join('');\n \n return labelstring;\n }", "joinFragmentArrays(fragmentsList, joinStr) {\r\n\t\t\t\t\tvar answer, fragments, i, j, len1;\r\n\t\t\t\t\tanswer = [];\r\n\t\t\t\t\tfor (i = j = 0, len1 = fragmentsList.length; j < len1; i = ++j) {\r\n\t\t\t\t\t\tfragments = fragmentsList[i];\r\n\t\t\t\t\t\tif (i) {\r\n\t\t\t\t\t\t\tanswer.push(this.makeCode(joinStr));\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tanswer = answer.concat(fragments);\r\n\t\t\t\t\t}\r\n\t\t\t\t\treturn answer;\r\n\t\t\t\t}", "function getNav(arr) {\n return \"<nav>\\n\" + arr.map(x => \" <a href=\\\"\\\">\" + x + \"</a>\").join(\"\\n\") + \"\\n</nav>\";\n}", "function buildHTML() {\n //initialize html\n html = \"\";\n\n for(var i=0; i<elements.length; i++) {\n switch(elements[i].type) {\n case 'title':\n buildTitle(elements[i].options);\n break;\n case 'header':\n buildHeader(elements[i].options);\n break;\n case 'img-one':\n buildImageOne(elements[i].options);\n break;\n case 'img-two':\n buildImageTwo(elements[i].options);\n break;\n case 'img-three':\n buildImageThree(elements[i].options);\n break;\n case 'article-right':\n buildArticleRight(elements[i].options);\n break;\n case 'article-left':\n buildArticleLeft(elements[i].options);\n break;\n case 'text' :\n buildText(elements[i].options);\n break;\n \n }\n }\n buildEnd();\n\n document.getElementById('HTML').innerText = `${html}`;\n}", "function arrayToHtml() {\n let fullString = '';\n let tipsList = '';\n const startDiv = '<div>';\n const endDiv = '</div>';\n \n const lb = '<br>';\n let newTip = 0;\n let endTip = 2;\n const auth ='Submited By: ';\n const ti = 'Title: '\n \n for (i = 0; i < tips.length; i++)\n {\n if (i == newTip)\n { // start of new Tip add Div and author string\n fullString += startDiv + ti + tips[i] + lb;\n \n newTip += 3;\n } else if (i == endTip)\n { // end of Tip add text and close Div\n fullString += tips[i] + endDiv;\n endTip +=3;\n } else \n { // add Author data\n fullString += '<em>' + auth + tips[i] + '</em>' + lb + lb;\n }\n \n }\n \n document.getElementById(\"tipData\").innerHTML = fullString;\n // console.log(fullString);\n\n}", "function buildString(...template){\n return `I like ${template.join(',')}`;\n}", "formatSegments (isProtein) {\n\t\tvar variants = isProtein ? this.attributes.variantDataProtein : this.attributes.variantDataDna;\n\t\tvar sequences = isProtein ? this.attributes.alignedProteinSequences : this.attributes.alignedDnaSequences;\n\t\t// make sure they're sorted by start\n\t\tvariants = _.sortBy(variants, d => {\n\t\t\treturn d.start;\n\t\t});\n\n\t\t// merge segments\n\t\tvar mergedSegments = _.reduce(variants, (memo, d) => {\n\t\t\treturn this._mergeOrAddSegment(memo, d);\n\t\t}, []);\n\n\t\t// add in needed summarized segments\n\t\t// first one\n\t\tif (mergedSegments[0].start > 1) {\n\t\t\tmergedSegments.push({\n\t\t\t\tvisible: false,\n\t\t\t\tstart: 1,\n\t\t\t\tend: mergedSegments[0].start\n\t\t\t});\n\t\t}\n\t\t// loop through and connect visible segments with summarized segments\n\t\tvar _visibleSegments = _.where(mergedSegments, { visible: true });\n\t\t_visibleSegments.forEach( (d, i) => {\n\t\t\t// must not be last or visible\n\t\t\tif (d.visible && i < _visibleSegments.length - 1) {\n\t\t\t\tmergedSegments.push({\n\t\t\t\t\tvisible: false,\n\t\t\t\t\tstart: d.end,\n\t\t\t\t\tend: _visibleSegments[i + 1].start\n\t\t\t\t});\n\t\t\t}\n\t\t});\n\t\t\n\t\tvar _last = _.max(mergedSegments, d => { return d.end; });\n\t\tvar _maxLength = _.max(sequences, d => { return d.sequence.length; }).sequence.length;\n\t\t// add last if last segment is visible and not at the end\n\t\tif (_last.end < _maxLength) {\n\t\t\tmergedSegments.push({\n\t\t\t\tstart: _last.end,\n\t\t\t\tend: _maxLength,\n\t\t\t\tvisible: false\n\t\t\t});\n\t\t// add last if visible\n\t\t} else {\n\t\t\tmergedSegments.push({\n\t\t\t\tstart: _last.end,\n\t\t\t\tend: _maxLength + 1,\n\t\t\t\tvisible: true\n\t\t\t});\n\t\t}\n\t\t\n\t\t// change starts and ends to domains\n\t\tmergedSegments = _.map(mergedSegments, d => {\n\t\t\td.domain = [d.start, d.end];\n\t\t\treturn d;\n\t\t});\n\t\t// sort\n\t\tmergedSegments = _.sortBy(mergedSegments, d => {\n\t\t\treturn d.start;\n\t\t});\n\t\treturn mergedSegments;\n\t}", "buildTags() {\n\n\t\tlet tags = '';\n\n\t\t \tthis.props.foodList.combinedFoods.slice(0,10).map( flist => { \n\n\t\t \t\tif(flist.tags != undefined) {\n\t\t \t\t\ttags += (flist.tags+\" \") ; \n\t\t \t\t}\n\t\t \t\n\n\t\t\t});\n\n\t\t \tconsole.log('combined tags', tags);\n\n\t\t \treturn tags; \n\n\t}", "function html(literals, ...substs) {\n return literals.raw.reduce((acc, lit, i) => {\n let subst = substs[i - 1];\n if (Array.isArray(subst)) {\n subst = subst.join('');\n }\n return acc + subst + lit;\n });\n}", "function tag(strings,...values){\n\t\tconsole.log(\"Strings Are: \",strings);\n\t\tconsole.log(\"Values Are: \",values);\n\t\tvar the_return = \"\";\n\t\tstrings.forEach(function(string,index,strings){\n\t\t\tthe_return+=string+(values[index]||'') + \"--append--\";\n\t\t});\n\t\t// strings.for( i=0; i<strings.length; i++ ){ the_return += strings[i]+value[i]; }\n\t\treturn the_return;\n\t}", "splits_phrase_html() {\n switch (this.splits.length) {\n case 2: return `<strong>${this.splits[0].cook_rating_name}</strong> and <strong>${this.splits[1].cook_rating_name}</strong>`\n case 3: return `<strong>${this.splits[0].cook_rating_name}</strong>, <strong>${this.splits[1].cook_rating_name}</strong> and <strong>${this.splits[2].cook_rating_name}</strong>`\n default: throw new Error(`Wrong number of splits in ${this.state_name}: ${this.splits.length}`)\n }\n }", "getHTML() {\n const endIndex = this.strings.length - 1;\n let html = '';\n for (let i = 0; i < endIndex; i++) {\n const s = this.strings[i];\n // This exec() call does two things:\n // 1) Appends a suffix to the bound attribute name to opt out of special\n // attribute value parsing that IE11 and Edge do, like for style and\n // many SVG attributes. The Template class also appends the same suffix\n // when looking up attributes to create Parts.\n // 2) Adds an unquoted-attribute-safe marker for the first expression in\n // an attribute. Subsequent attribute expressions will use node markers,\n // and this is safe since attributes with multiple expressions are\n // guaranteed to be quoted.\n const match = lastAttributeNameRegex.exec(s);\n if (match) {\n // We're starting a new bound attribute.\n // Add the safe attribute suffix, and use unquoted-attribute-safe\n // marker.\n html += s.substr(0, match.index) + match[1] + match[2] +\n boundAttributeSuffix + match[3] + marker;\n }\n else {\n // We're either in a bound node, or trailing bound attribute.\n // Either way, nodeMarker is safe to use.\n html += s + nodeMarker;\n }\n }\n return html + this.strings[endIndex];\n }", "generateHtmlOutput() {\n let html = \"\";\n const stateSections = this.state.assignment.sections;\n const outSections = stateSections.custom.concat(stateSections.compulsory);\n\n for (let i = 0; i < outSections.length; i++) {\n if (outSections[i].value != \"\") {\n html += \"<h1>\" + outSections[i].title + \"</h1>\";\n html += outSections[i].value;\n }\n }\n\n return html;\n }", "wrapInParentHtml(htmlObjectArray) {\n var newData = [];\n let innerHtml = \"\";\n //if there are more than 3 entries, do wrapping operations\n if (htmlObjectArray.length > 3) {\n // https://stackoverflow.com/questions/63462236/merge-every-3-elements-in-array-javascript\n for (let i = 0; i < htmlObjectArray.length; i += 3) { // i+=3 can solve your problem\n let three = \"\";\n // don't pass the ones that aren't null\n if (htmlObjectArray[i]) {\n three += htmlObjectArray[i];\n }\n if (htmlObjectArray[i + 1]) {\n three += htmlObjectArray[i + 1];\n }\n if (htmlObjectArray[i + 2]) {\n three += htmlObjectArray[i + 2];\n }\n //push each set of three to the newData array\n newData.push(three)\n }\n //wrap each set of 3 and then return it\n for (const setOfHtml of newData) {\n innerHtml += `<div class='columns features is-centered'>${setOfHtml}</div>`;\n }\n return innerHtml;\n } else {\n //else just return the data wrapped in one row and return\n return `<div class='columns features is-centered'>${htmlObjectArray}</div>`;\n }\n }", "getHTML() {\n const l = this.strings.length - 1;\n let html = '';\n let isTextBinding = true;\n for (let i = 0; i < l; i++) {\n const s = this.strings[i];\n html += s;\n // We're in a text position if the previous string closed its tags.\n // If it doesn't have any tags, then we use the previous text position\n // state.\n const closing = findTagClose(s);\n isTextBinding = closing > -1 ? closing < s.length : isTextBinding;\n html += isTextBinding ? nodeMarker : marker;\n }\n html += this.strings[l];\n return html;\n }", "function buildHTML(template /* Optional parameters to replace */) {\n\t\t// First argument is template string and next are replace values\n\t\tvar howManyToReplace = arguments.length - 1;\n\t\tvar str = template;\n\t\tfor (var i = 1; i <= howManyToReplace; i++) {\n\t\t\tstr = str.replace(\"{!\" + i + \"}\", arguments[i]);\n\t\t}\n\t\treturn str;\n\t}", "getHTML() {\n const l = this.strings.length - 1;\n let html = '';\n let isTextBinding = true;\n for (let i = 0; i < l; i++) {\n const s = this.strings[i];\n html += s;\n // We're in a text position if the previous string closed its tags.\n // If it doesn't have any tags, then we use the previous text position\n // state.\n const closing = findTagClose(s);\n isTextBinding = closing > -1 ? closing < s.length : isTextBinding;\n html += isTextBinding ? nodeMarker : marker;\n }\n html += this.strings[l];\n return html;\n }", "render() {\n let output =\n this.getHelperWordsBefore() +\n \" \" +\n this.renderForms()\n .map((i) => `<b>${i}</b>`)\n .join(\" / \") +\n this.getHelperWordsAfter();\n output = output.trim();\n\n // const highlight = options?.highlight\n // if (highlight && this.is(highlight)) {\n // output = `<span class=\"highlight\">${output}</span>`\n // }\n\n return output;\n }", "function printMembersHTML( arrImages, arrNameComments, arrTimeMail, arrDateIcon){\n return sectionMembersActivities = `\n <div>\n <div><img src=\"${arrImages}\"></div>\n <p class=\"user-activity-name\">${arrNameComments} <br> <span>${arrTimeMail}</span></p>\n </div>\n <div>\n <p>${arrDateIcon}</p>\n </div>\n `;\n}", "function createOptionsString(array) {\r\n var result =\"\";\r\n for (var i = 0; i < array.length; i++) {\r\n result += '<option class=\"optionItem\">'+ array[i] + '</option>';\r\n }\r\n return result;\r\n}", "static tpl(strings, ...values) {\n let count = 0,\n output = values.map((val, i) => {\n // TODO: pad output nicely instead of just trimming away\n let ret = strings[i];\n\n if (Array.isArray(val)) {\n ret += val.reduce((ack, item) => ack += (typeof item === 'string' ? item.trim() : item) + '\\n', '');\n } else {\n if (val === undefined) {\n val = '';\n }\n\n ret += typeof val === 'string' ? val.trim() : val;\n }\n\n count++;\n return ret;\n }).join('');\n\n if (count <= strings.length) {\n output += strings[strings.length - 1];\n } // Excise unnecessary *soft* whitespace textNodes. We cannot use \\s because that\n // matches non-breaking spaces which need to be preserved.\n // Also reduce any usage of multiple spaces to single, since they have no value in html\n\n return output.replace(tagSpaceRe, '><').replace(multiSpaceRe, ' ').trim();\n }", "function toHTML(array) {\n var mainDiv = document.querySelector('.shapceship-list');\n for (let i = 0; i < array.length; i++) {\n var individualDiv = document.createElement('div');\n var img = document.createElement('img');\n var modelP = document.createElement('p');\n var manufacturerP = document.createElement('p');\n var denominationP = document.createElement('p');\n var cargoP = document.createElement('p');\n var passengersP = document.createElement('p');\n var crewP = document.createElement('p');\n var lengthinessP = document.createElement('p');\n var consumablesP = document.createElement('p');\n var atmospheringSpeedP = document.createElement('p');\n var costP = document.createElement('P');\n var hr = document.createElement('hr')\n individualDiv.classList.add('inDiv');\n img.setAttribute('src', `img/${array[i].image}`);\n img.setAttribute('alt', `${array[i].image}`);\n modelP.innerText = `Model: ${array[i].model}`;\n manufacturerP.innerText = `Manufacturer: ${array[i].manufacturer}`;\n denominationP.innerText = `Denomination: ${array[i].denomination}`;\n cargoP.innerText = `Cargo capacity: ${array[i].cargo_capacity}`;\n passengersP.innerText = `Passengers: ${array[i].passengers}`;\n crewP.innerText = `Crew: ${array[i].crew}`;\n lengthinessP.innerText = `Lengthiness: ${array[i].lengthiness}`;\n consumablesP.innerText = `Consumables: ${array[i].consumables}`;\n atmospheringSpeedP.innerText = `Maximum atmosphering speed: ${array[i].max_atmosphering_speed}`;\n costP.innerText = `Cost: ${array[i].cost_in_credits}`;\n mainDiv.appendChild(individualDiv);\n individualDiv.appendChild(img);\n individualDiv.appendChild(modelP);\n individualDiv.appendChild(manufacturerP);\n individualDiv.appendChild(denominationP);\n individualDiv.appendChild(cargoP);\n individualDiv.appendChild(passengersP);\n individualDiv.appendChild(crewP);\n individualDiv.appendChild(lengthinessP);\n individualDiv.appendChild(consumablesP);\n individualDiv.appendChild(atmospheringSpeedP);\n individualDiv.appendChild(costP);\n individualDiv.appendChild(hr);\n\n }\n }", "concat(texts) {\n let blocks = [];\n let inlines = [];\n\n for (let text of texts) {\n if (!text.startsWith('\\n\\n')) {\n inlines.push(text);\n continue;\n }\n\n if (inlines.length) {\n blocks.push(this.format_block(this.escape_block(this.concat_inline(inlines))));\n inlines = [];\n }\n blocks.push(text);\n }\n\n if (inlines.length) {\n // all inline tags, join into single inline tag\n if (!blocks.length) return this.concat_inline(inlines);\n blocks.push(this.format_block(this.escape_block(this.concat_inline(inlines))));\n }\n\n return blocks.filter(block => block.match(/\\S/)).join('');\n }", "function d(b,c,d){\n// where the DOM nodes will eventually end up\nvar f,g,j=T(),m=c?a(\"<div/>\"):j,n=e(b);\n// calculate the desired `left` and `width` properties on each segment object\n// build the HTML string. relies on `left` property\n// render the HTML. innerHTML is considerably faster than jQuery's .html()\n// retrieve the individual elements\n// if we were appending, and thus using a temporary container,\n// re-attach elements to the real container.\n// assigns each element to `segment.event`, after filtering them through user callbacks\n// Calculate the left and right padding+margin for each element.\n// We need this for setting each element's desired outer width, because of the W3C box model.\n// It's important we do this in a separate pass from acually setting the width on the DOM elements\n// because alternating reading/writing dimensions causes reflow for every iteration.\n// Set the width of each element\n// Grab each element's outerHeight (setVerticals uses this).\n// To get an accurate reading, it's important to have each element's width explicitly set already.\n// Set the top coordinate on each element (requires segment.outerHeight)\nreturn h(n),f=i(n),m[0].innerHTML=f,g=m.children(),c&&j.append(g),k(n,g),xa(n,function(a,b){a.hsides=t(b,!0)}),xa(n,function(a,b){b.width(Math.max(0,a.outerWidth-a.hsides))}),xa(n,function(a,b){a.outerHeight=b.outerHeight(!0)}),l(n,d),n}", "function addr(array) {\n let addString = \"\";\n for (let index = 0; index < array.length; index++) {\n const element = array[index];\n addString = addString + element + \"<br/>\";\n }\n return addString;\n }", "render(){\n let posts = this.posts\n .map( posts => \n `<li data-post-id=\"${posts.id}\">\n <h3>${posts.id} - ${posts.title}</h3>\n <p>${posts.body}</hp>\n </li>`)\n\n return $(`<section>\n <hr>\n <ul>${posts.join(\"\")}</ul>\n </section>`);\n }", "getHtmlTemplateString(employeesObjectArray) {\n let employeeDetails = \"\";\n let iconHtml = \"\";\n const returnedHtmlObjects = [];\n //iterate over each employee\n for (const employee of employeesObjectArray) {\n // https://stackoverflow.com/questions/10314338/get-name-of-object-or-class\n const currentObjectTypeName = employee.constructor.name;\n //different employee types get different HTML\n if (currentObjectTypeName == \"Manager\") {\n employeeDetails = this.getHtmlManagerDetails(employee.getId(), employee.getEmail(), employee.getOfficeNumber());\n iconHtml = \"<i class='fas fa-tasks'></i>\";\n } else if (currentObjectTypeName == \"Engineer\") {\n employeeDetails = this.getHtmlEngineerDetails(employee.getId(), employee.getEmail(), employee.getGitHub());\n iconHtml = \"<i class='fas fa-laptop-code'></i>\";\n } else if (currentObjectTypeName == \"Intern\") {\n employeeDetails = this.getHtmlInternDetails(employee.getId(), employee.getEmail(), employee.getSchool());\n iconHtml = \"<i class='fas fa-glasses'></i>\";\n }\n //add each iteration to an array\n returnedHtmlObjects.push(this.getHtmlEmployeeString(employee.getName(), employee.getDescription(), iconHtml, currentObjectTypeName, employee.getImageUrl(), employeeDetails));\n }\n //pass the array to be wrapped and return constructed and formatted HTML\n const innerHtml = this.wrapInParentHtml(returnedHtmlObjects);\n return `\n <!DOCTYPE html>\n <html>\n <head>\n <meta charset=\"utf-8\">\n <meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge\">\n <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\n <title>Our Software Team</title>\n <link rel=\"stylesheet\" href=\"https://unpkg.com/bulma@0.9.0/css/bulma.min.css\" />\n <link rel=\"stylesheet\" type=\"text/css\" href=\"./hero.css\">\n <script src=\"https://kit.fontawesome.com/e6ff202c8b.js\" crossorigin=\"anonymous\"></script>\n </head>\n <body>\n <section class=\"hero is-info is-small\">\n <div class=\"hero-body\">\n <div class=\"container has-text-centered\">\n <p class=\"title\">\n Our Software Team\n </p>\n </div>\n </div>\n </section>\n <section class=\"container\">\n ${innerHtml}\n </section>\n </body>\n </html>`.replace(/\\s+/g, ' ');\n }", "function buildSegments(events) {\n\t\tvar segments = [];\n\t\tfor (var i=0; i<events.length; i++) {\n\t\t\tvar eventSegments = buildSegmentsForEvent(events[i]);\n\t\t\tsegments.push.apply(segments, eventSegments); // append an array to an array\n\t\t}\n\t\treturn segments;\n\t}", "function buildSegments(events) {\n\t\tvar segments = [];\n\t\tfor (var i=0; i<events.length; i++) {\n\t\t\tvar eventSegments = buildSegmentsForEvent(events[i]);\n\t\t\tsegments.push.apply(segments, eventSegments); // append an array to an array\n\t\t}\n\t\treturn segments;\n\t}", "function buildSegments(events) {\n\t\tvar segments = [];\n\t\tfor (var i=0; i<events.length; i++) {\n\t\t\tvar eventSegments = buildSegmentsForEvent(events[i]);\n\t\t\tsegments.push.apply(segments, eventSegments); // append an array to an array\n\t\t}\n\t\treturn segments;\n\t}", "function buildSegments(events) {\n\t\tvar segments = [];\n\t\tfor (var i=0; i<events.length; i++) {\n\t\t\tvar eventSegments = buildSegmentsForEvent(events[i]);\n\t\t\tsegments.push.apply(segments, eventSegments); // append an array to an array\n\t\t}\n\t\treturn segments;\n\t}", "function buildSegments(events) {\n\t\tvar segments = [];\n\t\tfor (var i=0; i<events.length; i++) {\n\t\t\tvar eventSegments = buildSegmentsForEvent(events[i]);\n\t\t\tsegments.push.apply(segments, eventSegments); // append an array to an array\n\t\t}\n\t\treturn segments;\n\t}", "function resourceWrapper(heading, valuesArr, resourcesArr) {\n let str = ''\n\n for (let i = 0; i < resourcesArr.length; i++) {\n str += `<div class=\"resource\">\n <span class=\"resourceName\">${resourcesArr[i]}</span><span>${valuesArr[i]}</span>\n </div>`\n }\n\n return `\n <div class=\"resourcesWrapper\">\n <div>${heading}</div>\n <div class=\"resources\">\n ${str}\n </div>\n </div>\n `\n}", "renderJourney(j, extended) {\n var items = [];\n var count = 0;\n for(var s of j.getSegments()){\n count++;\n var k = s.getIdentifier();\n\n items.push(<SegmentInfo cmodel={this.state.cmodel} segment={s} compare={extended ? true : false} />);\n }\n\n return <ul>{items}</ul>;\n\n }", "function joinElements (joiner) {\n var result = ''\n for (var i = 0; i < elements.length; i++) {\n if (i < elements.length - 1) {\n result += elements[i] + joiner\n } else {\n result += elements[i]\n }\n }\n return result\n}", "function addSpans(arrInput) {\n var strInputSpans = \"\";\n\n function addSpan(charInput) {\n strInputSpans += \"<span>\" + charInput + \"</span>\";\n }\n\n arrInput.forEach(addSpan);\n\n return strInputSpans;\n }", "function outputArray( heading, theArray, output )\n{\n output.innerHTML = heading + theArray.join( \" \" ); \n} // end function outputArray", "static docsTpl(strings, ...values) {\n let count = 0,\n output = values.map((val, i) => {\n // TODO: pad output nicely instead of just trimming away\n let str = strings[i],\n ret = str;\n\n if (Array.isArray(val)) {\n ret += val.reduce((ack, item) => ack += (typeof item === 'string' ? item.trim() : item) + '\\n', '');\n } else {\n if (val === undefined) {\n val = '';\n }\n\n ret += typeof val === 'string' ? val.trim() : val;\n }\n\n count++;\n return ret;\n }).join('');\n\n if (count <= strings.length) {\n output += strings[strings.length - 1];\n } // Excise unnecessary *soft* whitespace textNodes. We cannot use \\s because that\n // matches non-breaking spaces which need to be preserved.\n\n return output.replace(tagSpaceRe, '><').trim();\n }", "function searchResultDisplayHtmlString(venue){\n\n \n let venue_name = venue.name?venue.name:\"\"\n let address = venue.location.formattedAddress?venue.location.formattedAddress:\"\"\n let descriptions = venue.categories?venue.categories:\"\"\n let location_description=[]\n for(let description of descriptions){\n\n location_description.push(description.name)\n\n }\n\n return `\n <style>\n .search-result p{\n\n font-family: var(--font-family-main);\n margin:10px;\n \n \n }\n \n .search-result p a{\n \n text-decoration:none;\n color:black;\n \n }\n\n .location-name-link{\n\n font-size:17px;\n\n }\n\n .address-link{\n\n font-size:15px;\n\n }\n\n .description-link{\n\n font-size:12px;\n\n }\n\n \n .line{\n \n background-image:linear-gradient(90deg,transparent, var(--primary-color),transparent);\n width:auto;\n height:2px;\n \n }\n \n </style>\n <div class=\"search-result\" onClick=\"stopCallingApi()\">\n <p>\n <a class=\"location-name-link\" href=\"#\">${venue_name}</a> \n </p>\n <p>\n <a class=\"address-link\" href=\"#\">${address.join(\" \")}</a> \n </p>\n <p>\n <a class=\"description-link\" href=\"#\">${location_description.join(\" \")}</a> \n </p>\n\n <div class=\"line\"></div>\n </div>`\n}", "function availableResources(availableArr, resourcesArr) {\n let availableStr = ''\n\n for (let i = 0; i < resourcesArr.length; i++) {\n availableStr += `<div class=\"resource\">\n <span class=\"resourceName\">${resourcesArr[i]}</span><span>${availableArr[i]}</span>\n </div>`\n }\n return availableStr\n}", "function navBuilderFun () { \n \n sectionsVar.forEach(el => {\n const navlistElement = `<li><a class='menu__link' data-link=${el.id}>${el.dataset.nav}</li>`\n navFactor.insertAdjacentHTML('beforeend', navlistElement)\n })\n \n\n }", "function displayHTML(array){\n for (var i = 0; i < array.length; i++){\n document.getElementById(divID).innerHTML += array[i];\n }\n //Insert CSS class for first streetview\n document.getElementById(divID).firstChild.className += ' current-image';\n initializePage();\n }", "function renderDogsToPage(dogs){\n dogs.map(renderSingleDogToPage).join('')\n }", "function GenerateTagHTML(tags) {\r\n \r\n var html = '<div class=\"tags\">';\r\n \r\n // Generate the html for each of the tags and return it\r\n $.each(tags, function(key, tag) { html += '<span>' + tag + '</span>' });\r\n return html + '</div>';\r\n \r\n }", "function renderCoffees(coffees) {\n var html = '';\n for(var i = 0; i < coffees.length; i++) {\n html += renderCoffee(coffees[i]); //same as: html = html + renderCoffee(coffees[i])\n }\n return html;\n}", "function buildText(options) {\n html += `<p class =\"text\">${options[0]}</p>`\n}", "function render(arr) {\n\tvar todoItems = '';\n\n\tdocument.querySelector('.txtArea').innerHTML = '';\n\tfor (var i = 0; i < arr.length; i++) {\n\t\n\ttodoItems = (todoItems + arr[i].toString() + '<br>'); \n\t}\n\tdocument.querySelector('.txtArea').innerHTML = todoItems; \n}", "function appendEmailHTML(geemailsLength){\n\tvar htmlText = \"\";\n\n\t //$(\"#gee-mail\").append(\"<section>\");\n\t htmlText += \"<section id='mySection'>\";\n\t var tempObject;\n\n\t for (var i = 0; i < geemailsLength; i++) {\n\t \t\ttempObject = window.geemails[i];\n\t\t\thtmlText += getMessageArticle(tempObject);\n\t};\n\t\n\t// $(\"#gee-mail\").append(\"</section>\");\n\thtmlText += \"</section>\";\n\t$(\"#gee-mail\").append(htmlText);\n}", "static tpl(strings, ...values) {\n let count = 0,\n output = values\n .map((val, i) => {\n // TODO: pad output nicely instead of just trimming away\n let ret = strings[i];\n\n if (Array.isArray(val)) {\n ret += val.reduce((ack, item) => (ack += (typeof item === 'string' ? item.trim() : item) + '\\n'), '');\n } else {\n if (val === undefined) {\n val = '';\n }\n ret += typeof val === 'string' ? val.trim() : val;\n }\n\n count++;\n\n return ret;\n })\n .join('');\n\n if (count <= strings.length) {\n output += strings[strings.length - 1];\n }\n\n // Excise unnecessary *soft* whitespace textNodes. We cannot use \\s because that\n // matches non-breaking spaces which need to be preserved.\n // Also reduce any usage of multiple spaces to single, since they have no value in html\n return output\n .replace(tagSpaceRe, '><')\n .replace(multiSpaceRe, ' ')\n .trim();\n }", "function generateOutput() {\n str = '';\n AreaOutput.childNodes[0].childNodes.forEach( node => {\n if(node.nodeName == \"SPAN\"){\n str += node.innerText;\n } else {\n str += node.options[node.selectedIndex].text;\n }\n });\n return str;\n}", "function genFinalHtml() {\r\n ` </div> \r\n\r\n </body>\r\n </html`;\r\n}", "static docsTpl(strings, ...values) {\n let count = 0,\n output = values\n .map((val, i) => {\n // TODO: pad output nicely instead of just trimming away\n\n let str = strings[i],\n ret = str;\n\n if (Array.isArray(val)) {\n ret += val.reduce((ack, item) => (ack += (typeof item === 'string' ? item.trim() : item) + '\\n'), '');\n } else {\n if (val === undefined) {\n val = '';\n }\n ret += typeof val === 'string' ? val.trim() : val;\n }\n\n count++;\n\n return ret;\n })\n .join('');\n\n if (count <= strings.length) {\n output += strings[strings.length - 1];\n }\n\n // Excise unnecessary *soft* whitespace textNodes. We cannot use \\s because that\n // matches non-breaking spaces which need to be preserved.\n return output.replace(tagSpaceRe, '><').trim();\n }", "function renderHTML(apidata){\r\n var html = \"\";\r\n var apidatalength = apidata.length; // reverse randering\r\n for (i = 0; i < apidatalength; i++){\r\n html += \"<div class='content-section'>\";\r\n html += \"<h2><a href=\" + apidata[apidatalength-i-1].link_url + \">\" + apidata[apidatalength-i-1].title + \"</a></h2>\";\r\n html += \"<img src=\" + apidata[apidatalength-i-1].img_url + \">\";\r\n html += \"</div>\";\r\n }\r\n newsContainer.insertAdjacentHTML('beforeend', html);\r\n}", "function showTagsNav() {\n tagsArray.forEach( tags => { \n headerNav.innerHTML += tags;\n });\n \n}", "function addSegEndsFromSequences(){\n //Add all the starting segEnds and internal segJoins\n for(var i=0;i<seqArr.length;i++){\n var length=parseInt(seqArr[i]['length']),\n seqId=seqArr[i]['id'];\n segEndArr[segEndArr.length]=[seqId,0,'POS_STRAND']\n segEndArr[segEndArr.length]=[seqId,length-1,'NEG_STRAND']\n segJoinArr[segJoinArr.length]=[[seqId,0,'POS_STRAND'],[seqId,length-1,'NEG_STRAND'],'internal',length]\n }\n segmentize();\n}", "get AddHtmlContent() {\r\n return `\r\n <section id=\"section${this.SectionId}\" data-nav=\"Section ${this.SectionId}\" >\r\n <div class=\"landing__container\">\r\n <h2>Section ${this.SectionId}</h2>\r\n <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Morbi fermentum metus faucibus lectus pharetra dapibus. Suspendisse potenti. Aenean aliquam elementum mi, ac euismod augue. Donec eget lacinia ex. Phasellus imperdiet porta orci eget mollis. Sed convallis sollicitudin mauris ac tincidunt. Donec bibendum, nulla eget bibendum consectetur, sem nisi aliquam leo, ut pulvinar quam nunc eu augue. Pellentesque maximus imperdiet elit a pharetra. Duis lectus mi, aliquam in mi quis, aliquam porttitor lacus. Morbi a tincidunt felis. Sed leo nunc, pharetra et elementum non, faucibus vitae elit. Integer nec libero venenatis libero ultricies molestie semper in tellus. Sed congue et odio sed euismod.</p>\r\n \r\n <p>Aliquam a convallis justo. Vivamus venenatis, erat eget pulvinar gravida, ipsum lacus aliquet velit, vel luctus diam ipsum a diam. Cras eu tincidunt arcu, vitae rhoncus purus. Vestibulum fermentum consectetur porttitor. Suspendisse imperdiet porttitor tortor, eget elementum tortor mollis non.</p>\r\n </div>\r\n </section>\r\n `\r\n }", "function buildHTMLlist(array) {\n var html = `<div id=\"contents\">\n <h1>List of contents</h1>\n <ul class=\"contents-list\">`\n array.forEach(function(item) {\n item = item.toJSON();\n html += `<li class=\"content-item\">\n <h2 class=\"content-item__title\">\n <p>${item.voteScore ? item.voteScore : 0}</p>\n <a href=${item.url}>${item.title}</a>\n </h2>\n <p> ${item.user.username}</p>\n <form action=\"/voteContent\" method=\"post\">\n <input type=\"hidden\" name=\"upVote\" value=\"true\">\n <input type=\"hidden\" name=\"contentId\" value=\"${item.id}\">\n <button type=\"submit\">Upvote this!</button>\n </form>\n <form action=\"/voteContent\" method=\"post\">\n <input type=\"hidden\" name=\"upVote\" value=\"false\">\n <input type=\"hidden\" name=\"contentId\" value=\"${item.id}\">\n <button type=\"submit\">Downvote this!</button>\n </form>\n </li>`\n })\n html += `</ul> \n </div>`\n return html;\n}", "function showPage() {\n htmlPage = \"\"; // reset html code in every function calls\n for(let i = start; i <= end; i++){\n generateHTML(objArray[i]); // populate html code with the data\n }\n studentList.innerHTML = htmlPage;\n}", "function createHTML (studentSet) {\n\tvar frame = '';\n\tfor (var i=0; i < studentSet.length; i++) {\n\t\tframe += \"<li class='list-group-item body-text'>\"; \n\t\tframe += \"<b>\" + studentSet[i].studentName + \"</b> - \";\n\t\tframe += studentSet[i].description + \"</li>\";\n\t}\n\treturn frame;\n}", "function mostrarComentarios(array) {\r\n\r\n let htmlContentToAppend = \"\";\r\n\r\n for (let i = 0; i < array.length; i++) {\r\n let comments = array[i];\r\n \r\n htmlContentToAppend += `\r\n \r\n <div class=\"list-group-item list-group-item-action\">\r\n <div class=\"row\">\r\n <div class=\"d-flex w-100 justify-content-between\">\r\n <h5 class=\"mb-1\">` + comments.user + `</h5><p style=\"text-align: right\"> ` + comments.description + `</p>\r\n <p>` + mostrarEstrellas(comments.score) + ` </p>\r\n </div>\r\n <p class=\"mb-1\"> ` + comments.dateTime + `</p>\r\n \r\n </div>\r\n </div>\r\n \r\n `\r\n //Guardamos la informacion en el html\r\n document.getElementById(\"comments-section\").innerHTML = htmlContentToAppend;\r\n }\r\n}", "function generateConcepts(concepts) {\n\tvar conceptsHtml = \"\"\n\tfor (var i = 0; i <= concepts.length-1; i++) {\n\t\tvar totalLength = concepts.length;\n\t\tconceptsHtml += \"<p>\" + concepts[i] + \". </p>\";\n\t}\n\n\treturn conceptsHtml\n}", "getHTMLString() {\n var HTMLString = \"\";\n \n for (var i = 0; i < this.feedbackList.length; i++) {\n HTMLString += `<p>` + this.feedbackList[i] + `</p>`\n }\n\n return HTMLString;\n }", "function renderSlotSegs(segs, modifiedEventId) {\n\t\n\t\tvar i, segCnt=segs.length, seg,\n\t\t\tevent,\n\t\t\ttop,\n\t\t\tbottom,\n\t\t\tcolumnLeft,\n\t\t\tcolumnRight,\n\t\t\tcolumnWidth,\n\t\t\twidth,\n\t\t\tleft,\n\t\t\tright,\n\t\t\thtml = '',\n\t\t\teventElements,\n\t\t\teventElement,\n\t\t\ttriggerRes,\n\t\t\ttitleElement,\n\t\t\theight,\n\t\t\tslotSegmentContainer = getSlotSegmentContainer(),\n\t\t\tisRTL = opt('isRTL');\n\t\t\t\n\t\t// calculate position/dimensions, create html\n\t\tfor (i=0; i<segCnt; i++) {\n\t\t\tseg = segs[i];\n\t\t\tevent = seg.event;\n\t\t\ttop = computeDateTop(seg.start, seg.start);\n\t\t\tbottom = computeDateTop(seg.end, seg.start);\n\t\t\tcolumnLeft = colContentLeft(seg.col);\n\t\t\tcolumnRight = colContentRight(seg.col);\n\t\t\tcolumnWidth = columnRight - columnLeft;\n\n\t\t\t// shave off space on right near scrollbars (2.5%)\n\t\t\t// TODO: move this to CSS somehow\n\t\t\tcolumnRight -= columnWidth * .025;\n\t\t\tcolumnWidth = columnRight - columnLeft;\n\n\t\t\twidth = columnWidth * (seg.forwardCoord - seg.backwardCoord);\n\n\t\t\tif (opt('slotEventOverlap')) {\n\t\t\t\t// double the width while making sure resize handle is visible\n\t\t\t\t// (assumed to be 20px wide)\n\t\t\t\twidth = Math.max(\n\t\t\t\t\t(width - (20/2)) * 2,\n\t\t\t\t\twidth // narrow columns will want to make the segment smaller than\n\t\t\t\t\t\t// the natural width. don't allow it\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tif (isRTL) {\n\t\t\t\tright = columnRight - seg.backwardCoord * columnWidth;\n\t\t\t\tleft = right - width;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tleft = columnLeft + seg.backwardCoord * columnWidth;\n\t\t\t\tright = left + width;\n\t\t\t}\n\n\t\t\t// make sure horizontal coordinates are in bounds\n\t\t\tleft = Math.max(left, columnLeft);\n\t\t\tright = Math.min(right, columnRight);\n\t\t\twidth = right - left;\n\n\t\t\tseg.top = top;\n\t\t\tseg.left = left;\n\t\t\tseg.outerWidth = width;\n\t\t\tseg.outerHeight = bottom - top;\n\t\t\thtml += slotSegHtml(event, seg);\n\t\t}\n\n\t\tslotSegmentContainer[0].innerHTML = html; // faster than html()\n\t\teventElements = slotSegmentContainer.children();\n\t\t\n\t\t// retrieve elements, run through eventRender callback, bind event handlers\n\t\tfor (i=0; i<segCnt; i++) {\n\t\t\tseg = segs[i];\n\t\t\tevent = seg.event;\n\t\t\teventElement = $(eventElements[i]); // faster than eq()\n\t\t\ttriggerRes = trigger('eventRender', event, event, eventElement);\n\t\t\tif (triggerRes === false) {\n\t\t\t\teventElement.remove();\n\t\t\t}else{\n\t\t\t\tif (triggerRes && triggerRes !== true) {\n\t\t\t\t\teventElement.remove();\n\t\t\t\t\teventElement = $(triggerRes)\n\t\t\t\t\t\t.css({\n\t\t\t\t\t\t\tposition: 'absolute',\n\t\t\t\t\t\t\ttop: seg.top,\n\t\t\t\t\t\t\tleft: seg.left\n\t\t\t\t\t\t})\n\t\t\t\t\t\t.appendTo(slotSegmentContainer);\n\t\t\t\t}\n\t\t\t\tseg.element = eventElement;\n\t\t\t\tif (event._id === modifiedEventId) {\n\t\t\t\t\tbindSlotSeg(event, eventElement, seg);\n\t\t\t\t}else{\n\t\t\t\t\teventElement[0]._fci = i; // for lazySegBind\n\t\t\t\t}\n\t\t\t\treportEventElement(event, eventElement);\n\t\t\t}\n\t\t}\n\t\t\n\t\tlazySegBind(slotSegmentContainer, segs, bindSlotSeg);\n\t\t\n\t\t// record event sides and title positions\n\t\tfor (i=0; i<segCnt; i++) {\n\t\t\tseg = segs[i];\n\t\t\tif ((eventElement = seg.element)) {\n\t\t\t\tseg.vsides = vsides(eventElement, true);\n\t\t\t\tseg.hsides = hsides(eventElement, true);\n\t\t\t\ttitleElement = eventElement.find('.fc-event-title');\n\t\t\t\tif (titleElement.length) {\n\t\t\t\t\tseg.contentTop = titleElement[0].offsetTop;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t// set all positions/dimensions at once\n\t\tfor (i=0; i<segCnt; i++) {\n\t\t\tseg = segs[i];\n\t\t\tif ((eventElement = seg.element)) {\n\t\t\t\teventElement[0].style.width = Math.max(0, seg.outerWidth - seg.hsides) + 'px';\n\t\t\t\theight = Math.max(0, seg.outerHeight - seg.vsides);\n\t\t\t\teventElement[0].style.height = height + 'px';\n\t\t\t\tevent = seg.event;\n\t\t\t\tif (seg.contentTop !== undefined && height - seg.contentTop < 10) {\n\t\t\t\t\t// not enough room for title, put it in the time (TODO: maybe make both display:inline instead)\n\t\t\t\t\teventElement.find('div.fc-event-time')\n\t\t\t\t\t\t.text(\n\t\t\t\t\t\t\tformatDate(event.start, opt('timeFormat')) + ' - ' + event.title\n\t\t\t\t\t\t);\n\t\t\t\t\teventElement.find('div.fc-event-title')\n\t\t\t\t\t\t.remove();\n\t\t\t\t}\n\t\t\t\ttrigger('eventAfterRender', event, event, eventElement);\n\t\t\t}\n\t\t}\n\t\t\t\t\t\n\t}", "function renderSlotSegs(segs, modifiedEventId) {\n\t\n\t\tvar i, segCnt=segs.length, seg,\n\t\t\tevent,\n\t\t\ttop,\n\t\t\tbottom,\n\t\t\tcolumnLeft,\n\t\t\tcolumnRight,\n\t\t\tcolumnWidth,\n\t\t\twidth,\n\t\t\tleft,\n\t\t\tright,\n\t\t\thtml = '',\n\t\t\teventElements,\n\t\t\teventElement,\n\t\t\ttriggerRes,\n\t\t\ttitleElement,\n\t\t\theight,\n\t\t\tslotSegmentContainer = getSlotSegmentContainer(),\n\t\t\tisRTL = opt('isRTL');\n\t\t\t\n\t\t// calculate position/dimensions, create html\n\t\tfor (i=0; i<segCnt; i++) {\n\t\t\tseg = segs[i];\n\t\t\tevent = seg.event;\n\t\t\ttop = computeDateTop(seg.start, seg.start);\n\t\t\tbottom = computeDateTop(seg.end, seg.start);\n\t\t\tcolumnLeft = colContentLeft(seg.col);\n\t\t\tcolumnRight = colContentRight(seg.col);\n\t\t\tcolumnWidth = columnRight - columnLeft;\n\n\t\t\t// shave off space on right near scrollbars (2.5%)\n\t\t\t// TODO: move this to CSS somehow\n\t\t\tcolumnRight -= columnWidth * .025;\n\t\t\tcolumnWidth = columnRight - columnLeft;\n\n\t\t\twidth = columnWidth * (seg.forwardCoord - seg.backwardCoord);\n\n\t\t\tif (opt('slotEventOverlap')) {\n\t\t\t\t// double the width while making sure resize handle is visible\n\t\t\t\t// (assumed to be 20px wide)\n\t\t\t\twidth = Math.max(\n\t\t\t\t\t(width - (20/2)) * 2,\n\t\t\t\t\twidth // narrow columns will want to make the segment smaller than\n\t\t\t\t\t\t// the natural width. don't allow it\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tif (isRTL) {\n\t\t\t\tright = columnRight - seg.backwardCoord * columnWidth;\n\t\t\t\tleft = right - width;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tleft = columnLeft + seg.backwardCoord * columnWidth;\n\t\t\t\tright = left + width;\n\t\t\t}\n\n\t\t\t// make sure horizontal coordinates are in bounds\n\t\t\tleft = Math.max(left, columnLeft);\n\t\t\tright = Math.min(right, columnRight);\n\t\t\twidth = right - left;\n\n\t\t\tseg.top = top;\n\t\t\tseg.left = left;\n\t\t\tseg.outerWidth = width;\n\t\t\tseg.outerHeight = bottom - top;\n\t\t\thtml += slotSegHtml(event, seg);\n\t\t}\n\n\t\tslotSegmentContainer[0].innerHTML = html; // faster than html()\n\t\teventElements = slotSegmentContainer.children();\n\t\t\n\t\t// retrieve elements, run through eventRender callback, bind event handlers\n\t\tfor (i=0; i<segCnt; i++) {\n\t\t\tseg = segs[i];\n\t\t\tevent = seg.event;\n\t\t\teventElement = $(eventElements[i]); // faster than eq()\n\t\t\ttriggerRes = trigger('eventRender', event, event, eventElement);\n\t\t\tif (triggerRes === false) {\n\t\t\t\teventElement.remove();\n\t\t\t}else{\n\t\t\t\tif (triggerRes && triggerRes !== true) {\n\t\t\t\t\teventElement.remove();\n\t\t\t\t\teventElement = $(triggerRes)\n\t\t\t\t\t\t.css({\n\t\t\t\t\t\t\tposition: 'absolute',\n\t\t\t\t\t\t\ttop: seg.top,\n\t\t\t\t\t\t\tleft: seg.left\n\t\t\t\t\t\t})\n\t\t\t\t\t\t.appendTo(slotSegmentContainer);\n\t\t\t\t}\n\t\t\t\tseg.element = eventElement;\n\t\t\t\tif (event._id === modifiedEventId) {\n\t\t\t\t\tbindSlotSeg(event, eventElement, seg);\n\t\t\t\t}else{\n\t\t\t\t\teventElement[0]._fci = i; // for lazySegBind\n\t\t\t\t}\n\t\t\t\treportEventElement(event, eventElement);\n\t\t\t}\n\t\t}\n\t\t\n\t\tlazySegBind(slotSegmentContainer, segs, bindSlotSeg);\n\t\t\n\t\t// record event sides and title positions\n\t\tfor (i=0; i<segCnt; i++) {\n\t\t\tseg = segs[i];\n\t\t\tif ((eventElement = seg.element)) {\n\t\t\t\tseg.vsides = vsides(eventElement, true);\n\t\t\t\tseg.hsides = hsides(eventElement, true);\n\t\t\t\ttitleElement = eventElement.find('.fc-event-title');\n\t\t\t\tif (titleElement.length) {\n\t\t\t\t\tseg.contentTop = titleElement[0].offsetTop;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t// set all positions/dimensions at once\n\t\tfor (i=0; i<segCnt; i++) {\n\t\t\tseg = segs[i];\n\t\t\tif ((eventElement = seg.element)) {\n\t\t\t\teventElement[0].style.width = Math.max(0, seg.outerWidth - seg.hsides) + 'px';\n\t\t\t\theight = Math.max(0, seg.outerHeight - seg.vsides);\n\t\t\t\teventElement[0].style.height = height + 'px';\n\t\t\t\tevent = seg.event;\n\t\t\t\tif (seg.contentTop !== undefined && height - seg.contentTop < 10) {\n\t\t\t\t\t// not enough room for title, put it in the time (TODO: maybe make both display:inline instead)\n\t\t\t\t\teventElement.find('div.fc-event-time')\n\t\t\t\t\t\t.text(\n\t\t\t\t\t\t\tformatDate(event.start, opt('timeFormat')) + ' - ' + event.title\n\t\t\t\t\t\t);\n\t\t\t\t\teventElement.find('div.fc-event-title')\n\t\t\t\t\t\t.remove();\n\t\t\t\t}\n\t\t\t\ttrigger('eventAfterRender', event, event, eventElement);\n\t\t\t}\n\t\t}\n\t\t\t\t\t\n\t}", "function renderSlotSegs(segs, modifiedEventId) {\n\t\n\t\tvar i, segCnt=segs.length, seg,\n\t\t\tevent,\n\t\t\ttop,\n\t\t\tbottom,\n\t\t\tcolumnLeft,\n\t\t\tcolumnRight,\n\t\t\tcolumnWidth,\n\t\t\twidth,\n\t\t\tleft,\n\t\t\tright,\n\t\t\thtml = '',\n\t\t\teventElements,\n\t\t\teventElement,\n\t\t\ttriggerRes,\n\t\t\ttitleElement,\n\t\t\theight,\n\t\t\tslotSegmentContainer = getSlotSegmentContainer(),\n\t\t\tisRTL = opt('isRTL');\n\t\t\t\n\t\t// calculate position/dimensions, create html\n\t\tfor (i=0; i<segCnt; i++) {\n\t\t\tseg = segs[i];\n\t\t\tevent = seg.event;\n\t\t\ttop = computeDateTop(seg.start, seg.start);\n\t\t\tbottom = computeDateTop(seg.end, seg.start);\n\t\t\tcolumnLeft = colContentLeft(seg.col);\n\t\t\tcolumnRight = colContentRight(seg.col);\n\t\t\tcolumnWidth = columnRight - columnLeft;\n\n\t\t\t// shave off space on right near scrollbars (2.5%)\n\t\t\t// TODO: move this to CSS somehow\n\t\t\tcolumnRight -= columnWidth * .025;\n\t\t\tcolumnWidth = columnRight - columnLeft;\n\n\t\t\twidth = columnWidth * (seg.forwardCoord - seg.backwardCoord);\n\n\t\t\tif (opt('slotEventOverlap')) {\n\t\t\t\t// double the width while making sure resize handle is visible\n\t\t\t\t// (assumed to be 20px wide)\n\t\t\t\twidth = Math.max(\n\t\t\t\t\t(width - (20/2)) * 2,\n\t\t\t\t\twidth // narrow columns will want to make the segment smaller than\n\t\t\t\t\t\t// the natural width. don't allow it\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tif (isRTL) {\n\t\t\t\tright = columnRight - seg.backwardCoord * columnWidth;\n\t\t\t\tleft = right - width;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tleft = columnLeft + seg.backwardCoord * columnWidth;\n\t\t\t\tright = left + width;\n\t\t\t}\n\n\t\t\t// make sure horizontal coordinates are in bounds\n\t\t\tleft = Math.max(left, columnLeft);\n\t\t\tright = Math.min(right, columnRight);\n\t\t\twidth = right - left;\n\n\t\t\tseg.top = top;\n\t\t\tseg.left = left;\n\t\t\tseg.outerWidth = width;\n\t\t\tseg.outerHeight = bottom - top;\n\t\t\thtml += slotSegHtml(event, seg);\n\t\t}\n\n\t\tslotSegmentContainer[0].innerHTML = html; // faster than html()\n\t\teventElements = slotSegmentContainer.children();\n\t\t\n\t\t// retrieve elements, run through eventRender callback, bind event handlers\n\t\tfor (i=0; i<segCnt; i++) {\n\t\t\tseg = segs[i];\n\t\t\tevent = seg.event;\n\t\t\teventElement = $(eventElements[i]); // faster than eq()\n\t\t\ttriggerRes = trigger('eventRender', event, event, eventElement);\n\t\t\tif (triggerRes === false) {\n\t\t\t\teventElement.remove();\n\t\t\t}else{\n\t\t\t\tif (triggerRes && triggerRes !== true) {\n\t\t\t\t\teventElement.remove();\n\t\t\t\t\teventElement = $(triggerRes)\n\t\t\t\t\t\t.css({\n\t\t\t\t\t\t\tposition: 'absolute',\n\t\t\t\t\t\t\ttop: seg.top,\n\t\t\t\t\t\t\tleft: seg.left\n\t\t\t\t\t\t})\n\t\t\t\t\t\t.appendTo(slotSegmentContainer);\n\t\t\t\t}\n\t\t\t\tseg.element = eventElement;\n\t\t\t\tif (event._id === modifiedEventId) {\n\t\t\t\t\tbindSlotSeg(event, eventElement, seg);\n\t\t\t\t}else{\n\t\t\t\t\teventElement[0]._fci = i; // for lazySegBind\n\t\t\t\t}\n\t\t\t\treportEventElement(event, eventElement);\n\t\t\t}\n\t\t}\n\t\t\n\t\tlazySegBind(slotSegmentContainer, segs, bindSlotSeg);\n\t\t\n\t\t// record event sides and title positions\n\t\tfor (i=0; i<segCnt; i++) {\n\t\t\tseg = segs[i];\n\t\t\tif ((eventElement = seg.element)) {\n\t\t\t\tseg.vsides = vsides(eventElement, true);\n\t\t\t\tseg.hsides = hsides(eventElement, true);\n\t\t\t\ttitleElement = eventElement.find('.fc-event-title');\n\t\t\t\tif (titleElement.length) {\n\t\t\t\t\tseg.contentTop = titleElement[0].offsetTop;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t// set all positions/dimensions at once\n\t\tfor (i=0; i<segCnt; i++) {\n\t\t\tseg = segs[i];\n\t\t\tif ((eventElement = seg.element)) {\n\t\t\t\teventElement[0].style.width = Math.max(0, seg.outerWidth - seg.hsides) + 'px';\n\t\t\t\theight = Math.max(0, seg.outerHeight - seg.vsides);\n\t\t\t\teventElement[0].style.height = height + 'px';\n\t\t\t\tevent = seg.event;\n\t\t\t\tif (seg.contentTop !== undefined && height - seg.contentTop < 10) {\n\t\t\t\t\t// not enough room for title, put it in the time (TODO: maybe make both display:inline instead)\n\t\t\t\t\teventElement.find('div.fc-event-time')\n\t\t\t\t\t\t.text(\n\t\t\t\t\t\t\tformatDate(event.start, opt('timeFormat')) + ' - ' + event.title\n\t\t\t\t\t\t);\n\t\t\t\t\teventElement.find('div.fc-event-title')\n\t\t\t\t\t\t.remove();\n\t\t\t\t}\n\t\t\t\ttrigger('eventAfterRender', event, event, eventElement);\n\t\t\t}\n\t\t}\n\t\t\t\t\t\n\t}", "function createOptionHTML(_ref) {\n var _ref2 = _slicedToArray(_ref, 2);\n\n var departureTime = _ref2[0];\n var arrivalTime = _ref2[1];\n\n\n var durationInSeconds = timeToSeconds(arrivalTime[0].arrival_time) - timeToSeconds(departureTime[0].arrival_time);\n var duration = secondsToTime(durationInSeconds);\n\n return '<div class=\"row\">\\n <div class=\"col-33 cell\">\\n ' + departureTime[0].stop_id + ' - ' + departureTime[0].arrival_time + '\\n </div>\\n <div class=\"col-33 cell\">\\n ' + arrivalTime[0].stop_id + ' - ' + arrivalTime[0].arrival_time + '\\n </div>\\n <div class=\"col-33 cell\">\\n ' + duration + '\\n </div>\\n </div>';\n}", "niceList(array, join, finalJoin) {\n var arr = array.slice(0), last = arr.pop();\n join = join || ', ';\n finalJoin = finalJoin || ' and ';\n return arr.join(join) + finalJoin + last;\n }", "function reporteeCompetenciesListHTML(competencies){\n\tvar HTML = \"\";\n\t\n\tfor (var i = 0; i < competencies.length; i++){\n\t\tHTML += competencies[i];\n\t\tif(i == competencies.length-1){\n\t\t\tHTML += \".\";\n\t\t}else{\n\t\t\tHTML += \", \";\n\t\t}\n\t}\n return HTML;\n}", "function buildHTMLBlock(clist, sectionHeader) {\n let block = `<ol class=\"minimizable-box\">\\n`;\n block += `\\t<span class=\"box-header\">${sectionHeader}</span>\\n`;\n for(com in clist) {\n block += `\\t<li class=\"command\">\\n`;\n block += `\\t\\t<div class=\"command-name\">${com}</div>\\n`\n block += `\\t\\t<div class=\"command-result\">${clist[com]}</div>\\n`\n block += `\\t</li>\\n`\n }\n block += `</ol><br>`\n return block;\n}", "function buildContent(array) {\n \"use strict\";\n // Assuming multi-dimensional array of format: name, id, load point\n // Ignore index 0 (headers) in outer array\n for (var i=1; i<array.length; i++) {\n var name = array[i][0];\n var id = array[i][1];\n var lp = array[i][2]; //lp = load point\n var ef = array[i][3]; //ef = extra fields\n\n var url = buildUrl(lp, ef);\n\n addNavItem(name, id);\n addTab(id);\n loadNews(url, id);\n }\n\n // Adds a hidden tab for search reults\n addTab(\"99\");\n $(\"#nav_ul\").append(\"<li class=\\\"hidden\\\"><a href=\\\"#tabs_99\\\">Search</a></li>\");\n\n $( function() {\n $( \"#tabs\" ).tabs();\n } );\n}", "_generateMarkup() {\n // console.log(this._data); // data is in the form of an array. We want to return one of the below html elements for each of the elements in that array\n\n return this._data.map(this._generateMarkupPreview).join('');\n }", "function outputArray(heading, theArray, output) {\n\toutput.innerHTML = heading + theArray.join(\" \");\n} //end function outputArray", "function renderSlotSegs(segs, modifiedEventId) {\n\t\n\t\tvar i, segCnt=segs.length, seg,\n\t\t\tevent,\n\t\t\ttop,\n\t\t\tbottom,\n\t\t\tcolumnLeft,\n\t\t\tcolumnRight,\n\t\t\tcolumnWidth,\n\t\t\twidth,\n\t\t\tleft,\n\t\t\tright,\n\t\t\thtml = '',\n\t\t\teventElements,\n\t\t\teventElement,\n\t\t\ttriggerRes,\n\t\t\ttitleElement,\n\t\t\theight,\n\t\t\tslotSegmentContainer = getSlotSegmentContainer(),\n\t\t\tisRTL = opt('isRTL');\n\t\t\t\n\t\t// calculate position/dimensions, create html\n\t\tfor (i=0; i<segCnt; i++) {\n\t\t\tseg = segs[i];\n\t\t\tevent = seg.event;\n\t\t\ttop = timePosition(seg.start, seg.start);\n\t\t\tbottom = timePosition(seg.start, seg.end);\n\t\t\tcolumnLeft = colContentLeft(seg.col);\n\t\t\tcolumnRight = colContentRight(seg.col);\n\t\t\tcolumnWidth = columnRight - columnLeft;\n\n\t\t\t// shave off space on right near scrollbars (2.5%)\n\t\t\t// TODO: move this to CSS somehow\n\t\t\tcolumnRight -= columnWidth * .025;\n\t\t\tcolumnWidth = columnRight - columnLeft;\n\n\t\t\twidth = columnWidth * (seg.forwardCoord - seg.backwardCoord);\n\n\t\t\tif (opt('slotEventOverlap')) {\n\t\t\t\t// double the width while making sure resize handle is visible\n\t\t\t\t// (assumed to be 20px wide)\n\t\t\t\twidth = Math.max(\n\t\t\t\t\t(width - (20/2)) * 2,\n\t\t\t\t\twidth // narrow columns will want to make the segment smaller than\n\t\t\t\t\t\t// the natural width. don't allow it\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tif (isRTL) {\n\t\t\t\tright = columnRight - seg.backwardCoord * columnWidth;\n\t\t\t\tleft = right - width;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tleft = columnLeft + seg.backwardCoord * columnWidth;\n\t\t\t\tright = left + width;\n\t\t\t}\n\n\t\t\t// make sure horizontal coordinates are in bounds\n\t\t\tleft = Math.max(left, columnLeft);\n\t\t\tright = Math.min(right, columnRight);\n\t\t\twidth = right - left;\n\n\t\t\tseg.top = top;\n\t\t\tseg.left = left;\n\t\t\tseg.outerWidth = width;\n\t\t\tseg.outerHeight = bottom - top;\n\t\t\thtml += slotSegHtml(event, seg);\n\t\t}\n\n\t\tslotSegmentContainer[0].innerHTML = html; // faster than html()\n\t\teventElements = slotSegmentContainer.children();\n\t\t\n\t\t// retrieve elements, run through eventRender callback, bind event handlers\n\t\tfor (i=0; i<segCnt; i++) {\n\t\t\tseg = segs[i];\n\t\t\tevent = seg.event;\n\t\t\teventElement = $(eventElements[i]); // faster than eq()\n\t\t\ttriggerRes = trigger('eventRender', event, event, eventElement);\n\t\t\tif (triggerRes === false) {\n\t\t\t\teventElement.remove();\n\t\t\t}else{\n\t\t\t\tif (triggerRes && triggerRes !== true) {\n\t\t\t\t\teventElement.remove();\n\t\t\t\t\teventElement = $(triggerRes)\n\t\t\t\t\t\t.css({\n\t\t\t\t\t\t\tposition: 'absolute',\n\t\t\t\t\t\t\ttop: seg.top,\n\t\t\t\t\t\t\tleft: seg.left\n\t\t\t\t\t\t})\n\t\t\t\t\t\t.appendTo(slotSegmentContainer);\n\t\t\t\t}\n\t\t\t\tseg.element = eventElement;\n\t\t\t\tif (event._id === modifiedEventId) {\n\t\t\t\t\tbindSlotSeg(event, eventElement, seg);\n\t\t\t\t}else{\n\t\t\t\t\teventElement[0]._fci = i; // for lazySegBind\n\t\t\t\t}\n\t\t\t\treportEventElement(event, eventElement);\n\t\t\t}\n\t\t}\n\t\t\n\t\tlazySegBind(slotSegmentContainer, segs, bindSlotSeg);\n\t\t\n\t\t// record event sides and title positions\n\t\tfor (i=0; i<segCnt; i++) {\n\t\t\tseg = segs[i];\n\t\t\tif (eventElement = seg.element) {\n\t\t\t\tseg.vsides = vsides(eventElement, true);\n\t\t\t\tseg.hsides = hsides(eventElement, true);\n\t\t\t\ttitleElement = eventElement.find('.fc-event-title');\n\t\t\t\tif (titleElement.length) {\n\t\t\t\t\tseg.contentTop = titleElement[0].offsetTop;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t// set all positions/dimensions at once\n\t\tfor (i=0; i<segCnt; i++) {\n\t\t\tseg = segs[i];\n\t\t\tif (eventElement = seg.element) {\n\t\t\t\teventElement[0].style.width = Math.max(0, seg.outerWidth - seg.hsides) + 'px';\n\t\t\t\theight = Math.max(0, seg.outerHeight - seg.vsides);\n\t\t\t\teventElement[0].style.height = height + 'px';\n\t\t\t\tevent = seg.event;\n\t\t\t\tif (seg.contentTop !== undefined && height - seg.contentTop < 10) {\n\t\t\t\t\t// not enough room for title, put it in the time (TODO: maybe make both display:inline instead)\n\t\t\t\t\teventElement.find('div.fc-event-time')\n\t\t\t\t\t\t.text(formatDate(event.start, opt('timeFormat')) + ' - ' + event.title);\n\t\t\t\t\teventElement.find('div.fc-event-title')\n\t\t\t\t\t\t.remove();\n\t\t\t\t}\n\t\t\t\ttrigger('eventAfterRender', event, event, eventElement);\n\t\t\t}\n\t\t}\n\t\t\t\t\t\n\t}", "function renderSlotSegs(segs, modifiedEventId) {\n\t\n\t\tvar i, segCnt=segs.length, seg,\n\t\t\tevent,\n\t\t\ttop,\n\t\t\tbottom,\n\t\t\tcolumnLeft,\n\t\t\tcolumnRight,\n\t\t\tcolumnWidth,\n\t\t\twidth,\n\t\t\tleft,\n\t\t\tright,\n\t\t\thtml = '',\n\t\t\teventElements,\n\t\t\teventElement,\n\t\t\ttriggerRes,\n\t\t\ttitleElement,\n\t\t\theight,\n\t\t\tslotSegmentContainer = getSlotSegmentContainer(),\n\t\t\tisRTL = opt('isRTL');\n\t\t\t\n\t\t// calculate position/dimensions, create html\n\t\tfor (i=0; i<segCnt; i++) {\n\t\t\tseg = segs[i];\n\t\t\tevent = seg.event;\n\t\t\ttop = timePosition(seg.start, seg.start);\n\t\t\tbottom = timePosition(seg.start, seg.end);\n\t\t\tcolumnLeft = colContentLeft(seg.col);\n\t\t\tcolumnRight = colContentRight(seg.col);\n\t\t\tcolumnWidth = columnRight - columnLeft;\n\n\t\t\t// shave off space on right near scrollbars (2.5%)\n\t\t\t// TODO: move this to CSS somehow\n\t\t\tcolumnRight -= columnWidth * .025;\n\t\t\tcolumnWidth = columnRight - columnLeft;\n\n\t\t\twidth = columnWidth * (seg.forwardCoord - seg.backwardCoord);\n\n\t\t\tif (opt('slotEventOverlap')) {\n\t\t\t\t// double the width while making sure resize handle is visible\n\t\t\t\t// (assumed to be 20px wide)\n\t\t\t\twidth = Math.max(\n\t\t\t\t\t(width - (20/2)) * 2,\n\t\t\t\t\twidth // narrow columns will want to make the segment smaller than\n\t\t\t\t\t\t// the natural width. don't allow it\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tif (isRTL) {\n\t\t\t\tright = columnRight - seg.backwardCoord * columnWidth;\n\t\t\t\tleft = right - width;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tleft = columnLeft + seg.backwardCoord * columnWidth;\n\t\t\t\tright = left + width;\n\t\t\t}\n\n\t\t\t// make sure horizontal coordinates are in bounds\n\t\t\tleft = Math.max(left, columnLeft);\n\t\t\tright = Math.min(right, columnRight);\n\t\t\twidth = right - left;\n\n\t\t\tseg.top = top;\n\t\t\tseg.left = left;\n\t\t\tseg.outerWidth = width;\n\t\t\tseg.outerHeight = bottom - top;\n\t\t\thtml += slotSegHtml(event, seg);\n\t\t}\n\n\t\tslotSegmentContainer[0].innerHTML = html; // faster than html()\n\t\teventElements = slotSegmentContainer.children();\n\t\t\n\t\t// retrieve elements, run through eventRender callback, bind event handlers\n\t\tfor (i=0; i<segCnt; i++) {\n\t\t\tseg = segs[i];\n\t\t\tevent = seg.event;\n\t\t\teventElement = $(eventElements[i]); // faster than eq()\n\t\t\ttriggerRes = trigger('eventRender', event, event, eventElement);\n\t\t\tif (triggerRes === false) {\n\t\t\t\teventElement.remove();\n\t\t\t}else{\n\t\t\t\tif (triggerRes && triggerRes !== true) {\n\t\t\t\t\teventElement.remove();\n\t\t\t\t\teventElement = $(triggerRes)\n\t\t\t\t\t\t.css({\n\t\t\t\t\t\t\tposition: 'absolute',\n\t\t\t\t\t\t\ttop: seg.top,\n\t\t\t\t\t\t\tleft: seg.left\n\t\t\t\t\t\t})\n\t\t\t\t\t\t.appendTo(slotSegmentContainer);\n\t\t\t\t}\n\t\t\t\tseg.element = eventElement;\n\t\t\t\tif (event._id === modifiedEventId) {\n\t\t\t\t\tbindSlotSeg(event, eventElement, seg);\n\t\t\t\t}else{\n\t\t\t\t\teventElement[0]._fci = i; // for lazySegBind\n\t\t\t\t}\n\t\t\t\treportEventElement(event, eventElement);\n\t\t\t}\n\t\t}\n\t\t\n\t\tlazySegBind(slotSegmentContainer, segs, bindSlotSeg);\n\t\t\n\t\t// record event sides and title positions\n\t\tfor (i=0; i<segCnt; i++) {\n\t\t\tseg = segs[i];\n\t\t\tif (eventElement = seg.element) {\n\t\t\t\tseg.vsides = vsides(eventElement, true);\n\t\t\t\tseg.hsides = hsides(eventElement, true);\n\t\t\t\ttitleElement = eventElement.find('.fc-event-title');\n\t\t\t\tif (titleElement.length) {\n\t\t\t\t\tseg.contentTop = titleElement[0].offsetTop;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t// set all positions/dimensions at once\n\t\tfor (i=0; i<segCnt; i++) {\n\t\t\tseg = segs[i];\n\t\t\tif (eventElement = seg.element) {\n\t\t\t\teventElement[0].style.width = Math.max(0, seg.outerWidth - seg.hsides) + 'px';\n\t\t\t\theight = Math.max(0, seg.outerHeight - seg.vsides);\n\t\t\t\teventElement[0].style.height = height + 'px';\n\t\t\t\tevent = seg.event;\n\t\t\t\tif (seg.contentTop !== undefined && height - seg.contentTop < 10) {\n\t\t\t\t\t// not enough room for title, put it in the time (TODO: maybe make both display:inline instead)\n\t\t\t\t\teventElement.find('div.fc-event-time')\n\t\t\t\t\t\t.text(formatDate(event.start, opt('timeFormat')) + ' - ' + event.title);\n\t\t\t\t\teventElement.find('div.fc-event-title')\n\t\t\t\t\t\t.remove();\n\t\t\t\t}\n\t\t\t\ttrigger('eventAfterRender', event, event, eventElement);\n\t\t\t}\n\t\t}\n\t\t\t\t\t\n\t}", "function renderSlotSegs(segs, modifiedEventId) {\n\t\n\t\tvar i, segCnt=segs.length, seg,\n\t\t\tevent,\n\t\t\ttop,\n\t\t\tbottom,\n\t\t\tcolumnLeft,\n\t\t\tcolumnRight,\n\t\t\tcolumnWidth,\n\t\t\twidth,\n\t\t\tleft,\n\t\t\tright,\n\t\t\thtml = '',\n\t\t\teventElements,\n\t\t\teventElement,\n\t\t\ttriggerRes,\n\t\t\ttitleElement,\n\t\t\theight,\n\t\t\tslotSegmentContainer = getSlotSegmentContainer(),\n\t\t\tisRTL = opt('isRTL');\n\t\t\t\n\t\t// calculate position/dimensions, create html\n\t\tfor (i=0; i<segCnt; i++) {\n\t\t\tseg = segs[i];\n\t\t\tevent = seg.event;\n\t\t\ttop = timePosition(seg.start, seg.start);\n\t\t\tbottom = timePosition(seg.start, seg.end);\n\t\t\tcolumnLeft = colContentLeft(seg.col);\n\t\t\tcolumnRight = colContentRight(seg.col);\n\t\t\tcolumnWidth = columnRight - columnLeft;\n\n\t\t\t// shave off space on right near scrollbars (2.5%)\n\t\t\t// TODO: move this to CSS somehow\n\t\t\tcolumnRight -= columnWidth * .025;\n\t\t\tcolumnWidth = columnRight - columnLeft;\n\n\t\t\twidth = columnWidth * (seg.forwardCoord - seg.backwardCoord);\n\n\t\t\tif (opt('slotEventOverlap')) {\n\t\t\t\t// double the width while making sure resize handle is visible\n\t\t\t\t// (assumed to be 20px wide)\n\t\t\t\twidth = Math.max(\n\t\t\t\t\t(width - (20/2)) * 2,\n\t\t\t\t\twidth // narrow columns will want to make the segment smaller than\n\t\t\t\t\t\t// the natural width. don't allow it\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tif (isRTL) {\n\t\t\t\tright = columnRight - seg.backwardCoord * columnWidth;\n\t\t\t\tleft = right - width;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tleft = columnLeft + seg.backwardCoord * columnWidth;\n\t\t\t\tright = left + width;\n\t\t\t}\n\n\t\t\t// make sure horizontal coordinates are in bounds\n\t\t\tleft = Math.max(left, columnLeft);\n\t\t\tright = Math.min(right, columnRight);\n\t\t\twidth = right - left;\n\n\t\t\tseg.top = top;\n\t\t\tseg.left = left;\n\t\t\tseg.outerWidth = width;\n\t\t\tseg.outerHeight = bottom - top;\n\t\t\thtml += slotSegHtml(event, seg);\n\t\t}\n\n\t\tslotSegmentContainer[0].innerHTML = html; // faster than html()\n\t\teventElements = slotSegmentContainer.children();\n\t\t\n\t\t// retrieve elements, run through eventRender callback, bind event handlers\n\t\tfor (i=0; i<segCnt; i++) {\n\t\t\tseg = segs[i];\n\t\t\tevent = seg.event;\n\t\t\teventElement = $(eventElements[i]); // faster than eq()\n\t\t\ttriggerRes = trigger('eventRender', event, event, eventElement);\n\t\t\tif (triggerRes === false) {\n\t\t\t\teventElement.remove();\n\t\t\t}else{\n\t\t\t\tif (triggerRes && triggerRes !== true) {\n\t\t\t\t\teventElement.remove();\n\t\t\t\t\teventElement = $(triggerRes)\n\t\t\t\t\t\t.css({\n\t\t\t\t\t\t\tposition: 'absolute',\n\t\t\t\t\t\t\ttop: seg.top,\n\t\t\t\t\t\t\tleft: seg.left\n\t\t\t\t\t\t})\n\t\t\t\t\t\t.appendTo(slotSegmentContainer);\n\t\t\t\t}\n\t\t\t\tseg.element = eventElement;\n\t\t\t\tif (event._id === modifiedEventId) {\n\t\t\t\t\tbindSlotSeg(event, eventElement, seg);\n\t\t\t\t}else{\n\t\t\t\t\teventElement[0]._fci = i; // for lazySegBind\n\t\t\t\t}\n\t\t\t\treportEventElement(event, eventElement);\n\t\t\t}\n\t\t}\n\t\t\n\t\tlazySegBind(slotSegmentContainer, segs, bindSlotSeg);\n\t\t\n\t\t// record event sides and title positions\n\t\tfor (i=0; i<segCnt; i++) {\n\t\t\tseg = segs[i];\n\t\t\tif (eventElement = seg.element) {\n\t\t\t\tseg.vsides = vsides(eventElement, true);\n\t\t\t\tseg.hsides = hsides(eventElement, true);\n\t\t\t\ttitleElement = eventElement.find('.fc-event-title');\n\t\t\t\tif (titleElement.length) {\n\t\t\t\t\tseg.contentTop = titleElement[0].offsetTop;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t// set all positions/dimensions at once\n\t\tfor (i=0; i<segCnt; i++) {\n\t\t\tseg = segs[i];\n\t\t\tif (eventElement = seg.element) {\n\t\t\t\teventElement[0].style.width = Math.max(0, seg.outerWidth - seg.hsides) + 'px';\n\t\t\t\theight = Math.max(0, seg.outerHeight - seg.vsides);\n\t\t\t\teventElement[0].style.height = height + 'px';\n\t\t\t\tevent = seg.event;\n\t\t\t\tif (seg.contentTop !== undefined && height - seg.contentTop < 10) {\n\t\t\t\t\t// not enough room for title, put it in the time (TODO: maybe make both display:inline instead)\n\t\t\t\t\teventElement.find('div.fc-event-time')\n\t\t\t\t\t\t.text(formatDate(event.start, opt('timeFormat')) + ' - ' + event.title);\n\t\t\t\t\teventElement.find('div.fc-event-title')\n\t\t\t\t\t\t.remove();\n\t\t\t\t}\n\t\t\t\ttrigger('eventAfterRender', event, event, eventElement);\n\t\t\t}\n\t\t}\n\t\t\t\t\t\n\t}", "function catArrayPrint(){\n var catString = \"\";\n catString += `<select>`\n catString += `<option>Select Category</option>`\n for (var k=0; k<categoriesArray.length; k++){\n catString += `<option>${categoriesArray[k].name}</option>`\n }\n catString += `</select>`;\n $(\"#explosiveDiv\").append(catString);\n \n }", "function makeListItem(array){\n return \" <li> <span> <p id='name'> To do: \"+array[0]+\" </p> <p id='loc'> Location: \" + array[4] + \"</p> <p id='loc'> Time: \" + array[5] + \"</p> </span> </li> \";\n}", "function appendSegment(subset) {\n var jqSubset = [];\n for (var m = 0; m < subset.length; m++) {\n var obj = subset[m];\n var hno = obj.indx;\n var tbl = tblItemHtml;\n var lnk = '<a class=\"stlinks\" href=\"../pages/hikePageTemplate.php?hikeIndx=' +\n obj.indx + '\" target=\"_blank\">' + obj.name + '</a>';\n tbl += lnk;\n tbl += '<br /><span class=\"subtxt\">Rating: ' + obj.diff + ' / '\n + obj.lgth + ' miles';\n tbl += '</span><br /><span class=\"subtxt\">Elev Change: ';\n tbl += obj.elev + ' feet</span><p id=\"sidelat\" style=\"display:none\">';\n tbl += obj.loc.lat + '</p><p id=\"sidelng\" style=\"display:none\">';\n tbl += obj.loc.lng + '</p></div>';\n tbl += '<div class=\"thumbs\"><img src=\"' + thumb +\n obj.prev + '\" alt=\"preview image\" /></div>';\n tbl += '</div>';\n var $tbl = $(tbl);\n $('#sideTable').append($tbl);\n // Note: $tbl must be appended before adding to array!!\n jqSubset.push($tbl);\n }\n enlargePreview(jqSubset);\n enableFavorites(jqSubset);\n enableZoom(jqSubset);\n return;\n}", "function createHTML (courseSet) {\n\tvar frame = '';\n\tfor (var j=0; j < courseSet.length;\t j ++) {\n\t\tif (courseSet[j].filename != \"na\") {\n\t\t\tframe += \"<li class='list-group-item body-text'><b>\" + courseSet[j].courseCode + \" \" + courseSet[j].courseNum + \"</b> - \" + courseSet[j].title + \" (\" + courseSet[j].quarter + \" \" + courseSet[j].year + \") \" + \"<a href='documents/syllabi/\" + courseSet[j].filename + \"''>\" + \"[syllabus]\" + \"</a></li>\";\n\t\t}\n\t\telse {\n\t\tframe += \"<li class='list-group-item body-text'><b>\" + courseSet[j].courseCode + \" \" + courseSet[j].courseNum + \"</b> - \" + courseSet[j].title + \" (\" + courseSet[j].quarter + \" \" + courseSet[j].year + \") \" + \"</li>\";\n\t\t}\n\t}\n\treturn frame;\n}", "function concatenatorFromPoint(someArray, a) {\n var arrayLength = someArray.length; //sets this variable for readability\n var newString = '' //creating an empty string variable that will be filled with the array's elements\n for(var i= a; i<arrayLength; i++){\n newString = newString + someArray[i];\n }\n return newString;\n}", "function buildNav() {\n for (let i of section) {\n let newSection = `<li class=\"menu__link ${i.className}\"data-link==${i.id}><a href=\"#${i.id}\">${i.dataset.nav}</li>`;\n\n navl.insertAdjacentHTML(\"beforeend\", newSection);\n }\n}", "function readyToPutInTheDOM(arr) {\n return arr.map(function(obj) {\n return \"<h1>\" +obj.name +\"</h1>\" + \"<h2>\" + obj.age +\"</h2>\";\n });\n }", "function generateHtml() {\n const folder = fs.readdirSync(`${__dirname}/projects`);\n let myHtml = \" \";\n folder.forEach((arg) => {\n myHtml += `<p><a href=\"/${arg}/\">${arg}</a></p>`;\n });\n return myHtml;\n}", "function makeEmployeesHTML(results) {\n\t\tupdateEmployeeFilter();\n\t\tlet html = [];\n\t\tresults.forEach( (employee, i) => {\n\t\t\tconst employeeHtml = makeContactHTML(employee, i);\n\t\t\tif (employee.filteredFor === true) {\n\t\t\t\thtml.push(employeeHtml);\n\t\t\t}\n\t\t});\n\t\treturn html.join('')\n\t}", "function buildNav(){\n \n sections.forEach(createLi); // applying the createLi function for each Elements\n navBar.appendChild(docFrag);// now we can add the Fragment With contains all li elements to the navBar\n}" ]
[ "0.6436715", "0.6024399", "0.6024399", "0.6024399", "0.5998631", "0.5996163", "0.5639905", "0.54803085", "0.5434722", "0.5406663", "0.54057944", "0.54003", "0.5374191", "0.53732914", "0.536657", "0.5340935", "0.53226066", "0.5321825", "0.53137153", "0.52845955", "0.5265781", "0.52442104", "0.523423", "0.52195454", "0.52043283", "0.5197884", "0.5171855", "0.5160386", "0.5157604", "0.5155658", "0.5149599", "0.5146774", "0.5139991", "0.5135078", "0.5126909", "0.5120705", "0.5114772", "0.5114441", "0.51120836", "0.51120836", "0.51120836", "0.51120836", "0.51120836", "0.51070374", "0.510601", "0.5098629", "0.5088054", "0.50858295", "0.5084526", "0.5081331", "0.5073267", "0.50696844", "0.5068087", "0.5066374", "0.5063053", "0.5052939", "0.5048277", "0.5041491", "0.50413555", "0.50329584", "0.503091", "0.5017905", "0.5016495", "0.50140834", "0.5004223", "0.49972856", "0.49962416", "0.49939016", "0.49898478", "0.4977595", "0.49666902", "0.49653828", "0.49627054", "0.49616173", "0.49616173", "0.49616173", "0.49570164", "0.49547163", "0.49524415", "0.49514344", "0.494955", "0.494789", "0.49431542", "0.49407795", "0.49407795", "0.49407795", "0.49310136", "0.49300122", "0.49290675", "0.4928452", "0.4927004", "0.4926825", "0.4924324", "0.49242", "0.49218047", "0.49173748" ]
0.84847665
3
Build an HTML string for a single segment. Relies on the following properties: `segment.event` (from `buildSegmentsForEvent`) `segment.left` (from `calculateHorizontals`)
function buildHTMLForSegment(segment) { var html = ''; var isRTL = opt('isRTL'); var event = segment.event; var url = event.url; // generate the list of CSS classNames var classNames = [ 'fc-event', 'fc-event-hori' ]; if (isEventDraggable(event)) { classNames.push('fc-event-draggable'); } if (segment.isStart) { classNames.push('fc-event-start'); } if (segment.isEnd) { classNames.push('fc-event-end'); } // use the event's configured classNames // guaranteed to be an array via `normalizeEvent` classNames = classNames.concat(event.className); if (event.source) { // use the event's source's classNames, if specified classNames = classNames.concat(event.source.className || []); } // generate a semicolon delimited CSS string for any of the "skin" properties // of the event object (`backgroundColor`, `borderColor` and such) var skinCss = getSkinCss(event, opt); if (url) { html += "<a href='" + htmlEscape(url) + "'"; }else{ html += "<div"; } html += " class='" + classNames.join(' ') + "'" + " style=" + "'" + "position:absolute;" + "left:" + segment.left + "px;" + skinCss + "'" + ">" + "<div class='fc-event-inner'>"; if (!event.allDay && segment.isStart) { html += "<span class='fc-event-time'>" + htmlEscape( formatDates(event.start, event.end, opt('timeFormat')) ) + "</span>"; } html += "<span class='fc-event-title'>" + htmlEscape(event.title || '') + "</span>" + "</div>"; if (segment.isEnd && isEventResizable(event)) { html += "<div class='ui-resizable-handle ui-resizable-" + (isRTL ? 'w' : 'e') + "'>" + "   " + // makes hit area a lot better for IE6/7 "</div>"; } html += "</" + (url ? "a" : "div") + ">"; // TODO: // When these elements are initially rendered, they will be briefly visibile on the screen, // even though their widths/heights are not set. // SOLUTION: initially set them as visibility:hidden ? return html; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function buildHTMLForSegment(segment) {\n\t\tvar html = '';\n\t\tvar isRTL = opt('isRTL');\n\t\tvar event = segment.event;\n\t\tvar url = event.url;\n\n\t\t// generate the list of CSS classNames\n\t\tvar classNames = [ 'fc-event', 'fc-event-hori' ];\n\t\tif (isEventDraggable(event)) {\n\t\t\tclassNames.push('fc-event-draggable');\n\t\t}\n\t\tif (segment.isStart) {\n\t\t\tclassNames.push('fc-event-start');\n\t\t}\n\t\tif (segment.isEnd) {\n\t\t\tclassNames.push('fc-event-end');\n\t\t}\n\t\t// use the event's configured classNames\n\t\t// guaranteed to be an array via `normalizeEvent`\n\t\tclassNames = classNames.concat(event.className);\n\t\tif (event.source) {\n\t\t\t// use the event's source's classNames, if specified\n\t\t\tclassNames = classNames.concat(event.source.className || []);\n\t\t}\n\n\t\t// generate a semicolon delimited CSS string for any of the \"skin\" properties\n\t\t// of the event object (`backgroundColor`, `borderColor` and such)\n\t\tvar skinCss = getSkinCss(event, opt);\n\n\t\tif (url) {\n\t\t\thtml += \"<a href='\" + htmlEscape(url) + \"'\";\n\t\t}else{\n\t\t\thtml += \"<div\";\n\t\t}\n\t\thtml +=\n\t\t\t\" class='\" + classNames.join(' ') + \"'\" +\n\t\t\t\" style=\" +\n\t\t\t\t\"'\" +\n\t\t\t\t\"position:absolute;\" +\n\t\t\t\t\"left:\" + segment.left + \"px;\" +\n\t\t\t\tskinCss +\n\t\t\t\t\"'\" +\n\t\t\t\">\" +\n\t\t\t\"<div class='fc-event-inner'>\";\n\t\tif (!event.allDay && segment.isStart) {\n\t\t\thtml +=\n\t\t\t\t\"<span class='fc-event-time'>\" +\n\t\t\t\thtmlEscape(\n\t\t\t\t\tformatDates(event.start, event.end, opt('timeFormat'))\n\t\t\t\t) +\n\t\t\t\t\"</span>\";\n\t\t}\n\t\thtml +=\n\t\t\t\"<span class='fc-event-title'>\" +\n\t\t\thtmlEscape(event.title || '') +\n\t\t\t\"</span>\" +\n\t\t\t\"</div>\";\n\t\tif (segment.isEnd && isEventResizable(event)) {\n\t\t\thtml +=\n\t\t\t\t\"<div class='ui-resizable-handle ui-resizable-\" + (isRTL ? 'w' : 'e') + \"'>\" +\n\t\t\t\t\"&nbsp;&nbsp;&nbsp;\" + // makes hit area a lot better for IE6/7\n\t\t\t\t\"</div>\";\n\t\t}\n\t\thtml += \"</\" + (url ? \"a\" : \"div\") + \">\";\n\n\t\t// TODO:\n\t\t// When these elements are initially rendered, they will be briefly visibile on the screen,\n\t\t// even though their widths/heights are not set.\n\t\t// SOLUTION: initially set them as visibility:hidden ?\n\n\t\treturn html;\n\t}", "function buildHTMLForSegment(segment) {\n\t\tvar html = '';\n\t\tvar isRTL = opt('isRTL');\n\t\tvar event = segment.event;\n\t\tvar url = event.url;\n\n\t\t// generate the list of CSS classNames\n\t\tvar classNames = [ 'fc-event', 'fc-event-hori' ];\n\t\tif (isEventDraggable(event)) {\n\t\t\tclassNames.push('fc-event-draggable');\n\t\t}\n\t\tif (segment.isStart) {\n\t\t\tclassNames.push('fc-event-start');\n\t\t}\n\t\tif (segment.isEnd) {\n\t\t\tclassNames.push('fc-event-end');\n\t\t}\n\t\t// use the event's configured classNames\n\t\t// guaranteed to be an array via `normalizeEvent`\n\t\tclassNames = classNames.concat(event.className);\n\t\tif (event.source) {\n\t\t\t// use the event's source's classNames, if specified\n\t\t\tclassNames = classNames.concat(event.source.className || []);\n\t\t}\n\n\t\t// generate a semicolon delimited CSS string for any of the \"skin\" properties\n\t\t// of the event object (`backgroundColor`, `borderColor` and such)\n\t\tvar skinCss = getSkinCss(event, opt);\n\n\t\tif (url) {\n\t\t\thtml += \"<a href='\" + htmlEscape(url) + \"'\";\n\t\t}else{\n\t\t\thtml += \"<div\";\n\t\t}\n\t\thtml +=\n\t\t\t\" class='\" + classNames.join(' ') + \"'\" +\n\t\t\t\" style=\" +\n\t\t\t\t\"'\" +\n\t\t\t\t\"position:absolute;\" +\n\t\t\t\t\"left:\" + segment.left + \"px;\" +\n\t\t\t\tskinCss +\n\t\t\t\t\"'\" +\n\t\t\t\">\" +\n\t\t\t\"<div class='fc-event-inner'>\";\n\t\tif (!event.allDay && segment.isStart) {\n\t\t\thtml +=\n\t\t\t\t\"<span class='fc-event-time'>\" +\n\t\t\t\thtmlEscape(\n\t\t\t\t\tformatDates(event.start, event.end, opt('timeFormat'))\n\t\t\t\t) +\n\t\t\t\t\"</span>\";\n\t\t}\n\t\thtml +=\n\t\t\t\"<span class='fc-event-title'>\" +\n\t\t\thtmlEscape(event.title || '') +\n\t\t\t\"</span>\" +\n\t\t\t\"</div>\";\n\t\tif (segment.isEnd && isEventResizable(event)) {\n\t\t\thtml +=\n\t\t\t\t\"<div class='ui-resizable-handle ui-resizable-\" + (isRTL ? 'w' : 'e') + \"'>\" +\n\t\t\t\t\"&nbsp;&nbsp;&nbsp;\" + // makes hit area a lot better for IE6/7\n\t\t\t\t\"</div>\";\n\t\t}\n\t\thtml += \"</\" + (url ? \"a\" : \"div\") + \">\";\n\n\t\t// TODO:\n\t\t// When these elements are initially rendered, they will be briefly visibile on the screen,\n\t\t// even though their widths/heights are not set.\n\t\t// SOLUTION: initially set them as visibility:hidden ?\n\n\t\treturn html;\n\t}", "function buildHTMLForSegment(segment) {\n\t\tvar html = '';\n\t\tvar isRTL = opt('isRTL');\n\t\tvar event = segment.event;\n\t\tvar url = event.url;\n\n\t\t// generate the list of CSS classNames\n\t\tvar classNames = [ 'fc-event', 'fc-event-hori' ];\n\t\tif (isEventDraggable(event)) {\n\t\t\tclassNames.push('fc-event-draggable');\n\t\t}\n\t\tif (segment.isStart) {\n\t\t\tclassNames.push('fc-event-start');\n\t\t}\n\t\tif (segment.isEnd) {\n\t\t\tclassNames.push('fc-event-end');\n\t\t}\n\t\t// use the event's configured classNames\n\t\t// guaranteed to be an array via `buildEvent`\n\t\tclassNames = classNames.concat(event.className);\n\t\tif (event.source) {\n\t\t\t// use the event's source's classNames, if specified\n\t\t\tclassNames = classNames.concat(event.source.className || []);\n\t\t}\n\n\t\t// generate a semicolon delimited CSS string for any of the \"skin\" properties\n\t\t// of the event object (`backgroundColor`, `borderColor` and such)\n\t\tvar skinCss = getSkinCss(event, opt);\n\n\t\tif (url) {\n\t\t\thtml += \"<a href='\" + htmlEscape(url) + \"'\";\n\t\t}else{\n\t\t\thtml += \"<div\";\n\t\t}\n\t\thtml +=\n\t\t\t\" class='\" + classNames.join(' ') + \"'\" +\n\t\t\t\" style=\" +\n\t\t\t\t\"'\" +\n\t\t\t\t\"position:absolute;\" +\n\t\t\t\t\"left:\" + segment.left + \"px;\" +\n\t\t\t\tskinCss +\n\t\t\t\t\"'\" +\n\t\t\t\">\" +\n\t\t\t\"<div class='fc-event-inner'>\";\n\t\tif (!event.allDay && segment.isStart) {\n\t\t\thtml +=\n\t\t\t\t\"<span class='fc-event-time'>\" +\n\t\t\t\thtmlEscape(t.getEventTimeText(event)) +\n\t\t\t\t\"</span>\";\n\t\t}\n\t\thtml +=\n\t\t\t\"<span class='fc-event-title'>\" +\n\t\t\thtmlEscape(event.title || '') +\n\t\t\t\"</span>\" +\n\t\t\t\"</div>\";\n\t\tif (event.allDay && segment.isEnd && isEventResizable(event)) {\n\t\t\thtml +=\n\t\t\t\t\"<div class='ui-resizable-handle ui-resizable-\" + (isRTL ? 'w' : 'e') + \"'>\" +\n\t\t\t\t\"&nbsp;&nbsp;&nbsp;\" + // makes hit area a lot better for IE6/7\n\t\t\t\t\"</div>\";\n\t\t}\n\t\thtml += \"</\" + (url ? \"a\" : \"div\") + \">\";\n\n\t\t// TODO:\n\t\t// When these elements are initially rendered, they will be briefly visibile on the screen,\n\t\t// even though their widths/heights are not set.\n\t\t// SOLUTION: initially set them as visibility:hidden ?\n\n\t\treturn html;\n\t}", "function buildHTMLForSegment(segment) {\n\t\tvar html = '';\n\t\tvar isRTL = opt('isRTL');\n\t\tvar event = segment.event;\n\t\tvar url = event.url;\n\n\t\t// generate the list of CSS classNames\n\t\tvar classNames = [ 'fc-event', 'fc-event-hori' ];\n\t\tif (isEventDraggable(event)) {\n\t\t\tclassNames.push('fc-event-draggable');\n\t\t}\n\t\tif (segment.isStart) {\n\t\t\tclassNames.push('fc-event-start');\n\t\t}\n\t\tif (segment.isEnd) {\n\t\t\tclassNames.push('fc-event-end');\n\t\t}\n\t\t// use the event's configured classNames\n\t\t// guaranteed to be an array via `buildEvent`\n\t\tclassNames = classNames.concat(event.className);\n\t\tif (event.source) {\n\t\t\t// use the event's source's classNames, if specified\n\t\t\tclassNames = classNames.concat(event.source.className || []);\n\t\t}\n\n\t\t// generate a semicolon delimited CSS string for any of the \"skin\" properties\n\t\t// of the event object (`backgroundColor`, `borderColor` and such)\n\t\tvar skinCss = getSkinCss(event, opt);\n\n\t\tif (url) {\n\t\t\thtml += \"<a href='\" + htmlEscape(url) + \"'\";\n\t\t}else{\n\t\t\thtml += \"<div\";\n\t\t}\n\t\thtml +=\n\t\t\t\" class='\" + classNames.join(' ') + \"'\" +\n\t\t\t\" style=\" +\n\t\t\t\t\"'\" +\n\t\t\t\t\"position:absolute;\" +\n\t\t\t\t\"left:\" + segment.left + \"px;\" +\n\t\t\t\tskinCss +\n\t\t\t\t\"'\" +\n\t\t\t\">\" +\n\t\t\t\"<div class='fc-event-inner'>\";\n\t\tif (!event.allDay && segment.isStart) {\n\t\t\thtml +=\n\t\t\t\t\"<span class='fc-event-time'>\" +\n\t\t\t\thtmlEscape(\n\t\t\t\t\tformatDate(event.start, opt('timeFormat'))\n\t\t\t\t) +\n\t\t\t\t\"</span>\";\n\t\t}\n\t\thtml +=\n\t\t\t\"<span class='fc-event-title'>\" +\n\t\t\thtmlEscape(event.title || '') +\n\t\t\t\"</span>\" +\n\t\t\t\"</div>\";\n\t\tif (event.allDay && segment.isEnd && isEventResizable(event)) {\n\t\t\thtml +=\n\t\t\t\t\"<div class='ui-resizable-handle ui-resizable-\" + (isRTL ? 'w' : 'e') + \"'>\" +\n\t\t\t\t\"&nbsp;&nbsp;&nbsp;\" + // makes hit area a lot better for IE6/7\n\t\t\t\t\"</div>\";\n\t\t}\n\t\thtml += \"</\" + (url ? \"a\" : \"div\") + \">\";\n\n\t\t// TODO:\n\t\t// When these elements are initially rendered, they will be briefly visibile on the screen,\n\t\t// even though their widths/heights are not set.\n\t\t// SOLUTION: initially set them as visibility:hidden ?\n\n\t\treturn html;\n\t}", "function buildHTML(segments) {\n\t\tvar html = '';\n\t\tfor (var i=0; i<segments.length; i++) {\n\t\t\thtml += buildHTMLForSegment(segments[i]);\n\t\t}\n\t\treturn html;\n\t}", "function buildHTML(segments) {\n\t\tvar html = '';\n\t\tfor (var i=0; i<segments.length; i++) {\n\t\t\thtml += buildHTMLForSegment(segments[i]);\n\t\t}\n\t\treturn html;\n\t}", "function buildHTML(segments) {\n\t\tvar html = '';\n\t\tfor (var i=0; i<segments.length; i++) {\n\t\t\thtml += buildHTMLForSegment(segments[i]);\n\t\t}\n\t\treturn html;\n\t}", "function buildHTML(segments) {\n\t\tvar html = '';\n\t\tfor (var i=0; i<segments.length; i++) {\n\t\t\thtml += buildHTMLForSegment(segments[i]);\n\t\t}\n\t\treturn html;\n\t}", "function buildHTML(segments) {\n\t\tvar html = '';\n\t\tfor (var i=0; i<segments.length; i++) {\n\t\t\thtml += buildHTMLForSegment(segments[i]);\n\t\t}\n\t\treturn html;\n\t}", "function d(b,c,d){\n// where the DOM nodes will eventually end up\nvar f,g,j=T(),m=c?a(\"<div/>\"):j,n=e(b);\n// calculate the desired `left` and `width` properties on each segment object\n// build the HTML string. relies on `left` property\n// render the HTML. innerHTML is considerably faster than jQuery's .html()\n// retrieve the individual elements\n// if we were appending, and thus using a temporary container,\n// re-attach elements to the real container.\n// assigns each element to `segment.event`, after filtering them through user callbacks\n// Calculate the left and right padding+margin for each element.\n// We need this for setting each element's desired outer width, because of the W3C box model.\n// It's important we do this in a separate pass from acually setting the width on the DOM elements\n// because alternating reading/writing dimensions causes reflow for every iteration.\n// Set the width of each element\n// Grab each element's outerHeight (setVerticals uses this).\n// To get an accurate reading, it's important to have each element's width explicitly set already.\n// Set the top coordinate on each element (requires segment.outerHeight)\nreturn h(n),f=i(n),m[0].innerHTML=f,g=m.children(),c&&j.append(g),k(n,g),xa(n,function(a,b){a.hsides=t(b,!0)}),xa(n,function(a,b){b.width(Math.max(0,a.outerWidth-a.hsides))}),xa(n,function(a,b){a.outerHeight=b.outerHeight(!0)}),l(n,d),n}", "function renderSlotSegs(segs, modifiedEventId) {\n\t\n\t\tvar i, segCnt=segs.length, seg,\n\t\t\tevent,\n\t\t\ttop,\n\t\t\tbottom,\n\t\t\tcolumnLeft,\n\t\t\tcolumnRight,\n\t\t\tcolumnWidth,\n\t\t\twidth,\n\t\t\tleft,\n\t\t\tright,\n\t\t\thtml = '',\n\t\t\teventElements,\n\t\t\teventElement,\n\t\t\ttriggerRes,\n\t\t\ttitleElement,\n\t\t\theight,\n\t\t\tslotSegmentContainer = getSlotSegmentContainer(),\n\t\t\tisRTL = opt('isRTL');\n\t\t\t\n\t\t// calculate position/dimensions, create html\n\t\tfor (i=0; i<segCnt; i++) {\n\t\t\tseg = segs[i];\n\t\t\tevent = seg.event;\n\t\t\ttop = computeDateTop(seg.start, seg.start);\n\t\t\tbottom = computeDateTop(seg.end, seg.start);\n\t\t\tcolumnLeft = colContentLeft(seg.col);\n\t\t\tcolumnRight = colContentRight(seg.col);\n\t\t\tcolumnWidth = columnRight - columnLeft;\n\n\t\t\t// shave off space on right near scrollbars (2.5%)\n\t\t\t// TODO: move this to CSS somehow\n\t\t\tcolumnRight -= columnWidth * .025;\n\t\t\tcolumnWidth = columnRight - columnLeft;\n\n\t\t\twidth = columnWidth * (seg.forwardCoord - seg.backwardCoord);\n\n\t\t\tif (opt('slotEventOverlap')) {\n\t\t\t\t// double the width while making sure resize handle is visible\n\t\t\t\t// (assumed to be 20px wide)\n\t\t\t\twidth = Math.max(\n\t\t\t\t\t(width - (20/2)) * 2,\n\t\t\t\t\twidth // narrow columns will want to make the segment smaller than\n\t\t\t\t\t\t// the natural width. don't allow it\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tif (isRTL) {\n\t\t\t\tright = columnRight - seg.backwardCoord * columnWidth;\n\t\t\t\tleft = right - width;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tleft = columnLeft + seg.backwardCoord * columnWidth;\n\t\t\t\tright = left + width;\n\t\t\t}\n\n\t\t\t// make sure horizontal coordinates are in bounds\n\t\t\tleft = Math.max(left, columnLeft);\n\t\t\tright = Math.min(right, columnRight);\n\t\t\twidth = right - left;\n\n\t\t\tseg.top = top;\n\t\t\tseg.left = left;\n\t\t\tseg.outerWidth = width;\n\t\t\tseg.outerHeight = bottom - top;\n\t\t\thtml += slotSegHtml(event, seg);\n\t\t}\n\n\t\tslotSegmentContainer[0].innerHTML = html; // faster than html()\n\t\teventElements = slotSegmentContainer.children();\n\t\t\n\t\t// retrieve elements, run through eventRender callback, bind event handlers\n\t\tfor (i=0; i<segCnt; i++) {\n\t\t\tseg = segs[i];\n\t\t\tevent = seg.event;\n\t\t\teventElement = $(eventElements[i]); // faster than eq()\n\t\t\ttriggerRes = trigger('eventRender', event, event, eventElement);\n\t\t\tif (triggerRes === false) {\n\t\t\t\teventElement.remove();\n\t\t\t}else{\n\t\t\t\tif (triggerRes && triggerRes !== true) {\n\t\t\t\t\teventElement.remove();\n\t\t\t\t\teventElement = $(triggerRes)\n\t\t\t\t\t\t.css({\n\t\t\t\t\t\t\tposition: 'absolute',\n\t\t\t\t\t\t\ttop: seg.top,\n\t\t\t\t\t\t\tleft: seg.left\n\t\t\t\t\t\t})\n\t\t\t\t\t\t.appendTo(slotSegmentContainer);\n\t\t\t\t}\n\t\t\t\tseg.element = eventElement;\n\t\t\t\tif (event._id === modifiedEventId) {\n\t\t\t\t\tbindSlotSeg(event, eventElement, seg);\n\t\t\t\t}else{\n\t\t\t\t\teventElement[0]._fci = i; // for lazySegBind\n\t\t\t\t}\n\t\t\t\treportEventElement(event, eventElement);\n\t\t\t}\n\t\t}\n\t\t\n\t\tlazySegBind(slotSegmentContainer, segs, bindSlotSeg);\n\t\t\n\t\t// record event sides and title positions\n\t\tfor (i=0; i<segCnt; i++) {\n\t\t\tseg = segs[i];\n\t\t\tif ((eventElement = seg.element)) {\n\t\t\t\tseg.vsides = vsides(eventElement, true);\n\t\t\t\tseg.hsides = hsides(eventElement, true);\n\t\t\t\ttitleElement = eventElement.find('.fc-event-title');\n\t\t\t\tif (titleElement.length) {\n\t\t\t\t\tseg.contentTop = titleElement[0].offsetTop;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t// set all positions/dimensions at once\n\t\tfor (i=0; i<segCnt; i++) {\n\t\t\tseg = segs[i];\n\t\t\tif ((eventElement = seg.element)) {\n\t\t\t\teventElement[0].style.width = Math.max(0, seg.outerWidth - seg.hsides) + 'px';\n\t\t\t\theight = Math.max(0, seg.outerHeight - seg.vsides);\n\t\t\t\teventElement[0].style.height = height + 'px';\n\t\t\t\tevent = seg.event;\n\t\t\t\tif (seg.contentTop !== undefined && height - seg.contentTop < 10) {\n\t\t\t\t\t// not enough room for title, put it in the time (TODO: maybe make both display:inline instead)\n\t\t\t\t\teventElement.find('div.fc-event-time')\n\t\t\t\t\t\t.text(\n\t\t\t\t\t\t\tformatDate(event.start, opt('timeFormat')) + ' - ' + event.title\n\t\t\t\t\t\t);\n\t\t\t\t\teventElement.find('div.fc-event-title')\n\t\t\t\t\t\t.remove();\n\t\t\t\t}\n\t\t\t\ttrigger('eventAfterRender', event, event, eventElement);\n\t\t\t}\n\t\t}\n\t\t\t\t\t\n\t}", "function renderSlotSegs(segs, modifiedEventId) {\n\t\n\t\tvar i, segCnt=segs.length, seg,\n\t\t\tevent,\n\t\t\ttop,\n\t\t\tbottom,\n\t\t\tcolumnLeft,\n\t\t\tcolumnRight,\n\t\t\tcolumnWidth,\n\t\t\twidth,\n\t\t\tleft,\n\t\t\tright,\n\t\t\thtml = '',\n\t\t\teventElements,\n\t\t\teventElement,\n\t\t\ttriggerRes,\n\t\t\ttitleElement,\n\t\t\theight,\n\t\t\tslotSegmentContainer = getSlotSegmentContainer(),\n\t\t\tisRTL = opt('isRTL');\n\t\t\t\n\t\t// calculate position/dimensions, create html\n\t\tfor (i=0; i<segCnt; i++) {\n\t\t\tseg = segs[i];\n\t\t\tevent = seg.event;\n\t\t\ttop = computeDateTop(seg.start, seg.start);\n\t\t\tbottom = computeDateTop(seg.end, seg.start);\n\t\t\tcolumnLeft = colContentLeft(seg.col);\n\t\t\tcolumnRight = colContentRight(seg.col);\n\t\t\tcolumnWidth = columnRight - columnLeft;\n\n\t\t\t// shave off space on right near scrollbars (2.5%)\n\t\t\t// TODO: move this to CSS somehow\n\t\t\tcolumnRight -= columnWidth * .025;\n\t\t\tcolumnWidth = columnRight - columnLeft;\n\n\t\t\twidth = columnWidth * (seg.forwardCoord - seg.backwardCoord);\n\n\t\t\tif (opt('slotEventOverlap')) {\n\t\t\t\t// double the width while making sure resize handle is visible\n\t\t\t\t// (assumed to be 20px wide)\n\t\t\t\twidth = Math.max(\n\t\t\t\t\t(width - (20/2)) * 2,\n\t\t\t\t\twidth // narrow columns will want to make the segment smaller than\n\t\t\t\t\t\t// the natural width. don't allow it\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tif (isRTL) {\n\t\t\t\tright = columnRight - seg.backwardCoord * columnWidth;\n\t\t\t\tleft = right - width;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tleft = columnLeft + seg.backwardCoord * columnWidth;\n\t\t\t\tright = left + width;\n\t\t\t}\n\n\t\t\t// make sure horizontal coordinates are in bounds\n\t\t\tleft = Math.max(left, columnLeft);\n\t\t\tright = Math.min(right, columnRight);\n\t\t\twidth = right - left;\n\n\t\t\tseg.top = top;\n\t\t\tseg.left = left;\n\t\t\tseg.outerWidth = width;\n\t\t\tseg.outerHeight = bottom - top;\n\t\t\thtml += slotSegHtml(event, seg);\n\t\t}\n\n\t\tslotSegmentContainer[0].innerHTML = html; // faster than html()\n\t\teventElements = slotSegmentContainer.children();\n\t\t\n\t\t// retrieve elements, run through eventRender callback, bind event handlers\n\t\tfor (i=0; i<segCnt; i++) {\n\t\t\tseg = segs[i];\n\t\t\tevent = seg.event;\n\t\t\teventElement = $(eventElements[i]); // faster than eq()\n\t\t\ttriggerRes = trigger('eventRender', event, event, eventElement);\n\t\t\tif (triggerRes === false) {\n\t\t\t\teventElement.remove();\n\t\t\t}else{\n\t\t\t\tif (triggerRes && triggerRes !== true) {\n\t\t\t\t\teventElement.remove();\n\t\t\t\t\teventElement = $(triggerRes)\n\t\t\t\t\t\t.css({\n\t\t\t\t\t\t\tposition: 'absolute',\n\t\t\t\t\t\t\ttop: seg.top,\n\t\t\t\t\t\t\tleft: seg.left\n\t\t\t\t\t\t})\n\t\t\t\t\t\t.appendTo(slotSegmentContainer);\n\t\t\t\t}\n\t\t\t\tseg.element = eventElement;\n\t\t\t\tif (event._id === modifiedEventId) {\n\t\t\t\t\tbindSlotSeg(event, eventElement, seg);\n\t\t\t\t}else{\n\t\t\t\t\teventElement[0]._fci = i; // for lazySegBind\n\t\t\t\t}\n\t\t\t\treportEventElement(event, eventElement);\n\t\t\t}\n\t\t}\n\t\t\n\t\tlazySegBind(slotSegmentContainer, segs, bindSlotSeg);\n\t\t\n\t\t// record event sides and title positions\n\t\tfor (i=0; i<segCnt; i++) {\n\t\t\tseg = segs[i];\n\t\t\tif ((eventElement = seg.element)) {\n\t\t\t\tseg.vsides = vsides(eventElement, true);\n\t\t\t\tseg.hsides = hsides(eventElement, true);\n\t\t\t\ttitleElement = eventElement.find('.fc-event-title');\n\t\t\t\tif (titleElement.length) {\n\t\t\t\t\tseg.contentTop = titleElement[0].offsetTop;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t// set all positions/dimensions at once\n\t\tfor (i=0; i<segCnt; i++) {\n\t\t\tseg = segs[i];\n\t\t\tif ((eventElement = seg.element)) {\n\t\t\t\teventElement[0].style.width = Math.max(0, seg.outerWidth - seg.hsides) + 'px';\n\t\t\t\theight = Math.max(0, seg.outerHeight - seg.vsides);\n\t\t\t\teventElement[0].style.height = height + 'px';\n\t\t\t\tevent = seg.event;\n\t\t\t\tif (seg.contentTop !== undefined && height - seg.contentTop < 10) {\n\t\t\t\t\t// not enough room for title, put it in the time (TODO: maybe make both display:inline instead)\n\t\t\t\t\teventElement.find('div.fc-event-time')\n\t\t\t\t\t\t.text(\n\t\t\t\t\t\t\tformatDate(event.start, opt('timeFormat')) + ' - ' + event.title\n\t\t\t\t\t\t);\n\t\t\t\t\teventElement.find('div.fc-event-title')\n\t\t\t\t\t\t.remove();\n\t\t\t\t}\n\t\t\t\ttrigger('eventAfterRender', event, event, eventElement);\n\t\t\t}\n\t\t}\n\t\t\t\t\t\n\t}", "function renderSlotSegs(segs, modifiedEventId) {\n\t\n\t\tvar i, segCnt=segs.length, seg,\n\t\t\tevent,\n\t\t\ttop,\n\t\t\tbottom,\n\t\t\tcolumnLeft,\n\t\t\tcolumnRight,\n\t\t\tcolumnWidth,\n\t\t\twidth,\n\t\t\tleft,\n\t\t\tright,\n\t\t\thtml = '',\n\t\t\teventElements,\n\t\t\teventElement,\n\t\t\ttriggerRes,\n\t\t\ttitleElement,\n\t\t\theight,\n\t\t\tslotSegmentContainer = getSlotSegmentContainer(),\n\t\t\tisRTL = opt('isRTL');\n\t\t\t\n\t\t// calculate position/dimensions, create html\n\t\tfor (i=0; i<segCnt; i++) {\n\t\t\tseg = segs[i];\n\t\t\tevent = seg.event;\n\t\t\ttop = computeDateTop(seg.start, seg.start);\n\t\t\tbottom = computeDateTop(seg.end, seg.start);\n\t\t\tcolumnLeft = colContentLeft(seg.col);\n\t\t\tcolumnRight = colContentRight(seg.col);\n\t\t\tcolumnWidth = columnRight - columnLeft;\n\n\t\t\t// shave off space on right near scrollbars (2.5%)\n\t\t\t// TODO: move this to CSS somehow\n\t\t\tcolumnRight -= columnWidth * .025;\n\t\t\tcolumnWidth = columnRight - columnLeft;\n\n\t\t\twidth = columnWidth * (seg.forwardCoord - seg.backwardCoord);\n\n\t\t\tif (opt('slotEventOverlap')) {\n\t\t\t\t// double the width while making sure resize handle is visible\n\t\t\t\t// (assumed to be 20px wide)\n\t\t\t\twidth = Math.max(\n\t\t\t\t\t(width - (20/2)) * 2,\n\t\t\t\t\twidth // narrow columns will want to make the segment smaller than\n\t\t\t\t\t\t// the natural width. don't allow it\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tif (isRTL) {\n\t\t\t\tright = columnRight - seg.backwardCoord * columnWidth;\n\t\t\t\tleft = right - width;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tleft = columnLeft + seg.backwardCoord * columnWidth;\n\t\t\t\tright = left + width;\n\t\t\t}\n\n\t\t\t// make sure horizontal coordinates are in bounds\n\t\t\tleft = Math.max(left, columnLeft);\n\t\t\tright = Math.min(right, columnRight);\n\t\t\twidth = right - left;\n\n\t\t\tseg.top = top;\n\t\t\tseg.left = left;\n\t\t\tseg.outerWidth = width;\n\t\t\tseg.outerHeight = bottom - top;\n\t\t\thtml += slotSegHtml(event, seg);\n\t\t}\n\n\t\tslotSegmentContainer[0].innerHTML = html; // faster than html()\n\t\teventElements = slotSegmentContainer.children();\n\t\t\n\t\t// retrieve elements, run through eventRender callback, bind event handlers\n\t\tfor (i=0; i<segCnt; i++) {\n\t\t\tseg = segs[i];\n\t\t\tevent = seg.event;\n\t\t\teventElement = $(eventElements[i]); // faster than eq()\n\t\t\ttriggerRes = trigger('eventRender', event, event, eventElement);\n\t\t\tif (triggerRes === false) {\n\t\t\t\teventElement.remove();\n\t\t\t}else{\n\t\t\t\tif (triggerRes && triggerRes !== true) {\n\t\t\t\t\teventElement.remove();\n\t\t\t\t\teventElement = $(triggerRes)\n\t\t\t\t\t\t.css({\n\t\t\t\t\t\t\tposition: 'absolute',\n\t\t\t\t\t\t\ttop: seg.top,\n\t\t\t\t\t\t\tleft: seg.left\n\t\t\t\t\t\t})\n\t\t\t\t\t\t.appendTo(slotSegmentContainer);\n\t\t\t\t}\n\t\t\t\tseg.element = eventElement;\n\t\t\t\tif (event._id === modifiedEventId) {\n\t\t\t\t\tbindSlotSeg(event, eventElement, seg);\n\t\t\t\t}else{\n\t\t\t\t\teventElement[0]._fci = i; // for lazySegBind\n\t\t\t\t}\n\t\t\t\treportEventElement(event, eventElement);\n\t\t\t}\n\t\t}\n\t\t\n\t\tlazySegBind(slotSegmentContainer, segs, bindSlotSeg);\n\t\t\n\t\t// record event sides and title positions\n\t\tfor (i=0; i<segCnt; i++) {\n\t\t\tseg = segs[i];\n\t\t\tif ((eventElement = seg.element)) {\n\t\t\t\tseg.vsides = vsides(eventElement, true);\n\t\t\t\tseg.hsides = hsides(eventElement, true);\n\t\t\t\ttitleElement = eventElement.find('.fc-event-title');\n\t\t\t\tif (titleElement.length) {\n\t\t\t\t\tseg.contentTop = titleElement[0].offsetTop;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t// set all positions/dimensions at once\n\t\tfor (i=0; i<segCnt; i++) {\n\t\t\tseg = segs[i];\n\t\t\tif ((eventElement = seg.element)) {\n\t\t\t\teventElement[0].style.width = Math.max(0, seg.outerWidth - seg.hsides) + 'px';\n\t\t\t\theight = Math.max(0, seg.outerHeight - seg.vsides);\n\t\t\t\teventElement[0].style.height = height + 'px';\n\t\t\t\tevent = seg.event;\n\t\t\t\tif (seg.contentTop !== undefined && height - seg.contentTop < 10) {\n\t\t\t\t\t// not enough room for title, put it in the time (TODO: maybe make both display:inline instead)\n\t\t\t\t\teventElement.find('div.fc-event-time')\n\t\t\t\t\t\t.text(\n\t\t\t\t\t\t\tformatDate(event.start, opt('timeFormat')) + ' - ' + event.title\n\t\t\t\t\t\t);\n\t\t\t\t\teventElement.find('div.fc-event-title')\n\t\t\t\t\t\t.remove();\n\t\t\t\t}\n\t\t\t\ttrigger('eventAfterRender', event, event, eventElement);\n\t\t\t}\n\t\t}\n\t\t\t\t\t\n\t}", "function renderSlotSegs(segs, modifiedEventId) {\n\t\n\t\tvar i, segCnt=segs.length, seg,\n\t\t\tevent,\n\t\t\ttop,\n\t\t\tbottom,\n\t\t\tcolumnLeft,\n\t\t\tcolumnRight,\n\t\t\tcolumnWidth,\n\t\t\twidth,\n\t\t\tleft,\n\t\t\tright,\n\t\t\thtml = '',\n\t\t\teventElements,\n\t\t\teventElement,\n\t\t\ttriggerRes,\n\t\t\ttitleElement,\n\t\t\theight,\n\t\t\tslotSegmentContainer = getSlotSegmentContainer(),\n\t\t\tisRTL = opt('isRTL');\n\t\t\t\n\t\t// calculate position/dimensions, create html\n\t\tfor (i=0; i<segCnt; i++) {\n\t\t\tseg = segs[i];\n\t\t\tevent = seg.event;\n\t\t\ttop = timePosition(seg.start, seg.start);\n\t\t\tbottom = timePosition(seg.start, seg.end);\n\t\t\tcolumnLeft = colContentLeft(seg.col);\n\t\t\tcolumnRight = colContentRight(seg.col);\n\t\t\tcolumnWidth = columnRight - columnLeft;\n\n\t\t\t// shave off space on right near scrollbars (2.5%)\n\t\t\t// TODO: move this to CSS somehow\n\t\t\tcolumnRight -= columnWidth * .025;\n\t\t\tcolumnWidth = columnRight - columnLeft;\n\n\t\t\twidth = columnWidth * (seg.forwardCoord - seg.backwardCoord);\n\n\t\t\tif (opt('slotEventOverlap')) {\n\t\t\t\t// double the width while making sure resize handle is visible\n\t\t\t\t// (assumed to be 20px wide)\n\t\t\t\twidth = Math.max(\n\t\t\t\t\t(width - (20/2)) * 2,\n\t\t\t\t\twidth // narrow columns will want to make the segment smaller than\n\t\t\t\t\t\t// the natural width. don't allow it\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tif (isRTL) {\n\t\t\t\tright = columnRight - seg.backwardCoord * columnWidth;\n\t\t\t\tleft = right - width;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tleft = columnLeft + seg.backwardCoord * columnWidth;\n\t\t\t\tright = left + width;\n\t\t\t}\n\n\t\t\t// make sure horizontal coordinates are in bounds\n\t\t\tleft = Math.max(left, columnLeft);\n\t\t\tright = Math.min(right, columnRight);\n\t\t\twidth = right - left;\n\n\t\t\tseg.top = top;\n\t\t\tseg.left = left;\n\t\t\tseg.outerWidth = width;\n\t\t\tseg.outerHeight = bottom - top;\n\t\t\thtml += slotSegHtml(event, seg);\n\t\t}\n\n\t\tslotSegmentContainer[0].innerHTML = html; // faster than html()\n\t\teventElements = slotSegmentContainer.children();\n\t\t\n\t\t// retrieve elements, run through eventRender callback, bind event handlers\n\t\tfor (i=0; i<segCnt; i++) {\n\t\t\tseg = segs[i];\n\t\t\tevent = seg.event;\n\t\t\teventElement = $(eventElements[i]); // faster than eq()\n\t\t\ttriggerRes = trigger('eventRender', event, event, eventElement);\n\t\t\tif (triggerRes === false) {\n\t\t\t\teventElement.remove();\n\t\t\t}else{\n\t\t\t\tif (triggerRes && triggerRes !== true) {\n\t\t\t\t\teventElement.remove();\n\t\t\t\t\teventElement = $(triggerRes)\n\t\t\t\t\t\t.css({\n\t\t\t\t\t\t\tposition: 'absolute',\n\t\t\t\t\t\t\ttop: seg.top,\n\t\t\t\t\t\t\tleft: seg.left\n\t\t\t\t\t\t})\n\t\t\t\t\t\t.appendTo(slotSegmentContainer);\n\t\t\t\t}\n\t\t\t\tseg.element = eventElement;\n\t\t\t\tif (event._id === modifiedEventId) {\n\t\t\t\t\tbindSlotSeg(event, eventElement, seg);\n\t\t\t\t}else{\n\t\t\t\t\teventElement[0]._fci = i; // for lazySegBind\n\t\t\t\t}\n\t\t\t\treportEventElement(event, eventElement);\n\t\t\t}\n\t\t}\n\t\t\n\t\tlazySegBind(slotSegmentContainer, segs, bindSlotSeg);\n\t\t\n\t\t// record event sides and title positions\n\t\tfor (i=0; i<segCnt; i++) {\n\t\t\tseg = segs[i];\n\t\t\tif (eventElement = seg.element) {\n\t\t\t\tseg.vsides = vsides(eventElement, true);\n\t\t\t\tseg.hsides = hsides(eventElement, true);\n\t\t\t\ttitleElement = eventElement.find('.fc-event-title');\n\t\t\t\tif (titleElement.length) {\n\t\t\t\t\tseg.contentTop = titleElement[0].offsetTop;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t// set all positions/dimensions at once\n\t\tfor (i=0; i<segCnt; i++) {\n\t\t\tseg = segs[i];\n\t\t\tif (eventElement = seg.element) {\n\t\t\t\teventElement[0].style.width = Math.max(0, seg.outerWidth - seg.hsides) + 'px';\n\t\t\t\theight = Math.max(0, seg.outerHeight - seg.vsides);\n\t\t\t\teventElement[0].style.height = height + 'px';\n\t\t\t\tevent = seg.event;\n\t\t\t\tif (seg.contentTop !== undefined && height - seg.contentTop < 10) {\n\t\t\t\t\t// not enough room for title, put it in the time (TODO: maybe make both display:inline instead)\n\t\t\t\t\teventElement.find('div.fc-event-time')\n\t\t\t\t\t\t.text(formatDate(event.start, opt('timeFormat')) + ' - ' + event.title);\n\t\t\t\t\teventElement.find('div.fc-event-title')\n\t\t\t\t\t\t.remove();\n\t\t\t\t}\n\t\t\t\ttrigger('eventAfterRender', event, event, eventElement);\n\t\t\t}\n\t\t}\n\t\t\t\t\t\n\t}", "function renderSlotSegs(segs, modifiedEventId) {\n\t\n\t\tvar i, segCnt=segs.length, seg,\n\t\t\tevent,\n\t\t\ttop,\n\t\t\tbottom,\n\t\t\tcolumnLeft,\n\t\t\tcolumnRight,\n\t\t\tcolumnWidth,\n\t\t\twidth,\n\t\t\tleft,\n\t\t\tright,\n\t\t\thtml = '',\n\t\t\teventElements,\n\t\t\teventElement,\n\t\t\ttriggerRes,\n\t\t\ttitleElement,\n\t\t\theight,\n\t\t\tslotSegmentContainer = getSlotSegmentContainer(),\n\t\t\tisRTL = opt('isRTL');\n\t\t\t\n\t\t// calculate position/dimensions, create html\n\t\tfor (i=0; i<segCnt; i++) {\n\t\t\tseg = segs[i];\n\t\t\tevent = seg.event;\n\t\t\ttop = timePosition(seg.start, seg.start);\n\t\t\tbottom = timePosition(seg.start, seg.end);\n\t\t\tcolumnLeft = colContentLeft(seg.col);\n\t\t\tcolumnRight = colContentRight(seg.col);\n\t\t\tcolumnWidth = columnRight - columnLeft;\n\n\t\t\t// shave off space on right near scrollbars (2.5%)\n\t\t\t// TODO: move this to CSS somehow\n\t\t\tcolumnRight -= columnWidth * .025;\n\t\t\tcolumnWidth = columnRight - columnLeft;\n\n\t\t\twidth = columnWidth * (seg.forwardCoord - seg.backwardCoord);\n\n\t\t\tif (opt('slotEventOverlap')) {\n\t\t\t\t// double the width while making sure resize handle is visible\n\t\t\t\t// (assumed to be 20px wide)\n\t\t\t\twidth = Math.max(\n\t\t\t\t\t(width - (20/2)) * 2,\n\t\t\t\t\twidth // narrow columns will want to make the segment smaller than\n\t\t\t\t\t\t// the natural width. don't allow it\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tif (isRTL) {\n\t\t\t\tright = columnRight - seg.backwardCoord * columnWidth;\n\t\t\t\tleft = right - width;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tleft = columnLeft + seg.backwardCoord * columnWidth;\n\t\t\t\tright = left + width;\n\t\t\t}\n\n\t\t\t// make sure horizontal coordinates are in bounds\n\t\t\tleft = Math.max(left, columnLeft);\n\t\t\tright = Math.min(right, columnRight);\n\t\t\twidth = right - left;\n\n\t\t\tseg.top = top;\n\t\t\tseg.left = left;\n\t\t\tseg.outerWidth = width;\n\t\t\tseg.outerHeight = bottom - top;\n\t\t\thtml += slotSegHtml(event, seg);\n\t\t}\n\n\t\tslotSegmentContainer[0].innerHTML = html; // faster than html()\n\t\teventElements = slotSegmentContainer.children();\n\t\t\n\t\t// retrieve elements, run through eventRender callback, bind event handlers\n\t\tfor (i=0; i<segCnt; i++) {\n\t\t\tseg = segs[i];\n\t\t\tevent = seg.event;\n\t\t\teventElement = $(eventElements[i]); // faster than eq()\n\t\t\ttriggerRes = trigger('eventRender', event, event, eventElement);\n\t\t\tif (triggerRes === false) {\n\t\t\t\teventElement.remove();\n\t\t\t}else{\n\t\t\t\tif (triggerRes && triggerRes !== true) {\n\t\t\t\t\teventElement.remove();\n\t\t\t\t\teventElement = $(triggerRes)\n\t\t\t\t\t\t.css({\n\t\t\t\t\t\t\tposition: 'absolute',\n\t\t\t\t\t\t\ttop: seg.top,\n\t\t\t\t\t\t\tleft: seg.left\n\t\t\t\t\t\t})\n\t\t\t\t\t\t.appendTo(slotSegmentContainer);\n\t\t\t\t}\n\t\t\t\tseg.element = eventElement;\n\t\t\t\tif (event._id === modifiedEventId) {\n\t\t\t\t\tbindSlotSeg(event, eventElement, seg);\n\t\t\t\t}else{\n\t\t\t\t\teventElement[0]._fci = i; // for lazySegBind\n\t\t\t\t}\n\t\t\t\treportEventElement(event, eventElement);\n\t\t\t}\n\t\t}\n\t\t\n\t\tlazySegBind(slotSegmentContainer, segs, bindSlotSeg);\n\t\t\n\t\t// record event sides and title positions\n\t\tfor (i=0; i<segCnt; i++) {\n\t\t\tseg = segs[i];\n\t\t\tif (eventElement = seg.element) {\n\t\t\t\tseg.vsides = vsides(eventElement, true);\n\t\t\t\tseg.hsides = hsides(eventElement, true);\n\t\t\t\ttitleElement = eventElement.find('.fc-event-title');\n\t\t\t\tif (titleElement.length) {\n\t\t\t\t\tseg.contentTop = titleElement[0].offsetTop;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t// set all positions/dimensions at once\n\t\tfor (i=0; i<segCnt; i++) {\n\t\t\tseg = segs[i];\n\t\t\tif (eventElement = seg.element) {\n\t\t\t\teventElement[0].style.width = Math.max(0, seg.outerWidth - seg.hsides) + 'px';\n\t\t\t\theight = Math.max(0, seg.outerHeight - seg.vsides);\n\t\t\t\teventElement[0].style.height = height + 'px';\n\t\t\t\tevent = seg.event;\n\t\t\t\tif (seg.contentTop !== undefined && height - seg.contentTop < 10) {\n\t\t\t\t\t// not enough room for title, put it in the time (TODO: maybe make both display:inline instead)\n\t\t\t\t\teventElement.find('div.fc-event-time')\n\t\t\t\t\t\t.text(formatDate(event.start, opt('timeFormat')) + ' - ' + event.title);\n\t\t\t\t\teventElement.find('div.fc-event-title')\n\t\t\t\t\t\t.remove();\n\t\t\t\t}\n\t\t\t\ttrigger('eventAfterRender', event, event, eventElement);\n\t\t\t}\n\t\t}\n\t\t\t\t\t\n\t}", "function renderSlotSegs(segs, modifiedEventId) {\n\t\n\t\tvar i, segCnt=segs.length, seg,\n\t\t\tevent,\n\t\t\ttop,\n\t\t\tbottom,\n\t\t\tcolumnLeft,\n\t\t\tcolumnRight,\n\t\t\tcolumnWidth,\n\t\t\twidth,\n\t\t\tleft,\n\t\t\tright,\n\t\t\thtml = '',\n\t\t\teventElements,\n\t\t\teventElement,\n\t\t\ttriggerRes,\n\t\t\ttitleElement,\n\t\t\theight,\n\t\t\tslotSegmentContainer = getSlotSegmentContainer(),\n\t\t\tisRTL = opt('isRTL');\n\t\t\t\n\t\t// calculate position/dimensions, create html\n\t\tfor (i=0; i<segCnt; i++) {\n\t\t\tseg = segs[i];\n\t\t\tevent = seg.event;\n\t\t\ttop = timePosition(seg.start, seg.start);\n\t\t\tbottom = timePosition(seg.start, seg.end);\n\t\t\tcolumnLeft = colContentLeft(seg.col);\n\t\t\tcolumnRight = colContentRight(seg.col);\n\t\t\tcolumnWidth = columnRight - columnLeft;\n\n\t\t\t// shave off space on right near scrollbars (2.5%)\n\t\t\t// TODO: move this to CSS somehow\n\t\t\tcolumnRight -= columnWidth * .025;\n\t\t\tcolumnWidth = columnRight - columnLeft;\n\n\t\t\twidth = columnWidth * (seg.forwardCoord - seg.backwardCoord);\n\n\t\t\tif (opt('slotEventOverlap')) {\n\t\t\t\t// double the width while making sure resize handle is visible\n\t\t\t\t// (assumed to be 20px wide)\n\t\t\t\twidth = Math.max(\n\t\t\t\t\t(width - (20/2)) * 2,\n\t\t\t\t\twidth // narrow columns will want to make the segment smaller than\n\t\t\t\t\t\t// the natural width. don't allow it\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tif (isRTL) {\n\t\t\t\tright = columnRight - seg.backwardCoord * columnWidth;\n\t\t\t\tleft = right - width;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tleft = columnLeft + seg.backwardCoord * columnWidth;\n\t\t\t\tright = left + width;\n\t\t\t}\n\n\t\t\t// make sure horizontal coordinates are in bounds\n\t\t\tleft = Math.max(left, columnLeft);\n\t\t\tright = Math.min(right, columnRight);\n\t\t\twidth = right - left;\n\n\t\t\tseg.top = top;\n\t\t\tseg.left = left;\n\t\t\tseg.outerWidth = width;\n\t\t\tseg.outerHeight = bottom - top;\n\t\t\thtml += slotSegHtml(event, seg);\n\t\t}\n\n\t\tslotSegmentContainer[0].innerHTML = html; // faster than html()\n\t\teventElements = slotSegmentContainer.children();\n\t\t\n\t\t// retrieve elements, run through eventRender callback, bind event handlers\n\t\tfor (i=0; i<segCnt; i++) {\n\t\t\tseg = segs[i];\n\t\t\tevent = seg.event;\n\t\t\teventElement = $(eventElements[i]); // faster than eq()\n\t\t\ttriggerRes = trigger('eventRender', event, event, eventElement);\n\t\t\tif (triggerRes === false) {\n\t\t\t\teventElement.remove();\n\t\t\t}else{\n\t\t\t\tif (triggerRes && triggerRes !== true) {\n\t\t\t\t\teventElement.remove();\n\t\t\t\t\teventElement = $(triggerRes)\n\t\t\t\t\t\t.css({\n\t\t\t\t\t\t\tposition: 'absolute',\n\t\t\t\t\t\t\ttop: seg.top,\n\t\t\t\t\t\t\tleft: seg.left\n\t\t\t\t\t\t})\n\t\t\t\t\t\t.appendTo(slotSegmentContainer);\n\t\t\t\t}\n\t\t\t\tseg.element = eventElement;\n\t\t\t\tif (event._id === modifiedEventId) {\n\t\t\t\t\tbindSlotSeg(event, eventElement, seg);\n\t\t\t\t}else{\n\t\t\t\t\teventElement[0]._fci = i; // for lazySegBind\n\t\t\t\t}\n\t\t\t\treportEventElement(event, eventElement);\n\t\t\t}\n\t\t}\n\t\t\n\t\tlazySegBind(slotSegmentContainer, segs, bindSlotSeg);\n\t\t\n\t\t// record event sides and title positions\n\t\tfor (i=0; i<segCnt; i++) {\n\t\t\tseg = segs[i];\n\t\t\tif (eventElement = seg.element) {\n\t\t\t\tseg.vsides = vsides(eventElement, true);\n\t\t\t\tseg.hsides = hsides(eventElement, true);\n\t\t\t\ttitleElement = eventElement.find('.fc-event-title');\n\t\t\t\tif (titleElement.length) {\n\t\t\t\t\tseg.contentTop = titleElement[0].offsetTop;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t// set all positions/dimensions at once\n\t\tfor (i=0; i<segCnt; i++) {\n\t\t\tseg = segs[i];\n\t\t\tif (eventElement = seg.element) {\n\t\t\t\teventElement[0].style.width = Math.max(0, seg.outerWidth - seg.hsides) + 'px';\n\t\t\t\theight = Math.max(0, seg.outerHeight - seg.vsides);\n\t\t\t\teventElement[0].style.height = height + 'px';\n\t\t\t\tevent = seg.event;\n\t\t\t\tif (seg.contentTop !== undefined && height - seg.contentTop < 10) {\n\t\t\t\t\t// not enough room for title, put it in the time (TODO: maybe make both display:inline instead)\n\t\t\t\t\teventElement.find('div.fc-event-time')\n\t\t\t\t\t\t.text(formatDate(event.start, opt('timeFormat')) + ' - ' + event.title);\n\t\t\t\t\teventElement.find('div.fc-event-title')\n\t\t\t\t\t\t.remove();\n\t\t\t\t}\n\t\t\t\ttrigger('eventAfterRender', event, event, eventElement);\n\t\t\t}\n\t\t}\n\t\t\t\t\t\n\t}", "function Segment(props) {\n var attached = props.attached,\n basic = props.basic,\n children = props.children,\n circular = props.circular,\n className = props.className,\n clearing = props.clearing,\n color = props.color,\n compact = props.compact,\n content = props.content,\n disabled = props.disabled,\n floated = props.floated,\n inverted = props.inverted,\n loading = props.loading,\n placeholder = props.placeholder,\n padded = props.padded,\n piled = props.piled,\n raised = props.raised,\n secondary = props.secondary,\n size = props.size,\n stacked = props.stacked,\n tertiary = props.tertiary,\n textAlign = props.textAlign,\n vertical = props.vertical;\n var classes = classnames_default()('ui', color, size, useKeyOnly(basic, 'basic'), useKeyOnly(circular, 'circular'), useKeyOnly(clearing, 'clearing'), useKeyOnly(compact, 'compact'), useKeyOnly(disabled, 'disabled'), useKeyOnly(inverted, 'inverted'), useKeyOnly(loading, 'loading'), useKeyOnly(placeholder, 'placeholder'), useKeyOnly(piled, 'piled'), useKeyOnly(raised, 'raised'), useKeyOnly(secondary, 'secondary'), useKeyOnly(stacked, 'stacked'), useKeyOnly(tertiary, 'tertiary'), useKeyOnly(vertical, 'vertical'), useKeyOrValueAndKey(attached, 'attached'), useKeyOrValueAndKey(padded, 'padded'), useTextAlignProp(textAlign), useValueAndKey(floated, 'floated'), 'segment', className);\n var rest = lib_getUnhandledProps(Segment, props);\n var ElementType = lib_getElementType(Segment, props);\n return react_default.a.createElement(ElementType, extends_default()({}, rest, {\n className: classes\n }), childrenUtils_namespaceObject.isNil(children) ? content : children);\n}", "function SegmentInline(props) {\n var children = props.children,\n className = props.className,\n content = props.content;\n var classes = classnames_default()('inline', className);\n var rest = lib_getUnhandledProps(SegmentInline, props);\n var ElementType = lib_getElementType(SegmentInline, props);\n return react_default.a.createElement(ElementType, extends_default()({}, rest, {\n className: classes\n }), childrenUtils_namespaceObject.isNil(children) ? content : children);\n}", "function SegmentInline(props) {\n var children = props.children,\n className = props.className,\n content = props.content;\n var classes = classnames__WEBPACK_IMPORTED_MODULE_1___default()('inline', className);\n var rest = Object(_lib__WEBPACK_IMPORTED_MODULE_4__[\"getUnhandledProps\"])(SegmentInline, props);\n var ElementType = Object(_lib__WEBPACK_IMPORTED_MODULE_4__[\"getElementType\"])(SegmentInline, props);\n return react__WEBPACK_IMPORTED_MODULE_3___default.a.createElement(ElementType, _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0___default()({}, rest, {\n className: classes\n }), _lib__WEBPACK_IMPORTED_MODULE_4__[\"childrenUtils\"].isNil(children) ? content : children);\n}", "function SegmentInline(props) {\n var children = props.children,\n className = props.className,\n content = props.content;\n var classes = classnames__WEBPACK_IMPORTED_MODULE_1___default()('inline', className);\n var rest = Object(_lib__WEBPACK_IMPORTED_MODULE_4__[\"getUnhandledProps\"])(SegmentInline, props);\n var ElementType = Object(_lib__WEBPACK_IMPORTED_MODULE_4__[\"getElementType\"])(SegmentInline, props);\n return react__WEBPACK_IMPORTED_MODULE_3___default.a.createElement(ElementType, _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0___default()({}, rest, {\n className: classes\n }), _lib__WEBPACK_IMPORTED_MODULE_4__[\"childrenUtils\"].isNil(children) ? content : children);\n}", "createEntitySegment(entity, finalSegment) {\n var color =\n entity.label != null ? utils.stringToColor(entity.label) : \"lightgray\";\n var marginRight = finalSegment ? \"0px\" : \"10px\";\n return (\n <span\n id={`entity-${entity.start}`}\n className=\"textSegment\"\n style={{ borderBottomColor: color, marginRight: marginRight }}\n onFocus={this.removeHighlights}\n >\n {entity.text}\n </span>\n );\n }", "function SegmentInline(props) {\n var children = props.children,\n className = props.className,\n content = props.content;\n var classes = (0, _classnames[\"default\"])('inline', className);\n var rest = (0, _lib.getUnhandledProps)(SegmentInline, props);\n var ElementType = (0, _lib.getElementType)(SegmentInline, props);\n return _react[\"default\"].createElement(ElementType, (0, _extends2[\"default\"])({}, rest, {\n className: classes\n }), _lib.childrenUtils.isNil(children) ? content : children);\n}", "function SegmentInline(props) {\n var children = props.children,\n className = props.className,\n content = props.content;\n var classes = Object(clsx__WEBPACK_IMPORTED_MODULE_1__[\"default\"])('inline', className);\n var rest = Object(_lib__WEBPACK_IMPORTED_MODULE_4__[\"getUnhandledProps\"])(SegmentInline, props);\n var ElementType = Object(_lib__WEBPACK_IMPORTED_MODULE_4__[\"getElementType\"])(SegmentInline, props);\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3___default.a.createElement(ElementType, Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({}, rest, {\n className: classes\n }), _lib__WEBPACK_IMPORTED_MODULE_4__[\"childrenUtils\"].isNil(children) ? content : children);\n}", "function calculateHorizontals(segments) {\n\t\tvar isRTL = opt('isRTL');\n\t\tfor (var i=0; i<segments.length; i++) {\n\t\t\tvar segment = segments[i];\n\n\t\t\t// Determine functions used for calulating the elements left/right coordinates,\n\t\t\t// depending on whether the view is RTL or not.\n\t\t\t// NOTE:\n\t\t\t// colLeft/colRight returns the coordinate butting up the edge of the cell.\n\t\t\t// colContentLeft/colContentRight is indented a little bit from the edge.\n\t\t\tvar leftFunc = (isRTL ? segment.isEnd : segment.isStart) ? colContentLeft : colLeft;\n\t\t\tvar rightFunc = (isRTL ? segment.isStart : segment.isEnd) ? colContentRight : colRight;\n\n\t\t\tvar left = leftFunc(segment.leftCol);\n\t\t\tvar right = rightFunc(segment.rightCol);\n\t\t\tsegment.left = left;\n\t\t\tsegment.outerWidth = right - left;\n\t\t}\n\t}", "function calculateHorizontals(segments) {\n\t\tvar isRTL = opt('isRTL');\n\t\tfor (var i=0; i<segments.length; i++) {\n\t\t\tvar segment = segments[i];\n\n\t\t\t// Determine functions used for calulating the elements left/right coordinates,\n\t\t\t// depending on whether the view is RTL or not.\n\t\t\t// NOTE:\n\t\t\t// colLeft/colRight returns the coordinate butting up the edge of the cell.\n\t\t\t// colContentLeft/colContentRight is indented a little bit from the edge.\n\t\t\tvar leftFunc = (isRTL ? segment.isEnd : segment.isStart) ? colContentLeft : colLeft;\n\t\t\tvar rightFunc = (isRTL ? segment.isStart : segment.isEnd) ? colContentRight : colRight;\n\n\t\t\tvar left = leftFunc(segment.leftCol);\n\t\t\tvar right = rightFunc(segment.rightCol);\n\t\t\tsegment.left = left;\n\t\t\tsegment.outerWidth = right - left;\n\t\t}\n\t}", "function calculateHorizontals(segments) {\n\t\tvar isRTL = opt('isRTL');\n\t\tfor (var i=0; i<segments.length; i++) {\n\t\t\tvar segment = segments[i];\n\n\t\t\t// Determine functions used for calulating the elements left/right coordinates,\n\t\t\t// depending on whether the view is RTL or not.\n\t\t\t// NOTE:\n\t\t\t// colLeft/colRight returns the coordinate butting up the edge of the cell.\n\t\t\t// colContentLeft/colContentRight is indented a little bit from the edge.\n\t\t\tvar leftFunc = (isRTL ? segment.isEnd : segment.isStart) ? colContentLeft : colLeft;\n\t\t\tvar rightFunc = (isRTL ? segment.isStart : segment.isEnd) ? colContentRight : colRight;\n\n\t\t\tvar left = leftFunc(segment.leftCol);\n\t\t\tvar right = rightFunc(segment.rightCol);\n\t\t\tsegment.left = left;\n\t\t\tsegment.outerWidth = right - left;\n\t\t}\n\t}", "function calculateHorizontals(segments) {\n\t\tvar isRTL = opt('isRTL');\n\t\tfor (var i=0; i<segments.length; i++) {\n\t\t\tvar segment = segments[i];\n\n\t\t\t// Determine functions used for calulating the elements left/right coordinates,\n\t\t\t// depending on whether the view is RTL or not.\n\t\t\t// NOTE:\n\t\t\t// colLeft/colRight returns the coordinate butting up the edge of the cell.\n\t\t\t// colContentLeft/colContentRight is indented a little bit from the edge.\n\t\t\tvar leftFunc = (isRTL ? segment.isEnd : segment.isStart) ? colContentLeft : colLeft;\n\t\t\tvar rightFunc = (isRTL ? segment.isStart : segment.isEnd) ? colContentRight : colRight;\n\n\t\t\tvar left = leftFunc(segment.leftCol);\n\t\t\tvar right = rightFunc(segment.rightCol);\n\t\t\tsegment.left = left;\n\t\t\tsegment.outerWidth = right - left;\n\t\t}\n\t}", "function calculateHorizontals(segments) {\n\t\tvar isRTL = opt('isRTL');\n\t\tfor (var i=0; i<segments.length; i++) {\n\t\t\tvar segment = segments[i];\n\n\t\t\t// Determine functions used for calulating the elements left/right coordinates,\n\t\t\t// depending on whether the view is RTL or not.\n\t\t\t// NOTE:\n\t\t\t// colLeft/colRight returns the coordinate butting up the edge of the cell.\n\t\t\t// colContentLeft/colContentRight is indented a little bit from the edge.\n\t\t\tvar leftFunc = (isRTL ? segment.isEnd : segment.isStart) ? colContentLeft : colLeft;\n\t\t\tvar rightFunc = (isRTL ? segment.isStart : segment.isEnd) ? colContentRight : colRight;\n\n\t\t\tvar left = leftFunc(segment.leftCol);\n\t\t\tvar right = rightFunc(segment.rightCol);\n\t\t\tsegment.left = left;\n\t\t\tsegment.outerWidth = right - left;\n\t\t}\n\t}", "function Segment(props) {\n var attached = props.attached,\n basic = props.basic,\n children = props.children,\n circular = props.circular,\n className = props.className,\n clearing = props.clearing,\n color = props.color,\n compact = props.compact,\n content = props.content,\n disabled = props.disabled,\n floated = props.floated,\n inverted = props.inverted,\n loading = props.loading,\n placeholder = props.placeholder,\n padded = props.padded,\n piled = props.piled,\n raised = props.raised,\n secondary = props.secondary,\n size = props.size,\n stacked = props.stacked,\n tertiary = props.tertiary,\n textAlign = props.textAlign,\n vertical = props.vertical;\n var classes = (0, _classnames[\"default\"])('ui', color, size, (0, _lib.useKeyOnly)(basic, 'basic'), (0, _lib.useKeyOnly)(circular, 'circular'), (0, _lib.useKeyOnly)(clearing, 'clearing'), (0, _lib.useKeyOnly)(compact, 'compact'), (0, _lib.useKeyOnly)(disabled, 'disabled'), (0, _lib.useKeyOnly)(inverted, 'inverted'), (0, _lib.useKeyOnly)(loading, 'loading'), (0, _lib.useKeyOnly)(placeholder, 'placeholder'), (0, _lib.useKeyOnly)(piled, 'piled'), (0, _lib.useKeyOnly)(raised, 'raised'), (0, _lib.useKeyOnly)(secondary, 'secondary'), (0, _lib.useKeyOnly)(stacked, 'stacked'), (0, _lib.useKeyOnly)(tertiary, 'tertiary'), (0, _lib.useKeyOnly)(vertical, 'vertical'), (0, _lib.useKeyOrValueAndKey)(attached, 'attached'), (0, _lib.useKeyOrValueAndKey)(padded, 'padded'), (0, _lib.useTextAlignProp)(textAlign), (0, _lib.useValueAndKey)(floated, 'floated'), 'segment', className);\n var rest = (0, _lib.getUnhandledProps)(Segment, props);\n var ElementType = (0, _lib.getElementType)(Segment, props);\n return _react[\"default\"].createElement(ElementType, (0, _extends2[\"default\"])({}, rest, {\n className: classes\n }), _lib.childrenUtils.isNil(children) ? content : children);\n}", "function Segment(props) {\n var attached = props.attached,\n basic = props.basic,\n children = props.children,\n circular = props.circular,\n className = props.className,\n clearing = props.clearing,\n color = props.color,\n compact = props.compact,\n content = props.content,\n disabled = props.disabled,\n floated = props.floated,\n inverted = props.inverted,\n loading = props.loading,\n placeholder = props.placeholder,\n padded = props.padded,\n piled = props.piled,\n raised = props.raised,\n secondary = props.secondary,\n size = props.size,\n stacked = props.stacked,\n tertiary = props.tertiary,\n textAlign = props.textAlign,\n vertical = props.vertical;\n var classes = (0, _classnames[\"default\"])('ui', color, size, (0, _lib.useKeyOnly)(basic, 'basic'), (0, _lib.useKeyOnly)(circular, 'circular'), (0, _lib.useKeyOnly)(clearing, 'clearing'), (0, _lib.useKeyOnly)(compact, 'compact'), (0, _lib.useKeyOnly)(disabled, 'disabled'), (0, _lib.useKeyOnly)(inverted, 'inverted'), (0, _lib.useKeyOnly)(loading, 'loading'), (0, _lib.useKeyOnly)(placeholder, 'placeholder'), (0, _lib.useKeyOnly)(piled, 'piled'), (0, _lib.useKeyOnly)(raised, 'raised'), (0, _lib.useKeyOnly)(secondary, 'secondary'), (0, _lib.useKeyOnly)(stacked, 'stacked'), (0, _lib.useKeyOnly)(tertiary, 'tertiary'), (0, _lib.useKeyOnly)(vertical, 'vertical'), (0, _lib.useKeyOrValueAndKey)(attached, 'attached'), (0, _lib.useKeyOrValueAndKey)(padded, 'padded'), (0, _lib.useTextAlignProp)(textAlign), (0, _lib.useValueAndKey)(floated, 'floated'), 'segment', className);\n var rest = (0, _lib.getUnhandledProps)(Segment, props);\n var ElementType = (0, _lib.getElementType)(Segment, props);\n return _react[\"default\"].createElement(ElementType, (0, _extends2[\"default\"])({}, rest, {\n className: classes\n }), _lib.childrenUtils.isNil(children) ? content : children);\n}", "function Segment(props) {\n\t var attached = props.attached,\n\t basic = props.basic,\n\t children = props.children,\n\t circular = props.circular,\n\t className = props.className,\n\t clearing = props.clearing,\n\t color = props.color,\n\t compact = props.compact,\n\t disabled = props.disabled,\n\t floated = props.floated,\n\t inverted = props.inverted,\n\t loading = props.loading,\n\t padded = props.padded,\n\t piled = props.piled,\n\t raised = props.raised,\n\t secondary = props.secondary,\n\t size = props.size,\n\t stacked = props.stacked,\n\t tertiary = props.tertiary,\n\t textAlign = props.textAlign,\n\t vertical = props.vertical;\n\n\n\t var classes = (0, _classnames2.default)('ui', color, size, (0, _lib.useKeyOrValueAndKey)(attached, 'attached'), (0, _lib.useKeyOnly)(basic, 'basic'), (0, _lib.useKeyOnly)(circular, 'circular'), (0, _lib.useKeyOnly)(clearing, 'clearing'), (0, _lib.useKeyOnly)(compact, 'compact'), (0, _lib.useKeyOnly)(disabled, 'disabled'), (0, _lib.useValueAndKey)(floated, 'floated'), (0, _lib.useKeyOnly)(inverted, 'inverted'), (0, _lib.useKeyOnly)(loading, 'loading'), (0, _lib.useKeyOrValueAndKey)(padded, 'padded'), (0, _lib.useKeyOnly)(piled, 'piled'), (0, _lib.useKeyOnly)(raised, 'raised'), (0, _lib.useKeyOnly)(secondary, 'secondary'), (0, _lib.useKeyOnly)(stacked, 'stacked'), (0, _lib.useKeyOnly)(tertiary, 'tertiary'), (0, _lib.useTextAlignProp)(textAlign), (0, _lib.useKeyOnly)(vertical, 'vertical'), className, 'segment');\n\t var rest = (0, _lib.getUnhandledProps)(Segment, props);\n\t var ElementType = (0, _lib.getElementType)(Segment, props);\n\n\t return _react2.default.createElement(\n\t ElementType,\n\t _extends({}, rest, { className: classes }),\n\t children\n\t );\n\t}", "function Segments(props) {\n var value = props.value,\n children = props.children,\n name = props.name,\n size = props.size,\n onChange = props.onChange,\n className = props.className;\n var classes = (0,_node_modules_classnames_index_js__WEBPACK_IMPORTED_MODULE_2__.default)('kt-segments', className);\n var contextValue = (0,react__WEBPACK_IMPORTED_MODULE_0__.useMemo)(function () {\n return {\n value: value,\n name: name,\n onChange: onChange,\n size: size\n };\n }, [value, name, onChange, size]);\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_context_js__WEBPACK_IMPORTED_MODULE_3__.SegmentsContext.Provider, {\n value: contextValue\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(\"div\", {\n className: classes\n }, children));\n}", "function Segment(props) {\n var attached = props.attached,\n basic = props.basic,\n children = props.children,\n circular = props.circular,\n className = props.className,\n clearing = props.clearing,\n color = props.color,\n compact = props.compact,\n disabled = props.disabled,\n floated = props.floated,\n inverted = props.inverted,\n loading = props.loading,\n padded = props.padded,\n piled = props.piled,\n raised = props.raised,\n secondary = props.secondary,\n size = props.size,\n stacked = props.stacked,\n tertiary = props.tertiary,\n textAlign = props.textAlign,\n vertical = props.vertical;\n\n var classes = (0, _classnames2.default)('ui', color, size, (0, _lib.useKeyOnly)(basic, 'basic'), (0, _lib.useKeyOnly)(circular, 'circular'), (0, _lib.useKeyOnly)(clearing, 'clearing'), (0, _lib.useKeyOnly)(compact, 'compact'), (0, _lib.useKeyOnly)(disabled, 'disabled'), (0, _lib.useKeyOnly)(inverted, 'inverted'), (0, _lib.useKeyOnly)(loading, 'loading'), (0, _lib.useKeyOnly)(piled, 'piled'), (0, _lib.useKeyOnly)(raised, 'raised'), (0, _lib.useKeyOnly)(secondary, 'secondary'), (0, _lib.useKeyOnly)(stacked, 'stacked'), (0, _lib.useKeyOnly)(tertiary, 'tertiary'), (0, _lib.useKeyOnly)(vertical, 'vertical'), (0, _lib.useKeyOrValueAndKey)(attached, 'attached'), (0, _lib.useKeyOrValueAndKey)(padded, 'padded'), (0, _lib.useTextAlignProp)(textAlign), (0, _lib.useValueAndKey)(floated, 'floated'), 'segment', className);\n var rest = (0, _lib.getUnhandledProps)(Segment, props);\n var ElementType = (0, _lib.getElementType)(Segment, props);\n\n return _react2.default.createElement(ElementType, (0, _extends3.default)({}, rest, { className: classes }), children);\n}", "function Segment(props) {\n var attached = props.attached,\n basic = props.basic,\n children = props.children,\n circular = props.circular,\n className = props.className,\n clearing = props.clearing,\n color = props.color,\n compact = props.compact,\n content = props.content,\n disabled = props.disabled,\n floated = props.floated,\n inverted = props.inverted,\n loading = props.loading,\n padded = props.padded,\n piled = props.piled,\n raised = props.raised,\n secondary = props.secondary,\n size = props.size,\n stacked = props.stacked,\n tertiary = props.tertiary,\n textAlign = props.textAlign,\n vertical = props.vertical;\n\n var classes = (0, _classnames2.default)('ui', color, size, (0, _lib.useKeyOnly)(basic, 'basic'), (0, _lib.useKeyOnly)(circular, 'circular'), (0, _lib.useKeyOnly)(clearing, 'clearing'), (0, _lib.useKeyOnly)(compact, 'compact'), (0, _lib.useKeyOnly)(disabled, 'disabled'), (0, _lib.useKeyOnly)(inverted, 'inverted'), (0, _lib.useKeyOnly)(loading, 'loading'), (0, _lib.useKeyOnly)(piled, 'piled'), (0, _lib.useKeyOnly)(raised, 'raised'), (0, _lib.useKeyOnly)(secondary, 'secondary'), (0, _lib.useKeyOnly)(stacked, 'stacked'), (0, _lib.useKeyOnly)(tertiary, 'tertiary'), (0, _lib.useKeyOnly)(vertical, 'vertical'), (0, _lib.useKeyOrValueAndKey)(attached, 'attached'), (0, _lib.useKeyOrValueAndKey)(padded, 'padded'), (0, _lib.useTextAlignProp)(textAlign), (0, _lib.useValueAndKey)(floated, 'floated'), 'segment', className);\n var rest = (0, _lib.getUnhandledProps)(Segment, props);\n var ElementType = (0, _lib.getElementType)(Segment, props);\n\n return _react2.default.createElement(ElementType, (0, _extends3.default)({}, rest, { className: classes }), _lib.childrenUtils.isNil(children) ? content : children);\n}", "function buildSegmentsForEvent(event) {\n\t\tvar startDate = event.start;\n\t\tvar endDate = exclEndDay(event);\n\t\tvar segments = rangeToSegments(startDate, endDate);\n\t\tfor (var i=0; i<segments.length; i++) {\n\t\t\tsegments[i].event = event;\n\t\t}\n\t\treturn segments;\n\t}", "function buildSegmentsForEvent(event) {\n\t\tvar startDate = event.start;\n\t\tvar endDate = exclEndDay(event);\n\t\tvar segments = rangeToSegments(startDate, endDate);\n\t\tfor (var i=0; i<segments.length; i++) {\n\t\t\tsegments[i].event = event;\n\t\t}\n\t\treturn segments;\n\t}", "function buildSegmentsForEvent(event) {\n\t\tvar startDate = event.start;\n\t\tvar endDate = exclEndDay(event);\n\t\tvar segments = rangeToSegments(startDate, endDate);\n\t\tfor (var i=0; i<segments.length; i++) {\n\t\t\tsegments[i].event = event;\n\t\t}\n\t\treturn segments;\n\t}", "function k(b,c){for(var d=0;d<b.length;d++){var e=b[d],f=e.event,g=c.eq(d),h=z(\"eventRender\",f,f,g);h===!1?\n// if `false`, remove the event from the DOM and don't assign it to `segment.event`\ng.remove():(h&&h!==!0&&(\n// the trigger returned a new element, but not `true` (which means keep the existing element)\n// re-assign the important CSS dimension properties that were already assigned in `buildHTMLForSegment`\nh=a(h).css({position:\"absolute\",left:e.left}),g.replaceWith(h),g=h),e.element=g)}}", "function buildSegmentsForEvent(event) {\n\t\tvar segments = rangeToSegments(event.start, getEventEnd(event));\n\t\tfor (var i=0; i<segments.length; i++) {\n\t\t\tsegments[i].event = event;\n\t\t}\n\t\treturn segments;\n\t}", "function buildSegmentsForEvent(event) {\n\t\tvar segments = rangeToSegments(event.start, getEventEnd(event));\n\t\tfor (var i=0; i<segments.length; i++) {\n\t\t\tsegments[i].event = event;\n\t\t}\n\t\treturn segments;\n\t}", "function StaticSegment(string) { this.string = string; }", "function StaticSegment(string) { this.string = normalizeSegment(string); }", "function addSegment(segment) {\n\t\t\t\n\t\t// create canvas element used to visualize the frames of \n\t\t// the given segment + its timecodes\n\t\tvar item = document.createElement('canvas');\n\t\titem.width = 1000;\n\t\titem.height = 200;\n\t\t\n\t\t// input field for description of a segment\n\t\tvar input = document.createElement('input');\n\t\tinput.type = 'text';\n\t\tinput.placeholder = 'description';\n\t\tinput.className = 'description';\n\t\tinput.value = segment.description;\n\t\tinput.id = '' + segment.id;\n\t\tinput.width = 500;\n\t\t\n\t\t// draw segment frames of the video\n\t\tvar context = item.getContext(\"2d\");\n\t\tcontext.drawImage(segment.startFrame.image, 10, 10, 150, 150);\n\t\tcontext.drawImage(segment.endFrame.image, 170, 10, 150, 150);\n\t\t\n\t\t// draw timecode as text\n\t\tcontext.font = \"20px Arial\";\n\t\tcontext.fillStyle = 'Black';\n\t\tcontext.fillText(segment.startFrame.asText() + ' - ' + segment.endFrame.asText(), 10, 190);\n\t\t\n\t\tvar div = document.createElement('div');\n\t\tdiv.className = 'element';\n\t\tdiv.setAttribute('data-start', segment.startFrame.second);\n\t\tdiv.setAttribute('data-end', segment.endFrame.second);\n\t\tdiv.id = 'div' + segment.id;\n\t\t\n\t\t// logic for button showing the up arrow\n\t\tvar up_arrow = document.createElement('button');\n\t\tup_arrow.type = 'button';\n\t\tup_arrow.innerHTML = '&uarr;'\n\t\tup_arrow.setAttribute('data-id', segment.id);\n\t\tvar index = segments.indexOf(segment);\n\t\tup_arrow.disabled = index == 0;\n\t\tup_arrow.addEventListener('click', \n\t\tfunction() {\n\t\t\tvar segment_id = this.getAttribute('data-id');\n\t\t\tvar se = getSegmentById(segment_id);\n\t\t\tvar index_se = segments.indexOf(se);\n\t\t\tif (index_se <= 0) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tswapSegments(index_se, index_se - 1);\n\t\t\trepaintSegments();\n\t\t},\n\t\tfalse);\n\t\t\n\t\t// logic for button showing the down arrow\n\t\tvar down_arrow = document.createElement('button');\n\t\tdown_arrow.type = 'button';\n\t\tdown_arrow.innerHTML = '&darr;'\n\t\tdown_arrow.setAttribute('data-id', segment.id);\n\t\tdown_arrow.disabled = index == segments.length - 1;\n\t\tdown_arrow.addEventListener('click', \n\t\tfunction() {\n\t\t\tvar segment_id = this.getAttribute('data-id');\n\t\t\tvar se = getSegmentById(segment_id);\n\t\t\tvar index_se = segments.indexOf(se);\n\t\t\tif (index_se >= segments.length - 1) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tswapSegments(index_se, index_se + 1);\n\t\t\trepaintSegments();\n\t\t},\n\t\tfalse);\n\t\t\n\t\t// logic for remove button -> removes a segment\n\t\tvar remove = document.createElement('button');\n\t\tremove.type = 'button';\n\t\tremove.innerHTML = '-';\n\t\tremove.setAttribute('data-id', segment.id);\n\t\tremove.style.color = 'red',\n\t\tremove.addEventListener('click', \n\t\tfunction() {\n\t\t\tvar segment_id = this.getAttribute('data-id');\n\t\t\tvar se = getSegmentById(segment_id);\n\t\t\tvar index_se = segments.indexOf(se);\n\t\t\t// Find and remove item from an array\n\t\t\tif(index_se >= 0 && index_se < segments.length) {\n\t\t\t\tsegments.splice(index_se, 1);\n\t\t\t\tavailable_ids.push(se.id);\n\t\t\t\tremoveSegment(se);\n\t\t\t\trepaintSegments();\n\t\t\t}\n\t\t},\n\t\tfalse);\n\t\t\n\t\tdiv.appendChild(item);\n\t\tdiv.appendChild(input);\n\t\tdiv.appendChild(up_arrow);\n\t\tdiv.appendChild(down_arrow);\n\t\tdiv.appendChild(remove);\n\t\t\n\t\t// add the new segment div to the list of div objects\n\t\tcontainer.appendChild(div);\n\t}", "function SegmentGroup(props) {\n var children = props.children,\n className = props.className,\n compact = props.compact,\n content = props.content,\n horizontal = props.horizontal,\n piled = props.piled,\n raised = props.raised,\n size = props.size,\n stacked = props.stacked;\n var classes = classnames_default()('ui', size, useKeyOnly(compact, 'compact'), useKeyOnly(horizontal, 'horizontal'), useKeyOnly(piled, 'piled'), useKeyOnly(raised, 'raised'), useKeyOnly(stacked, 'stacked'), 'segments', className);\n var rest = lib_getUnhandledProps(SegmentGroup, props);\n var ElementType = lib_getElementType(SegmentGroup, props);\n return react_default.a.createElement(ElementType, extends_default()({}, rest, {\n className: classes\n }), childrenUtils_namespaceObject.isNil(children) ? content : children);\n}", "function Segment(props) {\n var attached = props.attached,\n basic = props.basic,\n children = props.children,\n circular = props.circular,\n className = props.className,\n clearing = props.clearing,\n color = props.color,\n compact = props.compact,\n content = props.content,\n disabled = props.disabled,\n floated = props.floated,\n inverted = props.inverted,\n loading = props.loading,\n placeholder = props.placeholder,\n padded = props.padded,\n piled = props.piled,\n raised = props.raised,\n secondary = props.secondary,\n size = props.size,\n stacked = props.stacked,\n tertiary = props.tertiary,\n textAlign = props.textAlign,\n vertical = props.vertical;\n var classes = Object(clsx__WEBPACK_IMPORTED_MODULE_2__[\"default\"])('ui', color, size, Object(_lib__WEBPACK_IMPORTED_MODULE_5__[\"useKeyOnly\"])(basic, 'basic'), Object(_lib__WEBPACK_IMPORTED_MODULE_5__[\"useKeyOnly\"])(circular, 'circular'), Object(_lib__WEBPACK_IMPORTED_MODULE_5__[\"useKeyOnly\"])(clearing, 'clearing'), Object(_lib__WEBPACK_IMPORTED_MODULE_5__[\"useKeyOnly\"])(compact, 'compact'), Object(_lib__WEBPACK_IMPORTED_MODULE_5__[\"useKeyOnly\"])(disabled, 'disabled'), Object(_lib__WEBPACK_IMPORTED_MODULE_5__[\"useKeyOnly\"])(inverted, 'inverted'), Object(_lib__WEBPACK_IMPORTED_MODULE_5__[\"useKeyOnly\"])(loading, 'loading'), Object(_lib__WEBPACK_IMPORTED_MODULE_5__[\"useKeyOnly\"])(placeholder, 'placeholder'), Object(_lib__WEBPACK_IMPORTED_MODULE_5__[\"useKeyOnly\"])(piled, 'piled'), Object(_lib__WEBPACK_IMPORTED_MODULE_5__[\"useKeyOnly\"])(raised, 'raised'), Object(_lib__WEBPACK_IMPORTED_MODULE_5__[\"useKeyOnly\"])(secondary, 'secondary'), Object(_lib__WEBPACK_IMPORTED_MODULE_5__[\"useKeyOnly\"])(stacked, 'stacked'), Object(_lib__WEBPACK_IMPORTED_MODULE_5__[\"useKeyOnly\"])(tertiary, 'tertiary'), Object(_lib__WEBPACK_IMPORTED_MODULE_5__[\"useKeyOnly\"])(vertical, 'vertical'), Object(_lib__WEBPACK_IMPORTED_MODULE_5__[\"useKeyOrValueAndKey\"])(attached, 'attached'), Object(_lib__WEBPACK_IMPORTED_MODULE_5__[\"useKeyOrValueAndKey\"])(padded, 'padded'), Object(_lib__WEBPACK_IMPORTED_MODULE_5__[\"useTextAlignProp\"])(textAlign), Object(_lib__WEBPACK_IMPORTED_MODULE_5__[\"useValueAndKey\"])(floated, 'floated'), 'segment', className);\n var rest = Object(_lib__WEBPACK_IMPORTED_MODULE_5__[\"getUnhandledProps\"])(Segment, props);\n var ElementType = Object(_lib__WEBPACK_IMPORTED_MODULE_5__[\"getElementType\"])(Segment, props);\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_4___default.a.createElement(ElementType, Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({}, rest, {\n className: classes\n }), _lib__WEBPACK_IMPORTED_MODULE_5__[\"childrenUtils\"].isNil(children) ? content : children);\n}", "function StaticSegment(string) {\n this.string = string;\n }", "function StaticSegment(string) {\n this.string = string;\n }", "function StaticSegment(string) {\n this.string = string;\n }", "function StaticSegment(string) {\n this.string = string;\n }", "function StaticSegment(string) {\n this.string = string;\n }", "function _renderDayEvents(events, doAppend, doRowHeights) {\n\n\t\t// where the DOM nodes will eventually end up\n\t\tvar finalContainer = getDaySegmentContainer();\n\n\t\t// the container where the initial HTML will be rendered.\n\t\t// If `doAppend`==true, uses a temporary container.\n\t\tvar renderContainer = doAppend ? $(\"<div/>\") : finalContainer;\n\n\t\tvar segments = buildSegments(events);\n\t\tvar html;\n\t\tvar elements;\n\n\t\t// calculate the desired `left` and `width` properties on each segment object\n\t\tcalculateHorizontals(segments);\n\n\t\t// build the HTML string. relies on `left` property\n\t\thtml = buildHTML(segments);\n\n\t\t// render the HTML. innerHTML is considerably faster than jQuery's .html()\n\t\trenderContainer[0].innerHTML = html;\n\n\t\t// retrieve the individual elements\n\t\telements = renderContainer.children();\n\n\t\t// if we were appending, and thus using a temporary container,\n\t\t// re-attach elements to the real container.\n\t\tif (doAppend) {\n\t\t\tfinalContainer.append(elements);\n\t\t}\n\n\t\t// assigns each element to `segment.event`, after filtering them through user callbacks\n\t\tresolveElements(segments, elements);\n\n\t\t// Calculate the left and right padding+margin for each element.\n\t\t// We need this for setting each element's desired outer width, because of the W3C box model.\n\t\t// It's important we do this in a separate pass from acually setting the width on the DOM elements\n\t\t// because alternating reading/writing dimensions causes reflow for every iteration.\n\t\tsegmentElementEach(segments, function(segment, element) {\n\t\t\tsegment.hsides = hsides(element, true); // include margins = `true`\n\t\t});\n\n\t\t// Set the width of each element\n\t\tsegmentElementEach(segments, function(segment, element) {\n\t\t\telement.width(\n\t\t\t\tMath.max(0, segment.outerWidth - segment.hsides)\n\t\t\t);\n\t\t});\n\n\t\t// Grab each element's outerHeight (setVerticals uses this).\n\t\t// To get an accurate reading, it's important to have each element's width explicitly set already.\n\t\tsegmentElementEach(segments, function(segment, element) {\n\t\t\tsegment.outerHeight = element.outerHeight(true); // include margins = `true`\n\t\t});\n\n\t\t// Set the top coordinate on each element (requires segment.outerHeight)\n\t\tsetVerticals(segments, doRowHeights);\n\n\t\treturn segments;\n\t}", "function _renderDayEvents(events, doAppend, doRowHeights) {\n\n\t\t// where the DOM nodes will eventually end up\n\t\tvar finalContainer = getDaySegmentContainer();\n\n\t\t// the container where the initial HTML will be rendered.\n\t\t// If `doAppend`==true, uses a temporary container.\n\t\tvar renderContainer = doAppend ? $(\"<div/>\") : finalContainer;\n\n\t\tvar segments = buildSegments(events);\n\t\tvar html;\n\t\tvar elements;\n\n\t\t// calculate the desired `left` and `width` properties on each segment object\n\t\tcalculateHorizontals(segments);\n\n\t\t// build the HTML string. relies on `left` property\n\t\thtml = buildHTML(segments);\n\n\t\t// render the HTML. innerHTML is considerably faster than jQuery's .html()\n\t\trenderContainer[0].innerHTML = html;\n\n\t\t// retrieve the individual elements\n\t\telements = renderContainer.children();\n\n\t\t// if we were appending, and thus using a temporary container,\n\t\t// re-attach elements to the real container.\n\t\tif (doAppend) {\n\t\t\tfinalContainer.append(elements);\n\t\t}\n\n\t\t// assigns each element to `segment.event`, after filtering them through user callbacks\n\t\tresolveElements(segments, elements);\n\n\t\t// Calculate the left and right padding+margin for each element.\n\t\t// We need this for setting each element's desired outer width, because of the W3C box model.\n\t\t// It's important we do this in a separate pass from acually setting the width on the DOM elements\n\t\t// because alternating reading/writing dimensions causes reflow for every iteration.\n\t\tsegmentElementEach(segments, function(segment, element) {\n\t\t\tsegment.hsides = hsides(element, true); // include margins = `true`\n\t\t});\n\n\t\t// Set the width of each element\n\t\tsegmentElementEach(segments, function(segment, element) {\n\t\t\telement.width(\n\t\t\t\tMath.max(0, segment.outerWidth - segment.hsides)\n\t\t\t);\n\t\t});\n\n\t\t// Grab each element's outerHeight (setVerticals uses this).\n\t\t// To get an accurate reading, it's important to have each element's width explicitly set already.\n\t\tsegmentElementEach(segments, function(segment, element) {\n\t\t\tsegment.outerHeight = element.outerHeight(true); // include margins = `true`\n\t\t});\n\n\t\t// Set the top coordinate on each element (requires segment.outerHeight)\n\t\tsetVerticals(segments, doRowHeights);\n\n\t\treturn segments;\n\t}", "function _renderDayEvents(events, doAppend, doRowHeights) {\n\n\t\t// where the DOM nodes will eventually end up\n\t\tvar finalContainer = getDaySegmentContainer();\n\n\t\t// the container where the initial HTML will be rendered.\n\t\t// If `doAppend`==true, uses a temporary container.\n\t\tvar renderContainer = doAppend ? $(\"<div/>\") : finalContainer;\n\n\t\tvar segments = buildSegments(events);\n\t\tvar html;\n\t\tvar elements;\n\n\t\t// calculate the desired `left` and `width` properties on each segment object\n\t\tcalculateHorizontals(segments);\n\n\t\t// build the HTML string. relies on `left` property\n\t\thtml = buildHTML(segments);\n\n\t\t// render the HTML. innerHTML is considerably faster than jQuery's .html()\n\t\trenderContainer[0].innerHTML = html;\n\n\t\t// retrieve the individual elements\n\t\telements = renderContainer.children();\n\n\t\t// if we were appending, and thus using a temporary container,\n\t\t// re-attach elements to the real container.\n\t\tif (doAppend) {\n\t\t\tfinalContainer.append(elements);\n\t\t}\n\n\t\t// assigns each element to `segment.event`, after filtering them through user callbacks\n\t\tresolveElements(segments, elements);\n\n\t\t// Calculate the left and right padding+margin for each element.\n\t\t// We need this for setting each element's desired outer width, because of the W3C box model.\n\t\t// It's important we do this in a separate pass from acually setting the width on the DOM elements\n\t\t// because alternating reading/writing dimensions causes reflow for every iteration.\n\t\tsegmentElementEach(segments, function(segment, element) {\n\t\t\tsegment.hsides = hsides(element, true); // include margins = `true`\n\t\t});\n\n\t\t// Set the width of each element\n\t\tsegmentElementEach(segments, function(segment, element) {\n\t\t\telement.width(\n\t\t\t\tMath.max(0, segment.outerWidth - segment.hsides)\n\t\t\t);\n\t\t});\n\n\t\t// Grab each element's outerHeight (setVerticals uses this).\n\t\t// To get an accurate reading, it's important to have each element's width explicitly set already.\n\t\tsegmentElementEach(segments, function(segment, element) {\n\t\t\tsegment.outerHeight = element.outerHeight(true); // include margins = `true`\n\t\t});\n\n\t\t// Set the top coordinate on each element (requires segment.outerHeight)\n\t\tsetVerticals(segments, doRowHeights);\n\n\t\treturn segments;\n\t}", "function _renderDayEvents(events, doAppend, doRowHeights) {\n\n\t\t// where the DOM nodes will eventually end up\n\t\tvar finalContainer = getDaySegmentContainer();\n\n\t\t// the container where the initial HTML will be rendered.\n\t\t// If `doAppend`==true, uses a temporary container.\n\t\tvar renderContainer = doAppend ? $(\"<div/>\") : finalContainer;\n\n\t\tvar segments = buildSegments(events);\n\t\tvar html;\n\t\tvar elements;\n\n\t\t// calculate the desired `left` and `width` properties on each segment object\n\t\tcalculateHorizontals(segments);\n\n\t\t// build the HTML string. relies on `left` property\n\t\thtml = buildHTML(segments);\n\n\t\t// render the HTML. innerHTML is considerably faster than jQuery's .html()\n\t\trenderContainer[0].innerHTML = html;\n\n\t\t// retrieve the individual elements\n\t\telements = renderContainer.children();\n\n\t\t// if we were appending, and thus using a temporary container,\n\t\t// re-attach elements to the real container.\n\t\tif (doAppend) {\n\t\t\tfinalContainer.append(elements);\n\t\t}\n\n\t\t// assigns each element to `segment.event`, after filtering them through user callbacks\n\t\tresolveElements(segments, elements);\n\n\t\t// Calculate the left and right padding+margin for each element.\n\t\t// We need this for setting each element's desired outer width, because of the W3C box model.\n\t\t// It's important we do this in a separate pass from acually setting the width on the DOM elements\n\t\t// because alternating reading/writing dimensions causes reflow for every iteration.\n\t\tsegmentElementEach(segments, function(segment, element) {\n\t\t\tsegment.hsides = hsides(element, true); // include margins = `true`\n\t\t});\n\n\t\t// Set the width of each element\n\t\tsegmentElementEach(segments, function(segment, element) {\n\t\t\telement.width(\n\t\t\t\tMath.max(0, segment.outerWidth - segment.hsides)\n\t\t\t);\n\t\t});\n\n\t\t// Grab each element's outerHeight (setVerticals uses this).\n\t\t// To get an accurate reading, it's important to have each element's width explicitly set already.\n\t\tsegmentElementEach(segments, function(segment, element) {\n\t\t\tsegment.outerHeight = element.outerHeight(true); // include margins = `true`\n\t\t});\n\n\t\t// Set the top coordinate on each element (requires segment.outerHeight)\n\t\tsetVerticals(segments, doRowHeights);\n\n\t\treturn segments;\n\t}", "function _renderDayEvents(events, doAppend, doRowHeights) {\n\n\t\t// where the DOM nodes will eventually end up\n\t\tvar finalContainer = getDaySegmentContainer();\n\n\t\t// the container where the initial HTML will be rendered.\n\t\t// If `doAppend`==true, uses a temporary container.\n\t\tvar renderContainer = doAppend ? $(\"<div/>\") : finalContainer;\n\n\t\tvar segments = buildSegments(events);\n\t\tvar html;\n\t\tvar elements;\n\n\t\t// calculate the desired `left` and `width` properties on each segment object\n\t\tcalculateHorizontals(segments);\n\n\t\t// build the HTML string. relies on `left` property\n\t\thtml = buildHTML(segments);\n\n\t\t// render the HTML. innerHTML is considerably faster than jQuery's .html()\n\t\trenderContainer[0].innerHTML = html;\n\n\t\t// retrieve the individual elements\n\t\telements = renderContainer.children();\n\n\t\t// if we were appending, and thus using a temporary container,\n\t\t// re-attach elements to the real container.\n\t\tif (doAppend) {\n\t\t\tfinalContainer.append(elements);\n\t\t}\n\n\t\t// assigns each element to `segment.event`, after filtering them through user callbacks\n\t\tresolveElements(segments, elements);\n\n\t\t// Calculate the left and right padding+margin for each element.\n\t\t// We need this for setting each element's desired outer width, because of the W3C box model.\n\t\t// It's important we do this in a separate pass from acually setting the width on the DOM elements\n\t\t// because alternating reading/writing dimensions causes reflow for every iteration.\n\t\tsegmentElementEach(segments, function(segment, element) {\n\t\t\tsegment.hsides = hsides(element, true); // include margins = `true`\n\t\t});\n\n\t\t// Set the width of each element\n\t\tsegmentElementEach(segments, function(segment, element) {\n\t\t\telement.width(\n\t\t\t\tMath.max(0, segment.outerWidth - segment.hsides)\n\t\t\t);\n\t\t});\n\n\t\t// Grab each element's outerHeight (setVerticals uses this).\n\t\t// To get an accurate reading, it's important to have each element's width explicitly set already.\n\t\tsegmentElementEach(segments, function(segment, element) {\n\t\t\tsegment.outerHeight = element.outerHeight(true); // include margins = `true`\n\t\t});\n\n\t\t// Set the top coordinate on each element (requires segment.outerHeight)\n\t\tsetVerticals(segments, doRowHeights);\n\n\t\treturn segments;\n\t}", "function StaticSegment(string) {\n\t this.string = string;\n\t}", "function StaticSegment(string) {\n\t this.string = string;\n\t}", "function computeSegHorizontals(segs, eventOrderSpecs) {\n // IMPORTANT TO CLEAR OLD RESULTS :(\n for (var _i = 0, segs_2 = segs; _i < segs_2.length; _i++) {\n var seg = segs_2[_i];\n seg.level = null;\n seg.forwardCoord = null;\n seg.backwardCoord = null;\n seg.forwardPressure = null;\n }\n\n segs = Object(_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__[\"sortEventSegs\"])(segs, eventOrderSpecs);\n var level0;\n var levels = buildSlotSegLevels(segs);\n computeForwardSlotSegs(levels);\n\n if (level0 = levels[0]) {\n for (var _a = 0, level0_1 = level0; _a < level0_1.length; _a++) {\n var seg = level0_1[_a];\n computeSlotSegPressures(seg);\n }\n\n for (var _b = 0, level0_2 = level0; _b < level0_2.length; _b++) {\n var seg = level0_2[_b];\n computeSegForwardBack(seg, 0, 0, eventOrderSpecs);\n }\n }\n\n return segs;\n } // Builds an array of segments \"levels\". The first level will be the leftmost tier of segments if the calendar is", "function StaticSegment(string) {\n\t this.string = string;\n\t }", "function StaticSegment(string) {\n\t this.string = string;\n\t }", "function StaticSegment(string) {\n\t this.string = string;\n\t }", "function StaticSegment(string) {\n\t this.string = string;\n\t }", "drawHTML(detail, color, line_width) {\n //detail: 0-100 [%]\n detail = 100 - Math.min(detail, 100);\n\n let html_data = '<div style=\"position:absolute\" class=\"vector\">';\n //*init_height/height\n\n let len = 0;\n while (len < this.length) {\n let x = this.x + this.cos() * len;\n let y = this.y + this.sin() * len;\n\n html_data += '<span style=\"position: absolute;top: ' + y + 'px;left:' + x + 'px;width:' + line_width + 'px;height:' + line_width + 'px;background-color:' + color + ';border-radius:50%;text-align:center\"></span>';\n\n len += (detail / 100);\n }\n html_data += '</div>';\n\n return html_data;\n }", "function SegmentGroup(props) {\n var children = props.children,\n className = props.className,\n compact = props.compact,\n content = props.content,\n horizontal = props.horizontal,\n piled = props.piled,\n raised = props.raised,\n size = props.size,\n stacked = props.stacked;\n var classes = cx('ui', size, useKeyOnly(compact, 'compact'), useKeyOnly(horizontal, 'horizontal'), useKeyOnly(piled, 'piled'), useKeyOnly(raised, 'raised'), useKeyOnly(stacked, 'stacked'), 'segments', className);\n var rest = getUnhandledProps(SegmentGroup, props);\n var ElementType = getElementType(SegmentGroup, props);\n return React.createElement(ElementType, _extends({}, rest, {\n className: classes\n }), childrenUtils.isNil(children) ? content : children);\n}", "static getSegmentTitle(segment) {\n // If segment is empty, there is no segment, return empty string\n if (typeof segment == 'string' && segment != undefined && segment.length == 0)\n return '';\n else { // Else there is a segment title to compare\n switch (segment) {\n case 'RR': return 'Replay Roulette'; break;\n case 'SRS': return 'Super Replay Showdown'; break;\n case 'YDIW': return \"You're Doing It Wrong\"; break;\n case 'ST': return 'Stress Test'; break;\n case 'RP': return 'RePorted'; break;\n case 'DP': return 'Developer Pick'; break;\n case '2037': return 'Replay 2037'; break;\n case 'HF': return 'Horror Fest'; break;\n case 'RRL': return 'Replay Real Life'; break;\n default: return segment;\n // Other Segments: GI Versus, Developer Spotlight, \n // Reevesplay, Moments\n }\n }\n }", "function Segment(props) {\n var attached = props.attached,\n basic = props.basic,\n children = props.children,\n circular = props.circular,\n className = props.className,\n clearing = props.clearing,\n color = props.color,\n compact = props.compact,\n content = props.content,\n disabled = props.disabled,\n floated = props.floated,\n inverted = props.inverted,\n loading = props.loading,\n placeholder = props.placeholder,\n padded = props.padded,\n piled = props.piled,\n raised = props.raised,\n secondary = props.secondary,\n size = props.size,\n stacked = props.stacked,\n tertiary = props.tertiary,\n textAlign = props.textAlign,\n vertical = props.vertical;\n var classes = classnames__WEBPACK_IMPORTED_MODULE_2___default()('ui', color, size, Object(_lib__WEBPACK_IMPORTED_MODULE_5__[\"useKeyOnly\"])(basic, 'basic'), Object(_lib__WEBPACK_IMPORTED_MODULE_5__[\"useKeyOnly\"])(circular, 'circular'), Object(_lib__WEBPACK_IMPORTED_MODULE_5__[\"useKeyOnly\"])(clearing, 'clearing'), Object(_lib__WEBPACK_IMPORTED_MODULE_5__[\"useKeyOnly\"])(compact, 'compact'), Object(_lib__WEBPACK_IMPORTED_MODULE_5__[\"useKeyOnly\"])(disabled, 'disabled'), Object(_lib__WEBPACK_IMPORTED_MODULE_5__[\"useKeyOnly\"])(inverted, 'inverted'), Object(_lib__WEBPACK_IMPORTED_MODULE_5__[\"useKeyOnly\"])(loading, 'loading'), Object(_lib__WEBPACK_IMPORTED_MODULE_5__[\"useKeyOnly\"])(placeholder, 'placeholder'), Object(_lib__WEBPACK_IMPORTED_MODULE_5__[\"useKeyOnly\"])(piled, 'piled'), Object(_lib__WEBPACK_IMPORTED_MODULE_5__[\"useKeyOnly\"])(raised, 'raised'), Object(_lib__WEBPACK_IMPORTED_MODULE_5__[\"useKeyOnly\"])(secondary, 'secondary'), Object(_lib__WEBPACK_IMPORTED_MODULE_5__[\"useKeyOnly\"])(stacked, 'stacked'), Object(_lib__WEBPACK_IMPORTED_MODULE_5__[\"useKeyOnly\"])(tertiary, 'tertiary'), Object(_lib__WEBPACK_IMPORTED_MODULE_5__[\"useKeyOnly\"])(vertical, 'vertical'), Object(_lib__WEBPACK_IMPORTED_MODULE_5__[\"useKeyOrValueAndKey\"])(attached, 'attached'), Object(_lib__WEBPACK_IMPORTED_MODULE_5__[\"useKeyOrValueAndKey\"])(padded, 'padded'), Object(_lib__WEBPACK_IMPORTED_MODULE_5__[\"useTextAlignProp\"])(textAlign), Object(_lib__WEBPACK_IMPORTED_MODULE_5__[\"useValueAndKey\"])(floated, 'floated'), 'segment', className);\n var rest = Object(_lib__WEBPACK_IMPORTED_MODULE_5__[\"getUnhandledProps\"])(Segment, props);\n var ElementType = Object(_lib__WEBPACK_IMPORTED_MODULE_5__[\"getElementType\"])(Segment, props);\n return react__WEBPACK_IMPORTED_MODULE_4___default.a.createElement(ElementType, _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0___default()({}, rest, {\n className: classes\n }), _lib__WEBPACK_IMPORTED_MODULE_5__[\"childrenUtils\"].isNil(children) ? content : children);\n}", "function Segment(props) {\n var attached = props.attached,\n basic = props.basic,\n children = props.children,\n circular = props.circular,\n className = props.className,\n clearing = props.clearing,\n color = props.color,\n compact = props.compact,\n content = props.content,\n disabled = props.disabled,\n floated = props.floated,\n inverted = props.inverted,\n loading = props.loading,\n placeholder = props.placeholder,\n padded = props.padded,\n piled = props.piled,\n raised = props.raised,\n secondary = props.secondary,\n size = props.size,\n stacked = props.stacked,\n tertiary = props.tertiary,\n textAlign = props.textAlign,\n vertical = props.vertical;\n var classes = classnames__WEBPACK_IMPORTED_MODULE_2___default()('ui', color, size, Object(_lib__WEBPACK_IMPORTED_MODULE_5__[\"useKeyOnly\"])(basic, 'basic'), Object(_lib__WEBPACK_IMPORTED_MODULE_5__[\"useKeyOnly\"])(circular, 'circular'), Object(_lib__WEBPACK_IMPORTED_MODULE_5__[\"useKeyOnly\"])(clearing, 'clearing'), Object(_lib__WEBPACK_IMPORTED_MODULE_5__[\"useKeyOnly\"])(compact, 'compact'), Object(_lib__WEBPACK_IMPORTED_MODULE_5__[\"useKeyOnly\"])(disabled, 'disabled'), Object(_lib__WEBPACK_IMPORTED_MODULE_5__[\"useKeyOnly\"])(inverted, 'inverted'), Object(_lib__WEBPACK_IMPORTED_MODULE_5__[\"useKeyOnly\"])(loading, 'loading'), Object(_lib__WEBPACK_IMPORTED_MODULE_5__[\"useKeyOnly\"])(placeholder, 'placeholder'), Object(_lib__WEBPACK_IMPORTED_MODULE_5__[\"useKeyOnly\"])(piled, 'piled'), Object(_lib__WEBPACK_IMPORTED_MODULE_5__[\"useKeyOnly\"])(raised, 'raised'), Object(_lib__WEBPACK_IMPORTED_MODULE_5__[\"useKeyOnly\"])(secondary, 'secondary'), Object(_lib__WEBPACK_IMPORTED_MODULE_5__[\"useKeyOnly\"])(stacked, 'stacked'), Object(_lib__WEBPACK_IMPORTED_MODULE_5__[\"useKeyOnly\"])(tertiary, 'tertiary'), Object(_lib__WEBPACK_IMPORTED_MODULE_5__[\"useKeyOnly\"])(vertical, 'vertical'), Object(_lib__WEBPACK_IMPORTED_MODULE_5__[\"useKeyOrValueAndKey\"])(attached, 'attached'), Object(_lib__WEBPACK_IMPORTED_MODULE_5__[\"useKeyOrValueAndKey\"])(padded, 'padded'), Object(_lib__WEBPACK_IMPORTED_MODULE_5__[\"useTextAlignProp\"])(textAlign), Object(_lib__WEBPACK_IMPORTED_MODULE_5__[\"useValueAndKey\"])(floated, 'floated'), 'segment', className);\n var rest = Object(_lib__WEBPACK_IMPORTED_MODULE_5__[\"getUnhandledProps\"])(Segment, props);\n var ElementType = Object(_lib__WEBPACK_IMPORTED_MODULE_5__[\"getElementType\"])(Segment, props);\n return react__WEBPACK_IMPORTED_MODULE_4___default.a.createElement(ElementType, _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0___default()({}, rest, {\n className: classes\n }), _lib__WEBPACK_IMPORTED_MODULE_5__[\"childrenUtils\"].isNil(children) ? content : children);\n}", "function Segment(props) {\n var attached = props.attached,\n basic = props.basic,\n children = props.children,\n circular = props.circular,\n className = props.className,\n clearing = props.clearing,\n color = props.color,\n compact = props.compact,\n content = props.content,\n disabled = props.disabled,\n floated = props.floated,\n inverted = props.inverted,\n loading = props.loading,\n padded = props.padded,\n piled = props.piled,\n raised = props.raised,\n secondary = props.secondary,\n size = props.size,\n stacked = props.stacked,\n tertiary = props.tertiary,\n textAlign = props.textAlign,\n vertical = props.vertical;\n var classes = __WEBPACK_IMPORTED_MODULE_2_classnames___default()('ui', color, size, Object(__WEBPACK_IMPORTED_MODULE_5__lib__[\"A\" /* useKeyOnly */])(basic, 'basic'), Object(__WEBPACK_IMPORTED_MODULE_5__lib__[\"A\" /* useKeyOnly */])(circular, 'circular'), Object(__WEBPACK_IMPORTED_MODULE_5__lib__[\"A\" /* useKeyOnly */])(clearing, 'clearing'), Object(__WEBPACK_IMPORTED_MODULE_5__lib__[\"A\" /* useKeyOnly */])(compact, 'compact'), Object(__WEBPACK_IMPORTED_MODULE_5__lib__[\"A\" /* useKeyOnly */])(disabled, 'disabled'), Object(__WEBPACK_IMPORTED_MODULE_5__lib__[\"A\" /* useKeyOnly */])(inverted, 'inverted'), Object(__WEBPACK_IMPORTED_MODULE_5__lib__[\"A\" /* useKeyOnly */])(loading, 'loading'), Object(__WEBPACK_IMPORTED_MODULE_5__lib__[\"A\" /* useKeyOnly */])(piled, 'piled'), Object(__WEBPACK_IMPORTED_MODULE_5__lib__[\"A\" /* useKeyOnly */])(raised, 'raised'), Object(__WEBPACK_IMPORTED_MODULE_5__lib__[\"A\" /* useKeyOnly */])(secondary, 'secondary'), Object(__WEBPACK_IMPORTED_MODULE_5__lib__[\"A\" /* useKeyOnly */])(stacked, 'stacked'), Object(__WEBPACK_IMPORTED_MODULE_5__lib__[\"A\" /* useKeyOnly */])(tertiary, 'tertiary'), Object(__WEBPACK_IMPORTED_MODULE_5__lib__[\"A\" /* useKeyOnly */])(vertical, 'vertical'), Object(__WEBPACK_IMPORTED_MODULE_5__lib__[\"B\" /* useKeyOrValueAndKey */])(attached, 'attached'), Object(__WEBPACK_IMPORTED_MODULE_5__lib__[\"B\" /* useKeyOrValueAndKey */])(padded, 'padded'), Object(__WEBPACK_IMPORTED_MODULE_5__lib__[\"D\" /* useTextAlignProp */])(textAlign), Object(__WEBPACK_IMPORTED_MODULE_5__lib__[\"E\" /* useValueAndKey */])(floated, 'floated'), 'segment', className);\n var rest = Object(__WEBPACK_IMPORTED_MODULE_5__lib__[\"r\" /* getUnhandledProps */])(Segment, props);\n var ElementType = Object(__WEBPACK_IMPORTED_MODULE_5__lib__[\"q\" /* getElementType */])(Segment, props);\n return __WEBPACK_IMPORTED_MODULE_4_react___default.a.createElement(ElementType, __WEBPACK_IMPORTED_MODULE_0__babel_runtime_helpers_extends___default()({}, rest, {\n className: classes\n }), __WEBPACK_IMPORTED_MODULE_5__lib__[\"c\" /* childrenUtils */].isNil(children) ? content : children);\n}", "function Segment(props) {\n var attached = props.attached,\n basic = props.basic,\n children = props.children,\n circular = props.circular,\n className = props.className,\n clearing = props.clearing,\n color = props.color,\n compact = props.compact,\n disabled = props.disabled,\n floated = props.floated,\n inverted = props.inverted,\n loading = props.loading,\n padded = props.padded,\n piled = props.piled,\n raised = props.raised,\n secondary = props.secondary,\n size = props.size,\n stacked = props.stacked,\n tertiary = props.tertiary,\n textAlign = props.textAlign,\n vertical = props.vertical;\n\n\n var classes = __WEBPACK_IMPORTED_MODULE_2_classnames___default()('ui', color, size, Object(__WEBPACK_IMPORTED_MODULE_5__lib__[\"z\" /* useKeyOnly */])(basic, 'basic'), Object(__WEBPACK_IMPORTED_MODULE_5__lib__[\"z\" /* useKeyOnly */])(circular, 'circular'), Object(__WEBPACK_IMPORTED_MODULE_5__lib__[\"z\" /* useKeyOnly */])(clearing, 'clearing'), Object(__WEBPACK_IMPORTED_MODULE_5__lib__[\"z\" /* useKeyOnly */])(compact, 'compact'), Object(__WEBPACK_IMPORTED_MODULE_5__lib__[\"z\" /* useKeyOnly */])(disabled, 'disabled'), Object(__WEBPACK_IMPORTED_MODULE_5__lib__[\"z\" /* useKeyOnly */])(inverted, 'inverted'), Object(__WEBPACK_IMPORTED_MODULE_5__lib__[\"z\" /* useKeyOnly */])(loading, 'loading'), Object(__WEBPACK_IMPORTED_MODULE_5__lib__[\"z\" /* useKeyOnly */])(piled, 'piled'), Object(__WEBPACK_IMPORTED_MODULE_5__lib__[\"z\" /* useKeyOnly */])(raised, 'raised'), Object(__WEBPACK_IMPORTED_MODULE_5__lib__[\"z\" /* useKeyOnly */])(secondary, 'secondary'), Object(__WEBPACK_IMPORTED_MODULE_5__lib__[\"z\" /* useKeyOnly */])(stacked, 'stacked'), Object(__WEBPACK_IMPORTED_MODULE_5__lib__[\"z\" /* useKeyOnly */])(tertiary, 'tertiary'), Object(__WEBPACK_IMPORTED_MODULE_5__lib__[\"z\" /* useKeyOnly */])(vertical, 'vertical'), Object(__WEBPACK_IMPORTED_MODULE_5__lib__[\"A\" /* useKeyOrValueAndKey */])(attached, 'attached'), Object(__WEBPACK_IMPORTED_MODULE_5__lib__[\"A\" /* useKeyOrValueAndKey */])(padded, 'padded'), Object(__WEBPACK_IMPORTED_MODULE_5__lib__[\"C\" /* useTextAlignProp */])(textAlign), Object(__WEBPACK_IMPORTED_MODULE_5__lib__[\"D\" /* useValueAndKey */])(floated, 'floated'), 'segment', className);\n var rest = Object(__WEBPACK_IMPORTED_MODULE_5__lib__[\"q\" /* getUnhandledProps */])(Segment, props);\n var ElementType = Object(__WEBPACK_IMPORTED_MODULE_5__lib__[\"p\" /* getElementType */])(Segment, props);\n\n return __WEBPACK_IMPORTED_MODULE_4_react___default.a.createElement(\n ElementType,\n __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends___default()({}, rest, { className: classes }),\n children\n );\n}", "function Segment(props) {\n var attached = props.attached,\n basic = props.basic,\n children = props.children,\n circular = props.circular,\n className = props.className,\n clearing = props.clearing,\n color = props.color,\n compact = props.compact,\n content = props.content,\n disabled = props.disabled,\n floated = props.floated,\n inverted = props.inverted,\n loading = props.loading,\n padded = props.padded,\n piled = props.piled,\n raised = props.raised,\n secondary = props.secondary,\n size = props.size,\n stacked = props.stacked,\n tertiary = props.tertiary,\n textAlign = props.textAlign,\n vertical = props.vertical;\n\n\n var classes = __WEBPACK_IMPORTED_MODULE_2_classnames___default()('ui', color, size, Object(__WEBPACK_IMPORTED_MODULE_5__lib__[\"B\" /* useKeyOnly */])(basic, 'basic'), Object(__WEBPACK_IMPORTED_MODULE_5__lib__[\"B\" /* useKeyOnly */])(circular, 'circular'), Object(__WEBPACK_IMPORTED_MODULE_5__lib__[\"B\" /* useKeyOnly */])(clearing, 'clearing'), Object(__WEBPACK_IMPORTED_MODULE_5__lib__[\"B\" /* useKeyOnly */])(compact, 'compact'), Object(__WEBPACK_IMPORTED_MODULE_5__lib__[\"B\" /* useKeyOnly */])(disabled, 'disabled'), Object(__WEBPACK_IMPORTED_MODULE_5__lib__[\"B\" /* useKeyOnly */])(inverted, 'inverted'), Object(__WEBPACK_IMPORTED_MODULE_5__lib__[\"B\" /* useKeyOnly */])(loading, 'loading'), Object(__WEBPACK_IMPORTED_MODULE_5__lib__[\"B\" /* useKeyOnly */])(piled, 'piled'), Object(__WEBPACK_IMPORTED_MODULE_5__lib__[\"B\" /* useKeyOnly */])(raised, 'raised'), Object(__WEBPACK_IMPORTED_MODULE_5__lib__[\"B\" /* useKeyOnly */])(secondary, 'secondary'), Object(__WEBPACK_IMPORTED_MODULE_5__lib__[\"B\" /* useKeyOnly */])(stacked, 'stacked'), Object(__WEBPACK_IMPORTED_MODULE_5__lib__[\"B\" /* useKeyOnly */])(tertiary, 'tertiary'), Object(__WEBPACK_IMPORTED_MODULE_5__lib__[\"B\" /* useKeyOnly */])(vertical, 'vertical'), Object(__WEBPACK_IMPORTED_MODULE_5__lib__[\"C\" /* useKeyOrValueAndKey */])(attached, 'attached'), Object(__WEBPACK_IMPORTED_MODULE_5__lib__[\"C\" /* useKeyOrValueAndKey */])(padded, 'padded'), Object(__WEBPACK_IMPORTED_MODULE_5__lib__[\"E\" /* useTextAlignProp */])(textAlign), Object(__WEBPACK_IMPORTED_MODULE_5__lib__[\"F\" /* useValueAndKey */])(floated, 'floated'), 'segment', className);\n var rest = Object(__WEBPACK_IMPORTED_MODULE_5__lib__[\"r\" /* getUnhandledProps */])(Segment, props);\n var ElementType = Object(__WEBPACK_IMPORTED_MODULE_5__lib__[\"q\" /* getElementType */])(Segment, props);\n\n return __WEBPACK_IMPORTED_MODULE_4_react___default.a.createElement(\n ElementType,\n __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends___default()({}, rest, { className: classes }),\n __WEBPACK_IMPORTED_MODULE_5__lib__[\"d\" /* childrenUtils */].isNil(children) ? content : children\n );\n}", "function Segment(props) {\n var attached = props.attached,\n basic = props.basic,\n children = props.children,\n circular = props.circular,\n className = props.className,\n clearing = props.clearing,\n color = props.color,\n compact = props.compact,\n content = props.content,\n disabled = props.disabled,\n floated = props.floated,\n inverted = props.inverted,\n loading = props.loading,\n padded = props.padded,\n piled = props.piled,\n raised = props.raised,\n secondary = props.secondary,\n size = props.size,\n stacked = props.stacked,\n tertiary = props.tertiary,\n textAlign = props.textAlign,\n vertical = props.vertical;\n\n\n var classes = __WEBPACK_IMPORTED_MODULE_2_classnames___default()('ui', color, size, Object(__WEBPACK_IMPORTED_MODULE_5__lib__[\"B\" /* useKeyOnly */])(basic, 'basic'), Object(__WEBPACK_IMPORTED_MODULE_5__lib__[\"B\" /* useKeyOnly */])(circular, 'circular'), Object(__WEBPACK_IMPORTED_MODULE_5__lib__[\"B\" /* useKeyOnly */])(clearing, 'clearing'), Object(__WEBPACK_IMPORTED_MODULE_5__lib__[\"B\" /* useKeyOnly */])(compact, 'compact'), Object(__WEBPACK_IMPORTED_MODULE_5__lib__[\"B\" /* useKeyOnly */])(disabled, 'disabled'), Object(__WEBPACK_IMPORTED_MODULE_5__lib__[\"B\" /* useKeyOnly */])(inverted, 'inverted'), Object(__WEBPACK_IMPORTED_MODULE_5__lib__[\"B\" /* useKeyOnly */])(loading, 'loading'), Object(__WEBPACK_IMPORTED_MODULE_5__lib__[\"B\" /* useKeyOnly */])(piled, 'piled'), Object(__WEBPACK_IMPORTED_MODULE_5__lib__[\"B\" /* useKeyOnly */])(raised, 'raised'), Object(__WEBPACK_IMPORTED_MODULE_5__lib__[\"B\" /* useKeyOnly */])(secondary, 'secondary'), Object(__WEBPACK_IMPORTED_MODULE_5__lib__[\"B\" /* useKeyOnly */])(stacked, 'stacked'), Object(__WEBPACK_IMPORTED_MODULE_5__lib__[\"B\" /* useKeyOnly */])(tertiary, 'tertiary'), Object(__WEBPACK_IMPORTED_MODULE_5__lib__[\"B\" /* useKeyOnly */])(vertical, 'vertical'), Object(__WEBPACK_IMPORTED_MODULE_5__lib__[\"C\" /* useKeyOrValueAndKey */])(attached, 'attached'), Object(__WEBPACK_IMPORTED_MODULE_5__lib__[\"C\" /* useKeyOrValueAndKey */])(padded, 'padded'), Object(__WEBPACK_IMPORTED_MODULE_5__lib__[\"E\" /* useTextAlignProp */])(textAlign), Object(__WEBPACK_IMPORTED_MODULE_5__lib__[\"F\" /* useValueAndKey */])(floated, 'floated'), 'segment', className);\n var rest = Object(__WEBPACK_IMPORTED_MODULE_5__lib__[\"r\" /* getUnhandledProps */])(Segment, props);\n var ElementType = Object(__WEBPACK_IMPORTED_MODULE_5__lib__[\"q\" /* getElementType */])(Segment, props);\n\n return __WEBPACK_IMPORTED_MODULE_4_react___default.a.createElement(\n ElementType,\n __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends___default()({}, rest, { className: classes }),\n __WEBPACK_IMPORTED_MODULE_5__lib__[\"d\" /* childrenUtils */].isNil(children) ? content : children\n );\n}", "function Segment(props) {\n var attached = props.attached,\n basic = props.basic,\n children = props.children,\n circular = props.circular,\n className = props.className,\n clearing = props.clearing,\n color = props.color,\n compact = props.compact,\n disabled = props.disabled,\n floated = props.floated,\n inverted = props.inverted,\n loading = props.loading,\n padded = props.padded,\n piled = props.piled,\n raised = props.raised,\n secondary = props.secondary,\n size = props.size,\n stacked = props.stacked,\n tertiary = props.tertiary,\n textAlign = props.textAlign,\n vertical = props.vertical;\n\n\n var classes = __WEBPACK_IMPORTED_MODULE_2_classnames___default()('ui', color, size, __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_4__lib__[\"a\" /* useKeyOnly */])(basic, 'basic'), __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_4__lib__[\"a\" /* useKeyOnly */])(circular, 'circular'), __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_4__lib__[\"a\" /* useKeyOnly */])(clearing, 'clearing'), __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_4__lib__[\"a\" /* useKeyOnly */])(compact, 'compact'), __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_4__lib__[\"a\" /* useKeyOnly */])(disabled, 'disabled'), __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_4__lib__[\"a\" /* useKeyOnly */])(inverted, 'inverted'), __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_4__lib__[\"a\" /* useKeyOnly */])(loading, 'loading'), __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_4__lib__[\"a\" /* useKeyOnly */])(piled, 'piled'), __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_4__lib__[\"a\" /* useKeyOnly */])(raised, 'raised'), __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_4__lib__[\"a\" /* useKeyOnly */])(secondary, 'secondary'), __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_4__lib__[\"a\" /* useKeyOnly */])(stacked, 'stacked'), __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_4__lib__[\"a\" /* useKeyOnly */])(tertiary, 'tertiary'), __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_4__lib__[\"a\" /* useKeyOnly */])(vertical, 'vertical'), __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_4__lib__[\"j\" /* useKeyOrValueAndKey */])(attached, 'attached'), __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_4__lib__[\"j\" /* useKeyOrValueAndKey */])(padded, 'padded'), __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_4__lib__[\"u\" /* useTextAlignProp */])(textAlign), __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_4__lib__[\"h\" /* useValueAndKey */])(floated, 'floated'), 'segment', className);\n var rest = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_4__lib__[\"b\" /* getUnhandledProps */])(Segment, props);\n var ElementType = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_4__lib__[\"c\" /* getElementType */])(Segment, props);\n\n return __WEBPACK_IMPORTED_MODULE_3_react___default.a.createElement(\n ElementType,\n __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends___default()({}, rest, { className: classes }),\n children\n );\n}", "function Segment(props) {\n var attached = props.attached,\n basic = props.basic,\n children = props.children,\n circular = props.circular,\n className = props.className,\n clearing = props.clearing,\n color = props.color,\n compact = props.compact,\n content = props.content,\n disabled = props.disabled,\n floated = props.floated,\n inverted = props.inverted,\n loading = props.loading,\n padded = props.padded,\n piled = props.piled,\n raised = props.raised,\n secondary = props.secondary,\n size = props.size,\n stacked = props.stacked,\n tertiary = props.tertiary,\n textAlign = props.textAlign,\n vertical = props.vertical;\n\n\n var classes = __WEBPACK_IMPORTED_MODULE_2_classnames___default()('ui', color, size, __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_5__lib__[\"a\" /* useKeyOnly */])(basic, 'basic'), __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_5__lib__[\"a\" /* useKeyOnly */])(circular, 'circular'), __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_5__lib__[\"a\" /* useKeyOnly */])(clearing, 'clearing'), __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_5__lib__[\"a\" /* useKeyOnly */])(compact, 'compact'), __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_5__lib__[\"a\" /* useKeyOnly */])(disabled, 'disabled'), __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_5__lib__[\"a\" /* useKeyOnly */])(inverted, 'inverted'), __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_5__lib__[\"a\" /* useKeyOnly */])(loading, 'loading'), __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_5__lib__[\"a\" /* useKeyOnly */])(piled, 'piled'), __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_5__lib__[\"a\" /* useKeyOnly */])(raised, 'raised'), __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_5__lib__[\"a\" /* useKeyOnly */])(secondary, 'secondary'), __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_5__lib__[\"a\" /* useKeyOnly */])(stacked, 'stacked'), __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_5__lib__[\"a\" /* useKeyOnly */])(tertiary, 'tertiary'), __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_5__lib__[\"a\" /* useKeyOnly */])(vertical, 'vertical'), __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_5__lib__[\"k\" /* useKeyOrValueAndKey */])(attached, 'attached'), __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_5__lib__[\"k\" /* useKeyOrValueAndKey */])(padded, 'padded'), __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_5__lib__[\"o\" /* useTextAlignProp */])(textAlign), __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_5__lib__[\"j\" /* useValueAndKey */])(floated, 'floated'), 'segment', className);\n var rest = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_5__lib__[\"b\" /* getUnhandledProps */])(Segment, props);\n var ElementType = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_5__lib__[\"c\" /* getElementType */])(Segment, props);\n\n return __WEBPACK_IMPORTED_MODULE_4_react___default.a.createElement(\n ElementType,\n __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends___default()({}, rest, { className: classes }),\n __WEBPACK_IMPORTED_MODULE_5__lib__[\"d\" /* childrenUtils */].isNil(children) ? content : children\n );\n}", "function SegmentGroup(props) {\n\t var children = props.children,\n\t className = props.className,\n\t compact = props.compact,\n\t horizontal = props.horizontal,\n\t piled = props.piled,\n\t raised = props.raised,\n\t size = props.size,\n\t stacked = props.stacked;\n\n\t var classes = (0, _classnames2.default)('ui', size, (0, _lib.useKeyOnly)(horizontal, 'horizontal'), (0, _lib.useKeyOnly)(compact, 'compact'), (0, _lib.useKeyOnly)(piled, 'piled'), (0, _lib.useKeyOnly)(raised, 'raised'), (0, _lib.useKeyOnly)(stacked, 'stacked'), className, 'segments');\n\t var rest = (0, _lib.getUnhandledProps)(SegmentGroup, props);\n\t var ElementType = (0, _lib.getElementType)(SegmentGroup, props);\n\n\t return _react2.default.createElement(\n\t ElementType,\n\t _extends({}, rest, { className: classes }),\n\t children\n\t );\n\t}", "function TaggedSegment() {\n _classCallCheck(this, TaggedSegment);\n\n TaggedSegment.initialize(this);\n }", "render() {\n\t\tlet width = this.details.width - 30;\n\t\tlet top = this.details.top;\n\t\tlet height = this.details.height;\n\t\tlet left = this.details.left;\n\t\tlet elem = document.createElement('div');\n\t\telem.setAttribute('class','event');\n\t\telem.innerHTML = `Event ID: ${this.details.id}`;\n\t\telem.style.top = `${top}px`;\n\t\telem.style.width = `${width}px`;\n\t\telem.style.height = `${height}px`;\n\t\telem.style.left = `${left}px`;\n\t\tmainElem.appendChild(elem);\n\t}", "function SegmentGroup(props) {\n var children = props.children,\n className = props.className,\n compact = props.compact,\n content = props.content,\n horizontal = props.horizontal,\n piled = props.piled,\n raised = props.raised,\n size = props.size,\n stacked = props.stacked;\n\n\n var classes = __WEBPACK_IMPORTED_MODULE_2_classnames___default()('ui', size, Object(__WEBPACK_IMPORTED_MODULE_5__lib__[\"B\" /* useKeyOnly */])(compact, 'compact'), Object(__WEBPACK_IMPORTED_MODULE_5__lib__[\"B\" /* useKeyOnly */])(horizontal, 'horizontal'), Object(__WEBPACK_IMPORTED_MODULE_5__lib__[\"B\" /* useKeyOnly */])(piled, 'piled'), Object(__WEBPACK_IMPORTED_MODULE_5__lib__[\"B\" /* useKeyOnly */])(raised, 'raised'), Object(__WEBPACK_IMPORTED_MODULE_5__lib__[\"B\" /* useKeyOnly */])(stacked, 'stacked'), 'segments', className);\n var rest = Object(__WEBPACK_IMPORTED_MODULE_5__lib__[\"r\" /* getUnhandledProps */])(SegmentGroup, props);\n var ElementType = Object(__WEBPACK_IMPORTED_MODULE_5__lib__[\"q\" /* getElementType */])(SegmentGroup, props);\n\n return __WEBPACK_IMPORTED_MODULE_4_react___default.a.createElement(\n ElementType,\n __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends___default()({}, rest, { className: classes }),\n __WEBPACK_IMPORTED_MODULE_5__lib__[\"d\" /* childrenUtils */].isNil(children) ? content : children\n );\n}", "function SegmentGroup(props) {\n var children = props.children,\n className = props.className,\n compact = props.compact,\n content = props.content,\n horizontal = props.horizontal,\n piled = props.piled,\n raised = props.raised,\n size = props.size,\n stacked = props.stacked;\n\n\n var classes = __WEBPACK_IMPORTED_MODULE_2_classnames___default()('ui', size, Object(__WEBPACK_IMPORTED_MODULE_5__lib__[\"B\" /* useKeyOnly */])(compact, 'compact'), Object(__WEBPACK_IMPORTED_MODULE_5__lib__[\"B\" /* useKeyOnly */])(horizontal, 'horizontal'), Object(__WEBPACK_IMPORTED_MODULE_5__lib__[\"B\" /* useKeyOnly */])(piled, 'piled'), Object(__WEBPACK_IMPORTED_MODULE_5__lib__[\"B\" /* useKeyOnly */])(raised, 'raised'), Object(__WEBPACK_IMPORTED_MODULE_5__lib__[\"B\" /* useKeyOnly */])(stacked, 'stacked'), 'segments', className);\n var rest = Object(__WEBPACK_IMPORTED_MODULE_5__lib__[\"r\" /* getUnhandledProps */])(SegmentGroup, props);\n var ElementType = Object(__WEBPACK_IMPORTED_MODULE_5__lib__[\"q\" /* getElementType */])(SegmentGroup, props);\n\n return __WEBPACK_IMPORTED_MODULE_4_react___default.a.createElement(\n ElementType,\n __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends___default()({}, rest, { className: classes }),\n __WEBPACK_IMPORTED_MODULE_5__lib__[\"d\" /* childrenUtils */].isNil(children) ? content : children\n );\n}", "function _renderLine(input, sb) {\r\n var fontIsMonospace = input.fontIsMonospace;\r\n var canUseHalfwidthRightwardsArrow = input.canUseHalfwidthRightwardsArrow;\r\n var containsForeignElements = input.containsForeignElements;\r\n var lineContent = input.lineContent;\r\n var len = input.len;\r\n var isOverflowing = input.isOverflowing;\r\n var parts = input.parts;\r\n var fauxIndentLength = input.fauxIndentLength;\r\n var tabSize = input.tabSize;\r\n var startVisibleColumn = input.startVisibleColumn;\r\n var containsRTL = input.containsRTL;\r\n var spaceWidth = input.spaceWidth;\r\n var middotWidth = input.middotWidth;\r\n var renderWhitespace = input.renderWhitespace;\r\n var renderControlCharacters = input.renderControlCharacters;\r\n // use U+2E31 - WORD SEPARATOR MIDDLE DOT or U+00B7 - MIDDLE DOT\r\n var spaceRenderWhitespaceCharacter = (middotWidth > spaceWidth ? 0x2E31 : 0xB7);\r\n var characterMapping = new CharacterMapping(len + 1, parts.length);\r\n var charIndex = 0;\r\n var visibleColumn = startVisibleColumn;\r\n var charOffsetInPart = 0;\r\n var prevPartContentCnt = 0;\r\n var partAbsoluteOffset = 0;\r\n sb.appendASCIIString('<span>');\r\n for (var partIndex = 0, tokensLen = parts.length; partIndex < tokensLen; partIndex++) {\r\n partAbsoluteOffset += prevPartContentCnt;\r\n var part = parts[partIndex];\r\n var partEndIndex = part.endIndex;\r\n var partType = part.type;\r\n var partRendersWhitespace = (renderWhitespace !== 0 /* None */ && (partType.indexOf('vs-whitespace') >= 0));\r\n charOffsetInPart = 0;\r\n sb.appendASCIIString('<span class=\"');\r\n sb.appendASCIIString(partType);\r\n sb.appendASCII(34 /* DoubleQuote */);\r\n if (partRendersWhitespace) {\r\n var partContentCnt = 0;\r\n {\r\n var _charIndex = charIndex;\r\n var _visibleColumn = visibleColumn;\r\n for (; _charIndex < partEndIndex; _charIndex++) {\r\n var charCode = lineContent.charCodeAt(_charIndex);\r\n var charWidth = (charCode === 9 /* Tab */ ? (tabSize - (_visibleColumn % tabSize)) : 1) | 0;\r\n partContentCnt += charWidth;\r\n if (_charIndex >= fauxIndentLength) {\r\n _visibleColumn += charWidth;\r\n }\r\n }\r\n }\r\n if (!fontIsMonospace) {\r\n var partIsOnlyWhitespace = (partType === 'vs-whitespace');\r\n if (partIsOnlyWhitespace || !containsForeignElements) {\r\n sb.appendASCIIString(' style=\"display:inline-block;width:');\r\n sb.appendASCIIString(String(spaceWidth * partContentCnt));\r\n sb.appendASCIIString('px\"');\r\n }\r\n }\r\n sb.appendASCII(62 /* GreaterThan */);\r\n for (; charIndex < partEndIndex; charIndex++) {\r\n characterMapping.setPartData(charIndex, partIndex, charOffsetInPart, partAbsoluteOffset);\r\n var charCode = lineContent.charCodeAt(charIndex);\r\n var charWidth = void 0;\r\n if (charCode === 9 /* Tab */) {\r\n charWidth = (tabSize - (visibleColumn % tabSize)) | 0;\r\n if (!canUseHalfwidthRightwardsArrow || charWidth > 1) {\r\n sb.write1(0x2192); // RIGHTWARDS ARROW\r\n }\r\n else {\r\n sb.write1(0xFFEB); // HALFWIDTH RIGHTWARDS ARROW\r\n }\r\n for (var space = 2; space <= charWidth; space++) {\r\n sb.write1(0xA0); // &nbsp;\r\n }\r\n }\r\n else { // must be CharCode.Space\r\n charWidth = 1;\r\n sb.write1(spaceRenderWhitespaceCharacter); // &middot; or word separator middle dot\r\n }\r\n charOffsetInPart += charWidth;\r\n if (charIndex >= fauxIndentLength) {\r\n visibleColumn += charWidth;\r\n }\r\n }\r\n prevPartContentCnt = partContentCnt;\r\n }\r\n else {\r\n var partContentCnt = 0;\r\n if (containsRTL) {\r\n sb.appendASCIIString(' dir=\"ltr\"');\r\n }\r\n sb.appendASCII(62 /* GreaterThan */);\r\n for (; charIndex < partEndIndex; charIndex++) {\r\n characterMapping.setPartData(charIndex, partIndex, charOffsetInPart, partAbsoluteOffset);\r\n var charCode = lineContent.charCodeAt(charIndex);\r\n var producedCharacters = 1;\r\n var charWidth = 1;\r\n switch (charCode) {\r\n case 9 /* Tab */:\r\n producedCharacters = (tabSize - (visibleColumn % tabSize));\r\n charWidth = producedCharacters;\r\n for (var space = 1; space <= producedCharacters; space++) {\r\n sb.write1(0xA0); // &nbsp;\r\n }\r\n break;\r\n case 32 /* Space */:\r\n sb.write1(0xA0); // &nbsp;\r\n break;\r\n case 60 /* LessThan */:\r\n sb.appendASCIIString('&lt;');\r\n break;\r\n case 62 /* GreaterThan */:\r\n sb.appendASCIIString('&gt;');\r\n break;\r\n case 38 /* Ampersand */:\r\n sb.appendASCIIString('&amp;');\r\n break;\r\n case 0 /* Null */:\r\n sb.appendASCIIString('&#00;');\r\n break;\r\n case 65279 /* UTF8_BOM */:\r\n case 8232 /* LINE_SEPARATOR_2028 */:\r\n sb.write1(0xFFFD);\r\n break;\r\n default:\r\n if (strings.isFullWidthCharacter(charCode)) {\r\n charWidth++;\r\n }\r\n if (renderControlCharacters && charCode < 32) {\r\n sb.write1(9216 + charCode);\r\n }\r\n else {\r\n sb.write1(charCode);\r\n }\r\n }\r\n charOffsetInPart += producedCharacters;\r\n partContentCnt += producedCharacters;\r\n if (charIndex >= fauxIndentLength) {\r\n visibleColumn += charWidth;\r\n }\r\n }\r\n prevPartContentCnt = partContentCnt;\r\n }\r\n sb.appendASCIIString('</span>');\r\n }\r\n // When getting client rects for the last character, we will position the\r\n // text range at the end of the span, insteaf of at the beginning of next span\r\n characterMapping.setPartData(len, parts.length - 1, charOffsetInPart, partAbsoluteOffset);\r\n if (isOverflowing) {\r\n sb.appendASCIIString('<span>&hellip;</span>');\r\n }\r\n sb.appendASCIIString('</span>');\r\n return new RenderLineOutput(characterMapping, containsRTL, containsForeignElements);\r\n}", "function combineSegments() {\n\t\tvar result = '';\n\t\ttotalSegments = segments.length;\n\t\tfor (var i = 0; i < segments.length; i++) {\n\t\t\tif (segments[i].isEmpty()) {\n\t\t\t\ttotalSegments--;\n\t\t\t\tcontinue;\n\t\t\t\t\n\t\t\t}\n\t\t\tresult += segments[i].asText();\n\t\t}\n\t\treturn result;\n\t}", "function SegmentGroup(props) {\n var children = props.children,\n className = props.className,\n compact = props.compact,\n horizontal = props.horizontal,\n piled = props.piled,\n raised = props.raised,\n size = props.size,\n stacked = props.stacked;\n\n\n var classes = __WEBPACK_IMPORTED_MODULE_2_classnames___default()('ui', size, Object(__WEBPACK_IMPORTED_MODULE_5__lib__[\"z\" /* useKeyOnly */])(compact, 'compact'), Object(__WEBPACK_IMPORTED_MODULE_5__lib__[\"z\" /* useKeyOnly */])(horizontal, 'horizontal'), Object(__WEBPACK_IMPORTED_MODULE_5__lib__[\"z\" /* useKeyOnly */])(piled, 'piled'), Object(__WEBPACK_IMPORTED_MODULE_5__lib__[\"z\" /* useKeyOnly */])(raised, 'raised'), Object(__WEBPACK_IMPORTED_MODULE_5__lib__[\"z\" /* useKeyOnly */])(stacked, 'stacked'), 'segments', className);\n var rest = Object(__WEBPACK_IMPORTED_MODULE_5__lib__[\"q\" /* getUnhandledProps */])(SegmentGroup, props);\n var ElementType = Object(__WEBPACK_IMPORTED_MODULE_5__lib__[\"p\" /* getElementType */])(SegmentGroup, props);\n\n return __WEBPACK_IMPORTED_MODULE_4_react___default.a.createElement(\n ElementType,\n __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends___default()({}, rest, { className: classes }),\n children\n );\n}", "formatSegments (isProtein) {\n\t\tvar variants = isProtein ? this.attributes.variantDataProtein : this.attributes.variantDataDna;\n\t\tvar sequences = isProtein ? this.attributes.alignedProteinSequences : this.attributes.alignedDnaSequences;\n\t\t// make sure they're sorted by start\n\t\tvariants = _.sortBy(variants, d => {\n\t\t\treturn d.start;\n\t\t});\n\n\t\t// merge segments\n\t\tvar mergedSegments = _.reduce(variants, (memo, d) => {\n\t\t\treturn this._mergeOrAddSegment(memo, d);\n\t\t}, []);\n\n\t\t// add in needed summarized segments\n\t\t// first one\n\t\tif (mergedSegments[0].start > 1) {\n\t\t\tmergedSegments.push({\n\t\t\t\tvisible: false,\n\t\t\t\tstart: 1,\n\t\t\t\tend: mergedSegments[0].start\n\t\t\t});\n\t\t}\n\t\t// loop through and connect visible segments with summarized segments\n\t\tvar _visibleSegments = _.where(mergedSegments, { visible: true });\n\t\t_visibleSegments.forEach( (d, i) => {\n\t\t\t// must not be last or visible\n\t\t\tif (d.visible && i < _visibleSegments.length - 1) {\n\t\t\t\tmergedSegments.push({\n\t\t\t\t\tvisible: false,\n\t\t\t\t\tstart: d.end,\n\t\t\t\t\tend: _visibleSegments[i + 1].start\n\t\t\t\t});\n\t\t\t}\n\t\t});\n\t\t\n\t\tvar _last = _.max(mergedSegments, d => { return d.end; });\n\t\tvar _maxLength = _.max(sequences, d => { return d.sequence.length; }).sequence.length;\n\t\t// add last if last segment is visible and not at the end\n\t\tif (_last.end < _maxLength) {\n\t\t\tmergedSegments.push({\n\t\t\t\tstart: _last.end,\n\t\t\t\tend: _maxLength,\n\t\t\t\tvisible: false\n\t\t\t});\n\t\t// add last if visible\n\t\t} else {\n\t\t\tmergedSegments.push({\n\t\t\t\tstart: _last.end,\n\t\t\t\tend: _maxLength + 1,\n\t\t\t\tvisible: true\n\t\t\t});\n\t\t}\n\t\t\n\t\t// change starts and ends to domains\n\t\tmergedSegments = _.map(mergedSegments, d => {\n\t\t\td.domain = [d.start, d.end];\n\t\t\treturn d;\n\t\t});\n\t\t// sort\n\t\tmergedSegments = _.sortBy(mergedSegments, d => {\n\t\t\treturn d.start;\n\t\t});\n\t\treturn mergedSegments;\n\t}", "function SegmentGroup(props) {\n var children = props.children,\n className = props.className,\n compact = props.compact,\n content = props.content,\n horizontal = props.horizontal,\n piled = props.piled,\n raised = props.raised,\n size = props.size,\n stacked = props.stacked;\n var classes = (0, _classnames[\"default\"])('ui', size, (0, _lib.useKeyOnly)(compact, 'compact'), (0, _lib.useKeyOnly)(horizontal, 'horizontal'), (0, _lib.useKeyOnly)(piled, 'piled'), (0, _lib.useKeyOnly)(raised, 'raised'), (0, _lib.useKeyOnly)(stacked, 'stacked'), 'segments', className);\n var rest = (0, _lib.getUnhandledProps)(SegmentGroup, props);\n var ElementType = (0, _lib.getElementType)(SegmentGroup, props);\n return _react[\"default\"].createElement(ElementType, (0, _extends2[\"default\"])({}, rest, {\n className: classes\n }), _lib.childrenUtils.isNil(children) ? content : children);\n}", "function SegmentGroup(props) {\n var children = props.children,\n className = props.className,\n compact = props.compact,\n content = props.content,\n horizontal = props.horizontal,\n piled = props.piled,\n raised = props.raised,\n size = props.size,\n stacked = props.stacked;\n var classes = __WEBPACK_IMPORTED_MODULE_2_classnames___default()('ui', size, Object(__WEBPACK_IMPORTED_MODULE_5__lib__[\"A\" /* useKeyOnly */])(compact, 'compact'), Object(__WEBPACK_IMPORTED_MODULE_5__lib__[\"A\" /* useKeyOnly */])(horizontal, 'horizontal'), Object(__WEBPACK_IMPORTED_MODULE_5__lib__[\"A\" /* useKeyOnly */])(piled, 'piled'), Object(__WEBPACK_IMPORTED_MODULE_5__lib__[\"A\" /* useKeyOnly */])(raised, 'raised'), Object(__WEBPACK_IMPORTED_MODULE_5__lib__[\"A\" /* useKeyOnly */])(stacked, 'stacked'), 'segments', className);\n var rest = Object(__WEBPACK_IMPORTED_MODULE_5__lib__[\"r\" /* getUnhandledProps */])(SegmentGroup, props);\n var ElementType = Object(__WEBPACK_IMPORTED_MODULE_5__lib__[\"q\" /* getElementType */])(SegmentGroup, props);\n return __WEBPACK_IMPORTED_MODULE_4_react___default.a.createElement(ElementType, __WEBPACK_IMPORTED_MODULE_0__babel_runtime_helpers_extends___default()({}, rest, {\n className: classes\n }), __WEBPACK_IMPORTED_MODULE_5__lib__[\"c\" /* childrenUtils */].isNil(children) ? content : children);\n}", "function SegmentGroup(props) {\n var children = props.children,\n className = props.className,\n compact = props.compact,\n content = props.content,\n horizontal = props.horizontal,\n piled = props.piled,\n raised = props.raised,\n size = props.size,\n stacked = props.stacked;\n var classes = classnames__WEBPACK_IMPORTED_MODULE_2___default()('ui', size, Object(_lib__WEBPACK_IMPORTED_MODULE_5__[\"useKeyOnly\"])(compact, 'compact'), Object(_lib__WEBPACK_IMPORTED_MODULE_5__[\"useKeyOnly\"])(horizontal, 'horizontal'), Object(_lib__WEBPACK_IMPORTED_MODULE_5__[\"useKeyOnly\"])(piled, 'piled'), Object(_lib__WEBPACK_IMPORTED_MODULE_5__[\"useKeyOnly\"])(raised, 'raised'), Object(_lib__WEBPACK_IMPORTED_MODULE_5__[\"useKeyOnly\"])(stacked, 'stacked'), 'segments', className);\n var rest = Object(_lib__WEBPACK_IMPORTED_MODULE_5__[\"getUnhandledProps\"])(SegmentGroup, props);\n var ElementType = Object(_lib__WEBPACK_IMPORTED_MODULE_5__[\"getElementType\"])(SegmentGroup, props);\n return react__WEBPACK_IMPORTED_MODULE_4___default.a.createElement(ElementType, _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0___default()({}, rest, {\n className: classes\n }), _lib__WEBPACK_IMPORTED_MODULE_5__[\"childrenUtils\"].isNil(children) ? content : children);\n}", "function SegmentGroup(props) {\n var children = props.children,\n className = props.className,\n compact = props.compact,\n content = props.content,\n horizontal = props.horizontal,\n piled = props.piled,\n raised = props.raised,\n size = props.size,\n stacked = props.stacked;\n var classes = classnames__WEBPACK_IMPORTED_MODULE_2___default()('ui', size, Object(_lib__WEBPACK_IMPORTED_MODULE_5__[\"useKeyOnly\"])(compact, 'compact'), Object(_lib__WEBPACK_IMPORTED_MODULE_5__[\"useKeyOnly\"])(horizontal, 'horizontal'), Object(_lib__WEBPACK_IMPORTED_MODULE_5__[\"useKeyOnly\"])(piled, 'piled'), Object(_lib__WEBPACK_IMPORTED_MODULE_5__[\"useKeyOnly\"])(raised, 'raised'), Object(_lib__WEBPACK_IMPORTED_MODULE_5__[\"useKeyOnly\"])(stacked, 'stacked'), 'segments', className);\n var rest = Object(_lib__WEBPACK_IMPORTED_MODULE_5__[\"getUnhandledProps\"])(SegmentGroup, props);\n var ElementType = Object(_lib__WEBPACK_IMPORTED_MODULE_5__[\"getElementType\"])(SegmentGroup, props);\n return react__WEBPACK_IMPORTED_MODULE_4___default.a.createElement(ElementType, _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0___default()({}, rest, {\n className: classes\n }), _lib__WEBPACK_IMPORTED_MODULE_5__[\"childrenUtils\"].isNil(children) ? content : children);\n}", "function SegmentGroup(props) {\n var children = props.children,\n className = props.className,\n compact = props.compact,\n content = props.content,\n horizontal = props.horizontal,\n piled = props.piled,\n raised = props.raised,\n size = props.size,\n stacked = props.stacked;\n\n\n var classes = __WEBPACK_IMPORTED_MODULE_2_classnames___default()('ui', size, __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_5__lib__[\"a\" /* useKeyOnly */])(compact, 'compact'), __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_5__lib__[\"a\" /* useKeyOnly */])(horizontal, 'horizontal'), __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_5__lib__[\"a\" /* useKeyOnly */])(piled, 'piled'), __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_5__lib__[\"a\" /* useKeyOnly */])(raised, 'raised'), __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_5__lib__[\"a\" /* useKeyOnly */])(stacked, 'stacked'), 'segments', className);\n var rest = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_5__lib__[\"b\" /* getUnhandledProps */])(SegmentGroup, props);\n var ElementType = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_5__lib__[\"c\" /* getElementType */])(SegmentGroup, props);\n\n return __WEBPACK_IMPORTED_MODULE_4_react___default.a.createElement(\n ElementType,\n __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends___default()({}, rest, { className: classes }),\n __WEBPACK_IMPORTED_MODULE_5__lib__[\"d\" /* childrenUtils */].isNil(children) ? content : children\n );\n}", "function transformer(word, slicer) {\n characters = word.split('');\n var firstSegment = word.slice(0, slicer);\n var secondSegment = word.slice(slicer);\n if ((vowelChecker(characters[0]) === true) && (characters[0] !== \"y\")) {\n return \"<span id=\\\"secondSegment\\\">\" + secondSegment + \"</span>\" + \"<span id=\\\"firstSegment\\\">\" + firstSegment.toUpperCase() + \"</span>\" + \"<span id=\\\"ender\\\">\" + \"Way\" + \"</span>\";\n } else {\n return \"<span id=\\\"secondSegment\\\">\" + secondSegment + \"</span>\" + \"<span id=\\\"firstSegment\\\">\" + firstSegment.toUpperCase() + \"</span>\" + \"<span id=\\\"ender\\\">\" + \"ay\" + \"</span>\";\n }\n }", "function SegmentGroup(props) {\n var children = props.children,\n className = props.className,\n compact = props.compact,\n horizontal = props.horizontal,\n piled = props.piled,\n raised = props.raised,\n size = props.size,\n stacked = props.stacked;\n\n var classes = (0, _classnames2.default)('ui', size, (0, _lib.useKeyOnly)(compact, 'compact'), (0, _lib.useKeyOnly)(horizontal, 'horizontal'), (0, _lib.useKeyOnly)(piled, 'piled'), (0, _lib.useKeyOnly)(raised, 'raised'), (0, _lib.useKeyOnly)(stacked, 'stacked'), 'segments', className);\n var rest = (0, _lib.getUnhandledProps)(SegmentGroup, props);\n var ElementType = (0, _lib.getElementType)(SegmentGroup, props);\n\n return _react2.default.createElement(ElementType, (0, _extends3.default)({}, rest, { className: classes }), children);\n}", "function SegmentGroup(props) {\n var children = props.children,\n className = props.className,\n compact = props.compact,\n content = props.content,\n horizontal = props.horizontal,\n piled = props.piled,\n raised = props.raised,\n size = props.size,\n stacked = props.stacked;\n\n var classes = (0, _classnames2.default)('ui', size, (0, _lib.useKeyOnly)(compact, 'compact'), (0, _lib.useKeyOnly)(horizontal, 'horizontal'), (0, _lib.useKeyOnly)(piled, 'piled'), (0, _lib.useKeyOnly)(raised, 'raised'), (0, _lib.useKeyOnly)(stacked, 'stacked'), 'segments', className);\n var rest = (0, _lib.getUnhandledProps)(SegmentGroup, props);\n var ElementType = (0, _lib.getElementType)(SegmentGroup, props);\n\n return _react2.default.createElement(ElementType, (0, _extends3.default)({}, rest, { className: classes }), _lib.childrenUtils.isNil(children) ? content : children);\n}", "function SegmentGroup(props) {\n var children = props.children,\n className = props.className,\n compact = props.compact,\n horizontal = props.horizontal,\n piled = props.piled,\n raised = props.raised,\n size = props.size,\n stacked = props.stacked;\n\n\n var classes = __WEBPACK_IMPORTED_MODULE_2_classnames___default()('ui', size, __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_4__lib__[\"a\" /* useKeyOnly */])(compact, 'compact'), __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_4__lib__[\"a\" /* useKeyOnly */])(horizontal, 'horizontal'), __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_4__lib__[\"a\" /* useKeyOnly */])(piled, 'piled'), __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_4__lib__[\"a\" /* useKeyOnly */])(raised, 'raised'), __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_4__lib__[\"a\" /* useKeyOnly */])(stacked, 'stacked'), 'segments', className);\n var rest = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_4__lib__[\"b\" /* getUnhandledProps */])(SegmentGroup, props);\n var ElementType = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_4__lib__[\"c\" /* getElementType */])(SegmentGroup, props);\n\n return __WEBPACK_IMPORTED_MODULE_3_react___default.a.createElement(\n ElementType,\n __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends___default()({}, rest, { className: classes }),\n children\n );\n}", "function drawSegment(ctx, points, start, segLen, allLen, dir, smooth, smoothMonotone, connectNulls) {\n\t var prevX;\n\t var prevY;\n\t var cpx0;\n\t var cpy0;\n\t var cpx1;\n\t var cpy1;\n\t var idx = start;\n\t var k = 0;\n\t\n\t for (; k < segLen; k++) {\n\t var x = points[idx * 2];\n\t var y = points[idx * 2 + 1];\n\t\n\t if (idx >= allLen || idx < 0) {\n\t break;\n\t }\n\t\n\t if (isPointNull(x, y)) {\n\t if (connectNulls) {\n\t idx += dir;\n\t continue;\n\t }\n\t\n\t break;\n\t }\n\t\n\t if (idx === start) {\n\t ctx[dir > 0 ? 'moveTo' : 'lineTo'](x, y);\n\t cpx0 = x;\n\t cpy0 = y;\n\t } else {\n\t var dx = x - prevX;\n\t var dy = y - prevY; // Ignore tiny segment.\n\t\n\t if (dx * dx + dy * dy < 0.5) {\n\t idx += dir;\n\t continue;\n\t }\n\t\n\t if (smooth > 0) {\n\t var nextIdx = idx + dir;\n\t var nextX = points[nextIdx * 2];\n\t var nextY = points[nextIdx * 2 + 1];\n\t var tmpK = k + 1;\n\t\n\t if (connectNulls) {\n\t // Find next point not null\n\t while (isPointNull(nextX, nextY) && tmpK < segLen) {\n\t tmpK++;\n\t nextIdx += dir;\n\t nextX = points[nextIdx * 2];\n\t nextY = points[nextIdx * 2 + 1];\n\t }\n\t }\n\t\n\t var ratioNextSeg = 0.5;\n\t var vx = 0;\n\t var vy = 0;\n\t var nextCpx0 = void 0;\n\t var nextCpy0 = void 0; // Is last point\n\t\n\t if (tmpK >= segLen || isPointNull(nextX, nextY)) {\n\t cpx1 = x;\n\t cpy1 = y;\n\t } else {\n\t vx = nextX - prevX;\n\t vy = nextY - prevY;\n\t var dx0 = x - prevX;\n\t var dx1 = nextX - x;\n\t var dy0 = y - prevY;\n\t var dy1 = nextY - y;\n\t var lenPrevSeg = void 0;\n\t var lenNextSeg = void 0;\n\t\n\t if (smoothMonotone === 'x') {\n\t lenPrevSeg = Math.abs(dx0);\n\t lenNextSeg = Math.abs(dx1);\n\t cpx1 = x - lenPrevSeg * smooth;\n\t cpy1 = y;\n\t nextCpx0 = x + lenPrevSeg * smooth;\n\t nextCpy0 = y;\n\t } else if (smoothMonotone === 'y') {\n\t lenPrevSeg = Math.abs(dy0);\n\t lenNextSeg = Math.abs(dy1);\n\t cpx1 = x;\n\t cpy1 = y - lenPrevSeg * smooth;\n\t nextCpx0 = x;\n\t nextCpy0 = y + lenPrevSeg * smooth;\n\t } else {\n\t lenPrevSeg = Math.sqrt(dx0 * dx0 + dy0 * dy0);\n\t lenNextSeg = Math.sqrt(dx1 * dx1 + dy1 * dy1); // Use ratio of seg length\n\t\n\t ratioNextSeg = lenNextSeg / (lenNextSeg + lenPrevSeg);\n\t cpx1 = x - vx * smooth * (1 - ratioNextSeg);\n\t cpy1 = y - vy * smooth * (1 - ratioNextSeg); // cp0 of next segment\n\t\n\t nextCpx0 = x + vx * smooth * ratioNextSeg;\n\t nextCpy0 = y + vy * smooth * ratioNextSeg; // Smooth constraint between point and next point.\n\t // Avoid exceeding extreme after smoothing.\n\t\n\t nextCpx0 = mathMin$5(nextCpx0, mathMax$5(nextX, x));\n\t nextCpy0 = mathMin$5(nextCpy0, mathMax$5(nextY, y));\n\t nextCpx0 = mathMax$5(nextCpx0, mathMin$5(nextX, x));\n\t nextCpy0 = mathMax$5(nextCpy0, mathMin$5(nextY, y)); // Reclaculate cp1 based on the adjusted cp0 of next seg.\n\t\n\t vx = nextCpx0 - x;\n\t vy = nextCpy0 - y;\n\t cpx1 = x - vx * lenPrevSeg / lenNextSeg;\n\t cpy1 = y - vy * lenPrevSeg / lenNextSeg; // Smooth constraint between point and prev point.\n\t // Avoid exceeding extreme after smoothing.\n\t\n\t cpx1 = mathMin$5(cpx1, mathMax$5(prevX, x));\n\t cpy1 = mathMin$5(cpy1, mathMax$5(prevY, y));\n\t cpx1 = mathMax$5(cpx1, mathMin$5(prevX, x));\n\t cpy1 = mathMax$5(cpy1, mathMin$5(prevY, y)); // Adjust next cp0 again.\n\t\n\t vx = x - cpx1;\n\t vy = y - cpy1;\n\t nextCpx0 = x + vx * lenNextSeg / lenPrevSeg;\n\t nextCpy0 = y + vy * lenNextSeg / lenPrevSeg;\n\t }\n\t }\n\t\n\t ctx.bezierCurveTo(cpx0, cpy0, cpx1, cpy1, x, y);\n\t cpx0 = nextCpx0;\n\t cpy0 = nextCpy0;\n\t } else {\n\t ctx.lineTo(x, y);\n\t }\n\t }\n\t\n\t prevX = x;\n\t prevY = y;\n\t idx += dir;\n\t }\n\t\n\t return k;\n\t }", "function renderEvents() {\n var totalPercent = 100,\n currentEvent,\n curCol,\n width,\n height,\n leftOffset,\n eventText,\n i,\n j;\n \n // empty container before adding new events\n $el.empty();\n \n // go through all columns\n for (i=0; i<columns.length; i++) {\n \n // go through all events in single column\n for (j=0; j<columns[i].length; j++) {\n currentEvent = columns[i][j];\n \n width = totalPercent / (columnWidths[currentEvent.groupIndex] + 1);\n height = currentEvent.end - currentEvent.start;\n leftOffset = i * width;\n \n // If container is too short, only display event title\n if (height < 45) {\n eventText = \"<h2>Sample Event</h2>\";\n }\n // Otherwise, display event title & location\n else {\n eventText = \"<h2>Sample Event</h2><h3>Sample Location</h3>\";\n }\n \n $el.append('<div class=\"calendarSlot\" style=\"width: ' + width + '%; height:'+ height +'px; top:' + currentEvent.start + 'px; left: ' + leftOffset + '%\">' + eventText + '</div>');\n }\n }\n }", "function SegmentGroup(props) {\n var children = props.children,\n className = props.className,\n compact = props.compact,\n content = props.content,\n horizontal = props.horizontal,\n piled = props.piled,\n raised = props.raised,\n size = props.size,\n stacked = props.stacked;\n var classes = Object(clsx__WEBPACK_IMPORTED_MODULE_2__[\"default\"])('ui', size, Object(_lib__WEBPACK_IMPORTED_MODULE_5__[\"useKeyOnly\"])(compact, 'compact'), Object(_lib__WEBPACK_IMPORTED_MODULE_5__[\"useKeyOnly\"])(horizontal, 'horizontal'), Object(_lib__WEBPACK_IMPORTED_MODULE_5__[\"useKeyOnly\"])(piled, 'piled'), Object(_lib__WEBPACK_IMPORTED_MODULE_5__[\"useKeyOnly\"])(raised, 'raised'), Object(_lib__WEBPACK_IMPORTED_MODULE_5__[\"useKeyOnly\"])(stacked, 'stacked'), 'segments', className);\n var rest = Object(_lib__WEBPACK_IMPORTED_MODULE_5__[\"getUnhandledProps\"])(SegmentGroup, props);\n var ElementType = Object(_lib__WEBPACK_IMPORTED_MODULE_5__[\"getElementType\"])(SegmentGroup, props);\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_4___default.a.createElement(ElementType, Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({}, rest, {\n className: classes\n }), _lib__WEBPACK_IMPORTED_MODULE_5__[\"childrenUtils\"].isNil(children) ? content : children);\n}", "function Segment(t,e,n){this.path=t,this.length=t.getTotalLength(),this.path.style.strokeDashoffset=2*this.length,this.begin=e?this.valueOf(e):0,this.end=n?this.valueOf(n):this.length,this.timer=null,this.draw(this.begin,this.end)}", "function createSegmentTotals(title, segmentTotals, nextyearSgmtTotals) {\n\n const totalTr = $('<tr>');\n // totalTr.data('totals', segmentTotals);\n totalTr.append('<td><h4><b>' + title + '</b></h4></td>');\n totalTr.append('<td>' + '</td>');\n totalTr.append('<td>' + '</td>');\n totalTr.append('<td><h4><b>$' + segmentTotals + '</b></h4></td>');\n totalTr.append('<td>' + '</td>');\n totalTr.append('<td>' + '</td>');\n totalTr.append('<td>' + '</td>');\n totalTr.append('<td>' + '</td>');\n totalTr.append('<td>' + '</td>');\n totalTr.append('<td><h4><b>$' + nextyearSgmtTotals + '</b></h4></td>');\n return totalTr;\n }", "function Segment() {\n _classCallCheck(this, Segment);\n\n Segment.initialize(this);\n }", "function buildSegments(events) {\n\t\tvar segments = [];\n\t\tfor (var i=0; i<events.length; i++) {\n\t\t\tvar eventSegments = buildSegmentsForEvent(events[i]);\n\t\t\tsegments.push.apply(segments, eventSegments); // append an array to an array\n\t\t}\n\t\treturn segments;\n\t}", "function buildSegments(events) {\n\t\tvar segments = [];\n\t\tfor (var i=0; i<events.length; i++) {\n\t\t\tvar eventSegments = buildSegmentsForEvent(events[i]);\n\t\t\tsegments.push.apply(segments, eventSegments); // append an array to an array\n\t\t}\n\t\treturn segments;\n\t}", "function buildSegments(events) {\n\t\tvar segments = [];\n\t\tfor (var i=0; i<events.length; i++) {\n\t\t\tvar eventSegments = buildSegmentsForEvent(events[i]);\n\t\t\tsegments.push.apply(segments, eventSegments); // append an array to an array\n\t\t}\n\t\treturn segments;\n\t}" ]
[ "0.7770069", "0.7770069", "0.7717502", "0.77172166", "0.68673795", "0.68673795", "0.68673795", "0.68673795", "0.68673795", "0.5870832", "0.5781146", "0.5781146", "0.5781146", "0.5755761", "0.5755761", "0.5755761", "0.55722404", "0.5571858", "0.5562559", "0.5562559", "0.55335265", "0.54799885", "0.54381925", "0.5401371", "0.5401371", "0.5401371", "0.5401371", "0.5401371", "0.53854996", "0.53854996", "0.5380101", "0.53614366", "0.53095317", "0.5285267", "0.5165576", "0.5165576", "0.5165576", "0.5114753", "0.51072997", "0.51072997", "0.5059237", "0.5029236", "0.5007542", "0.49640828", "0.4959062", "0.49578422", "0.49578422", "0.49578422", "0.49578422", "0.49578422", "0.49546945", "0.49546945", "0.49546945", "0.49546945", "0.49546945", "0.4951223", "0.4951223", "0.49413383", "0.49291518", "0.49291518", "0.49291518", "0.49291518", "0.49250633", "0.49241608", "0.49229798", "0.48947114", "0.48947114", "0.48835233", "0.48641732", "0.48473045", "0.48473045", "0.48337513", "0.4832101", "0.48172736", "0.4810974", "0.48036182", "0.4781369", "0.4781369", "0.4780069", "0.47701222", "0.4768568", "0.475068", "0.47431546", "0.47334048", "0.4733396", "0.4733396", "0.47313386", "0.47274625", "0.47264093", "0.47251138", "0.47078693", "0.47013783", "0.46924672", "0.46780792", "0.46710628", "0.46478543", "0.46314648", "0.46056402", "0.46056402", "0.46056402" ]
0.7770069
1
Associate each segment (an object) with an element (a jQuery object), by setting each `segment.element`. Run each element through the `eventRender` filter, which allows developers to modify an existing element, supply a new one, or cancel rendering.
function resolveElements(segments, elements) { for (var i=0; i<segments.length; i++) { var segment = segments[i]; var event = segment.event; var element = elements.eq(i); // call the trigger with the original element var triggerRes = trigger('eventRender', event, event, element); if (triggerRes === false) { // if `false`, remove the event from the DOM and don't assign it to `segment.event` element.remove(); } else { if (triggerRes && triggerRes !== true) { // the trigger returned a new element, but not `true` (which means keep the existing element) // re-assign the important CSS dimension properties that were already assigned in `buildHTMLForSegment` triggerRes = $(triggerRes) .css({ position: 'absolute', left: segment.left }); element.replaceWith(triggerRes); element = triggerRes; } segment.element = element; } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function k(b,c){for(var d=0;d<b.length;d++){var e=b[d],f=e.event,g=c.eq(d),h=z(\"eventRender\",f,f,g);h===!1?\n// if `false`, remove the event from the DOM and don't assign it to `segment.event`\ng.remove():(h&&h!==!0&&(\n// the trigger returned a new element, but not `true` (which means keep the existing element)\n// re-assign the important CSS dimension properties that were already assigned in `buildHTMLForSegment`\nh=a(h).css({position:\"absolute\",left:e.left}),g.replaceWith(h),g=h),e.element=g)}}", "function _renderDayEvents(events, doAppend, doRowHeights) {\n\n\t\t// where the DOM nodes will eventually end up\n\t\tvar finalContainer = getDaySegmentContainer();\n\n\t\t// the container where the initial HTML will be rendered.\n\t\t// If `doAppend`==true, uses a temporary container.\n\t\tvar renderContainer = doAppend ? $(\"<div/>\") : finalContainer;\n\n\t\tvar segments = buildSegments(events);\n\t\tvar html;\n\t\tvar elements;\n\n\t\t// calculate the desired `left` and `width` properties on each segment object\n\t\tcalculateHorizontals(segments);\n\n\t\t// build the HTML string. relies on `left` property\n\t\thtml = buildHTML(segments);\n\n\t\t// render the HTML. innerHTML is considerably faster than jQuery's .html()\n\t\trenderContainer[0].innerHTML = html;\n\n\t\t// retrieve the individual elements\n\t\telements = renderContainer.children();\n\n\t\t// if we were appending, and thus using a temporary container,\n\t\t// re-attach elements to the real container.\n\t\tif (doAppend) {\n\t\t\tfinalContainer.append(elements);\n\t\t}\n\n\t\t// assigns each element to `segment.event`, after filtering them through user callbacks\n\t\tresolveElements(segments, elements);\n\n\t\t// Calculate the left and right padding+margin for each element.\n\t\t// We need this for setting each element's desired outer width, because of the W3C box model.\n\t\t// It's important we do this in a separate pass from acually setting the width on the DOM elements\n\t\t// because alternating reading/writing dimensions causes reflow for every iteration.\n\t\tsegmentElementEach(segments, function(segment, element) {\n\t\t\tsegment.hsides = hsides(element, true); // include margins = `true`\n\t\t});\n\n\t\t// Set the width of each element\n\t\tsegmentElementEach(segments, function(segment, element) {\n\t\t\telement.width(\n\t\t\t\tMath.max(0, segment.outerWidth - segment.hsides)\n\t\t\t);\n\t\t});\n\n\t\t// Grab each element's outerHeight (setVerticals uses this).\n\t\t// To get an accurate reading, it's important to have each element's width explicitly set already.\n\t\tsegmentElementEach(segments, function(segment, element) {\n\t\t\tsegment.outerHeight = element.outerHeight(true); // include margins = `true`\n\t\t});\n\n\t\t// Set the top coordinate on each element (requires segment.outerHeight)\n\t\tsetVerticals(segments, doRowHeights);\n\n\t\treturn segments;\n\t}", "function _renderDayEvents(events, doAppend, doRowHeights) {\n\n\t\t// where the DOM nodes will eventually end up\n\t\tvar finalContainer = getDaySegmentContainer();\n\n\t\t// the container where the initial HTML will be rendered.\n\t\t// If `doAppend`==true, uses a temporary container.\n\t\tvar renderContainer = doAppend ? $(\"<div/>\") : finalContainer;\n\n\t\tvar segments = buildSegments(events);\n\t\tvar html;\n\t\tvar elements;\n\n\t\t// calculate the desired `left` and `width` properties on each segment object\n\t\tcalculateHorizontals(segments);\n\n\t\t// build the HTML string. relies on `left` property\n\t\thtml = buildHTML(segments);\n\n\t\t// render the HTML. innerHTML is considerably faster than jQuery's .html()\n\t\trenderContainer[0].innerHTML = html;\n\n\t\t// retrieve the individual elements\n\t\telements = renderContainer.children();\n\n\t\t// if we were appending, and thus using a temporary container,\n\t\t// re-attach elements to the real container.\n\t\tif (doAppend) {\n\t\t\tfinalContainer.append(elements);\n\t\t}\n\n\t\t// assigns each element to `segment.event`, after filtering them through user callbacks\n\t\tresolveElements(segments, elements);\n\n\t\t// Calculate the left and right padding+margin for each element.\n\t\t// We need this for setting each element's desired outer width, because of the W3C box model.\n\t\t// It's important we do this in a separate pass from acually setting the width on the DOM elements\n\t\t// because alternating reading/writing dimensions causes reflow for every iteration.\n\t\tsegmentElementEach(segments, function(segment, element) {\n\t\t\tsegment.hsides = hsides(element, true); // include margins = `true`\n\t\t});\n\n\t\t// Set the width of each element\n\t\tsegmentElementEach(segments, function(segment, element) {\n\t\t\telement.width(\n\t\t\t\tMath.max(0, segment.outerWidth - segment.hsides)\n\t\t\t);\n\t\t});\n\n\t\t// Grab each element's outerHeight (setVerticals uses this).\n\t\t// To get an accurate reading, it's important to have each element's width explicitly set already.\n\t\tsegmentElementEach(segments, function(segment, element) {\n\t\t\tsegment.outerHeight = element.outerHeight(true); // include margins = `true`\n\t\t});\n\n\t\t// Set the top coordinate on each element (requires segment.outerHeight)\n\t\tsetVerticals(segments, doRowHeights);\n\n\t\treturn segments;\n\t}", "function _renderDayEvents(events, doAppend, doRowHeights) {\n\n\t\t// where the DOM nodes will eventually end up\n\t\tvar finalContainer = getDaySegmentContainer();\n\n\t\t// the container where the initial HTML will be rendered.\n\t\t// If `doAppend`==true, uses a temporary container.\n\t\tvar renderContainer = doAppend ? $(\"<div/>\") : finalContainer;\n\n\t\tvar segments = buildSegments(events);\n\t\tvar html;\n\t\tvar elements;\n\n\t\t// calculate the desired `left` and `width` properties on each segment object\n\t\tcalculateHorizontals(segments);\n\n\t\t// build the HTML string. relies on `left` property\n\t\thtml = buildHTML(segments);\n\n\t\t// render the HTML. innerHTML is considerably faster than jQuery's .html()\n\t\trenderContainer[0].innerHTML = html;\n\n\t\t// retrieve the individual elements\n\t\telements = renderContainer.children();\n\n\t\t// if we were appending, and thus using a temporary container,\n\t\t// re-attach elements to the real container.\n\t\tif (doAppend) {\n\t\t\tfinalContainer.append(elements);\n\t\t}\n\n\t\t// assigns each element to `segment.event`, after filtering them through user callbacks\n\t\tresolveElements(segments, elements);\n\n\t\t// Calculate the left and right padding+margin for each element.\n\t\t// We need this for setting each element's desired outer width, because of the W3C box model.\n\t\t// It's important we do this in a separate pass from acually setting the width on the DOM elements\n\t\t// because alternating reading/writing dimensions causes reflow for every iteration.\n\t\tsegmentElementEach(segments, function(segment, element) {\n\t\t\tsegment.hsides = hsides(element, true); // include margins = `true`\n\t\t});\n\n\t\t// Set the width of each element\n\t\tsegmentElementEach(segments, function(segment, element) {\n\t\t\telement.width(\n\t\t\t\tMath.max(0, segment.outerWidth - segment.hsides)\n\t\t\t);\n\t\t});\n\n\t\t// Grab each element's outerHeight (setVerticals uses this).\n\t\t// To get an accurate reading, it's important to have each element's width explicitly set already.\n\t\tsegmentElementEach(segments, function(segment, element) {\n\t\t\tsegment.outerHeight = element.outerHeight(true); // include margins = `true`\n\t\t});\n\n\t\t// Set the top coordinate on each element (requires segment.outerHeight)\n\t\tsetVerticals(segments, doRowHeights);\n\n\t\treturn segments;\n\t}", "function _renderDayEvents(events, doAppend, doRowHeights) {\n\n\t\t// where the DOM nodes will eventually end up\n\t\tvar finalContainer = getDaySegmentContainer();\n\n\t\t// the container where the initial HTML will be rendered.\n\t\t// If `doAppend`==true, uses a temporary container.\n\t\tvar renderContainer = doAppend ? $(\"<div/>\") : finalContainer;\n\n\t\tvar segments = buildSegments(events);\n\t\tvar html;\n\t\tvar elements;\n\n\t\t// calculate the desired `left` and `width` properties on each segment object\n\t\tcalculateHorizontals(segments);\n\n\t\t// build the HTML string. relies on `left` property\n\t\thtml = buildHTML(segments);\n\n\t\t// render the HTML. innerHTML is considerably faster than jQuery's .html()\n\t\trenderContainer[0].innerHTML = html;\n\n\t\t// retrieve the individual elements\n\t\telements = renderContainer.children();\n\n\t\t// if we were appending, and thus using a temporary container,\n\t\t// re-attach elements to the real container.\n\t\tif (doAppend) {\n\t\t\tfinalContainer.append(elements);\n\t\t}\n\n\t\t// assigns each element to `segment.event`, after filtering them through user callbacks\n\t\tresolveElements(segments, elements);\n\n\t\t// Calculate the left and right padding+margin for each element.\n\t\t// We need this for setting each element's desired outer width, because of the W3C box model.\n\t\t// It's important we do this in a separate pass from acually setting the width on the DOM elements\n\t\t// because alternating reading/writing dimensions causes reflow for every iteration.\n\t\tsegmentElementEach(segments, function(segment, element) {\n\t\t\tsegment.hsides = hsides(element, true); // include margins = `true`\n\t\t});\n\n\t\t// Set the width of each element\n\t\tsegmentElementEach(segments, function(segment, element) {\n\t\t\telement.width(\n\t\t\t\tMath.max(0, segment.outerWidth - segment.hsides)\n\t\t\t);\n\t\t});\n\n\t\t// Grab each element's outerHeight (setVerticals uses this).\n\t\t// To get an accurate reading, it's important to have each element's width explicitly set already.\n\t\tsegmentElementEach(segments, function(segment, element) {\n\t\t\tsegment.outerHeight = element.outerHeight(true); // include margins = `true`\n\t\t});\n\n\t\t// Set the top coordinate on each element (requires segment.outerHeight)\n\t\tsetVerticals(segments, doRowHeights);\n\n\t\treturn segments;\n\t}", "function _renderDayEvents(events, doAppend, doRowHeights) {\n\n\t\t// where the DOM nodes will eventually end up\n\t\tvar finalContainer = getDaySegmentContainer();\n\n\t\t// the container where the initial HTML will be rendered.\n\t\t// If `doAppend`==true, uses a temporary container.\n\t\tvar renderContainer = doAppend ? $(\"<div/>\") : finalContainer;\n\n\t\tvar segments = buildSegments(events);\n\t\tvar html;\n\t\tvar elements;\n\n\t\t// calculate the desired `left` and `width` properties on each segment object\n\t\tcalculateHorizontals(segments);\n\n\t\t// build the HTML string. relies on `left` property\n\t\thtml = buildHTML(segments);\n\n\t\t// render the HTML. innerHTML is considerably faster than jQuery's .html()\n\t\trenderContainer[0].innerHTML = html;\n\n\t\t// retrieve the individual elements\n\t\telements = renderContainer.children();\n\n\t\t// if we were appending, and thus using a temporary container,\n\t\t// re-attach elements to the real container.\n\t\tif (doAppend) {\n\t\t\tfinalContainer.append(elements);\n\t\t}\n\n\t\t// assigns each element to `segment.event`, after filtering them through user callbacks\n\t\tresolveElements(segments, elements);\n\n\t\t// Calculate the left and right padding+margin for each element.\n\t\t// We need this for setting each element's desired outer width, because of the W3C box model.\n\t\t// It's important we do this in a separate pass from acually setting the width on the DOM elements\n\t\t// because alternating reading/writing dimensions causes reflow for every iteration.\n\t\tsegmentElementEach(segments, function(segment, element) {\n\t\t\tsegment.hsides = hsides(element, true); // include margins = `true`\n\t\t});\n\n\t\t// Set the width of each element\n\t\tsegmentElementEach(segments, function(segment, element) {\n\t\t\telement.width(\n\t\t\t\tMath.max(0, segment.outerWidth - segment.hsides)\n\t\t\t);\n\t\t});\n\n\t\t// Grab each element's outerHeight (setVerticals uses this).\n\t\t// To get an accurate reading, it's important to have each element's width explicitly set already.\n\t\tsegmentElementEach(segments, function(segment, element) {\n\t\t\tsegment.outerHeight = element.outerHeight(true); // include margins = `true`\n\t\t});\n\n\t\t// Set the top coordinate on each element (requires segment.outerHeight)\n\t\tsetVerticals(segments, doRowHeights);\n\n\t\treturn segments;\n\t}", "function d(b,c,d){\n// where the DOM nodes will eventually end up\nvar f,g,j=T(),m=c?a(\"<div/>\"):j,n=e(b);\n// calculate the desired `left` and `width` properties on each segment object\n// build the HTML string. relies on `left` property\n// render the HTML. innerHTML is considerably faster than jQuery's .html()\n// retrieve the individual elements\n// if we were appending, and thus using a temporary container,\n// re-attach elements to the real container.\n// assigns each element to `segment.event`, after filtering them through user callbacks\n// Calculate the left and right padding+margin for each element.\n// We need this for setting each element's desired outer width, because of the W3C box model.\n// It's important we do this in a separate pass from acually setting the width on the DOM elements\n// because alternating reading/writing dimensions causes reflow for every iteration.\n// Set the width of each element\n// Grab each element's outerHeight (setVerticals uses this).\n// To get an accurate reading, it's important to have each element's width explicitly set already.\n// Set the top coordinate on each element (requires segment.outerHeight)\nreturn h(n),f=i(n),m[0].innerHTML=f,g=m.children(),c&&j.append(g),k(n,g),xa(n,function(a,b){a.hsides=t(b,!0)}),xa(n,function(a,b){b.width(Math.max(0,a.outerWidth-a.hsides))}),xa(n,function(a,b){a.outerHeight=b.outerHeight(!0)}),l(n,d),n}", "function b(a,b){\n// do the actual rendering. Receive the intermediate \"segment\" data structures.\nvar c=d(a,!1,// don't append event elements\n!0);\n// report the elements to the View, for general drag/resize utilities\nxa(c,function(a,b){C(a.event,b)}),\n// attach mouse handlers\ns(c,b),\n// call `eventAfterRender` callback for each event\nxa(c,function(a,b){z(\"eventAfterRender\",a.event,a.event,b)})}", "function processEvents(element, index, array) {\r\r\n \tvar eventHtml = '';\r\r\n \teventHtml += '<div class=\"event clearfix\">';\r\r\n \teventHtml += '<div class=\"event-left\">';\r\r\n \tif(element.actor.hasOwnProperty('avatar_url')){\r\r\n \t\teventHtml += '<div class=\"event-field\">';\r\r\n \t\teventHtml += '<img src=\"' + element.actor.avatar_url + '\">';\r\r\n \t\teventHtml += '</div>';\r\r\n \t}\r\r\n \teventHtml += '</div>';\r\r\n \teventHtml += '<div class=\"event-right\">';\r\r\n \tif(element.actor.hasOwnProperty('login')){\r\r\n \t\teventHtml += '<div class=\"event-field\">';\r\r\n \t\teventHtml += '<h3>UserName: ' + element.actor.login + '</h3>';\r\r\n \t\teventHtml += '</div>';\r\r\n \t}\r\r\n \tif(element.hasOwnProperty('type')){\r\r\n \t\teventHtml += '<div class=\"event-field\">';\r\r\n \t\teventHtml += '<p>Type of Event: ' + element.type + '</p>';\r\r\n \t\teventHtml += '</div>';\r\r\n \t}\r\r\n \teventHtml += '<span>Click to show more details...</span>';\r\r\n \teventHtml += '<div class=\"event-details\">';\r\r\n \tif(element.hasOwnProperty('created_at')) {\r\r\n \t\tvar eventDate = convertDate(element.created_at);\r\r\n \t\teventHtml += '<div class=\"event-field\">';\r\r\n \t\teventHtml += 'Date Created: ' + eventDate;\r\r\n \t\teventHtml += '</div>';\r\r\n \t}\r\r\n \tif(element.repo.hasOwnProperty('name')){\r\r\n \t\teventHtml += '<div class=\"event-field\">';\r\r\n \t\teventHtml += '<p>Repo Name: ' + element.repo.name + '</p>';\r\r\n \t\teventHtml += '<a target=\"_blank\" href=\"https://github.com/' + element.repo.name + '\">Link to Repo</a>';\r\r\n \t\teventHtml += '</div>';\r\r\n \t}\r\r\n \teventHtml += '</div>';\r\r\n \teventHtml += '</div>';\r\r\n \teventHtml += '</div>';\r\r\n\r\r\n \t//checks where to place event for user or public github feed\r\r\n \tif (array.typeOfRequest == 'githubPublic') {\r\r\n \t\t$(\"#event-data\").append(eventHtml);\r\r\n \t}\r\r\n \telse if (array.typeOfRequest == 'githubUser') {\r\r\n \t\t$(\"#user-data\").append(eventHtml);\r\r\n \t}\r\r\n\r\r\n \t$('.event').click(function(){\r\r\n \t$(this).addClass(\"active\");\r\r\n\t\t})\r\r\n }", "function renderSlotSegs(segs, modifiedEventId) {\n\t\n\t\tvar i, segCnt=segs.length, seg,\n\t\t\tevent,\n\t\t\ttop,\n\t\t\tbottom,\n\t\t\tcolumnLeft,\n\t\t\tcolumnRight,\n\t\t\tcolumnWidth,\n\t\t\twidth,\n\t\t\tleft,\n\t\t\tright,\n\t\t\thtml = '',\n\t\t\teventElements,\n\t\t\teventElement,\n\t\t\ttriggerRes,\n\t\t\ttitleElement,\n\t\t\theight,\n\t\t\tslotSegmentContainer = getSlotSegmentContainer(),\n\t\t\tisRTL = opt('isRTL');\n\t\t\t\n\t\t// calculate position/dimensions, create html\n\t\tfor (i=0; i<segCnt; i++) {\n\t\t\tseg = segs[i];\n\t\t\tevent = seg.event;\n\t\t\ttop = computeDateTop(seg.start, seg.start);\n\t\t\tbottom = computeDateTop(seg.end, seg.start);\n\t\t\tcolumnLeft = colContentLeft(seg.col);\n\t\t\tcolumnRight = colContentRight(seg.col);\n\t\t\tcolumnWidth = columnRight - columnLeft;\n\n\t\t\t// shave off space on right near scrollbars (2.5%)\n\t\t\t// TODO: move this to CSS somehow\n\t\t\tcolumnRight -= columnWidth * .025;\n\t\t\tcolumnWidth = columnRight - columnLeft;\n\n\t\t\twidth = columnWidth * (seg.forwardCoord - seg.backwardCoord);\n\n\t\t\tif (opt('slotEventOverlap')) {\n\t\t\t\t// double the width while making sure resize handle is visible\n\t\t\t\t// (assumed to be 20px wide)\n\t\t\t\twidth = Math.max(\n\t\t\t\t\t(width - (20/2)) * 2,\n\t\t\t\t\twidth // narrow columns will want to make the segment smaller than\n\t\t\t\t\t\t// the natural width. don't allow it\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tif (isRTL) {\n\t\t\t\tright = columnRight - seg.backwardCoord * columnWidth;\n\t\t\t\tleft = right - width;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tleft = columnLeft + seg.backwardCoord * columnWidth;\n\t\t\t\tright = left + width;\n\t\t\t}\n\n\t\t\t// make sure horizontal coordinates are in bounds\n\t\t\tleft = Math.max(left, columnLeft);\n\t\t\tright = Math.min(right, columnRight);\n\t\t\twidth = right - left;\n\n\t\t\tseg.top = top;\n\t\t\tseg.left = left;\n\t\t\tseg.outerWidth = width;\n\t\t\tseg.outerHeight = bottom - top;\n\t\t\thtml += slotSegHtml(event, seg);\n\t\t}\n\n\t\tslotSegmentContainer[0].innerHTML = html; // faster than html()\n\t\teventElements = slotSegmentContainer.children();\n\t\t\n\t\t// retrieve elements, run through eventRender callback, bind event handlers\n\t\tfor (i=0; i<segCnt; i++) {\n\t\t\tseg = segs[i];\n\t\t\tevent = seg.event;\n\t\t\teventElement = $(eventElements[i]); // faster than eq()\n\t\t\ttriggerRes = trigger('eventRender', event, event, eventElement);\n\t\t\tif (triggerRes === false) {\n\t\t\t\teventElement.remove();\n\t\t\t}else{\n\t\t\t\tif (triggerRes && triggerRes !== true) {\n\t\t\t\t\teventElement.remove();\n\t\t\t\t\teventElement = $(triggerRes)\n\t\t\t\t\t\t.css({\n\t\t\t\t\t\t\tposition: 'absolute',\n\t\t\t\t\t\t\ttop: seg.top,\n\t\t\t\t\t\t\tleft: seg.left\n\t\t\t\t\t\t})\n\t\t\t\t\t\t.appendTo(slotSegmentContainer);\n\t\t\t\t}\n\t\t\t\tseg.element = eventElement;\n\t\t\t\tif (event._id === modifiedEventId) {\n\t\t\t\t\tbindSlotSeg(event, eventElement, seg);\n\t\t\t\t}else{\n\t\t\t\t\teventElement[0]._fci = i; // for lazySegBind\n\t\t\t\t}\n\t\t\t\treportEventElement(event, eventElement);\n\t\t\t}\n\t\t}\n\t\t\n\t\tlazySegBind(slotSegmentContainer, segs, bindSlotSeg);\n\t\t\n\t\t// record event sides and title positions\n\t\tfor (i=0; i<segCnt; i++) {\n\t\t\tseg = segs[i];\n\t\t\tif ((eventElement = seg.element)) {\n\t\t\t\tseg.vsides = vsides(eventElement, true);\n\t\t\t\tseg.hsides = hsides(eventElement, true);\n\t\t\t\ttitleElement = eventElement.find('.fc-event-title');\n\t\t\t\tif (titleElement.length) {\n\t\t\t\t\tseg.contentTop = titleElement[0].offsetTop;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t// set all positions/dimensions at once\n\t\tfor (i=0; i<segCnt; i++) {\n\t\t\tseg = segs[i];\n\t\t\tif ((eventElement = seg.element)) {\n\t\t\t\teventElement[0].style.width = Math.max(0, seg.outerWidth - seg.hsides) + 'px';\n\t\t\t\theight = Math.max(0, seg.outerHeight - seg.vsides);\n\t\t\t\teventElement[0].style.height = height + 'px';\n\t\t\t\tevent = seg.event;\n\t\t\t\tif (seg.contentTop !== undefined && height - seg.contentTop < 10) {\n\t\t\t\t\t// not enough room for title, put it in the time (TODO: maybe make both display:inline instead)\n\t\t\t\t\teventElement.find('div.fc-event-time')\n\t\t\t\t\t\t.text(\n\t\t\t\t\t\t\tformatDate(event.start, opt('timeFormat')) + ' - ' + event.title\n\t\t\t\t\t\t);\n\t\t\t\t\teventElement.find('div.fc-event-title')\n\t\t\t\t\t\t.remove();\n\t\t\t\t}\n\t\t\t\ttrigger('eventAfterRender', event, event, eventElement);\n\t\t\t}\n\t\t}\n\t\t\t\t\t\n\t}", "function renderSlotSegs(segs, modifiedEventId) {\n\t\n\t\tvar i, segCnt=segs.length, seg,\n\t\t\tevent,\n\t\t\ttop,\n\t\t\tbottom,\n\t\t\tcolumnLeft,\n\t\t\tcolumnRight,\n\t\t\tcolumnWidth,\n\t\t\twidth,\n\t\t\tleft,\n\t\t\tright,\n\t\t\thtml = '',\n\t\t\teventElements,\n\t\t\teventElement,\n\t\t\ttriggerRes,\n\t\t\ttitleElement,\n\t\t\theight,\n\t\t\tslotSegmentContainer = getSlotSegmentContainer(),\n\t\t\tisRTL = opt('isRTL');\n\t\t\t\n\t\t// calculate position/dimensions, create html\n\t\tfor (i=0; i<segCnt; i++) {\n\t\t\tseg = segs[i];\n\t\t\tevent = seg.event;\n\t\t\ttop = computeDateTop(seg.start, seg.start);\n\t\t\tbottom = computeDateTop(seg.end, seg.start);\n\t\t\tcolumnLeft = colContentLeft(seg.col);\n\t\t\tcolumnRight = colContentRight(seg.col);\n\t\t\tcolumnWidth = columnRight - columnLeft;\n\n\t\t\t// shave off space on right near scrollbars (2.5%)\n\t\t\t// TODO: move this to CSS somehow\n\t\t\tcolumnRight -= columnWidth * .025;\n\t\t\tcolumnWidth = columnRight - columnLeft;\n\n\t\t\twidth = columnWidth * (seg.forwardCoord - seg.backwardCoord);\n\n\t\t\tif (opt('slotEventOverlap')) {\n\t\t\t\t// double the width while making sure resize handle is visible\n\t\t\t\t// (assumed to be 20px wide)\n\t\t\t\twidth = Math.max(\n\t\t\t\t\t(width - (20/2)) * 2,\n\t\t\t\t\twidth // narrow columns will want to make the segment smaller than\n\t\t\t\t\t\t// the natural width. don't allow it\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tif (isRTL) {\n\t\t\t\tright = columnRight - seg.backwardCoord * columnWidth;\n\t\t\t\tleft = right - width;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tleft = columnLeft + seg.backwardCoord * columnWidth;\n\t\t\t\tright = left + width;\n\t\t\t}\n\n\t\t\t// make sure horizontal coordinates are in bounds\n\t\t\tleft = Math.max(left, columnLeft);\n\t\t\tright = Math.min(right, columnRight);\n\t\t\twidth = right - left;\n\n\t\t\tseg.top = top;\n\t\t\tseg.left = left;\n\t\t\tseg.outerWidth = width;\n\t\t\tseg.outerHeight = bottom - top;\n\t\t\thtml += slotSegHtml(event, seg);\n\t\t}\n\n\t\tslotSegmentContainer[0].innerHTML = html; // faster than html()\n\t\teventElements = slotSegmentContainer.children();\n\t\t\n\t\t// retrieve elements, run through eventRender callback, bind event handlers\n\t\tfor (i=0; i<segCnt; i++) {\n\t\t\tseg = segs[i];\n\t\t\tevent = seg.event;\n\t\t\teventElement = $(eventElements[i]); // faster than eq()\n\t\t\ttriggerRes = trigger('eventRender', event, event, eventElement);\n\t\t\tif (triggerRes === false) {\n\t\t\t\teventElement.remove();\n\t\t\t}else{\n\t\t\t\tif (triggerRes && triggerRes !== true) {\n\t\t\t\t\teventElement.remove();\n\t\t\t\t\teventElement = $(triggerRes)\n\t\t\t\t\t\t.css({\n\t\t\t\t\t\t\tposition: 'absolute',\n\t\t\t\t\t\t\ttop: seg.top,\n\t\t\t\t\t\t\tleft: seg.left\n\t\t\t\t\t\t})\n\t\t\t\t\t\t.appendTo(slotSegmentContainer);\n\t\t\t\t}\n\t\t\t\tseg.element = eventElement;\n\t\t\t\tif (event._id === modifiedEventId) {\n\t\t\t\t\tbindSlotSeg(event, eventElement, seg);\n\t\t\t\t}else{\n\t\t\t\t\teventElement[0]._fci = i; // for lazySegBind\n\t\t\t\t}\n\t\t\t\treportEventElement(event, eventElement);\n\t\t\t}\n\t\t}\n\t\t\n\t\tlazySegBind(slotSegmentContainer, segs, bindSlotSeg);\n\t\t\n\t\t// record event sides and title positions\n\t\tfor (i=0; i<segCnt; i++) {\n\t\t\tseg = segs[i];\n\t\t\tif ((eventElement = seg.element)) {\n\t\t\t\tseg.vsides = vsides(eventElement, true);\n\t\t\t\tseg.hsides = hsides(eventElement, true);\n\t\t\t\ttitleElement = eventElement.find('.fc-event-title');\n\t\t\t\tif (titleElement.length) {\n\t\t\t\t\tseg.contentTop = titleElement[0].offsetTop;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t// set all positions/dimensions at once\n\t\tfor (i=0; i<segCnt; i++) {\n\t\t\tseg = segs[i];\n\t\t\tif ((eventElement = seg.element)) {\n\t\t\t\teventElement[0].style.width = Math.max(0, seg.outerWidth - seg.hsides) + 'px';\n\t\t\t\theight = Math.max(0, seg.outerHeight - seg.vsides);\n\t\t\t\teventElement[0].style.height = height + 'px';\n\t\t\t\tevent = seg.event;\n\t\t\t\tif (seg.contentTop !== undefined && height - seg.contentTop < 10) {\n\t\t\t\t\t// not enough room for title, put it in the time (TODO: maybe make both display:inline instead)\n\t\t\t\t\teventElement.find('div.fc-event-time')\n\t\t\t\t\t\t.text(\n\t\t\t\t\t\t\tformatDate(event.start, opt('timeFormat')) + ' - ' + event.title\n\t\t\t\t\t\t);\n\t\t\t\t\teventElement.find('div.fc-event-title')\n\t\t\t\t\t\t.remove();\n\t\t\t\t}\n\t\t\t\ttrigger('eventAfterRender', event, event, eventElement);\n\t\t\t}\n\t\t}\n\t\t\t\t\t\n\t}", "function renderSlotSegs(segs, modifiedEventId) {\n\t\n\t\tvar i, segCnt=segs.length, seg,\n\t\t\tevent,\n\t\t\ttop,\n\t\t\tbottom,\n\t\t\tcolumnLeft,\n\t\t\tcolumnRight,\n\t\t\tcolumnWidth,\n\t\t\twidth,\n\t\t\tleft,\n\t\t\tright,\n\t\t\thtml = '',\n\t\t\teventElements,\n\t\t\teventElement,\n\t\t\ttriggerRes,\n\t\t\ttitleElement,\n\t\t\theight,\n\t\t\tslotSegmentContainer = getSlotSegmentContainer(),\n\t\t\tisRTL = opt('isRTL');\n\t\t\t\n\t\t// calculate position/dimensions, create html\n\t\tfor (i=0; i<segCnt; i++) {\n\t\t\tseg = segs[i];\n\t\t\tevent = seg.event;\n\t\t\ttop = computeDateTop(seg.start, seg.start);\n\t\t\tbottom = computeDateTop(seg.end, seg.start);\n\t\t\tcolumnLeft = colContentLeft(seg.col);\n\t\t\tcolumnRight = colContentRight(seg.col);\n\t\t\tcolumnWidth = columnRight - columnLeft;\n\n\t\t\t// shave off space on right near scrollbars (2.5%)\n\t\t\t// TODO: move this to CSS somehow\n\t\t\tcolumnRight -= columnWidth * .025;\n\t\t\tcolumnWidth = columnRight - columnLeft;\n\n\t\t\twidth = columnWidth * (seg.forwardCoord - seg.backwardCoord);\n\n\t\t\tif (opt('slotEventOverlap')) {\n\t\t\t\t// double the width while making sure resize handle is visible\n\t\t\t\t// (assumed to be 20px wide)\n\t\t\t\twidth = Math.max(\n\t\t\t\t\t(width - (20/2)) * 2,\n\t\t\t\t\twidth // narrow columns will want to make the segment smaller than\n\t\t\t\t\t\t// the natural width. don't allow it\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tif (isRTL) {\n\t\t\t\tright = columnRight - seg.backwardCoord * columnWidth;\n\t\t\t\tleft = right - width;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tleft = columnLeft + seg.backwardCoord * columnWidth;\n\t\t\t\tright = left + width;\n\t\t\t}\n\n\t\t\t// make sure horizontal coordinates are in bounds\n\t\t\tleft = Math.max(left, columnLeft);\n\t\t\tright = Math.min(right, columnRight);\n\t\t\twidth = right - left;\n\n\t\t\tseg.top = top;\n\t\t\tseg.left = left;\n\t\t\tseg.outerWidth = width;\n\t\t\tseg.outerHeight = bottom - top;\n\t\t\thtml += slotSegHtml(event, seg);\n\t\t}\n\n\t\tslotSegmentContainer[0].innerHTML = html; // faster than html()\n\t\teventElements = slotSegmentContainer.children();\n\t\t\n\t\t// retrieve elements, run through eventRender callback, bind event handlers\n\t\tfor (i=0; i<segCnt; i++) {\n\t\t\tseg = segs[i];\n\t\t\tevent = seg.event;\n\t\t\teventElement = $(eventElements[i]); // faster than eq()\n\t\t\ttriggerRes = trigger('eventRender', event, event, eventElement);\n\t\t\tif (triggerRes === false) {\n\t\t\t\teventElement.remove();\n\t\t\t}else{\n\t\t\t\tif (triggerRes && triggerRes !== true) {\n\t\t\t\t\teventElement.remove();\n\t\t\t\t\teventElement = $(triggerRes)\n\t\t\t\t\t\t.css({\n\t\t\t\t\t\t\tposition: 'absolute',\n\t\t\t\t\t\t\ttop: seg.top,\n\t\t\t\t\t\t\tleft: seg.left\n\t\t\t\t\t\t})\n\t\t\t\t\t\t.appendTo(slotSegmentContainer);\n\t\t\t\t}\n\t\t\t\tseg.element = eventElement;\n\t\t\t\tif (event._id === modifiedEventId) {\n\t\t\t\t\tbindSlotSeg(event, eventElement, seg);\n\t\t\t\t}else{\n\t\t\t\t\teventElement[0]._fci = i; // for lazySegBind\n\t\t\t\t}\n\t\t\t\treportEventElement(event, eventElement);\n\t\t\t}\n\t\t}\n\t\t\n\t\tlazySegBind(slotSegmentContainer, segs, bindSlotSeg);\n\t\t\n\t\t// record event sides and title positions\n\t\tfor (i=0; i<segCnt; i++) {\n\t\t\tseg = segs[i];\n\t\t\tif ((eventElement = seg.element)) {\n\t\t\t\tseg.vsides = vsides(eventElement, true);\n\t\t\t\tseg.hsides = hsides(eventElement, true);\n\t\t\t\ttitleElement = eventElement.find('.fc-event-title');\n\t\t\t\tif (titleElement.length) {\n\t\t\t\t\tseg.contentTop = titleElement[0].offsetTop;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t// set all positions/dimensions at once\n\t\tfor (i=0; i<segCnt; i++) {\n\t\t\tseg = segs[i];\n\t\t\tif ((eventElement = seg.element)) {\n\t\t\t\teventElement[0].style.width = Math.max(0, seg.outerWidth - seg.hsides) + 'px';\n\t\t\t\theight = Math.max(0, seg.outerHeight - seg.vsides);\n\t\t\t\teventElement[0].style.height = height + 'px';\n\t\t\t\tevent = seg.event;\n\t\t\t\tif (seg.contentTop !== undefined && height - seg.contentTop < 10) {\n\t\t\t\t\t// not enough room for title, put it in the time (TODO: maybe make both display:inline instead)\n\t\t\t\t\teventElement.find('div.fc-event-time')\n\t\t\t\t\t\t.text(\n\t\t\t\t\t\t\tformatDate(event.start, opt('timeFormat')) + ' - ' + event.title\n\t\t\t\t\t\t);\n\t\t\t\t\teventElement.find('div.fc-event-title')\n\t\t\t\t\t\t.remove();\n\t\t\t\t}\n\t\t\t\ttrigger('eventAfterRender', event, event, eventElement);\n\t\t\t}\n\t\t}\n\t\t\t\t\t\n\t}", "function renderSlotSegs(segs, modifiedEventId) {\n\t\n\t\tvar i, segCnt=segs.length, seg,\n\t\t\tevent,\n\t\t\ttop,\n\t\t\tbottom,\n\t\t\tcolumnLeft,\n\t\t\tcolumnRight,\n\t\t\tcolumnWidth,\n\t\t\twidth,\n\t\t\tleft,\n\t\t\tright,\n\t\t\thtml = '',\n\t\t\teventElements,\n\t\t\teventElement,\n\t\t\ttriggerRes,\n\t\t\ttitleElement,\n\t\t\theight,\n\t\t\tslotSegmentContainer = getSlotSegmentContainer(),\n\t\t\tisRTL = opt('isRTL');\n\t\t\t\n\t\t// calculate position/dimensions, create html\n\t\tfor (i=0; i<segCnt; i++) {\n\t\t\tseg = segs[i];\n\t\t\tevent = seg.event;\n\t\t\ttop = timePosition(seg.start, seg.start);\n\t\t\tbottom = timePosition(seg.start, seg.end);\n\t\t\tcolumnLeft = colContentLeft(seg.col);\n\t\t\tcolumnRight = colContentRight(seg.col);\n\t\t\tcolumnWidth = columnRight - columnLeft;\n\n\t\t\t// shave off space on right near scrollbars (2.5%)\n\t\t\t// TODO: move this to CSS somehow\n\t\t\tcolumnRight -= columnWidth * .025;\n\t\t\tcolumnWidth = columnRight - columnLeft;\n\n\t\t\twidth = columnWidth * (seg.forwardCoord - seg.backwardCoord);\n\n\t\t\tif (opt('slotEventOverlap')) {\n\t\t\t\t// double the width while making sure resize handle is visible\n\t\t\t\t// (assumed to be 20px wide)\n\t\t\t\twidth = Math.max(\n\t\t\t\t\t(width - (20/2)) * 2,\n\t\t\t\t\twidth // narrow columns will want to make the segment smaller than\n\t\t\t\t\t\t// the natural width. don't allow it\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tif (isRTL) {\n\t\t\t\tright = columnRight - seg.backwardCoord * columnWidth;\n\t\t\t\tleft = right - width;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tleft = columnLeft + seg.backwardCoord * columnWidth;\n\t\t\t\tright = left + width;\n\t\t\t}\n\n\t\t\t// make sure horizontal coordinates are in bounds\n\t\t\tleft = Math.max(left, columnLeft);\n\t\t\tright = Math.min(right, columnRight);\n\t\t\twidth = right - left;\n\n\t\t\tseg.top = top;\n\t\t\tseg.left = left;\n\t\t\tseg.outerWidth = width;\n\t\t\tseg.outerHeight = bottom - top;\n\t\t\thtml += slotSegHtml(event, seg);\n\t\t}\n\n\t\tslotSegmentContainer[0].innerHTML = html; // faster than html()\n\t\teventElements = slotSegmentContainer.children();\n\t\t\n\t\t// retrieve elements, run through eventRender callback, bind event handlers\n\t\tfor (i=0; i<segCnt; i++) {\n\t\t\tseg = segs[i];\n\t\t\tevent = seg.event;\n\t\t\teventElement = $(eventElements[i]); // faster than eq()\n\t\t\ttriggerRes = trigger('eventRender', event, event, eventElement);\n\t\t\tif (triggerRes === false) {\n\t\t\t\teventElement.remove();\n\t\t\t}else{\n\t\t\t\tif (triggerRes && triggerRes !== true) {\n\t\t\t\t\teventElement.remove();\n\t\t\t\t\teventElement = $(triggerRes)\n\t\t\t\t\t\t.css({\n\t\t\t\t\t\t\tposition: 'absolute',\n\t\t\t\t\t\t\ttop: seg.top,\n\t\t\t\t\t\t\tleft: seg.left\n\t\t\t\t\t\t})\n\t\t\t\t\t\t.appendTo(slotSegmentContainer);\n\t\t\t\t}\n\t\t\t\tseg.element = eventElement;\n\t\t\t\tif (event._id === modifiedEventId) {\n\t\t\t\t\tbindSlotSeg(event, eventElement, seg);\n\t\t\t\t}else{\n\t\t\t\t\teventElement[0]._fci = i; // for lazySegBind\n\t\t\t\t}\n\t\t\t\treportEventElement(event, eventElement);\n\t\t\t}\n\t\t}\n\t\t\n\t\tlazySegBind(slotSegmentContainer, segs, bindSlotSeg);\n\t\t\n\t\t// record event sides and title positions\n\t\tfor (i=0; i<segCnt; i++) {\n\t\t\tseg = segs[i];\n\t\t\tif (eventElement = seg.element) {\n\t\t\t\tseg.vsides = vsides(eventElement, true);\n\t\t\t\tseg.hsides = hsides(eventElement, true);\n\t\t\t\ttitleElement = eventElement.find('.fc-event-title');\n\t\t\t\tif (titleElement.length) {\n\t\t\t\t\tseg.contentTop = titleElement[0].offsetTop;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t// set all positions/dimensions at once\n\t\tfor (i=0; i<segCnt; i++) {\n\t\t\tseg = segs[i];\n\t\t\tif (eventElement = seg.element) {\n\t\t\t\teventElement[0].style.width = Math.max(0, seg.outerWidth - seg.hsides) + 'px';\n\t\t\t\theight = Math.max(0, seg.outerHeight - seg.vsides);\n\t\t\t\teventElement[0].style.height = height + 'px';\n\t\t\t\tevent = seg.event;\n\t\t\t\tif (seg.contentTop !== undefined && height - seg.contentTop < 10) {\n\t\t\t\t\t// not enough room for title, put it in the time (TODO: maybe make both display:inline instead)\n\t\t\t\t\teventElement.find('div.fc-event-time')\n\t\t\t\t\t\t.text(formatDate(event.start, opt('timeFormat')) + ' - ' + event.title);\n\t\t\t\t\teventElement.find('div.fc-event-title')\n\t\t\t\t\t\t.remove();\n\t\t\t\t}\n\t\t\t\ttrigger('eventAfterRender', event, event, eventElement);\n\t\t\t}\n\t\t}\n\t\t\t\t\t\n\t}", "function renderSlotSegs(segs, modifiedEventId) {\n\t\n\t\tvar i, segCnt=segs.length, seg,\n\t\t\tevent,\n\t\t\ttop,\n\t\t\tbottom,\n\t\t\tcolumnLeft,\n\t\t\tcolumnRight,\n\t\t\tcolumnWidth,\n\t\t\twidth,\n\t\t\tleft,\n\t\t\tright,\n\t\t\thtml = '',\n\t\t\teventElements,\n\t\t\teventElement,\n\t\t\ttriggerRes,\n\t\t\ttitleElement,\n\t\t\theight,\n\t\t\tslotSegmentContainer = getSlotSegmentContainer(),\n\t\t\tisRTL = opt('isRTL');\n\t\t\t\n\t\t// calculate position/dimensions, create html\n\t\tfor (i=0; i<segCnt; i++) {\n\t\t\tseg = segs[i];\n\t\t\tevent = seg.event;\n\t\t\ttop = timePosition(seg.start, seg.start);\n\t\t\tbottom = timePosition(seg.start, seg.end);\n\t\t\tcolumnLeft = colContentLeft(seg.col);\n\t\t\tcolumnRight = colContentRight(seg.col);\n\t\t\tcolumnWidth = columnRight - columnLeft;\n\n\t\t\t// shave off space on right near scrollbars (2.5%)\n\t\t\t// TODO: move this to CSS somehow\n\t\t\tcolumnRight -= columnWidth * .025;\n\t\t\tcolumnWidth = columnRight - columnLeft;\n\n\t\t\twidth = columnWidth * (seg.forwardCoord - seg.backwardCoord);\n\n\t\t\tif (opt('slotEventOverlap')) {\n\t\t\t\t// double the width while making sure resize handle is visible\n\t\t\t\t// (assumed to be 20px wide)\n\t\t\t\twidth = Math.max(\n\t\t\t\t\t(width - (20/2)) * 2,\n\t\t\t\t\twidth // narrow columns will want to make the segment smaller than\n\t\t\t\t\t\t// the natural width. don't allow it\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tif (isRTL) {\n\t\t\t\tright = columnRight - seg.backwardCoord * columnWidth;\n\t\t\t\tleft = right - width;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tleft = columnLeft + seg.backwardCoord * columnWidth;\n\t\t\t\tright = left + width;\n\t\t\t}\n\n\t\t\t// make sure horizontal coordinates are in bounds\n\t\t\tleft = Math.max(left, columnLeft);\n\t\t\tright = Math.min(right, columnRight);\n\t\t\twidth = right - left;\n\n\t\t\tseg.top = top;\n\t\t\tseg.left = left;\n\t\t\tseg.outerWidth = width;\n\t\t\tseg.outerHeight = bottom - top;\n\t\t\thtml += slotSegHtml(event, seg);\n\t\t}\n\n\t\tslotSegmentContainer[0].innerHTML = html; // faster than html()\n\t\teventElements = slotSegmentContainer.children();\n\t\t\n\t\t// retrieve elements, run through eventRender callback, bind event handlers\n\t\tfor (i=0; i<segCnt; i++) {\n\t\t\tseg = segs[i];\n\t\t\tevent = seg.event;\n\t\t\teventElement = $(eventElements[i]); // faster than eq()\n\t\t\ttriggerRes = trigger('eventRender', event, event, eventElement);\n\t\t\tif (triggerRes === false) {\n\t\t\t\teventElement.remove();\n\t\t\t}else{\n\t\t\t\tif (triggerRes && triggerRes !== true) {\n\t\t\t\t\teventElement.remove();\n\t\t\t\t\teventElement = $(triggerRes)\n\t\t\t\t\t\t.css({\n\t\t\t\t\t\t\tposition: 'absolute',\n\t\t\t\t\t\t\ttop: seg.top,\n\t\t\t\t\t\t\tleft: seg.left\n\t\t\t\t\t\t})\n\t\t\t\t\t\t.appendTo(slotSegmentContainer);\n\t\t\t\t}\n\t\t\t\tseg.element = eventElement;\n\t\t\t\tif (event._id === modifiedEventId) {\n\t\t\t\t\tbindSlotSeg(event, eventElement, seg);\n\t\t\t\t}else{\n\t\t\t\t\teventElement[0]._fci = i; // for lazySegBind\n\t\t\t\t}\n\t\t\t\treportEventElement(event, eventElement);\n\t\t\t}\n\t\t}\n\t\t\n\t\tlazySegBind(slotSegmentContainer, segs, bindSlotSeg);\n\t\t\n\t\t// record event sides and title positions\n\t\tfor (i=0; i<segCnt; i++) {\n\t\t\tseg = segs[i];\n\t\t\tif (eventElement = seg.element) {\n\t\t\t\tseg.vsides = vsides(eventElement, true);\n\t\t\t\tseg.hsides = hsides(eventElement, true);\n\t\t\t\ttitleElement = eventElement.find('.fc-event-title');\n\t\t\t\tif (titleElement.length) {\n\t\t\t\t\tseg.contentTop = titleElement[0].offsetTop;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t// set all positions/dimensions at once\n\t\tfor (i=0; i<segCnt; i++) {\n\t\t\tseg = segs[i];\n\t\t\tif (eventElement = seg.element) {\n\t\t\t\teventElement[0].style.width = Math.max(0, seg.outerWidth - seg.hsides) + 'px';\n\t\t\t\theight = Math.max(0, seg.outerHeight - seg.vsides);\n\t\t\t\teventElement[0].style.height = height + 'px';\n\t\t\t\tevent = seg.event;\n\t\t\t\tif (seg.contentTop !== undefined && height - seg.contentTop < 10) {\n\t\t\t\t\t// not enough room for title, put it in the time (TODO: maybe make both display:inline instead)\n\t\t\t\t\teventElement.find('div.fc-event-time')\n\t\t\t\t\t\t.text(formatDate(event.start, opt('timeFormat')) + ' - ' + event.title);\n\t\t\t\t\teventElement.find('div.fc-event-title')\n\t\t\t\t\t\t.remove();\n\t\t\t\t}\n\t\t\t\ttrigger('eventAfterRender', event, event, eventElement);\n\t\t\t}\n\t\t}\n\t\t\t\t\t\n\t}", "function renderSlotSegs(segs, modifiedEventId) {\n\t\n\t\tvar i, segCnt=segs.length, seg,\n\t\t\tevent,\n\t\t\ttop,\n\t\t\tbottom,\n\t\t\tcolumnLeft,\n\t\t\tcolumnRight,\n\t\t\tcolumnWidth,\n\t\t\twidth,\n\t\t\tleft,\n\t\t\tright,\n\t\t\thtml = '',\n\t\t\teventElements,\n\t\t\teventElement,\n\t\t\ttriggerRes,\n\t\t\ttitleElement,\n\t\t\theight,\n\t\t\tslotSegmentContainer = getSlotSegmentContainer(),\n\t\t\tisRTL = opt('isRTL');\n\t\t\t\n\t\t// calculate position/dimensions, create html\n\t\tfor (i=0; i<segCnt; i++) {\n\t\t\tseg = segs[i];\n\t\t\tevent = seg.event;\n\t\t\ttop = timePosition(seg.start, seg.start);\n\t\t\tbottom = timePosition(seg.start, seg.end);\n\t\t\tcolumnLeft = colContentLeft(seg.col);\n\t\t\tcolumnRight = colContentRight(seg.col);\n\t\t\tcolumnWidth = columnRight - columnLeft;\n\n\t\t\t// shave off space on right near scrollbars (2.5%)\n\t\t\t// TODO: move this to CSS somehow\n\t\t\tcolumnRight -= columnWidth * .025;\n\t\t\tcolumnWidth = columnRight - columnLeft;\n\n\t\t\twidth = columnWidth * (seg.forwardCoord - seg.backwardCoord);\n\n\t\t\tif (opt('slotEventOverlap')) {\n\t\t\t\t// double the width while making sure resize handle is visible\n\t\t\t\t// (assumed to be 20px wide)\n\t\t\t\twidth = Math.max(\n\t\t\t\t\t(width - (20/2)) * 2,\n\t\t\t\t\twidth // narrow columns will want to make the segment smaller than\n\t\t\t\t\t\t// the natural width. don't allow it\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tif (isRTL) {\n\t\t\t\tright = columnRight - seg.backwardCoord * columnWidth;\n\t\t\t\tleft = right - width;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tleft = columnLeft + seg.backwardCoord * columnWidth;\n\t\t\t\tright = left + width;\n\t\t\t}\n\n\t\t\t// make sure horizontal coordinates are in bounds\n\t\t\tleft = Math.max(left, columnLeft);\n\t\t\tright = Math.min(right, columnRight);\n\t\t\twidth = right - left;\n\n\t\t\tseg.top = top;\n\t\t\tseg.left = left;\n\t\t\tseg.outerWidth = width;\n\t\t\tseg.outerHeight = bottom - top;\n\t\t\thtml += slotSegHtml(event, seg);\n\t\t}\n\n\t\tslotSegmentContainer[0].innerHTML = html; // faster than html()\n\t\teventElements = slotSegmentContainer.children();\n\t\t\n\t\t// retrieve elements, run through eventRender callback, bind event handlers\n\t\tfor (i=0; i<segCnt; i++) {\n\t\t\tseg = segs[i];\n\t\t\tevent = seg.event;\n\t\t\teventElement = $(eventElements[i]); // faster than eq()\n\t\t\ttriggerRes = trigger('eventRender', event, event, eventElement);\n\t\t\tif (triggerRes === false) {\n\t\t\t\teventElement.remove();\n\t\t\t}else{\n\t\t\t\tif (triggerRes && triggerRes !== true) {\n\t\t\t\t\teventElement.remove();\n\t\t\t\t\teventElement = $(triggerRes)\n\t\t\t\t\t\t.css({\n\t\t\t\t\t\t\tposition: 'absolute',\n\t\t\t\t\t\t\ttop: seg.top,\n\t\t\t\t\t\t\tleft: seg.left\n\t\t\t\t\t\t})\n\t\t\t\t\t\t.appendTo(slotSegmentContainer);\n\t\t\t\t}\n\t\t\t\tseg.element = eventElement;\n\t\t\t\tif (event._id === modifiedEventId) {\n\t\t\t\t\tbindSlotSeg(event, eventElement, seg);\n\t\t\t\t}else{\n\t\t\t\t\teventElement[0]._fci = i; // for lazySegBind\n\t\t\t\t}\n\t\t\t\treportEventElement(event, eventElement);\n\t\t\t}\n\t\t}\n\t\t\n\t\tlazySegBind(slotSegmentContainer, segs, bindSlotSeg);\n\t\t\n\t\t// record event sides and title positions\n\t\tfor (i=0; i<segCnt; i++) {\n\t\t\tseg = segs[i];\n\t\t\tif (eventElement = seg.element) {\n\t\t\t\tseg.vsides = vsides(eventElement, true);\n\t\t\t\tseg.hsides = hsides(eventElement, true);\n\t\t\t\ttitleElement = eventElement.find('.fc-event-title');\n\t\t\t\tif (titleElement.length) {\n\t\t\t\t\tseg.contentTop = titleElement[0].offsetTop;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t// set all positions/dimensions at once\n\t\tfor (i=0; i<segCnt; i++) {\n\t\t\tseg = segs[i];\n\t\t\tif (eventElement = seg.element) {\n\t\t\t\teventElement[0].style.width = Math.max(0, seg.outerWidth - seg.hsides) + 'px';\n\t\t\t\theight = Math.max(0, seg.outerHeight - seg.vsides);\n\t\t\t\teventElement[0].style.height = height + 'px';\n\t\t\t\tevent = seg.event;\n\t\t\t\tif (seg.contentTop !== undefined && height - seg.contentTop < 10) {\n\t\t\t\t\t// not enough room for title, put it in the time (TODO: maybe make both display:inline instead)\n\t\t\t\t\teventElement.find('div.fc-event-time')\n\t\t\t\t\t\t.text(formatDate(event.start, opt('timeFormat')) + ' - ' + event.title);\n\t\t\t\t\teventElement.find('div.fc-event-title')\n\t\t\t\t\t\t.remove();\n\t\t\t\t}\n\t\t\t\ttrigger('eventAfterRender', event, event, eventElement);\n\t\t\t}\n\t\t}\n\t\t\t\t\t\n\t}", "function buildHTMLForSegment(segment) {\n\t\tvar html = '';\n\t\tvar isRTL = opt('isRTL');\n\t\tvar event = segment.event;\n\t\tvar url = event.url;\n\n\t\t// generate the list of CSS classNames\n\t\tvar classNames = [ 'fc-event', 'fc-event-hori' ];\n\t\tif (isEventDraggable(event)) {\n\t\t\tclassNames.push('fc-event-draggable');\n\t\t}\n\t\tif (segment.isStart) {\n\t\t\tclassNames.push('fc-event-start');\n\t\t}\n\t\tif (segment.isEnd) {\n\t\t\tclassNames.push('fc-event-end');\n\t\t}\n\t\t// use the event's configured classNames\n\t\t// guaranteed to be an array via `buildEvent`\n\t\tclassNames = classNames.concat(event.className);\n\t\tif (event.source) {\n\t\t\t// use the event's source's classNames, if specified\n\t\t\tclassNames = classNames.concat(event.source.className || []);\n\t\t}\n\n\t\t// generate a semicolon delimited CSS string for any of the \"skin\" properties\n\t\t// of the event object (`backgroundColor`, `borderColor` and such)\n\t\tvar skinCss = getSkinCss(event, opt);\n\n\t\tif (url) {\n\t\t\thtml += \"<a href='\" + htmlEscape(url) + \"'\";\n\t\t}else{\n\t\t\thtml += \"<div\";\n\t\t}\n\t\thtml +=\n\t\t\t\" class='\" + classNames.join(' ') + \"'\" +\n\t\t\t\" style=\" +\n\t\t\t\t\"'\" +\n\t\t\t\t\"position:absolute;\" +\n\t\t\t\t\"left:\" + segment.left + \"px;\" +\n\t\t\t\tskinCss +\n\t\t\t\t\"'\" +\n\t\t\t\">\" +\n\t\t\t\"<div class='fc-event-inner'>\";\n\t\tif (!event.allDay && segment.isStart) {\n\t\t\thtml +=\n\t\t\t\t\"<span class='fc-event-time'>\" +\n\t\t\t\thtmlEscape(t.getEventTimeText(event)) +\n\t\t\t\t\"</span>\";\n\t\t}\n\t\thtml +=\n\t\t\t\"<span class='fc-event-title'>\" +\n\t\t\thtmlEscape(event.title || '') +\n\t\t\t\"</span>\" +\n\t\t\t\"</div>\";\n\t\tif (event.allDay && segment.isEnd && isEventResizable(event)) {\n\t\t\thtml +=\n\t\t\t\t\"<div class='ui-resizable-handle ui-resizable-\" + (isRTL ? 'w' : 'e') + \"'>\" +\n\t\t\t\t\"&nbsp;&nbsp;&nbsp;\" + // makes hit area a lot better for IE6/7\n\t\t\t\t\"</div>\";\n\t\t}\n\t\thtml += \"</\" + (url ? \"a\" : \"div\") + \">\";\n\n\t\t// TODO:\n\t\t// When these elements are initially rendered, they will be briefly visibile on the screen,\n\t\t// even though their widths/heights are not set.\n\t\t// SOLUTION: initially set them as visibility:hidden ?\n\n\t\treturn html;\n\t}", "function EventRenderWrapper() {\n /**\n * Related elements\n */\n this.Elements = [];\n }", "function setEvents(events, elementID, from){\n var container = document.getElementById(elementID);\n while(container.firstChild){ container.removeChild(container.firstChild) }\n for(let i=0; i<events.length; i++){\n var div = document.createElement('div');\n div.className = \"event card-1\";\n div.onclick = () => goToEvent(events[i].id, from);\n \n var img = document.createElement('img');\n img.className = \"event_image\";\n img.src = events[i].image;\n div.appendChild(img);\n \n var title = document.createElement('p');\n title.className = \"eventBox_borderBottom\";\n var title_txt = document.createTextNode(events[i].title);\n title.append(title_txt);\n div.appendChild(title);\n \n var date = document.createElement('p');\n date.className = \"date_text\"\n var date_txt = document.createTextNode(createDateString(events[i].date));\n date.append(date_txt);\n div.appendChild(date);\n \n container.appendChild(div);\n }\n}", "function attachHandlers(segments, modifiedEventId) {\n\t\tvar segmentContainer = getDaySegmentContainer();\n\n\t\tsegmentElementEach(segments, function(segment, element, i) {\n\t\t\tvar event = segment.event;\n\t\t\tif (event._id === modifiedEventId) {\n\t\t\t\tbindDaySeg(event, element, segment);\n\t\t\t}else{\n\t\t\t\telement[0]._fci = i; // for lazySegBind\n\t\t\t}\n\t\t});\n\n\t\tlazySegBind(segmentContainer, segments, bindDaySeg);\n\t}", "function attachHandlers(segments, modifiedEventId) {\n\t\tvar segmentContainer = getDaySegmentContainer();\n\n\t\tsegmentElementEach(segments, function(segment, element, i) {\n\t\t\tvar event = segment.event;\n\t\t\tif (event._id === modifiedEventId) {\n\t\t\t\tbindDaySeg(event, element, segment);\n\t\t\t}else{\n\t\t\t\telement[0]._fci = i; // for lazySegBind\n\t\t\t}\n\t\t});\n\n\t\tlazySegBind(segmentContainer, segments, bindDaySeg);\n\t}", "function attachHandlers(segments, modifiedEventId) {\n\t\tvar segmentContainer = getDaySegmentContainer();\n\n\t\tsegmentElementEach(segments, function(segment, element, i) {\n\t\t\tvar event = segment.event;\n\t\t\tif (event._id === modifiedEventId) {\n\t\t\t\tbindDaySeg(event, element, segment);\n\t\t\t}else{\n\t\t\t\telement[0]._fci = i; // for lazySegBind\n\t\t\t}\n\t\t});\n\n\t\tlazySegBind(segmentContainer, segments, bindDaySeg);\n\t}", "function attachHandlers(segments, modifiedEventId) {\n\t\tvar segmentContainer = getDaySegmentContainer();\n\n\t\tsegmentElementEach(segments, function(segment, element, i) {\n\t\t\tvar event = segment.event;\n\t\t\tif (event._id === modifiedEventId) {\n\t\t\t\tbindDaySeg(event, element, segment);\n\t\t\t}else{\n\t\t\t\telement[0]._fci = i; // for lazySegBind\n\t\t\t}\n\t\t});\n\n\t\tlazySegBind(segmentContainer, segments, bindDaySeg);\n\t}", "function attachHandlers(segments, modifiedEventId) {\n\t\tvar segmentContainer = getDaySegmentContainer();\n\n\t\tsegmentElementEach(segments, function(segment, element, i) {\n\t\t\tvar event = segment.event;\n\t\t\tif (event._id === modifiedEventId) {\n\t\t\t\tbindDaySeg(event, element, segment);\n\t\t\t}else{\n\t\t\t\telement[0]._fci = i; // for lazySegBind\n\t\t\t}\n\t\t});\n\n\t\tlazySegBind(segmentContainer, segments, bindDaySeg);\n\t}", "function buildHTMLForSegment(segment) {\n\t\tvar html = '';\n\t\tvar isRTL = opt('isRTL');\n\t\tvar event = segment.event;\n\t\tvar url = event.url;\n\n\t\t// generate the list of CSS classNames\n\t\tvar classNames = [ 'fc-event', 'fc-event-hori' ];\n\t\tif (isEventDraggable(event)) {\n\t\t\tclassNames.push('fc-event-draggable');\n\t\t}\n\t\tif (segment.isStart) {\n\t\t\tclassNames.push('fc-event-start');\n\t\t}\n\t\tif (segment.isEnd) {\n\t\t\tclassNames.push('fc-event-end');\n\t\t}\n\t\t// use the event's configured classNames\n\t\t// guaranteed to be an array via `buildEvent`\n\t\tclassNames = classNames.concat(event.className);\n\t\tif (event.source) {\n\t\t\t// use the event's source's classNames, if specified\n\t\t\tclassNames = classNames.concat(event.source.className || []);\n\t\t}\n\n\t\t// generate a semicolon delimited CSS string for any of the \"skin\" properties\n\t\t// of the event object (`backgroundColor`, `borderColor` and such)\n\t\tvar skinCss = getSkinCss(event, opt);\n\n\t\tif (url) {\n\t\t\thtml += \"<a href='\" + htmlEscape(url) + \"'\";\n\t\t}else{\n\t\t\thtml += \"<div\";\n\t\t}\n\t\thtml +=\n\t\t\t\" class='\" + classNames.join(' ') + \"'\" +\n\t\t\t\" style=\" +\n\t\t\t\t\"'\" +\n\t\t\t\t\"position:absolute;\" +\n\t\t\t\t\"left:\" + segment.left + \"px;\" +\n\t\t\t\tskinCss +\n\t\t\t\t\"'\" +\n\t\t\t\">\" +\n\t\t\t\"<div class='fc-event-inner'>\";\n\t\tif (!event.allDay && segment.isStart) {\n\t\t\thtml +=\n\t\t\t\t\"<span class='fc-event-time'>\" +\n\t\t\t\thtmlEscape(\n\t\t\t\t\tformatDate(event.start, opt('timeFormat'))\n\t\t\t\t) +\n\t\t\t\t\"</span>\";\n\t\t}\n\t\thtml +=\n\t\t\t\"<span class='fc-event-title'>\" +\n\t\t\thtmlEscape(event.title || '') +\n\t\t\t\"</span>\" +\n\t\t\t\"</div>\";\n\t\tif (event.allDay && segment.isEnd && isEventResizable(event)) {\n\t\t\thtml +=\n\t\t\t\t\"<div class='ui-resizable-handle ui-resizable-\" + (isRTL ? 'w' : 'e') + \"'>\" +\n\t\t\t\t\"&nbsp;&nbsp;&nbsp;\" + // makes hit area a lot better for IE6/7\n\t\t\t\t\"</div>\";\n\t\t}\n\t\thtml += \"</\" + (url ? \"a\" : \"div\") + \">\";\n\n\t\t// TODO:\n\t\t// When these elements are initially rendered, they will be briefly visibile on the screen,\n\t\t// even though their widths/heights are not set.\n\t\t// SOLUTION: initially set them as visibility:hidden ?\n\n\t\treturn html;\n\t}", "function buildHTMLForSegment(segment) {\n\t\tvar html = '';\n\t\tvar isRTL = opt('isRTL');\n\t\tvar event = segment.event;\n\t\tvar url = event.url;\n\n\t\t// generate the list of CSS classNames\n\t\tvar classNames = [ 'fc-event', 'fc-event-hori' ];\n\t\tif (isEventDraggable(event)) {\n\t\t\tclassNames.push('fc-event-draggable');\n\t\t}\n\t\tif (segment.isStart) {\n\t\t\tclassNames.push('fc-event-start');\n\t\t}\n\t\tif (segment.isEnd) {\n\t\t\tclassNames.push('fc-event-end');\n\t\t}\n\t\t// use the event's configured classNames\n\t\t// guaranteed to be an array via `normalizeEvent`\n\t\tclassNames = classNames.concat(event.className);\n\t\tif (event.source) {\n\t\t\t// use the event's source's classNames, if specified\n\t\t\tclassNames = classNames.concat(event.source.className || []);\n\t\t}\n\n\t\t// generate a semicolon delimited CSS string for any of the \"skin\" properties\n\t\t// of the event object (`backgroundColor`, `borderColor` and such)\n\t\tvar skinCss = getSkinCss(event, opt);\n\n\t\tif (url) {\n\t\t\thtml += \"<a href='\" + htmlEscape(url) + \"'\";\n\t\t}else{\n\t\t\thtml += \"<div\";\n\t\t}\n\t\thtml +=\n\t\t\t\" class='\" + classNames.join(' ') + \"'\" +\n\t\t\t\" style=\" +\n\t\t\t\t\"'\" +\n\t\t\t\t\"position:absolute;\" +\n\t\t\t\t\"left:\" + segment.left + \"px;\" +\n\t\t\t\tskinCss +\n\t\t\t\t\"'\" +\n\t\t\t\">\" +\n\t\t\t\"<div class='fc-event-inner'>\";\n\t\tif (!event.allDay && segment.isStart) {\n\t\t\thtml +=\n\t\t\t\t\"<span class='fc-event-time'>\" +\n\t\t\t\thtmlEscape(\n\t\t\t\t\tformatDates(event.start, event.end, opt('timeFormat'))\n\t\t\t\t) +\n\t\t\t\t\"</span>\";\n\t\t}\n\t\thtml +=\n\t\t\t\"<span class='fc-event-title'>\" +\n\t\t\thtmlEscape(event.title || '') +\n\t\t\t\"</span>\" +\n\t\t\t\"</div>\";\n\t\tif (segment.isEnd && isEventResizable(event)) {\n\t\t\thtml +=\n\t\t\t\t\"<div class='ui-resizable-handle ui-resizable-\" + (isRTL ? 'w' : 'e') + \"'>\" +\n\t\t\t\t\"&nbsp;&nbsp;&nbsp;\" + // makes hit area a lot better for IE6/7\n\t\t\t\t\"</div>\";\n\t\t}\n\t\thtml += \"</\" + (url ? \"a\" : \"div\") + \">\";\n\n\t\t// TODO:\n\t\t// When these elements are initially rendered, they will be briefly visibile on the screen,\n\t\t// even though their widths/heights are not set.\n\t\t// SOLUTION: initially set them as visibility:hidden ?\n\n\t\treturn html;\n\t}", "function buildHTMLForSegment(segment) {\n\t\tvar html = '';\n\t\tvar isRTL = opt('isRTL');\n\t\tvar event = segment.event;\n\t\tvar url = event.url;\n\n\t\t// generate the list of CSS classNames\n\t\tvar classNames = [ 'fc-event', 'fc-event-hori' ];\n\t\tif (isEventDraggable(event)) {\n\t\t\tclassNames.push('fc-event-draggable');\n\t\t}\n\t\tif (segment.isStart) {\n\t\t\tclassNames.push('fc-event-start');\n\t\t}\n\t\tif (segment.isEnd) {\n\t\t\tclassNames.push('fc-event-end');\n\t\t}\n\t\t// use the event's configured classNames\n\t\t// guaranteed to be an array via `normalizeEvent`\n\t\tclassNames = classNames.concat(event.className);\n\t\tif (event.source) {\n\t\t\t// use the event's source's classNames, if specified\n\t\t\tclassNames = classNames.concat(event.source.className || []);\n\t\t}\n\n\t\t// generate a semicolon delimited CSS string for any of the \"skin\" properties\n\t\t// of the event object (`backgroundColor`, `borderColor` and such)\n\t\tvar skinCss = getSkinCss(event, opt);\n\n\t\tif (url) {\n\t\t\thtml += \"<a href='\" + htmlEscape(url) + \"'\";\n\t\t}else{\n\t\t\thtml += \"<div\";\n\t\t}\n\t\thtml +=\n\t\t\t\" class='\" + classNames.join(' ') + \"'\" +\n\t\t\t\" style=\" +\n\t\t\t\t\"'\" +\n\t\t\t\t\"position:absolute;\" +\n\t\t\t\t\"left:\" + segment.left + \"px;\" +\n\t\t\t\tskinCss +\n\t\t\t\t\"'\" +\n\t\t\t\">\" +\n\t\t\t\"<div class='fc-event-inner'>\";\n\t\tif (!event.allDay && segment.isStart) {\n\t\t\thtml +=\n\t\t\t\t\"<span class='fc-event-time'>\" +\n\t\t\t\thtmlEscape(\n\t\t\t\t\tformatDates(event.start, event.end, opt('timeFormat'))\n\t\t\t\t) +\n\t\t\t\t\"</span>\";\n\t\t}\n\t\thtml +=\n\t\t\t\"<span class='fc-event-title'>\" +\n\t\t\thtmlEscape(event.title || '') +\n\t\t\t\"</span>\" +\n\t\t\t\"</div>\";\n\t\tif (segment.isEnd && isEventResizable(event)) {\n\t\t\thtml +=\n\t\t\t\t\"<div class='ui-resizable-handle ui-resizable-\" + (isRTL ? 'w' : 'e') + \"'>\" +\n\t\t\t\t\"&nbsp;&nbsp;&nbsp;\" + // makes hit area a lot better for IE6/7\n\t\t\t\t\"</div>\";\n\t\t}\n\t\thtml += \"</\" + (url ? \"a\" : \"div\") + \">\";\n\n\t\t// TODO:\n\t\t// When these elements are initially rendered, they will be briefly visibile on the screen,\n\t\t// even though their widths/heights are not set.\n\t\t// SOLUTION: initially set them as visibility:hidden ?\n\n\t\treturn html;\n\t}", "function buildHTMLForSegment(segment) {\n\t\tvar html = '';\n\t\tvar isRTL = opt('isRTL');\n\t\tvar event = segment.event;\n\t\tvar url = event.url;\n\n\t\t// generate the list of CSS classNames\n\t\tvar classNames = [ 'fc-event', 'fc-event-hori' ];\n\t\tif (isEventDraggable(event)) {\n\t\t\tclassNames.push('fc-event-draggable');\n\t\t}\n\t\tif (segment.isStart) {\n\t\t\tclassNames.push('fc-event-start');\n\t\t}\n\t\tif (segment.isEnd) {\n\t\t\tclassNames.push('fc-event-end');\n\t\t}\n\t\t// use the event's configured classNames\n\t\t// guaranteed to be an array via `normalizeEvent`\n\t\tclassNames = classNames.concat(event.className);\n\t\tif (event.source) {\n\t\t\t// use the event's source's classNames, if specified\n\t\t\tclassNames = classNames.concat(event.source.className || []);\n\t\t}\n\n\t\t// generate a semicolon delimited CSS string for any of the \"skin\" properties\n\t\t// of the event object (`backgroundColor`, `borderColor` and such)\n\t\tvar skinCss = getSkinCss(event, opt);\n\n\t\tif (url) {\n\t\t\thtml += \"<a href='\" + htmlEscape(url) + \"'\";\n\t\t}else{\n\t\t\thtml += \"<div\";\n\t\t}\n\t\thtml +=\n\t\t\t\" class='\" + classNames.join(' ') + \"'\" +\n\t\t\t\" style=\" +\n\t\t\t\t\"'\" +\n\t\t\t\t\"position:absolute;\" +\n\t\t\t\t\"left:\" + segment.left + \"px;\" +\n\t\t\t\tskinCss +\n\t\t\t\t\"'\" +\n\t\t\t\">\" +\n\t\t\t\"<div class='fc-event-inner'>\";\n\t\tif (!event.allDay && segment.isStart) {\n\t\t\thtml +=\n\t\t\t\t\"<span class='fc-event-time'>\" +\n\t\t\t\thtmlEscape(\n\t\t\t\t\tformatDates(event.start, event.end, opt('timeFormat'))\n\t\t\t\t) +\n\t\t\t\t\"</span>\";\n\t\t}\n\t\thtml +=\n\t\t\t\"<span class='fc-event-title'>\" +\n\t\t\thtmlEscape(event.title || '') +\n\t\t\t\"</span>\" +\n\t\t\t\"</div>\";\n\t\tif (segment.isEnd && isEventResizable(event)) {\n\t\t\thtml +=\n\t\t\t\t\"<div class='ui-resizable-handle ui-resizable-\" + (isRTL ? 'w' : 'e') + \"'>\" +\n\t\t\t\t\"   \" + // makes hit area a lot better for IE6/7\n\t\t\t\t\"</div>\";\n\t\t}\n\t\thtml += \"</\" + (url ? \"a\" : \"div\") + \">\";\n\n\t\t// TODO:\n\t\t// When these elements are initially rendered, they will be briefly visibile on the screen,\n\t\t// even though their widths/heights are not set.\n\t\t// SOLUTION: initially set them as visibility:hidden ?\n\n\t\treturn html;\n\t}", "setElements() {\n this.$element = jQuery(this.element);\n this.$togglers = this.$element.find(this.options.togglersAttribute);\n }", "renderEvent(eventData) {\n // No point in rendering event that already has an element\n const data = eventData.renderData,\n {\n resourceRecord,\n assignmentRecord\n } = data,\n // Event element config, applied to existing element or used to create a new one below\n elementConfig = {\n className: data.wrapperCls,\n tabIndex: '0',\n children: [{\n className: data.cls,\n style: (data.internalStyle || '') + (data.style || ''),\n children: data.children,\n dataset: {\n // Each feature putting contents in the event wrap should have this to simplify syncing and\n // element retrieval after sync\n taskFeature: 'event'\n },\n syncOptions: {\n syncIdField: 'taskBarFeature'\n }\n }, ...data.wrapperChildren],\n style: {\n transform: `translate(${data.left}px, ${data.top}px)`,\n // DomHelper appends px to dimensions when using numbers\n height: data.height,\n width: data.width,\n zIndex: data.zIndex,\n style: data.wrapperStyle || ''\n },\n dataset: {\n resourceId: resourceRecord.id,\n eventId: data.eventId,\n // Not using eventRecord.id to distinguish between Event and ResourceTimeRange\n // Sync using assignment id for events and event id for ResourceTimeRanges\n syncId: assignmentRecord ? assignmentRecord.id : data.eventId\n },\n // Will not be part of DOM, but attached to the element\n elementData: eventData,\n // Dragging etc. flags element as retained, to not reuse/release it during that operation. Events\n // always use assignments, but ResourceTimeRanges does not\n retainElement: (assignmentRecord || data.eventRecord).instanceMeta(this.scheduler).retainElement,\n // Options for this level of sync, lower levels can have their own\n syncOptions: {\n syncIdField: 'taskFeature',\n // Remove instead of release when a feature is disabled\n releaseThreshold: 0\n }\n }; // Do not want to spam dataset with empty prop when not using assignments (ResourceTimeRanges)\n\n if (assignmentRecord) {\n elementConfig.dataset.assignmentId = assignmentRecord.id;\n }\n\n this.scheduler.trigger('beforeRenderEvent', {\n renderData: data,\n domConfig: elementConfig\n }); // Allows access to the used config later, for example to retrieve element\n\n eventData.elementConfig = elementConfig;\n return elementConfig;\n }", "renderElements()\n {\n \tlet self = this;\n \t\n \t// TODO: Handle no section?\n \tif( !self.activeSection ) return;\n \t\n \tif( self.renderingElements ) \n \t{\n \t\treturn;\n \t}\n \t\n \tself.renderingElements = true;\n \t\n \tif( !self.currentPage )\n \t{\n \t\tself.currentPage = 0;\n \t}\n \t\n \tself.canvasContent.innerHTML = '';\n \t\n\t self.canvasHeader.innerHTML = self.course.Name + \n\t \t' <span class=\"IconSmall fa-chevron-right\"></span> ' + \n\t \tself.getCurrentSection().Name + \n\t \t' <span class=\"IconSmall fa-chevron-right\"></span> ' + \n\t \tself.getCurrentPage().Name;\n \t\n \tlet act = false;\n \tfor( let a in self.sections )\n \t\tif( a == self.activeSection )\n \t\t\tact = self.sections[ a ];\n \t\n \tlet csId = self.#courseSessionId;\n \t\n \tif( act && act.pages && act.pages[self.currentPage] )\n \t{\n \t\t// Ref the page\n \t\tlet page = act.pages[self.currentPage];\n\t\t\t// Load all elements for the page\n\t\t\tlet m = new Module( 'system' );\n\t\t\tm.onExecuted = function( e, d )\n\t\t\t{\n\t\t\t\tif( e != 'ok' ) \n\t\t\t\t{\n\t\t\t\t\tself.renderingElements = false;\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tlet els = JSON.parse( d );\n\t\t\t\tfor( let a = 0; a < els.length; a++ )\n\t\t\t\t{\n\t\t\t\t\t// Convert from BASE64\n\t\t\t\t\tif( els[a].Properties.substr && els[a].Properties.substr( 0, 7 ) == 'BASE64:' )\n\t\t\t\t\t{\n\t\t\t\t\t\tels[a].Properties = Base64.decode( els[a].Properties.substr( 7, els[a].Properties.length - 7 ) );\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tlet ele = self.createElement( els[a].ElementType, els[a] );\n\t\t\t\t\tself.addToCanvas( ele );\n\t\t\t\t\tif( ele.init )\n\t\t\t\t\t\tele.init();\n\t\t\t\t}\n\t\t\t\tFUI.initialize();\n\t\t\t\tself.renderingElements = false;\n\t\t\t\t\n\t\t\t\t// Update page status (tick off the box)\n\t\t\t\tlet p = new Module( 'system' );\n\t\t\t\tp.onExecuted = function( pc, pd )\n\t\t\t\t{\n\t\t\t\t\t// nothing\n\t\t\t\t\tconsole.log( 'What result of page status: ', pc, pd );\n\t\t\t\t}\n\t\t\t\tp.execute( 'appmodule', {\n\t\t\t\t\tappName: 'Courses',\n\t\t\t\t\tcommand: 'setpagestatus',\n\t\t\t\t\tpageId: page.ID,\n\t\t\t\t\tcourseSessionId: csId\n\t\t\t\t} );\n\t\t\t\t\n\t\t\t\tself.redrawNavPanel();\n\t\t\t\n\t\t\t\t// Check which state the buttons are in\n\t\t\t\tself.checkNavButtons();\n\t\t\t}\n\t\t\t\n\t\t\tm.execute( 'appmodule', {\n\t\t\t\tappName: 'Courses',\n\t\t\t\tcommand: 'loadpageelements',\n\t\t\t\tpageId: page.ID\n\t\t\t} );\n\t\t}\n\t\telse\n\t\t{\n\t\t\tself.renderingElements = false;\n\t\t}\n }", "function getEvents(element) {\n if(element.children.length === 0) {\n let events = [];\n $.each($._data(element, \"events\"), function(i, event) {\n events.push(event);\n });\n\n if(events.length > 0) {\n events.forEach(event => {\n placeHandler(element, event[0][\"type\"]);\n });\n }\n }\n else {\n for (let i = 0; i < element.children.length; i++)\n getEvents(element.children[i]);\n }\n}", "function renderEvents() {\n var totalPercent = 100,\n currentEvent,\n curCol,\n width,\n height,\n leftOffset,\n eventText,\n i,\n j;\n \n // empty container before adding new events\n $el.empty();\n \n // go through all columns\n for (i=0; i<columns.length; i++) {\n \n // go through all events in single column\n for (j=0; j<columns[i].length; j++) {\n currentEvent = columns[i][j];\n \n width = totalPercent / (columnWidths[currentEvent.groupIndex] + 1);\n height = currentEvent.end - currentEvent.start;\n leftOffset = i * width;\n \n // If container is too short, only display event title\n if (height < 45) {\n eventText = \"<h2>Sample Event</h2>\";\n }\n // Otherwise, display event title & location\n else {\n eventText = \"<h2>Sample Event</h2><h3>Sample Location</h3>\";\n }\n \n $el.append('<div class=\"calendarSlot\" style=\"width: ' + width + '%; height:'+ height +'px; top:' + currentEvent.start + 'px; left: ' + leftOffset + '%\">' + eventText + '</div>');\n }\n }\n }", "function ini_events(ele) {\n ele.each(function () {\n\n // create an Event Object (http://arshaw.com/fullcalendar/docs/event_data/Event_Object/)\n // it doesn't need to have a start or end\n var eventObject = {\n title: $.trim($(this).text()) // use the element's text as the event title\n }\n\n // store the Event Object in the DOM element so we can get to it later\n $(this).data('eventObject', eventObject)\n\n // make the event draggable using jQuery UI\n $(this).draggable({\n zIndex : 1070,\n revert : true, // will cause the event to go back to its\n revertDuration: 0 // original position after the drag\n })\n\n })\n }", "renderEvent(eventData) {\n // No point in rendering event that already has an element\n const data = eventData.tplData,\n { resourceRecord, eventRecord } = data,\n // Event element config, applied to existing element or used to create a new one below\n elementConfig = {\n className: data.wrapperCls,\n tabIndex: '0',\n children: [\n {\n className: data.cls,\n style: (data.internalStyle || '') + (data.style || ''),\n // Clone to be repeatable\n html: data.body.cloneNode(true),\n // Used for comparison, cheaper than comparing fragment from above\n compareHtml: data.eventContent\n }\n ],\n style: {\n transform: `translate(${data.left}px, ${data.top}px)`,\n // DomHelper appends px to dimensions when using numbers\n height: data.height,\n width: data.width,\n zIndex: data.zIndex\n },\n dataset: {\n resourceId: resourceRecord.id,\n eventId: data.eventId, // Not using eventRecord.id to distinguish between Event and ResourceTimeRange\n // Sync using assignment id in multi assignment mode or event id in single assignment mode\n syncId: data.assignment ? data.assignment.id : data.eventId\n },\n // Will not be part of DOM, but attached to the element\n elementData: eventData,\n // Dragging etc. flags element as retained, to not reuse/release it during that operation\n retainElement: eventRecord.instanceMeta(this.scheduler).retainElement\n };\n\n // Do not want to spam dataset with empty prop when not using assignments\n if (data.assignment) {\n elementConfig.dataset.assignmentId = data.assignment.id;\n }\n\n return elementConfig;\n }", "function SetElements()\r\n {\r\n var events = _settings.events,\r\n parent = _settings.appendto,\r\n cssafter = _settings.csssettings.insertafter;\r\n\r\n $.when(\r\n GetElement(parent),\r\n GetElement(cssafter)\r\n )\r\n .then(function(p,c)\r\n {\r\n if(!p)\r\n {\r\n Error.call(this,'_settings.appendto null or undefined.');\r\n return;\r\n }\r\n\r\n if(!c)\r\n {\r\n Error.call(this,'_settings.csssettings.insertafter null or undefined.');\r\n return;\r\n }\r\n\r\n _data.dialogparent = $(p);\r\n _data.cssafter = $(c);\r\n SetCSS();\r\n }, Error);\r\n }", "function ini_events(ele) {\n ele.each(function () {\n\n // create an Event Object (http://arshaw.com/fullcalendar/docs/event_data/Event_Object/)\n // it doesn't need to have a start or end\n var eventObject = {\n title: $.trim($(this).text()) // use the element's text as the event title\n };\n\n // store the Event Object in the DOM element so we can get to it later\n $(this).data('eventObject', eventObject);\n\n // make the event draggable using jQuery UI\n $(this).draggable({\n zIndex: 1070,\n revert: true, // will cause the event to go back to its\n revertDuration: 0 // original position after the drag\n });\n\n });\n }", "onRenderDone() {\n const {\n scheduler,\n rowMap\n } = this,\n visibleEventDOMConfigs = []; // Concat all rows event configs\n\n rowMap.forEach(eventDOMConfigs => visibleEventDOMConfigs.push.apply(visibleEventDOMConfigs, eventDOMConfigs));\n DomSync.sync({\n domConfig: {\n onlyChildren: true,\n children: visibleEventDOMConfigs\n },\n targetElement: scheduler.foregroundCanvas,\n syncIdField: 'syncId',\n\n // Called by DomHelper when it creates, releases or reuses elements\n callback({\n action,\n domConfig,\n lastDomConfig,\n targetElement\n }) {\n var _domConfig$className;\n\n // If element is a task wrap, trigger appropriate events\n if (action !== 'none' && (domConfig === null || domConfig === void 0 ? void 0 : (_domConfig$className = domConfig.className) === null || _domConfig$className === void 0 ? void 0 : _domConfig$className[`${scheduler.eventCls}-wrap`])) {\n const // Some actions are considered first a release and then a render (reusing another element).\n // This gives clients code a chance to clean up before reusing an element\n isRelease = releaseEventActions[action],\n isRender = renderEventActions[action]; // Trigger release for events (it might be a proxy element, skip those)\n\n if (isRelease && (lastDomConfig === null || lastDomConfig === void 0 ? void 0 : lastDomConfig.elementData)) {\n const {\n eventRecord,\n resourceRecord,\n assignmentRecord\n } = lastDomConfig.elementData,\n event = {\n renderData: lastDomConfig.elementData,\n element: targetElement,\n eventRecord,\n resourceRecord,\n assignmentRecord\n }; // Some browsers do not blur on set to display:none, so releasing the active element\n // must *explicitly* move focus outwards to the view.\n\n if (targetElement === document.activeElement) {\n scheduler.focusElement.focus();\n } // This event is documented on Scheduler\n\n scheduler.trigger('releaseEvent', event);\n }\n\n if (isRender) {\n const {\n eventRecord,\n resourceRecord,\n assignmentRecord\n } = domConfig.elementData,\n event = {\n renderData: domConfig.elementData,\n tplData: domConfig.elementData,\n // DEPRECATED IN 4.0\n element: targetElement,\n isReusingElement: action === 'reuseElement',\n isRepaint: action === 'reuseOwnElement',\n eventRecord,\n resourceRecord,\n assignmentRecord\n }; // This event is documented on Scheduler\n\n scheduler.trigger('renderEvent', event);\n }\n }\n }\n\n }); // There are multiple pathways that might lead to the first render of events. This is the first reliable\n // place were we can determine that something will be rendered\n\n visibleEventDOMConfigs.length && scheduler._firstRenderDone && scheduler._firstRenderDone();\n }", "function ini_events(ele) {\n ele.each(function () {\n\n // create an Event Object (http://arshaw.com/fullcalendar/docs/event_data/Event_Object/)\n // it doesn't need to have a start or end\n var eventObject = {\n title: $.trim($(this).text()) // use the element's text as the event title\n };\n\n // store the Event Object in the DOM element so we can get to it later\n $(this).data('eventObject', eventObject);\n\n // make the event draggable using jQuery UI\n $(this).draggable({\n zIndex: 1070,\n revert: true, // will cause the event to go back to its\n revertDuration: 0 // original position after the drag\n });\n\n });\n }", "function addElementHandles() {\n // CURRENTLY UNUSED\n var viewportSVG = d3.selectAll(\"#viz-outer-frame div.vega svg\");\n if (viewportSVG.empty()) {\n console.warn(\"addElementHandles(): viewport SVG not found!\");\n return null;\n }\n if (viewportSVG.selectAll(\"#handles\").empty()) {\n // create a linked instance of handles\n viewportSVG.insert('use', 'svg > g')\n .attr('id', 'handles')\n .attr('xlink:href', '#manipulation-handles');\n }\n // TODO: clear and (re)build handles for all active elements?\n}", "@action\n\tdidInsert(element) {\n\t\tthis.debug(`didInsert`);\n\t\tthis._element = element;\n\n\t\trun.next(() => {\n\t\t\tif(this.isDestroying || this.isDestroyed)\n\t\t\t\treturn;\n\n\t\t\tthis._elementDidRender = true;\n\t\t});\n\t}", "function l(a,b){J.push({event:a,element:b}),I[a._id]?I[a._id].push(b):I[a._id]=[b]}", "function ini_events(ele) {\n\t\t\t $scope.ele = ele\n ele.each(function () {\n\n // create an Event Object (http://arshaw.com/fullcalendar/docs/event_data/Event_Object/)\n // it doesn't need to have a start or end\n\n var eventObject = {\n title: $.trim($(this).text()), // use the element's text as the event title\n\t\t\t\t\t id: $(this).context.align\n };\n\n // store the Event Object in the DOM element so we can get to it later\n $(this).data('eventObject', eventObject);\n\n // make the event draggable using jQuery UI\n $(this).draggable({\n zIndex: 1070,\n revert: true, // will cause the event to go back to its\n revertDuration: 0 // original position after the drag\n });\n\n });\n }", "setElement(element) {\n this.element = element;\n }", "function resizeEvents() {\n var $slices = $('.interlace');\n\n $slices.each(function() {\n var $slice = $(this);\n var originalHTML = $slice.find('.interlace-item').html();\n\n $slice.find('.interlace-item').removeClass('active');\n $slice.find('.interlace-clone-wrapper').remove();\n });\n\n $('.interlace').each(function() {\n App.interlace({\n el: $(this)\n });\n });\n }", "function insertEventsIntoElement(elem, obj) {\n // first of all we remove all elements from component\n elem.empty();\n\n // if current user is interpreter\n if (currentRole === 1) {\n // TODO: Remove this line!!!\n var eventsListTitle = $(\"<h2></h2>\");\n var resultBlock;\n\n // we looping through all events in chat data and insert it into chat component\n for (var i = 0, lim = obj.events.length; i < lim; i += 1) {\n elem.append(detectEventType(obj.events[i]));\n }\n\n return elem;\n // if current user is business\n } else {\n // we create conversation title element and add proper classes to it\n var eventsListTitle = $(\"<h2></h2>\");\n\n eventsListTitle.addClass(chatEventsListTitle.slice(1));\n eventsListTitle.html(window.__(\"Conversation with\") + \" <u><a class='skiwo-link' href='\" + obj.inter_link + \"'>\"+ obj.inter_first_name + \" \" + obj.inter_last_name + \"</a></u>\");\n elem.append(eventsListTitle);\n\n // then we sort all events from the earliest the latest\n obj.events.sort(function(a, b) {\n var first = new Date(a.sys_date);\n var second = new Date(b.sys_date);\n if (first.getTime() < second.getTime()) {\n return -1;\n } else if (first.getTime() > second.getTime()) {\n return 1;\n } else {\n return 0;\n }\n });\n\n // and fill in events container with events\n for (var i = 0, lim = obj.events.length; i < lim; i += 1) {\n elem.append(detectEventType(obj.events[i]));\n }\n\n return elem;\n }\n } // end of filling in chat container function", "setElement(elem) {\n this.element = elem;\n }", "function _addNewElements(type, scope, controller, handlers, objectCache, optionsFn, objectsName) {\n var added = [];\n angular.forEach(objectCache, function(object, id) {\n var element = controller.getElement(type, scope.$id, id);\n\n var options = optionsFn(object);\n if (options == null) {\n return;\n }\n\n if (element) {\n controller.updateElement(type, scope.$id, id, options);\n } else {\n controller.addElement(type, scope.$id, id, options, objectsName);\n element = controller.getElement(type, scope.$id, id);\n added.push({\n id: id,\n element: element\n });\n\n // set up element event handlers\n angular.forEach(handlers, function(handler, event) {\n controller.addListener(element, event, function() {\n $timeout(function() {\n var context = {object: object};\n context[type] = element;\n if ((angular.version.major <= 1) && (angular.version.minor <= 2)) {\n // scope is this directive's isolate scope\n // scope.$parent is the scope of ng-transclude\n // scope.$parent.$parent is the one we want\n handler(scope.$parent.$parent, context);\n } else {\n handler(scope.$parent.$parent.$parent , context);\n }\n });\n });\n });\n }\n });\n if (added.length > 0) {\n scope.$emit(_formatEventName('gmShapesAdded', type), objectsName, added);\n }\n }", "function attach ( events, element, callback, data ) {\n\t\n\t\t\t// This function can be used to 'filter' events to the slider.\n\t\t\t// element is a node, not a nodeList\n\t\n\t\t\tvar method = function ( e ){\n\t\n\t\t\t\tif ( scope_Target.hasAttribute('disabled') ) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\n\t\t\t\t// Stop if an active 'tap' transition is taking place.\n\t\t\t\tif ( hasClass(scope_Target, cssClasses[14]) ) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\n\t\t\t\te = fixEvent(e, data.pageOffset);\n\t\n\t\t\t\t// Ignore right or middle clicks on start #454\n\t\t\t\tif ( events === actions.start && e.buttons !== undefined && e.buttons > 1 ) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\n\t\t\t\t// Ignore right or middle clicks on start #454\n\t\t\t\tif ( data.hover && e.buttons ) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\n\t\t\t\te.calcPoint = e.points[ options.ort ];\n\t\n\t\t\t\t// Call the event handler with the event [ and additional data ].\n\t\t\t\tcallback ( e, data );\n\t\n\t\t\t}, methods = [];\n\t\n\t\t\t// Bind a closure on the target for every event type.\n\t\t\tevents.split(' ').forEach(function( eventName ){\n\t\t\t\telement.addEventListener(eventName, method, false);\n\t\t\t\tmethods.push([eventName, method]);\n\t\t\t});\n\t\n\t\t\treturn methods;\n\t\t}", "appendInto(e){this.startNode=e.appendChild(createMarker()),this.endNode=e.appendChild(createMarker())}", "function setEvents() {\n\t$('.removeModel').on(\"click\", function() {\n\t\t$(this).parent().remove();\n\t});\n\t\n\t$('label').mouseover(function() {\n\t\t$('.tooltip').hide();\n\t\t$(this).parent().children('.tooltip').fadeIn();\n\t});\n\t\n\t$('label').mouseout(function() {\n\t\t$(this).parent().children('.tooltip').fadeOut();\n\t});\n\t\n\t$('.slider').each(function() {\n\t\t\n\t\tvar paramValue = $(this).parent().children('.paramValue');\n\t\t\n\t\tvar minVal = parseInt($(this).attr('min'));\n\t\tvar maxVal = parseInt($(this).attr('max'));\n\t\tvar curVal = parseInt(paramValue.html());\n\t\t\n\t\t$(this).slider({\n\t\t\tmin: minVal,\n\t\t\tmax: maxVal,\n\t\t\tvalue: curVal,\n\t\t\tslide: function( event, ui ) {\n\t\t\t\tparamValue.html(ui.value);\n\t\t\t}\n\t\t});\n\t});\n}", "setElement(newElement) {\n this.#element = newElement;\n }", "function attach(events, element, callback, data) {\n // This function can be used to 'filter' events to the slider.\n // element is a node, not a nodeList\n var method = function(e) {\n if (scope_Target.hasAttribute('disabled')) {\n return false;\n }\n // Stop if an active 'tap' transition is taking place.\n if (hasClass(scope_Target, cssClasses[14])) {\n return false;\n }\n e = fixEvent(e, data.pageOffset);\n // Ignore right or middle clicks on start #454\n if (events === actions.start && e.buttons !== undefined && e.buttons >\n 1) {\n return false;\n }\n // Ignore right or middle clicks on start #454\n if (data.hover && e.buttons) {\n return false;\n }\n e.calcPoint = e.points[options.ort];\n // Call the event handler with the event [ and additional data ].\n callback(e, data);\n },\n methods = [];\n // Bind a closure on the target for every event type.\n events.split(' ').forEach(function(eventName) {\n element.addEventListener(eventName, method, false);\n methods.push([eventName, method]);\n });\n return methods;\n }", "function setupSegmentControls() {\n // Load segmentations from the server\n $.getJSON(SEGMENTATIONS_URL, function(segmentations) {\n // Set up controls for the segmentations\n for(var category in segmentations) { // for each segmentation:\n if(segmentations.hasOwnProperty(category)) {\n // Create an option to turn it on\n $('.segment-select').append('<option>' + category + '</option>');\n\n // Create a div for checkboxes\n $('.segment-boxes').append('<ul class=\"segment-' + category + ' segment-box controls\"></ul>');\n\n // Add an \"other\" option\n segmentations[category].push('Other');\n\n // Create a checkbox for each segment\n segmentations[category].forEach(function(segment) {\n $('.segment-' + category).append(\n '<li><label class=\"checkbox\"><input class=\"segment-toggle\" type=\"checkbox\" checked=\"checked\" value=\"' +\n segment + '\">' + segment + '</label></li>');\n });\n }\n }\n\n // React to toggling segments\n $('input.segment-toggle').click(function(e) {\n var report = targetReport(e.target);\n var success = updateDisplayedSegments(report);\n\n // If the update failed, leave the checkbox in its original state.\n // @see updateDisplayedSegments for why this might happen\n if(! success) {\n e.preventDefault();\n }\n });\n });\n}", "function renderUI(rows) {\n for (var i = 0; i < rows.length; i++) {\n var columnWidth = 600 / rows[i].columns.length;\n var rowDiv = \"\",\n columnDiv = \"\",\n columnGroup = \"\",\n eventItem = \"\";\n for (var j = rows[i].columns.length - 1; j >= 0; j--) {\n var columns = rows[i].columns[j].events;\n eventItem = \"\";\n for (var k = 0; k < columns.length; k++) {\n eventItem = eventItem + '<div class=\"event-item\" style=\"width:' + columnWidth + 'px;top:' + columns[k].start + 'px;\"><div style=\"background-color:' + columns[k].color + '\"></div><div>' + columns[k].label + '</div></div>';\n }\n columnGroup = columnGroup + '<div class=\"column\" style=\"width:' + columnWidth + 'px;\">' + eventItem + '</div>';\n }\n rowDiv = rowDiv + '<div class=\"row\">' + columnGroup + '</div>';\n $('#eventDisplayArea').append(rowDiv);\n }\n}", "function renderEvents(){\n for(var i=0; i<eventArray.length; i++){\n //for eventArray[i], look at its eventArray[i].id\n //then set the textContent of the .description with that id \n //to the eventArray[i].desc\n $(\".description#desc\"+eventArray[i].id).children().text(eventArray[i].desc); \n }\n}", "function attach ( events, element, callback, data ) {\r\n\r\n\t\t\t// This function can be used to 'filter' events to the slider.\r\n\t\t\t// element is a node, not a nodeList\r\n\r\n\t\t\tvar method = function ( e ){\r\n\r\n\t\t\t\tif ( scope_Target.hasAttribute('disabled') ) {\r\n\t\t\t\t\treturn false;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// Stop if an active 'tap' transition is taking place.\r\n\t\t\t\tif ( hasClass(scope_Target, options.cssClasses.tap) ) {\r\n\t\t\t\t\treturn false;\r\n\t\t\t\t}\r\n\r\n\t\t\t\te = fixEvent(e, data.pageOffset);\r\n\r\n\t\t\t\t// Ignore right or middle clicks on start #454\r\n\t\t\t\tif ( events === actions.start && e.buttons !== undefined && e.buttons > 1 ) {\r\n\t\t\t\t\treturn false;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// Ignore right or middle clicks on start #454\r\n\t\t\t\tif ( data.hover && e.buttons ) {\r\n\t\t\t\t\treturn false;\r\n\t\t\t\t}\r\n\r\n\t\t\t\te.calcPoint = e.points[ options.ort ];\r\n\r\n\t\t\t\t// Call the event handler with the event [ and additional data ].\r\n\t\t\t\tcallback ( e, data );\r\n\r\n\t\t\t}, methods = [];\r\n\r\n\t\t\t// Bind a closure on the target for every event type.\r\n\t\t\tevents.split(' ').forEach(function( eventName ){\r\n\t\t\t\telement.addEventListener(eventName, method, false);\r\n\t\t\t\tmethods.push([eventName, method]);\r\n\t\t\t});\r\n\r\n\t\t\treturn methods;\r\n\t\t}", "initClickHandlers() {\n this.domElements.tabSelected = $('.tabBars');\n this.domElements.containerSelected = $('.businessContainer');\n $('.eventsContainer').on('click', '.event', this.domClickHandler);\n $('.businessContainer').on('click', '.business', this.domClickHandler);\n $('.mapContainer').on('click', '.addLocation', this.addLocationClickHandler);\n $('.calculateRoute').on('click', this.apiList.map.calculateAndDisplayRoute);\n $('.tabContainer').on('click', '.tab', this.tabClickHandler);\n }", "render() {\n const anomaliesFilters = this.anomalyFilterModel.getAnomaliesFilters();\n const anomaly_filters_compiled = this.anomaly_filters_template_compiled({ anomaliesFilters });\n $('#anomaly-filters-place-holder').children().remove();\n $('#anomaly-filters-place-holder').html(anomaly_filters_compiled);\n\n this.setupFilterListener();\n this.checkSelectedFilters();\n\n }", "renderer() {\n const me = this,\n { scheduler } = me,\n { resourceStore } = scheduler,\n // Determine resource range to draw events for\n { firstResource, lastResource } = me.resourceRange,\n // Date at top and bottom for determining which events to include\n { topDate, bottomDate } = me.dateRange,\n syncConfigs = [];\n\n if (!me.initialized) {\n return;\n }\n\n // Update current time range, reflecting the change on the vertical time axis header\n if (!DateHelper.isEqual(topDate, me.topDate) || !DateHelper.isEqual(bottomDate, me.bottomDate)) {\n // Calculated values used by `renderResource()`\n me.topDate = topDate;\n me.bottomDate = bottomDate;\n me.topDateMS = topDate.getTime();\n me.bottomDateMS = bottomDate.getTime();\n\n me.timeView.range = { topDate, bottomDate };\n }\n\n if (firstResource !== -1 && lastResource !== -1) {\n // Collect all events for resources in view\n for (let i = firstResource; i <= lastResource; i++) {\n syncConfigs.push.apply(syncConfigs, me.renderResource(resourceStore.getAt(i)));\n }\n }\n\n DomHelper.sync({\n elementConfig: {\n onlyChildren: true,\n children: syncConfigs\n },\n targetElement: scheduler.foregroundCanvas,\n useSyncId: true,\n\n // Called by DomHelper when it creates, releases or reuses elements\n callback({ action, config, oldConfig, element }) {\n // If element is an event wrap, trigger appropriate events\n if (config && config.className && config.className[scheduler.eventCls + '-wrap']) {\n const // Some actions are considered first a release and then a render (reusing another element).\n // This gives clients code a chance to clean up before reusing an element\n isRelease = releaseEventActions[action],\n isRender = renderEventActions[action];\n\n // If we are reusing an element that was previously released we should not trigger again\n if (isRelease && oldConfig) {\n const data = oldConfig.elementData.tplData,\n event = {\n tplData: data,\n assignmentRecord: data.assignment,\n eventRecord: data.eventRecord,\n resourceRecord: data.resourceRecord,\n element\n };\n // This event is documented on Scheduler\n scheduler.trigger('releaseEvent', event);\n }\n\n if (isRender) {\n const data = config.elementData.tplData,\n event = {\n tplData: data,\n assignmentRecord: data.assignment,\n eventRecord: data.eventRecord,\n resourceRecord: data.resourceRecord,\n element\n };\n\n // Store element to allow easy mapping from record\n element.elementData.element = element;\n\n event.reusingElement = action === 'reuseElement';\n // This event is documented on Scheduler\n scheduler.trigger('renderEvent', event);\n }\n\n // No changes during sync, but might need to hook up element again in case cache was cleared\n if (action === 'none') {\n config.elementData.element = element;\n }\n }\n }\n });\n\n // Change in displayed resources?\n if (me.firstResource !== firstResource || me.lastResource !== lastResource) {\n // Update header to match\n me.resourceColumns.range = { firstResource, lastResource };\n\n // Store which resources are currently in view\n me.firstResource = firstResource;\n me.lastResource = lastResource;\n }\n }", "setElement ({ commit }, el) { // replaces entire object\n commit('setElement', el)\n }", "function attach ( events, element, callback, data ) {\r\n\r\n\t\t// This function can be used to 'filter' events to the slider.\r\n\t\t// element is a node, not a nodeList\r\n\r\n\t\tvar method = function ( e ){\r\n\r\n\t\t\tif ( scope_Target.hasAttribute('disabled') ) {\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\r\n\t\t\t// Stop if an active 'tap' transition is taking place.\r\n\t\t\tif ( hasClass(scope_Target, options.cssClasses.tap) ) {\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\r\n\t\t\te = fixEvent(e, data.pageOffset);\r\n\r\n\t\t\t// Ignore right or middle clicks on start #454\r\n\t\t\tif ( events === actions.start && e.buttons !== undefined && e.buttons > 1 ) {\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\r\n\t\t\t// Ignore right or middle clicks on start #454\r\n\t\t\tif ( data.hover && e.buttons ) {\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\r\n\t\t\te.calcPoint = e.points[ options.ort ];\r\n\r\n\t\t\t// Call the event handler with the event [ and additional data ].\r\n\t\t\tcallback ( e, data );\r\n\r\n\t\t}, methods = [];\r\n\r\n\t\t// Bind a closure on the target for every event type.\r\n\t\tevents.split(' ').forEach(function( eventName ){\r\n\t\t\telement.addEventListener(eventName, method, false);\r\n\t\t\tmethods.push([eventName, method]);\r\n\t\t});\r\n\r\n\t\treturn methods;\r\n\t}", "initDomEvents() {\n const me = this; // Set thisObj and element of the configured listener specs.\n\n me.scheduledBarEvents.element = me.schedulerEvents.element = me.timeAxisSubGridElement;\n me.scheduledBarEvents.thisObj = me.schedulerEvents.thisObj = me; // same listener used for different events\n\n EventHelper.on(me.scheduledBarEvents);\n EventHelper.on(me.schedulerEvents);\n }", "function repaintSegments() {\n\t\tupdateDescriptions();\n\t\tfor (var i = 0; i < segments.length; i++) {\n\t\t\tremoveSegment(segments[i]);\n\t\t}\n\t\tfor (var i = 0; i < segments.length; i++) {\n\t\t\taddSegment(segments[i]);\n\t\t}\n\t}", "function ini_events(ele) {\r\n\t\tele.each(function() {\r\n\t\t\t// create an Event Object\r\n\t\t\t// (http://arshaw.com/fullcalendar/docs/event_data/Event_Object/)\r\n\t\t\t// it doesn't need to have a start or end\r\n\t\t\tvar eventObject = {\r\n\t\t\t\ttitle : $.trim($(this).text())\r\n\t\t\t// use the element's text as the event title\r\n\t\t\t};\r\n\t\t});\r\n\t}", "_startRender() {\n this._allowRegisterSegment = true;\n }", "_setEventHandlers(className, handler) {\n\t\t\t// Can't use forEach on a HTMLCollection, do the old for()\n\t\t\tlet nodes = document.getElementById('results-summary').getElementsByClassName(className);\n\t\t\tfor (let i=0; i<nodes.length; i++) {\n\t\t\t\t// Set up click events on facets\n\t\t\t\tnodes[i].addEventListener('click', handler.bind(this));\n\t\t\t}\n\t\t}", "initEvents() {\n return __awaiter(this, void 0, void 0, function* () {\n yield Promise.all([\n this.renderMathJax(),\n this.renderZenUML(),\n this.renderWavedrom(),\n ]);\n this.previewElement.innerHTML = this.hiddenPreviewElement.innerHTML;\n this.hiddenPreviewElement.innerHTML = \"\";\n yield Promise.all([\n this.renderFlowchart(),\n this.renderInteractiveVega(),\n this.renderSequenceDiagram(),\n this.renderMermaid(),\n ]);\n this.setupCodeChunks();\n if (this.refreshingIconTimeout) {\n clearTimeout(this.refreshingIconTimeout);\n this.refreshingIconTimeout = null;\n }\n this.refreshingIcon.style.display = \"none\";\n });\n }", "element(element){\r\n element.setInnerContent(this.content);\r\n}", "function attach ( events, element, callback, data ) {\n\n\t\t// This function can be used to 'filter' events to the slider.\n\t\t// element is a node, not a nodeList\n\n\t\tvar method = function ( e ){\n\n\t\t\tif ( scope_Target.hasAttribute('disabled') ) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\t// Stop if an active 'tap' transition is taking place.\n\t\t\tif ( hasClass(scope_Target, options.cssClasses.tap) ) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\te = fixEvent(e, data.pageOffset);\n\n\t\t\t// Ignore right or middle clicks on start #454\n\t\t\tif ( events === actions.start && e.buttons !== undefined && e.buttons > 1 ) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\t// Ignore right or middle clicks on start #454\n\t\t\tif ( data.hover && e.buttons ) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\te.calcPoint = e.points[ options.ort ];\n\n\t\t\t// Call the event handler with the event [ and additional data ].\n\t\t\tcallback ( e, data );\n\n\t\t}, methods = [];\n\n\t\t// Bind a closure on the target for every event type.\n\t\tevents.split(' ').forEach(function( eventName ){\n\t\t\telement.addEventListener(eventName, method, false);\n\t\t\tmethods.push([eventName, method]);\n\t\t});\n\n\t\treturn methods;\n\t}", "function attach ( events, element, callback, data ) {\n\n\t\t// This function can be used to 'filter' events to the slider.\n\t\t// element is a node, not a nodeList\n\n\t\tvar method = function ( e ){\n\n\t\t\tif ( scope_Target.hasAttribute('disabled') ) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\t// Stop if an active 'tap' transition is taking place.\n\t\t\tif ( hasClass(scope_Target, options.cssClasses.tap) ) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\te = fixEvent(e, data.pageOffset);\n\n\t\t\t// Ignore right or middle clicks on start #454\n\t\t\tif ( events === actions.start && e.buttons !== undefined && e.buttons > 1 ) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\t// Ignore right or middle clicks on start #454\n\t\t\tif ( data.hover && e.buttons ) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\te.calcPoint = e.points[ options.ort ];\n\n\t\t\t// Call the event handler with the event [ and additional data ].\n\t\t\tcallback ( e, data );\n\n\t\t}, methods = [];\n\n\t\t// Bind a closure on the target for every event type.\n\t\tevents.split(' ').forEach(function( eventName ){\n\t\t\telement.addEventListener(eventName, method, false);\n\t\t\tmethods.push([eventName, method]);\n\t\t});\n\n\t\treturn methods;\n\t}", "function bindAreasEvent() {\n $(document).on('click', '.viewAction', function () {\n viewAreas(this);\n });\n}", "function renderElement() {\n element = $compile(preCompiledElement)($scope);\n $scope.$digest();\n\n controller = element.controller('fsMultiselect');\n }", "function apply(element, sequence) {\n const oreo = document.createElement(\"div\")\n oreo.classList.add('oreo')\n\n // Empty the element\n while (element.firstChild) {\n element.removeChild(element.firstChild)\n }\n\n // Apply the oreo\n let index = 0\n let offset = 0\n let lastType = null\n\n for (layer of sequence) {\n offset = adjustOffset(offset, layer, lastType)\n const element = segment(layer, index++, offset)\n oreo.appendChild(element)\n lastType = layer\n }\n\n // Resize\n oreo.style.height = (offset + 43) + \"px\"\n element.appendChild(oreo)\n}", "function attach ( events, element, callback, data ) {\n\n\t\t// This function can be used to 'filter' events to the slider.\n\n\t\t// Add the noUiSlider namespace to all events.\n\t\tevents = events.replace( /\\s/g, namespace + ' ' ) + namespace;\n\n\t\t// Bind a closure on the target.\n\t\treturn element.on( events, function( e ){\n\n\t\t\t// jQuery and Zepto (1) handle unset attributes differently,\n\t\t\t// but always falsy; #208\n\t\t\tif ( !!$Target.attr('disabled') ) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\t// Stop if an active 'tap' transition is taking place.\n\t\t\tif ( $Target.hasClass( Classes[14] ) ) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\te = fixEvent(e);\n\t\t\te.calcPoint = e.points[ options.ort ];\n\n\t\t\t// Call the event handler with the event [ and additional data ].\n\t\t\tcallback ( e, data );\n\t\t});\n\t}", "sequenceAdd(el) {\n\t\tthis.intersectionObserver.observe(el);\n\t}", "function RenderEvent() {}", "appendIntoPart(e){e.__insert(this.startNode=createMarker()),e.__insert(this.endNode=createMarker())}", "function addD3ElementsToDOM (cssSelector, elementData, element, d3Element) {\n // We need to attach things to specific elements. This is to avoid errors\n // when there are multiple bars\n var cssQuerySelector = '#' + element.id + ' .' + cssSelector;\n var selectorData = addDataToD3Element(cssQuerySelector, elementData, d3Element);\n var selectorEnter = selectorData.enter();\n var selectorEnterDivs = selectorEnter.append('div').attr('class', cssSelector);\n selectorEnterDivs.append('span');\n return selectorEnterDivs;\n }", "function showEventsInDOM(data){\n var allEvents = data.events;\n console.log(allEvents);\n var eventListing = [];\n const monthNames = [\"January\", \"February\", \"March\", \"April\", \"May\", \"June\",\"July\", \"August\", \"September\", \"October\", \"November\", \"December\"];\n for(let i=0; i < allEvents.length; i++)\n {\n var eventName=allEvents[i].name;\n var dateObject = new Date(allEvents[i].start_time);\n var eventMonth = monthNames[dateObject.getUTCMonth()];\n var eventLocation = allEvents[i].location;\n var eventDate = eventMonth + \" \" + dateObject.getUTCDay() + \", \" + dateObject.getUTCFullYear();\n //The first event listing will always have a special CSS class to is to account for the search bar\n if (i==0)\n {\n var HTMLWrite = '<div class=\"columns listingadjust\">\\\n <div class=\"column is-1\"></div>\\\n <div class=\"column is-2\">\\\n <h1 class=\"title is-6 has-text-centered\">'+eventMonth+'</h1>\\\n <h2 class=\"subtitle has-text-centered\"><b class=\"date\">'+eventDate+'</b></h2>\\\n </div>\\\n <div class=\"vertical\"></div>\\\n <div class=\"column is-6\">\\\n <h1 class=\"title is-6\">'+eventName+'</h1>\\\n <h2 class=\"subtitle is-7\">'+eventLocation+'</h2>\\\n <div class=\"tags\">\\\n <span class=\"tag is-link is-light\"><span class=\"icon\"><i class=\"fas fa-car\"></i></span>Drivers required</span>\\\n <span class=\"tag is-link is-light\"><span class=\"icon\"><i class=\"fas fa-sign-language\"></i></span>ASL</span>\\\n </div>\\\n <p class=\"learnmore\"><a>+ Learn More</a></p>\\\n </div>\\\n <div class=\"column is-2 \">\\\n <button class=\"button btncolor hidebtns\"><span class=\"icon\"><i class=\"fas fa-clipboard\"></i></span><b>RSVP</b></button>\\\n </div>\\\n <div class=\"column is-1\"></div>\\\n </div>'\n }\n //The subsequent classes won't require that special class and have their own styling\n else{\n var HTMLWrite = '<div class=\"columns afterlistings\">\\\n <div class=\"column is-1\"></div>\\\n <div class=\"column is-2\">\\\n <h1 class=\"title is-6 has-text-centered\">'+eventMonth+'</h1>\\\n <h2 class=\"subtitle has-text-centered\"><b class=\"date\">'+eventDate+'</b></h2>\\\n </div>\\\n <div class=\"vertical\"></div>\\\n <div class=\"column is-6\">\\\n <h1 class=\"title is-6\">'+eventName+'</h1>\\\n <h2 class=\"subtitle is-7\">'+eventLocation+'</h2>\\\n <div class=\"tags\">\\\n <span class=\"tag is-link is-light\"><span class=\"icon\"><i class=\"fas fa-car\"></i></span>Drivers required</span>\\\n <span class=\"tag is-link is-light\"><span class=\"icon\"><i class=\"fas fa-sign-language\"></i></span>ASL</span>\\\n </div>\\\n <p class=\"learnmore\"><a>+ Learn More</a></p>\\\n </div>\\\n <div class=\"column is-2 \">\\\n <button class=\"button btncolor hidebtns\"><span class=\"icon\"><i class=\"fas fa-clipboard\"></i></span><b>RSVP</b></button>\\\n </div>\\\n <div class=\"column is-1 \"></div>\\\n </div>'\n }\n eventListing.push(HTMLWrite);\n }\n document.getElementById(\"eventlisting\").innerHTML = eventListing.join(' ');\n}", "function _populate () {\n var elements = document.querySelectorAll('*[' + _options.attribute + ']');\n\n for (var i = 0;i < elements.length;i++) {\n var element = elements[i];\n var event = element.getAttribute(_options.attribute);\n\n _add(element, event);\n }\n }", "function parseEventPage($) {\n $(\"div[class='col50 m-cola']\").each(function(element, index, callback) {\n let el = $(this); \n let allPosts = el[0].children;\n \n for (var i = 0, len = allPosts.length; i < len; i++) {\n let post = allPosts[i];\n try {\n if(i % 2 == 1) {\n parseEventPost(post);\n }\n } catch (error) {\n logger.error('Couldnt parse post: ' + i);\n }\n }\n });\n showEventInfo(posts);\n }", "function _onElementAdded() {\n \n\t\t\t countElements++;\n \n\t\t\t //add all elements of a view\n\t\t\t if(countElements < elements.length) {\n\t\t\t\t var element = elements[countElements];\n\t\t\t\t if(!_removeNotValidElementObj(element)) {\n\t\t\t\t\t instance.addElement( element.type, element.source, element.title, element.parameters);\n\t\t\t\t }\n \n\t\t\t }\n\t\t\t //all initial elements are added, view is created\n\t\t\t else {\n \n\t\t\t\t $this.off('elementAdd', _onElementAdded);\n\t\t\t\t if(typeof callback !== 'undefined') {\n\t\t\t\t\t callback.call(callback, instance);\n\t\t\t\t }\n \n\t\t\t }\n \n\t\t }", "registerElement(element) {\n this._element = element;\n this.performTransition();\n }", "render() {\n /** createCard */\n let container = document.createElement('div');\n container.style.width = this.options.width;\n container.style.height = this.options.height;\n container.classList.add('slider-wrapper');\n\n for (let image of this.options.images) {\n let card = this.#createCard(image);\n container.appendChild(card);\n }\n this.container = container;\n this.elem.appendChild(container);\n\n /** createPoint */\n if (this.options.isPoint) {\n this.resizeHandler();\n window.addEventListener('resize',\n _.debounce(this.resizeHandler, 400));\n this.container.addEventListener('scroll',\n _.throttle(this.scrollHandler, 150));\n };\n }", "set element(element) {}", "set element(element) {}", "function renderEvent () {\n const daysContainer = document.querySelectorAll(\".current-month-day\");\n const currentMonth = date.getMonth() + 1;\n const currentYear = date.getFullYear();\n //* Calendar days divs pass by\n for (let div of daysContainer) {\n const dayNumber = div.firstChild.innerHTML;\n //* checking that day has events\n if (!!eventsByDate[`${currentYear}-${currentMonth}-${dayNumber}`]) {\n //* Looping thru events in array\n for (let eventObjectId of eventsByDate[`${currentYear}-${currentMonth}-${dayNumber}`]){\n //* Access to event data\n const eventTitle = eventsById[eventObjectId].title;\n const eventType = eventsById[eventObjectId].eventType;\n //* Create of the event element\n let newEvent = document.createElement(\"div\");\n newEvent.classList.add(\"event-in-calendar\");\n newEvent.innerHTML = eventTitle;\n newEvent.setAttribute(\"divEventId\", eventObjectId);\n //* choosing event color depending of event type\n switch (eventType) {\n case 'Study':\n newEvent.classList.add(\"blue-event\");\n break;\n case 'Meeting':\n newEvent.classList.add(\"green-event\");\n break;\n case 'Personal':\n newEvent.classList.add(\"orange-event\");\n break;\n default:\n break;\n }\n newEvent.addEventListener('click', eventModal);\n //* Insert element in DOM\n div.firstChild.insertAdjacentElement('afterend',newEvent);\n }\n }\n }\n}", "initDomEvents() {\n const me = this;\n\n // Set thisObj and element of the configured listener specs.\n me.scheduledBarEvents.element = me.schedulerEvents.element = me.timeAxisSubGridElement;\n me.scheduledBarEvents.thisObj = me.schedulerEvents.thisObj = me;\n\n // same listener used for different events\n EventHelper.on(me.scheduledBarEvents);\n EventHelper.on(me.schedulerEvents);\n }", "render () {\n\t\t\t\t//Clear the entire canvas every render\n\t\tthis\n\t\t\t\t\t\t.context\n\t\t\t\t\t\t.clearRect( 0, 0, this.width, this.height );\n\n\t\t\t\t//Trigger the render function on every child element\n\t\tfor ( let i = 0; i < this.circleContainers.length; i++ ) {\n\t\t\tthis\n\t\t\t\t\t\t\t\t.circleContainers[i]\n\t\t\t\t\t\t\t\t.render();\n\t\t}\n\t}", "function addListeners(useCapturing) {\r\r\n // get all div in list\r\r\n var divList = document.getElementsByTagName('div');\r\r\n // set event to each div\r\r\n for(var i = 0, len = divList.length; i < len; i++) {\r\r\n var element = divList[i];\r\r\n eventUtility.addEvent(element, \"click\", markDiv, useCapturing);\r\r\n }\r\r\n}", "function render(){\n var i = spans.length,\n span;\n while (i-- > 0) {\n span = spans[i];\n renderSpan(span.start, span.end);\n }\n}", "function registerEvents(e) {\n //for (i = 0; i < sortedSections.length; i++){\n for (i = 0; i < sortedJournals.length; i++){\n \n //var section = sortedSections[i]\n var journal = sortedJournals[i]\n \n //for (j = 0; j < (sections[section]).length; j++){\n for (j = 0; j < Object.keys(journal.sectionUrls).length; j++){\n \n var id = i.toString()+j.toString()\n var cb = document.getElementById('cb' + id);\n //Dynamically attach event handler to cb, call an external function with e\n cb.addEventListener('change', function(e) {\n recordSection(e, this.id);\n },\n false);\n }\n }\n}", "function event_linker(){\n debug[\"debug object.self\"][1] ? console.log(\"looking to clear\") : \"\"\n\n $(\".debug_button\").click(function(event){\n debug[\"debug object.self\"][1] ? console.log($(event.currentTarget).context.classList[0] == $(this).context.classList[0]) : \"\"\n if($(event.currentTarget).context.classList[0] == $(this).context.classList[0]){\n $(\".debug\").css(debug_properties[0])\n $(\".debug * \").hide()\n setTimeout(debug_reset,500)\n debug[\"debug object.self\"][1] ? console.log(debug_properties[0],$(event.currentTarget).context.classList[0] == $(this).context.classList[0]) : \"\"\n }\n\n })\n $.map($(\".booleans > h2 \"),function(option,index){\n\n $(option).click(function(event){\n\n if($(option).text() == 'true'){\n $(option).text('false')\n debug[topic[debug_counter]][index] = false\n }\n else{\n $(option).text('true')\n debug[topic[debug_counter]][index] = true\n }\n debug[\"debug object.self\"][1] ? console.log($(option).text(),debug[topic[debug_counter]][index]) : \"\"\n debug[\"debug object.self\"][0] ? console.log(event) : \"\"\n })\n })\n debug[\"debug object.self\"][1] ? console.log(\"attached the events\") : \"\"\n clearTimeout(object_looker)\n\n }", "function renderResourcesBlock() {\n for (id in resources) {\n const wrapper = document.createElement('div')\n wrapper.classList.add('item-wrapper')\n const title = document.createElement('span')\n title.innerText = resources[id].metadata.title\n title.classList.add('item-title')\n\n\n\n const elem = document.createElement('video')\n const source = document.createElement('source')\n source.src = resources[id].metadata.path\n elem.classList.add('item')\n elem.id = id\n elem.appendChild(source)\n wrapper.appendChild(elem)\n wrapper.appendChild(title)\n // wrapper.append('03:21')\n $('.resources-list').append(wrapper)\n $(elem).draggable(dragObjectLogic)\n }\n}", "renderElements(data, xScale, renderGroups) {\n\n let { lineG, circleG,/* arrowG,*/ tagG } = renderGroups;\n\n lineG.selectAll('rect').remove();\n circleG.selectAll('circle').remove();\n tagG.selectAll('polyline').remove();\n tagG.selectAll('text').remove();\n\n\n this.renderLines(data, xScale, lineG);\n this.renderCircles(data, xScale, circleG);\n this.renderTags(data, xScale, tagG);\n //if(!data.realEndDate) this.renderArrows(data, xScale,arrowG);\n\n }", "_render(html){this.$.container.innerHTML=html}" ]
[ "0.63656646", "0.56436956", "0.56436956", "0.56436956", "0.56436956", "0.56436956", "0.55128", "0.5501312", "0.5285332", "0.5128597", "0.5128597", "0.5128597", "0.51043856", "0.51043856", "0.51043856", "0.5037433", "0.50323737", "0.5011792", "0.5010405", "0.5010405", "0.5010405", "0.5010405", "0.5010405", "0.5002946", "0.4997859", "0.4997859", "0.4997859", "0.4899518", "0.48889402", "0.4827069", "0.481237", "0.48006752", "0.47992095", "0.47986755", "0.47883314", "0.47639695", "0.47568175", "0.47472712", "0.4745674", "0.4719687", "0.4709437", "0.47041422", "0.47015855", "0.4691599", "0.46763796", "0.4649783", "0.46422112", "0.4639993", "0.4619617", "0.46154663", "0.4603836", "0.45738187", "0.45668033", "0.4548403", "0.4544542", "0.4541563", "0.45402142", "0.45214188", "0.45161656", "0.4513643", "0.44993448", "0.449682", "0.44911268", "0.44903532", "0.4487557", "0.44821605", "0.4476286", "0.4475665", "0.44739527", "0.44739527", "0.4459158", "0.44453442", "0.4445038", "0.4445002", "0.44398895", "0.44374946", "0.4429053", "0.44185132", "0.44153124", "0.44086546", "0.44006157", "0.43819693", "0.43756685", "0.43742698", "0.43725407", "0.43725407", "0.4368599", "0.43684265", "0.43506104", "0.43423983", "0.43413424", "0.43393466", "0.43366387", "0.43331212", "0.4329535", "0.43260399" ]
0.66600096
3
Topcoordinate Methods Sets the "top" CSS property for each element. If `doRowHeights` is `true`, also sets each row's first cell to an explicit height, so that if elements vertically overflow, the cell expands vertically to compensate.
function setVerticals(segments, doRowHeights) { var rowContentHeights = calculateVerticals(segments); // also sets segment.top var rowContentElements = getRowContentElements(); // returns 1 inner div per row var rowContentTops = []; // Set each row's height by setting height of first inner div if (doRowHeights) { for (var i=0; i<rowContentElements.length; i++) { rowContentElements[i].height(rowContentHeights[i]); } } // Get each row's top, relative to the views's origin. // Important to do this after setting each row's height. for (var i=0; i<rowContentElements.length; i++) { rowContentTops.push( rowContentElements[i].position().top ); } // Set each segment element's CSS "top" property. // Each segment object has a "top" property, which is relative to the row's top, but... segmentElementEach(segments, function(segment, element) { element.css( 'top', rowContentTops[segment.row] + segment.top // ...now, relative to views's origin ); }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function get_top(top){\n\t\t\t\t\tvar row_multiple = row_height*parseInt($rows_id);\n\t\t\t\t\treturn (top + row_multiple) + 'px';\n\t\t\t\t}", "function setVerticals(segments, doRowHeights) {\n\t\tvar rowContentHeights = calculateVerticals(segments); // also sets segment.top\n\t\tvar rowContentElements = getRowContentElements(); // returns 1 inner div per row\n\t\tvar rowContentTops = [];\n\t\tvar i;\n\n\t\t// Set each row's height by setting height of first inner div\n\t\tif (doRowHeights) {\n\t\t\tfor (i=0; i<rowContentElements.length; i++) {\n\t\t\t\trowContentElements[i].height(rowContentHeights[i]);\n\t\t\t}\n\t\t}\n\n\t\t// Get each row's top, relative to the views's origin.\n\t\t// Important to do this after setting each row's height.\n\t\tfor (i=0; i<rowContentElements.length; i++) {\n\t\t\trowContentTops.push(\n\t\t\t\trowContentElements[i].position().top\n\t\t\t);\n\t\t}\n\n\t\t// Set each segment element's CSS \"top\" property.\n\t\t// Each segment object has a \"top\" property, which is relative to the row's top, but...\n\t\tsegmentElementEach(segments, function(segment, element) {\n\t\t\telement.css(\n\t\t\t\t'top',\n\t\t\t\trowContentTops[segment.row] + segment.top // ...now, relative to views's origin\n\t\t\t);\n\t\t});\n\t}", "function setVerticals(segments, doRowHeights) {\n\t\tvar rowContentHeights = calculateVerticals(segments); // also sets segment.top\n\t\tvar rowContentElements = getRowContentElements(); // returns 1 inner div per row\n\t\tvar rowContentTops = [];\n\t\tvar i;\n\n\t\t// Set each row's height by setting height of first inner div\n\t\tif (doRowHeights) {\n\t\t\tfor (i=0; i<rowContentElements.length; i++) {\n\t\t\t\trowContentElements[i].height(rowContentHeights[i]);\n\t\t\t}\n\t\t}\n\n\t\t// Get each row's top, relative to the views's origin.\n\t\t// Important to do this after setting each row's height.\n\t\tfor (i=0; i<rowContentElements.length; i++) {\n\t\t\trowContentTops.push(\n\t\t\t\trowContentElements[i].position().top\n\t\t\t);\n\t\t}\n\n\t\t// Set each segment element's CSS \"top\" property.\n\t\t// Each segment object has a \"top\" property, which is relative to the row's top, but...\n\t\tsegmentElementEach(segments, function(segment, element) {\n\t\t\telement.css(\n\t\t\t\t'top',\n\t\t\t\trowContentTops[segment.row] + segment.top // ...now, relative to views's origin\n\t\t\t);\n\t\t});\n\t}", "returnToTop() {\n const me = this;\n\n me.topIndex = 0;\n me.lastScrollTop = 0;\n me.topRow.dataIndex = 0;\n\n // Force the top row to the top of the scroll range\n me.topRow.setTop(0);\n\n me.refresh();\n\n // Rows rendered from top, make sure grid is scrolled to top also\n me.grid.scrollable.y = 0;\n }", "updateChildLocationForRow(top, rowWidget) {\n let spacing = 0;\n if (rowWidget.ownerTable.tableFormat.cellSpacing > 0) {\n spacing = HelperMethods.convertPointToPixel(rowWidget.ownerTable.tableFormat.cellSpacing);\n }\n for (let i = 0; i < rowWidget.childWidgets.length; i++) {\n let cellWidget = rowWidget.childWidgets[i];\n cellWidget.x = cellWidget.x;\n cellWidget.y = top + cellWidget.margin.top + spacing;\n this.updateChildLocationForCell(cellWidget.y, cellWidget);\n }\n }", "returnToTop() {\n const me = this;\n me.topIndex = 0;\n me.lastScrollTop = 0;\n\n if (me.topRow) {\n me.topRow.dataIndex = 0; // Force the top row to the top of the scroll range\n\n me.topRow.setTop(0, true);\n }\n\n me.refresh(); // Rows rendered from top, make sure grid is scrolled to top also\n\n me.grid.scrollable.y = 0;\n }", "setTop(_top) {\n this.top = _top;\n this.updateSecondaryValues();\n return this;\n }", "function getRowTop(elements, startElement) {\n let top = startElement.y;\n for (let element of elements)\n if (element.y < startElement.y + startElement.height && element.y + element.height > startElement.y) // check for overlap\n if (getVerticalOverlapPercentage(startElement, element) > 50) // avoids extremely tall elements\n if (element.y < top)\n top = element.y;\n return top;\n}", "setTop(top) {\n if (this._top !== top) {\n this._top = top;\n this.translateElements();\n }\n }", "function getRowTop(elements, startElement) {\n let top = Number.MAX_VALUE;\n for (let element of elements)\n if (element.y < startElement.y + startElement.height && element.y + element.height > startElement.y)\n if (element.y < top)\n top = element.y;\n return top;\n}", "topRow() {\n return INDEX2ROW(this.topLeft);\n }", "function getTopPosition(tile) {\n return parseInt(tile.style.top);\n }", "refreshRows(returnToTop = false) {\n const {\n element,\n rowManager\n } = this;\n element.classList.add('b-notransition');\n\n if (returnToTop) {\n rowManager.returnToTop();\n } else {\n rowManager.refresh();\n }\n\n element.classList.remove('b-notransition');\n }", "function xTop(e, iY)\n{\n if(!(e=xGetElementById(e))) return 0;\n var css=xDef(e.style);\n if(css && xStr(e.style.top)) {\n if(xNum(iY)) e.style.top=iY+'px';\n else {\n iY=parseInt(e.style.top);\n if(isNaN(iY)) iY=xGetComputedStyle(e,'top',1);\n if(isNaN(iY)) iY=0;\n }\n }\n else if(css && xDef(e.style.pixelTop)) {\n if(xNum(iY)) e.style.pixelTop=iY;\n else iY=e.style.pixelTop;\n }\n return iY;\n}", "function xTop(e, iY)\r\n{\r\n if(!(e=xGetElementById(e))) return 0;\r\n var css=xDef(e.style);\r\n if(css && xStr(e.style.top)) {\r\n if(xNum(iY)) e.style.top=iY+'px';\r\n else {\r\n iY=parseInt(e.style.top);\r\n if(isNaN(iY)) iY=xGetComputedStyle(e,'top',1);\r\n if(isNaN(iY)) iY=0;\r\n }\r\n }\r\n else if(css && xDef(e.style.pixelTop)) {\r\n if(xNum(iY)) e.style.pixelTop=iY;\r\n else iY=e.style.pixelTop;\r\n }\r\n return iY;\r\n}", "top(value = '') {\n this._bottomOffset = '';\n this._topOffset = value;\n this._alignItems = 'flex-start';\n return this;\n }", "updateChildLocationForTable(top, tableWidget) {\n for (let i = 0; i < tableWidget.childWidgets.length; i++) {\n let rowWidget = tableWidget.childWidgets[i];\n rowWidget.x = rowWidget.x;\n rowWidget.y = top;\n this.updateChildLocationForRow(top, rowWidget);\n top += rowWidget.height;\n }\n }", "refreshRows(returnToTop = false) {\n this.element.classList.add('b-notransition');\n\n if (returnToTop) {\n this.rowManager.returnToTop();\n } else {\n this.rowManager.refresh();\n }\n\n this.element.classList.remove('b-notransition');\n }", "_updatePositions() {\n let direction = this.options.direction;\n let largestHeight = 0;\n if(this.lastIndex === -1)\n return;\n\n if(this.options.onPosition && typeof this.options.onPosition === 'function')\n this.options.onPosition.call();\n\n this.rows.forEach(row => {\n row.forEach(rowItem => {\n let itemBottom = rowItem.position.top + rowItem.item.offsetHeight;\n rowItem.item.style.top = rowItem.position.top + 'px';\n rowItem.item.style[direction] = rowItem.position[direction] + 'px';\n if(largestHeight < itemBottom)\n largestHeight = itemBottom;\n });\n });\n\n this.element.style.height = largestHeight + 'px';\n\n if(this.options.onPositioned && typeof this.options.onPositioned === 'function')\n this.options.onPositioned.call();\n }", "fillAbove(newTop) {\n const me = this,\n fillHeight = newTop - me.topRow.top - me.prependBufferHeight;\n\n let accumulatedHeight = 0;\n\n while (accumulatedHeight > fillHeight && me.topIndex > 0) {\n // We want to show prev record at top of rows\n accumulatedHeight -= me.displayRecordAtTop();\n }\n }", "reinitialize(returnToTop = false) {\n const me = this,\n top = me.topRow ? me.topRow.top : 0;\n\n me._rows.length = 1;\n\n me.scrollTargetRecordId = null;\n\n if (returnToTop) {\n me.topIndex = 0;\n me.lastScrollTop = 0;\n }\n\n // any elements currently used for rows should be released.\n // actual removal of elements is done in SubGrid#clearRows\n me.releaseElements();\n\n // Calculate and correct the amount of rows needed (without triggering render)\n me.calculateRowCount(false, true, true);\n\n if (!returnToTop && me.topRow) {\n // since all rows were removed and new ones added, we need to restore dataIndex and position for rendering\n // to happen at correct pos\n me.topRow.dataIndex = me.topIndex;\n me.topRow.setTop(top);\n }\n\n // Need to estimate height in case we have Grid using autoHeight\n me.estimateTotalHeight();\n\n me.renderFromRow(me.topRow);\n }", "reinitialize(returnToTop = false) {\n const me = this; // Calculate and correct the amount of rows needed (without triggering render)\n // Rows which are found to be surplus are destroyed.\n\n me.calculateRowCount(false, true, true); // If our row range is outside of the store's range, force a return to top\n\n if (me.topIndex + me.rowCount - 1 > me.store.count) {\n returnToTop = true;\n }\n\n const top = me.topRow && !returnToTop ? me.topRow.top : 0;\n me.scrollTargetRecordId = null;\n\n if (returnToTop) {\n me.topIndex = me.lastScrollTop = 0;\n }\n\n const {\n topRow\n } = me;\n\n if (topRow) {\n // Ensure rendering from the topRow starts at the correct position\n topRow.dataIndex = me.topIndex;\n topRow.setTop(top, true);\n } // Need to estimate height in case we have Grid using autoHeight\n\n me.estimateTotalHeight();\n me.renderFromRow(topRow);\n }", "updateChildLocationForCell(top, cellWidget) {\n for (let i = 0; i < cellWidget.childWidgets.length; i++) {\n cellWidget.childWidgets[i].x = cellWidget.childWidgets[i].x;\n cellWidget.childWidgets[i].y = top;\n if (cellWidget.childWidgets[i] instanceof TableWidget) {\n this.updateChildLocationForTable(top, cellWidget.childWidgets[i]);\n }\n top += cellWidget.childWidgets[i].height;\n }\n }", "function setHeightsTop() {\n var hgt;\n var i;\n var HGT_HEAD = 30; // the height of headers of boxes\n var MAX_ENTRIES = 20; // the number of entries of accessranking\n\n // set the height of accessranking box.\n hgt = $(\"#toppage_notice div.waku\").height();\n $(\"#toppage_access div.waku\").css(\"height\", hgt + \"px\");\n\n // erase entries of accessranking outside the box\n hgt = hgt - HGT_HEAD;\n for (i = 0; i <= MAX_ENTRIES; i++ ) {\n hgt = hgt - $(\"tr#no\" + i).outerHeight(true);\n if (hgt > 0) {\n $(\"tr#no\" + i).show();\n } else {\n $(\"tr#no\" + i).hide();\n }\n }\n\n // fit the heights of pressrelease and goaisatsu boxes\n var hgt_press, hgt_greet;\n hgt_press = $(\"#toppage_press div.waku\").height();\n hgt_greet = $(\"#toppage_greeting div.waku\").height();\n if (hgt_press > hgt_greet) {\n $(\"#toppage_greet div.waku\").css(\"height\", hgt_press + \"px\");\n } else {\n $(\"#toppage_press div.waku\").css(\"height\", hgt_greet + \"px\");\n }\n}", "function UltraGrid_Paint_SortedRows(theObject, sortOrder)\n{\n\t//the rows must exist before we do this\n\tif (theObject.Paint.BuiltRows)\n\t{\n\t\t//map of top positions for each row\n\t\tvar mapTop = {};\n\t\t//loop through all rows\n\t\tfor (var rows = theObject.Data.Cells.Rows, iRow = 0, cRow = rows.length; iRow < cRow; iRow++)\n\t\t{\n\t\t\t//get the row\n\t\t\tvar row = rows[sortOrder[iRow]];\n\t\t\t//now loop through the panels where its meant to exist\n\t\t\tfor (var i = 0, c = row.PanelIds.length; i < c; i++)\n\t\t\t{\n\t\t\t\t//get our panel\n\t\t\t\tvar panel = row.Panels[row.PanelIds[i]];\n\t\t\t\t//now calculate the top\n\t\t\t\trow.PanelTops[panel.Id] = Get_Number(mapTop[panel.Id], 0);\n\t\t\t\t//get the row\n\t\t\t\tvar htmlRow = row.PanelRows[panel.Id];\n\t\t\t\t//update its position\n\t\t\t\thtmlRow.style.top = row.PanelTops[panel.Id] + \"px\";\n\t\t\t\t//update the top\n\t\t\t\tmapTop[panel.Id] = row.PanelTops[panel.Id] + row.Height;\n\t\t\t}\n\t\t}\n\t}\n\t//paint the ultragrid\n\tUltraGrid_Paint_Refresh(theObject);\n}", "fillAbove(newTop) {\n const me = this,\n fillHeight = newTop - me.topRow.top - me.prependBufferHeight;\n let accumulatedHeight = 0;\n\n while (accumulatedHeight > fillHeight && me.topIndex > 0) {\n // We want to show prev record at top of rows\n accumulatedHeight -= me.displayRecordAtTop();\n }\n\n me.trigger('renderDone');\n }", "translateElements(silent) {\n const me = this,\n positionMode = me.grid.positionMode;\n\n if (me.lastTop !== me.top) {\n const elements = me._elementsArray;\n\n for (let i = 0; i < elements.length; i++) {\n const style = elements[i].style;\n\n if (positionMode === 'translate') {\n style.transform = `translate(0,${me.top}px)`;\n } else if (positionMode === 'translate3d') {\n style.transform = `translate3d(0,${me.top}px,0)`;\n } else if (positionMode === 'position') {\n style.top = `${me.top}px`;\n }\n }\n\n if (!silent) {\n me.rowManager.trigger('translateRow', {\n row: me\n });\n }\n\n me.lastTop = me.top;\n }\n }", "function alignTop (){\n\t\t\tvar selectedGr = canvas.getActiveGroup();\n\t\t\tif (!selectedGr) return;\n\t\t\tvar pointC = new fabric.Point(0,0);\n\t\t\tvar deltaY = 0;\n\t\t\tvar firstObjH = 0;\n\t\t\tvar coordY1 = 0;\n\t\t\tvar coordY2 = 0;\n\t\t\ti=0;\n\t\t\tselectedGr.forEachObject(function(obj) {\n\t\t\t\ti++;\n\t\t\t\tobj.setOriginX('left');\n\t\t\t\tobj.setOriginY('top');\t\t\n\t\t\t\t//console.log( i + ' Point Left = ' + obj.left );\n\t\t\t\tvar boundObj = obj.getBoundingRect();\n\t\n\t\t\t\tif (i > 1 ){\n\t\t\t\t\tpointC.y = obj.top;\n\t\t\t\t\tdeltaY = boundObj.top - coordY1;\n\t\t\t\t\tconsole.log(i + ' DELTA= ' + deltaY);\n\t\t\t\t\tpointC.x = obj.left\n\t\t\t\t\tpointC.y -= deltaY;\t\n\t\t\t\t\tobj.setTop(pointC.y); \n \n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tcoordY1 = boundObj.top;\n\t\t\t\t\tfirstObjH = boundObj.height;\n\n\t\t\t\t}\n\t\t\t\t//console.log(' LEFT N '+i + ' = ' + boundObj.left + ' LEFT1 = ' + coordY1 );\n\t\t\t});\n\t\t\tcanvas.discardActiveGroup();\n\t\t\tselectGrpParam();\n\t\t\tcanvas.renderAll();\n\t\t}", "function topPos(el) {\r\n\treturn doPosLoop(el, \"Top\");\r\n}", "function getTop() {\n\n // Look up the top position in pixels from the game board properties by the current\n // row the character is sitting upon\n return _gameBoard.rows[_currentRow];\n }", "function attachMoveTopListener(itm) {\n (function(e) {\n e.addEventListener('click', function() {\n // can't move top element up\n var thisRow = e.parentNode.parentNode;\n if (thisRow.rowIndex > 1) {\n var topRow = thisRow.parentNode.childNodes[2];\n swapRows(topRow, thisRow);\n }\n });\n })(itm);\n}", "updateTableWidgetLocation(tableWidget, location, isUpdateToTop) {\n tableWidget.y = location = location + tableWidget.topBorderWidth;\n let cellSpacing = 0;\n for (let i = 0; i < tableWidget.childWidgets.length; i++) {\n let rowWidget = tableWidget.childWidgets[i];\n rowWidget.y = location;\n for (let j = 0; j < rowWidget.childWidgets.length; j++) {\n let cellWidget = rowWidget.childWidgets[j];\n cellWidget.y = location + cellWidget.margin.top + cellSpacing;\n this.updateCellVerticalPosition(cellWidget, isUpdateToTop, true);\n }\n location = location + rowWidget.height;\n }\n return location;\n }", "function setArrayVerticals(elements, parents) {\n\tvar length = elements.length;\n\t\n\tif ( length != parents.length ) {\n\t\treturn false;\n\t}\n\t\n\tfor ( var i = 0; i < length; ++i ) {\n\t\tvar th = parents[i].height();\n\t\tvar h = elements[i].height();\n\t\t\n\t\tth = ( th - h ) * 0.5;\n\t\t\n\t\telements[i].css('top', th);\n\t}\n\t\n\treturn true;\n}", "translateElements() {\n const me = this,\n positionMode = me.grid.positionMode;\n\n if (me.lastTop !== me.top) {\n const elements = me._elementsArray;\n\n for (let i = 0; i < elements.length; i++) {\n const style = elements[i].style;\n\n if (positionMode === 'translate') {\n style.transform = `translate(0,${me.top}px)`;\n } else if (positionMode === 'translate3d') {\n style.transform = `translate3d(0,${me.top}px,0)`;\n } else if (positionMode === 'position') {\n style.top = `${me.top}px`;\n }\n }\n me.rowManager.trigger('translateRow', { row: me });\n me.lastTop = me.top;\n }\n }", "function addRowTop(tableID) {\n var table = document.getElementById(tableID);\n var rowCount = table.rows.length;\n var row = table.insertRow(1);\n var colCount = table.rows[0].cells.length;\n for(var i=0; i<colCount; i++) {\n var newcell = row.insertCell(i);\n newcell.innerHTML = table.rows[0].cells[i].innerHTML;\n }\n adjustSno(tableID);\n}", "function setEltTop (elt, y) \n{ if (is.nav4) elt.top=y;\n else if (is.ie4up) elt.style.pixelTop=y;\n else if (is.gecko) elt.style.top= (y + \"px\");\n}", "function fAnimateTop (elem, eTopPos) {\n tMx.to (elem, animTym, {css: {top: eTopPos}, ease: easePower});\n }", "function setlogoGridContentRowMarginTop(colCount) {\n if (Number.isNaN(colCount) === true) { //If colCount is not a number\n let gridCounts = dataGridDisplayGetCounts(\"logoGrid\"); //Get the number of rows and columns for the logoGrid element\n if (gridCounts === false) { //If false, then we could not return the values, so return false\n console.log(`function setlogoGridContentRowMarginTop failed. Cascade failure originating with dataGridDisplayGetCounts(\"logoGrid\").`);\n return false;\n }\n colCount = gridCounts[0]; //Set colCount to the number of columns returned by dataGridDisplayGetCounts()\n }\n\n let logoGridContentRowMarginTop = 0;\n let checkMarginTop = 0;\n\n let i;\n for (i = 0; i < colCount; i += 1) {\n checkMarginTop = getElementPos(document.getElementById(`logoGridHcol-${i}`).firstElementChild).height; //Get the height of the current header column\n if (checkMarginTop > logoGridContentRowMarginTop) { //Compare the height of the current column to the stored margintop value, and if larger, update the stored value\n logoGridContentRowMarginTop = checkMarginTop;\n }\n }\n document.getElementById(\"logoGridContentRow\").style.marginTop = `${logoGridContentRowMarginTop}px`; //Set the height of the content row margin-top to equal the height of the largest header column\n}", "set top(v) {\n this.__top = v;\n this._line.style.transform = `translateY(${this.top - 13}px)`;\n }", "setFlexTop(_flag, _px) {\n if (this.isNullOrUndefined(_flag)) {\n _flag = true;\n }\n this.flexTop = _flag;\n if ((_px || _px === 0) && this.rect) {\n this.rect.setTop(_px);\n }\n return this;\n }", "updateCellVerticalPosition(cellWidget, isUpdateToTop, isInsideTable) {\n if (cellWidget.ownerTable.containerWidget instanceof BodyWidget || isInsideTable) {\n let displacement = this.getDisplacement(cellWidget, isUpdateToTop);\n //Update Y position alone for the child widget of cell\n this.updateCellContentVerticalPosition(cellWidget, displacement, isUpdateToTop);\n }\n }", "function IsInTopBorderRow(tree) {\n\n return +tree.getAttribute(\"data-y\") === 0;\n\n} // end function IsInTopBorderRow(tree)", "jumpToPosition(newScrollTop, forceRecordIndex) {\n // There are two very different requirements here.\n // If there is a forceRecordIndex, that takes precedence to get it into the center of the\n // viewport, and wherever we render the calculated row block, we may then *adjust the scrollTop*\n // to get that row to the center.\n //\n // If there's no forceRecordIndex, then the scroll position is the primary objective and\n // we must render what we calculate to be correct at that viewport position.\n const me = this,\n {\n store,\n heightMap\n } = me,\n storeCount = store.count;\n\n if (me.allHeightsKnown && !me.fixedRowHeight) {\n const top = newScrollTop - me.prependBufferHeight,\n border = me.grid._rowBorderHeight;\n let accumulated = 0,\n targetIndex = 0;\n\n while (accumulated < top) {\n const record = store.getAt(targetIndex);\n accumulated += heightMap.get(record.id) + border;\n targetIndex++;\n }\n\n const startIndex = Math.max(Math.min(targetIndex, storeCount - me.rowCount), 0);\n me.lastScrollTop = newScrollTop;\n me.topRow.dataIndex = me.topIndex = startIndex;\n me.topRow.setTop(me.calculateTop(startIndex), false); // render entire buffer\n\n me.refresh();\n } else {\n const rowHeight = me.preciseRowOffsetHeight,\n // Calculate index of the top of the rendered block.\n // If we are targeting the scrollTop, this will be the top index at the scrollTop minus prepend count.\n // If we are targeting a recordIndex, this will attempt to place that in the center of the rendered block.\n targetIndex = forceRecordIndex == null ? Math.floor(newScrollTop / rowHeight) - me.prependRowBuffer : forceRecordIndex - Math.floor(me.rowCount / 2),\n startIndex = Math.max(Math.min(targetIndex, storeCount - me.rowCount), 0),\n viewportTop = me.client.scrollable.y,\n viewportBottom = Math.min(me.client._bodyRectangle.height + viewportTop + me.appendBufferHeight, me.totalHeight);\n me.lastScrollTop = newScrollTop;\n me.topRow.dataIndex = me.topIndex = startIndex;\n me.topRow.setTop(Math.floor(startIndex * rowHeight), false); // render entire buffer\n\n me.refresh(); // TODO: It is likely the approach below will be needed for scrolling in opposite direction also, although no\n // problem encountered yet\n // Not filled all the way down?\n\n if (me.bottomRow.bottom < viewportBottom) {\n // Might have jumped into a section of low heights. Needs to be done after the refresh, since heights\n // are not known before it\n me.calculateRowCount(false, false, false); // Fill with available rows (might be available above buffer because of var row height), stop if we run out of records :)\n\n while (me.bottomRow.bottom < viewportBottom && me._rows[me.prependRowBuffer].top < viewportTop && me.bottomRow.dataIndex < storeCount - 1) {\n me.displayRecordAtBottom();\n } // TODO: Block below was not needed for current tests, but if row height in one block is enough smaller\n // than average row height then we will need to add more rows\n // Still not filled all the way down? Need more rows\n // if (me.bottomRow.bottom < viewportBottom) {\n // //const localAverage = blockHeight / me.rowCount;\n // while (me.bottomRow.bottom < viewportBottom) {\n // me.addRecordAtBottom();\n // }\n // }\n\n }\n\n me.estimateTotalHeight();\n } // If the row index is our priority, then scroll it into the center\n\n if (forceRecordIndex != null) {\n const {\n scrollable\n } = me.grid,\n targetRow = me.getRow(forceRecordIndex),\n // When coming from a block of high rowHeights to one with much lower we might still miss the target...\n // TODO: Jump again in these cases?\n rowCenter = targetRow && Rectangle.from(targetRow._elementsArray[0]).center.y,\n viewportCenter = scrollable.viewport.center.y; // Scroll the targetRow into the center of the viewport\n\n if (targetRow) {\n scrollable.y = newScrollTop = Math.floor(scrollable.y + (rowCenter - viewportCenter));\n }\n }\n\n return newScrollTop;\n }", "updatePosition(){\n\t\tlet activeRowCount = 0;\n\t\tlet tableHeight = 0;\n\t\tfor(let i = 0; i < this.table.length; i++){\n\t\t\tif(this.table.children[i].visible){\n\t\t\t\tactiveRowCount += 1;\n\t\t\t\tthis.table.children[i].y = (this.config.rowHeight * activeRowCount) - this.config.rowHeight;\n\t\t\t}\n\t\t}\n\n\t\tthis.height = (activeRowCount * this.config.rowHeight) - this.config.rowHeight;\n\t}", "function fAnimateTop (elem, eTopPos) {\n let animTym = 8;\n //tMx.to (elem, animTym, {css: {top: eTopPos}, ease: easePower});\n tMx.to (elem, animTym, {top: eTopPos, ease: easePower});\n //tMx.to (elem, animTym, {top: (eTopPos + \"px\")});\n //elem.css ({\"top\": eTopPos}); //Works!\n }", "function elementsOffsetFromTop(element) {\n var offset = 0;\n\n if (element.getBoundingClientRect) {\n offset = element.getBoundingClientRect().top;\n }\n\n return offset;\n }", "function GoldBorderandPinToTop(id){ \n var rows = document.getElementById(\"table\").rows;\n document.getElementById(\"unique1\").style.outline = \"2px solid black\";//Fixs werid outline overlap\n \n parent = rows[id].parentNode;\n if(document.getElementById(id).style.borderTopColor!='gold' && document.getElementById(id).style.borderBottemColor!='gold'){//Checks to see if outline is already highlighted\n document.getElementById(id).style.borderTopColor='gold';\n document.getElementById(id).style.borderBottomColor='gold';\n document.getElementById(id).style.outline = \"2px solid gold\";\n parent.insertBefore(rows[id],rows[1]);//This line makes it change the 2 second position because it looks like you have a place holder row at the top for the catorgories.\n }\n else{\n document.getElementById(id).style.borderTopColor='blue';\n document.getElementById(id).style.borderBottomColor='blue';\n document.getElementById(id).style.outline = null;\n parent.insertBefore(rows[id],rows[rows]);//Unpinning a task will make it move all the way to the bottem and unhighlight its boarder.\n }\n \n}", "function setRowsHeight() {\n var ulHeight = (options.items * options.height) + \"px\";\n rows.css(\"height\", ulHeight);\n }", "function get_prev_top_row( rows_code ) {\n var row = rows_code.first();\n while ( ! row.hasClass( 'top' ) ) {\n row = row.prev();\n }\n return row;\n }", "shiftChildLocationForTableRowWidget(rowWidget, shiftTop) {\n rowWidget.y = rowWidget.y + shiftTop;\n for (let i = 0; i < rowWidget.childWidgets.length; i++) {\n this.shiftChildLocationForTableCellWidget(rowWidget.childWidgets[i], shiftTop);\n }\n }", "function snavRemoveEndTopLines() {\r\n var trs = jQuery('.child-line-row');\r\n for (var i = 0; i < trs.length; i++) {\r\n var tr = trs[i];\r\n var tds = jQuery(tr).find('td');\r\n jQuery(tds[0]).removeClass('top');\r\n var lastIndex = tds.length - 1;\r\n jQuery(tds[lastIndex]).removeClass('top');\r\n }\r\n}", "scrollToTop () {\n window.scroll({\n top: 0\n });\n if (this.resultsColumn) {\n this.resultsColumn.scrollTop = 0;\n }\n }", "function tableRowHeights() {\n\t$('.scroll-table > tbody').children('tr:not(.summary)').each(function() {\n\t\tvar height = $(this).children('.headcol').data('height'),\n\t\t\t$cols = $(this).children('td');\n\t\t$cols.each(function() {\n\t\t\tif($(this).hasClass('two-line-benchmark-heading')) {\n\t\t\t\t$(this).css({\n\t\t\t\t\theight: height + 'px',\n\t\t\t\t\tlineHeight: '16px'\n\t\t\t\t});\n\t\t\t} else if($(this).hasClass('headcol') && !$(this).hasClass('first-table-row') || $(this).hasClass('secondcol')) {\n\t\t\t\t$(this).css({\n\t\t\t\t\theight: (height + 1) + 'px',\n\t\t\t\t\tlineHeight: height + 'px'\n\t\t\t\t});\n\t\t\t} else {\n\t\t\t\t$(this).css({\n\t\t\t\t\theight: height + 'px',\n\t\t\t\t\tlineHeight: height + 'px'\n\t\t\t\t});\n\t\t\t}\n\t\t});\n\t});\n}", "function moveAllToTop() {\n\tvar moved = false;\n\tfor (var c = 0; c < 4 ; c++ ) {\n\t\tvar s = 0;\n\t\tfor (var r = 0; r < 4 ; r++ ) {\n\t\t\tif (!isCellEmpty(r, c)) {\n\t\t\t\tif (r != s) {\n\t\t\t\t\tmoved = true;\n\t\t\t\t\tsetGridNumRC(s, c, grid[r][c]);\n\t\t\t\t\tsetEmptyCell(r, c);\n\t\t\t\t}\n\t\t\t\ts++;\n\t\t\t}\n\t\t}\n\t}\n\treturn moved;\n}", "function SetHorz(row1,row2,col){\n var id1 = row1.id+\";\"+col, id2 = row2.id+\";\"+col;\n var cls1 = A[id1]; if(cls1==null) cls1 = row1[col+\"Class\"]; \n var cls2 = A[id2]; if(cls2==null) cls2 = row2[col+\"Class\"];\n if(cls1) cls1 = cls1.replace(/(BC|BS)\\w+\\s?/g,\"\").replace(/\\s$/,\"\");\n if(cls2) cls2 = cls2.replace(/(TC|TS)\\w+\\s?/g,\"\").replace(/\\s$/,\"\");\n if(style==\"BSNone\") cls1 = (cls1?cls1+\" \":\"\")+\"BSNone\";\n else if(style==\"BSSolid1\") cls1 = (cls1?cls1+\" \":\"\")+\"BC\"+clr+\" BSSolid\";\n else if(style==\"BSSolid2\") { cls1 = (cls1?cls1+\" \":\"\")+\"BSNone\"; cls2 = (cls2?cls2+\" \":\"\")+\"TC\"+clr+\" TSSolid\"; }\n else if(style==\"BSSolid3\") { cls1 = (cls1?cls1+\" \":\"\")+\"BC\"+clr+\" BSSolid\"; cls2 = (cls2?cls2+\" \":\"\")+\"TC\"+clr+\" TSSolid\"; }\n else if(style==\"BSDotted1\") cls1 = (cls1?cls1+\" \":\"\")+\"BC\"+clr+\" BSDotted\";\n else if(style==\"BSDotted2\") { cls1 = (cls1?cls1+\" \":\"\")+\"BSNone\"; cls2 = (cls2?cls2+\" \":\"\")+\"TC\"+clr+\" TSDotted\"; }\n else if(style==\"BSDashed1\") cls1 = (cls1?cls1+\" \":\"\")+\"BC\"+clr+\" BSDashed\";\n else if(style==\"BSDashed2\") { cls1 = (cls1?cls1+\" \":\"\")+\"BSNone\"; cls2 = (cls2?cls2+\" \":\"\")+\"TC\"+clr+\" TSDashed\"; }\n A[id1] = cls1; A[id2] = cls2;\n }", "function offsetTop(elem) {\n var offset = 0 ;\n var siblings = elem.previousElementSibling;\n\n while(siblings !== null) {\n offset += siblings.clientHeight;\n siblings = siblings.previousElementSibling;\n }\n return offset;\n }", "top() {return this.y - this.h + 'px';}", "function setElementTop(dragElement, target, intTop) {\n var intHeight = dragElement.offsetHeight, minBottom = target.offsetHeight;\n \n // target bottom edge must never get < container bottom edge\n if ((intTop + intHeight) < minBottom) {\n intTop = (minBottom - intHeight);\n }\n \n // target top edge must never get > container top edge\n if (intTop > 0) {\n intTop = 0;\n }\n \n dragElement.style.top = intTop + 'px';\n }", "function scrollToTop () {\n bodyElement.scrollTo({\n top: 0,\n behavior: 'smooth'\n }) ||\n rootElement.scrollTo({\n top: 0,\n behavior: 'smooth'\n })\n}", "fillBelow(newTop) {\n const me = this,\n fillHeight = newTop - me.topRow.top - me.prependBufferHeight,\n recordCount = me.store.count,\n rowCount = me.rowCount;\n\n let accumulatedHeight = 0;\n\n // Repeat until we have filled empty height\n while (\n accumulatedHeight < fillHeight && // fill empty height\n me.topIndex + rowCount < recordCount && // as long as we have records left\n me.topRow.top + me.topRow.offsetHeight < newTop // and do not run move top row fully into view (can happen with var row height)\n ) {\n // We want to show next record at bottom of rows\n accumulatedHeight += me.displayRecordAtBottom();\n }\n }", "function checkAndRepositionRowHeader(header) {\n header.children().each(function(index, element) {\n var containerOffset = _renderer.getContainer().offset();\n var elementOffset = jQuery(_renderer.getCellElements()[index][0]).offset();\n var top = elementOffset.top - containerOffset.top;\n \n jQuery(element).css({\n top: top\n });\n });\n }", "function UltraGrid_SetFirstScroll(theObject)\n{\n\t//not yet done?\n\tif (!theObject.Paint.FirstScroll)\n\t{\n\t\t//iterate through the panels\n\t\tfor (var panels = theObject.Data.Panels, i = 0, c = panels.length; i < c; i++)\n\t\t{\n\t\t\t//get the panel (ease of use)\n\t\t\tvar panel = panels[i];\n\t\t\t//does it have scroll position?\n\t\t\tif (panel.ScrollPosition)\n\t\t\t{\n\t\t\t\t//has it got vertical\n\t\t\t\tif (panel.ScrollPosition.Vertical)\n\t\t\t\t{\n\t\t\t\t\t//has pixels position\n\t\t\t\t\tvar scrollTop = Get_Number(panel.ScrollPosition.Vertical.Pixels, null);\n\t\t\t\t\t//invalid?\n\t\t\t\t\tif (scrollTop == null)\n\t\t\t\t\t{\n\t\t\t\t\t\t//try the first visible cell\n\t\t\t\t\t\tvar cells = UltraGrid_GetCellsFromSetIds(theObject, panel.ScrollPosition.Vertical.First);\n\t\t\t\t\t\t//valid?\n\t\t\t\t\t\tif (cells.length > 0)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t//we only care about the first cell\n\t\t\t\t\t\t\tvar cell = cells[0];\n\t\t\t\t\t\t\t//get this cells panel row (the row that is in the cell's panel) and copy its top;\n\t\t\t\t\t\t\tscrollTop = cell.Row.PanelTops[cell.Panel.Id];\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t//try the last visible cell\n\t\t\t\t\t\t\tcells = UltraGrid_GetCellsFromSetIds(theObject, panel.ScrollPosition.Vertical.Last);\n\t\t\t\t\t\t\t//valid?\n\t\t\t\t\t\t\tif (cells.length > 0)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t//we only care about the first cell\n\t\t\t\t\t\t\t\tvar cell = cells[0];\n\t\t\t\t\t\t\t\t//get this cells panel row (the row that is in the cell's panel) and copy its top;\n\t\t\t\t\t\t\t\tscrollTop = cell.Row.PanelTops[cell.Panel.Id];\n\t\t\t\t\t\t\t\t//but we want it to show at the bottom so reduce the scroll so that the cell is at the bottom\n\t\t\t\t\t\t\t\tscrollTop -= cell.Panel.HTML.clientHeight - cell.Rect.height;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t//try the ensure its visible\n\t\t\t\t\t\t\t\tcells = UltraGrid_GetCellsFromSetIds(theObject, panel.ScrollPosition.Vertical.EnsureVisible);\n\t\t\t\t\t\t\t\t//valid?\n\t\t\t\t\t\t\t\tif (cells.length > 0)\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t//we only care about the first cell\n\t\t\t\t\t\t\t\t\tvar cell = cells[0];\n\t\t\t\t\t\t\t\t\t//get this cells panel row (the row that is in the cell's panel) and copy its top;\n\t\t\t\t\t\t\t\t\tvar top = cell.Row.PanelTops[cell.Panel.Id];\n\t\t\t\t\t\t\t\t\t//get the cells panel row bottom;\n\t\t\t\t\t\t\t\t\tvar bottom = top + cell.Row.Height;\n\t\t\t\t\t\t\t\t\t//now calculate the visible area of the panels\n\t\t\t\t\t\t\t\t\tvar panelScroll = cell.Panel.HTML.scrollTop;\n\t\t\t\t\t\t\t\t\tvar panelHeight = cell.Panel.HTML.clientHeight;\n\t\t\t\t\t\t\t\t\tvar panelScrollBottom = panelScroll + panelHeight;\n\t\t\t\t\t\t\t\t\t//is not showing\n\t\t\t\t\t\t\t\t\tif (top < panelScroll || bottom > panelScrollBottom)\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t//center it\n\t\t\t\t\t\t\t\t\t\tscrollTop = top - (panelHeight - cell.Row.Height) / 2;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t//valid scroll top?\n\t\t\t\t\tif (scrollTop != null)\n\t\t\t\t\t{\n\t\t\t\t\t\t//update it\n\t\t\t\t\t\tpanel.HTML.scrollTop = scrollTop;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t//has it got horizontal\n\t\t\t\tif (panel.ScrollPosition.Horizontal)\n\t\t\t\t{\n\t\t\t\t\t//has pixels position\n\t\t\t\t\tvar scrollLeft = Get_Number(panel.ScrollPosition.Horizontal.Pixels, null);\n\t\t\t\t\t//invalid?\n\t\t\t\t\tif (scrollLeft == null)\n\t\t\t\t\t{\n\t\t\t\t\t\t//try the first visible cell\n\t\t\t\t\t\tvar cells = UltraGrid_GetCellsFromSetIds(theObject, panel.ScrollPosition.Horizontal.First);\n\t\t\t\t\t\t//valid?\n\t\t\t\t\t\tif (cells.length > 0)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t//we only care about the first cell\n\t\t\t\t\t\t\tvar cell = cells[0];\n\t\t\t\t\t\t\t//get this cells left directly\n\t\t\t\t\t\t\tscrollLeft = cell.Rect.left;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t//try the last visible cell\n\t\t\t\t\t\t\tcells = UltraGrid_GetCellsFromSetIds(theObject, panel.ScrollPosition.Horizontal.Last);\n\t\t\t\t\t\t\t//valid?\n\t\t\t\t\t\t\tif (cells.length > 0)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t//we only care about the first cell\n\t\t\t\t\t\t\t\tvar cell = cells[0];\n\t\t\t\t\t\t\t\t//get this cells left directly\n\t\t\t\t\t\t\t\tscrollLeft = cell.Rect.left;\n\t\t\t\t\t\t\t\t//but we want it to show at the right so advance the scroll so that the cell is at the right\n\t\t\t\t\t\t\t\tscrollLeft -= cell.Panel.HTML.clientWidth - cell.Rect.width;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t//try the ensure its visible\n\t\t\t\t\t\t\t\tcells = UltraGrid_GetCellsFromSetIds(theObject, panel.ScrollPosition.Horizontal.EnsureVisible);\n\t\t\t\t\t\t\t\t//valid?\n\t\t\t\t\t\t\t\tif (cells.length > 0)\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t//we only care about the first cell\n\t\t\t\t\t\t\t\t\tvar cell = cells[0];\n\t\t\t\t\t\t\t\t\t//get this cells left directly\n\t\t\t\t\t\t\t\t\tvar left = cell.Rect.left;\n\t\t\t\t\t\t\t\t\t//get the right\n\t\t\t\t\t\t\t\t\tvar right = cell.Rect.right;\n\t\t\t\t\t\t\t\t\t//now calculate the visible area of the panels\n\t\t\t\t\t\t\t\t\tvar panelScroll = cell.Panel.HTML.scrollLeft;\n\t\t\t\t\t\t\t\t\tvar panelWidth = cell.Panel.HTML.clientWidth;\n\t\t\t\t\t\t\t\t\tvar panelScrollRight = panelScroll + panelWidth;\n\t\t\t\t\t\t\t\t\t//is not showing\n\t\t\t\t\t\t\t\t\tif (left < panelScroll || right > panelScrollRight)\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t//center it\n\t\t\t\t\t\t\t\t\t\tscrollLeft = left - (panelWidth - cell.Rect.width) / 2;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t//valid scroll top?\n\t\t\t\t\tif (scrollLeft != null)\n\t\t\t\t\t{\n\t\t\t\t\t\t//update it\n\t\t\t\t\t\tpanel.HTML.scrollLeft = scrollLeft;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t//synchronise the panels so that they are all matching\n\t\tUltraGrid_Paint_SyncPanels(theObject)\n\t\t//first scroll set\n\t\ttheObject.Paint.FirstScroll = true;\n\t}\n}", "topPosition(el) {\n return el ? el.offsetTop + this.topPosition(el.offsetParent) : 0;\n }", "function arrange() {\n for(var i = 0; i < 15; ++i) {\n pieces[i].element.style.left = pieces[i].col*100 + \"px\";\n pieces[i].element.style.top = pieces[i].row*100 + \"px\";\n }\n}", "function PosCenterTop() {\n var top = M.R((va.hRuby - M.OuterHeight($imgItem, true)) / 2);\n if (top == 0)\n top = '';\n $imgItem.css('top', top);\n }", "function getTop(grid) {\n if (!grid) return 0;\n let total = 0;\n for (let x=0;x<5;x++) total += grid[0][x] || 0;\n return total;\n}", "moveToTop([horizontal, vertical]) {\n return horizontal + (+vertical + 1);\n }", "_updatePosFromTop() {\n this._bottomRight = this._topLeft.$add(this._size);\n this._updateCenter();\n }", "function topLeft() {\n if (cellTopLeft.classList.contains('bomb')) {\n bombCount += 1\n }\n }", "function makeRows(rows, cols) {\n timeGrid.style.setProperty(\"--grid-rows\", rows);\n timeGrid.style.setProperty(\"--grid-cols\", cols);\n }", "function l(a,b){var c,d=m(a),e=r(),f=[];\n// Set each row's height by setting height of first inner div\nif(b)for(c=0;c<e.length;c++)e[c].height(d[c]);\n// Get each row's top, relative to the views's origin.\n// Important to do this after setting each row's height.\nfor(c=0;c<e.length;c++)f.push(e[c].position().top);\n// Set each segment element's CSS \"top\" property.\n// Each segment object has a \"top\" property, which is relative to the row's top, but...\nxa(a,function(a,b){b.css(\"top\",f[a.row]+a.top)})}", "setTop(valueNew){let t=e.ValueConverter.toNumber(valueNew);null===t&&(t=this.getAttributeDefaultValueInternal(\"Top\")),t!==this.__top&&(this.__top=t,e.EventProvider.raise(this.__id+\".onPropertyChanged\",{propertyName:\"Top\"}),this.__processTop())}", "fillBelow(newTop) {\n const me = this,\n fillHeight = newTop - me.topRow.top - me.prependBufferHeight,\n recordCount = me.store.count,\n rowCount = me.rowCount;\n let accumulatedHeight = 0; // Repeat until we have filled empty height\n\n while (accumulatedHeight < fillHeight && // fill empty height\n me.topIndex + rowCount < recordCount && // as long as we have records left\n me.topRow.top + me.topRow.offsetHeight < newTop // and do not move top row fully into view (can happen with var row height)\n ) {\n // We want to show next record at bottom of rows\n accumulatedHeight += me.displayRecordAtBottom();\n }\n\n me.trigger('renderDone');\n }", "getMaxTopCellMargin(row) {\n if (isNullOrUndefined(row.childWidgets)) {\n return 0;\n }\n let value = 0;\n for (let i = 0; i < row.childWidgets.length; i++) {\n let cell = row.childWidgets[i];\n let topMargin = 0;\n if (cell.cellFormat.hasValue('topMargin')) {\n topMargin = HelperMethods.convertPointToPixel(cell.cellFormat.topMargin);\n }\n else if (row.rowFormat.hasValue('topMargin')) {\n topMargin = HelperMethods.convertPointToPixel(row.rowFormat.topMargin);\n }\n else {\n topMargin = HelperMethods.convertPointToPixel(row.ownerTable.tableFormat.topMargin);\n }\n if (topMargin > value) {\n value = topMargin;\n }\n }\n return value;\n }", "function get_next_top_row( rows_code ) {\n var row = rows_code.last().next();\n\n while ( ( row.length !== 0 ) && ! row.hasClass( 'top' ) ) {\n row = row.next();\n }\n return row;\n }", "function populate() {\n showTopHeaders.call(this);\n populateRows.call(this);\n }", "updateCellContentVerticalPosition(cellWidget, displacement, isUpdateToTop) {\n if (displacement === 0) {\n return;\n }\n let location = cellWidget.y + displacement;\n for (let i = 0; i < cellWidget.childWidgets.length; i++) {\n if (cellWidget.childWidgets[i] instanceof ParagraphWidget) {\n cellWidget.childWidgets[i].y = location;\n }\n else {\n location = this.updateTableWidgetLocation(cellWidget.childWidgets[i], location, isUpdateToTop);\n }\n location = location + cellWidget.childWidgets[i].height;\n }\n }", "function updateToothArray(isTop) {\n\t\t\t\tbuilder.find('.' + (isTop ? 'top' : 'bottom') + '-row').each(function(index) {\n\t\t\t\t\t// set position in selectedTeeth array to true or false based on whether or not the tooth is selected\n\t\t\t\t\tselectedTeeth[(isTop ? 'top' : 'bottom')][index] = $(this).hasClass('active');\n\t\t\t\t});\n\t\t\t}", "function TreeGrid_Paint_Row_Paint(nTop, fixedParent, scrollParent, fixSeparator)\n{\n\t//helpers\n\tvar object, i, c;\n\t//get the treeview column \n\tvar nTreeViewColumn = this.InterpreterObject.Content.TreeData ? this.InterpreterObject.Content.TreeData.Column : -1;\n\t//have we got an html?\n\tif (!this.HTML)\n\t{\n\t\t//create fixed row\n\t\tvar fixedRow = document.createElement(\"div\");\n\t\t//set its styles\n\t\tfixedRow.id = \"Fixed_Row_\" + this.Index;\n\t\tfixedRow.style.cssText = \"position:absolute;\";\n\t\tfixedRow.style.top = nTop + \"px\";\n\t\tfixedRow.style.height = this.Height + \"px\";\n\t\t//clone the fixed into scrollable\n\t\tvar scrollable = fixedRow.cloneNode(true);\n\t\tscrollable.id = \"Scrollable_Row_\" + this.Index;\n\t\t//create our html object\n\t\tthis.HTML =\n\t\t{\n\t\t\tFixed: fixedParent.appendChild(fixedRow),\n\t\t\tScrollable: scrollParent.appendChild(scrollable)\n\t\t};\n\t\t//link it to the row\n\t\tthis.HTML.Fixed.Row = this;\n\t\tthis.HTML.Scrollable.Row = this;\n\t\t//fixed width\n\t\tvar fixedWidth = 0;\n\t\t//scrollable width\n\t\tvar scrollWidth = 0;\n\t\t//now loop through our objects\n\t\tfor (i = 0, c = this.Objects.length; i < c; i++)\n\t\t{\n\t\t\t//get this object\n\t\t\tobject = this.Objects[i];\n\t\t\t//update its interface look\n\t\t\tobject.UpdateInterfaceLook();\n\t\t\t//get its left\n\t\t\tvar nLeft = Get_Number(object.Properties[__NEMESIS_PROPERTY_LEFT], 0);\n\t\t\t//and its width\n\t\t\tvar nWidth = Get_Number(object.Properties[__NEMESIS_PROPERTY_WIDTH], 0);\n\t\t\t//fixed?\n\t\t\tif (nLeft <= fixSeparator - __TREEGRID_HEADERS_COLUMNS_ACCEPTABLE_OFFSET || nLeft + nWidth <= fixSeparator + __TREEGRID_HEADERS_COLUMNS_ACCEPTABLE_OFFSET)\n\t\t\t{\n\t\t\t\t//set this inside the fixed\n\t\t\t\tobject.Parent.HTMLParent = fixedRow;\n\t\t\t\t//increase fixed width\n\t\t\t\tfixedWidth = Math.max(fixedWidth, nLeft + nWidth);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t//set this inside the scrollable\n\t\t\t\tobject.Parent.HTMLParent = scrollable;\n\t\t\t\t//increase scrollable width\n\t\t\t\tscrollWidth = Math.max(scrollWidth, nLeft + nWidth);\n\t\t\t}\n\t\t\t//this the treeview Object?\n\t\t\tif (i == nTreeViewColumn)\n\t\t\t{\n\t\t\t\t//create it via the specialised item\n\t\t\t\tobject.HTML = TreeGrid_TreeView_CreateHTML(object, this.InterpreterObject.Content.TreeData, this.Height);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t//create it\n\t\t\t\tobject.HTML = object.CreateHTML();\n\t\t\t}\n\t\t\t//object has arrow selection?\n\t\t\tif (Get_Bool(object.Properties[__NEMESIS_PROPERTY_ARROW_SELECTION]))\n\t\t\t{\n\t\t\t\t//get the treegrid's arrow selection value\n\t\t\t\tvar ownerDrawn = JSON.parse(this.InterpreterObject.Properties[__NEMESIS_PROPERTY_OWNERDRAW_IMAGES]);\n\t\t\t\t//add selected bgimage\n\t\t\t\tobject.BGImages[__STATE_SELECTED] = ownerDrawn.RowSelected;\n\t\t\t\t//nothing on the default state?\n\t\t\t\tif (!object.BGImages[__STATE_DEFAULT])\n\t\t\t\t{\n\t\t\t\t\t//add empty\n\t\t\t\t\tobject.BGImages[__STATE_DEFAULT] = ownerDrawn.RowUnselected;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t//correct their widths\n\t\tfixedRow.style.width = fixedWidth + \"px\";\n\t\tscrollable.style.width = scrollWidth + \"px\";\n\t\t//set mouse down for actions\n\t\tBrowser_AddEvent(fixedRow, __BROWSER_EVENT_CLICK, TreeGrid_OnMouseDown_Row);\n\t\tBrowser_AddEvent(fixedRow, __BROWSER_EVENT_MOUSERIGHT, TreeGrid_OnMouseDown_Row);\n\t\tBrowser_AddEvent(fixedRow, __BROWSER_EVENT_DOUBLECLICK, TreeGrid_OnMouseDown_Row);\n\t\tBrowser_AddEvent(fixedRow, __BROWSER_EVENT_MOUSEDOWN, TreeGrid_OnMouseDown_Row);\n\t\t//set mouse down for actions\n\t\tBrowser_AddEvent(scrollable, __BROWSER_EVENT_CLICK, TreeGrid_OnMouseDown_Row);\n\t\tBrowser_AddEvent(scrollable, __BROWSER_EVENT_MOUSERIGHT, TreeGrid_OnMouseDown_Row);\n\t\tBrowser_AddEvent(scrollable, __BROWSER_EVENT_DOUBLECLICK, TreeGrid_OnMouseDown_Row);\n\t\tBrowser_AddEvent(scrollable, __BROWSER_EVENT_MOUSEDOWN, TreeGrid_OnMouseDown_Row);\n\t}\n\telse\n\t{\n\t\t//display both\n\t\tthis.HTML.Fixed.style.display = \"block\";\n\t\tthis.HTML.Scrollable.style.display = \"block\";\n\t\t//correct top\n\t\tthis.HTML.Fixed.style.top = nTop + \"px\";\n\t\tthis.HTML.Scrollable.style.top = nTop + \"px\";\n\t\t//row already created but the treeview might have changed\n\t\tif (nTreeViewColumn != -1)\n\t\t{\n\t\t\t//get the treeview object\n\t\t\tobject = this.Objects[nTreeViewColumn];\n\t\t\t//update it\n\t\t\tTreeGrid_TreeView_UpdateHTML(object, this.InterpreterObject.Content.TreeData, this.Height);\n\t\t}\n\t}\n\t//restore line background\n\tthis.HTML.Fixed.style.backgroundColor = \"Transparent\";\n\tthis.HTML.Scrollable.style.backgroundColor = this.HTML.Fixed.style.backgroundColor;\n\t//loop through all the cells\n\tfor (i = 0, c = this.Objects.length; i < c; i++)\n\t{\n\t\t//get the object\n\t\tobject = this.Objects[i];\n\t\t//set its colors\n\t\tobject.HTML.style.backgroundColor = object.BGColours[__STATE_DEFAULT];\n\t\tobject.HTML.style.color = object.FGColours[__STATE_DEFAULT];\n\t\t//check defaults\n\t\tif (object.BGImages[__STATE_DEFAULT] != object.CurrentState.bgImage || object.BGImagesPos[__STATE_DEFAULT] != object.CurrentState.bgImagePos)\n\t\t{\n\t\t\t//update values\n\t\t\tobject.CurrentState.bgImage = object.BGImages[__STATE_DEFAULT];\n\t\t\tobject.CurrentState.bgImagePos = object.BGImagesPos[__STATE_DEFAULT];\n\t\t\tBasic_SetBackImage(object.HTML, object.HTML.InterpreterObject, object.CurrentState.bgImage, object.CurrentState.bgImagePos);\n\t\t}\n\t}\n\t//is this selected? Or Has a Selected Cell\n\tif (this.Selected || this.HasCellSelection)\n\t{\n\t\t//get its row selection colour\n\t\tvar clrForced = false;\n\t\t//loop through all the cells\n\t\tfor (i = 0, c = this.Objects.length; i < c; i++)\n\t\t{\n\t\t\t//get the object\n\t\t\tobject = this.Objects[i];\n\t\t\t//has selection colour\n\t\t\tif (object.Selected && object.SelectionActionsOnly)\n\t\t\t{\n\t\t\t\t//use it\n\t\t\t\tclrForced = Get_Color(object.SelectionActionsOnly, false);\n\t\t\t}\n\t\t}\n\n\t\t//row selected? and has either a selected colour or a forced color\n\t\tif (this.Selected && (clrForced || this.InterpreterObject.BGColours[__STATE_SELECTED]))\n\t\t{\n\t\t\t//set the colour on the line\n\t\t\tthis.HTML.Fixed.style.backgroundColor = clrForced ? clrForced : this.InterpreterObject.BGColours[__STATE_SELECTED];\n\t\t\tthis.HTML.Scrollable.style.backgroundColor = this.HTML.Fixed.style.backgroundColor;\n\t\t}\n\t\t//loop through all the cells\n\t\tfor (i = 0, c = this.Objects.length; i < c; i++)\n\t\t{\n\t\t\t//get the cell object\n\t\t\tobject = this.Objects[i];\n\t\t\t//row selected?\n\t\t\tif (this.Selected)\n\t\t\t{\n\t\t\t\t//set its colors\n\t\t\t\tif (clrForced)\n\t\t\t\t\tobject.HTML.style.backgroundColor = clrForced;\n\t\t\t\telse if (object.BGColours[__STATE_SELECTED])\n\t\t\t\t\tobject.HTML.style.backgroundColor = object.BGColours[__STATE_SELECTED];\n\t\t\t\tif (object.FGColours[__STATE_SELECTED])\n\t\t\t\t\tobject.HTML.style.color = object.FGColours[__STATE_SELECTED];\n\t\t\t}\n\t\t\t//is it selected?\n\t\t\tif (object.Selected && !object.SelectionActionsOnly && !object.HTML.disabled && !object.HTML.IGNORE_EVENTS)\n\t\t\t{\n\t\t\t\t//has column color\n\t\t\t\tif (object.ColumnSelected)\n\t\t\t\t\tobject.HTML.style.backgroundColor = object.ColumnSelected;\n\t\t\t\t//has focused states?\n\t\t\t\telse if (object.BGColours[__STATE_FOCUSED] || object.FGColours[__STATE_FOCUSED])\n\t\t\t\t{\n\t\t\t\t\t//set its colors\n\t\t\t\t\tif (object.BGColours[__STATE_FOCUSED])\n\t\t\t\t\t\tobject.HTML.style.backgroundColor = object.BGColours[__STATE_FOCUSED];\n\t\t\t\t\tif (object.FGColours[__STATE_FOCUSED])\n\t\t\t\t\t\tobject.HTML.style.color = object.FGColours[__STATE_FOCUSED];\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t//set its colors\n\t\t\t\t\tif (object.BGColours[__STATE_SELECTED])\n\t\t\t\t\t\tobject.HTML.style.backgroundColor = object.BGColours[__STATE_SELECTED];\n\t\t\t\t\tif (object.FGColours[__STATE_SELECTED])\n\t\t\t\t\t\tobject.HTML.style.color = object.FGColours[__STATE_SELECTED];\n\t\t\t\t}\n\t\t\t}\n\t\t\t//has selected item?\n\t\t\tif (object.BGImages[__STATE_SELECTED] || object.BGImagesPos[__STATE_SELECTED])\n\t\t\t{\n\t\t\t\t//check defaults\n\t\t\t\tif (object.BGImages[__STATE_SELECTED] != object.CurrentState.bgImage || object.BGImagesPos[__STATE_SELECTED] != object.CurrentState.bgImagePos)\n\t\t\t\t{\n\t\t\t\t\t//update values\n\t\t\t\t\tobject.CurrentState.bgImage = object.BGImages[__STATE_SELECTED];\n\t\t\t\t\tobject.CurrentState.bgImagePos = object.BGImagesPos[__STATE_SELECTED];\n\t\t\t\t\tBasic_SetBackImage(object.HTML, object, object.CurrentState.bgImage, object.CurrentState.bgImagePos);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}", "function getTop(elem) {\n let yPos = 0;\n while (elem) {\n yPos += (elem.offsetTop - elem.scrollTop + elem.clientTop);\n elem = elem.offsetParent;\n }\n return yPos;\n}", "set _scrollTop(top){this.$.table.scrollTop=top}", "constructor(isTop, height) {\n this.width = 70;\n this.height = height;\n this.x = canvas.width;\n this.isTop = isTop;\n if (this.isTop) {\n this.topY = 0;\n this.bottomY = this.height;\n } else {\n this.topY = canvas.height - this.height;\n this.bottomY = canvas.heaight;\n }\n }", "shiftChildLocationForTableCellWidget(cellWidget, shiftTop) {\n cellWidget.y = cellWidget.y + shiftTop;\n for (let i = 0; i < cellWidget.childWidgets.length; i++) {\n if (cellWidget.childWidgets[i] instanceof ParagraphWidget) {\n cellWidget.childWidgets[i].x = cellWidget.childWidgets[i].x;\n cellWidget.childWidgets[i].y = cellWidget.childWidgets[i].y + shiftTop;\n }\n else {\n this.shiftChildLocationForTableWidget(cellWidget.childWidgets[i], shiftTop);\n }\n }\n }", "function topFunction() {\n \n elementStorer.scrollTop = 0; // For Chrome, Firefox, IE and Opera\n}", "_hideRowsOutOfView() {\n const rect = this.dom.getBoundingClientRect();\n const scrollTop = this.dom.scrollTop;\n this._prevScrollTop = scrollTop;\n\n this._resizingVisibleRows.length = 0;\n const visible = this._resizingVisibleRows;\n\n // Find all the rows that are inside the scroll view\n // and store them in _resizingVisibleRows.\n // We will hide the rest.\n let foundFirst = false;\n let row = this.body.dom.childNodes[0];\n while (row) {\n if (row.ui instanceof TableRow && !row.ui.hidden) {\n const rowRect = row.getBoundingClientRect();\n\n if (rowRect.bottom >= rect.top && rowRect.top <= rect.bottom) {\n visible.push(row);\n foundFirst = true;\n } else if (foundFirst) {\n // early break as if this rect is not visible\n // but we have already added one this means we are\n // beyond the bottom bounds of the scroll view.\n break;\n }\n }\n\n row = row.nextSibling;\n }\n\n if (visible.length) {\n // calculate the height before the first visible row\n // and the height after the last visible row.\n const bodyRect = this.body.dom.getBoundingClientRect();\n const firstRect = visible[0].getBoundingClientRect();\n const lastRect = visible[visible.length - 1].getBoundingClientRect();\n const beforeHeight = firstRect.top - bodyRect.top;\n const afterHeight = bodyRect.bottom - lastRect.bottom;\n\n requestAnimationFrame(() => {\n if (!visible.length) return;\n\n // Set custom CSS properties for before and after heights so that we fill\n // the table with a pseudo-element row before the first visible row and one\n // after the last visible row. This will ensure that our scrollview remains\n // the same height and the scroll position remains at the same place. The user\n // should not see any movement or changes to the scrollview that way.\n this.body.style.setProperty(CSS_PROPERTY_HEIGHT_BEFORE, beforeHeight + 'px');\n this.body.style.setProperty(CSS_PROPERTY_HEIGHT_AFTER, afterHeight + 'px');\n visible.forEach((dom) => dom.classList.add(CLASS_RESIZING_VISIBLE));\n this.dom.scrollTop = scrollTop;\n });\n }\n }", "setBottom(bottom) {\n this.setTop(bottom - this.offsetHeight);\n }", "function updatePositions(canvasTop) {\n // set positions using parameter\n $(\"#numInput\").css({\n top: canvasTop + 180\n });\n $(\"#convertBtn\").css({\n top: canvasTop + 210\n });\n }", "function addTopAndBottomFunctions(object) {\n object.top = function() {\n return object.offset().top;\n }\n object.bottom = function() {\n return object.offset().top + object.outerHeight();\n }\n}", "set TopCenter(value) {}", "updateRowMap() {\n const allItems = [].slice.call(document.querySelectorAll('.box'))\n let rowMap = []\n allItems.forEach((item, index) => {\n const rowTopY = item.getBoundingClientRect().y\n const itemHeight = item.getBoundingClientRect().height\n const rowBottomY = rowTopY + itemHeight\n rowMap[index] = [rowTopY, rowBottomY]\n })\n this.setState({\n rowMap: rowMap\n })\n }", "function swapRows(topRow, bottomRow){\n let temp = {};\n temp[\"colOne\"] = bottomRow[0].innerHTML;\n temp[\"colTwo\"] = bottomRow[1].innerHTML;\n\n\n bottomRow[0].innerHTML = topRow[0].innerHTML;\n bottomRow[1].innerHTML = topRow[1].innerHTML;\n\n\n topRow[0].innerHTML = temp[\"colOne\"];\n topRow[1].innerHTML = temp[\"colTwo\"];\n\n\n if (topRow.length > 2 && bottomRow.length > 2){\n temp[\"colThree\"] = bottomRow[2].innerHTML;\n temp[\"colFour\"] = bottomRow[3].innerHTML;\n\n\n bottomRow[2].innerHTML = topRow[2].innerHTML;\n bottomRow[3].innerHTML = topRow[3].innerHTML;\n\n topRow[2].innerHTML = temp[\"colThree\"];\n topRow[3].innerHTML = temp[\"colFour\"];\n }\n }", "function initTopPaneCell( title )\n {\n return [\n {\n text: title\n ,bold: true\n ,fontSize: 14\n ,margin: [16,15,0,0]\n ,color: nheap.companyColors.blue_master\n }\n ];\n }", "get top() {\n // origin is at top left so just return y\n return this.y\n }", "function scrollToTopInit() {\r\n\r\n\t\t\t\t\t// Show/hide based on scroll pos\r\n\t\t\t\t\tif ($('.nectar-social.fixed').length == 0) {\r\n\t\t\t\t\t\ttoTopBind();\r\n\t\t\t\t\t} \r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t// Rounded style\r\n\t\t\t\t\tif ($('body[data-button-style*=\"rounded\"]').length > 0) {\r\n\t\t\t\t\t\tvar $clone = $('#to-top .fa-angle-up').clone();\r\n\t\t\t\t\t\t$clone.addClass('top-icon');\r\n\t\t\t\t\t\t$('#to-top').prepend($clone);\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\t// Scroll up click event\r\n\t\t\t\t\t$body.on('click', '#to-top, a[href=\"#top\"]', function () {\r\n\t\t\t\t\t\t$('body,html').stop().animate({\r\n\t\t\t\t\t\t\tscrollTop: 0\r\n\t\t\t\t\t\t}, 800, 'easeOutQuad', function () {\r\n\t\t\t\t\t\t\tif ($('.nectar-box-roll').length > 0) {\r\n\t\t\t\t\t\t\t\t$body.trigger('mousewheel', [1, 0, 0]);\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t\treturn false;\r\n\t\t\t\t\t});\r\n\t\t\t\t\t\r\n\t\t\t\t}", "rows() {\n var self = this;\n return Array.apply(this.topRow(), Array(this.bottomRow()+1)).map(function (x, row) {\n return Array.apply(self.topColumn(), Array(self.bottomColumn()+1)).map(function (x, col) {\n return [CELLINDEX(col, row)];\n })\n })\n }", "function styleRow() {\n var photosetRows = document.getElementsByClassName(options.rowClass);\n for (j = 0; j < photosetRows.length; j++) {\n /* image container width */\n var currentRowImageContainers = [];\n for (l = 0; l < photosetRows[j].childNodes.length; l++) {\n if (new RegExp(options.imageContainerClass).test(photosetRows[j].childNodes[l].className) === true || new RegExp(options.imageContainerClass).test(photosetRows[j].childNodes[l].childNodes[0].className) === true) { currentRowImageContainers.push(photosetRows[j].childNodes[l]); }\n }\n \n if (!hasClass(photosetRows[j].parentNode, \"adaptable_\" + options.generatedPhotosetContainerClass)) { var rowSize = (parseFloat(window.getComputedStyle(photosetRows[j]).width, 10) - (options.photosetMargins * (currentRowImageContainers.length - 1))) / currentRowImageContainers.length; } else { var rowSize = parseFloat(window.getComputedStyle(currentRowImageContainers[0]).width, 10); }\n photosetRows[j].setAttribute(\"data-row-size\", rowSize);\n \n /* image container height */\n var currentRowImages = photosetRows[j].querySelectorAll(\".\" + options.imageClass);\n var currentRowImagesHeight = [];\n for (l = 0; l < currentRowImages.length; l++) {\n if (currentRowImages[l].getAttribute(\"width\") == false || currentRowImages[l].getAttribute(\"width\") == null || currentRowImages[l].getAttribute(\"height\") == false || currentRowImages[l].getAttribute(\"height\") == null) { var imgWidth = currentRowImages[l].getAttribute(\"data-orig-width\"); var imgHeight = currentRowImages[l].getAttribute(\"data-orig-height\"); } else { var imgWidth = currentRowImages[l].getAttribute(\"width\"); var imgHeight = currentRowImages[l].getAttribute(\"height\"); }\n var imageHeight = photosetRows[j].getAttribute(\"data-row-size\") * (imgHeight / imgWidth);\n currentRowImages[l].setAttribute(\"data-image-size\", imageHeight);\n currentRowImagesHeight.push(imageHeight);\n }\n var rowHeight = Math.min.apply(null, currentRowImagesHeight);\n var currentRowImages = photosetRows[j].querySelectorAll(\".\" + options.imageContainerClass);\n for (l = 0; l < currentRowImages.length; l++) {\n currentRowImages[l].style.height = rowHeight + parseInt(window.getComputedStyle(currentRowImages[l]).getPropertyValue(\"border-top-width\"), 10) + parseInt(window.getComputedStyle(currentRowImages[l]).getPropertyValue(\"border-bottom-width\"), 10) + \"px\";\n var actualImage = currentRowImages[l].getElementsByClassName(options.imageClass)[0];\n actualImage.style.marginTop = \"-\" + ((actualImage.getAttribute(\"data-image-size\") - rowHeight) / 2) + \"px\";\n }\n }\n }", "function top_calcul(){\r\n \r\n pose_menu();\r\n \r\n if(xsmall){\r\n top2=$('.g-head').innerHeight() + 524;\r\n }else{\r\n var cons=0;\r\n if(small){\r\n cons=170;\r\n }else if(md){\r\n cons=170;\r\n }else if(lg){\r\n cons=105;\r\n }\r\n //alert(cons);\r\n top2=$('.g-head').innerHeight() + $('.slide').innerHeight()-($('.sous-bloc').innerHeight()+cons);\r\n }\r\n }", "putTop(b, xOffset = 0, yOffset = 0) {\n let a = this\n b.x = (a.x + a.halfWidth - b.halfWidth) + xOffset\n b.y = (a.y - b.height) + yOffset\n }" ]
[ "0.62780106", "0.5894834", "0.5894834", "0.57709247", "0.5713832", "0.56712687", "0.56207776", "0.5389735", "0.5387763", "0.53360677", "0.5297009", "0.5165856", "0.515003", "0.51485205", "0.5138619", "0.5128648", "0.5125497", "0.5108496", "0.50879097", "0.5080013", "0.50555265", "0.5050866", "0.50475556", "0.5024045", "0.50034344", "0.4999361", "0.49720767", "0.4966839", "0.49618867", "0.49531397", "0.49500558", "0.49108848", "0.49027383", "0.48917153", "0.48880503", "0.48779604", "0.48631728", "0.48597553", "0.4846828", "0.48028708", "0.47637442", "0.47474974", "0.47421944", "0.47335348", "0.47325414", "0.47128302", "0.47091916", "0.4708208", "0.46967477", "0.46886644", "0.46862206", "0.46846676", "0.46841067", "0.46803492", "0.4677147", "0.46728593", "0.46403736", "0.4637712", "0.46370625", "0.46364346", "0.46244836", "0.46229804", "0.46115464", "0.46004176", "0.45965764", "0.45909742", "0.45853394", "0.4585108", "0.45737606", "0.45700786", "0.45690015", "0.45689943", "0.45551565", "0.45464718", "0.45214784", "0.4505797", "0.4497098", "0.4477899", "0.4475368", "0.44639242", "0.4461241", "0.44582036", "0.44520566", "0.44514078", "0.44503182", "0.44493482", "0.44405538", "0.44403782", "0.44340274", "0.44338736", "0.44324064", "0.44288266", "0.44230643", "0.4400006", "0.4398336", "0.4398298", "0.43830827", "0.43809363" ]
0.58953923
2
Calculate the "top" coordinate for each segment, relative to the "top" of the row. Also, return an array that contains the "content" height for each row (the height displaced by the vertically stacked events in the row). Requires segments to have their `outerHeight` property already set.
function calculateVerticals(segments) { var rowCnt = getRowCnt(); var colCnt = getColCnt(); var rowContentHeights = []; // content height for each row var segmentRows = buildSegmentRows(segments); // an array of segment arrays, one for each row for (var rowI=0; rowI<rowCnt; rowI++) { var segmentRow = segmentRows[rowI]; // an array of running total heights for each column. // initialize with all zeros. var colHeights = []; for (var colI=0; colI<colCnt; colI++) { colHeights.push(0); } // loop through every segment for (var segmentI=0; segmentI<segmentRow.length; segmentI++) { var segment = segmentRow[segmentI]; // find the segment's top coordinate by looking at the max height // of all the columns the segment will be in. segment.top = arrayMax( colHeights.slice( segment.leftCol, segment.rightCol + 1 // make exclusive for slice ) ); // adjust the columns to account for the segment's height for (var colI=segment.leftCol; colI<=segment.rightCol; colI++) { colHeights[colI] = segment.top + segment.outerHeight; } } // the tallest column in the row should be the "content height" rowContentHeights.push(arrayMax(colHeights)); } return rowContentHeights; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function calculateVerticals(segments) {\n\t\tvar rowCnt = getRowCnt();\n\t\tvar colCnt = getColCnt();\n\t\tvar rowContentHeights = []; // content height for each row\n\t\tvar segmentRows = buildSegmentRows(segments); // an array of segment arrays, one for each row\n\t\tvar colI;\n\n\t\tfor (var rowI=0; rowI<rowCnt; rowI++) {\n\t\t\tvar segmentRow = segmentRows[rowI];\n\n\t\t\t// an array of running total heights for each column.\n\t\t\t// initialize with all zeros.\n\t\t\tvar colHeights = [];\n\t\t\tfor (colI=0; colI<colCnt; colI++) {\n\t\t\t\tcolHeights.push(0);\n\t\t\t}\n\n\t\t\t// loop through every segment\n\t\t\tfor (var segmentI=0; segmentI<segmentRow.length; segmentI++) {\n\t\t\t\tvar segment = segmentRow[segmentI];\n\n\t\t\t\t// find the segment's top coordinate by looking at the max height\n\t\t\t\t// of all the columns the segment will be in.\n\t\t\t\tsegment.top = arrayMax(\n\t\t\t\t\tcolHeights.slice(\n\t\t\t\t\t\tsegment.leftCol,\n\t\t\t\t\t\tsegment.rightCol + 1 // make exclusive for slice\n\t\t\t\t\t)\n\t\t\t\t);\n\n\t\t\t\t// adjust the columns to account for the segment's height\n\t\t\t\tfor (colI=segment.leftCol; colI<=segment.rightCol; colI++) {\n\t\t\t\t\tcolHeights[colI] = segment.top + segment.outerHeight;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// the tallest column in the row should be the \"content height\"\n\t\t\trowContentHeights.push(arrayMax(colHeights));\n\t\t}\n\n\t\treturn rowContentHeights;\n\t}", "function calculateVerticals(segments) {\n\t\tvar rowCnt = getRowCnt();\n\t\tvar colCnt = getColCnt();\n\t\tvar rowContentHeights = []; // content height for each row\n\t\tvar segmentRows = buildSegmentRows(segments); // an array of segment arrays, one for each row\n\t\tvar colI;\n\n\t\tfor (var rowI=0; rowI<rowCnt; rowI++) {\n\t\t\tvar segmentRow = segmentRows[rowI];\n\n\t\t\t// an array of running total heights for each column.\n\t\t\t// initialize with all zeros.\n\t\t\tvar colHeights = [];\n\t\t\tfor (colI=0; colI<colCnt; colI++) {\n\t\t\t\tcolHeights.push(0);\n\t\t\t}\n\n\t\t\t// loop through every segment\n\t\t\tfor (var segmentI=0; segmentI<segmentRow.length; segmentI++) {\n\t\t\t\tvar segment = segmentRow[segmentI];\n\n\t\t\t\t// find the segment's top coordinate by looking at the max height\n\t\t\t\t// of all the columns the segment will be in.\n\t\t\t\tsegment.top = arrayMax(\n\t\t\t\t\tcolHeights.slice(\n\t\t\t\t\t\tsegment.leftCol,\n\t\t\t\t\t\tsegment.rightCol + 1 // make exclusive for slice\n\t\t\t\t\t)\n\t\t\t\t);\n\n\t\t\t\t// adjust the columns to account for the segment's height\n\t\t\t\tfor (colI=segment.leftCol; colI<=segment.rightCol; colI++) {\n\t\t\t\t\tcolHeights[colI] = segment.top + segment.outerHeight;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// the tallest column in the row should be the \"content height\"\n\t\t\trowContentHeights.push(arrayMax(colHeights));\n\t\t}\n\n\t\treturn rowContentHeights;\n\t}", "function setVerticals(segments, doRowHeights) {\n\t\tvar rowContentHeights = calculateVerticals(segments); // also sets segment.top\n\t\tvar rowContentElements = getRowContentElements(); // returns 1 inner div per row\n\t\tvar rowContentTops = [];\n\n\t\t// Set each row's height by setting height of first inner div\n\t\tif (doRowHeights) {\n\t\t\tfor (var i=0; i<rowContentElements.length; i++) {\n\t\t\t\trowContentElements[i].height(rowContentHeights[i]);\n\t\t\t}\n\t\t}\n\n\t\t// Get each row's top, relative to the views's origin.\n\t\t// Important to do this after setting each row's height.\n\t\tfor (var i=0; i<rowContentElements.length; i++) {\n\t\t\trowContentTops.push(\n\t\t\t\trowContentElements[i].position().top\n\t\t\t);\n\t\t}\n\n\t\t// Set each segment element's CSS \"top\" property.\n\t\t// Each segment object has a \"top\" property, which is relative to the row's top, but...\n\t\tsegmentElementEach(segments, function(segment, element) {\n\t\t\telement.css(\n\t\t\t\t'top',\n\t\t\t\trowContentTops[segment.row] + segment.top // ...now, relative to views's origin\n\t\t\t);\n\t\t});\n\t}", "function setVerticals(segments, doRowHeights) {\n\t\tvar rowContentHeights = calculateVerticals(segments); // also sets segment.top\n\t\tvar rowContentElements = getRowContentElements(); // returns 1 inner div per row\n\t\tvar rowContentTops = [];\n\n\t\t// Set each row's height by setting height of first inner div\n\t\tif (doRowHeights) {\n\t\t\tfor (var i=0; i<rowContentElements.length; i++) {\n\t\t\t\trowContentElements[i].height(rowContentHeights[i]);\n\t\t\t}\n\t\t}\n\n\t\t// Get each row's top, relative to the views's origin.\n\t\t// Important to do this after setting each row's height.\n\t\tfor (var i=0; i<rowContentElements.length; i++) {\n\t\t\trowContentTops.push(\n\t\t\t\trowContentElements[i].position().top\n\t\t\t);\n\t\t}\n\n\t\t// Set each segment element's CSS \"top\" property.\n\t\t// Each segment object has a \"top\" property, which is relative to the row's top, but...\n\t\tsegmentElementEach(segments, function(segment, element) {\n\t\t\telement.css(\n\t\t\t\t'top',\n\t\t\t\trowContentTops[segment.row] + segment.top // ...now, relative to views's origin\n\t\t\t);\n\t\t});\n\t}", "function setVerticals(segments, doRowHeights) {\n\t\tvar rowContentHeights = calculateVerticals(segments); // also sets segment.top\n\t\tvar rowContentElements = getRowContentElements(); // returns 1 inner div per row\n\t\tvar rowContentTops = [];\n\n\t\t// Set each row's height by setting height of first inner div\n\t\tif (doRowHeights) {\n\t\t\tfor (var i=0; i<rowContentElements.length; i++) {\n\t\t\t\trowContentElements[i].height(rowContentHeights[i]);\n\t\t\t}\n\t\t}\n\n\t\t// Get each row's top, relative to the views's origin.\n\t\t// Important to do this after setting each row's height.\n\t\tfor (var i=0; i<rowContentElements.length; i++) {\n\t\t\trowContentTops.push(\n\t\t\t\trowContentElements[i].position().top\n\t\t\t);\n\t\t}\n\n\t\t// Set each segment element's CSS \"top\" property.\n\t\t// Each segment object has a \"top\" property, which is relative to the row's top, but...\n\t\tsegmentElementEach(segments, function(segment, element) {\n\t\t\telement.css(\n\t\t\t\t'top',\n\t\t\t\trowContentTops[segment.row] + segment.top // ...now, relative to views's origin\n\t\t\t);\n\t\t});\n\t}", "function setVerticals(segments, doRowHeights) {\n\t\tvar rowContentHeights = calculateVerticals(segments); // also sets segment.top\n\t\tvar rowContentElements = getRowContentElements(); // returns 1 inner div per row\n\t\tvar rowContentTops = [];\n\t\tvar i;\n\n\t\t// Set each row's height by setting height of first inner div\n\t\tif (doRowHeights) {\n\t\t\tfor (i=0; i<rowContentElements.length; i++) {\n\t\t\t\trowContentElements[i].height(rowContentHeights[i]);\n\t\t\t}\n\t\t}\n\n\t\t// Get each row's top, relative to the views's origin.\n\t\t// Important to do this after setting each row's height.\n\t\tfor (i=0; i<rowContentElements.length; i++) {\n\t\t\trowContentTops.push(\n\t\t\t\trowContentElements[i].position().top\n\t\t\t);\n\t\t}\n\n\t\t// Set each segment element's CSS \"top\" property.\n\t\t// Each segment object has a \"top\" property, which is relative to the row's top, but...\n\t\tsegmentElementEach(segments, function(segment, element) {\n\t\t\telement.css(\n\t\t\t\t'top',\n\t\t\t\trowContentTops[segment.row] + segment.top // ...now, relative to views's origin\n\t\t\t);\n\t\t});\n\t}", "function setVerticals(segments, doRowHeights) {\n\t\tvar rowContentHeights = calculateVerticals(segments); // also sets segment.top\n\t\tvar rowContentElements = getRowContentElements(); // returns 1 inner div per row\n\t\tvar rowContentTops = [];\n\t\tvar i;\n\n\t\t// Set each row's height by setting height of first inner div\n\t\tif (doRowHeights) {\n\t\t\tfor (i=0; i<rowContentElements.length; i++) {\n\t\t\t\trowContentElements[i].height(rowContentHeights[i]);\n\t\t\t}\n\t\t}\n\n\t\t// Get each row's top, relative to the views's origin.\n\t\t// Important to do this after setting each row's height.\n\t\tfor (i=0; i<rowContentElements.length; i++) {\n\t\t\trowContentTops.push(\n\t\t\t\trowContentElements[i].position().top\n\t\t\t);\n\t\t}\n\n\t\t// Set each segment element's CSS \"top\" property.\n\t\t// Each segment object has a \"top\" property, which is relative to the row's top, but...\n\t\tsegmentElementEach(segments, function(segment, element) {\n\t\t\telement.css(\n\t\t\t\t'top',\n\t\t\t\trowContentTops[segment.row] + segment.top // ...now, relative to views's origin\n\t\t\t);\n\t\t});\n\t}", "function l(a,b){var c,d=m(a),e=r(),f=[];\n// Set each row's height by setting height of first inner div\nif(b)for(c=0;c<e.length;c++)e[c].height(d[c]);\n// Get each row's top, relative to the views's origin.\n// Important to do this after setting each row's height.\nfor(c=0;c<e.length;c++)f.push(e[c].position().top);\n// Set each segment element's CSS \"top\" property.\n// Each segment object has a \"top\" property, which is relative to the row's top, but...\nxa(a,function(a,b){b.css(\"top\",f[a.row]+a.top)})}", "function m(a){for(var b,c=M(),d=N(),e=[],f=n(a),g=0;g<c;g++){var h=f[g],i=[];for(b=0;b<d;b++)i.push(0);\n// loop through every segment\nfor(var j=0;j<h.length;j++){var k=h[j];\n// adjust the columns to account for the segment's height\nfor(\n// find the segment's top coordinate by looking at the max height\n// of all the columns the segment will be in.\nk.top=D(i.slice(k.leftCol,k.rightCol+1)),b=k.leftCol;b<=k.rightCol;b++)i[b]=k.top+k.outerHeight}\n// the tallest column in the row should be the \"content height\"\ne.push(D(i))}return e}", "function getPositions() {\n \n var rects;\n var nRects;\n var rect;\n \n var top;\n var left;\n var width;\n var right;\n \n var textXY;\n \n var currentLine = -1;\n \n for (var i = 0; i < nSegs; i++) {\n \n rects = segs[i].getClientRects();\n nRects = rects.length;\n \n segRanges[i] = {};\n \n for (var j = 0; j < nRects; j++) {\n \n rect = rects[j];\n textXY = getTextXY(rect.left, rect.top);\n top = textXY.y - segBoxPadY;\n left = textXY.x - segBoxPadX;\n width = rect.width + segBoxPadX * 2;\n \n if (j !== nRects - 1) {\n \n width += extensionWidth;\n }\n \n right = left + width;\n \n if (isNewLine(top)) {\n \n currentLine++;\n \n lines[currentLine] = {\n top: top,\n left: left,\n width: width\n };\n \n segBoxesByLine[currentLine] = [];\n \n } else {\n \n lines[currentLine].width += width;\n }\n \n segBoxesByLine[currentLine].push({\n left: left,\n right: left + width,\n segIndex: i\n });\n \n if (j === 0) {\n \n segRanges[i].startLine = currentLine;\n segRanges[i].startLeft = left;\n }\n \n if (j === nRects - 1) {\n \n segRanges[i].endLine = currentLine;\n segRanges[i].endRight = right;\n }\n }\n }\n \n function isNewLine(top) {\n \n if (lines.length === 0 || lines[lines.length - 1].top !== top) {\n \n return true;\n }\n }\n}", "function computeSegVerticals(segs, dayDate, slatCoords, eventMinHeight) {\n for (var _i = 0, segs_1 = segs; _i < segs_1.length; _i++) {\n var seg = segs_1[_i];\n seg.top = slatCoords.computeDateTop(seg.start, dayDate);\n seg.bottom = Math.max(seg.top + (eventMinHeight || 0), // yuck\n slatCoords.computeDateTop(seg.end, dayDate));\n }\n }", "function buildSegmentRows(segments) {\n\t\tvar rowCnt = getRowCnt();\n\t\tvar segmentRows = [];\n\t\tvar segmentI;\n\t\tvar segment;\n\t\tvar rowI;\n\n\t\t// group segments by row\n\t\tfor (segmentI=0; segmentI<segments.length; segmentI++) {\n\t\t\tsegment = segments[segmentI];\n\t\t\trowI = segment.row;\n\t\t\tif (segment.element) { // was rendered?\n\t\t\t\tif (segmentRows[rowI]) {\n\t\t\t\t\t// already other segments. append to array\n\t\t\t\t\tsegmentRows[rowI].push(segment);\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t// first segment in row. create new array\n\t\t\t\t\tsegmentRows[rowI] = [ segment ];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// sort each row\n\t\tfor (rowI=0; rowI<rowCnt; rowI++) {\n\t\t\tsegmentRows[rowI] = sortSegmentRow(\n\t\t\t\tsegmentRows[rowI] || [] // guarantee an array, even if no segments\n\t\t\t);\n\t\t}\n\n\t\treturn segmentRows;\n\t}", "function buildSegmentRows(segments) {\n\t\tvar rowCnt = getRowCnt();\n\t\tvar segmentRows = [];\n\t\tvar segmentI;\n\t\tvar segment;\n\t\tvar rowI;\n\n\t\t// group segments by row\n\t\tfor (segmentI=0; segmentI<segments.length; segmentI++) {\n\t\t\tsegment = segments[segmentI];\n\t\t\trowI = segment.row;\n\t\t\tif (segment.element) { // was rendered?\n\t\t\t\tif (segmentRows[rowI]) {\n\t\t\t\t\t// already other segments. append to array\n\t\t\t\t\tsegmentRows[rowI].push(segment);\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t// first segment in row. create new array\n\t\t\t\t\tsegmentRows[rowI] = [ segment ];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// sort each row\n\t\tfor (rowI=0; rowI<rowCnt; rowI++) {\n\t\t\tsegmentRows[rowI] = sortSegmentRow(\n\t\t\t\tsegmentRows[rowI] || [] // guarantee an array, even if no segments\n\t\t\t);\n\t\t}\n\n\t\treturn segmentRows;\n\t}", "function buildSegmentRows(segments) {\n\t\tvar rowCnt = getRowCnt();\n\t\tvar segmentRows = [];\n\t\tvar segmentI;\n\t\tvar segment;\n\t\tvar rowI;\n\n\t\t// group segments by row\n\t\tfor (segmentI=0; segmentI<segments.length; segmentI++) {\n\t\t\tsegment = segments[segmentI];\n\t\t\trowI = segment.row;\n\t\t\tif (segment.element) { // was rendered?\n\t\t\t\tif (segmentRows[rowI]) {\n\t\t\t\t\t// already other segments. append to array\n\t\t\t\t\tsegmentRows[rowI].push(segment);\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t// first segment in row. create new array\n\t\t\t\t\tsegmentRows[rowI] = [ segment ];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// sort each row\n\t\tfor (rowI=0; rowI<rowCnt; rowI++) {\n\t\t\tsegmentRows[rowI] = sortSegmentRow(\n\t\t\t\tsegmentRows[rowI] || [] // guarantee an array, even if no segments\n\t\t\t);\n\t\t}\n\n\t\treturn segmentRows;\n\t}", "function buildSegmentRows(segments) {\n\t\tvar rowCnt = getRowCnt();\n\t\tvar segmentRows = [];\n\t\tvar segmentI;\n\t\tvar segment;\n\t\tvar rowI;\n\n\t\t// group segments by row\n\t\tfor (segmentI=0; segmentI<segments.length; segmentI++) {\n\t\t\tsegment = segments[segmentI];\n\t\t\trowI = segment.row;\n\t\t\tif (segment.element) { // was rendered?\n\t\t\t\tif (segmentRows[rowI]) {\n\t\t\t\t\t// already other segments. append to array\n\t\t\t\t\tsegmentRows[rowI].push(segment);\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t// first segment in row. create new array\n\t\t\t\t\tsegmentRows[rowI] = [ segment ];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// sort each row\n\t\tfor (rowI=0; rowI<rowCnt; rowI++) {\n\t\t\tsegmentRows[rowI] = sortSegmentRow(\n\t\t\t\tsegmentRows[rowI] || [] // guarantee an array, even if no segments\n\t\t\t);\n\t\t}\n\n\t\treturn segmentRows;\n\t}", "function buildSegmentRows(segments) {\n\t\tvar rowCnt = getRowCnt();\n\t\tvar segmentRows = [];\n\t\tvar segmentI;\n\t\tvar segment;\n\t\tvar rowI;\n\n\t\t// group segments by row\n\t\tfor (segmentI=0; segmentI<segments.length; segmentI++) {\n\t\t\tsegment = segments[segmentI];\n\t\t\trowI = segment.row;\n\t\t\tif (segment.element) { // was rendered?\n\t\t\t\tif (segmentRows[rowI]) {\n\t\t\t\t\t// already other segments. append to array\n\t\t\t\t\tsegmentRows[rowI].push(segment);\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t// first segment in row. create new array\n\t\t\t\t\tsegmentRows[rowI] = [ segment ];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// sort each row\n\t\tfor (rowI=0; rowI<rowCnt; rowI++) {\n\t\t\tsegmentRows[rowI] = sortSegmentRow(\n\t\t\t\tsegmentRows[rowI] || [] // guarantee an array, even if no segments\n\t\t\t);\n\t\t}\n\n\t\treturn segmentRows;\n\t}", "function computeSegCoords(segs, dayDate, slatCoords, eventMinHeight, eventOrderSpecs) {\n computeSegVerticals(segs, dayDate, slatCoords, eventMinHeight);\n return computeSegHorizontals(segs, eventOrderSpecs); // requires top/bottom from computeSegVerticals\n } // For each segment in an array, computes and assigns its top and bottom properties", "function buildSegmentSubrows(segments) {\n\n\t\t// Give preference to elements with certain criteria, so they have\n\t\t// a chance to be closer to the top.\n\t\tsegments.sort(compareDaySegments);\n\n\t\tvar subrows = [];\n\t\tfor (var i=0; i<segments.length; i++) {\n\t\t\tvar segment = segments[i];\n\n\t\t\t// loop through subrows, starting with the topmost, until the segment\n\t\t\t// doesn't collide with other segments.\n\t\t\tfor (var j=0; j<subrows.length; j++) {\n\t\t\t\tif (!isDaySegmentCollision(segment, subrows[j])) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\t// `j` now holds the desired subrow index\n\t\t\tif (subrows[j]) {\n\t\t\t\tsubrows[j].push(segment);\n\t\t\t}\n\t\t\telse {\n\t\t\t\tsubrows[j] = [ segment ];\n\t\t\t}\n\t\t}\n\n\t\treturn subrows;\n\t}", "function buildSegmentSubrows(segments) {\n\n\t\t// Give preference to elements with certain criteria, so they have\n\t\t// a chance to be closer to the top.\n\t\tsegments.sort(compareDaySegments);\n\n\t\tvar subrows = [];\n\t\tfor (var i=0; i<segments.length; i++) {\n\t\t\tvar segment = segments[i];\n\n\t\t\t// loop through subrows, starting with the topmost, until the segment\n\t\t\t// doesn't collide with other segments.\n\t\t\tfor (var j=0; j<subrows.length; j++) {\n\t\t\t\tif (!isDaySegmentCollision(segment, subrows[j])) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\t// `j` now holds the desired subrow index\n\t\t\tif (subrows[j]) {\n\t\t\t\tsubrows[j].push(segment);\n\t\t\t}\n\t\t\telse {\n\t\t\t\tsubrows[j] = [ segment ];\n\t\t\t}\n\t\t}\n\n\t\treturn subrows;\n\t}", "function buildSegmentSubrows(segments) {\n\n\t\t// Give preference to elements with certain criteria, so they have\n\t\t// a chance to be closer to the top.\n\t\tsegments.sort(compareDaySegments);\n\n\t\tvar subrows = [];\n\t\tfor (var i=0; i<segments.length; i++) {\n\t\t\tvar segment = segments[i];\n\n\t\t\t// loop through subrows, starting with the topmost, until the segment\n\t\t\t// doesn't collide with other segments.\n\t\t\tfor (var j=0; j<subrows.length; j++) {\n\t\t\t\tif (!isDaySegmentCollision(segment, subrows[j])) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\t// `j` now holds the desired subrow index\n\t\t\tif (subrows[j]) {\n\t\t\t\tsubrows[j].push(segment);\n\t\t\t}\n\t\t\telse {\n\t\t\t\tsubrows[j] = [ segment ];\n\t\t\t}\n\t\t}\n\n\t\treturn subrows;\n\t}", "function buildSegmentSubrows(segments) {\n\n\t\t// Give preference to elements with certain criteria, so they have\n\t\t// a chance to be closer to the top.\n\t\tsegments.sort(compareDaySegments);\n\n\t\tvar subrows = [];\n\t\tfor (var i=0; i<segments.length; i++) {\n\t\t\tvar segment = segments[i];\n\n\t\t\t// loop through subrows, starting with the topmost, until the segment\n\t\t\t// doesn't collide with other segments.\n\t\t\tfor (var j=0; j<subrows.length; j++) {\n\t\t\t\tif (!isDaySegmentCollision(segment, subrows[j])) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\t// `j` now holds the desired subrow index\n\t\t\tif (subrows[j]) {\n\t\t\t\tsubrows[j].push(segment);\n\t\t\t}\n\t\t\telse {\n\t\t\t\tsubrows[j] = [ segment ];\n\t\t\t}\n\t\t}\n\n\t\treturn subrows;\n\t}", "function buildSegmentSubrows(segments) {\n\n\t\t// Give preference to elements with certain criteria, so they have\n\t\t// a chance to be closer to the top.\n\t\tsegments.sort(compareDaySegments);\n\n\t\tvar subrows = [];\n\t\tfor (var i=0; i<segments.length; i++) {\n\t\t\tvar segment = segments[i];\n\n\t\t\t// loop through subrows, starting with the topmost, until the segment\n\t\t\t// doesn't collide with other segments.\n\t\t\tfor (var j=0; j<subrows.length; j++) {\n\t\t\t\tif (!isDaySegmentCollision(segment, subrows[j])) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\t// `j` now holds the desired subrow index\n\t\t\tif (subrows[j]) {\n\t\t\t\tsubrows[j].push(segment);\n\t\t\t}\n\t\t\telse {\n\t\t\t\tsubrows[j] = [ segment ];\n\t\t\t}\n\t\t}\n\n\t\treturn subrows;\n\t}", "_parsePoints() {\n var top = this.options.topAnchor == \"\" ? 1 : this.options.topAnchor,\n btm = this.options.btmAnchor== \"\" ? document.documentElement.scrollHeight : this.options.btmAnchor,\n pts = [top, btm],\n breaks = {};\n for (var i = 0, len = pts.length; i < len && pts[i]; i++) {\n var pt;\n if (typeof pts[i] === 'number') {\n pt = pts[i];\n } else {\n var place = pts[i].split(':'),\n anchor = $(`#${place[0]}`);\n\n pt = anchor.offset().top;\n if (place[1] && place[1].toLowerCase() === 'bottom') {\n pt += anchor[0].getBoundingClientRect().height;\n }\n }\n breaks[i] = pt;\n }\n\n\n this.points = breaks;\n return;\n }", "layoutEventsInBands(events) {\n let verticalPosition = 0;\n\n do {\n let eventIndex = 0,\n event = events[0];\n\n while (event) {\n // Apply band height to the event cfg\n event.top = this.bandIndexToPxConvertFn.call(this.bandIndexToPxConvertThisObj || this, verticalPosition, event.eventRecord); // Remove it from the array and continue searching\n\n events.splice(eventIndex, 1);\n eventIndex = this.findClosestSuccessor(event, events);\n event = events[eventIndex];\n }\n\n verticalPosition++;\n } while (events.length > 0); // Done!\n\n return verticalPosition;\n }", "getIgnitionEndPoints () {\n const pts = []\n this._horz.forEach(line => {\n const y = line.anchor()\n line.segments().forEach(segment => {\n if (segment.isBurned()) {\n pts.push([segment.begins(), y])\n if (segment.begins() !== segment.ends()) {\n pts.push([segment.ends(), y])\n }\n }\n })\n })\n return pts\n }", "function sortSegmentRow(segments) {\n\t\tvar sortedSegments = [];\n\n\t\t// build the subrow array\n\t\tvar subrows = buildSegmentSubrows(segments);\n\n\t\t// flatten it\n\t\tfor (var i=0; i<subrows.length; i++) {\n\t\t\tsortedSegments.push.apply(sortedSegments, subrows[i]); // append an array to an array\n\t\t}\n\n\t\treturn sortedSegments;\n\t}", "function sortSegmentRow(segments) {\n\t\tvar sortedSegments = [];\n\n\t\t// build the subrow array\n\t\tvar subrows = buildSegmentSubrows(segments);\n\n\t\t// flatten it\n\t\tfor (var i=0; i<subrows.length; i++) {\n\t\t\tsortedSegments.push.apply(sortedSegments, subrows[i]); // append an array to an array\n\t\t}\n\n\t\treturn sortedSegments;\n\t}", "function sortSegmentRow(segments) {\n\t\tvar sortedSegments = [];\n\n\t\t// build the subrow array\n\t\tvar subrows = buildSegmentSubrows(segments);\n\n\t\t// flatten it\n\t\tfor (var i=0; i<subrows.length; i++) {\n\t\t\tsortedSegments.push.apply(sortedSegments, subrows[i]); // append an array to an array\n\t\t}\n\n\t\treturn sortedSegments;\n\t}", "function sortSegmentRow(segments) {\n\t\tvar sortedSegments = [];\n\n\t\t// build the subrow array\n\t\tvar subrows = buildSegmentSubrows(segments);\n\n\t\t// flatten it\n\t\tfor (var i=0; i<subrows.length; i++) {\n\t\t\tsortedSegments.push.apply(sortedSegments, subrows[i]); // append an array to an array\n\t\t}\n\n\t\treturn sortedSegments;\n\t}", "function sortSegmentRow(segments) {\n\t\tvar sortedSegments = [];\n\n\t\t// build the subrow array\n\t\tvar subrows = buildSegmentSubrows(segments);\n\n\t\t// flatten it\n\t\tfor (var i=0; i<subrows.length; i++) {\n\t\t\tsortedSegments.push.apply(sortedSegments, subrows[i]); // append an array to an array\n\t\t}\n\n\t\treturn sortedSegments;\n\t}", "layoutEventsInBands(events) {\n let verticalPosition = 0;\n\n do {\n let event = events[0];\n\n while (event) {\n // Apply band height to the event cfg\n event.top = this.bandIndexToPxConvertFn.call(\n this.bandIndexToPxConvertThisObj || this,\n verticalPosition,\n event.event\n );\n\n // Remove it from the array and continue searching\n events.splice(events.indexOf(event), 1);\n\n event = this.findClosestSuccessor(event, events);\n }\n\n verticalPosition++;\n } while (events.length > 0);\n\n // Done!\n return verticalPosition;\n }", "function heights(col) {\n\t\t\tvar hts = [];\n\t\t\tvar els = $(options.selecter);\n\t\t\tvar idx,cur;\n\n\t\t\tfor(var i=0;i<=options.nrow;i++) {\n\t\t\t\tidx = i*options.ncol+col;\n\t\t\t\tcur = els.get(idx);\n\t\t\t\tidx < options.count && (cur = els.get(idx),cur && hts.push(cur.clientHeight+options.offsetY));\n\t\t\t}\n\n\t\t\tels = idx = cur = null;\n\t\t\treturn hts;\n\t\t}", "function getRange() {\n\t if (__.nullValueSeparator == 'bottom') {\n\t return [h() + 1 - __.nullValueSeparatorPadding.bottom - __.nullValueSeparatorPadding.top, 1];\n\t } else if (__.nullValueSeparator == 'top') {\n\t return [h() + 1, 1 + __.nullValueSeparatorPadding.bottom + __.nullValueSeparatorPadding.top];\n\t }\n\t return [h() + 1, 1];\n\t }", "function calculateHorizontals(segments) {\n\t\tvar isRTL = opt('isRTL');\n\t\tfor (var i=0; i<segments.length; i++) {\n\t\t\tvar segment = segments[i];\n\n\t\t\t// Determine functions used for calulating the elements left/right coordinates,\n\t\t\t// depending on whether the view is RTL or not.\n\t\t\t// NOTE:\n\t\t\t// colLeft/colRight returns the coordinate butting up the edge of the cell.\n\t\t\t// colContentLeft/colContentRight is indented a little bit from the edge.\n\t\t\tvar leftFunc = (isRTL ? segment.isEnd : segment.isStart) ? colContentLeft : colLeft;\n\t\t\tvar rightFunc = (isRTL ? segment.isStart : segment.isEnd) ? colContentRight : colRight;\n\n\t\t\tvar left = leftFunc(segment.leftCol);\n\t\t\tvar right = rightFunc(segment.rightCol);\n\t\t\tsegment.left = left;\n\t\t\tsegment.outerWidth = right - left;\n\t\t}\n\t}", "function calculateHorizontals(segments) {\n\t\tvar isRTL = opt('isRTL');\n\t\tfor (var i=0; i<segments.length; i++) {\n\t\t\tvar segment = segments[i];\n\n\t\t\t// Determine functions used for calulating the elements left/right coordinates,\n\t\t\t// depending on whether the view is RTL or not.\n\t\t\t// NOTE:\n\t\t\t// colLeft/colRight returns the coordinate butting up the edge of the cell.\n\t\t\t// colContentLeft/colContentRight is indented a little bit from the edge.\n\t\t\tvar leftFunc = (isRTL ? segment.isEnd : segment.isStart) ? colContentLeft : colLeft;\n\t\t\tvar rightFunc = (isRTL ? segment.isStart : segment.isEnd) ? colContentRight : colRight;\n\n\t\t\tvar left = leftFunc(segment.leftCol);\n\t\t\tvar right = rightFunc(segment.rightCol);\n\t\t\tsegment.left = left;\n\t\t\tsegment.outerWidth = right - left;\n\t\t}\n\t}", "function calculateHorizontals(segments) {\n\t\tvar isRTL = opt('isRTL');\n\t\tfor (var i=0; i<segments.length; i++) {\n\t\t\tvar segment = segments[i];\n\n\t\t\t// Determine functions used for calulating the elements left/right coordinates,\n\t\t\t// depending on whether the view is RTL or not.\n\t\t\t// NOTE:\n\t\t\t// colLeft/colRight returns the coordinate butting up the edge of the cell.\n\t\t\t// colContentLeft/colContentRight is indented a little bit from the edge.\n\t\t\tvar leftFunc = (isRTL ? segment.isEnd : segment.isStart) ? colContentLeft : colLeft;\n\t\t\tvar rightFunc = (isRTL ? segment.isStart : segment.isEnd) ? colContentRight : colRight;\n\n\t\t\tvar left = leftFunc(segment.leftCol);\n\t\t\tvar right = rightFunc(segment.rightCol);\n\t\t\tsegment.left = left;\n\t\t\tsegment.outerWidth = right - left;\n\t\t}\n\t}", "function calculateHorizontals(segments) {\n\t\tvar isRTL = opt('isRTL');\n\t\tfor (var i=0; i<segments.length; i++) {\n\t\t\tvar segment = segments[i];\n\n\t\t\t// Determine functions used for calulating the elements left/right coordinates,\n\t\t\t// depending on whether the view is RTL or not.\n\t\t\t// NOTE:\n\t\t\t// colLeft/colRight returns the coordinate butting up the edge of the cell.\n\t\t\t// colContentLeft/colContentRight is indented a little bit from the edge.\n\t\t\tvar leftFunc = (isRTL ? segment.isEnd : segment.isStart) ? colContentLeft : colLeft;\n\t\t\tvar rightFunc = (isRTL ? segment.isStart : segment.isEnd) ? colContentRight : colRight;\n\n\t\t\tvar left = leftFunc(segment.leftCol);\n\t\t\tvar right = rightFunc(segment.rightCol);\n\t\t\tsegment.left = left;\n\t\t\tsegment.outerWidth = right - left;\n\t\t}\n\t}", "function calculateHorizontals(segments) {\n\t\tvar isRTL = opt('isRTL');\n\t\tfor (var i=0; i<segments.length; i++) {\n\t\t\tvar segment = segments[i];\n\n\t\t\t// Determine functions used for calulating the elements left/right coordinates,\n\t\t\t// depending on whether the view is RTL or not.\n\t\t\t// NOTE:\n\t\t\t// colLeft/colRight returns the coordinate butting up the edge of the cell.\n\t\t\t// colContentLeft/colContentRight is indented a little bit from the edge.\n\t\t\tvar leftFunc = (isRTL ? segment.isEnd : segment.isStart) ? colContentLeft : colLeft;\n\t\t\tvar rightFunc = (isRTL ? segment.isStart : segment.isEnd) ? colContentRight : colRight;\n\n\t\t\tvar left = leftFunc(segment.leftCol);\n\t\t\tvar right = rightFunc(segment.rightCol);\n\t\t\tsegment.left = left;\n\t\t\tsegment.outerWidth = right - left;\n\t\t}\n\t}", "function boundingsection(sections) {\n return sections.getBoundingClientRect().top;\n}", "function cookData(array, rowPadding) {\n\t\t\n\t\tvar prev = {i: 0, h: 0, y: 0};\n\t\tvar first = array[0];\n\t\t\n\t\t// discover custom attributes\n\t\tvar attributes = [];\n\t\tfor(key in first) {\n\t\t\tif(!(key in prev)) {\n\t\t\t\tattributes.push(key);\n\t\t\t}\n\t\t}\n\t\t\n\t\tfor(var i = 0; i < array.length; i++) {\n\t\t\tvar item = array[i];\n\t\t\t\n\t\t\t// copy attributes forward\n\t\t\tfor(var a = 0; a < attributes.length; a++) {\n\t\t\t\tvar attr = attributes[a];\n\t\t\t\tif(!(attr in item)) {\n\t\t\t\t\titem[attr] = prev[attr];\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t// copy height forward + ensure requested padding\n\t\t\tif(item.h) {\n\t\t\t\titem.h += rowPadding;\n\t\t\t} else {\n\t\t\t\titem.h = prev.h;\n\t\t\t}\n\t\t\t\n\t\t\t// calculate segment height & spanned indices\n\t\t\tvar span = item.i - prev.i;\n\t\t\titem.y = prev.y + span * prev.h;\n\t\t\t\n\t\t\tprev.last = item.i;\n\t\t\tprev.lastY = item.y;\n\t\t\tprev = item;\n\t\t}\n\t\t\n\t\t// last item needs to be given explicitly\n\t\tvar lastEntry = array[array.length - 1];\n\t\tarray.last = lastEntry.i;\n\t\tlastEntry.last = lastEntry.i + 1;\n\n\t\tvar lastSpan = lastEntry.last - lastEntry.i;\n\t\tvar totalHeight = lastEntry.y + lastEntry.h * lastSpan;\n\t\tlastEntry.lastY = totalHeight;\n\t\t\n\t\treturn totalHeight;\n\t}", "rows() {\n var self = this;\n return Array.apply(this.topRow(), Array(this.bottomRow()+1)).map(function (x, row) {\n return Array.apply(self.topColumn(), Array(self.bottomColumn()+1)).map(function (x, col) {\n return [CELLINDEX(col, row)];\n })\n })\n }", "cells() {\n var start = typeof this.topLeft === 'function' ? this.topLeft() : this.topLeft,\n end = typeof this.bottomRight === 'function' ? this.bottomRight() : this.bottomRight,\n\tthat = this;\n \n return Array.apply(start, Array(end+1)).map(function (x, y) {\n return y; \n });\n }", "function getAroundLines(params) {\n var currentPos = params.currentPos;\n var boundingBox = params.boundingBox;\n var s0 = params.s0;\n var s1 = params.s1;\n var returnPositions = params.returnPositions;\n\n var min = boundingBox.min;\n var max = boundingBox.max;\n var contour = [{\n x: min.x,\n y: min.y\n }, {\n x: max.x,\n y: min.y\n }, {\n x: max.x,\n y: max.y\n }, {\n x: min.x,\n y: max.y\n }];\n var reverseContour = [{\n x: min.x,\n y: max.y\n }, {\n x: min.x,\n y: min.y\n }, {\n x: max.x,\n y: min.y\n }, {\n x: max.x,\n y: max.y\n }];\n var offsetE = 0;\n if (!s0 || !s1) {\n return {\n offsetE: 0,\n lines: []\n };\n }\n if (s0.p.e !== undefined && s1.p.e != undefined) {\n offsetE = s0.p.e - s1.p.e; // The exit E must be the same as the get in E\n s1.p.e = s0.p.e;\n }\n\n var lines = [];\n\n function addPos(params) {\n var lines = params.lines;\n var comment = params.comment;\n var pos = params.pos;\n if (returnPositions) {\n lines.push({\n x: pos.x,\n y: pos.y,\n z: pos.z\n });\n } else {\n if (comment) {\n lines.push({\n lineNumber: undefined,\n comments: [\";\" + comment],\n words: getWordsFromPos(pos)\n });\n } else {\n lines.push({\n lineNumber: undefined,\n comments: \"\",\n words: getWordsFromPos(pos)\n });\n }\n }\n }\n\n function getWordsFromPos(pos) {\n var words = [];\n words.push({ l: \"G\", v: 0 });\n for (var key in pos) {\n var uKey = key.toUpperCase();\n var v = pos[key];\n words.push({ \"l\": uKey, v: v });\n }\n return words;\n }\n\n // We will add s0, then all contour vertices between s0 and s1, and finally s1\n // We get the first position\n addPos({\n lines: lines,\n comment: \"EntrySquare\",\n pos: s0.p\n });\n\n // We travel around the square\n var linesCW = [];\n for (var i = s0.v; i != s1.v; i = (i + 1) % 4) {\n addPos({\n lines: linesCW,\n comment: \"\",\n pos: contour[i]\n });\n /* linesCW.push({\n lineNumber: undefined,\n comments: \"\",\n words: getWordsFromPos(contour[i])\n });*/\n }\n var linesCCW = [];\n i = s0.v;\n while (i != s1.v) {\n addPos({\n lines: linesCCW,\n comment: \"\",\n pos: reverseContour[i]\n });\n /*linesCCW.push({\n lineNumber: undefined,\n comments: \"\",\n words: getWordsFromPos(reverseContour[i])\n });*/\n i = i - 1;\n if (i < 0) {\n i = i + 4;\n }\n }\n if (linesCW.length <= linesCCW.length) {\n for (var i = 0; i < linesCW.length; i++) {\n lines.push(linesCW[i]);\n }\n } else {\n for (var i = 0; i < linesCCW.length; i++) {\n lines.push(linesCCW[i]);\n }\n }\n // We add the exit point. The caller function will add the final end vector\n // with a corrected E offset\n addPos({\n lines: lines,\n comment: \"ExitSquare\",\n pos: s1.p\n });\n /*lines.push({\n lineNumber: undefined,\n comments: [\";ExitSquare\"],\n words: getWordsFromPos(s1.p)\n });*/\n var result = {\n offsetE: offsetE,\n lines: lines\n };\n return result;\n}", "calculateBounds() {\n this.tagsSectionsMap = this.tags.map((tag) => {\n const rect = tag.getBoundingClientRect();\n const top = Math.floor(rect.top + window.scrollY);\n\n return {\n top,\n tag,\n };\n });\n }", "function rangeToSegments(startDate, endDate) {\n\t\tvar rowCnt = t.getRowCnt();\n\t\tvar colCnt = t.getColCnt();\n\t\tvar segments = []; // array of segments to return\n\n\t\t// day offset for given date range\n\t\tvar rangeDayOffsetStart = dateToDayOffset(startDate);\n\t\tvar rangeDayOffsetEnd = dateToDayOffset(endDate); // exclusive\n\n\t\t// first and last cell offset for the given date range\n\t\t// \"last\" implies inclusivity\n\t\tvar rangeCellOffsetFirst = dayOffsetToCellOffset(rangeDayOffsetStart);\n\t\tvar rangeCellOffsetLast = dayOffsetToCellOffset(rangeDayOffsetEnd) - 1;\n\n\t\t// loop through all the rows in the view\n\t\tfor (var row=0; row<rowCnt; row++) {\n\n\t\t\t// first and last cell offset for the row\n\t\t\tvar rowCellOffsetFirst = row * colCnt;\n\t\t\tvar rowCellOffsetLast = rowCellOffsetFirst + colCnt - 1;\n\n\t\t\t// get the segment's cell offsets by constraining the range's cell offsets to the bounds of the row\n\t\t\tvar segmentCellOffsetFirst = Math.max(rangeCellOffsetFirst, rowCellOffsetFirst);\n\t\t\tvar segmentCellOffsetLast = Math.min(rangeCellOffsetLast, rowCellOffsetLast);\n\n\t\t\t// make sure segment's offsets are valid and in view\n\t\t\tif (segmentCellOffsetFirst <= segmentCellOffsetLast) {\n\n\t\t\t\t// translate to cells\n\t\t\t\tvar segmentCellFirst = cellOffsetToCell(segmentCellOffsetFirst);\n\t\t\t\tvar segmentCellLast = cellOffsetToCell(segmentCellOffsetLast);\n\n\t\t\t\t// view might be RTL, so order by leftmost column\n\t\t\t\tvar cols = [ segmentCellFirst.col, segmentCellLast.col ].sort();\n\n\t\t\t\t// Determine if segment's first/last cell is the beginning/end of the date range.\n\t\t\t\t// We need to compare \"day offset\" because \"cell offsets\" are often ambiguous and\n\t\t\t\t// can translate to multiple days, and an edge case reveals itself when we the\n\t\t\t\t// range's first cell is hidden (we don't want isStart to be true).\n\t\t\t\tvar isStart = cellOffsetToDayOffset(segmentCellOffsetFirst) == rangeDayOffsetStart;\n\t\t\t\tvar isEnd = cellOffsetToDayOffset(segmentCellOffsetLast) + 1 == rangeDayOffsetEnd; // +1 for comparing exclusively\n\n\t\t\t\tsegments.push({\n\t\t\t\t\trow: row,\n\t\t\t\t\tleftCol: cols[0],\n\t\t\t\t\trightCol: cols[1],\n\t\t\t\t\tisStart: isStart,\n\t\t\t\t\tisEnd: isEnd\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\n\t\treturn segments;\n\t}", "function rangeToSegments(startDate, endDate) {\n\t\tvar rowCnt = t.getRowCnt();\n\t\tvar colCnt = t.getColCnt();\n\t\tvar segments = []; // array of segments to return\n\n\t\t// day offset for given date range\n\t\tvar rangeDayOffsetStart = dateToDayOffset(startDate);\n\t\tvar rangeDayOffsetEnd = dateToDayOffset(endDate); // exclusive\n\n\t\t// first and last cell offset for the given date range\n\t\t// \"last\" implies inclusivity\n\t\tvar rangeCellOffsetFirst = dayOffsetToCellOffset(rangeDayOffsetStart);\n\t\tvar rangeCellOffsetLast = dayOffsetToCellOffset(rangeDayOffsetEnd) - 1;\n\n\t\t// loop through all the rows in the view\n\t\tfor (var row=0; row<rowCnt; row++) {\n\n\t\t\t// first and last cell offset for the row\n\t\t\tvar rowCellOffsetFirst = row * colCnt;\n\t\t\tvar rowCellOffsetLast = rowCellOffsetFirst + colCnt - 1;\n\n\t\t\t// get the segment's cell offsets by constraining the range's cell offsets to the bounds of the row\n\t\t\tvar segmentCellOffsetFirst = Math.max(rangeCellOffsetFirst, rowCellOffsetFirst);\n\t\t\tvar segmentCellOffsetLast = Math.min(rangeCellOffsetLast, rowCellOffsetLast);\n\n\t\t\t// make sure segment's offsets are valid and in view\n\t\t\tif (segmentCellOffsetFirst <= segmentCellOffsetLast) {\n\n\t\t\t\t// translate to cells\n\t\t\t\tvar segmentCellFirst = cellOffsetToCell(segmentCellOffsetFirst);\n\t\t\t\tvar segmentCellLast = cellOffsetToCell(segmentCellOffsetLast);\n\n\t\t\t\t// view might be RTL, so order by leftmost column\n\t\t\t\tvar cols = [ segmentCellFirst.col, segmentCellLast.col ].sort();\n\n\t\t\t\t// Determine if segment's first/last cell is the beginning/end of the date range.\n\t\t\t\t// We need to compare \"day offset\" because \"cell offsets\" are often ambiguous and\n\t\t\t\t// can translate to multiple days, and an edge case reveals itself when we the\n\t\t\t\t// range's first cell is hidden (we don't want isStart to be true).\n\t\t\t\tvar isStart = cellOffsetToDayOffset(segmentCellOffsetFirst) == rangeDayOffsetStart;\n\t\t\t\tvar isEnd = cellOffsetToDayOffset(segmentCellOffsetLast) + 1 == rangeDayOffsetEnd; // +1 for comparing exclusively\n\n\t\t\t\tsegments.push({\n\t\t\t\t\trow: row,\n\t\t\t\t\tleftCol: cols[0],\n\t\t\t\t\trightCol: cols[1],\n\t\t\t\t\tisStart: isStart,\n\t\t\t\t\tisEnd: isEnd\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\n\t\treturn segments;\n\t}", "function rangeToSegments(startDate, endDate) {\n\t\tvar rowCnt = t.getRowCnt();\n\t\tvar colCnt = t.getColCnt();\n\t\tvar segments = []; // array of segments to return\n\n\t\t// day offset for given date range\n\t\tvar rangeDayOffsetStart = dateToDayOffset(startDate);\n\t\tvar rangeDayOffsetEnd = dateToDayOffset(endDate); // exclusive\n\n\t\t// first and last cell offset for the given date range\n\t\t// \"last\" implies inclusivity\n\t\tvar rangeCellOffsetFirst = dayOffsetToCellOffset(rangeDayOffsetStart);\n\t\tvar rangeCellOffsetLast = dayOffsetToCellOffset(rangeDayOffsetEnd) - 1;\n\n\t\t// loop through all the rows in the view\n\t\tfor (var row=0; row<rowCnt; row++) {\n\n\t\t\t// first and last cell offset for the row\n\t\t\tvar rowCellOffsetFirst = row * colCnt;\n\t\t\tvar rowCellOffsetLast = rowCellOffsetFirst + colCnt - 1;\n\n\t\t\t// get the segment's cell offsets by constraining the range's cell offsets to the bounds of the row\n\t\t\tvar segmentCellOffsetFirst = Math.max(rangeCellOffsetFirst, rowCellOffsetFirst);\n\t\t\tvar segmentCellOffsetLast = Math.min(rangeCellOffsetLast, rowCellOffsetLast);\n\n\t\t\t// make sure segment's offsets are valid and in view\n\t\t\tif (segmentCellOffsetFirst <= segmentCellOffsetLast) {\n\n\t\t\t\t// translate to cells\n\t\t\t\tvar segmentCellFirst = cellOffsetToCell(segmentCellOffsetFirst);\n\t\t\t\tvar segmentCellLast = cellOffsetToCell(segmentCellOffsetLast);\n\n\t\t\t\t// view might be RTL, so order by leftmost column\n\t\t\t\tvar cols = [ segmentCellFirst.col, segmentCellLast.col ].sort();\n\n\t\t\t\t// Determine if segment's first/last cell is the beginning/end of the date range.\n\t\t\t\t// We need to compare \"day offset\" because \"cell offsets\" are often ambiguous and\n\t\t\t\t// can translate to multiple days, and an edge case reveals itself when we the\n\t\t\t\t// range's first cell is hidden (we don't want isStart to be true).\n\t\t\t\tvar isStart = cellOffsetToDayOffset(segmentCellOffsetFirst) == rangeDayOffsetStart;\n\t\t\t\tvar isEnd = cellOffsetToDayOffset(segmentCellOffsetLast) + 1 == rangeDayOffsetEnd; // +1 for comparing exclusively\n\n\t\t\t\tsegments.push({\n\t\t\t\t\trow: row,\n\t\t\t\t\tleftCol: cols[0],\n\t\t\t\t\trightCol: cols[1],\n\t\t\t\t\tisStart: isStart,\n\t\t\t\t\tisEnd: isEnd\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\n\t\treturn segments;\n\t}", "function sectionHeight( pair ){\n const elOnTop = findPosition(pair, \"y\");\n const sectionHeight = Math.abs (\n ( elOnTop[0].yCoord + elOnTop[0].height ) - elOnTop[1].yCoord\n );\n\n return sectionHeight;\n}", "findVerticalSeam() {\n var vseam = [];\n\n var xminsum = 0;\n var vminsum = Number.POSITIVE_INFINITY;\n\n // Find smallest sum on first row\n for (var x = 0; x < this.width; x++) {\n if (this.energy_matrix[x][0].vminsum < vminsum) {\n vminsum = this.energy_matrix[x][0].vminsum;\n xminsum = x;\n }\n }\n\n vseam[0] = xminsum;\n\n // Follow down to get array\n var y = 0;\n while (y < this.height - 1) {\n xminsum = this.energy_matrix[xminsum][y].minx\n y++;\n vseam[y] = xminsum;\n }\n\n return vseam;\n }", "resolveSegmentSegment(ax1, ay1, ax2, ay2, bx1, by1, bx2, by2) {\n const result = [];\n const isHorizontal1 = ax2 - ax1 > ay2 - ay1;\n const isHorizontal2 = bx2 - bx1 > by2 - by1;\n\n if (isHorizontal1 && isHorizontal2 &&\n by1 === ay1 &&\n ((ax1 <= bx2 && ax1 >= bx1) || (ax2 <= bx2 && ax2 >= bx1) || (bx1 <= ax2 && bx1 >= ax1) || (bx2 <= ax2 && bx2 >= ax1))) {\n\n if (bx1 < ax1) result.push(bx1, by1, ax1, by1);\n if (bx2 > ax2) result.push(ax2, by2, bx2, by2);\n\n } else if (!isHorizontal1 && isHorizontal2 &&\n by1 >= ay1 && by1 < ay2 &&\n ((ax1 <= bx2 && ax1 >= bx1) || (ax2 <= bx2 && ax2 >= bx1) || (bx1 <= ax2 && bx1 >= ax1) || (bx2 <= ax2 && bx2 >= ax1))) {\n\n if (bx1 < ax1) result.push(bx1, by1, ax1, by1);\n if (bx2 > ax2) result.push(ax2 + 1, by2, bx2, by2);\n\n } else if (!isHorizontal1 && !isHorizontal2 &&\n ax1 === bx2 &&\n ((by1 <= ay2 && by1 >= ay1) || (by2 <= ay2 && by2 >= ay1) || (ay1 <= by2 && ay1 >= by1) || (ay2 <= by2 && ay2 >= by1))) {\n\n if (by1 < ay1) result.push(bx1, by1, bx1, ay1);\n if (by2 > ay2) result.push(bx2, ay2, bx2, by2);\n\n } else if (isHorizontal1 && !isHorizontal2 &&\n bx1 >= ax1 && bx1 < ax2 &&\n ((ay2 <= by2 && ay2 >= by1) || (ay1 <= by2 && ay1 >= by1) || (by2 <= ay2 && by2 >= ay1) || (by1 <= ay2 && by1 >= ay1))) {\n\n if (by1 < ay1) result.push(bx1, by1, bx1, ay1);\n if (by2 > ay2) result.push(bx2, ay2 + 1, bx2, by2);\n\n } else { // segments do not intersect\n result.push(bx1, by1, bx2, by2);\n }\n\n return result;\n }", "function placeRects(allRects, segs, cells) {\n let rectsByEachCol = groupRectsByEachCol(allRects, cells.length);\n let singleColPlacements = [];\n let multiColPlacements = [];\n let leftoverMargins = [];\n for (let col = 0; col < cells.length; col += 1) {\n let rects = rectsByEachCol[col];\n // compute all static segs in singlePlacements\n let singlePlacements = [];\n let currentHeight = 0;\n let currentMarginTop = 0;\n for (let rect of rects) {\n let seg = segs[rect.index];\n singlePlacements.push({\n seg: resliceSeg(seg, col, col + 1, cells),\n isVisible: true,\n isAbsolute: false,\n absoluteTop: rect.levelCoord,\n marginTop: rect.levelCoord - currentHeight,\n });\n currentHeight = rect.levelCoord + rect.thickness;\n }\n // compute mixed static/absolute segs in multiPlacements\n let multiPlacements = [];\n currentHeight = 0;\n currentMarginTop = 0;\n for (let rect of rects) {\n let seg = segs[rect.index];\n let isAbsolute = rect.span.end - rect.span.start > 1; // multi-column?\n let isFirstCol = rect.span.start === col;\n currentMarginTop += rect.levelCoord - currentHeight; // amount of space since bottom of previous seg\n currentHeight = rect.levelCoord + rect.thickness; // height will now be bottom of current seg\n if (isAbsolute) {\n currentMarginTop += rect.thickness;\n if (isFirstCol) {\n multiPlacements.push({\n seg: resliceSeg(seg, rect.span.start, rect.span.end, cells),\n isVisible: true,\n isAbsolute: true,\n absoluteTop: rect.levelCoord,\n marginTop: 0,\n });\n }\n }\n else if (isFirstCol) {\n multiPlacements.push({\n seg: resliceSeg(seg, rect.span.start, rect.span.end, cells),\n isVisible: true,\n isAbsolute: false,\n absoluteTop: rect.levelCoord,\n marginTop: currentMarginTop, // claim the margin\n });\n currentMarginTop = 0;\n }\n }\n singleColPlacements.push(singlePlacements);\n multiColPlacements.push(multiPlacements);\n leftoverMargins.push(currentMarginTop);\n }\n return { singleColPlacements, multiColPlacements, leftoverMargins };\n }", "_computeRects(props) {\n var {\n highlight,\n offsetParent\n } = props; // Get the set of rectangles that covers the range's text, relative to\n // the offset parent.\n\n var clientRects = getClientRectsForTextInRange(highlight.domRange);\n var offsetParentRect = offsetParent.getBoundingClientRect();\n var relativeRects = clientRects.map(rect => getRelativeRect(rect, offsetParentRect));\n return relativeRects;\n }", "function p(a){\n// Give preference to elements with certain criteria, so they have\n// a chance to be closer to the top.\na.sort(ya);for(var b=[],c=0;c<a.length;c++){\n// loop through subrows, starting with the topmost, until the segment\n// doesn't collide with other segments.\nfor(var d=a[c],e=0;e<b.length&&wa(d,b[e]);e++);\n// `j` now holds the desired subrow index\nb[e]?b[e].push(d):b[e]=[d]}return b}", "function computeSegHorizontals(segs, eventOrderSpecs) {\n // IMPORTANT TO CLEAR OLD RESULTS :(\n for (var _i = 0, segs_2 = segs; _i < segs_2.length; _i++) {\n var seg = segs_2[_i];\n seg.level = null;\n seg.forwardCoord = null;\n seg.backwardCoord = null;\n seg.forwardPressure = null;\n }\n\n segs = Object(_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__[\"sortEventSegs\"])(segs, eventOrderSpecs);\n var level0;\n var levels = buildSlotSegLevels(segs);\n computeForwardSlotSegs(levels);\n\n if (level0 = levels[0]) {\n for (var _a = 0, level0_1 = level0; _a < level0_1.length; _a++) {\n var seg = level0_1[_a];\n computeSlotSegPressures(seg);\n }\n\n for (var _b = 0, level0_2 = level0; _b < level0_2.length; _b++) {\n var seg = level0_2[_b];\n computeSegForwardBack(seg, 0, 0, eventOrderSpecs);\n }\n }\n\n return segs;\n } // Builds an array of segments \"levels\". The first level will be the leftmost tier of segments if the calendar is", "function findTriggerPoints() {\n\ttriggersPoints = [];\n\tvar offset = $(\"#content\").scrollTop();\n\tfor(var a = 0, max = hashElements.length; a < max; a += 1){\n\t\ttriggersPoints.push($(\"#\"+hashElements[a]).offset().top +offsetfindtrigger + offset);\n\t\tif(a+1 >= max){\n\t\t\ttriggersPoints.push(triggersPoints[triggersPoints.length-1]+$(\"#\"+hashElements[a]).height()+offsetfindtrigger);\n\t\t}\n\t}\n}", "function getInner(edges)\n{\n var edd=[];\n for(var i=0;i<edges.length;i++){edd.push(pointify(edges[i]))} //Fill edd with the point notation of the data from edges\n var arr = edd.sort((a,b)=>{return a[0]-b[0]}); //Sort to get the farthest left point\n var left = arr[0][0];\n var avg = (arr[1][1] + arr[2][1])/2; //Take the avg of nearby points to get the trend of height\n return [left+1,Math.round(avg)]; //return inner point as 1 pixel to the right of the leftist edge pixel and the height of the avg\n}", "function n(a){var b,c,d,e=M(),f=[];\n// group segments by row\nfor(b=0;b<a.length;b++)c=a[b],d=c.row,c.element&&(// was rendered?\nf[d]?\n// already other segments. append to array\nf[d].push(c):\n// first segment in row. create new array\nf[d]=[c]);\n// sort each row\nfor(d=0;d<e;d++)f[d]=o(f[d]||[]);return f}", "function sectionOffsetsToArray(scrollOffset) {\n for (i = 0; i < sectionsOffsets.length; i++) {\n sectionsOffsets[i] = sections.eq(i).offset().top + scrollOffset;\n }\n }", "function computeSegCoords(segs, dayDate, slatCoords, eventMinHeight, eventOrderSpecs) {\n computeSegVerticals(segs, dayDate, slatCoords, eventMinHeight);\n return computeSegHorizontals(segs, eventOrderSpecs); // requires top/bottom from computeSegVerticals\n }", "function GetClipSegments(clip_intervals, block_size, hop_size, x_length) {\n var clip_segments = [];\n var num_clip_segments = 0;\n\n var in_segment = false;\n var start_idx = 0;\n var stop_idx = start_idx + block_size - 1;\n var block_idx = 0;\n\n var segment_start_idx = -1;\n var segment_stop_idx = -1;\n while(stop_idx < x_length) {\n // We are in a segment.\n if(in_segment) {\n // We leave the segment. Store it and move on.\n if(!AreOverlapping(clip_intervals, start_idx, stop_idx)) {\n in_segment = false;\n segment_stop_idx = block_idx - 1;\n\n var new_segment = { start:segment_start_idx , stop:segment_stop_idx };\n clip_segments[num_clip_segments] = new_segment;\n num_clip_segments++;\n\n segment_start_idx = -1;\n segment_stop_idx = -1;\n }\n }\n // We are not in a segment.\n else {\n // We have entered a segment.\n if(AreOverlapping(clip_intervals, start_idx, stop_idx)) {\n in_segment = true;\n segment_start_idx = block_idx;\n }\n }\n\n block_idx++;\n start_idx = start_idx + hop_size;\n stop_idx = start_idx + block_size - 1;\n }\n\n // If we end while in a segment, we need to leave the segment and push the segment.\n if(in_segment) {\n in_segment = false;\n segment_stop_idx = block_idx - 1;\n\n var new_segment = { start:segment_start_idx , stop:segment_stop_idx };\n clip_segments[num_clip_segments] = new_segment;\n num_clip_segments++;\n\n segment_start_idx = -1;\n segment_stop_idx = -1;\n }\n\n return clip_segments;\n }", "function buildSegments(events) {\n\t\tvar segments = [];\n\t\tfor (var i=0; i<events.length; i++) {\n\t\t\tvar eventSegments = buildSegmentsForEvent(events[i]);\n\t\t\tsegments.push.apply(segments, eventSegments); // append an array to an array\n\t\t}\n\t\treturn segments;\n\t}", "function buildSegments(events) {\n\t\tvar segments = [];\n\t\tfor (var i=0; i<events.length; i++) {\n\t\t\tvar eventSegments = buildSegmentsForEvent(events[i]);\n\t\t\tsegments.push.apply(segments, eventSegments); // append an array to an array\n\t\t}\n\t\treturn segments;\n\t}", "function buildSegments(events) {\n\t\tvar segments = [];\n\t\tfor (var i=0; i<events.length; i++) {\n\t\t\tvar eventSegments = buildSegmentsForEvent(events[i]);\n\t\t\tsegments.push.apply(segments, eventSegments); // append an array to an array\n\t\t}\n\t\treturn segments;\n\t}", "function buildSegments(events) {\n\t\tvar segments = [];\n\t\tfor (var i=0; i<events.length; i++) {\n\t\t\tvar eventSegments = buildSegmentsForEvent(events[i]);\n\t\t\tsegments.push.apply(segments, eventSegments); // append an array to an array\n\t\t}\n\t\treturn segments;\n\t}", "function buildSegments(events) {\n\t\tvar segments = [];\n\t\tfor (var i=0; i<events.length; i++) {\n\t\t\tvar eventSegments = buildSegmentsForEvent(events[i]);\n\t\t\tsegments.push.apply(segments, eventSegments); // append an array to an array\n\t\t}\n\t\treturn segments;\n\t}", "function getHeight (data) {\n const ROW_SPACING = 198.125\n totalPostNum = data.length\n totalRow = (totalPostNum%stepsX !== 0) ? Math.floor(totalPostNum/stepsX) + 1 : totalPostNum/stepsX\n section_height = (ROW_SPACING * totalRow) + 110\n return section_height\n }", "getConsecutiveBlocks() {\n if (this.blocks.length == 0)\n return [];\n const results = this.blocks.concat([]).sort((a, b) => a.index > b.index ? 1 : -1);\n const oldestRequest = this.requests.map(r => r.blockIndex).sort()[0];\n const oldestResult = results[0].index;\n if (oldestRequest && oldestResult > oldestRequest) {\n return [];\n }\n const blocks = [];\n let i = oldestResult;\n for (let r of results) {\n if (r.index != i++)\n break;\n blocks.push(r);\n }\n return blocks;\n }", "function buildOffsetArray(chords) {\n var offsetArray = [0];\n chords.forEach(function (chord, i) {\n var prevElement = chords[i - 1];\n if (prevElement) {\n var actualLineNumber = parseInt(chord.lineNumber);\n var previousLineNumber = parseInt(prevElement.lineNumber);\n var lastOffset = offsetArray[offsetArray.length - 1]\n if (previousLineNumber - actualLineNumber >= -1) offsetArray.push(lastOffset);\n else offsetArray.push(previousLineNumber - actualLineNumber + 1 + lastOffset);\n }\n });\n return offsetArray;\n }", "function get_top(top){\n\t\t\t\t\tvar row_multiple = row_height*parseInt($rows_id);\n\t\t\t\t\treturn (top + row_multiple) + 'px';\n\t\t\t\t}", "getVertIgnitionPoints () {\n // const spacing = this.bounds().ySpacing()\n const pts = []\n this._vert.forEach((line, lineIdx) => {\n const x = line.anchor()\n // const left = (lineIdx === 0) ? null : this.vertLine(lineIdx - 1)\n // const right = (lineIdx >= this._vert.length - 1) ? null : this.vertLine(lineIdx + 1)\n line.segments().forEach(segment => {\n if (segment.isBurned()) {\n pts.push([x, segment.begins()]) // always ignite the first endpoint\n // ignite any points between the endpoints that is unburned either above or below it\n // for (let y = segment.begins() + spacing; y < segment.ends(); y += spacing) {\n // if ((left && left.isUnburnedAt(y)) || (right && right.isUnburnedAt(y))) pts.push([x, y])\n // }\n // ignite the second endpoint if its not already in the array\n if (pts[pts.length - 1][1] !== segment.ends()) pts.push([x, segment.ends()])\n }\n })\n })\n return pts\n }", "function createRegions() {\n regions = [];\n\n var fullWidth = absolute(timelineController.timeExtents[1]);\n var chunkWidth = 500;\n var chunks = Math.ceil(fullWidth / chunkWidth);\n var offset = 0;\n\n // avoid creating lots of chunks - cap and only generate around the\n // current view\n // if we scroll out of bounds of the chunks we *do* have, we can throw\n // away our regions + purge regions in memory\n if (chunks > 30) {\n var startX = absolute(timelineController.viewExtents[0]);\n var endX = absolute(timelineController.viewExtents[1]);\n var midX = startX + (endX - startX) / 2;\n\n chunks = 50;\n offset = Math.max(0, midX - (chunkWidth * 15));\n }\n\n for (var i = 0; i < chunks; i++) {\n // for each desired chunk, find the bounds and managed data points\n // then, calculate positions for each data point\n var w = Math.min(fullWidth - offset, chunkWidth);\n var min = absolute.invert(offset);\n var max = absolute.invert(offset + w);\n var data = timelineController.dstatInBounds(min, max);\n\n regions.push({\n x: offset, width: w, min: min, max: max,\n data: data,\n c: null,\n dirty: true,\n index: regions.length\n });\n\n offset += w;\n }\n }", "function getBoxPositions (data, numChildren, startPosition) {\n var positions = [];\n var rows = Math.ceil(numChildren / data.columns);\n\n for (var row = 0; row < rows; row++) {\n for (var column = 0; column < data.columns; column++) {\n positions.push([\n column * data.margin,\n row * data.margin,\n 0\n ]);\n }\n }\n\n return positions;\n}", "getHorzIgnitionPoints () {\n const spacing = this.bounds().xSpacing()\n const pts = []\n this._horz.forEach((line, lineIdx) => {\n const y = line.anchor()\n const above = (lineIdx === 0) ? null : this.horzLine(lineIdx - 1)\n const below = (lineIdx >= this._horz.length - 1) ? null : this.horzLine(lineIdx + 1)\n line.segments().forEach(segment => {\n if (segment.isBurned()) {\n pts.push([segment.begins(), y]) // always ignite the first endpoint\n // ignite any points between the endpoints that is unburned either above or below it\n for (let x = segment.begins() + spacing; x < segment.ends(); x += spacing) {\n if ((above && above.isUnburnedAt(x)) || (below && below.isUnburnedAt(x))) pts.push([x, y])\n }\n // ignite the second endpoint if its not already in the array\n if (pts[pts.length - 1][0] !== segment.ends()) pts.push([segment.ends(), y])\n }\n })\n })\n return pts\n }", "function posValue(){\n\t\tvar topArray = [],\n\t\tleftArray = [0, 320, 640, 960];\n\t\tfor (var i = 0; i < $(\"#index_content .home_article\").length; i++) {\n\t\t\tif (i < columnNum) {\n\t\t\t\t$(\".article_\"+i).css(\"top\", \"0\");\n\t\t\t\t$(\".article_\"+i).css(\"left\", leftArray[i]+\"px\");\n\t\t\t\ttopArray[i] = Number($(\".article_\"+i).css(\"height\").replace(\"px\", \"\"));\n\t\t\t} else {\n\t\t\t\tvar small = Math.min.apply(null, topArray),\n\t\t\t\tsmallPos = topArray.indexOf(small);\n\t\t\t\t$(\".article_\"+i).css(\"top\", small+\"px\");\n\t\t\t\t$(\".article_\"+i).css(\"left\", leftArray[smallPos]+\"px\");\n\t\t\t\ttopArray[smallPos] = small + Number($(\".article_\"+i).css(\"height\").replace(\"px\", \"\"));\n\t\t\t}\n\t\t}\n\t\tvar big = Math.max.apply(null, topArray);\n\t\t$(\"#index_content\").css(\"height\", big+\"px\");\n\t}", "pointList() {\n let bottom = this.bottom.screen,\n top = this.top.screen;\n\n return [bottom.x - bottom.w, bottom.y,\n bottom.x + bottom.w, bottom.y,\n top.x + top.w, top.y,\n top.x - top.w, top.y];\n }", "function sortByHeight(arr) {\n // position indexes\n const arr1 = [];\n // store the values\n const arr2 = [];\n // push the tree indexes, and the values\n arr.forEach((val, i) => (val === -1 ? arr1.push(i) : arr2.push(val)));\n // non-descending order values sort\n const sortArr = arr2.sort((a, b) => a - b);\n // loop through indexes, splice sorted array at each index\n arr1.forEach((val, i) => sortArr.splice(arr[i], 0, -1));\n return sortArr;\n}", "function lastY() { return (segments.length == 0) ? 0 : segments[segments.length-1].p2.w.y; }", "calc(width, height) {\n return [\n [- width/2, - height/2],\n [+ width/2, - height/2],\n [+ width/2, + height/2],\n [- width/2, + height/2],\n [- width/2, - height/2],\n ];\n }", "function alignInfoOnImageContent() {\n\n\n // let info_content = $('.block_infoOnImage__content');\n let info_content = document.getElementsByClassName('block_infoOnImage__content');\n\n for(i=0; i<info_content.length; i++) {\n\n let el_parent_height = (info_content[i].parentNode.offsetHeight / 2)\n console.log(el_parent_height)\n let el_heigh = (info_content[i].offsetHeight / 2)\n console.log(el_parent_height - el_heigh)\n // info_content[i].style.top = 'calc('+ el_parent_height - el_heigh +')'\n info_content[i].style.top = (el_parent_height - el_heigh) + 'px'\n\n }\n}", "getRegionIndex(children) {\n const first = children[0];\n const last = children[children.length - 1];\n return (last.colIndex - first.colIndex) / 2 + first.colIndex;\n }", "constructor(left, top) {\n this.top = top;\n this.left = left;\n this.numSegments = LATCH_WIDTH / SEGMENT_WIDTH;\n this.segments = [];\n }", "function getViewPort() {\n var\n scrollTop = body_container[0].scrollTop,\n bodyHeight = body_container[0].offsetHeight,\n // calculate the start index\n from = parseInt(scrollTop / (options.rowHeight + options.borderHeight), 10),\n // calculate the end index\n to = from + parseInt((body_container[0].offsetHeight / (options.rowHeight + options.borderHeight)) * 1.5, 10);\n return {\n from: Math.max(from - options.threshold, 0),\n to: to + options.threshold,\n height: from + to\n };\n }", "function getOffsetTop(rect, vertical) {\n var offset = 0;\n\n if (typeof vertical === 'number') {\n offset = vertical;\n } else if (vertical === 'center') {\n offset = rect.height / 2;\n } else if (vertical === 'bottom') {\n offset = rect.height;\n }\n\n return offset;\n}", "function getTop() {\n\n // Look up the top position in pixels from the game board properties by the current\n // row the character is sitting upon\n return _gameBoard.rows[_currentRow];\n }", "function getOffsets(size) {\n //THIS FUNCTION IS SO UGLY IM SO SORRY\n let wO = (size * 1.732050808 / 2);\n let hO = size;\n let ans = [];\n\n let startingY = 50 - 2 * (hO * .75);\n let startingX = 50 - wO;\n\n for (let i = 0; i < 3; i++) {\n ans.push(`top:${startingY}%;left:${startingX + i * (wO)}%`)\n }\n\n startingY = 50 - 1 * (hO * .75);\n startingX = 50 - wO * (1.5);\n\n for (let i = 0; i < 4; i++) {\n ans.push(`top:${startingY}%;left:${startingX + i * (wO)}%`)\n }\n\n startingY = 50;\n startingX = 50 - wO * (2);\n\n for (let i = 0; i < 5; i++) {\n ans.push(`top:${startingY}%;left:${startingX + i * (wO)}%`)\n }\n\n\n\n startingY = 50 + 1 * (hO * .75);\n startingX = 50 - wO * (1.5);\n\n for (let i = 0; i < 4; i++) {\n ans.push(`top:${startingY}%;left:${startingX + i * (wO)}%`)\n }\n\n startingY = 50 + 2 * (hO * .75);\n startingX = 50 - wO;\n\n\n for (let i = 0; i < 3; i++) {\n ans.push(`top:${startingY}%;left:${startingX + i * (wO)}%`)\n }\n return ans;\n}", "function sortByHeight() {}", "function rangeToSegments(start, end) {\n\n\t\tvar rowCnt = t.getRowCnt();\n\t\tvar colCnt = t.getColCnt();\n\t\tvar segments = []; // array of segments to return\n\n\t\t// day offset for given date range\n\t\tvar rangeDayOffsetStart = dateToDayOffset(start);\n\t\tvar rangeDayOffsetEnd = dateToDayOffset(end); // an exclusive value\n\t\tvar endTimeMS = +end.time();\n\t\tif (endTimeMS && endTimeMS >= nextDayThreshold) {\n\t\t\trangeDayOffsetEnd++;\n\t\t}\n\t\trangeDayOffsetEnd = Math.max(rangeDayOffsetEnd, rangeDayOffsetStart + 1);\n\n\t\t// first and last cell offset for the given date range\n\t\t// \"last\" implies inclusivity\n\t\tvar rangeCellOffsetFirst = dayOffsetToCellOffset(rangeDayOffsetStart);\n\t\tvar rangeCellOffsetLast = dayOffsetToCellOffset(rangeDayOffsetEnd) - 1;\n\n\t\t// loop through all the rows in the view\n\t\tfor (var row=0; row<rowCnt; row++) {\n\n\t\t\t// first and last cell offset for the row\n\t\t\tvar rowCellOffsetFirst = row * colCnt;\n\t\t\tvar rowCellOffsetLast = rowCellOffsetFirst + colCnt - 1;\n\n\t\t\t// get the segment's cell offsets by constraining the range's cell offsets to the bounds of the row\n\t\t\tvar segmentCellOffsetFirst = Math.max(rangeCellOffsetFirst, rowCellOffsetFirst);\n\t\t\tvar segmentCellOffsetLast = Math.min(rangeCellOffsetLast, rowCellOffsetLast);\n\n\t\t\t// make sure segment's offsets are valid and in view\n\t\t\tif (segmentCellOffsetFirst <= segmentCellOffsetLast) {\n\n\t\t\t\t// translate to cells\n\t\t\t\tvar segmentCellFirst = cellOffsetToCell(segmentCellOffsetFirst);\n\t\t\t\tvar segmentCellLast = cellOffsetToCell(segmentCellOffsetLast);\n\n\t\t\t\t// view might be RTL, so order by leftmost column\n\t\t\t\tvar cols = [ segmentCellFirst.col, segmentCellLast.col ].sort();\n\n\t\t\t\t// Determine if segment's first/last cell is the beginning/end of the date range.\n\t\t\t\t// We need to compare \"day offset\" because \"cell offsets\" are often ambiguous and\n\t\t\t\t// can translate to multiple days, and an edge case reveals itself when we the\n\t\t\t\t// range's first cell is hidden (we don't want isStart to be true).\n\t\t\t\tvar isStart = cellOffsetToDayOffset(segmentCellOffsetFirst) == rangeDayOffsetStart;\n\t\t\t\tvar isEnd = cellOffsetToDayOffset(segmentCellOffsetLast) + 1 == rangeDayOffsetEnd; // +1 for comparing exclusively\n\n\t\t\t\tsegments.push({\n\t\t\t\t\trow: row,\n\t\t\t\t\tleftCol: cols[0],\n\t\t\t\t\trightCol: cols[1],\n\t\t\t\t\tisStart: isStart,\n\t\t\t\t\tisEnd: isEnd\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\n\t\treturn segments;\n\t}", "function rangeToSegments(start, end) {\n\n\t\tvar rowCnt = t.getRowCnt();\n\t\tvar colCnt = t.getColCnt();\n\t\tvar segments = []; // array of segments to return\n\n\t\t// day offset for given date range\n\t\tvar rangeDayOffsetStart = dateToDayOffset(start);\n\t\tvar rangeDayOffsetEnd = dateToDayOffset(end); // an exclusive value\n\t\tvar endTimeMS = +end.time();\n\t\tif (endTimeMS && endTimeMS >= nextDayThreshold) {\n\t\t\trangeDayOffsetEnd++;\n\t\t}\n\t\trangeDayOffsetEnd = Math.max(rangeDayOffsetEnd, rangeDayOffsetStart + 1);\n\n\t\t// first and last cell offset for the given date range\n\t\t// \"last\" implies inclusivity\n\t\tvar rangeCellOffsetFirst = dayOffsetToCellOffset(rangeDayOffsetStart);\n\t\tvar rangeCellOffsetLast = dayOffsetToCellOffset(rangeDayOffsetEnd) - 1;\n\n\t\t// loop through all the rows in the view\n\t\tfor (var row=0; row<rowCnt; row++) {\n\n\t\t\t// first and last cell offset for the row\n\t\t\tvar rowCellOffsetFirst = row * colCnt;\n\t\t\tvar rowCellOffsetLast = rowCellOffsetFirst + colCnt - 1;\n\n\t\t\t// get the segment's cell offsets by constraining the range's cell offsets to the bounds of the row\n\t\t\tvar segmentCellOffsetFirst = Math.max(rangeCellOffsetFirst, rowCellOffsetFirst);\n\t\t\tvar segmentCellOffsetLast = Math.min(rangeCellOffsetLast, rowCellOffsetLast);\n\n\t\t\t// make sure segment's offsets are valid and in view\n\t\t\tif (segmentCellOffsetFirst <= segmentCellOffsetLast) {\n\n\t\t\t\t// translate to cells\n\t\t\t\tvar segmentCellFirst = cellOffsetToCell(segmentCellOffsetFirst);\n\t\t\t\tvar segmentCellLast = cellOffsetToCell(segmentCellOffsetLast);\n\n\t\t\t\t// view might be RTL, so order by leftmost column\n\t\t\t\tvar cols = [ segmentCellFirst.col, segmentCellLast.col ].sort();\n\n\t\t\t\t// Determine if segment's first/last cell is the beginning/end of the date range.\n\t\t\t\t// We need to compare \"day offset\" because \"cell offsets\" are often ambiguous and\n\t\t\t\t// can translate to multiple days, and an edge case reveals itself when we the\n\t\t\t\t// range's first cell is hidden (we don't want isStart to be true).\n\t\t\t\tvar isStart = cellOffsetToDayOffset(segmentCellOffsetFirst) == rangeDayOffsetStart;\n\t\t\t\tvar isEnd = cellOffsetToDayOffset(segmentCellOffsetLast) + 1 == rangeDayOffsetEnd; // +1 for comparing exclusively\n\n\t\t\t\tsegments.push({\n\t\t\t\t\trow: row,\n\t\t\t\t\tleftCol: cols[0],\n\t\t\t\t\trightCol: cols[1],\n\t\t\t\t\tisStart: isStart,\n\t\t\t\t\tisEnd: isEnd\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\n\t\treturn segments;\n\t}", "function sectionYcoord (pair, legHeight){\n const elOnTop = findPosition(pair, \"y\");\n const sectionY = elOnTop[0].yCoord + elOnTop[0].height+legHeight;\n return sectionY;\n}", "getPoints(width, height) {\n /*\n Return star point coordinates as [x, y] arrays.\n */\n const cornerWidth = width < 13 ? 3 : 4;\n const cornerHeight = height < 13 ? 3 : 4;\n\n // Points is a list of [x, y] coordinates.\n // Initialize it with all the corner points.\n let points = [\n [cornerWidth, cornerHeight],\n [width - cornerWidth + 1, cornerHeight],\n [cornerWidth, height - cornerHeight + 1],\n [width - cornerWidth + 1, height - cornerHeight + 1],\n ];\n\n // Add a star point in the middle if the board has odd dimensions.\n if (width % 2 == 1 && height % 2 == 1) {\n points.push([Math.ceil(width / 2), Math.ceil(height / 2)]);\n }\n\n // Add star points between corners if the board is big enough and that\n // dimension is odd.\n if (width > 13 && width % 2 == 1) {\n points.push([Math.ceil(width / 2), cornerHeight]);\n points.push([Math.ceil(width / 2), height - cornerHeight + 1]);\n }\n if (height > 13 && height % 2 == 1) {\n points.push([cornerWidth, Math.ceil(height / 2)]);\n points.push([width - cornerWidth + 1, Math.ceil(height / 2)]);\n }\n\n return points;\n }", "function intOffsetTop(intHeight)\r\n{\r\n\tvar intY = 0;\r\n\tvar src = window.event.srcElement;\r\n\tif (intHeight==null)\r\n\t{\r\n\t intY = window.event.y + src.clientHeight - window.event.offsetY - 3;\r\n\t}\r\n\telse intY = window.event.y + src.clientHeight - window.event.offsetY + parseInt(intHeight) - 3;\r\n\treturn intY;\r\n}", "blocksTravelled(){\n let horizontal = Math.abs(eastWest.indexOf(this.beginningLocation.horizontal) - eastWest.indexOf(this.endingLocation.horizontal))\n let vertical = Math.abs(parseInt(this.beginningLocation.vertical)-parseInt(this.endingLocation.vertical))\n return (horizontal + vertical);\n }", "function grid_hs() {\n var height = $p.height - $p.config.BOTBAR; // When at least one height defined (default = 1),\n // Pxs calculated as: (sum of weights) / number\n\n if (mgrid.height || offsub.find(function (x) {\n return x.grid.height;\n })) {\n return weighted_hs(mgrid, height);\n }\n\n var n = offsub.length;\n var off_h = 2 * Math.sqrt(n) / 7 / (n || 1); // Offchart grid height\n\n var px = Math.floor(height * off_h); // Main grid height\n\n var m = height - px * n;\n return [m].concat(Array(n).fill(px));\n }", "styleEvents(events){\n const {\n day\n } = this.props;\n\n const columnEndTimes = [];\n\n return events.map((event) => {\n const { startDate, endDate } = event;\n\n const startOfDayUnix = day.startMoment.valueOf();\n const endOfDayUnix = day.endMoment.valueOf();\n\n let styles = {\n top:`${((startDate - startOfDayUnix)/(endOfDayUnix - startOfDayUnix))*100}%`,\n height: (DAY_COLUMN_HEIGHT/MS_IN_DAY)*(endDate-startDate)\n };\n\n // columns - this just offsets everything 45px*the col. We might want to change this to a percentage based on the total # of cols in the future.\n // loop through all the column event times and find the lowest column with no overlap\n for (let [idx, columnEndTime] of columnEndTimes.entries()) {\n if (startDate >= columnEndTime) {\n columnEndTimes[idx] = endDate;\n\n styles = {\n ...styles,\n left: `${idx*45}px`,\n zIndex: idx\n };\n\n break;\n }\n }\n\n // if there is STILL overlap, then we need to make a new column\n // with the current event's endTime there.\n if(!styles.left) {\n columnEndTimes.push(endDate);\n\n styles = {\n ...styles,\n left: `${(columnEndTimes.length - 1)*45}px`,\n zIndex: columnEndTimes.length - 1\n };\n\n }\n\n return {\n ...event,\n styles\n };\n });\n }", "function getKeyPoints() {\n let keyPoints = [];\n\n keyPoints.push(getTopOfObject(firstPart)); // 0\n\n keyPoints.push(getTopOfObject(aboutSection)); // 1\n keyPoints.push(getEndOfObject(aboutSection)); // 2\n\n keyPoints.push(getTopOfObject(slider)); // 3 Map the music\n keyPoints.push(keyPoints[3] + $(\".slide[data-index=1]\").height()); // 4 lavka lavka\n keyPoints.push(keyPoints[4] + $(\".slide[data-index=2]\").height()); // 5 SHU\n keyPoints.push(keyPoints[5] + $(\".slide[data-index=3]\").height()); // 6 Gold Standart\n keyPoints.push(keyPoints[6] + $(\".slide[data-index=4]\").height()); // 7 Teriberka\n\n let clientsCoords = getObjectCoords(clientsSection);\n keyPoints.push(keyPoints[7] + $(\".slide[data-index=4]\").height()); // 8 Clients Section\n keyPoints.push(keyPoints[8] + (clientsCoords.height - $(window).height())); // 9 Clients Section End\n\n let reviewsCoords = getObjectCoords(reviewsSection);\n keyPoints.push(keyPoints[9] + $(window).height()); // 10 Reviews Section\n keyPoints.push(keyPoints[10] + $(window).height()); // 11 Reviews Section\n keyPoints.push(keyPoints[11] + $(window).height()); // 12 Reviews Section\n keyPoints.push(keyPoints[12] + (reviewsCoords.height - $(window).height())); // 13 Reviews Section\n\n keyPoints.push(keyPoints[13] + $(window).height()); // 14 Contacts Section\n\n return keyPoints;\n }", "getLineAndColumnFromChunk(offset) {\r\n\t\t\t\tvar column, columnCompensation, compensation, lastLine, lineCount, previousLinesCompensation, ref, string;\r\n\t\t\t\tcompensation = this.getLocationDataCompensation(this.chunkOffset, this.chunkOffset + offset);\r\n\t\t\t\tif (offset === 0) {\r\n\t\t\t\t\treturn [this.chunkLine, this.chunkColumn + compensation, this.chunkOffset + compensation];\r\n\t\t\t\t}\r\n\t\t\t\tif (offset >= this.chunk.length) {\r\n\t\t\t\t\tstring = this.chunk;\r\n\t\t\t\t} else {\r\n\t\t\t\t\tstring = this.chunk.slice(0, +(offset - 1) + 1 || 9e9);\r\n\t\t\t\t}\r\n\t\t\t\tlineCount = count(string, '\\n');\r\n\t\t\t\tcolumn = this.chunkColumn;\r\n\t\t\t\tif (lineCount > 0) {\r\n\t\t\t\t\tref = string.split('\\n'), [lastLine] = slice.call(ref, -1);\r\n\t\t\t\t\tcolumn = lastLine.length;\r\n\t\t\t\t\tpreviousLinesCompensation = this.getLocationDataCompensation(this.chunkOffset, this.chunkOffset + offset - column);\r\n\t\t\t\t\tif (previousLinesCompensation < 0) {\r\n\t\t\t\t\t\t// Don't recompensate for initially inserted newline.\r\n\t\t\t\t\t\tpreviousLinesCompensation = 0;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tcolumnCompensation = this.getLocationDataCompensation(this.chunkOffset + offset + previousLinesCompensation - column, this.chunkOffset + offset + previousLinesCompensation);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tcolumn += string.length;\r\n\t\t\t\t\tcolumnCompensation = compensation;\r\n\t\t\t\t}\r\n\t\t\t\treturn [this.chunkLine + lineCount, column + columnCompensation, this.chunkOffset + offset + compensation];\r\n\t\t\t}", "_computeEdges() {\n let edges;\n\n if (!this.radar || !this.radar.planet) {\n edges = {};\n } else {\n // segment top break points\n this.radar.planet.setState();\n\n const bufferSize = this.get('bufferSize');\n const rect = this.radar.planet;\n\n edges = {\n viewportTop: rect.top,\n visibleTop: (-1 * bufferSize * rect.height) + rect.top,\n viewportBottom: rect.bottom,\n visibleBottom: (bufferSize * rect.height) + rect.bottom\n };\n }\n\n this._edges = edges;\n return edges;\n }", "function calcEndsForEdge(config, s, offset) {\n let cellDim = cellSize.current;\n let begin = vec2.create(), end = vec2.create();\n switch(config) {\n case 3:\n case 12:\n {\n let t1 = invLerp(s[0], s[3], 1);\n let t2 = invLerp(s[1], s[2], 1);\n let ob = getSampleLoc(offset);\n let oe = getSampleLoc(offset + 1);\n let Y = vec2.fromValues(0, cellDim);\n vec2.scaleAndAdd(begin, ob, Y, t1);\n vec2.scaleAndAdd(end, oe, Y, t2);\n }\n break;\n case 6:\n case 9:\n {\n let t1 = invLerp(s[1], s[0], 1);\n let t2 = invLerp(s[2], s[3], 1);\n let ob = getSampleLoc(offset + 1);\n let oe = getSampleLoc(offset + samples.cols + 1);\n let X = vec2.fromValues(-cellDim, 0);\n vec2.scaleAndAdd(begin, ob, X, t1);\n vec2.scaleAndAdd(end, oe, X, t2);\n }\n break;\n }\n return [begin, end];\n}" ]
[ "0.7282717", "0.7282717", "0.61150455", "0.61150455", "0.61150455", "0.60714227", "0.60714227", "0.6046859", "0.59406507", "0.5937114", "0.57388973", "0.57141733", "0.57141733", "0.57141733", "0.57141733", "0.57141733", "0.5675065", "0.5637372", "0.5637372", "0.5637372", "0.5637372", "0.5637372", "0.52467614", "0.51611626", "0.5140661", "0.5104185", "0.5104185", "0.5104185", "0.5104185", "0.5104185", "0.5059276", "0.5018442", "0.5017023", "0.4996274", "0.4996274", "0.4996274", "0.4996274", "0.4996274", "0.49944124", "0.49221492", "0.49202907", "0.49071065", "0.48696783", "0.48404953", "0.47853532", "0.47853532", "0.47853532", "0.47819886", "0.47810358", "0.47742772", "0.47683984", "0.47150624", "0.47062725", "0.46853924", "0.46544638", "0.46151108", "0.46064", "0.4604228", "0.4600989", "0.45913061", "0.4583234", "0.4583234", "0.4583234", "0.4583234", "0.4583234", "0.4581166", "0.45599815", "0.45580232", "0.45538607", "0.455342", "0.4547524", "0.45450172", "0.45349884", "0.45330426", "0.45176437", "0.45162708", "0.45121217", "0.4504038", "0.45000142", "0.44912052", "0.44856626", "0.44753218", "0.44706064", "0.44629496", "0.4459384", "0.4456809", "0.44533786", "0.44533786", "0.44508696", "0.44492552", "0.44380605", "0.44147217", "0.44039688", "0.4401356", "0.4400185", "0.43865848", "0.43853745", "0.43730885" ]
0.7304783
1
Build an array of segment arrays, each representing the segments that will be in a row of the grid, sorted by which event should be closest to the top.
function buildSegmentRows(segments) { var rowCnt = getRowCnt(); var segmentRows = []; var segmentI; var segment; var rowI; // group segments by row for (segmentI=0; segmentI<segments.length; segmentI++) { segment = segments[segmentI]; rowI = segment.row; if (segment.element) { // was rendered? if (segmentRows[rowI]) { // already other segments. append to array segmentRows[rowI].push(segment); } else { // first segment in row. create new array segmentRows[rowI] = [ segment ]; } } } // sort each row for (rowI=0; rowI<rowCnt; rowI++) { segmentRows[rowI] = sortSegmentRow( segmentRows[rowI] || [] // guarantee an array, even if no segments ); } return segmentRows; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function p(a){\n// Give preference to elements with certain criteria, so they have\n// a chance to be closer to the top.\na.sort(ya);for(var b=[],c=0;c<a.length;c++){\n// loop through subrows, starting with the topmost, until the segment\n// doesn't collide with other segments.\nfor(var d=a[c],e=0;e<b.length&&wa(d,b[e]);e++);\n// `j` now holds the desired subrow index\nb[e]?b[e].push(d):b[e]=[d]}return b}", "function buildSegmentSubrows(segments) {\n\n\t\t// Give preference to elements with certain criteria, so they have\n\t\t// a chance to be closer to the top.\n\t\tsegments.sort(compareDaySegments);\n\n\t\tvar subrows = [];\n\t\tfor (var i=0; i<segments.length; i++) {\n\t\t\tvar segment = segments[i];\n\n\t\t\t// loop through subrows, starting with the topmost, until the segment\n\t\t\t// doesn't collide with other segments.\n\t\t\tfor (var j=0; j<subrows.length; j++) {\n\t\t\t\tif (!isDaySegmentCollision(segment, subrows[j])) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\t// `j` now holds the desired subrow index\n\t\t\tif (subrows[j]) {\n\t\t\t\tsubrows[j].push(segment);\n\t\t\t}\n\t\t\telse {\n\t\t\t\tsubrows[j] = [ segment ];\n\t\t\t}\n\t\t}\n\n\t\treturn subrows;\n\t}", "function buildSegmentSubrows(segments) {\n\n\t\t// Give preference to elements with certain criteria, so they have\n\t\t// a chance to be closer to the top.\n\t\tsegments.sort(compareDaySegments);\n\n\t\tvar subrows = [];\n\t\tfor (var i=0; i<segments.length; i++) {\n\t\t\tvar segment = segments[i];\n\n\t\t\t// loop through subrows, starting with the topmost, until the segment\n\t\t\t// doesn't collide with other segments.\n\t\t\tfor (var j=0; j<subrows.length; j++) {\n\t\t\t\tif (!isDaySegmentCollision(segment, subrows[j])) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\t// `j` now holds the desired subrow index\n\t\t\tif (subrows[j]) {\n\t\t\t\tsubrows[j].push(segment);\n\t\t\t}\n\t\t\telse {\n\t\t\t\tsubrows[j] = [ segment ];\n\t\t\t}\n\t\t}\n\n\t\treturn subrows;\n\t}", "function buildSegmentSubrows(segments) {\n\n\t\t// Give preference to elements with certain criteria, so they have\n\t\t// a chance to be closer to the top.\n\t\tsegments.sort(compareDaySegments);\n\n\t\tvar subrows = [];\n\t\tfor (var i=0; i<segments.length; i++) {\n\t\t\tvar segment = segments[i];\n\n\t\t\t// loop through subrows, starting with the topmost, until the segment\n\t\t\t// doesn't collide with other segments.\n\t\t\tfor (var j=0; j<subrows.length; j++) {\n\t\t\t\tif (!isDaySegmentCollision(segment, subrows[j])) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\t// `j` now holds the desired subrow index\n\t\t\tif (subrows[j]) {\n\t\t\t\tsubrows[j].push(segment);\n\t\t\t}\n\t\t\telse {\n\t\t\t\tsubrows[j] = [ segment ];\n\t\t\t}\n\t\t}\n\n\t\treturn subrows;\n\t}", "function buildSegmentSubrows(segments) {\n\n\t\t// Give preference to elements with certain criteria, so they have\n\t\t// a chance to be closer to the top.\n\t\tsegments.sort(compareDaySegments);\n\n\t\tvar subrows = [];\n\t\tfor (var i=0; i<segments.length; i++) {\n\t\t\tvar segment = segments[i];\n\n\t\t\t// loop through subrows, starting with the topmost, until the segment\n\t\t\t// doesn't collide with other segments.\n\t\t\tfor (var j=0; j<subrows.length; j++) {\n\t\t\t\tif (!isDaySegmentCollision(segment, subrows[j])) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\t// `j` now holds the desired subrow index\n\t\t\tif (subrows[j]) {\n\t\t\t\tsubrows[j].push(segment);\n\t\t\t}\n\t\t\telse {\n\t\t\t\tsubrows[j] = [ segment ];\n\t\t\t}\n\t\t}\n\n\t\treturn subrows;\n\t}", "function buildSegmentSubrows(segments) {\n\n\t\t// Give preference to elements with certain criteria, so they have\n\t\t// a chance to be closer to the top.\n\t\tsegments.sort(compareDaySegments);\n\n\t\tvar subrows = [];\n\t\tfor (var i=0; i<segments.length; i++) {\n\t\t\tvar segment = segments[i];\n\n\t\t\t// loop through subrows, starting with the topmost, until the segment\n\t\t\t// doesn't collide with other segments.\n\t\t\tfor (var j=0; j<subrows.length; j++) {\n\t\t\t\tif (!isDaySegmentCollision(segment, subrows[j])) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\t// `j` now holds the desired subrow index\n\t\t\tif (subrows[j]) {\n\t\t\t\tsubrows[j].push(segment);\n\t\t\t}\n\t\t\telse {\n\t\t\t\tsubrows[j] = [ segment ];\n\t\t\t}\n\t\t}\n\n\t\treturn subrows;\n\t}", "function n(a){var b,c,d,e=M(),f=[];\n// group segments by row\nfor(b=0;b<a.length;b++)c=a[b],d=c.row,c.element&&(// was rendered?\nf[d]?\n// already other segments. append to array\nf[d].push(c):\n// first segment in row. create new array\nf[d]=[c]);\n// sort each row\nfor(d=0;d<e;d++)f[d]=o(f[d]||[]);return f}", "function buildSegments(events) {\n\t\tvar segments = [];\n\t\tfor (var i=0; i<events.length; i++) {\n\t\t\tvar eventSegments = buildSegmentsForEvent(events[i]);\n\t\t\tsegments.push.apply(segments, eventSegments); // append an array to an array\n\t\t}\n\t\treturn segments;\n\t}", "function buildSegments(events) {\n\t\tvar segments = [];\n\t\tfor (var i=0; i<events.length; i++) {\n\t\t\tvar eventSegments = buildSegmentsForEvent(events[i]);\n\t\t\tsegments.push.apply(segments, eventSegments); // append an array to an array\n\t\t}\n\t\treturn segments;\n\t}", "function buildSegments(events) {\n\t\tvar segments = [];\n\t\tfor (var i=0; i<events.length; i++) {\n\t\t\tvar eventSegments = buildSegmentsForEvent(events[i]);\n\t\t\tsegments.push.apply(segments, eventSegments); // append an array to an array\n\t\t}\n\t\treturn segments;\n\t}", "function buildSegments(events) {\n\t\tvar segments = [];\n\t\tfor (var i=0; i<events.length; i++) {\n\t\t\tvar eventSegments = buildSegmentsForEvent(events[i]);\n\t\t\tsegments.push.apply(segments, eventSegments); // append an array to an array\n\t\t}\n\t\treturn segments;\n\t}", "function buildSegments(events) {\n\t\tvar segments = [];\n\t\tfor (var i=0; i<events.length; i++) {\n\t\t\tvar eventSegments = buildSegmentsForEvent(events[i]);\n\t\t\tsegments.push.apply(segments, eventSegments); // append an array to an array\n\t\t}\n\t\treturn segments;\n\t}", "function sortSegmentRow(segments) {\n\t\tvar sortedSegments = [];\n\n\t\t// build the subrow array\n\t\tvar subrows = buildSegmentSubrows(segments);\n\n\t\t// flatten it\n\t\tfor (var i=0; i<subrows.length; i++) {\n\t\t\tsortedSegments.push.apply(sortedSegments, subrows[i]); // append an array to an array\n\t\t}\n\n\t\treturn sortedSegments;\n\t}", "function sortSegmentRow(segments) {\n\t\tvar sortedSegments = [];\n\n\t\t// build the subrow array\n\t\tvar subrows = buildSegmentSubrows(segments);\n\n\t\t// flatten it\n\t\tfor (var i=0; i<subrows.length; i++) {\n\t\t\tsortedSegments.push.apply(sortedSegments, subrows[i]); // append an array to an array\n\t\t}\n\n\t\treturn sortedSegments;\n\t}", "function sortSegmentRow(segments) {\n\t\tvar sortedSegments = [];\n\n\t\t// build the subrow array\n\t\tvar subrows = buildSegmentSubrows(segments);\n\n\t\t// flatten it\n\t\tfor (var i=0; i<subrows.length; i++) {\n\t\t\tsortedSegments.push.apply(sortedSegments, subrows[i]); // append an array to an array\n\t\t}\n\n\t\treturn sortedSegments;\n\t}", "function sortSegmentRow(segments) {\n\t\tvar sortedSegments = [];\n\n\t\t// build the subrow array\n\t\tvar subrows = buildSegmentSubrows(segments);\n\n\t\t// flatten it\n\t\tfor (var i=0; i<subrows.length; i++) {\n\t\t\tsortedSegments.push.apply(sortedSegments, subrows[i]); // append an array to an array\n\t\t}\n\n\t\treturn sortedSegments;\n\t}", "function sortSegmentRow(segments) {\n\t\tvar sortedSegments = [];\n\n\t\t// build the subrow array\n\t\tvar subrows = buildSegmentSubrows(segments);\n\n\t\t// flatten it\n\t\tfor (var i=0; i<subrows.length; i++) {\n\t\t\tsortedSegments.push.apply(sortedSegments, subrows[i]); // append an array to an array\n\t\t}\n\n\t\treturn sortedSegments;\n\t}", "resolveSegmentSegment(ax1, ay1, ax2, ay2, bx1, by1, bx2, by2) {\n const result = [];\n const isHorizontal1 = ax2 - ax1 > ay2 - ay1;\n const isHorizontal2 = bx2 - bx1 > by2 - by1;\n\n if (isHorizontal1 && isHorizontal2 &&\n by1 === ay1 &&\n ((ax1 <= bx2 && ax1 >= bx1) || (ax2 <= bx2 && ax2 >= bx1) || (bx1 <= ax2 && bx1 >= ax1) || (bx2 <= ax2 && bx2 >= ax1))) {\n\n if (bx1 < ax1) result.push(bx1, by1, ax1, by1);\n if (bx2 > ax2) result.push(ax2, by2, bx2, by2);\n\n } else if (!isHorizontal1 && isHorizontal2 &&\n by1 >= ay1 && by1 < ay2 &&\n ((ax1 <= bx2 && ax1 >= bx1) || (ax2 <= bx2 && ax2 >= bx1) || (bx1 <= ax2 && bx1 >= ax1) || (bx2 <= ax2 && bx2 >= ax1))) {\n\n if (bx1 < ax1) result.push(bx1, by1, ax1, by1);\n if (bx2 > ax2) result.push(ax2 + 1, by2, bx2, by2);\n\n } else if (!isHorizontal1 && !isHorizontal2 &&\n ax1 === bx2 &&\n ((by1 <= ay2 && by1 >= ay1) || (by2 <= ay2 && by2 >= ay1) || (ay1 <= by2 && ay1 >= by1) || (ay2 <= by2 && ay2 >= by1))) {\n\n if (by1 < ay1) result.push(bx1, by1, bx1, ay1);\n if (by2 > ay2) result.push(bx2, ay2, bx2, by2);\n\n } else if (isHorizontal1 && !isHorizontal2 &&\n bx1 >= ax1 && bx1 < ax2 &&\n ((ay2 <= by2 && ay2 >= by1) || (ay1 <= by2 && ay1 >= by1) || (by2 <= ay2 && by2 >= ay1) || (by1 <= ay2 && by1 >= ay1))) {\n\n if (by1 < ay1) result.push(bx1, by1, bx1, ay1);\n if (by2 > ay2) result.push(bx2, ay2 + 1, bx2, by2);\n\n } else { // segments do not intersect\n result.push(bx1, by1, bx2, by2);\n }\n\n return result;\n }", "function computeSegHorizontals(segs, eventOrderSpecs) {\n // IMPORTANT TO CLEAR OLD RESULTS :(\n for (var _i = 0, segs_2 = segs; _i < segs_2.length; _i++) {\n var seg = segs_2[_i];\n seg.level = null;\n seg.forwardCoord = null;\n seg.backwardCoord = null;\n seg.forwardPressure = null;\n }\n\n segs = Object(_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__[\"sortEventSegs\"])(segs, eventOrderSpecs);\n var level0;\n var levels = buildSlotSegLevels(segs);\n computeForwardSlotSegs(levels);\n\n if (level0 = levels[0]) {\n for (var _a = 0, level0_1 = level0; _a < level0_1.length; _a++) {\n var seg = level0_1[_a];\n computeSlotSegPressures(seg);\n }\n\n for (var _b = 0, level0_2 = level0; _b < level0_2.length; _b++) {\n var seg = level0_2[_b];\n computeSegForwardBack(seg, 0, 0, eventOrderSpecs);\n }\n }\n\n return segs;\n } // Builds an array of segments \"levels\". The first level will be the leftmost tier of segments if the calendar is", "function m(a){for(var b,c=M(),d=N(),e=[],f=n(a),g=0;g<c;g++){var h=f[g],i=[];for(b=0;b<d;b++)i.push(0);\n// loop through every segment\nfor(var j=0;j<h.length;j++){var k=h[j];\n// adjust the columns to account for the segment's height\nfor(\n// find the segment's top coordinate by looking at the max height\n// of all the columns the segment will be in.\nk.top=D(i.slice(k.leftCol,k.rightCol+1)),b=k.leftCol;b<=k.rightCol;b++)i[b]=k.top+k.outerHeight}\n// the tallest column in the row should be the \"content height\"\ne.push(D(i))}return e}", "function findEvents(grid, minx, maxx, miny, maxy, locationx, locationy){\n events = [];\n for (x=minx; x<=maxx; x++){\n for (y=miny; y<=maxy; y++){\n if(math.subset(grid, math.index(x,y)) != 0){\n var currentEvent = math.subset(grid, math.index(x,y));\n distance = calculateDistance(locationx, locationy, currentEvent);\n currentEvent[\"distance\"] = distance;\n events.push(currentEvent);\n }\n }\n }\n events = sortByKey(events, \"distance\");\n for (e=0; e<events.length; e++){\n var current = events[e];\n events[e] = concatenateEvents(current, locationx, locationy)\n }\n return events;\n }", "function buildSegmentsForEvent(event) {\n\t\tvar segments = rangeToSegments(event.start, getEventEnd(event));\n\t\tfor (var i=0; i<segments.length; i++) {\n\t\t\tsegments[i].event = event;\n\t\t}\n\t\treturn segments;\n\t}", "function buildSegmentsForEvent(event) {\n\t\tvar segments = rangeToSegments(event.start, getEventEnd(event));\n\t\tfor (var i=0; i<segments.length; i++) {\n\t\t\tsegments[i].event = event;\n\t\t}\n\t\treturn segments;\n\t}", "function buildArrays() {\n var xPos = 124;\n var yPos = 153;\n\n rowOne.push(new Point(59, 153));\n rowOne.push(new Point(76, 153));\n\n\n rowTwo.push(new Point(59, 199));\n rowTwo.push(new Point(76, 199));\n\n\n rowThree.push(new Point(59, 248));\n rowThree.push(new Point(76, 248));\n\n\n for (var i = 1; i <= 35; i++) {\n rowOne.push(new Point(xPos, yPos));\n rowTwo.push(new Point(xPos, yPos + 46));\n rowThree.push(new Point(xPos, yPos + 46 + 49));\n xPos += 16.45;\n if (i % 5 == 0) {\n xPos += 24;\n }\n\n }\n\n rowOne.push(new Point(886, 158.5));\n rowOne.push(new Point(942, 208.5));\n rowOne.push(new Point(965.5, 284));\n rowOne.push(new Point(948.5, 359));\n rowOne.push(new Point(896.5, 417.5));\n\n rowTwo.push(new Point(868.5, 209));\n rowTwo.push(new Point(905, 240.5));\n rowTwo.push(new Point(916.5, 284.5));\n rowTwo.push(new Point(907, 327.5));\n rowTwo.push(new Point(879, 366));\n\n rowThree.push(new Point(854, 257));\n rowThree.push(new Point(866, 270));\n rowThree.push(new Point(869.5, 287));\n rowThree.push(new Point(867.5, 305));\n rowThree.push(new Point(860, 319.5));\n\n\n xPos -= 35;\n yPos = 429;\n\n for (var n = 1; n <= 35; n++) {\n rowOne.push(new Point(xPos, yPos));\n rowTwo.push(new Point(xPos, yPos - 46));\n rowThree.push(new Point(xPos, yPos - 46 - 47));\n xPos -= 16.8;\n if (n % 5 == 0) {\n xPos -= 9.9;\n }\n\n }\n\n rowOne.push(new Point(169.5, 441.5));\n rowOne.push(new Point(159.5, 457.5));\n rowOne.push(new Point(155.5, 474));\n rowOne.push(new Point(158.5, 492));\n rowOne.push(new Point(170.5, 506.5));\n\n rowTwo.push(new Point(156.5, 384));\n rowTwo.push(new Point(121, 419));\n rowTwo.push(new Point(104, 471));\n rowTwo.push(new Point(117.5, 521.5));\n rowTwo.push(new Point(156.5, 555));\n\n rowThree.push(new Point(142.5, 338));\n rowThree.push(new Point(77.5, 393.5));\n rowThree.push(new Point(58.5, 469.5));\n rowThree.push(new Point(79, 548));\n rowThree.push(new Point(139, 605));\n\n xPos += 24;\n yPos = 517.5;\n\n for (var m = 1; m <= 40; m++) {\n rowOne.push(new Point(xPos, yPos));\n rowTwo.push(new Point(xPos, yPos + 46));\n rowThree.push(new Point(xPos, yPos + 46 + 49));\n xPos += 16.5;\n if (m % 5 == 0) {\n xPos += 10.8;\n }\n\n }\n\n rowOne.push(new Point(970.5, 561.5));\n\n rowTwo.push(new Point(970.5, 561.5));\n\n rowThree.push(new Point(970.5, 561.5));\n}", "static sortCornersByTopnessPS(corners_array){\n var corners_array_to_be_returned = []\n for (var i = 0; i < corners_array.length; i++){\n corners_array_to_be_returned[i] = {x:corners_array[i].x,y:corners_array[i].y}\n }\n\n var sorted = false;\n //The greater value of y gets the \n while (!sorted){\n var sort_occurred = false;\n for (var i = 0; i < corners_array_to_be_returned.length - 1; i++){\n if (corners_array_to_be_returned[i].y < corners_array_to_be_returned[i+1].y){\n Tile.switchIndices(corners_array_to_be_returned, i, i+1)\n sort_occurred = true\n }\n }\n\n if (!sort_occurred){\n sorted = true;\n }\n }\n\n return corners_array_to_be_returned;\n }", "function buildSegmentsForEvent(event) {\n\t\tvar startDate = event.start;\n\t\tvar endDate = exclEndDay(event);\n\t\tvar segments = rangeToSegments(startDate, endDate);\n\t\tfor (var i=0; i<segments.length; i++) {\n\t\t\tsegments[i].event = event;\n\t\t}\n\t\treturn segments;\n\t}", "function buildSegmentsForEvent(event) {\n\t\tvar startDate = event.start;\n\t\tvar endDate = exclEndDay(event);\n\t\tvar segments = rangeToSegments(startDate, endDate);\n\t\tfor (var i=0; i<segments.length; i++) {\n\t\t\tsegments[i].event = event;\n\t\t}\n\t\treturn segments;\n\t}", "function buildSegmentsForEvent(event) {\n\t\tvar startDate = event.start;\n\t\tvar endDate = exclEndDay(event);\n\t\tvar segments = rangeToSegments(startDate, endDate);\n\t\tfor (var i=0; i<segments.length; i++) {\n\t\t\tsegments[i].event = event;\n\t\t}\n\t\treturn segments;\n\t}", "static sortCornersByTopness(corners_array){\n var corners_array_to_be_returned = []\n for (var i = 0; i < corners_array.length; i++){\n corners_array_to_be_returned[i] = {x:corners_array[i].x,y:corners_array[i].y}\n }\n\n var sorted = false;\n //The greater value of y gets the \n while (!sorted){\n var sort_occurred = false;\n for (var i = 0; i < corners_array_to_be_returned.length - 1; i++){\n if (corners_array_to_be_returned[i].y > corners_array_to_be_returned[i+1].y){\n Tile.switchIndices(corners_array_to_be_returned, i, i+1)\n sort_occurred = true\n }\n }\n\n if (!sort_occurred){\n sorted = true;\n }\n }\n\n return corners_array_to_be_returned;\n }", "function gridLayout(buffer, min_distance) {\n// var sorted_nodes = [];\n var i;\n var length = buffer.vertexes.length;\n //nxn matrix\n var n = Math.sqrt(length);\n n = Math.ceil(n * 10) / 10;\n var mx = $(document).scrollLeft() + (window.screen.width - n * min_distance) / 2,\n my = $(document).scrollTop() + (window.screen.height - n * min_distance) / 2;\n// sorted_nodes = buffer.vertexes.slice();\n\n var act;\n\n var x = 0, y = 0;\n for (i = 0; i < length; i++)\n {\n act = buffer.vertexes[i];\n act.gridX = x;\n act.gridY = y;\n x++;\n if (x > n)\n {\n x = 0;\n y++;\n }\n }\n\n var r1, r2;\n var t1, nt1, t2, nt2;\n var tmpX, tmpY;\n for (i = 0; i < 10000; i++)\n {\n r1 = Math.floor(Math.random() * length);\n r2 = Math.floor(Math.random() * length);\n if (r1 == r2) {\n i--;\n continue;\n }\n r1 = buffer.vertexes[r1];\n r2 = buffer.vertexes[r2];\n t1 = checkCrossing(r1, r1, buffer);\n nt1 = checkCrossing(r1, r2, buffer);\n t2 = checkCrossing(r2, r2, buffer);\n nt2 = checkCrossing(r2, r1, buffer);\n if (t1 + t2 > nt1 + nt2)\n {\n //swap grid pos\n tmpX = r1.gridX;\n tmpY = r1.gridY;\n r1.gridX = r2.gridX;\n r1.gridY = r2.gridY;\n r2.gridX = tmpX;\n r2.gridY = tmpY;\n }\n }\n\n var node;\n for (i = 0; i < length; i++)\n {\n act = buffer.vertexes[i];\n if (act.isVirtual) continue;\n node = Graph.nodes[act.id];\n node.left = act.gridX * min_distance * 2 + mx;\n node.top = act.gridY * min_distance * 2 + my;\n }\n\n\n// sorted_nodes.sort( function(a,b) {\n// if (a.inConnCounter + a.outConnCounter > b.inConnCounter + b.outConnCounter) return -1;\n// return 1;\n// });\n\n// var x = 0, y = 0;\n// var act;\n// for (index in sorted_nodes)\n// {\n// act = Graph.nodes[sorted_nodes[index].id];\n// act.left = x * 200 + mx;\n// act.top = y * 200 + my;\n// x++;\n// if (x > n)\n// {\n// x = 0;\n// y++;\n// }\n// }\n}", "function eventRestructurer(columns) {\n const containerWidth = 620;\n const resultArray = [];\n columns.forEach((group, columnsIndex) => {\n group.forEach(event => {\n const factorWL = widthLeftFactor(event, columnsIndex, columns);\n resultArray.push({\n id: `${event[0]}`,\n start: event[1].start,\n end: event[1].end,\n top: `${event[1].start}px`,\n width: containerWidth * factorWL[0],\n left: `${columnsIndex / factorWL[1] * 100}%`\n });\n });\n });\n return resultArray;\n }", "function divideGrid(grid, n) {\n const dividedGrid = [];\n\n for (let rowIdx = 0; rowIdx < grid.length; rowIdx += n) {\n const row = [];\n\n for (let colIdx = 0; colIdx < grid.length; colIdx += n) {\n const segment = [];\n\n for (let i = 0; i < n; i+= 1) {\n segment[i] = [];\n\n for (let j = 0; j < n; j += 1) {\n segment[i][j] = grid[rowIdx + i][colIdx + j];\n }\n }\n\n row.push(segment);\n }\n\n dividedGrid.push(row);\n }\n\n return dividedGrid;\n}", "layoutEventsInBands(events) {\n let verticalPosition = 0;\n\n do {\n let eventIndex = 0,\n event = events[0];\n\n while (event) {\n // Apply band height to the event cfg\n event.top = this.bandIndexToPxConvertFn.call(this.bandIndexToPxConvertThisObj || this, verticalPosition, event.eventRecord); // Remove it from the array and continue searching\n\n events.splice(eventIndex, 1);\n eventIndex = this.findClosestSuccessor(event, events);\n event = events[eventIndex];\n }\n\n verticalPosition++;\n } while (events.length > 0); // Done!\n\n return verticalPosition;\n }", "function l(a,b){var c,d=m(a),e=r(),f=[];\n// Set each row's height by setting height of first inner div\nif(b)for(c=0;c<e.length;c++)e[c].height(d[c]);\n// Get each row's top, relative to the views's origin.\n// Important to do this after setting each row's height.\nfor(c=0;c<e.length;c++)f.push(e[c].position().top);\n// Set each segment element's CSS \"top\" property.\n// Each segment object has a \"top\" property, which is relative to the row's top, but...\nxa(a,function(a,b){b.css(\"top\",f[a.row]+a.top)})}", "layoutEventsInBands(events) {\n let verticalPosition = 0;\n\n do {\n let event = events[0];\n\n while (event) {\n // Apply band height to the event cfg\n event.top = this.bandIndexToPxConvertFn.call(\n this.bandIndexToPxConvertThisObj || this,\n verticalPosition,\n event.event\n );\n\n // Remove it from the array and continue searching\n events.splice(events.indexOf(event), 1);\n\n event = this.findClosestSuccessor(event, events);\n }\n\n verticalPosition++;\n } while (events.length > 0);\n\n // Done!\n return verticalPosition;\n }", "function getClosestCells(_currPos, gridDiv, gridW, gridH)\n{\n var neighbors = [];\n var boxWidth = gridW / gridDiv;\n var boxHeight = gridH / gridDiv;\n var _startX = 0.0;\n var _startY = 0.0;\n var _endX = 0.0;\n var _endY = 0.0;\n\n //establish current grid cell boundaries of agent\n for(var i = 0; i < gridW; i += boxWidth)\n {\n if(_currPos.x >= i && _currPos.x <= i + boxWidth)\n {\n _startX = i;\n _endX = i + boxWidth;\n }\n }\n\n for(var j = 0; j < gridH; j += boxHeight)\n {\n if(_currPos.z >= j && _currPos.z <= j + boxHeight)\n {\n _startY = j;\n _endY = j + boxHeight;\n }\n }\n\n //boundary cases\n if(_startX == 0)\n {\n _startX += boxWidth;\n }\n if(_startX == 20)\n {\n _startX -= boxWidth;\n }\n\n if(_startY == 0)\n {\n _startY += boxHeight;\n }\n if(_startY == 20)\n {\n _startY -= boxHeight;\n }\n\n if(_endX == 20)\n {\n _endX -= boxWidth;\n }\n if(_endY == 20)\n {\n _endY -= boxHeight;\n }\n\n //either multiply the values in if cases by 2 or subtract and add boxWidth and boxHeight here\n neighbors.push({startX: _startX - boxWidth, startY: _startY - boxHeight, endX: _endX + boxWidth, endY: _endY + boxHeight});\n\n return neighbors;\n}", "function computeSegHorizontals(segs, eventOrderSpecs) {\n // IMPORTANT TO CLEAR OLD RESULTS :(\n for (var _i = 0, segs_2 = segs; _i < segs_2.length; _i++) {\n var seg = segs_2[_i];\n seg.level = null;\n seg.forwardCoord = null;\n seg.backwardCoord = null;\n seg.forwardPressure = null;\n }\n segs = sortEventSegs(segs, eventOrderSpecs);\n var level0;\n var levels = buildSlotSegLevels(segs);\n computeForwardSlotSegs(levels);\n if ((level0 = levels[0])) {\n for (var _a = 0, level0_1 = level0; _a < level0_1.length; _a++) {\n var seg = level0_1[_a];\n computeSlotSegPressures(seg);\n }\n for (var _b = 0, level0_2 = level0; _b < level0_2.length; _b++) {\n var seg = level0_2[_b];\n computeSegForwardBack(seg, 0, 0, eventOrderSpecs);\n }\n }\n return segs;\n }", "winningPositions() {\n return [\n [0,1,2],\n [3,4,5],\n [6,7,8],\n [0,3,6],\n [1,4,7],\n [2,5,8],\n [0,4,8],\n [2,4,6]\n ]\n }", "buildNodes(diameter) {\n let nodes = [];\n for (let i = -Math.floor(diameter / 2); i <= Math.floor(diameter / 2); i++) { //outer handles x value\n let minY;\n let width = diameter - Math.abs(i);\n\n if (i < 0) {\n minY = -Math.floor(diameter / 2) - i; //0, -1, -2, etc...\n } else {\n minY = -Math.floor(diameter / 2);\n }\n\n for (let j = minY; j < width - Math.abs(minY); j++) {\n if (i + Math.floor(diameter / 2) >= nodes.length) nodes.push([]);\n nodes[i + Math.floor(diameter / 2)][j - minY] = new Point(i, j);\n }\n }\n return nodes;\n }", "function computeSegCoords(segs, dayDate, slatCoords, eventMinHeight, eventOrderSpecs) {\n computeSegVerticals(segs, dayDate, slatCoords, eventMinHeight);\n return computeSegHorizontals(segs, eventOrderSpecs); // requires top/bottom from computeSegVerticals\n } // For each segment in an array, computes and assigns its top and bottom properties", "function getThisStreetShortSortedPoints(streetSegments) {\n //console.log(streetSegments);\n streetSegments.map(function(d) {\n points = points.concat(d.geometry.coordinates);\n\n sortedPoints = points.sort( function(a,b) { return a[1] - b[1]; });\n shortSortedPoints = sortedPoints.filter(function(d, i) { return i%4 === 0; });\n });\n}", "computeControlSegments() {\n if (this.controlSteps.length) {\n this.controlSegments = [];\n let segment = { start : 0, end : 0, human : this.controlSteps[0] }\n for (let i = 0; i < this.controlSteps.length; ++i) {\n const humanStep = this.controlSteps[i];\n if (humanStep != segment.human) {\n this.controlSegments.push(segment);\n segment = { start : i, end : i, human : humanStep };\n } else {\n segment.end = i;\n }\n }\n this.controlSegments.push(segment);\n }\n }", "function F(a,b){var c=G.getRowCnt(),d=G.getColCnt(),e=[],f=B(a),g=B(b),h=+b.time();h&&h>=M&&g++,g=Math.max(g,f+1);\n// loop through all the rows in the view\nfor(var i=C(f),j=C(g)-1,k=0;k<c;k++){\n// first and last cell offset for the row\nvar l=k*d,m=l+d-1,n=Math.max(i,l),o=Math.min(j,m);\n// make sure segment's offsets are valid and in view\nif(n<=o){\n// translate to cells\nvar p=D(n),q=D(o),r=[p.col,q.col].sort(),s=y(n)==f,t=y(o)+1==g;// +1 for comparing exclusively\ne.push({row:k,leftCol:r[0],rightCol:r[1],isStart:s,isEnd:t})}}return e}", "function sliceArrayForGraph() {\n if (sortedData.length < seed) {\n for (let i = 0; i < (sortedData.length); i++) {\n dataReadyForGraph.push(sortedData[i]);\n }\n } else {\n startseed = ((sortedData.length) - seed);\n for (let y = startseed; y < (sortedData.length); y++) {\n dataReadyForGraph.push(sortedData[y]);\n }\n }\n }", "function B() {\n for (var a = scheduler.get_visible_events(), b = [], c = 0; c < this.y_unit.length; c++) b[c] = [];\n b[f] || (b[f] = []);\n for (c = 0; c < a.length; c++) {\n for (var f = this.order[a[c][this.y_property]], d = 0; this._trace_x[d + 1] && a[c].start_date >= this._trace_x[d + 1]; ) d++;\n for (; this._trace_x[d] && a[c].end_date > this._trace_x[d]; ) b[f][d] || (b[f][d] = []), b[f][d].push(a[c]), d++\n }\n return b\n }", "function sliceArrayForGraph() {\n if (sortedByTime.length < seed) {\n for (let i = 0; i < (sortedByTime.length); i++) {\n dataReadyForGraph.push(sortedByTime[i]);\n }\n } else {\n startseed = ((sortedByTime.length) - seed);\n for (let y = startseed; y < (sortedByTime.length); y++) {\n dataReadyForGraph.push(sortedByTime[y]);\n }\n }\n }", "function segmentItemsByDate(items){\n\t// first let's sort\n\tconsole.log(\"***before sort***\");\n\tprintItems(items);\n\n\n\titems.sort(function(a,b){return new Date(a.planDate).getTime()-new Date(b.planDate).getTime();})\n\n\tconsole.log(\"***after sort***\");\n\tprintItems(items);\n\tvar _segments=new Array();\n\tvar e=0;\n\twhile(items.length>0){\n\t\tconsole.log(\"in outer loop - e: \"+e);\n\t\t_segments[e] = new Array();\n\n\t\tfor (var i=0 ;i<items.length;i++){\n\t\t\t//console.log(\"in inner loop - i: \"+i+ \" i.planDate: \"+items[i].planDate+\"(e: \"+e+\") e.planDate: \"+items[e].planDate);\n\t\t\tif (items[0].planDate == items[i].planDate){\n\t\t\t\tconsole.log(\"***e: \"+e+\" i: \"+i+\" same planDate found\");\n\t\t\t\t_segments[e].push(items[i]);\n\t\t\t\tconsole.log(\"+++++ pushed in _segments[\"+e+\"] id: \"+items[i].id);\n\t\t\t}\n\t\t\tconsole.log(\"e=\"+e);\n\t\t}\n\t\tfor(var j in _segments[e]){\n\t\t\tprintItems(items);\n\t\t\tconsole.log(\"elements.length: \"+items.length);\n\t\t\tconsole.log(\"-> kicking out [\"+j+\"]: id: \"+items[0].id);\n\t\t\tconsole.log(\"e=\"+e);\n\t\t\titems.splice(0,1);\n\t\t}\n\te++;\n\t}\n\tconsole.log(\"...and now ? e=\"+e);\n\n\n\treturn _segments;\n}", "buildSchedules() {\r\n this.scheduledEvents = this.hardEvents.slice(0); //gets all hardEvents\r\n this.constraints.forEach(function(constraint) {\r\n scheduledEvents.push(constraint);\r\n })\r\n\r\n\r\n var rankedFlexEvents = this.flexEvents.sort(function(a, b) {\r\n return a.rank - b.rank;\r\n });\r\n\r\n var rootNode = new node(this.scheduledEvents);\r\n var tree = new Tree(rootNode);\r\n var lastLevelNodes = rootNode;\r\n rankedFlexEvents.forEach(function(event) {\r\n fitFlexedEvents(lastLevelNodes, tree, event);\r\n })\r\n }", "function getPositions() {\n \n var rects;\n var nRects;\n var rect;\n \n var top;\n var left;\n var width;\n var right;\n \n var textXY;\n \n var currentLine = -1;\n \n for (var i = 0; i < nSegs; i++) {\n \n rects = segs[i].getClientRects();\n nRects = rects.length;\n \n segRanges[i] = {};\n \n for (var j = 0; j < nRects; j++) {\n \n rect = rects[j];\n textXY = getTextXY(rect.left, rect.top);\n top = textXY.y - segBoxPadY;\n left = textXY.x - segBoxPadX;\n width = rect.width + segBoxPadX * 2;\n \n if (j !== nRects - 1) {\n \n width += extensionWidth;\n }\n \n right = left + width;\n \n if (isNewLine(top)) {\n \n currentLine++;\n \n lines[currentLine] = {\n top: top,\n left: left,\n width: width\n };\n \n segBoxesByLine[currentLine] = [];\n \n } else {\n \n lines[currentLine].width += width;\n }\n \n segBoxesByLine[currentLine].push({\n left: left,\n right: left + width,\n segIndex: i\n });\n \n if (j === 0) {\n \n segRanges[i].startLine = currentLine;\n segRanges[i].startLeft = left;\n }\n \n if (j === nRects - 1) {\n \n segRanges[i].endLine = currentLine;\n segRanges[i].endRight = right;\n }\n }\n }\n \n function isNewLine(top) {\n \n if (lines.length === 0 || lines[lines.length - 1].top !== top) {\n \n return true;\n }\n }\n}", "getVertexes(cb) {\n\n //returns 3 hexes associated to one vertex\n const calcVert = (i,j, dirOne, dirTwo) => {\n return cb([\n this.pieces[i][j], //first item in array is always real\n this.hashmap.getPointFromMap(new Point(this.pieces[i][j].point.x + Neighbors[dirOne].x, this.pieces[i][j].point.y + Neighbors[dirOne].y), this.pieces),\n this.hashmap.getPointFromMap(new Point(this.pieces[i][j].point.x + Neighbors[dirTwo].x, this.pieces[i][j].point.y + Neighbors[dirTwo].y), this.pieces),\n ])\n }\n\n //helper methods to find all 6 vertexes surrounding hex\n const calcTopLeft = (i, j) => calcVert(i, j, Dir.LEFT, Dir.TOP_LEFT);\n const calcTop = (i, j) => calcVert(i, j, Dir.TOP_LEFT, Dir.TOP_RIGHT);\n const calcTopRight = (i, j) => calcVert(i, j, Dir.TOP_RIGHT, Dir.RIGHT);\n const calcBottomLeft = (i, j) => calcVert(i, j, Dir.LEFT, Dir.BOTTOM_LEFT);\n const calcBottom = (i, j) => calcVert(i, j, Dir.BOTTOM_LEFT, Dir.BOTTOM_RIGHT);\n const calcBottomRight = (i, j) => calcVert(i, j, Dir.RIGHT, Dir.BOTTOM_RIGHT);\n\n let vertexes = [];\n for (let i = 1; i < this.pieces.length - 1; i++) {\n let one = [], two = [], three = [], four = []; // array to hold each row of vertexes\n\n //build two rows at a time\n //for first half of map, grab top and top left vertexes and push to array,\n //mirror that for second half of hex map\n for (let j = 1; j < this.pieces[i].length - 1; j++) {\n if (i < Math.floor(this.pieces.length / 2)) {\n one.push( calcTop(i, j) );\n two.push( calcTopLeft(i, j));\n if (j === this.pieces[i].length - 2) {\n two.push(calcTopRight(i, j)); //at last index, get the odd corner indexes\n }\n\n } else if (i === Math.floor(this.pieces.length / 2)) {\n one.push( calcTop(i, j) );\n two.push( calcTopLeft(i, j));\n three.push(calcBottomLeft(i, j));\n four.push(calcBottom(i, j));\n if (j === this.pieces[i].length - 2) {\n two.push(calcTopRight(i, j));\n three.push(calcBottomRight(i, j));\n }\n } else {\n one.push(calcBottomLeft(i, j));\n two.push(calcBottom(i, j));\n if (j === this.pieces[i].length - 2) {\n one.push(calcBottomRight(i, j));\n }\n }\n }\n vertexes.push(one, two);\n if (i === Math.floor(this.pieces.length / 2)) {\n vertexes.push(three, four);\n }\n }\n return vertexes; //this is an array of arrays of arrays\n }", "function createTraceGrid(){\n var grid = []\n for(var i = 0; i <= config.maxDimensionX; i++) {\n grid[i] = []; // fill with rows\n for(var j = 0; j <= config.maxDimensionY; j++) {\n grid[i][j] = 0; // fill with cells that are now all 0\n };\n };\n return grid;\n}", "function getSurroundingCells(cell){\r\n\t\t// ORDER: [if upward then: below; else: above], [left], [right]\r\n\t\tvar surroundingCellsPos = [\r\n\t\t\t{x: cell.x, y: cell.y + ((cell.upward) ? 1 : -1)},\r\n\t\t\t{x: cell.x - 1, y: cell.y},\r\n\t\t\t{x: cell.x + 1, y: cell.y}\r\n\t\t];\r\n\r\n\t\t// find each pos from gridData\r\n\t\t// if found then add to result list\r\n\t\tvar result = [];\r\n\t\tfor (let i=0; i < surroundingCellsPos.length; i++){\r\n\t\t\tvar pos = surroundingCellsPos[i];\r\n\t\t\t\r\n\t\t\tfor (let j=0; j < gridData.length; j++){\r\n\t\t\t\tvar c = gridData[j];\r\n\t\t\t\t// found it?\r\n\t\t\t\tif (c.x === pos.x && c.y === pos.y){\r\n\t\t\t\t\tresult.push(c);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn result;\r\n\t}", "function createSegmentsArray(subPolygon) {\n // Q1. Declare the \"segments\" multidimensional array\n segments = [];\n // Q2. Create \"points\" array consisting of anchor points comprising the subPolygon polygon\n points = [];\n for (var j = 0; j < subPolygon.pathPoints.length; j++) {\n points.push(subPolygon.pathPoints[j].anchor);\n }\n var n = points.length;\n // Q3. Append first segment\n P0 = points[n-1];\n P1 = points[0]; // First point of line segment\n P2 = points[1]; // Second point of line segment\n P3 = points[2];\n appendSegmentsArray(P0, P1, P2, P3);\n // Q4. Append middle segments\n for (var j = 1; j < n-2; j++) {\n P0 = points[j-1];\n P1 = points[j]; // First point of line segment\n P2 = points[j+1]; // Second point of line segment\n P3 = points[j+2];\n appendSegmentsArray(P0, P1, P2, P3);\n }\n // Q5. Append second to last segment\n P0 = points[n-3];\n P1 = points[n-2]; // First point of line segment\n P2 = points[n-1]; // Second point of line segment\n P3 = points[0];\n appendSegmentsArray(P0, P1, P2, P3);\n // Q6. Append last segment \n P0 = points[n-2];\n P1 = points[n-1]; // First point of line segment\n P2 = points[0]; // Second point of line segment\n P3 = points[1];\n appendSegmentsArray(P0, P1, P2, P3); \n}", "function createGrid(level) {\n let array = [];\n let levelOneArray = [\n 0, 0, 1, 1, 1, 0, 0, 0,\n 0, 0, 1, 4, 1, 0, 0, 0,\n 0, 0, 1, 3, 1, 1, 1, 1,\n 1, 1, 1, 0, 2, 3, 4, 1,\n 1, 4, 0, 3, 3, 1, 1, 1,\n 1, 1, 1, 1, 0, 1, 0, 0,\n 0, 0, 0, 1, 4, 1, 0, 0,\n 0, 0, 0, 1, 1, 1, 0, 0\n ];\n\n let levelTwoArray = [\n 1, 1, 1, 1, 1, 0, 0, 0, 0,\n 1, 0, 0, 0, 1, 0, 0, 0, 0,\n 1, 0, 3, 0, 1, 0, 1, 1, 1,\n 1, 0, 3, 2, 1, 0, 1, 4, 1,\n 1, 1, 1, 3, 1, 1, 1, 4, 1,\n 0, 1, 1, 0, 0, 0, 0, 4, 1,\n 0, 1, 0, 0, 0, 1, 0, 0, 1,\n 0, 1, 0, 0, 0, 1, 1, 1, 1,\n 0, 1, 1, 1, 1, 1, 0, 0, 0\n ];\n\n //Depending on the level, set the grid height for splicing into 2D array\n if (level == 1) {\n gridWidth = 8;\n\n\n } else if (level == 2) {\n //Level 2\n gridWidth = 9;\n }\n\n\n //Push contents of level 1 into 2D array\n if (level == 1) {\n while (levelOneArray.length) {\n //This will create an array of arrays, using the gridWidth to determine max index of each sub-array\n array.push(levelOneArray.splice(0, gridWidth));\n }\n } else if (level == 2) {\n while (levelTwoArray.length) {\n array.push(levelTwoArray.splice(0, gridWidth));\n }\n }\n\n return array;\n}", "splitEvents(){\n const { events } = this.props;\n const { days } = this.state;\n const sortedEvents = events.sort((firstEvent, secondEvent) => {\n const firstStartDate = moment(firstEvent.startDate);\n const secondStartDate = moment(secondEvent.startDate);\n\n if(firstStartDate.isBefore(secondStartDate)) {\n return -1;\n } else if (firstStartDate.isSame(secondStartDate)) {\n return 0;\n } else {\n return 1;\n }\n });\n\n // what if the dates are out of range?\n // i should be able to query the dates out of the BE\n // for now we can assume within range\n const result = [...Array(7)].map(el => new Array());\n sortedEvents.forEach((event) => {\n const startDate = moment(event.startDate);\n\n days.forEach((day, idx) => {\n if(startDate.isBetween(day.startMoment, day.endMoment)) {\n result[idx].push(event);\n }\n });\n });\n\n return result;\n }", "getMoveStack() {\n const moveStack = [this.endIdx];\n for (let idx = this.endIdx; idx !== this.startIdx; idx = this.predArr[idx]) {\n if (this.predArr[idx] !== this.startIdx) {\n moveStack.unshift(this.predArr[idx]);\n }\n }\n return moveStack;\n }", "function buildOffsetArray(chords) {\n var offsetArray = [0];\n chords.forEach(function (chord, i) {\n var prevElement = chords[i - 1];\n if (prevElement) {\n var actualLineNumber = parseInt(chord.lineNumber);\n var previousLineNumber = parseInt(prevElement.lineNumber);\n var lastOffset = offsetArray[offsetArray.length - 1]\n if (previousLineNumber - actualLineNumber >= -1) offsetArray.push(lastOffset);\n else offsetArray.push(previousLineNumber - actualLineNumber + 1 + lastOffset);\n }\n });\n return offsetArray;\n }", "calculateRange() {\n if (!this.grid || !this.grid[0]) {\n return\n }\n let rows = this.grid.length\n let cols = this.grid[0].length\n // const vectors = [];\n let min\n let max\n // @from: https://stackoverflow.com/questions/13544476/how-to-find-max-and-min-in-array-using-minimum-comparisons\n for (let j = 0; j < rows; j++) {\n for (let i = 0; i < cols; i++) {\n let vec = this.grid[j][i]\n if (vec !== null) {\n let val = vec.m || vec.magnitude()\n // vectors.push();\n if (min === undefined) {\n min = val\n } else if (max === undefined) {\n max = val\n // update min max\n // 1. Pick 2 elements(a, b), compare them. (say a > b)\n min = Math.min(min, max)\n max = Math.max(min, max)\n } else {\n // 2. Update min by comparing (min, b)\n // 3. Update max by comparing (max, a)\n min = Math.min(val, min)\n max = Math.max(val, max)\n }\n }\n }\n }\n return [min, max]\n }", "function rangeToSegments(start, end) {\n\n\t\tvar rowCnt = t.getRowCnt();\n\t\tvar colCnt = t.getColCnt();\n\t\tvar segments = []; // array of segments to return\n\n\t\t// day offset for given date range\n\t\tvar rangeDayOffsetStart = dateToDayOffset(start);\n\t\tvar rangeDayOffsetEnd = dateToDayOffset(end); // an exclusive value\n\t\tvar endTimeMS = +end.time();\n\t\tif (endTimeMS && endTimeMS >= nextDayThreshold) {\n\t\t\trangeDayOffsetEnd++;\n\t\t}\n\t\trangeDayOffsetEnd = Math.max(rangeDayOffsetEnd, rangeDayOffsetStart + 1);\n\n\t\t// first and last cell offset for the given date range\n\t\t// \"last\" implies inclusivity\n\t\tvar rangeCellOffsetFirst = dayOffsetToCellOffset(rangeDayOffsetStart);\n\t\tvar rangeCellOffsetLast = dayOffsetToCellOffset(rangeDayOffsetEnd) - 1;\n\n\t\t// loop through all the rows in the view\n\t\tfor (var row=0; row<rowCnt; row++) {\n\n\t\t\t// first and last cell offset for the row\n\t\t\tvar rowCellOffsetFirst = row * colCnt;\n\t\t\tvar rowCellOffsetLast = rowCellOffsetFirst + colCnt - 1;\n\n\t\t\t// get the segment's cell offsets by constraining the range's cell offsets to the bounds of the row\n\t\t\tvar segmentCellOffsetFirst = Math.max(rangeCellOffsetFirst, rowCellOffsetFirst);\n\t\t\tvar segmentCellOffsetLast = Math.min(rangeCellOffsetLast, rowCellOffsetLast);\n\n\t\t\t// make sure segment's offsets are valid and in view\n\t\t\tif (segmentCellOffsetFirst <= segmentCellOffsetLast) {\n\n\t\t\t\t// translate to cells\n\t\t\t\tvar segmentCellFirst = cellOffsetToCell(segmentCellOffsetFirst);\n\t\t\t\tvar segmentCellLast = cellOffsetToCell(segmentCellOffsetLast);\n\n\t\t\t\t// view might be RTL, so order by leftmost column\n\t\t\t\tvar cols = [ segmentCellFirst.col, segmentCellLast.col ].sort();\n\n\t\t\t\t// Determine if segment's first/last cell is the beginning/end of the date range.\n\t\t\t\t// We need to compare \"day offset\" because \"cell offsets\" are often ambiguous and\n\t\t\t\t// can translate to multiple days, and an edge case reveals itself when we the\n\t\t\t\t// range's first cell is hidden (we don't want isStart to be true).\n\t\t\t\tvar isStart = cellOffsetToDayOffset(segmentCellOffsetFirst) == rangeDayOffsetStart;\n\t\t\t\tvar isEnd = cellOffsetToDayOffset(segmentCellOffsetLast) + 1 == rangeDayOffsetEnd; // +1 for comparing exclusively\n\n\t\t\t\tsegments.push({\n\t\t\t\t\trow: row,\n\t\t\t\t\tleftCol: cols[0],\n\t\t\t\t\trightCol: cols[1],\n\t\t\t\t\tisStart: isStart,\n\t\t\t\t\tisEnd: isEnd\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\n\t\treturn segments;\n\t}", "function rangeToSegments(start, end) {\n\n\t\tvar rowCnt = t.getRowCnt();\n\t\tvar colCnt = t.getColCnt();\n\t\tvar segments = []; // array of segments to return\n\n\t\t// day offset for given date range\n\t\tvar rangeDayOffsetStart = dateToDayOffset(start);\n\t\tvar rangeDayOffsetEnd = dateToDayOffset(end); // an exclusive value\n\t\tvar endTimeMS = +end.time();\n\t\tif (endTimeMS && endTimeMS >= nextDayThreshold) {\n\t\t\trangeDayOffsetEnd++;\n\t\t}\n\t\trangeDayOffsetEnd = Math.max(rangeDayOffsetEnd, rangeDayOffsetStart + 1);\n\n\t\t// first and last cell offset for the given date range\n\t\t// \"last\" implies inclusivity\n\t\tvar rangeCellOffsetFirst = dayOffsetToCellOffset(rangeDayOffsetStart);\n\t\tvar rangeCellOffsetLast = dayOffsetToCellOffset(rangeDayOffsetEnd) - 1;\n\n\t\t// loop through all the rows in the view\n\t\tfor (var row=0; row<rowCnt; row++) {\n\n\t\t\t// first and last cell offset for the row\n\t\t\tvar rowCellOffsetFirst = row * colCnt;\n\t\t\tvar rowCellOffsetLast = rowCellOffsetFirst + colCnt - 1;\n\n\t\t\t// get the segment's cell offsets by constraining the range's cell offsets to the bounds of the row\n\t\t\tvar segmentCellOffsetFirst = Math.max(rangeCellOffsetFirst, rowCellOffsetFirst);\n\t\t\tvar segmentCellOffsetLast = Math.min(rangeCellOffsetLast, rowCellOffsetLast);\n\n\t\t\t// make sure segment's offsets are valid and in view\n\t\t\tif (segmentCellOffsetFirst <= segmentCellOffsetLast) {\n\n\t\t\t\t// translate to cells\n\t\t\t\tvar segmentCellFirst = cellOffsetToCell(segmentCellOffsetFirst);\n\t\t\t\tvar segmentCellLast = cellOffsetToCell(segmentCellOffsetLast);\n\n\t\t\t\t// view might be RTL, so order by leftmost column\n\t\t\t\tvar cols = [ segmentCellFirst.col, segmentCellLast.col ].sort();\n\n\t\t\t\t// Determine if segment's first/last cell is the beginning/end of the date range.\n\t\t\t\t// We need to compare \"day offset\" because \"cell offsets\" are often ambiguous and\n\t\t\t\t// can translate to multiple days, and an edge case reveals itself when we the\n\t\t\t\t// range's first cell is hidden (we don't want isStart to be true).\n\t\t\t\tvar isStart = cellOffsetToDayOffset(segmentCellOffsetFirst) == rangeDayOffsetStart;\n\t\t\t\tvar isEnd = cellOffsetToDayOffset(segmentCellOffsetLast) + 1 == rangeDayOffsetEnd; // +1 for comparing exclusively\n\n\t\t\t\tsegments.push({\n\t\t\t\t\trow: row,\n\t\t\t\t\tleftCol: cols[0],\n\t\t\t\t\trightCol: cols[1],\n\t\t\t\t\tisStart: isStart,\n\t\t\t\t\tisEnd: isEnd\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\n\t\treturn segments;\n\t}", "function rangeToSegments(startDate, endDate) {\n\t\tvar rowCnt = t.getRowCnt();\n\t\tvar colCnt = t.getColCnt();\n\t\tvar segments = []; // array of segments to return\n\n\t\t// day offset for given date range\n\t\tvar rangeDayOffsetStart = dateToDayOffset(startDate);\n\t\tvar rangeDayOffsetEnd = dateToDayOffset(endDate); // exclusive\n\n\t\t// first and last cell offset for the given date range\n\t\t// \"last\" implies inclusivity\n\t\tvar rangeCellOffsetFirst = dayOffsetToCellOffset(rangeDayOffsetStart);\n\t\tvar rangeCellOffsetLast = dayOffsetToCellOffset(rangeDayOffsetEnd) - 1;\n\n\t\t// loop through all the rows in the view\n\t\tfor (var row=0; row<rowCnt; row++) {\n\n\t\t\t// first and last cell offset for the row\n\t\t\tvar rowCellOffsetFirst = row * colCnt;\n\t\t\tvar rowCellOffsetLast = rowCellOffsetFirst + colCnt - 1;\n\n\t\t\t// get the segment's cell offsets by constraining the range's cell offsets to the bounds of the row\n\t\t\tvar segmentCellOffsetFirst = Math.max(rangeCellOffsetFirst, rowCellOffsetFirst);\n\t\t\tvar segmentCellOffsetLast = Math.min(rangeCellOffsetLast, rowCellOffsetLast);\n\n\t\t\t// make sure segment's offsets are valid and in view\n\t\t\tif (segmentCellOffsetFirst <= segmentCellOffsetLast) {\n\n\t\t\t\t// translate to cells\n\t\t\t\tvar segmentCellFirst = cellOffsetToCell(segmentCellOffsetFirst);\n\t\t\t\tvar segmentCellLast = cellOffsetToCell(segmentCellOffsetLast);\n\n\t\t\t\t// view might be RTL, so order by leftmost column\n\t\t\t\tvar cols = [ segmentCellFirst.col, segmentCellLast.col ].sort();\n\n\t\t\t\t// Determine if segment's first/last cell is the beginning/end of the date range.\n\t\t\t\t// We need to compare \"day offset\" because \"cell offsets\" are often ambiguous and\n\t\t\t\t// can translate to multiple days, and an edge case reveals itself when we the\n\t\t\t\t// range's first cell is hidden (we don't want isStart to be true).\n\t\t\t\tvar isStart = cellOffsetToDayOffset(segmentCellOffsetFirst) == rangeDayOffsetStart;\n\t\t\t\tvar isEnd = cellOffsetToDayOffset(segmentCellOffsetLast) + 1 == rangeDayOffsetEnd; // +1 for comparing exclusively\n\n\t\t\t\tsegments.push({\n\t\t\t\t\trow: row,\n\t\t\t\t\tleftCol: cols[0],\n\t\t\t\t\trightCol: cols[1],\n\t\t\t\t\tisStart: isStart,\n\t\t\t\t\tisEnd: isEnd\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\n\t\treturn segments;\n\t}", "function rangeToSegments(startDate, endDate) {\n\t\tvar rowCnt = t.getRowCnt();\n\t\tvar colCnt = t.getColCnt();\n\t\tvar segments = []; // array of segments to return\n\n\t\t// day offset for given date range\n\t\tvar rangeDayOffsetStart = dateToDayOffset(startDate);\n\t\tvar rangeDayOffsetEnd = dateToDayOffset(endDate); // exclusive\n\n\t\t// first and last cell offset for the given date range\n\t\t// \"last\" implies inclusivity\n\t\tvar rangeCellOffsetFirst = dayOffsetToCellOffset(rangeDayOffsetStart);\n\t\tvar rangeCellOffsetLast = dayOffsetToCellOffset(rangeDayOffsetEnd) - 1;\n\n\t\t// loop through all the rows in the view\n\t\tfor (var row=0; row<rowCnt; row++) {\n\n\t\t\t// first and last cell offset for the row\n\t\t\tvar rowCellOffsetFirst = row * colCnt;\n\t\t\tvar rowCellOffsetLast = rowCellOffsetFirst + colCnt - 1;\n\n\t\t\t// get the segment's cell offsets by constraining the range's cell offsets to the bounds of the row\n\t\t\tvar segmentCellOffsetFirst = Math.max(rangeCellOffsetFirst, rowCellOffsetFirst);\n\t\t\tvar segmentCellOffsetLast = Math.min(rangeCellOffsetLast, rowCellOffsetLast);\n\n\t\t\t// make sure segment's offsets are valid and in view\n\t\t\tif (segmentCellOffsetFirst <= segmentCellOffsetLast) {\n\n\t\t\t\t// translate to cells\n\t\t\t\tvar segmentCellFirst = cellOffsetToCell(segmentCellOffsetFirst);\n\t\t\t\tvar segmentCellLast = cellOffsetToCell(segmentCellOffsetLast);\n\n\t\t\t\t// view might be RTL, so order by leftmost column\n\t\t\t\tvar cols = [ segmentCellFirst.col, segmentCellLast.col ].sort();\n\n\t\t\t\t// Determine if segment's first/last cell is the beginning/end of the date range.\n\t\t\t\t// We need to compare \"day offset\" because \"cell offsets\" are often ambiguous and\n\t\t\t\t// can translate to multiple days, and an edge case reveals itself when we the\n\t\t\t\t// range's first cell is hidden (we don't want isStart to be true).\n\t\t\t\tvar isStart = cellOffsetToDayOffset(segmentCellOffsetFirst) == rangeDayOffsetStart;\n\t\t\t\tvar isEnd = cellOffsetToDayOffset(segmentCellOffsetLast) + 1 == rangeDayOffsetEnd; // +1 for comparing exclusively\n\n\t\t\t\tsegments.push({\n\t\t\t\t\trow: row,\n\t\t\t\t\tleftCol: cols[0],\n\t\t\t\t\trightCol: cols[1],\n\t\t\t\t\tisStart: isStart,\n\t\t\t\t\tisEnd: isEnd\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\n\t\treturn segments;\n\t}", "function rangeToSegments(startDate, endDate) {\n\t\tvar rowCnt = t.getRowCnt();\n\t\tvar colCnt = t.getColCnt();\n\t\tvar segments = []; // array of segments to return\n\n\t\t// day offset for given date range\n\t\tvar rangeDayOffsetStart = dateToDayOffset(startDate);\n\t\tvar rangeDayOffsetEnd = dateToDayOffset(endDate); // exclusive\n\n\t\t// first and last cell offset for the given date range\n\t\t// \"last\" implies inclusivity\n\t\tvar rangeCellOffsetFirst = dayOffsetToCellOffset(rangeDayOffsetStart);\n\t\tvar rangeCellOffsetLast = dayOffsetToCellOffset(rangeDayOffsetEnd) - 1;\n\n\t\t// loop through all the rows in the view\n\t\tfor (var row=0; row<rowCnt; row++) {\n\n\t\t\t// first and last cell offset for the row\n\t\t\tvar rowCellOffsetFirst = row * colCnt;\n\t\t\tvar rowCellOffsetLast = rowCellOffsetFirst + colCnt - 1;\n\n\t\t\t// get the segment's cell offsets by constraining the range's cell offsets to the bounds of the row\n\t\t\tvar segmentCellOffsetFirst = Math.max(rangeCellOffsetFirst, rowCellOffsetFirst);\n\t\t\tvar segmentCellOffsetLast = Math.min(rangeCellOffsetLast, rowCellOffsetLast);\n\n\t\t\t// make sure segment's offsets are valid and in view\n\t\t\tif (segmentCellOffsetFirst <= segmentCellOffsetLast) {\n\n\t\t\t\t// translate to cells\n\t\t\t\tvar segmentCellFirst = cellOffsetToCell(segmentCellOffsetFirst);\n\t\t\t\tvar segmentCellLast = cellOffsetToCell(segmentCellOffsetLast);\n\n\t\t\t\t// view might be RTL, so order by leftmost column\n\t\t\t\tvar cols = [ segmentCellFirst.col, segmentCellLast.col ].sort();\n\n\t\t\t\t// Determine if segment's first/last cell is the beginning/end of the date range.\n\t\t\t\t// We need to compare \"day offset\" because \"cell offsets\" are often ambiguous and\n\t\t\t\t// can translate to multiple days, and an edge case reveals itself when we the\n\t\t\t\t// range's first cell is hidden (we don't want isStart to be true).\n\t\t\t\tvar isStart = cellOffsetToDayOffset(segmentCellOffsetFirst) == rangeDayOffsetStart;\n\t\t\t\tvar isEnd = cellOffsetToDayOffset(segmentCellOffsetLast) + 1 == rangeDayOffsetEnd; // +1 for comparing exclusively\n\n\t\t\t\tsegments.push({\n\t\t\t\t\trow: row,\n\t\t\t\t\tleftCol: cols[0],\n\t\t\t\t\trightCol: cols[1],\n\t\t\t\t\tisStart: isStart,\n\t\t\t\t\tisEnd: isEnd\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\n\t\treturn segments;\n\t}", "generateCoordinates() {\n this.indexToCoords = [];\n this.coordsToIndex = {};\n let maxVal = this.maxPerRow - 1;\n for (var y = 0; y < this.maxPerRow; y++) {\n let row = this.rows[y];\n for (var x = 0; x < row.width; x++) {\n this.coordsToIndex[(x + row.offset) + ',' + y] = this.indexToCoords.length;\n let coord = {\n x: x + row.offset,\n y: y,\n edge: x == 0 || y == 0 || x == (row.width - 1) || y == maxVal\n }\n this.indexToCoords.push(coord);\n }\n }\n }", "function buildGraphArray(){\n\t\t//Our grid is read in the oppirite order we built it\n\t\tfor(var h = 0; h < GAME.board.height; h++){\n\t\t\tGAME.boardGraphArray[h] = [];\n\t\t\tfor(var w = 0; w < GAME.board.width; w++){\t\n\t\t\t\tif (GAME.board.tiles[h][w].element.firstChild || ! GAME.board.tiles[h][w].passable) {\n\t\t\t\t\t//not passable\n\t\t\t\t\tGAME.boardGraphArray[h][w] = 0;\n\t\t\t\t}else{\n\t\t\t\t\t//passable\n\t\t\t\t\tGAME.boardGraphArray[h][w] = 1;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "buildHeap(array) {\n const firstParentIdx = Math.floor((array.length - 2) / 2);\n for (let currentIdx = firstParentIdx; currentIdx >= 0; currentIdx--) {\n this.siftDown(currentIdx, array.length - 1, array);\n }\n return array;\n }", "function add_segments() {\r\n for (let i = 0; i < new_segments; i++) {\r\n the_snake_square_on_the_grid_board_game.push({\r\n ...the_snake_square_on_the_grid_board_game[the_snake_square_on_the_grid_board_game.length - 1]\r\n });\r\n }\r\n\r\n new_segments = 0;\r\n}", "get excludeCollinear(){\n\t\tlet list = this.segList2D;\n\t\tlet newlist = [];\n\t\tfor (let i=0; i<list.length; i++){\n\t\t\tlet thisseg = list[i];\n\t\t\tlet x0 = thisseg.a[0];\n\t\t\tlet y0 = thisseg.a[1];\n\t\t\tlet x1 = thisseg.b[0];\n\t\t\tlet y1 = thisseg.b[1];\n\t\t\tlet nextseg\n\t\t\tif (i === list.length-1){\n\t\t\t\tnextseg = list[0];\n\t\t\t}\n\t\t\telse{\n\t\t\t\tnextseg = list[i+1];\n\t\t\t}\n\t\t\tlet a0 = nextseg.a[0];\n\t\t\tlet b0 = nextseg.a[1];\n\t\t\tlet a1 = nextseg.b[0];\n\t\t\tlet b1 = nextseg.b[1];\n\t\t\tlet xy = Math.round((y1-y0)/(x1-x0)*1000000)/1000000;\n\t\t\tlet ab = Math.round((b1-b0)/(a1-a0)*1000000)/1000000;\n\t\t\tif (xy !== ab){\n\t\t\t\tnewlist.push(thisseg);\n\t\t\t}\n\t\t\telse{\n\t\t\t\tif (i===list.length-1){\n\t\t\t\t\tnewlist.shift();\n\t\t\t\t}\n\t\t\t\tnewlist.push({a:[x0,y0],b:[a1,b1]})\n\t\t\t}\n\t\t}\n\t\treturn newlist;\n\t}", "function selectSegments(numOfColumns) {\n const segments = [];\n const secondSegments = [];\n\n for(let i=0; i<numOfColumns; i++){\n segments.push(document.querySelector(`.${createColumnsName().segmentsName[i]}`));\n secondSegments.push(document.querySelector(`.${createColumnsName().secondSegmentsName[i]}`));\n }\n\n return {segments, secondSegments}\n}", "function getNearestEvents(x,y,events) {\nlet distances=[];\n//Calculate manhattan distance for each event, also get the minimum ticket IF tickets are available(since tickets can be 0)\nevents.forEach( e => distances.push( { eventNum:e.eventNum,\n coords:[e.x,e.y],\n distance:calcManhattanDistance(x,e.x,y,e.y),\n minTicket: e.tickets.length === 0 ? 'Tickets unavailable': Math.min(...e.tickets) +'$'\n })\n );\n//Sort distances and return.\ndistances.sort( (a,b) => a.distance - b.distance );\nreturn distances;\n\n}", "function prepareMines(mines, clicked) {\n return mines.map(cell => {\n const distance = Math.hypot(cell.x - clicked.x, cell.y - clicked.y);\n\n return {\n distance, cell\n };\n }).sort((a, b) => a.distance - b.distance);\n}", "closestNextRange(path, row, column) {\n let i;\n let candidate = [];\n let min;\n let min_index;\n\n for (i = 0; i < this.FocusView.length; i++) {\n if (this.FocusView[i].path === path) {\n if (this.FocusView[i].range.start.line > row) {\n let travel = this.FocusView[i].range.start.line - row;\n candidate.push({\n distance: travel,\n index: i\n });\n } else if (this.FocusView[i].range.start.line === row) {\n if (this.FocusView[i].range.start.character > column) {\n let travel =\n (this.FocusView[i].range.start.character - column) / 10;\n candidate.push({\n distance: travel,\n index: i\n });\n }\n }\n }\n }\n\n if (candidate.length > 0) {\n min = candidate[0].distance;\n min_index = candidate[0].index;\n for (i = 1; i < candidate.length; i++) {\n if (candidate[i].distance < min) {\n min = candidate[i].distance;\n min_index = candidate[i].index;\n }\n }\n return this.FocusView[min_index].range.end;\n }\n\n return null;\n }", "function generStartArr(){\n for (var i = 0; i < gI; i++) {\n gStartArr[i]=[];\n for (var j = 0; j < gJ; j++) {\n var el = getElInPos(i,j);\n if (el){\n gStartArr[i][j] = el.type;\n }else{\n if (i===0 || i===gI-1 ||j===0 || j===gJ-1) {\n gStartArr[i][j] = 'W';\n gEls.push({i:i,j:j,type:'W'})\n }else{\n gStartArr[i][j] = 'F';\n }\n }\n }\n }\n //return arr;\n}", "function spiralTraverse(array) {\n\tlet startRow = 0;\n\tlet endRow = array.length-1;\n\tlet startCol = 0;\n\tlet endCol = array[0].length-1;\n\tlet newArr = [];\n\t\n\twhile (startRow <= endRow && startCol <= endCol) {\n\t\tfor (let i = startCol; i <= endCol; i++) {\n\t\t\tnewArr.push(array[startRow][i])\n\t\t}\n\t\t\n\t\tfor (let i = startRow+1; i <= endRow; i++) {\n\t\t\tnewArr.push(array[i][endCol]);\n\t\t}\n\t\t\n\t\tfor (let i = endCol-1; i >= startCol; i--) {\n\t\t\tif (startRow === endRow) break;\n\t\t\tnewArr.push(array[endRow][i]);\n\t\t}\n\t\t\n\t\tfor (let i = endRow-1; i > startRow; i--) {\n\t\t\tif (startCol === endCol) break;\n\t\t\tnewArr.push(array[i][startCol]);\n\t\t}\n\t\t\n\t\tstartRow++;\n\t\tendRow--;\n\t\tstartCol++;\n\t\tendCol--\n\t}\n\treturn newArr\n }", "bestPlaceToStart(incomingClues) {\n\n // penalize clues that have more zeros\n function weightedClue(clue) {\n return clue ? clue : -10;\n }\n\n const sideLength = this.size;\n const lastCell = this.size * 4 - 1;\n\n const sideClues = [\n {\n direction: 'top',\n count:\n weightedClue(incomingClues[sideLength]) + weightedClue(incomingClues[sideLength + 1]) +\n weightedClue(incomingClues[lastCell - 1]) + weightedClue(incomingClues[lastCell])\n },\n {\n direction: 'bottom',\n count:\n weightedClue(incomingClues[sideLength * 2 - 2]) + weightedClue(incomingClues[sideLength * 2 - 1]) +\n weightedClue(incomingClues[sideLength * 3]) + weightedClue(incomingClues[sideLength * 3 + 1])\n },\n {\n direction: 'left',\n count:\n weightedClue(incomingClues[0]) + weightedClue(incomingClues[1]) +\n weightedClue(incomingClues[sideLength * 3 - 2]) + weightedClue(incomingClues[sideLength * 3 - 1])\n },\n {\n direction: 'right',\n count:\n weightedClue(incomingClues[sideLength - 2]) + weightedClue(incomingClues[sideLength - 1]) +\n weightedClue(incomingClues[sideLength * 2]) + weightedClue(incomingClues[sideLength * 2 + 1])\n }\n ];\n sideClues.sort((a, b) => b.count - a.count);\n const bestDirection = sideClues[0].direction;\n\n let clues;\n let c1;\n let c2;\n let c3;\n let c4;\n switch(bestDirection) {\n case 'top':\n clues = incomingClues;\n break;\n case 'bottom': // shift bottom to the first row\n c1 = incomingClues.slice(sideLength * 2, sideLength * 3).reverse();\n c2 = incomingClues.slice(sideLength, sideLength * 2).reverse();\n c3 = incomingClues.slice(0, sideLength).reverse();\n c4 = incomingClues.slice(sideLength * 3, sideLength * 4).reverse();\n clues = c1.concat(c2).concat(c3).concat(c4);\n break;\n case 'left': // shift left side to the first row\n c1 = incomingClues.slice(sideLength * 3, sideLength * 4);\n c2 = incomingClues.slice(0, sideLength * 3);\n clues = c1.concat(c2);\n break;\n case 'right': // shift right side to the first row\n c1 = incomingClues.slice(sideLength, sideLength * 4);\n c2 = incomingClues.slice(0, sideLength);\n clues = c1.concat(c2);\n break;\n }\n return { startAt: bestDirection, clues };\n }", "function getSpanGrid() {\n\tvar grid = new Array(4);\n\tgrid[0] = new Array(4);\n\tgrid[1] = new Array(4);\n\tgrid[2] = new Array(4);\n\tgrid[3] = new Array(4);\n\tvar n = 0;\n\tfor (var r = 0; r < 4 ; r++ ) {\n\t\tfor (var c = 0; c < 4 ; c++ ) {\n\t\t\tgrid[r][c] = $(\"#grid .cell\").eq(n).find(\"span\");\n\t\t\tn++;\n\t\t}\n\t}\n\treturn grid;\n}", "function computeSegVerticals(segs, dayDate, slatCoords, eventMinHeight) {\n for (var _i = 0, segs_1 = segs; _i < segs_1.length; _i++) {\n var seg = segs_1[_i];\n seg.top = slatCoords.computeDateTop(seg.start, dayDate);\n seg.bottom = Math.max(seg.top + (eventMinHeight || 0), // yuck\n slatCoords.computeDateTop(seg.end, dayDate));\n }\n }", "_GenLvlGrid() {\n // get max x & y\n let blocks = this._blocks\n if (blocks.length == 0) return []\n if (blocks.length == 1) return [blocks[0]]\n let max_x = 0\n let max_y = 0\n for (let block of blocks) {\n if (block.x > max_x)\n max_x = block.x\n if (block.y > max_y)\n max_y = block.y\n }\n // lookup block at position\n let GetBlock = (x, y) => {\n for (let block of this._blocks) {\n if (block.x == x && block.y == y)\n return block\n }\n return null\n }\n // generate grid\n this._block_grid = []\n for (let x = 0; x <= max_x; x++) {\n let column = []\n for (let y = 0; y <= max_y; y++) {\n column.push(GetBlock(x, y))\n }\n this._block_grid.push(column)\n }\n\n if (process.env.NODE_ENV === 'development') this._LogGrid()\n }", "static sortCornersByLeftness(corners_array){\n var corners_array_to_be_returned = []\n for (var i = 0; i < corners_array.length; i++){\n corners_array_to_be_returned[i] = {x:corners_array[i].x,y:corners_array[i].y}\n }\n\n var sorted = false;\n while (!sorted){\n var sort_occurred = false;\n for (var i = 0; i < corners_array_to_be_returned.length - 1; i++){\n if (corners_array_to_be_returned[i].x >corners_array_to_be_returned[i+1].x){\n Tile.switchIndices(corners_array_to_be_returned, i, i+1)\n sort_occurred = true\n }\n }\n\n if (!sort_occurred){\n sorted = true;\n }\n }\n\n return corners_array_to_be_returned;\n }", "function GetClipSegments(clip_intervals, block_size, hop_size, x_length) {\n var clip_segments = [];\n var num_clip_segments = 0;\n\n var in_segment = false;\n var start_idx = 0;\n var stop_idx = start_idx + block_size - 1;\n var block_idx = 0;\n\n var segment_start_idx = -1;\n var segment_stop_idx = -1;\n while(stop_idx < x_length) {\n // We are in a segment.\n if(in_segment) {\n // We leave the segment. Store it and move on.\n if(!AreOverlapping(clip_intervals, start_idx, stop_idx)) {\n in_segment = false;\n segment_stop_idx = block_idx - 1;\n\n var new_segment = { start:segment_start_idx , stop:segment_stop_idx };\n clip_segments[num_clip_segments] = new_segment;\n num_clip_segments++;\n\n segment_start_idx = -1;\n segment_stop_idx = -1;\n }\n }\n // We are not in a segment.\n else {\n // We have entered a segment.\n if(AreOverlapping(clip_intervals, start_idx, stop_idx)) {\n in_segment = true;\n segment_start_idx = block_idx;\n }\n }\n\n block_idx++;\n start_idx = start_idx + hop_size;\n stop_idx = start_idx + block_size - 1;\n }\n\n // If we end while in a segment, we need to leave the segment and push the segment.\n if(in_segment) {\n in_segment = false;\n segment_stop_idx = block_idx - 1;\n\n var new_segment = { start:segment_start_idx , stop:segment_stop_idx };\n clip_segments[num_clip_segments] = new_segment;\n num_clip_segments++;\n\n segment_start_idx = -1;\n segment_stop_idx = -1;\n }\n\n return clip_segments;\n }", "function tresureIsland2(grid) {\n\tif (grid == null || grid.length === 0) return false;\n\n\tlet queueStart = []; //all start points\n\tconst ROW = grid.length;\n\tconst directions = [\n\t\t[-1, 0],\n\t\t[1, 0],\n\t\t[0, 1],\n\t\t[0, -1]\n\t];\n\n\tlet min = 0;\n\n\t//fill queue with all starts\n\tgrid.forEach((row, r) => {\n\t\trow.forEach((col, c) => {\n\t\t\tif (grid[r][c] === 'S') {\n\t\t\t\tqueueStart.push([r, c]);\n\t\t\t}\n\t\t});\n\t});\n\n\twhile (queueStart.length) {\n\t\tmin++;\n\t\tlet len = queueStart.length;\n\t\tfor (let i = 0; i < len; i++) {\n\t\t\tlet [sr, sc] = queueStart.shift();\n\t\t\tfor (let [dr, dc] of directions) {\n\t\t\t\tlet r = sr + dr;\n\t\t\t\tlet c = sc + dc;\n\t\t\t\tif (r >= 0 && r < ROW && c >= 0 && c < grid[r].length) {\n\t\t\t\t\tif (grid[r][c] === 'X') {\n\t\t\t\t\t\treturn min;\n\t\t\t\t\t}\n\t\t\t\t\tif (grid[r][c] === 'O') {\n\t\t\t\t\t\tgrid[r][c] = 'D';\n\t\t\t\t\t\tqueueStart.push([r, c]);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\treturn -1;\n}", "function createRow(events) {\n //Create first row and first column with Nikki's object array\n //row stores the complete formatted events array object\n var row = {\n columns: [{\n events: [events.shift()]\n }]\n };\n\n return {\n noOverlapEvents: processEvent(events), //Pass events array which excludes Nikki's object\n row: row\n }\n\n /**\n * Method to check if an evnt is processed ie.placed in a column and track no overlapping events\n */\n function processEvent(remainingEvents) {\n var temp = []; //stores the list of items which doesnt overlap with already formed column items\n while (true) {\n //Loop current event items\n for (var i in remainingEvents) {\n var isProcessed = processRow(remainingEvents[i], row); //returns boolean if all event objects are placed in column array\n //track event item which does not overlap with exisisting row column arrays\n if (!isProcessed) {\n temp.push(remainingEvents[i]);\n }\n };\n /* RemainingEvents will now hold temp(non overlapping arrays) and the loop inspect\n continued till temp becomes empty */\n if (remainingEvents.length !== temp.length) {\n remainingEvents = temp.slice(0);\n temp = [];\n } else {\n break; //If no element exists in remainingEvents array\n }\n }\n return temp;\n }\n}", "function makeGrid(){\n\t\tvar startX = 149;\n\t\tvar startY = 119;\n\t\tvar interval = 6;\n\t\tvar nodeArray = [];\n\t\tfor (var i=0; i<660; i+=interval){\n\t\t\tfor (var j=0; j<660; j+=interval){\n\t\t\t\tnodeArray.push({x:startX+i,y:startY+j,city:null});\n\t\t\t}\n\t\t}\n\t\treturn nodeArray;\n\t}", "function iron_grid(grid){\n var ironed_grid = grid.slice();\n var len = ironed_grid.length;\n // If the non descending rule is broken, shift the blocks to the center\n for(var i = len - 1; i > 0; i--){\n if(ironed_grid[i] > ironed_grid[i-1]){\n // Take the blocks breaking the rule\n var diff = ironed_grid[i] - ironed_grid[i-1];\n ironed_grid[i] -= diff;\n // Shift them to the center\n if (i != 1){\n ironed_grid[i-1] += diff;\n } else {\n ironed_grid[0] += 2*diff;\n }\n }\n }\n\n return ironed_grid;\n}", "function placeRects(allRects, segs, cells) {\n let rectsByEachCol = groupRectsByEachCol(allRects, cells.length);\n let singleColPlacements = [];\n let multiColPlacements = [];\n let leftoverMargins = [];\n for (let col = 0; col < cells.length; col += 1) {\n let rects = rectsByEachCol[col];\n // compute all static segs in singlePlacements\n let singlePlacements = [];\n let currentHeight = 0;\n let currentMarginTop = 0;\n for (let rect of rects) {\n let seg = segs[rect.index];\n singlePlacements.push({\n seg: resliceSeg(seg, col, col + 1, cells),\n isVisible: true,\n isAbsolute: false,\n absoluteTop: rect.levelCoord,\n marginTop: rect.levelCoord - currentHeight,\n });\n currentHeight = rect.levelCoord + rect.thickness;\n }\n // compute mixed static/absolute segs in multiPlacements\n let multiPlacements = [];\n currentHeight = 0;\n currentMarginTop = 0;\n for (let rect of rects) {\n let seg = segs[rect.index];\n let isAbsolute = rect.span.end - rect.span.start > 1; // multi-column?\n let isFirstCol = rect.span.start === col;\n currentMarginTop += rect.levelCoord - currentHeight; // amount of space since bottom of previous seg\n currentHeight = rect.levelCoord + rect.thickness; // height will now be bottom of current seg\n if (isAbsolute) {\n currentMarginTop += rect.thickness;\n if (isFirstCol) {\n multiPlacements.push({\n seg: resliceSeg(seg, rect.span.start, rect.span.end, cells),\n isVisible: true,\n isAbsolute: true,\n absoluteTop: rect.levelCoord,\n marginTop: 0,\n });\n }\n }\n else if (isFirstCol) {\n multiPlacements.push({\n seg: resliceSeg(seg, rect.span.start, rect.span.end, cells),\n isVisible: true,\n isAbsolute: false,\n absoluteTop: rect.levelCoord,\n marginTop: currentMarginTop, // claim the margin\n });\n currentMarginTop = 0;\n }\n }\n singleColPlacements.push(singlePlacements);\n multiColPlacements.push(multiPlacements);\n leftoverMargins.push(currentMarginTop);\n }\n return { singleColPlacements, multiColPlacements, leftoverMargins };\n }", "function SquareGrid(gridLines) {\n var _vertexDistance;\n var _ordered;\n var _edges;\n var _cavities;\n var _matrix;\n var _gridLines;\n\n _gridLines = gridLines;\n setupGrid();\n findEdges();\n findCavities();\n \n function setupGrid() {\n var ordered = [];\n _gridLines.forEach(function (line, i) {\n line.split('').forEach(function (char) {\n ordered.push(parseInt(char));\n });\n });\n _vertexDistance = _gridLines[0].length;\n _ordered = ordered;\n\n var matrix = [];\n for (var x=0; x<_vertexDistance; x++) {\n var line = [];\n for (var y=0; y<_vertexDistance; y++) {\n line.push(_ordered[x * _vertexDistance + y]);\n }\n matrix.push(line);\n }\n _matrix = matrix;\n }\n\n function printGrid() {\n var strGrid = [];\n for (var i=0; i<_vertexDistance; i++) {\n var line = '';\n for (var j=0; j<_vertexDistance; j++) {\n var n = i * _vertexDistance + j;\n if (!isEdge(n) && isCavity(i, j)) {\n line += 'X';\n } else {\n line += _ordered[n];\n }\n }\n strGrid.push(line);\n }\n console.log(strGrid.join('\\n'));\n }\n\n function findEdges() {\n var edges = [];\n _ordered.forEach(function (num, n) {\n if (n < _vertexDistance) edges.push(n); // top\n if (n / _vertexDistance >= (_vertexDistance - 1)) edges.push(n); // bottom\n if (!(n % _vertexDistance)) edges.push(n - 1, n); // sides\n });\n _edges = edges;\n }\n\n function findCavities() {\n var cavities = [];\n for (var i=0; i<_vertexDistance; i++) {\n for (var j=0; j<_vertexDistance; j++) {\n var n = i * _vertexDistance + j;\n if (!isEdge(n)) {\n if (isCavity(i, j)) cavities.push(n);\n }\n }\n }\n _cavities = cavities;\n }\n\n function isCavity(i, j) {\n var surrounds = [];\n surrounds.push(\n _matrix[i][j-1],\n _matrix[i][j+1],\n _matrix[i-1][j],\n _matrix[i+1][j]\n );\n\n var valueAtN = _matrix[i][j];\n return Math.max.apply(0xDEADBEEF, surrounds) < valueAtN;\n }\n\n function isEdge(n) {\n return (_edges.indexOf(n) !== -1);\n }\n\n return {\n printGrid: printGrid\n };\n}", "function buildAdjacentCoordinates(previousAttackCoordinates, filterCoordinates){\n\n // try horizontal first\n const filtered = previousAttackCoordinates.filter(function(index) {\n return !filterCoordinates || !filterCoordinates.includes(index)\n })\n\n const pivotIndexCoord = getIndexFromXYCoordinates(filtered[0])\n\n const horizontal = filtered.filter(function(index){\n return getIndexFromXYCoordinates(index)[1] === pivotIndexCoord[1]\n })\n\n if (horizontal.length > 1){\n horizontal.sort(function(a,b){\n return a - b\n })\n return horizontal\n }\n\n const vertical = filtered.filter(function(index) {\n return getIndexFromXYCoordinates(index)[0] === pivotIndexCoord[0]\n })\n\n if (vertical.length > 1){\n vertical.sort(function(a,b) {\n return a - b\n })\n return vertical\n }\n\n return filtered.length === 1 ? filtered : []\n\n}", "function calculateBoundsFromNestedArrays (array) {\n var x1 = null, x2 = null, y1 = null, y2 = null;\n\n for (var i = 0; i < array.length; i++) {\n var inner = array[i];\n\n for (var j = 0; j < inner.length; j++) {\n var lonlat = inner[j];\n\n var lon = lonlat[0];\n var lat = lonlat[1];\n\n if (x1 === null) {\n x1 = lon;\n } else if (lon < x1) {\n x1 = lon;\n }\n\n if (x2 === null) {\n x2 = lon;\n } else if (lon > x2) {\n x2 = lon;\n }\n\n if (y1 === null) {\n y1 = lat;\n } else if (lat < y1) {\n y1 = lat;\n }\n\n if (y2 === null) {\n y2 = lat;\n } else if (lat > y2) {\n y2 = lat;\n }\n }\n }\n\n return [x1, y1, x2, y2 ];\n }", "function calculateBoundsFromNestedArrays (array) {\n var x1 = null, x2 = null, y1 = null, y2 = null;\n\n for (var i = 0; i < array.length; i++) {\n var inner = array[i];\n\n for (var j = 0; j < inner.length; j++) {\n var lonlat = inner[j];\n\n var lon = lonlat[0];\n var lat = lonlat[1];\n\n if (x1 === null) {\n x1 = lon;\n } else if (lon < x1) {\n x1 = lon;\n }\n\n if (x2 === null) {\n x2 = lon;\n } else if (lon > x2) {\n x2 = lon;\n }\n\n if (y1 === null) {\n y1 = lat;\n } else if (lat < y1) {\n y1 = lat;\n }\n\n if (y2 === null) {\n y2 = lat;\n } else if (lat > y2) {\n y2 = lat;\n }\n }\n }\n\n return [x1, y1, x2, y2 ];\n }", "function calculateBoundsFromNestedArrays (array) {\n var x1 = null, x2 = null, y1 = null, y2 = null;\n\n for (var i = 0; i < array.length; i++) {\n var inner = array[i];\n\n for (var j = 0; j < inner.length; j++) {\n var lonlat = inner[j];\n\n var lon = lonlat[0];\n var lat = lonlat[1];\n\n if (x1 === null) {\n x1 = lon;\n } else if (lon < x1) {\n x1 = lon;\n }\n\n if (x2 === null) {\n x2 = lon;\n } else if (lon > x2) {\n x2 = lon;\n }\n\n if (y1 === null) {\n y1 = lat;\n } else if (lat < y1) {\n y1 = lat;\n }\n\n if (y2 === null) {\n y2 = lat;\n } else if (lat > y2) {\n y2 = lat;\n }\n }\n }\n\n return [x1, y1, x2, y2 ];\n }", "function calculateVerticals(segments) {\n\t\tvar rowCnt = getRowCnt();\n\t\tvar colCnt = getColCnt();\n\t\tvar rowContentHeights = []; // content height for each row\n\t\tvar segmentRows = buildSegmentRows(segments); // an array of segment arrays, one for each row\n\n\t\tfor (var rowI=0; rowI<rowCnt; rowI++) {\n\t\t\tvar segmentRow = segmentRows[rowI];\n\n\t\t\t// an array of running total heights for each column.\n\t\t\t// initialize with all zeros.\n\t\t\tvar colHeights = [];\n\t\t\tfor (var colI=0; colI<colCnt; colI++) {\n\t\t\t\tcolHeights.push(0);\n\t\t\t}\n\n\t\t\t// loop through every segment\n\t\t\tfor (var segmentI=0; segmentI<segmentRow.length; segmentI++) {\n\t\t\t\tvar segment = segmentRow[segmentI];\n\n\t\t\t\t// find the segment's top coordinate by looking at the max height\n\t\t\t\t// of all the columns the segment will be in.\n\t\t\t\tsegment.top = arrayMax(\n\t\t\t\t\tcolHeights.slice(\n\t\t\t\t\t\tsegment.leftCol,\n\t\t\t\t\t\tsegment.rightCol + 1 // make exclusive for slice\n\t\t\t\t\t)\n\t\t\t\t);\n\n\t\t\t\t// adjust the columns to account for the segment's height\n\t\t\t\tfor (var colI=segment.leftCol; colI<=segment.rightCol; colI++) {\n\t\t\t\t\tcolHeights[colI] = segment.top + segment.outerHeight;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// the tallest column in the row should be the \"content height\"\n\t\t\trowContentHeights.push(arrayMax(colHeights));\n\t\t}\n\n\t\treturn rowContentHeights;\n\t}", "function calculateVerticals(segments) {\n\t\tvar rowCnt = getRowCnt();\n\t\tvar colCnt = getColCnt();\n\t\tvar rowContentHeights = []; // content height for each row\n\t\tvar segmentRows = buildSegmentRows(segments); // an array of segment arrays, one for each row\n\n\t\tfor (var rowI=0; rowI<rowCnt; rowI++) {\n\t\t\tvar segmentRow = segmentRows[rowI];\n\n\t\t\t// an array of running total heights for each column.\n\t\t\t// initialize with all zeros.\n\t\t\tvar colHeights = [];\n\t\t\tfor (var colI=0; colI<colCnt; colI++) {\n\t\t\t\tcolHeights.push(0);\n\t\t\t}\n\n\t\t\t// loop through every segment\n\t\t\tfor (var segmentI=0; segmentI<segmentRow.length; segmentI++) {\n\t\t\t\tvar segment = segmentRow[segmentI];\n\n\t\t\t\t// find the segment's top coordinate by looking at the max height\n\t\t\t\t// of all the columns the segment will be in.\n\t\t\t\tsegment.top = arrayMax(\n\t\t\t\t\tcolHeights.slice(\n\t\t\t\t\t\tsegment.leftCol,\n\t\t\t\t\t\tsegment.rightCol + 1 // make exclusive for slice\n\t\t\t\t\t)\n\t\t\t\t);\n\n\t\t\t\t// adjust the columns to account for the segment's height\n\t\t\t\tfor (var colI=segment.leftCol; colI<=segment.rightCol; colI++) {\n\t\t\t\t\tcolHeights[colI] = segment.top + segment.outerHeight;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// the tallest column in the row should be the \"content height\"\n\t\t\trowContentHeights.push(arrayMax(colHeights));\n\t\t}\n\n\t\treturn rowContentHeights;\n\t}", "function calculateVerticals(segments) {\n\t\tvar rowCnt = getRowCnt();\n\t\tvar colCnt = getColCnt();\n\t\tvar rowContentHeights = []; // content height for each row\n\t\tvar segmentRows = buildSegmentRows(segments); // an array of segment arrays, one for each row\n\n\t\tfor (var rowI=0; rowI<rowCnt; rowI++) {\n\t\t\tvar segmentRow = segmentRows[rowI];\n\n\t\t\t// an array of running total heights for each column.\n\t\t\t// initialize with all zeros.\n\t\t\tvar colHeights = [];\n\t\t\tfor (var colI=0; colI<colCnt; colI++) {\n\t\t\t\tcolHeights.push(0);\n\t\t\t}\n\n\t\t\t// loop through every segment\n\t\t\tfor (var segmentI=0; segmentI<segmentRow.length; segmentI++) {\n\t\t\t\tvar segment = segmentRow[segmentI];\n\n\t\t\t\t// find the segment's top coordinate by looking at the max height\n\t\t\t\t// of all the columns the segment will be in.\n\t\t\t\tsegment.top = arrayMax(\n\t\t\t\t\tcolHeights.slice(\n\t\t\t\t\t\tsegment.leftCol,\n\t\t\t\t\t\tsegment.rightCol + 1 // make exclusive for slice\n\t\t\t\t\t)\n\t\t\t\t);\n\n\t\t\t\t// adjust the columns to account for the segment's height\n\t\t\t\tfor (var colI=segment.leftCol; colI<=segment.rightCol; colI++) {\n\t\t\t\t\tcolHeights[colI] = segment.top + segment.outerHeight;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// the tallest column in the row should be the \"content height\"\n\t\t\trowContentHeights.push(arrayMax(colHeights));\n\t\t}\n\n\t\treturn rowContentHeights;\n\t}", "function _calculateGrid() {\n\tvar i = $game.VIEWPORT_WIDTH;\n\twhile(--i >= 0) {\n\t\tvar j = $game.VIEWPORT_HEIGHT;\n\t\twhile(--j >= 0) {\n\t\t\tvar dist = _distFromCharger({x:i,y:j});\n\t\t\t_grid[i][j].distance = dist;\n\t\t\t_grid[i][j].charger = -1;\n\t\t}\n\t}\n}", "function createDistances(){\n\tvar distances = [];\n\tfor (var i = 0; i < totalRows; i++){\n\t\tvar row = [];\n\t\tfor (var j = 0; j < totalCols; j++){\n\t\t\trow.push(Number.POSITIVE_INFINITY);\n\t\t}\n\t\tdistances.push(row);\n\t}\n\treturn distances;\n}", "function shellSort (arr) {\n for (var g = arr.length; g = parseInt(g / 2);) {\n for (var i = g; i < arr.length; i++) {\n var k = arr[i];\n for (var j = i; j >= g && k < arr[j - g]; j -= g) {\n arr[j] = arr[j - g];\n }\n \tarr[j] = k;\n }\n }\n return arr;\n}" ]
[ "0.6738897", "0.64641047", "0.64641047", "0.64641047", "0.64641047", "0.64641047", "0.63488793", "0.61982304", "0.61982304", "0.61982304", "0.61982304", "0.61982304", "0.6117158", "0.6117158", "0.6117158", "0.6117158", "0.6117158", "0.5905499", "0.5806976", "0.57262135", "0.55746615", "0.55612737", "0.55612737", "0.55325764", "0.54859626", "0.5469668", "0.5469668", "0.5469668", "0.544219", "0.5394653", "0.5391649", "0.53881365", "0.5354913", "0.53543305", "0.5332878", "0.532271", "0.5316133", "0.53152806", "0.52856344", "0.5275437", "0.5234932", "0.52080643", "0.51829875", "0.51404893", "0.51225036", "0.5115587", "0.51090485", "0.5105569", "0.5092418", "0.508721", "0.5086158", "0.5079695", "0.5067025", "0.50334215", "0.5019961", "0.5016212", "0.5012016", "0.4996485", "0.49785894", "0.49785894", "0.49779087", "0.49779087", "0.49779087", "0.49732226", "0.49663037", "0.4959381", "0.495767", "0.49546915", "0.4952977", "0.49508768", "0.49496937", "0.49466157", "0.492078", "0.49024808", "0.48978654", "0.4888408", "0.48848", "0.48825532", "0.48817298", "0.4881651", "0.48786855", "0.48735857", "0.48732933", "0.48729268", "0.48686305", "0.48634446", "0.48570526", "0.485678", "0.485678", "0.485678", "0.48499858", "0.48499858", "0.48499858", "0.4842639", "0.48328495", "0.4825837" ]
0.66758263
4
Sort an array of segments according to which segment should appear closest to the top
function sortSegmentRow(segments) { var sortedSegments = []; // build the subrow array var subrows = buildSegmentSubrows(segments); // flatten it for (var i=0; i<subrows.length; i++) { sortedSegments.push.apply(sortedSegments, subrows[i]); // append an array to an array } return sortedSegments; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function p(a){\n// Give preference to elements with certain criteria, so they have\n// a chance to be closer to the top.\na.sort(ya);for(var b=[],c=0;c<a.length;c++){\n// loop through subrows, starting with the topmost, until the segment\n// doesn't collide with other segments.\nfor(var d=a[c],e=0;e<b.length&&wa(d,b[e]);e++);\n// `j` now holds the desired subrow index\nb[e]?b[e].push(d):b[e]=[d]}return b}", "function compareScoreArray(a, b) {\r\n let i = 0;\r\n while (i < a.length && i < b.length) {\r\n const diff = b[i] - a[i];\r\n // only keep going if diff === 0\r\n if (diff)\r\n return diff;\r\n i++;\r\n }\r\n // if the last subsegment was Static, the shorter segments should be sorted first\r\n // otherwise sort the longest segment first\r\n if (a.length < b.length) {\r\n return a.length === 1 && a[0] === 40 /* Static */ + 40 /* Segment */\r\n ? -1\r\n : 1;\r\n }\r\n else if (a.length > b.length) {\r\n return b.length === 1 && b[0] === 40 /* Static */ + 40 /* Segment */\r\n ? 1\r\n : -1;\r\n }\r\n return 0;\r\n}", "function compareScoreArray(a, b) {\r\n let i = 0;\r\n while (i < a.length && i < b.length) {\r\n const diff = b[i] - a[i];\r\n // only keep going if diff === 0\r\n if (diff)\r\n return diff;\r\n i++;\r\n }\r\n // if the last subsegment was Static, the shorter segments should be sorted first\r\n // otherwise sort the longest segment first\r\n if (a.length < b.length) {\r\n return a.length === 1 && a[0] === 40 /* Static */ + 40 /* Segment */\r\n ? -1\r\n : 1;\r\n }\r\n else if (a.length > b.length) {\r\n return b.length === 1 && b[0] === 40 /* Static */ + 40 /* Segment */\r\n ? 1\r\n : -1;\r\n }\r\n return 0;\r\n}", "function compareScoreArray(a, b) {\n let i = 0;\n while (i < a.length && i < b.length) {\n const diff = b[i] - a[i];\n // only keep going if diff === 0\n if (diff)\n return diff;\n i++;\n }\n // if the last subsegment was Static, the shorter segments should be sorted first\n // otherwise sort the longest segment first\n if (a.length < b.length) {\n return a.length === 1 && a[0] === 40 /* Static */ + 40 /* Segment */\n ? -1\n : 1;\n }\n else if (a.length > b.length) {\n return b.length === 1 && b[0] === 40 /* Static */ + 40 /* Segment */\n ? 1\n : -1;\n }\n return 0;\n}", "sort(first, second) {\n // 1. Find point of divergence of 2 routes\n let firstCurrent = first.next;\n let secondCurrent = second.next;\n while (firstCurrent != null && secondCurrent != null && firstCurrent.direction == secondCurrent.direction) {\n firstCurrent = firstCurrent.next;\n secondCurrent = secondCurrent.next;\n }\n // 2. Compare routes\n // 2.1 Point of divergence has been found\n if (firstCurrent != null && secondCurrent != null) {\n let priority1 = this.getPriority(firstCurrent.prev.direction, firstCurrent.direction);\n let priority2 = this.getPriority(secondCurrent.prev.direction, secondCurrent.direction);\n return this.compare(priority1, priority2);\n }\n // 2.2 Routes do not have point of divergence and they both finished in the same point\n if (firstCurrent == null && secondCurrent == null) {\n return 0;\n }\n // 2.3 Routes do not have point of divergence and but first one finished earlier than second one\n if (secondCurrent != null) {\n let priority = this.walkThroughRoute(second);\n // The idea here is that the route that ended earlier should be less or greater (depending on the sign)\n // than the route that still continues.\n // Why the ended route is less or greater? Because it should be placed closer to the edge during rendering\n return Math.sign(priority);\n }\n // 2.4 Routes do not have point of divergence and but second one finished earlier than first one\n if (firstCurrent != null) {\n let priority = this.walkThroughRoute(first);\n // The idea here same as above BUT we have to take into account that now second route is less or greater\n // than the first one, so sign should be reverted in order to avoid descending sorting\n return Math.sign(priority) * -1;\n }\n return 0;\n }", "function sortSpanIds(sids) {\n function compare(a, b) {\n return((spans[a]['begin'] - spans[b]['begin']) || (spans[b]['end'] - spans[a]['end']));\n }\n sids.sort(compare);\n }", "function pa(a,b){\n// put higher-pressure first\n// put segments that are closer to initial edge first (and favor ones with no coords yet)\n// do normal sorting...\nreturn b.forwardPressure-a.forwardPressure||(a.backwardCoord||0)-(b.backwardCoord||0)||qa(a,b)}", "function getThisStreetShortSortedPoints(streetSegments) {\n //console.log(streetSegments);\n streetSegments.map(function(d) {\n points = points.concat(d.geometry.coordinates);\n\n sortedPoints = points.sort( function(a,b) { return a[1] - b[1]; });\n shortSortedPoints = sortedPoints.filter(function(d, i) { return i%4 === 0; });\n });\n}", "function sortByRangeStart(a,b){return a.start-b.start;}", "static sortCornersByTopnessPS(corners_array){\n var corners_array_to_be_returned = []\n for (var i = 0; i < corners_array.length; i++){\n corners_array_to_be_returned[i] = {x:corners_array[i].x,y:corners_array[i].y}\n }\n\n var sorted = false;\n //The greater value of y gets the \n while (!sorted){\n var sort_occurred = false;\n for (var i = 0; i < corners_array_to_be_returned.length - 1; i++){\n if (corners_array_to_be_returned[i].y < corners_array_to_be_returned[i+1].y){\n Tile.switchIndices(corners_array_to_be_returned, i, i+1)\n sort_occurred = true\n }\n }\n\n if (!sort_occurred){\n sorted = true;\n }\n }\n\n return corners_array_to_be_returned;\n }", "function sortCutPoints(points, xx, yy) {\n points.sort(function(a, b) {\n if (a.i != b.i) return a.i - b.i;\n return geom.distanceSq(xx[a.i], yy[a.i], a.x, a.y) - geom.distanceSq(xx[b.i], yy[b.i], b.x, b.y);\n // The old code below is no longer reliable, now that out-of-range intersection\n // points are allowed.\n // return Math.abs(a.x - xx[a.i]) - Math.abs(b.x - xx[b.i]) ||\n // Math.abs(a.y - yy[a.i]) - Math.abs(b.y - yy[b.i]);\n });\n return points;\n }", "function nearestLarger(arr, startIndex){\n\n // indicy sort function\n function sortWithIndeces(toSort) {\n // store value and indicy as a tuple in array\n for (var i = 0; i < toSort.length; i++) {\n toSort[i] = [toSort[i], i];\n }\n //sort the array by value\n toSort.sort(function(left, right) {\n return left[0] < right[0] ? -1 : 1;\n });\n // turn array in to sorted indicies\n \n for (var j = 0; j < toSort.length; j++) {\n toSort[j] = toSort[j][1];\n }\n return toSort;\n }\n \n var test = ['b', 'c', 'd', 'a'];\n console.log(sortWithIndeces(test));\n\n}", "function compareForwardSlotSegs(seg1, seg2) {\n\t// put higher-pressure first\n\treturn seg2.forwardPressure - seg1.forwardPressure ||\n\t\t// put segments that are closer to initial edge first (and favor ones with no coords yet)\n\t\t(seg1.backwardCoord || 0) - (seg2.backwardCoord || 0) ||\n\t\t// do normal sorting...\n\t\tcompareSegs(seg1, seg2);\n}", "function selectSort(arr){\r\n const len = arr.length;\r\n // define a variable to store the minimum index of current interval\r\n let minIndex;\r\n // i is the start point of current interval\r\n for(let i = 0; i < len - 1; i++){\r\n // init minIndex \r\n minIndex = i;\r\n // j is current interval's right limit\r\n for(let j = i; j < len; j++){\r\n // find the smallest data and update index of minIndex \r\n if(arr[j] < arr[minIndex]){\r\n minIndex = j;\r\n }\r\n }\r\n // if minIndex is not current head index, swap them\r\n if(minIndex !== i){\r\n [arr[i], arr[minIndex]] = [arr[minIndex], arr[i]];\r\n }\r\n }\r\n return arr;\r\n}", "function compareForwardSlotSegs(seg1, seg2) {\n\t// put higher-pressure first\n\treturn seg2.forwardPressure - seg1.forwardPressure ||\n\t\t// put segments that are closer to initial edge first (and favor ones with no coords yet)\n\t\t(seg1.backwardCoord || 0) - (seg2.backwardCoord || 0) ||\n\t\t// do normal sorting...\n\t\tcompareSlotSegs(seg1, seg2);\n}", "function compareForwardSlotSegs(seg1, seg2) {\n\t// put higher-pressure first\n\treturn seg2.forwardPressure - seg1.forwardPressure ||\n\t\t// put segments that are closer to initial edge first (and favor ones with no coords yet)\n\t\t(seg1.backwardCoord || 0) - (seg2.backwardCoord || 0) ||\n\t\t// do normal sorting...\n\t\tcompareSlotSegs(seg1, seg2);\n}", "function compareForwardSlotSegs(seg1, seg2) {\n\t// put higher-pressure first\n\treturn seg2.forwardPressure - seg1.forwardPressure ||\n\t\t// put segments that are closer to initial edge first (and favor ones with no coords yet)\n\t\t(seg1.backwardCoord || 0) - (seg2.backwardCoord || 0) ||\n\t\t// do normal sorting...\n\t\tcompareSlotSegs(seg1, seg2);\n}", "function compareForwardSlotSegs(seg1, seg2) {\n\t// put higher-pressure first\n\treturn seg2.forwardPressure - seg1.forwardPressure ||\n\t\t// put segments that are closer to initial edge first (and favor ones with no coords yet)\n\t\t(seg1.backwardCoord || 0) - (seg2.backwardCoord || 0) ||\n\t\t// do normal sorting...\n\t\tcompareSlotSegs(seg1, seg2);\n}", "function compareForwardSlotSegs(seg1, seg2) {\n\t// put higher-pressure first\n\treturn seg2.forwardPressure - seg1.forwardPressure ||\n\t\t// put segments that are closer to initial edge first (and favor ones with no coords yet)\n\t\t(seg1.backwardCoord || 0) - (seg2.backwardCoord || 0) ||\n\t\t// do normal sorting...\n\t\tcompareSlotSegs(seg1, seg2);\n}", "function compareForwardSlotSegs(seg1, seg2) {\n // put higher-pressure first\n return seg2.forwardPressure - seg1.forwardPressure ||\n // put segments that are closer to initial edge first (and favor ones with no coords yet)\n (seg1.backwardCoord || 0) - (seg2.backwardCoord || 0) ||\n // do normal sorting...\n compareSegs(seg1, seg2);\n }", "function orderliness(a) {\n\tlet sum = 0\n\tfor (let i = 0; i < a.length - 1; i++) {\n\t\tlet x = a[i]\n\t\tlet y = a[i + 1]\n\t\tsum += x < y ? 1 : x > y ? -1 : 0\n\t}\n\n\treturn sum / (a.length - 1)\n}", "static sortCornersByTopness(corners_array){\n var corners_array_to_be_returned = []\n for (var i = 0; i < corners_array.length; i++){\n corners_array_to_be_returned[i] = {x:corners_array[i].x,y:corners_array[i].y}\n }\n\n var sorted = false;\n //The greater value of y gets the \n while (!sorted){\n var sort_occurred = false;\n for (var i = 0; i < corners_array_to_be_returned.length - 1; i++){\n if (corners_array_to_be_returned[i].y > corners_array_to_be_returned[i+1].y){\n Tile.switchIndices(corners_array_to_be_returned, i, i+1)\n sort_occurred = true\n }\n }\n\n if (!sort_occurred){\n sorted = true;\n }\n }\n\n return corners_array_to_be_returned;\n }", "function sort(results){\r\n var swap=0;\r\n var view = new Array();\r\n for(var i=0; i<results.length; i++){\r\n view.push(data[results[i]].views);\r\n }\r\n for(var i=results.length-1; i>0; i--){\r\n for(var j=0; j<i; j++){\r\n if(view[j]<view[j+1]){\r\n var temp = results[j];\r\n results[j] = results[j+1];\r\n results[j+1] = temp;\r\n temp = view[j];\r\n view[j] = view[j+1];\r\n view[j+1]=temp;\r\n swap = 1; \r\n }\r\n }\r\n if(swap == 0){break;}\r\n } \r\n}", "function sselectionSort(arr){\n for(var i = 0; i < arr.length; i++){\n var lowest = i;\n for(var j = i+1; j < arr.length; j++){\n if(arr[j] < arr[lowest]){\n lowest = j;\n }\n }\n if(i !== lowest){\n //SWAP!\n var temp = arr[i];\n arr[i] = arr[lowest];\n arr[lowest] = temp;\n }\n }\n return arr;\n}", "function selectionSort(arr) {\n let idxOfMin;\n\n // Loop over entire array\n for (let i = 0; i < arr.length; i++) {\n let biggestGap = 0;\n let shouldSwap = false;\n\n // From index `i` + 1, find a smaller value, at index `k`.\n // We are searching through the \"right hand side\" of the array\n for (let k = i + 1; k < arr.length; k++) {\n const diff = arr[i] - arr[k];\n\n // Mark the index `k` where that smallest value is\n if (diff > biggestGap) {\n biggestGap = diff;\n idxOfMin = k;\n shouldSwap = true;\n }\n }\n\n // Back in the outter loop - perform a swap with `i` and `k`\n if (shouldSwap) {\n [arr[i], arr[idxOfMin]] = swap(arr[i], arr[idxOfMin]);\n }\n }\n\n return arr;\n}", "function compareDaySegments(a, b) {\n\treturn (b.rightCol - b.leftCol) - (a.rightCol - a.leftCol) || // put wider events first\n\t\tb.event.allDay - a.event.allDay || // if tie, put all-day events first (booleans cast to 0/1)\n\t\ta.event.start - b.event.start || // if a tie, sort by event start date\n\t\t(a.event.title || '').localeCompare(b.event.title) // if a tie, sort by event title\n}", "function compareDaySegments(a, b) {\n\treturn (b.rightCol - b.leftCol) - (a.rightCol - a.leftCol) || // put wider events first\n\t\tb.event.allDay - a.event.allDay || // if tie, put all-day events first (booleans cast to 0/1)\n\t\ta.event.start - b.event.start || // if a tie, sort by event start date\n\t\t(a.event.title || '').localeCompare(b.event.title) // if a tie, sort by event title\n}", "function compareDaySegments(a, b) {\n\treturn (b.rightCol - b.leftCol) - (a.rightCol - a.leftCol) || // put wider events first\n\t\tb.event.allDay - a.event.allDay || // if tie, put all-day events first (booleans cast to 0/1)\n\t\ta.event.start - b.event.start || // if a tie, sort by event start date\n\t\t(a.event.title || '').localeCompare(b.event.title) // if a tie, sort by event title\n}", "function compareDaySegments(a, b) {\n\treturn (b.rightCol - b.leftCol) - (a.rightCol - a.leftCol) || // put wider events first\n\t\tb.event.allDay - a.event.allDay || // if tie, put all-day events first (booleans cast to 0/1)\n\t\ta.event.start - b.event.start || // if a tie, sort by event start date\n\t\t(a.event.title || '').localeCompare(b.event.title); // if a tie, sort by event title\n}", "function compareDaySegments(a, b) {\n\treturn (b.rightCol - b.leftCol) - (a.rightCol - a.leftCol) || // put wider events first\n\t\tb.event.allDay - a.event.allDay || // if tie, put all-day events first (booleans cast to 0/1)\n\t\ta.event.start - b.event.start || // if a tie, sort by event start date\n\t\t(a.event.title || '').localeCompare(b.event.title); // if a tie, sort by event title\n}", "function selectionSort2(array) {\n for (let i = 0; i < array.length - 1; i++) {\n let minIndex = i;\n for (let j = i + 1; j < array.length; j++) {\n if (array[j] < array[minIndex]) {\n minIndex = j;\n }\n }\n if (i !== minIndex) {\n swap(array, i, minIndex);\n }\n }\n}", "function sortdisheshightolow(o) {\r\n\tvar swapped=true;\r\n\twhile (swapped==true){\r\n\t\tswapped=false;\r\n\t\tfor (var i= 0; i<o.length-1; i++){\r\n\t\t\tif (o[i].price<o[i+1].price){\r\n\t\t\t\tvar temp = o[i];\r\n\t\t\t\to[i]=o[i+1];\r\n\t\t\t\to[i+1]=temp;\r\n\t\t\t\tswapped=true;\r\n\t\t\t}\r\n\t\t\r\n\t\t}\r\n\t}\r\n\r\n return o;\r\n}", "async function TopologicalSort(){}", "function selection_sort(arr) {\n for (let i = 0; i < arr.length; i++) {\n let minIndex = i;\n for (let j = i + 1; j < arr.length; j++) {\n if (arr[j] < arr[minIndex]) {\n minIndex = j;\n }\n }\n // if (arr[minIndex] < arr[i]) swap(arr, i, minIndex);\n if (i !== minIndex) swap(arr, i, minIndex);\n }\n return arr;\n}", "function mergeSortOffTop(seq, a, b, tmpArr = []) {\n if (a >= b) {\n return\n } else {\n let splitIndex = Math.floor((b-a)/2) + a;\n \n console.log('a: ', a); \n console.log('b: ', b);\n console.log('splitIndex: ', splitIndex);\n console.log('seq: ', seq); \n console.log('seq[splitIndex] : ', seq[splitIndex]);\n \n mergeSortOffTop(seq, a, splitIndex, tmpArr);\n mergeSortOffTop(seq, splitIndex+1, b, tmpArr);\n \n mergeOffTop(seq, a, splitIndex, b, tmpArr);\n }\n }", "function selectionSortFirstTry(arr) {\n let min = [] // this was unnecessary\n for (let i=0; i<arr.length; i++) {\n min = [arr[i+1], i+1]\n for(let j=i+1; j<arr.length; j++) {\n if(arr[j]<min[0]) {\n min = [arr[j], j]\n }\n } \n if (min[0]<arr[i]) {\n [arr[i], arr[min[1]]] = [arr[min[1]], arr[i]]\n }\n }\n return arr\n}", "function sectSort(arr, start, length) {\n let end = start + length || 0, begin = arr.slice(0, start)\n return length ? begin.concat(arr.slice(start,end).sort((a,b)=>a-b)).concat(arr.slice(end)) : \n begin.concat(arr.slice(start).sort((a,b)=>a-b));\n}", "function selectionsort() {\n\tlet len = numbers.length,min;\n\t\tfor(let i = 0; i < len; i ++){\n\t\t\tmin = i; //set min val \n\t\t\tfor(let j = i+1; j < len; j ++){ //check to see if anything is smaller than min\n\t\t\t\tif(numbers[j] < numbers[min]){\n\t\t\t\t\tmin = j;\n\t\t\t\t}\n\t\t\t}\n\t\t\t//setTimeout(() => {\n\t\t\t\tif(i != min){\n\t\t\t\t\tswap(numbers, i, min);\n\t\t\t\t}\n\t\t\t//},1);\n\t\t\t//if min isnt in the position, swap\n\t}\n}", "function sortByRangeIndex(a,b){return a.index-b.index;}", "function sortByStartX(a, b) {\n\t\treturn a.start.x - b.start.x;\n\t}", "function priceSortLowTop(array){\n\tarray.sort(function(a, b){\n\t\tvar price1= a.price, price2= b.price;\n\t\tif(price1== price2) return 0;\n\t\treturn price1> price2? 1: -1;\n\t\t});\n\t\t\n\t\t\n}", "function sortCostLow(array) {\n array.sort((a, b) =>\n Number(a.restaurant.average_cost_for_two) - Number(b.restaurant.average_cost_for_two)\n )\n}", "function sortByHeight(a) {\n const arr1 = []; // to hold tree position which is -1 by the way😁\n const arr2 = []; // to hold the position of values to be sorted\n a.forEach((value, index) => {\n if (value === -1) {\n arr1.push(index);\n } else {\n arr2.push(value);\n }\n });\n //console.log(arr1); // [0,4,5]\n //console.log(arr2); // [150,190,170,160,180]\n\n const sortArr = arr2.sort((a, b) => a - b);\n arr1.forEach((value, index) => sortArr.splice(arr1[index], 0, -1));\n return sortArr;\n}", "function selectionSort(input){\n var length = input.length;\n for (var i = 0; i < length - 1; i++) {\n //Number of passes\n var min = i; //min holds the current minimum number position for each pass; i holds the Initial min number\n for (var j = i + 1; j < length; j++) { //Note that j = i + 1 as we only need to go through unsorted array\n if (input[j] < input[min]) { //Compare the numbers\n min = j; //Change the current min number position if a smaller num is found\n }\n }\n if (min != i) {\n //After each pass, if the current min num != initial min num, exchange the position.\n //Swap the numbers \n var temp = input[i];\n input[i] = input[min];\n input[min] = temp;\n }\n }\n return input;\n}", "function selectionSort(arr) {\n\tfor(var swapI = 0; swapI < arr.length - 1; swapI++) {\n\t\t// Holds the lowest found value on this pass\n\t\tvar lowNum = Infinity;\n\t\tvar lowI = swapI;\n\n\t\tfor(var scanI = swapI; scanI < arr.length; scanI++) {\n\t\t\tif(arr[scanI] < lowNum) {\n\t\t\t\tlowNum = arr[scanI];\n\t\t\t\tlowI = scanI;\n\t\t\t}\n\t\t}\n\n\t\t// Swap the low value with the beginning of the array\n\t\tarr[lowI] = arr[swapI];\n\t\tarr[swapI] = lowNum;\n\t}\n}", "function sort(array) {\n\n\n let l = array.length,\n smallInsert = 6,\n group = Math.floor(l / smallInsert),\n equal = l % smallInsert,\n start = 0,\n end = 0\n for (let i = 0; i < group; i++) {\n start = smallInsert * i\n end = start + smallInsert - 1\n insertSort(array, start, end)\n }\n if (equal) { // if equal, then there is some number not included in group\n insertSort(array, group * smallInsert, l - 1)\n }\n for (let sz = smallInsert; sz < l; sz += sz) {\n for (let lo = 0; lo < l - sz; lo += sz + sz) {\n if (array[lo + sz - 1] > array[lo + sz]) {\n // If this is true, then we need to merge, otherwise, it is already ordered.\n merge(array, lo, lo + sz - 1, Math.min(lo + sz + sz - 1, l - 1), [])\n }\n }\n }\n}", "function sortAsc(arr) {\n let t = arr.length;\n var temp;\n\n for (var i = 0; i <= t; i++) {\n for (var j = 0; j < t; j++) {\n // compara se o elemento atual é maior que o seguinte\n if (arr[j] > arr[j+1]) {\n // armazena o elemento atual\n temp = arr[j];\n // substitui o elemento atual pelo seguinte\n arr[j] = arr[j+1];\n // recupera o valor atual e substitui no seguinte\n arr[j+1] = temp;\n }\n }\n }\n return arr;\n}", "function sortByProcedure(arr) {\n var procs = arr.map(getProcedure);\n for (var i = 1; i < arr.length; i++) {\n var procNew = procs[i];\n if (procNew < 0)\n continue;\n for (var j = i - 1; j >= 0 && procNew < procs[j]; j--) {\n var token = arr[j + 1];\n arr[j + 1] = arr[j];\n arr[j] = token;\n procs[j + 1] = procs[j];\n procs[j] = procNew;\n }\n }\n}", "function sortByProcedure(arr) {\n var procs = arr.map(getProcedure);\n for (var i = 1; i < arr.length; i++) {\n var procNew = procs[i];\n if (procNew < 0)\n continue;\n for (var j = i - 1; j >= 0 && procNew < procs[j]; j--) {\n var token = arr[j + 1];\n arr[j + 1] = arr[j];\n arr[j] = token;\n procs[j + 1] = procs[j];\n procs[j] = procNew;\n }\n }\n}", "function sortByProcedure(arr) {\n var procs = arr.map(getProcedure);\n for (var i = 1; i < arr.length; i++) {\n var procNew = procs[i];\n if (procNew < 0)\n continue;\n for (var j = i - 1; j >= 0 && procNew < procs[j]; j--) {\n var token = arr[j + 1];\n arr[j + 1] = arr[j];\n arr[j] = token;\n procs[j + 1] = procs[j];\n procs[j] = procNew;\n }\n }\n}", "function sortByProcedure(arr) {\n var procs = arr.map(getProcedure);\n for (var i = 1; i < arr.length; i++) {\n var procNew = procs[i];\n if (procNew < 0)\n continue;\n for (var j = i - 1; j >= 0 && procNew < procs[j]; j--) {\n var token = arr[j + 1];\n arr[j + 1] = arr[j];\n arr[j] = token;\n procs[j + 1] = procs[j];\n procs[j] = procNew;\n }\n }\n}", "function painterSortStable( a, b ) {\n\n\tif ( a.groupOrder !== b.groupOrder ) {\n\n\t\treturn a.groupOrder - b.groupOrder;\n\n\t} else if ( a.renderOrder !== b.renderOrder ) {\n\n\t\treturn a.renderOrder - b.renderOrder;\n\n\t} else if ( a.program && b.program && a.program !== b.program ) {\n\n\t\treturn a.program.id - b.program.id;\n\n\t} else if ( a.material.id !== b.material.id ) {\n\n\t\treturn a.material.id - b.material.id;\n\n\t} else if ( a.z !== b.z ) {\n\n\t\treturn a.z - b.z;\n\n\t} else {\n\n\t\treturn a.id - b.id;\n\n\t}\n\n}", "function selectionSort(arr) {\n for (let i = 0; i < arr.length; i++) {\n let indexOfMin = i;\n\n for (let j = i + 1; j < arr.length; j++) {\n if (arr[j] < arr[indexOfMin]) {\n indexOfMin = j;\n }\n }\n // swap logic\n if (indexOfMin !== i) {\n let lesser = arr[indexOfMin];\n arr[indexOfMin] = arr[i];\n arr[i] = lesser;\n }\n }\n\n return arr;\n}", "function sortByProcedure(arr) {\n const procs = arr.map(getProcedure);\n for (let i = 1; i < arr.length; i++) {\n const procNew = procs[i];\n if (procNew < 0)\n continue;\n for (let j = i - 1; j >= 0 && procNew < procs[j]; j--) {\n const token = arr[j + 1];\n arr[j + 1] = arr[j];\n arr[j] = token;\n procs[j + 1] = procs[j];\n procs[j] = procNew;\n }\n }\n}", "function sortByRangeStart(a, b) {\n return a.start - b.start;\n}", "function sortByProcedure(arr) {\n var procs = arr.map(getProcedure);\n for (var i = 1; i < arr.length; i++) {\n var procNew = procs[i];\n if (procNew < 0)\n continue;\n for (var j = i - 1; j >= 0 && procNew < procs[j]; j--) {\n var token = arr[j + 1];\n arr[j + 1] = arr[j];\n arr[j] = token;\n procs[j + 1] = procs[j];\n procs[j] = procNew;\n }\n }\n}", "sort() {\n for (let i = 0; i < this.values.length - 1; i++) {\n let min = i;\n for (let j = i + 1; j < this.values.length; j++) {\n if (this.values[j] < this.values[min]) min = j;\n }\n\n this.swap(i, min);\n }\n }", "function sortsch(sch){\n\tsch.sort(function(a, b){if(b.d < a.d || (b.d == a.d && b.s < a.s)) return 1; return -1;});\n\treturn sch;\n}", "function sortByProcedure(arr) {\n var procs = arr.map(getProcedure);\n\n for (var i = 1; i < arr.length; i++) {\n var procNew = procs[i];\n if (procNew < 0) continue;\n\n for (var j = i - 1; j >= 0 && procNew < procs[j]; j--) {\n var token = arr[j + 1];\n arr[j + 1] = arr[j];\n arr[j] = token;\n procs[j + 1] = procs[j];\n procs[j] = procNew;\n }\n }\n}", "function selectionSort(arr) {\n let foundSmaller;\n for (let i = 0; i < arr.length; i++) {\n let lowest = i;\n for (let j = i + 1; j < arr.length; j++) {\n if (arr[lowest] > arr[j]) {\n lowest = j;\n foundSmaller = true;\n }\n }\n if (foundSmaller) {\n let temp = arr[i];\n arr[i] = arr[lowest];\n arr[lowest] = temp;\n }\n }\n return arr;\n}", "function subarraySort(array) {\n\tvar minOutofOrder = Infinity;\n\tvar maxOutofOrder = -Infinity;\n\tfor (var i = 0; i < array.length; i++) {\n\t\tvar num = array[i];\n\t\tif (isOutofOrder(i, num, array)) {\n\t\t\tminOutofOrder = Math.min(num, minOutofOrder);\n\t\t\tmaxOutofOrder = Math.max(num, maxOutofOrder);\n\t\t}\n\t}\n\tif (minOutofOrder === Infinity) {\n\t\treturn [-1, -1];\n\t}\n\tvar left = 0;\n\twhile (array[left] <= minOutofOrder) {\n\t\tleft++;\n\t}\n\tvar right = array.length - 1;\n\twhile (array[right] >= maxOutofOrder) {\n\t\tright--;\n\t}\n\treturn [left, right]\n}", "sorted(matches) {\n // sort on i primary, j secondary\n return matches.sort((m1, m2) => (m1.i - m2.i) || (m1.j - m2.j));\n }", "function sortByRangeStart (a, b) {\n return a.start - b.start\n}", "function sortByRangeStart (a, b) {\n return a.start - b.start\n}", "function sortByRangeStart (a, b) {\n return a.start - b.start\n}", "function sortByRangeStart (a, b) {\n return a.start - b.start\n}", "function sortByRangeStart (a, b) {\n return a.start - b.start\n}", "function sortByRangeStart (a, b) {\n return a.start - b.start\n}", "function sortByRangeStart (a, b) {\n return a.start - b.start\n}", "function sortByRangeStart (a, b) {\n return a.start - b.start\n}", "function sortByRangeStart (a, b) {\n return a.start - b.start\n}", "function sortByRangeStart (a, b) {\n return a.start - b.start\n}", "function sortByRangeStart (a, b) {\n return a.start - b.start\n}", "function sortByRangeStart (a, b) {\n return a.start - b.start\n}", "function sortByRangeStart (a, b) {\n return a.start - b.start\n}", "function sortByRangeStart (a, b) {\n return a.start - b.start\n}", "function sortByRangeStart (a, b) {\n return a.start - b.start\n}", "function sortAreas(div, relativeTo) {\n\n // figure out sets that are completly overlapped by relativeTo\n var overlaps = getOverlappingCircles(div.selectAll(\"svg\").datum());\n var exclude = {};\n for (var i = 0; i < relativeTo.sets.length; ++i) {\n var check = relativeTo.sets[i];\n for (var setid in overlaps) {\n var overlap = overlaps[setid];\n for (var j = 0; j < overlap.length; ++j) {\n if (overlap[j] == check) {\n exclude[setid] = true;\n break;\n }\n }\n }\n }\n\n // checks that all sets are in exclude;\n function shouldExclude(sets) {\n for (var i = 0; i < sets.length; ++i) {\n if (!(sets[i] in exclude)) {\n return false;\n }\n }\n return true;\n }\n\n // need to sort div's so that Z order is correct\n div.selectAll(\"g\").sort(function (a, b) {\n // highest order set intersections first\n if (a.sets.length != b.sets.length) {\n return a.sets.length - b.sets.length;\n }\n\n if (a == relativeTo) {\n return shouldExclude(b.sets) ? -1 : 1;\n }\n if (b == relativeTo) {\n return shouldExclude(a.sets) ? 1 : -1;\n }\n\n // finally by size\n return b.size - a.size;\n });\n}", "function greatestToLeast(arr) {\n const sortGToL = arr.sort((a, b) => {\n return b - a\n })\n return sortGToL\n}", "function subarraySort(array) {\n let subArrStart = -1;\n let subArrEnd = -1;\n let subArrMin = Infinity;\n let subArrMax = -Infinity;\n\n for (let i = 1; i < array.length; i++) {\n if (array[i] < array[i - 1]) {\n if (subArrStart == -1) {\n subArrStart = i;\n }\n subArrEnd = i;\n } else if (subArrStart > -1 && array[i] < array[subArrStart - 1]) {\n subArrEnd = i;\n } else if (subArrStart > -1 && array[i] < subArrMax) {\n subArrEnd = i;\n }\n\n if (subArrStart > -1 && array[i] < subArrMin) {\n subArrMin = array[i];\n }\n\n if (subArrStart > -1 && array[i] > subArrMax) {\n subArrMax = array[i];\n }\n }\n\n for (let j = 0; j < subArrStart; j++) {\n if (array[j] > subArrMin) {\n subArrStart = j;\n return [subArrStart, subArrEnd];\n }\n }\n\n return [subArrStart, subArrEnd];\n}", "function sortForLow(){ \n// set value of lowestScore to the sorted array lowest to highest (a-b)\nlet lowestScore = scores.sort(function(a,b){return a-b}) \n//console log the value of lowestScore at index 0\nconsole.log('the lowest score is', lowestScore[0])\n}", "sort() {\n let a = this.array;\n const step = 1;\n let compares = 0;\n for (let i = 0; i < a.length; i++) {\n let tmp = a[i];\n for (var j = i; j >= step; j -= step) {\n this.store(step, i, j, tmp, compares);\n compares++;\n if (a[j - step] > tmp) {\n a[j] = a[j - step];\n this.store(step, i, j, tmp, compares);\n } else {\n break;\n }\n }\n a[j] = tmp;\n this.store(step, i, j, tmp, compares);\n }\n this.array = a;\n }", "eventSorter(a, b) {\n const startA = a.dataStartMs || a.startMs, // dataXX are used if configured with fillTicks\n endA = a.dataEndMs || a.endMs,\n startB = b.dataStartMs || b.startMs,\n endB = b.dataEndMs || b.endMs,\n sameStart = startA === startB;\n\n if (sameStart) {\n if (endA - endB === 0) {\n return a.event.name < b.event.name ? -1 : 1;\n }\n return endA > endB ? -1 : 1;\n }\n\n return startA < startB ? -1 : 1;\n }", "function sortAreas(div, relativeTo) {\n // figure out sets that are completly overlapped by relativeTo\n var overlaps = getOverlappingCircles(div.selectAll(\"svg\").datum());\n var exclude = {};\n\n for (var i = 0; i < relativeTo.sets.length; ++i) {\n var check = relativeTo.sets[i];\n\n for (var setid in overlaps) {\n var overlap = overlaps[setid];\n\n for (var j = 0; j < overlap.length; ++j) {\n if (overlap[j] == check) {\n exclude[setid] = true;\n break;\n }\n }\n }\n } // checks that all sets are in exclude;\n\n\n function shouldExclude(sets) {\n for (var i = 0; i < sets.length; ++i) {\n if (!(sets[i] in exclude)) {\n return false;\n }\n }\n\n return true;\n } // need to sort div's so that Z order is correct\n\n\n div.selectAll(\"g\").sort(function (a, b) {\n // highest order set intersections first\n if (a.sets.length != b.sets.length) {\n return a.sets.length - b.sets.length;\n }\n\n if (a == relativeTo) {\n return shouldExclude(b.sets) ? -1 : 1;\n }\n\n if (b == relativeTo) {\n return shouldExclude(a.sets) ? 1 : -1;\n } // finally by size\n\n\n return b.size - a.size;\n });\n }", "function selectionSort(arr) {\n // Selection Sort Algorithm\n // We loop through the array and find the min value.\n // Once we have the min value we place it at the front of the array.\n // Then we iterate through the array where the length of the array we iterate over is now n - 1,\n // since we're going to be iterating through all values except where the min value was just finished beng placed at.\n // Every iteration, our range of the array we're iterating over will shrink, finding the new min at each new sub array we're iterating over\n // and placing the new found in at the beginning of that sub array, until we reach the end.\n\n // We need to initialize the front pointer, i.\n let i = 0;\n\n // We need to loop over the array\n while (i < arr.length) {\n // We also need to initialize the traversing pointer, j.\n let j = i;\n // And we also need to rememeber the min value;\n let min = Infinity;\n\n while (j < arr.length) {\n const current = arr[j];\n min = Math.min(current, min);\n ++j;\n }\n // We also need to keep track of the index of min\n let minIndex = arr.indexOf(min);\n\n // once we get to this part of the algorithm, we'd have found the min in the sub array from i to arr.length\n // so then we just swap the elments at i and the index of min\n console.log(arr, arr[i], arr[minIndex]);\n // We swap the values at the beginning of our sub array and the element at minIndex.\n swap(i, minIndex, arr);\n // Then we increment i to adjust the window of out sub array.\n ++i;\n }\n}", "function selectionSort(arr){\n var minIdx, temp, \n len = arr.length;\n for(var i = 0; i < len; i++){\n minIdx = i;\n for(var j = i+1; j<len; j++){\n if(arr[j]<arr[minIdx]){\n minIdx = j;\n }\n }\n temp = arr[i];\n arr[i] = arr[minIdx];\n arr[minIdx] = temp;\n }\n return arr;\n}", "function sort_array_x(array){\n\tend = array.length - 1;\n\tfor(start = 0; start < array.length - 1; start++){\n\t\tstart_x = array[start].x;\n\t\tend_x = array[end].x;\n\t\tif(end_x < start_x){\n\t\t\tswap_start = array[start];\n\t\t\tarray[start] = array[end];\n\t\t\tarray[end] = swap_start;\n\t\t}\n\t}\n}", "function greatestToLeast(arr) {\n const result = arr.sort(function(num1, num2){\n return num2 - num1;\n })\n return result;\n}", "function selectionSort(arr) {\n for (let i = 0; i < arr.length; i++) {\n let indexOfMin = i;\n for (let j = i + 1; j < arr.length; j++) {\n if (arr[j] < arr[indexOfMin]) {\n indexOfMin = j;\n }\n }\n if (i !== indexOfMin) {\n const swap = arr[i];\n arr[i] = arr[indexOfMin];\n arr[indexOfMin] = swap;\n }\n }\n return arr;\n}", "function greatestToLeast(arr) {\n\tconst result = arr.sort(function(a, b){\n\t\t//b - a is for highest to least (descending order) type sort\n\t\treturn b - a;\n\t});\n\treturn result;\n}", "function selectionSort(array){\n\tlet len = array.length;\n\tlet k = 0;\n\twhile (k<len){\n\t\tlet i = k;\n\t\tlet minIndex = i;\n\t\twhile (i<len-1){\n\t\t\tif (array[i+1]<array[i]){\n\t\t\t\tminIndex = i+1;\n\t\t\t}\n\t\t\ti++;\n\t\t}\n\t\tswap(k, minIndex, array);\n\t\tconsole.log(array)\n\t\tk++;\n\t}\n\treturn array;\n}", "function sortLeaders(a, b) {\n return a.data[0][0] - b.data[0][0];\n }", "function sort(arr = [], low, high) {\n if (low < high) {\n /* pi is partitioning index, arr[pi] is \n now at right place */\n var pi = partition(arr, low, high);\n\n // Recursively sort elements before \n // partition and after partition \n sort(arr, low, pi - 1);\n sort(arr, pi + 1, high);\n }\n}", "function SecondGreatLow(arr) {\n //if length is 2 edge case\n if (arr.length === 2){\n sortedArr = arr.sort();\n return sortedArr[1]+\" \"+sortedArr[0];\n }\n\n var min, max, min2, max2;\n sortedArr = arr.sort();\n min = sortedArr[0];\n max = sortedArr[sortedArr.length];\n min2 = max;\n max2 = min;\n for (var i = 0; i < sortedArr.length; i++) {\n //set min2\n if (sortedArr[i] !== min){\n if(sortedArr[i] < min2){\n min2 = sortedArr[i];\n }\n }\n //set max2\n if (sortedArr[i] !== max){\n if(sortedArr[i] > max2){\n max2 = sortedArr[i];\n }\n }\n }//end loop\n return min2+\" \"+max2;\n}//end function", "function selectionSort(arr) {\n for (let i = 0; i<arr.length; i++) {\n let min = i\n for (let j=i+1; j<arr.length; j++) {\n if (arr[j]<arr[min]) {\n min = j\n }\n }\n if (arr[min]<arr[i]) {\n [arr[i], arr[min]] = [arr[min], arr[i]]\n }\n }\n return arr\n}", "function inssort2(A) {\n var temp;\n for (var i = 1; i < A.length; i++) // Insert i'th record\n for (var j = i; (j > 0) && (A[j] < A[j - 1]); j--) {\n temp = A[j]; A[j] = A[j - 1]; A[j - 1] = temp;\n }\n}" ]
[ "0.6719305", "0.6612844", "0.6612844", "0.66056436", "0.6592666", "0.6183431", "0.60575956", "0.59962165", "0.5986516", "0.5966981", "0.5950384", "0.5915803", "0.5900797", "0.5899388", "0.5898473", "0.5898473", "0.5898473", "0.5898473", "0.5898473", "0.5889476", "0.58693546", "0.585641", "0.58460164", "0.58039016", "0.57696635", "0.5756732", "0.5756732", "0.5756732", "0.5743975", "0.5743975", "0.5683845", "0.5678847", "0.5643843", "0.5640219", "0.56327856", "0.56225735", "0.5620004", "0.56192064", "0.5598167", "0.5596068", "0.55932057", "0.5583707", "0.557565", "0.55745035", "0.55736095", "0.55634826", "0.5560231", "0.5555869", "0.5555869", "0.5555869", "0.5555869", "0.55540085", "0.55538636", "0.5551449", "0.5547338", "0.5544124", "0.5542507", "0.55415773", "0.5541207", "0.5534955", "0.55338156", "0.55251604", "0.5519771", "0.5519771", "0.5519771", "0.5519771", "0.5519771", "0.5519771", "0.5519771", "0.5519771", "0.5519771", "0.5519771", "0.5519771", "0.5519771", "0.5519771", "0.5519771", "0.5519771", "0.5518322", "0.5516828", "0.55148953", "0.55096316", "0.55066293", "0.54956806", "0.5493551", "0.549286", "0.54843706", "0.54814684", "0.54805386", "0.54780257", "0.54771805", "0.5468504", "0.5467123", "0.5465428", "0.54634327", "0.5459291", "0.54569966" ]
0.6350748
8
Take an array of segments, which are all assumed to be in the same row, and sort into subrows.
function buildSegmentSubrows(segments) { // Give preference to elements with certain criteria, so they have // a chance to be closer to the top. segments.sort(compareDaySegments); var subrows = []; for (var i=0; i<segments.length; i++) { var segment = segments[i]; // loop through subrows, starting with the topmost, until the segment // doesn't collide with other segments. for (var j=0; j<subrows.length; j++) { if (!isDaySegmentCollision(segment, subrows[j])) { break; } } // `j` now holds the desired subrow index if (subrows[j]) { subrows[j].push(segment); } else { subrows[j] = [ segment ]; } } return subrows; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function sortSegmentRow(segments) {\n\t\tvar sortedSegments = [];\n\n\t\t// build the subrow array\n\t\tvar subrows = buildSegmentSubrows(segments);\n\n\t\t// flatten it\n\t\tfor (var i=0; i<subrows.length; i++) {\n\t\t\tsortedSegments.push.apply(sortedSegments, subrows[i]); // append an array to an array\n\t\t}\n\n\t\treturn sortedSegments;\n\t}", "function sortSegmentRow(segments) {\n\t\tvar sortedSegments = [];\n\n\t\t// build the subrow array\n\t\tvar subrows = buildSegmentSubrows(segments);\n\n\t\t// flatten it\n\t\tfor (var i=0; i<subrows.length; i++) {\n\t\t\tsortedSegments.push.apply(sortedSegments, subrows[i]); // append an array to an array\n\t\t}\n\n\t\treturn sortedSegments;\n\t}", "function sortSegmentRow(segments) {\n\t\tvar sortedSegments = [];\n\n\t\t// build the subrow array\n\t\tvar subrows = buildSegmentSubrows(segments);\n\n\t\t// flatten it\n\t\tfor (var i=0; i<subrows.length; i++) {\n\t\t\tsortedSegments.push.apply(sortedSegments, subrows[i]); // append an array to an array\n\t\t}\n\n\t\treturn sortedSegments;\n\t}", "function sortSegmentRow(segments) {\n\t\tvar sortedSegments = [];\n\n\t\t// build the subrow array\n\t\tvar subrows = buildSegmentSubrows(segments);\n\n\t\t// flatten it\n\t\tfor (var i=0; i<subrows.length; i++) {\n\t\t\tsortedSegments.push.apply(sortedSegments, subrows[i]); // append an array to an array\n\t\t}\n\n\t\treturn sortedSegments;\n\t}", "function sortSegmentRow(segments) {\n\t\tvar sortedSegments = [];\n\n\t\t// build the subrow array\n\t\tvar subrows = buildSegmentSubrows(segments);\n\n\t\t// flatten it\n\t\tfor (var i=0; i<subrows.length; i++) {\n\t\t\tsortedSegments.push.apply(sortedSegments, subrows[i]); // append an array to an array\n\t\t}\n\n\t\treturn sortedSegments;\n\t}", "function buildSegmentRows(segments) {\n\t\tvar rowCnt = getRowCnt();\n\t\tvar segmentRows = [];\n\t\tvar segmentI;\n\t\tvar segment;\n\t\tvar rowI;\n\n\t\t// group segments by row\n\t\tfor (segmentI=0; segmentI<segments.length; segmentI++) {\n\t\t\tsegment = segments[segmentI];\n\t\t\trowI = segment.row;\n\t\t\tif (segment.element) { // was rendered?\n\t\t\t\tif (segmentRows[rowI]) {\n\t\t\t\t\t// already other segments. append to array\n\t\t\t\t\tsegmentRows[rowI].push(segment);\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t// first segment in row. create new array\n\t\t\t\t\tsegmentRows[rowI] = [ segment ];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// sort each row\n\t\tfor (rowI=0; rowI<rowCnt; rowI++) {\n\t\t\tsegmentRows[rowI] = sortSegmentRow(\n\t\t\t\tsegmentRows[rowI] || [] // guarantee an array, even if no segments\n\t\t\t);\n\t\t}\n\n\t\treturn segmentRows;\n\t}", "function buildSegmentRows(segments) {\n\t\tvar rowCnt = getRowCnt();\n\t\tvar segmentRows = [];\n\t\tvar segmentI;\n\t\tvar segment;\n\t\tvar rowI;\n\n\t\t// group segments by row\n\t\tfor (segmentI=0; segmentI<segments.length; segmentI++) {\n\t\t\tsegment = segments[segmentI];\n\t\t\trowI = segment.row;\n\t\t\tif (segment.element) { // was rendered?\n\t\t\t\tif (segmentRows[rowI]) {\n\t\t\t\t\t// already other segments. append to array\n\t\t\t\t\tsegmentRows[rowI].push(segment);\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t// first segment in row. create new array\n\t\t\t\t\tsegmentRows[rowI] = [ segment ];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// sort each row\n\t\tfor (rowI=0; rowI<rowCnt; rowI++) {\n\t\t\tsegmentRows[rowI] = sortSegmentRow(\n\t\t\t\tsegmentRows[rowI] || [] // guarantee an array, even if no segments\n\t\t\t);\n\t\t}\n\n\t\treturn segmentRows;\n\t}", "function buildSegmentRows(segments) {\n\t\tvar rowCnt = getRowCnt();\n\t\tvar segmentRows = [];\n\t\tvar segmentI;\n\t\tvar segment;\n\t\tvar rowI;\n\n\t\t// group segments by row\n\t\tfor (segmentI=0; segmentI<segments.length; segmentI++) {\n\t\t\tsegment = segments[segmentI];\n\t\t\trowI = segment.row;\n\t\t\tif (segment.element) { // was rendered?\n\t\t\t\tif (segmentRows[rowI]) {\n\t\t\t\t\t// already other segments. append to array\n\t\t\t\t\tsegmentRows[rowI].push(segment);\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t// first segment in row. create new array\n\t\t\t\t\tsegmentRows[rowI] = [ segment ];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// sort each row\n\t\tfor (rowI=0; rowI<rowCnt; rowI++) {\n\t\t\tsegmentRows[rowI] = sortSegmentRow(\n\t\t\t\tsegmentRows[rowI] || [] // guarantee an array, even if no segments\n\t\t\t);\n\t\t}\n\n\t\treturn segmentRows;\n\t}", "function buildSegmentRows(segments) {\n\t\tvar rowCnt = getRowCnt();\n\t\tvar segmentRows = [];\n\t\tvar segmentI;\n\t\tvar segment;\n\t\tvar rowI;\n\n\t\t// group segments by row\n\t\tfor (segmentI=0; segmentI<segments.length; segmentI++) {\n\t\t\tsegment = segments[segmentI];\n\t\t\trowI = segment.row;\n\t\t\tif (segment.element) { // was rendered?\n\t\t\t\tif (segmentRows[rowI]) {\n\t\t\t\t\t// already other segments. append to array\n\t\t\t\t\tsegmentRows[rowI].push(segment);\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t// first segment in row. create new array\n\t\t\t\t\tsegmentRows[rowI] = [ segment ];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// sort each row\n\t\tfor (rowI=0; rowI<rowCnt; rowI++) {\n\t\t\tsegmentRows[rowI] = sortSegmentRow(\n\t\t\t\tsegmentRows[rowI] || [] // guarantee an array, even if no segments\n\t\t\t);\n\t\t}\n\n\t\treturn segmentRows;\n\t}", "function buildSegmentRows(segments) {\n\t\tvar rowCnt = getRowCnt();\n\t\tvar segmentRows = [];\n\t\tvar segmentI;\n\t\tvar segment;\n\t\tvar rowI;\n\n\t\t// group segments by row\n\t\tfor (segmentI=0; segmentI<segments.length; segmentI++) {\n\t\t\tsegment = segments[segmentI];\n\t\t\trowI = segment.row;\n\t\t\tif (segment.element) { // was rendered?\n\t\t\t\tif (segmentRows[rowI]) {\n\t\t\t\t\t// already other segments. append to array\n\t\t\t\t\tsegmentRows[rowI].push(segment);\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t// first segment in row. create new array\n\t\t\t\t\tsegmentRows[rowI] = [ segment ];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// sort each row\n\t\tfor (rowI=0; rowI<rowCnt; rowI++) {\n\t\t\tsegmentRows[rowI] = sortSegmentRow(\n\t\t\t\tsegmentRows[rowI] || [] // guarantee an array, even if no segments\n\t\t\t);\n\t\t}\n\n\t\treturn segmentRows;\n\t}", "function p(a){\n// Give preference to elements with certain criteria, so they have\n// a chance to be closer to the top.\na.sort(ya);for(var b=[],c=0;c<a.length;c++){\n// loop through subrows, starting with the topmost, until the segment\n// doesn't collide with other segments.\nfor(var d=a[c],e=0;e<b.length&&wa(d,b[e]);e++);\n// `j` now holds the desired subrow index\nb[e]?b[e].push(d):b[e]=[d]}return b}", "function n(a){var b,c,d,e=M(),f=[];\n// group segments by row\nfor(b=0;b<a.length;b++)c=a[b],d=c.row,c.element&&(// was rendered?\nf[d]?\n// already other segments. append to array\nf[d].push(c):\n// first segment in row. create new array\nf[d]=[c]);\n// sort each row\nfor(d=0;d<e;d++)f[d]=o(f[d]||[]);return f}", "function sectSort(arr, start, length) {\n let end = start + length || 0, begin = arr.slice(0, start)\n return length ? begin.concat(arr.slice(start,end).sort((a,b)=>a-b)).concat(arr.slice(end)) : \n begin.concat(arr.slice(start).sort((a,b)=>a-b));\n}", "function subarraySort(array) {\n var startIndex = Infinity;\n var endIndex = -1;\n\n for (var i = 1; i < array.length; i++) {\n for (var j = i-1; j >= 0; j--) {\n if (array[j] > array[i]) {\n startIndex = Math.min(startIndex, j);\n endIndex = i;\n }\n }\n }\n if (startIndex === Infinity) {\n startIndex = -1;\n }\n return [startIndex, endIndex]\n}", "function sort(array) {\n\n\n let l = array.length,\n smallInsert = 6,\n group = Math.floor(l / smallInsert),\n equal = l % smallInsert,\n start = 0,\n end = 0\n for (let i = 0; i < group; i++) {\n start = smallInsert * i\n end = start + smallInsert - 1\n insertSort(array, start, end)\n }\n if (equal) { // if equal, then there is some number not included in group\n insertSort(array, group * smallInsert, l - 1)\n }\n for (let sz = smallInsert; sz < l; sz += sz) {\n for (let lo = 0; lo < l - sz; lo += sz + sz) {\n if (array[lo + sz - 1] > array[lo + sz]) {\n // If this is true, then we need to merge, otherwise, it is already ordered.\n merge(array, lo, lo + sz - 1, Math.min(lo + sz + sz - 1, l - 1), [])\n }\n }\n }\n}", "function subarraySort(array) {\n let subArrStart = -1;\n let subArrEnd = -1;\n let subArrMin = Infinity;\n let subArrMax = -Infinity;\n\n for (let i = 1; i < array.length; i++) {\n if (array[i] < array[i - 1]) {\n if (subArrStart == -1) {\n subArrStart = i;\n }\n subArrEnd = i;\n } else if (subArrStart > -1 && array[i] < array[subArrStart - 1]) {\n subArrEnd = i;\n } else if (subArrStart > -1 && array[i] < subArrMax) {\n subArrEnd = i;\n }\n\n if (subArrStart > -1 && array[i] < subArrMin) {\n subArrMin = array[i];\n }\n\n if (subArrStart > -1 && array[i] > subArrMax) {\n subArrMax = array[i];\n }\n }\n\n for (let j = 0; j < subArrStart; j++) {\n if (array[j] > subArrMin) {\n subArrStart = j;\n return [subArrStart, subArrEnd];\n }\n }\n\n return [subArrStart, subArrEnd];\n}", "function split(array, segments) {\n segments = segments || 2;\n\n var output = [],\n segmentLength = Math.floor(array.length / segments),\n remainder = array.length % segments,\n start = 0,\n i = 0,\n n = array.length,\n len;\n\n while (start < n) {\n len = i++ < remainder ? segmentLength + 1 : segmentLength;\n output.push(array.slice(start, start + len));\n start += len;\n }\n\n return output;\n }", "function subarraySort(array) {\n\tvar minOutofOrder = Infinity;\n\tvar maxOutofOrder = -Infinity;\n\tfor (var i = 0; i < array.length; i++) {\n\t\tvar num = array[i];\n\t\tif (isOutofOrder(i, num, array)) {\n\t\t\tminOutofOrder = Math.min(num, minOutofOrder);\n\t\t\tmaxOutofOrder = Math.max(num, maxOutofOrder);\n\t\t}\n\t}\n\tif (minOutofOrder === Infinity) {\n\t\treturn [-1, -1];\n\t}\n\tvar left = 0;\n\twhile (array[left] <= minOutofOrder) {\n\t\tleft++;\n\t}\n\tvar right = array.length - 1;\n\twhile (array[right] >= maxOutofOrder) {\n\t\tright--;\n\t}\n\treturn [left, right]\n}", "function subarraySort(array) {\n\t// Write your code here.\n\tlet minOutOfOrder = Infinity;\n\tlet maxOutOfOrder = -Infinity;\n\n\tfor (let i = 0; i < array.length; i++) {\n\t\tconst current = array[i];\n\t\tif (isOutOfOrder(i, current, array)) {\n\t\t\tminOutOfOrder = Math.min(minOutOfOrder, current);\n\t\t\tmaxOutOfOrder = Math.max(maxOutOfOrder, current);\n\t\t}\n\t}\n\n\tif (minOutOfOrder === Infinity) return [-1, -1]; //for sorted arrays\n\n\tlet left = 0;\n\tlet right = array.length - 1;\n\twhile (minOutOfOrder >= array[left]) {\n\t\tleft++;\n\t}\n\n\twhile (maxOutOfOrder <= array[right]) {\n\t\tright--;\n\t}\n\n\treturn [left, right];\n}", "function split(array, segments) {\n\t segments = segments || 2;\n\t var results = [];\n\t if (array == null) {\n\t return results;\n\t }\n\n\t var minLength = Math.floor(array.length / segments),\n\t remainder = array.length % segments,\n\t i = 0,\n\t len = array.length,\n\t segmentIndex = 0,\n\t segmentLength;\n\n\t while (i < len) {\n\t segmentLength = minLength;\n\t if (segmentIndex < remainder) {\n\t segmentLength++;\n\t }\n\n\t results.push(array.slice(i, i + segmentLength));\n\n\t segmentIndex++;\n\t i += segmentLength;\n\t }\n\n\t return results;\n\t }", "function merge_sort(left_part,right_part) \n{\n\tvar i = 0;\n\tvar j = 0;\n\tvar results = [];\n\n\twhile (i < left_part.length || j < right_part.length) {\n\t\tif (i === left_part.length) {\n\t\t\t// j is the only index left_part\n\t\t\tresults.push(right_part[j]);\n\t\t\tj++;\n\t\t} \n else if (j === right_part.length || left_part[i] <= right_part[j]) {\n\t\t\tresults.push(left_part[i]);\n\t\t\ti++;\n\t\t} else {\n\t\t\tresults.push(right_part[j]);\n\t\t\tj++;\n\t\t}\n\t}\n\treturn results;\n}", "function mergeSort (array) {\n if (array.length < 2) {\n return array;\n }\n \n var middle_index = Math.floor(array.length / 2);\n // recursive variables\n var left_split = mergeSort(array.slice(0, middle_index));\n var right_split = mergeSort(array.slice(middle_index));\n\n return merge(left_split, right_split);\n}", "function subsets(arr) {\n let results = [];\n\n if (arr.length < 1) return [[]]\n\n for (let i = 0; i < arr.length; i++) {\n for (let j = 0; j < arr.length; j++) {\n let sub = arr.slice(i, j+1);\n\n results.push(sub)\n }\n }\n return results.sort();\n}", "function mSort (array) {\n if (array.length === 1) {\n return array // return once we hit an array with a single item\n }\n const middle = Math.floor(array.length / 2) // get the middle item of the array rounded down\n const left = array.slice(0, middle) // items on the left side\n const right = array.slice(middle) // items on the right side\n return merge(\n mSort(left),\n mSort(right)\n )\n }", "function msort(array) {\n if (array.length <= 1) {\n return array;\n }\n\n let middle = Math.floor(array.length / 2);\n\n let left = array.slice(0, middle);\n let right = array.slice(middle, array.length);\n\n left = msort(left);\n right = msort(right);\n\n return merge(array, left, right);\n}", "function pileup(reads: Interval[]): number[] {\n var rows = new Array(reads.length),\n lastReads = []; // row number --> last Interval in that row\n\n // For each read, find the first row that it will fit in.\n // This is potentially O(n^2) in the number of reads; there's probably a\n // better way.\n for (var i = 0; i < reads.length; i++) {\n var r = reads[i];\n var rowNum = lastReads.length;\n for (var j = 0; j < lastReads.length; j++) {\n if (!r.intersects(lastReads[j])) {\n rowNum = j;\n break;\n }\n }\n rows[i] = rowNum;\n lastReads[rowNum] = r;\n }\n\n return rows;\n}", "function subSort(arr) {\n // didnt get this one. try again\n}", "function sortMain(arr) {\n if (arr.length == 1){\n return arr\n }\n let middleIndex = Math.floor(arr.length / 2)\n let leftSide = arr.slice(0, middleIndex)\n let rightSide = arr.slice(middleIndex)\n\n return merge(sortMain(leftSide), sortMain(rightSide))\n}", "function mergeSorting(arr) {\n if (!arr || !arr.length) {\n return null;\n }\n if (arr.length === 1) {\n return arr;\n }\n\n const middle = Math.floor(arr.length / 2);\n const leftPart = arr.slice(0, middle);\n const rightPart = arr.slice(middle);\n\n return mergeArrays(mergeSorting(leftPart), mergeSorting(rightPart));\n}", "function sortBooks(array) {\n if (array.length <= 1) {\n return array;\n }\n const middle = Math.floor(array.length / 2);\n let left = array.slice(0, middle);\n let right = array.slice(middle, array.length);\n left = sortBooks(left);\n right = sortBooks(right);\n return mergeBooksArray(left, right, array);\n}", "function _shellSort (arr) {\n var increment,\n groupedArr = [],\n defer = new $.Deferred();\n\n if (arr.length > 1) {\n increment = parseInt(arr.length / 2);\n while (increment >= 1) {\n for (var i = 0; i < increment; i++) {\n groupedArr = [];\n groupedArr.length = 0;\n for (var j = 0; j * increment + i< arr.length; j++) {\n groupedArr.push(arr[j * increment + i]);\n };\n groupedArr = _insertionSort(groupedArr);\n for (var j = 0; j < groupedArr.length; j++) {\n arr[j * increment + i] = groupedArr[j];\n };\n };\n\n // document.write(arr.toString() + \"<br>\");\n increment = parseInt(increment / 2);\n }\n }\n\n defer.resolve(arr);\n return defer.promise();\n }", "function mergeSort(array) {\n\n //base case\n if (array.length <= 1) {\n return array;\n }\n\n const middle = Math.floor(array.length /2);\n //middle is included in the left side\n let left = array.slice(0, middle);\n let right = array.slice(middle, array.length);\n\n left = mergeSort(left);\n right = mergeSort(right);\n return merge(left, right, array);\n}", "function segmentItemsByDate(items){\n\t// first let's sort\n\tconsole.log(\"***before sort***\");\n\tprintItems(items);\n\n\n\titems.sort(function(a,b){return new Date(a.planDate).getTime()-new Date(b.planDate).getTime();})\n\n\tconsole.log(\"***after sort***\");\n\tprintItems(items);\n\tvar _segments=new Array();\n\tvar e=0;\n\twhile(items.length>0){\n\t\tconsole.log(\"in outer loop - e: \"+e);\n\t\t_segments[e] = new Array();\n\n\t\tfor (var i=0 ;i<items.length;i++){\n\t\t\t//console.log(\"in inner loop - i: \"+i+ \" i.planDate: \"+items[i].planDate+\"(e: \"+e+\") e.planDate: \"+items[e].planDate);\n\t\t\tif (items[0].planDate == items[i].planDate){\n\t\t\t\tconsole.log(\"***e: \"+e+\" i: \"+i+\" same planDate found\");\n\t\t\t\t_segments[e].push(items[i]);\n\t\t\t\tconsole.log(\"+++++ pushed in _segments[\"+e+\"] id: \"+items[i].id);\n\t\t\t}\n\t\t\tconsole.log(\"e=\"+e);\n\t\t}\n\t\tfor(var j in _segments[e]){\n\t\t\tprintItems(items);\n\t\t\tconsole.log(\"elements.length: \"+items.length);\n\t\t\tconsole.log(\"-> kicking out [\"+j+\"]: id: \"+items[0].id);\n\t\t\tconsole.log(\"e=\"+e);\n\t\t\titems.splice(0,1);\n\t\t}\n\te++;\n\t}\n\tconsole.log(\"...and now ? e=\"+e);\n\n\n\treturn _segments;\n}", "function mergeSort (array) {\n if (array.length <= 1) {\n return array\n }\n let middle = (Math.floor(array.length/2))\n let leftSide = array.slice(0, middle)\n let rightSide = array.slice(middle)\n\n return merge(mergeSort(leftSide), mergeSort(rightSide))\n}", "function mergeSort(inputArray){\n if(inputArray.length <= 1) return inputArray;\n const middle = Math.floor(inputArray.length / 2);\n const leftHalf = inputArray.slice(0, middle);\n const rightHalf = inputArray.slice(middle);\n return mergeSortedArrays(mergeSort(leftHalf), mergeSort(rightHalf));\n}", "function mSort(array) {\n if (array.length <= 1) {\n return array;\n }\n\n const middle = Math.floor(array.length / 2);\n let left = array.slice(0, middle);\n let right = array.slice(middle, array.length);\n\n left = mSort(left);\n right = mSort(right);\n return merge(left, right, array);\n}", "function inssort2(A) {\n var temp;\n for (var i = 1; i < A.length; i++) // Insert i'th record\n for (var j = i; (j > 0) && (A[j] < A[j - 1]); j--) {\n temp = A[j]; A[j] = A[j - 1]; A[j - 1] = temp;\n }\n}", "function shellSort (arr) {\n for (var g = arr.length; g = parseInt(g / 2);) {\n for (var i = g; i < arr.length; i++) {\n var k = arr[i];\n for (var j = i; j >= g && k < arr[j - g]; j -= g) {\n arr[j] = arr[j - g];\n }\n \tarr[j] = k;\n }\n }\n return arr;\n}", "function shellSort(arr) {\n if (arr.length <= 1) return;\n let d = arr.length;\n while (d > 1) {\n d = Math.floor(d / 2);\n for (let i = 0; i < d; i++) {\n for (let j = i + d; j < arr.length; j += d) {\n const tmp = arr[j];\n let p = j;\n while (p >= d && arr[p - d] > tmp) {\n arr[p] = arr[p - d];\n p -= d;\n }\n arr[p] = tmp;\n }\n }\n }\n}", "function calculateVerticals(segments) {\n\t\tvar rowCnt = getRowCnt();\n\t\tvar colCnt = getColCnt();\n\t\tvar rowContentHeights = []; // content height for each row\n\t\tvar segmentRows = buildSegmentRows(segments); // an array of segment arrays, one for each row\n\n\t\tfor (var rowI=0; rowI<rowCnt; rowI++) {\n\t\t\tvar segmentRow = segmentRows[rowI];\n\n\t\t\t// an array of running total heights for each column.\n\t\t\t// initialize with all zeros.\n\t\t\tvar colHeights = [];\n\t\t\tfor (var colI=0; colI<colCnt; colI++) {\n\t\t\t\tcolHeights.push(0);\n\t\t\t}\n\n\t\t\t// loop through every segment\n\t\t\tfor (var segmentI=0; segmentI<segmentRow.length; segmentI++) {\n\t\t\t\tvar segment = segmentRow[segmentI];\n\n\t\t\t\t// find the segment's top coordinate by looking at the max height\n\t\t\t\t// of all the columns the segment will be in.\n\t\t\t\tsegment.top = arrayMax(\n\t\t\t\t\tcolHeights.slice(\n\t\t\t\t\t\tsegment.leftCol,\n\t\t\t\t\t\tsegment.rightCol + 1 // make exclusive for slice\n\t\t\t\t\t)\n\t\t\t\t);\n\n\t\t\t\t// adjust the columns to account for the segment's height\n\t\t\t\tfor (var colI=segment.leftCol; colI<=segment.rightCol; colI++) {\n\t\t\t\t\tcolHeights[colI] = segment.top + segment.outerHeight;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// the tallest column in the row should be the \"content height\"\n\t\t\trowContentHeights.push(arrayMax(colHeights));\n\t\t}\n\n\t\treturn rowContentHeights;\n\t}", "function calculateVerticals(segments) {\n\t\tvar rowCnt = getRowCnt();\n\t\tvar colCnt = getColCnt();\n\t\tvar rowContentHeights = []; // content height for each row\n\t\tvar segmentRows = buildSegmentRows(segments); // an array of segment arrays, one for each row\n\n\t\tfor (var rowI=0; rowI<rowCnt; rowI++) {\n\t\t\tvar segmentRow = segmentRows[rowI];\n\n\t\t\t// an array of running total heights for each column.\n\t\t\t// initialize with all zeros.\n\t\t\tvar colHeights = [];\n\t\t\tfor (var colI=0; colI<colCnt; colI++) {\n\t\t\t\tcolHeights.push(0);\n\t\t\t}\n\n\t\t\t// loop through every segment\n\t\t\tfor (var segmentI=0; segmentI<segmentRow.length; segmentI++) {\n\t\t\t\tvar segment = segmentRow[segmentI];\n\n\t\t\t\t// find the segment's top coordinate by looking at the max height\n\t\t\t\t// of all the columns the segment will be in.\n\t\t\t\tsegment.top = arrayMax(\n\t\t\t\t\tcolHeights.slice(\n\t\t\t\t\t\tsegment.leftCol,\n\t\t\t\t\t\tsegment.rightCol + 1 // make exclusive for slice\n\t\t\t\t\t)\n\t\t\t\t);\n\n\t\t\t\t// adjust the columns to account for the segment's height\n\t\t\t\tfor (var colI=segment.leftCol; colI<=segment.rightCol; colI++) {\n\t\t\t\t\tcolHeights[colI] = segment.top + segment.outerHeight;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// the tallest column in the row should be the \"content height\"\n\t\t\trowContentHeights.push(arrayMax(colHeights));\n\t\t}\n\n\t\treturn rowContentHeights;\n\t}", "function calculateVerticals(segments) {\n\t\tvar rowCnt = getRowCnt();\n\t\tvar colCnt = getColCnt();\n\t\tvar rowContentHeights = []; // content height for each row\n\t\tvar segmentRows = buildSegmentRows(segments); // an array of segment arrays, one for each row\n\n\t\tfor (var rowI=0; rowI<rowCnt; rowI++) {\n\t\t\tvar segmentRow = segmentRows[rowI];\n\n\t\t\t// an array of running total heights for each column.\n\t\t\t// initialize with all zeros.\n\t\t\tvar colHeights = [];\n\t\t\tfor (var colI=0; colI<colCnt; colI++) {\n\t\t\t\tcolHeights.push(0);\n\t\t\t}\n\n\t\t\t// loop through every segment\n\t\t\tfor (var segmentI=0; segmentI<segmentRow.length; segmentI++) {\n\t\t\t\tvar segment = segmentRow[segmentI];\n\n\t\t\t\t// find the segment's top coordinate by looking at the max height\n\t\t\t\t// of all the columns the segment will be in.\n\t\t\t\tsegment.top = arrayMax(\n\t\t\t\t\tcolHeights.slice(\n\t\t\t\t\t\tsegment.leftCol,\n\t\t\t\t\t\tsegment.rightCol + 1 // make exclusive for slice\n\t\t\t\t\t)\n\t\t\t\t);\n\n\t\t\t\t// adjust the columns to account for the segment's height\n\t\t\t\tfor (var colI=segment.leftCol; colI<=segment.rightCol; colI++) {\n\t\t\t\t\tcolHeights[colI] = segment.top + segment.outerHeight;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// the tallest column in the row should be the \"content height\"\n\t\t\trowContentHeights.push(arrayMax(colHeights));\n\t\t}\n\n\t\treturn rowContentHeights;\n\t}", "function mergeSort(array) { // divides the array into a subset of arrays with 1 el each, then calls merge\n if (array.length <= 1) {\n return array;\n }\n\n const middle = Math.floor(array.length / 2);\n let left = array.slice(0, middle);\n let right = array.slice(middle, array.length);\n \n left = mergeSort(left);\n right = mergeSort(right);\n return merge(left, right, array);\n}", "function sortMultiArrayAtIndex(array, index, section) {\n // make array in 2D first\n var array2D = [];\n for (var i = 0; i < array.length; i+=section) {\n var innerArray = [];\n for (var j = 0; j < section; j++) {\n innerArray.push(array[i+j]);\n }\n array2D.push(innerArray);\n }\n\n // put elements to be sored in separate array\n var sortData = [];\n var sortDict = [];\n for (var i = 0; i < array2D.length; i++) {\n sortData.push(array2D[i][index]);\n sortDict[array2D[i][index]] = i;\n }\n\n // sort\n sortData.sort();\n\n // use dictionary to put back sorted data in 2D array\n var sorted2DArray = [];\n for (var i = 0; i < sortData.length; i++) {\n // element to be pushed in\n var elem = sortData[i];\n // get index of element in array2D that holds all the values in each section\n var indexInArray2D = sortDict[elem];\n sorted2DArray.push(array2D[indexInArray2D]);\n }\n return sorted2DArray;\n}", "function calculateVerticals(segments) {\n\t\tvar rowCnt = getRowCnt();\n\t\tvar colCnt = getColCnt();\n\t\tvar rowContentHeights = []; // content height for each row\n\t\tvar segmentRows = buildSegmentRows(segments); // an array of segment arrays, one for each row\n\t\tvar colI;\n\n\t\tfor (var rowI=0; rowI<rowCnt; rowI++) {\n\t\t\tvar segmentRow = segmentRows[rowI];\n\n\t\t\t// an array of running total heights for each column.\n\t\t\t// initialize with all zeros.\n\t\t\tvar colHeights = [];\n\t\t\tfor (colI=0; colI<colCnt; colI++) {\n\t\t\t\tcolHeights.push(0);\n\t\t\t}\n\n\t\t\t// loop through every segment\n\t\t\tfor (var segmentI=0; segmentI<segmentRow.length; segmentI++) {\n\t\t\t\tvar segment = segmentRow[segmentI];\n\n\t\t\t\t// find the segment's top coordinate by looking at the max height\n\t\t\t\t// of all the columns the segment will be in.\n\t\t\t\tsegment.top = arrayMax(\n\t\t\t\t\tcolHeights.slice(\n\t\t\t\t\t\tsegment.leftCol,\n\t\t\t\t\t\tsegment.rightCol + 1 // make exclusive for slice\n\t\t\t\t\t)\n\t\t\t\t);\n\n\t\t\t\t// adjust the columns to account for the segment's height\n\t\t\t\tfor (colI=segment.leftCol; colI<=segment.rightCol; colI++) {\n\t\t\t\t\tcolHeights[colI] = segment.top + segment.outerHeight;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// the tallest column in the row should be the \"content height\"\n\t\t\trowContentHeights.push(arrayMax(colHeights));\n\t\t}\n\n\t\treturn rowContentHeights;\n\t}", "function calculateVerticals(segments) {\n\t\tvar rowCnt = getRowCnt();\n\t\tvar colCnt = getColCnt();\n\t\tvar rowContentHeights = []; // content height for each row\n\t\tvar segmentRows = buildSegmentRows(segments); // an array of segment arrays, one for each row\n\t\tvar colI;\n\n\t\tfor (var rowI=0; rowI<rowCnt; rowI++) {\n\t\t\tvar segmentRow = segmentRows[rowI];\n\n\t\t\t// an array of running total heights for each column.\n\t\t\t// initialize with all zeros.\n\t\t\tvar colHeights = [];\n\t\t\tfor (colI=0; colI<colCnt; colI++) {\n\t\t\t\tcolHeights.push(0);\n\t\t\t}\n\n\t\t\t// loop through every segment\n\t\t\tfor (var segmentI=0; segmentI<segmentRow.length; segmentI++) {\n\t\t\t\tvar segment = segmentRow[segmentI];\n\n\t\t\t\t// find the segment's top coordinate by looking at the max height\n\t\t\t\t// of all the columns the segment will be in.\n\t\t\t\tsegment.top = arrayMax(\n\t\t\t\t\tcolHeights.slice(\n\t\t\t\t\t\tsegment.leftCol,\n\t\t\t\t\t\tsegment.rightCol + 1 // make exclusive for slice\n\t\t\t\t\t)\n\t\t\t\t);\n\n\t\t\t\t// adjust the columns to account for the segment's height\n\t\t\t\tfor (colI=segment.leftCol; colI<=segment.rightCol; colI++) {\n\t\t\t\t\tcolHeights[colI] = segment.top + segment.outerHeight;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// the tallest column in the row should be the \"content height\"\n\t\t\trowContentHeights.push(arrayMax(colHeights));\n\t\t}\n\n\t\treturn rowContentHeights;\n\t}", "function sortData(data)\n\t{\n\t\tfor (let i = 0; i < data.length; i++)\n \t{\n\t \tfor (let j = 0; j < data.length - i - 1; j++)\n\t \t{\n\t \t\tif (+data[j].subCount < +data[j + 1].subCount)\n\t \t\t{\n\t \t\t\tlet tmp = data[j];\n\t \t\t\tdata[j] = data[j + 1];\n\t \t\t\tdata[j + 1] = tmp;\n\t \t\t}\n\t \t}\n \t}\n \treturn data;\n\t}", "function mergeIntervals(arr) {\r\n let end = 1\r\n let start = 0\r\n let size = arr.length\r\n for (let i = 0; i < size-1; i++){\r\n for (let j = i + 1; j < size; j++){\r\n if (arr[i][end] > arr[j][0]) {\r\n if (arr[i][end] < arr[j][end]) {\r\n arr[i][end] === arr[j][end]\r\n deleteElement(arr, j)\r\n deleteElement(arr, arr.length - 1)\r\n\r\n } else {\r\n deleteElement(arr,j)\r\n }\r\n }\r\n else {\r\n continue\r\n }\r\n }\r\n }\r\n return arr\r\n}", "function mergeSort(array) {\n if (array.length <= 1) {\n return array;\n }\n\n const middle = Math.floor(array.length / 2);\n let left = array.slice(0, middle);\n let right = array.slice(middle, array.length);\n\n left = mergeSort(left);\n right = mergeSort(right);\n return merge(left, right, array);\n}", "function mergeSort(array){\n if(array.length < 2){\n return array;\n }\n var middle = Math.floor(array.length/2);\n var left = mergeSort(array.slice(0,middle));\n var right = mergeSort(array.slice(middle, array.length));\n var i = 0;\n var j = 0;\n var output = [];\n while(i < left.length && j < right.length){\n if(left[i] <= right[j]){\n output.push(left[i]);\n i++;\n } else {\n output.push(right[j]);\n j++;\n }\n }\n if(i >= left.length){\n output = output.concat(right.slice(j));\n } else if (j >= right.length) {\n output = output.concat(left.slice(i));\n }\n return output;\n }", "function sortLayoutItemsByColRow(layout\n/*: Layout*/\n)\n/*: Layout*/\n{\n return layout.slice(0).sort(function (a, b) {\n if (a.x > b.x || a.x === b.x && a.y > b.y) {\n return 1;\n }\n\n return -1;\n });\n}", "function sortRows(){\n sortRowsAlphabeticallyUpwards();\n}", "function mergeSort(array) {\n if (array.length <= 1) {\n return array;\n }\n\n const middle = Math.floor(array.length / 2);\n let left = array.slice(0, middle);\n let right = array.slice(middle, array.length);\n\n left = mergeSort(left);\n right = mergeSort(right);\n return merge(left, right, array);\n}", "function mergeSort(array) {\n if (array.length <= 1) {\n return array;\n }\n let i = Math.floor(array.length / 2);\n let lHalf = array.slice(0, i);\n let rHalf = array.slice(i);\n return merge(mergeSort(lHalf), mergeSort(rHalf));\n}", "function mergeSort(array) {\n if (array.length < 2) return array;\n let middle = Math.floor(array.length/2);\n let left = array.slice(0, middle);\n let right = array.slice(middle);\n return merge(mergeSort(left), mergeSort(right));\n\n}", "function sortLayoutItemsByRowCol(layout\n/*: Layout*/\n)\n/*: Layout*/\n{\n // Slice to clone array as sort modifies\n return layout.slice(0).sort(function (a, b) {\n if (a.y > b.y || a.y === b.y && a.x > b.x) {\n return 1;\n } else if (a.y === b.y && a.x === b.x) {\n // Without this, we can get different sort results in IE vs. Chrome/FF\n return 0;\n }\n\n return -1;\n });\n}", "function g_msort(array, on_field, order)\r\n{\r\n if(array.length < 2)\r\n return array;\r\n var middle = Math.ceil(array.length/2);\r\n return g_merge(g_msort(array.slice(0, middle), on_field, order),\r\n g_msort(array.slice(middle), on_field, order),\r\n on_field, order);\r\n}", "function shellSort(arr,comp){\r\n var h = 1;\r\n for(; h < arr.length; h = 3*h+1);\r\n for(; h > 0; h = Math.floor(h / 3)){\r\n for(var i = 0; i < h; i ++){\r\n insertCustom(arr,comp,i,h,arr.length);\r\n }\r\n }\r\n}", "function sortingBooks(arr){\n if(arr.length <= 1){\n return arr; \n }\n\n let middle = Math.floor(arr.length/2); \n let leftArr = arr.slice(0, middle); \n let rightArr = arr.slice(middle,arr.length); \n leftArr = sortingBooks(leftArr); \n rightArr = sortingBooks(rightArr); \n\n return mergeBooks(leftArr, rightArr, arr); \n\n}", "function sort(){\n\t\tfor(var x = 0; x < arrayOfArrays.length; x++){\n\t\t\tif(arrayOfArrays[x].length === 2 && arrayOfArrays[x][0] > arrayOfArrays[x][1]){\n\t\t\t\tswap(0,1,arrayOfArrays[x]);\n\t\t\t}\n\t\t}\n\t}", "function sort(arr) {\n if (arr.length === 1) return arr;\n let n, a;\n for (n = 0, a = 1; a < arr.length; a = 2 * a, n += 1);\n for (let i = 0, j = 1; i <= n; i++ , j = 2 * j) {\n for (let k = 0; k + j < arr.length; k += 2 * j) {\n const a = [];\n let iLo = 0, iHi = k + j;\n for (let l = k; l < k + 2 * j && l < arr.length; l++) {\n let loval = iLo >= a.length ? arr[l][0] : a[iLo][0];\n if (iHi > l) {\n if (iHi >= k + (2 * j) || iHi >= arr.length || loval <= arr[iHi][0]) {\n if (iLo >= a.length) continue;\n a.push(arr[l]);\n arr[l] = a[iLo];\n iLo += 1;\n continue\n }\n }\n a.push(arr[l]);\n arr[l] = arr[iHi];\n iHi += 1;\n }\n }\n }\n return arr;\n }", "function selectSort(arr){\r\n const len = arr.length;\r\n // define a variable to store the minimum index of current interval\r\n let minIndex;\r\n // i is the start point of current interval\r\n for(let i = 0; i < len - 1; i++){\r\n // init minIndex \r\n minIndex = i;\r\n // j is current interval's right limit\r\n for(let j = i; j < len; j++){\r\n // find the smallest data and update index of minIndex \r\n if(arr[j] < arr[minIndex]){\r\n minIndex = j;\r\n }\r\n }\r\n // if minIndex is not current head index, swap them\r\n if(minIndex !== i){\r\n [arr[i], arr[minIndex]] = [arr[minIndex], arr[i]];\r\n }\r\n }\r\n return arr;\r\n}", "function mergeSort(array) {\n //console.log(array)\n if (array.length <= 1) {\n return array;\n }\n \n const middle = Math.floor(array.length / 2);\n let left = array.slice(0, middle);\n let right = array.slice(middle, array.length);\n \n left = mergeSort(left);\n right = mergeSort(right);\n \n return merge(left, right, array);\n }", "function mergeSort(arr){\n if (arr.length<2) return arr\n var middleIndex = Math.floor(arr.length/2)\n var firstHalf = arr.slice(0, middleIndex)\n var secondHalf = arr.slice(middleIndex)\n\n return merge(mergeSort(firstHalf), mergeSort(secondHalf))\n}", "function mergeSort(array) {\n let midpoint = array.length / 2\n let firstHalf = array.slice(0, midpoint)\n let secondHalf = array.slice(midpoint, array.length)\n let sorted;\n\n if (array.length < 2) {\n return array\n } else {\n sorted = merge(mergeSort(firstHalf), mergeSort(secondHalf))\n }\n return sorted\n}", "function mergeSort(array) {\n if (array.length < 2) {\n return array;\n }\n var mid = Math.floor(array.length / 2);\n var left = array.slice(0, mid);\n var right = array.slice(mid);\n\n return stitch(mergeSort(left), mergeSort(right));\n}", "function mergeSort(arr){\n if(arr.length<=1){\n return arr\n }\n\n let mid = Math.floor(arr.length/2)\n let left_half = arr.slice(0,mid)\n let right_half = arr.slice(mid)\n \n let left = mergeSort(left_half)\n let right = mergeSort(right_half)\n\n return merge(left,right)\n}", "function computeSegHorizontals(segs, eventOrderSpecs) {\n // IMPORTANT TO CLEAR OLD RESULTS :(\n for (var _i = 0, segs_2 = segs; _i < segs_2.length; _i++) {\n var seg = segs_2[_i];\n seg.level = null;\n seg.forwardCoord = null;\n seg.backwardCoord = null;\n seg.forwardPressure = null;\n }\n\n segs = Object(_fullcalendar_common__WEBPACK_IMPORTED_MODULE_1__[\"sortEventSegs\"])(segs, eventOrderSpecs);\n var level0;\n var levels = buildSlotSegLevels(segs);\n computeForwardSlotSegs(levels);\n\n if (level0 = levels[0]) {\n for (var _a = 0, level0_1 = level0; _a < level0_1.length; _a++) {\n var seg = level0_1[_a];\n computeSlotSegPressures(seg);\n }\n\n for (var _b = 0, level0_2 = level0; _b < level0_2.length; _b++) {\n var seg = level0_2[_b];\n computeSegForwardBack(seg, 0, 0, eventOrderSpecs);\n }\n }\n\n return segs;\n } // Builds an array of segments \"levels\". The first level will be the leftmost tier of segments if the calendar is", "function mergeSort (array) {\n if (array.length === 1) {\n return array\n }\n // Split Array in into right and left\n const length = array.length;\n const middle = Math.floor(length / 2)\n const left = array.slice(0, middle) \n const right = array.slice(middle)\n // console.log('left:', left);\n // console.log('right:', right);\n\n\n return merge( mergeSort(left), mergeSort(right) );\n}", "function mergeSort(arr){\n var len = arr.length;\n if(len <2)\n return arr;\n var mid = Math.floor(len/2),\n left = arr.slice(0,mid),\n right =arr.slice(mid);\n //send left and right to the mergeSort to broke it down into pieces\n //then merge those\n return merge(mergeSort(left),mergeSort(right));\n}", "function sortSectionsPriceArray(singleRowData) {\n sectionsPriceArray.push(parseInt(singleRowData.gsx$skipass.$t));\n sectionsPriceArray.sort((a, b) => {\n return a - b;\n });\n\n //remove duplicates\n uniqueSectionsPriceArray = [...new Set(sectionsPriceArray)];\n}", "function splitMerge(array) {\n if (array.length <= 1) {\n return array;\n }\n // Split array on two halves.\n const middle = Math.floor(array.length / 2);\n const leftArray = array.slice(0, middle);\n const rightArray = array.slice(middle, originalArray.length);\n\n // Sort two halves of split array\n const leftSortedArray = splitMerge(leftArray);\n const rightSortedArray = splitMerge(rightArray);\n\n // Merge two sorted arrays into one.\n return merge(leftSortedArray, rightSortedArray);\n }", "function quickSort (arr, lo = 0, hi = arr.length - 1) {\n if (lo < hi) {\n let p = partition(arr, lo, hi) // find where to split (partition index)\n quickSort(arr, lo, p - 1) // sort 'partitioned' lower array\n quickSort(arr, p + 1, hi) // sort 'partitioned' upper array\n }\n return arr\n}", "function sort(results){\r\n var swap=0;\r\n var view = new Array();\r\n for(var i=0; i<results.length; i++){\r\n view.push(data[results[i]].views);\r\n }\r\n for(var i=results.length-1; i>0; i--){\r\n for(var j=0; j<i; j++){\r\n if(view[j]<view[j+1]){\r\n var temp = results[j];\r\n results[j] = results[j+1];\r\n results[j+1] = temp;\r\n temp = view[j];\r\n view[j] = view[j+1];\r\n view[j+1]=temp;\r\n swap = 1; \r\n }\r\n }\r\n if(swap == 0){break;}\r\n } \r\n}", "function selectionSort(arr) {\n let sv;\n for (let i = 0; i < arr.length; i++) {\n sv = i;\n for (let j = i + 1; j < arr.length; j++) {\n if (arr[j] < arr[sv]) {\n sv = j;\n }\n }\n if (sv !== i) {\n [arr[i], arr[sv]] = [arr[sv], arr[i]];\n }\n }\n return arr;\n}", "function mergeSort (arr) {\n // console.log('in mergesort', arr)\n if (arr.length === 1) {\n return arr;\n }\n // split the array into right and left\n const left = arr.splice(0, arr.length/2);\n const right = arr;\n\n return merge(\n mergeSort(left),\n mergeSort(right)\n );\n}", "function shellSort(array){\n let len = array.length\n let gap = 1\n let temp\n let space = 3\n\n //这里小于len/space是为了确保下次gap增加时产生的新的gap不超过len,(这一步是在计算最大的gap是好大,以后每次gap就除以space来得到之后的gap)\n while(gap<len/space){\n gap = gap * space + 1\n }\n\n for(gap;gap>0;gap = Math.floor(gap/space)){\n //从i=gap是因为这是除了第一个元素(对不同的序列,array中的0到gap-1是这些不同序列的第一个元素)之后的第二个元素,对只有一个元素的不需要插入排序\n for(let i = gap;i!=len;i++){\n temp = array[i]\n //从i-gap开始是因为默认将当前元素i与之前的元素比较\n for(var j=i-gap;j>=0&&array[j]>temp;j-=gap){\n array[j+gap] = array[j]\n }\n array[j+gap] = temp\n }\n }\n\n return array\n}", "function selectionSort(array){\n for(let i = 0; i < array.length - 1; ++i){\n let min = i;\n for(let j = i + 1; j < array.length; ++j){\n if(array[j] < array[min]){\n min = j;\n }\n }\n [array[min], array[i]] = [array[i], array[min]];\n }\n return array;\n}", "function mergeSort(array) {\n if (array.length === 1) {\n return array;\n } else {\n let arr1 = split(array)[0], arr2 = split(array)[1];\n return merge([mergeSort(arr1), mergeSort(arr2)]);\n }\n}", "function mergeSort(arr) {\n if (arr.length < 2)\n return arr;\n \n var middle = parseInt(arr.length / 2);\n var left = arr.slice(0, middle);\n var right = arr.slice(middle, arr.length);\n \n return merge(mergeSort(left), mergeSort(right));\n }", "function _sort(array) {\n var temp = [];\n for (var i=array.length-1; i>0; i--) {\n for (var j=0; j<i; j++) {\n if (array[j].length > array[j+1].length) {\n temp = array[j];\n array[j] = array[j+1];\n array[j+1] = temp;\n }\n }\n }\n return array;\n }", "function _sort(array) {\n var temp = [];\n for (var i=array.length-1; i>0; i--) {\n for (var j=0; j<i; j++) {\n if (array[j].length > array[j+1].length) {\n temp = array[j];\n array[j] = array[j+1];\n array[j+1] = temp;\n }\n }\n }\n return array;\n }", "function mergeSort(arr) {\n if (arr.length < 2) return arr;\n var middleIndex = Math.floor(arr.length / 2);\n var firstHalf = arr.slice(0, middleIndex);\n var secondHalf = arr.slice(middleIndex);\n return merge(mergeSort(firstHalf), mergeSort(secondHalf));\n}", "function mergeSort (arr) {\n if (arr.length < 2) {\n // return once we hit an array with a single item\n return arr;\n }\n \n const middle = Math.floor(arr.length / 2) // get the middle item of the array rounded down\n const left = arr.slice(0, middle) // items on the left side\n const right = arr.slice(middle) // items on the right side\n \n return merge(\n mergeSort(left),\n mergeSort(right)\n )\n}", "function selectionsortArray(arrayIn)\n{\n\tvar min = arrayIn[0],\n\t\tmax = arrayIn[arrayIn.length - 1],\n\t\tminindex = 0,\n\t\tmaxindex = arrayIn.length - 1;\n\n\tvar temp;\n\n\tfor(var i = 0; i < Math.floor((arrayIn.length - 1) / 2); i += 1)\n\t{\n\t\tmin = arrayIn[i];\n\t\tminindex = i;\n\t\tmax = arrayIn[arrayIn.length - 1 - i];\n\t\tmaxindex = arrayIn.length - 1 - i;\n\t\tfor(var j = i + 1; j < (arrayIn.length - i); j += 1)\n\t\t{\n\t\t\tif (arrayIn[j] < min)\n\t\t\t{\n\t\t\t\tmin = arrayIn[j];\n\t\t\t\tminindex = j;\n\t\t\t}\n\t\t\telse if (arrayIn[j] > max)\n\t\t\t{\n\t\t\t\tmax = arrayIn[j];\n\t\t\t\tmaxindex = j;\n\t\t\t}\n\t\t}\n\t\tif (minindex > i)\n\t\t{\n\t\t\ttemp = arrayIn[i];\n\t\t\tarrayIn[i] = arrayIn[minindex];\n\t\t\tarrayIn[minindex] = temp;\n\t\t}\n\t\tif (maxindex < arrayIn.length - 1 - i)\n\t\t{\n\t\t\ttemp = arrayIn[arrayIn.length - 1 - i];\n\t\t\tarrayIn[arrayIn.length - 1 - i] = arrayIn[maxindex];\n\t\t\tarrayIn[maxindex] = temp;\n\t\t}\n\t}\n\treturn arrayIn;\n}", "function mergeSort(array) {\n if (array.length <= 1) {\n return array;\n }\n const middle = Math.floor(array.length / 2);\n let left = array.slice(0, middle);\n let right = array.slice(middle, array.length);\n console.log(left, right);\n left = mergeSort(left);\n right = mergeSort(right);\n return merge(left, right, array);\n}", "function mergeSort(array) {\r\n //まずアレイを一つずつ要素が入った子アレイを持つ親アレイにする。\r\n const decomposedArray = [];\r\n for (let ele of array) {\r\n decomposedArray.push([ele]);\r\n }\r\n\r\n //バラバラになったアレイdecomposedArrayを最終的に並べ替えて一つのアレイにする関数に渡す。この関数は、下に定義。\r\n return reduceArray(decomposedArray);\r\n\r\n //(1)親アレイの要素を半数にする関数(2)を、要素が1つになるまで繰り返す関数。\r\n function reduceArray(array) {\r\n if (array.length === 1) {\r\n return array[0];\r\n }\r\n array = halveArray(array);\r\n return reduceArray(array);\r\n }\r\n\r\n //(2)親アレイの子アレイを(3)を使って二つずつを一つにして半分の要素にする関数。\r\n function halveArray(array, newArray = []) {\r\n if (array.length === 0) {\r\n return newArray;\r\n }\r\n if (array.length === 1) {\r\n newArray.push(array[0]);\r\n array.shift();\r\n return halveArray(array, newArray);\r\n }\r\n newArray.push(mergeTwo(array[0], array[1]));\r\n array.shift();\r\n array.shift();\r\n // console.log(array.length);\r\n return halveArray(array, newArray);\r\n }\r\n\r\n // (3)二つのアレイを小さい要素からマージする関数を定義\r\n function mergeTwo(array1, array2, newArray = []) {\r\n //array1もarray2も空のとき\r\n if (array1.length === 0 && array2.length === 0) {\r\n return newArray;\r\n }\r\n if (array1.length === 0) {\r\n newArray.push(array2[0]);\r\n array2.shift();\r\n return mergeTwo(array1, array2, newArray);\r\n }\r\n if (array2.length === 0) {\r\n newArray.push(array1[0]);\r\n array1.shift();\r\n return mergeTwo(array1, array2, newArray);\r\n }\r\n if (array1[0] <= array2[0]) {\r\n newArray.push(array1[0]);\r\n array1.shift();\r\n\r\n return mergeTwo(array1, array2, newArray);\r\n }\r\n newArray.push(array2[0]);\r\n array2.shift();\r\n return mergeTwo(array1, array2, newArray);\r\n }\r\n}", "function subdivide(rect, nodes, row, side, dir) {\n var n = nodes[0];\n\n if (row.length <= 0 ||\n worst(row, side) >= worst(row.concat([n]), side)) {\n var remaining = nodes.slice(1);\n if (remaining.length <= 0) {\n layoutRow(rect, row.concat([n]), dir);\n } else {\n subdivide(rect, remaining, row.concat([n]), side, dir);\n }\n } else {\n var fillCost = sumCosts(row);\n var nextCost = sumCosts(nodes);\n var cost = fillCost + nextCost;\n var fillRect = undefined;\n var nextRect = undefined;\n if (dir === TreeMap.HORI) {\n var w = rect.w * fillCost / cost;\n fillRect = _this.mkRect(rect.x, rect.y, w, rect.h);\n nextRect = _this.mkRect(\n rect.x + w, rect.y, rect.w - w, rect.h);\n } else {\n var h = rect.h * fillCost / cost;\n fillRect = _this.mkRect(rect.x, rect.y, rect.w, h);\n nextRect = _this.mkRect(\n rect.x, rect.y + h, rect.w, rect.h - h);\n }\n\n layoutRow(fillRect, row, dir);\n squarify(nextRect, nodes);\n }\n }", "function mergeSort(arr){\n if(arr.length <= 1) return arr\n let middle = Math.floor(arr.length/2)\n let left = mergeSort(arr.slice(0,middle))\n let right = mergeSort(arr.slice(middle))\n return merge(left,right)\n}", "function doMergeSort( arr ) {\n\t\t// Initialize empty array for 'sorted' values.\n\t\tvar sorted = [];\n\t\tvar position;\n\t\tvar sorted_arr_pos;\n\t\tvar arr_is_even = ( arr.length % 2 === 0 );\n\n\t\t// If `arr` has more than 1x member:\n\t\tif ( arr.length > 1 ) {\n\n\t\t\t// Add empty arrays to `sorted`.\n\t\t\twhile ( sorted.length < Math.floor( arr.length / 2 ) ) {\n\t\t\t\tsorted.push( [] );\n\t\t\t}\n\n\t\t\t// Loop over contents of `arr`.\n\t\t\t// ...\n\t\t\tfor ( var i = 0, x = arr.length; i < x; i++ ) {\n\t\t\t\t// Set `position` equal to current value of `i`.\n\t\t\t\t// A separate variable is required, as we may need to change the value of\n\t\t\t\t// `position` within the current loop iteration.\n\t\t\t\tposition = i;\n\n\t\t\t\t// Set `sorted_arr_pos` to the current `position` divided by 2, rounded down.\n\t\t\t\t// This var stores the position of the empty array that we'll be sorting *into*.\n\t\t\t\tsorted_arr_pos = Math.floor( position / 2 );\n\n\t\t\t\t// If current index is *not* an even number, skip current iteration.\n\t\t\t\tif ( i % 2 !== 0 ) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\t// Block below handles special cases where:\n\t\t\t\t// - Current iteration is last in array;\n\t\t\t\t// - Array length is an odd number (eg. 5).\n\t\t\t\t//\n\t\t\t\t// TODO:\n\t\t\t\t// Expand on support comment/documentation\n\t\t\t\tif ( i === arr.length - 1 && !arr_is_even ) {\n\t\t\t\t\t// Set `arr[ position - 1 ]` equal to `sorted[ sorted.length - 1 ]`;\n\t\t\t\t\tarr[ position - 1 ] = sorted[ sorted.length - 1 ];\n\n\t\t\t\t\t// Empty last sub-array within `sorted`.\n\t\t\t\t\tsorted[ sorted.length - 1 ] = [];\n\n\t\t\t\t\t// Decrement `position` and `sorted_arr_pos`.\n\t\t\t\t\tposition--;\n\t\t\t\t\tsorted_arr_pos--;\n\t\t\t\t}\n\n\t\t\t\t// If both the array member at `position` and `position + 1` are not emtpy:\n\t\t\t\t// - Compare the first members of the arrays at `position and `position + 1`;\n\t\t\t\t// - ...\n\t\t\t\twhile ( arr[ position ].length && arr[ position + 1 ].length ) {\n\t\t\t\t\tif ( arr[ position ][ 0 ] > arr[ position + 1 ][ 0 ] ) {\n\t\t\t\t\t\tsorted[ sorted_arr_pos ].push( arr[ position ].shift() );\n\t\t\t\t\t} else {\n\t\t\t\t\t\tsorted[ sorted_arr_pos ].push( arr[ position + 1 ].shift() );\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// If either of the arrays being compared *are not* empty:\n\t\t\t\t// Add any remaining members to array at `sorted_arr_pos`.\n\t\t\t\tif ( arr[ position ].length ) {\n\t\t\t\t\tsorted[ sorted_arr_pos ] = sorted[ sorted_arr_pos ].concat( arr[ position ] );\n\t\t\t\t} else if ( arr[ position + 1 ].length ) {\n\t\t\t\t\tsorted[ sorted_arr_pos ] = sorted[ sorted_arr_pos ].concat( arr[ position + 1 ] );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Rescursively call `doMergeSort()` with `sorted` array.\n\t\t\t// Assign result to original `arr` arg.\n\t\t\tarr = doMergeSort( sorted );\n\n\t\t// Else if `arr` has exactly 1x member which is an array:\n\t\t// - sorting process is complete;\n\t\t// - ...\n\t\t} else if ( arr.length === 1 && Array.isArray( arr[ 0 ] ) ) {\n\n\t\t\t// Return sorted array to initial callsite.\n\t\t\treturn arr[ 0 ].reverse();\n\t\t}\n\n\t\t// Return updated array to callsite, which will be either:\n\t\t// - `doMergeSort()` (in the case of a recusive function call);\n\t\t// - OR\n\t\t// - outermost context (in case where initial invocation received invalid args.).\n\t\treturn arr;\n\t}", "function mergeSort(array) {\n if (array.length <= 1) return array;\n const mid = Math.floor(array.length / 2);\n const left = mergeSort(array.slice(0, mid));\n const right = mergeSort(array.slice(mid));\n return merge(left, right);\n}", "function mergeSort(arr) {\n if (arr.length === 1) {\n return arr;\n }\n let middle = Math.floor(arr.length/2);\n let left = arr.slice(0, middle);\n let right = arr.slice(middle, arr.length);\n\n return merged(mergeSort(left), mergeSort(right));\n\n}", "function getThisStreetShortSortedPoints(streetSegments) {\n //console.log(streetSegments);\n streetSegments.map(function(d) {\n points = points.concat(d.geometry.coordinates);\n\n sortedPoints = points.sort( function(a,b) { return a[1] - b[1]; });\n shortSortedPoints = sortedPoints.filter(function(d, i) { return i%4 === 0; });\n });\n}", "function mergeSort (arr) {\n if (arr.length === 1) {\n // return once we hit an array with a single item\n return arr\n }\n\n var middle = Math.floor(arr.length / 2) // get the middle item of the array rounded down\n var left = arr.slice(0, middle) // items on the left side\n var right = arr.slice(middle) // items on the right side\n\n return merge(\n mergeSort(left),\n mergeSort(right)\n )\n}", "function sortRecords() {\r\n let rows, switching, i, x, y, shouldSwitch;\r\n switching = true\r\n while (switching) {\r\n switching = false;\r\n rows = recordTable.rows;\r\n for (i = 0; i < (rows.length - 1); i++) {\r\n shouldSwitch = false;\r\n x = rows[i].getElementsByTagName(\"td\")[0];\r\n y = rows[i + 1].getElementsByTagName(\"td\")[0];\r\n if (x.textContent > y.textContent) {\r\n shouldSwitch = true;\r\n break;\r\n }\r\n }\r\n if (shouldSwitch) {\r\n rows[i].parentNode.insertBefore(rows[i + 1], rows[i]);\r\n switching = true;\r\n }\r\n }\r\n}", "function sortAndMulti(arr) {\n \n var newArr;\n \n for (var i = 0; i < arr.length; i++) { // za redjanje od najmanjeg do najveceg\n for (var j = i + 1; j < arr.length; j++) {\n if (arr[i] > arr[j]) {\n newArr = arr[i];\n arr[i] = arr[j];\n arr[j] = newArr;\n\n }\n\n } \n \n arr[i] *= 2;\n }\n \n return arr;\n}" ]
[ "0.8081443", "0.8081443", "0.8081443", "0.8081443", "0.8081443", "0.7462707", "0.7462707", "0.7462707", "0.7462707", "0.7462707", "0.6796347", "0.6189457", "0.590161", "0.5885046", "0.58662325", "0.5813573", "0.57409585", "0.5733304", "0.5633917", "0.560778", "0.5563182", "0.5480351", "0.5474682", "0.54546916", "0.5444608", "0.5443099", "0.54235345", "0.54221374", "0.5409756", "0.54096437", "0.5405208", "0.5403199", "0.53947556", "0.5376509", "0.5351531", "0.5350062", "0.5348247", "0.53215", "0.5316598", "0.53142524", "0.53142524", "0.53142524", "0.5299004", "0.52955186", "0.52847767", "0.52847767", "0.5259904", "0.5259112", "0.5254901", "0.52396417", "0.52316916", "0.5228334", "0.522752", "0.52244276", "0.5224299", "0.522426", "0.5221974", "0.5215205", "0.5214839", "0.521313", "0.5209282", "0.51905686", "0.51889", "0.5179795", "0.51775813", "0.5171525", "0.5159642", "0.51595384", "0.5153566", "0.5153128", "0.51508427", "0.5150562", "0.5147118", "0.5144242", "0.51199037", "0.51149213", "0.5110319", "0.50996435", "0.5097976", "0.50967056", "0.50953054", "0.50953054", "0.507474", "0.5073631", "0.506909", "0.5068827", "0.5061827", "0.50481415", "0.5027334", "0.50249225", "0.5022444", "0.50208575", "0.5019118", "0.500876", "0.5007909", "0.50062746" ]
0.72401166
13
Return an array of jQuery objects for the placeholder content containers of each row. The content containers don't actually contain anything, but their dimensions should match the events that are overlaid on top.
function getRowContentElements() { var i; var rowCnt = getRowCnt(); var rowDivs = []; for (i=0; i<rowCnt; i++) { rowDivs[i] = allDayRow(i) .find('div.fc-day-content > div'); } return rowDivs; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function createContainers() {\n\t\t\t\t//console.log('Creating containers...');\n\t\t\t\t// Define html to be prepended to the body\n\t\t\t\tvar qfInner = \"<div id=\\\"qfCloseContainer\\\">&times;</div>\\n<div id=\\\"qfSheetContent\\\"></div>\";\n\t var qfSheetContainer = \"<div id=\\\"qfSheetContainer\\\">\" + qfInner + \"</div>\";\n\t\t\t\tvar qfDimmer = \"<div id=\\\"qfDimmer\\\"></div>\";\n\t\t\t\tvar qfSpinner = \"<div id=\\\"qfSpinner\\\"></div>\";\n\t\t\t\n\t\t\t\t// Prepend the containers and remove the body scrollbars\n $('body').css('overflow','hidden').prepend(qfSheetContainer, qfDimmer, qfSpinner);\n\t\t\n\t\t\t\t// Hide the containers immediately\n\t\t\t\t$('#qfDimmer').hide().fadeIn(250);\n\t\t\t\t$('#qfSheetContainer, #qfSpinner').hide();\n\t\t\t}", "function init(){\n var temp = document.createElement(\"div\"),\n body = $(\"body\"),\n /* itemsToAdd array contains the list of elements to be inserted\n field - The key under which a reference to DOM element will be stored in internal handles object\n id - Actual id of the element\n cssClass - The CSS style class which will be applied\n container - The generated item will be appended to what is specified as the container */\n itemsToAdd = [\n { field: \"mask\", id: \"msgMask\", cssClass: \"toasty_msgMask\", container: body },\n { field: \"measurebox\", id: \"msgMeasureBox\", cssClass: \"toasty_msgMeasureBox\", container: body },\n { field: \"container_br\", id: \"container_br\", cssClass: \"toasty_msgContainer br\", container: body },\n { field: \"container_bl\", id: \"container_bl\", cssClass: \"toasty_msgContainer bl\", container: body },\n { field: \"container_tr\", id: \"container_tr\", cssClass: \"toasty_msgContainer tr\", container: body },\n { field: \"container_tl\", id: \"container_tl\", cssClass: \"toasty_msgContainer tl\", container: body },\n { field: \"tc_holder\", id: \"tc_holder\", cssClass: \"toasty_msgContainer tc\", container: body },\n { field: \"container_tc\", id: \"container_tc\", cssClass: \"toasty_subContainer\", container: \"#tc_holder\" },\n { field: \"bc_holder\", id: \"bc_holder\", cssClass: \"toasty_msgContainer bc\", container: body },\n { field: \"container_bc\", id: \"container_bc\", cssClass: \"toasty_subContainer\", container: \"#bc_holder\" }\n ],\n i,\n maxI,\n item,\n domSearch;\n\n for(i = 0, maxI = itemsToAdd.length; i < maxI; i++) {\n item = itemsToAdd[i];\n domSearch = $(\"#\"+item.id);\n if (domSearch.length > 0) {\n handles[item.field] = domSearch;\n } else {\n handles[item.field] = $(\"<div id='\" + item.id + \"' class='\" + item.cssClass + \"'></div>\").appendTo(item.container);\n }\n }\n\n initialized = true;\n }", "function LoadDivs(input) {\n\n const container = [];\n\n for (var i = 0; i < input; i++) {\n\n container[i] = document.createElement('div');\n container[i].classList.add('content');\n container[i].addEventListener('mouseover', function (e) {\n e.target.style.background = RandomColor();\n\n });\n\n bigContainer.appendChild(container[i]);\n\n }\n\n}", "function build_sliders(){\n var total_rows = Math.ceil(sliders.length/3);\n var slider_count = 0;\n for (var i = 0; i < total_rows; i++){\n var slider_div = document.getElementById(\"drag_container\");\n for (var j = 0; j<3; j++){\n if(slider_count < sliders.length){\n $(sliders[slider_count]['obj']).appendTo($(slider_div));\n $(sliders[slider_count]['obj']).children().children().eq(1).remove(\"div\"); // remove the freaking autogenerated input field....\n slider_count = slider_count+1;\n }\n }\n $(slider_div).appendTo($(\"#drag_container\")).trigger(\"create\");\n }\n}", "function divChildren(container) {\r\n\tvar res = [];\r\n\r\n\tif(container) {\r\n\t\tvar children = container.children();\r\n\r\n\t\tif(children.length == 0)\r\n\t\t\treturn res;\r\n\r\n\t\tfor(var i = 0; i < children.length; i++) {\r\n\t\t\tif(children[i].tagName == 'DIV' && ! $(children[i]).hasClass(\"content\") && children[i].id != 'helper-container' && $(children[i]).hasClass('container')) {\r\n\r\n\t \t\tres.push(children[i]);\r\n \t\t}\r\n\t\t}\r\n\t}\r\n\r\n\treturn res;\r\n}", "function loadWidgets(){\r\n\tvar reSort= new Array();\r\n\t\r\n\tfor ( widget in app[\"userData\"][\"containers\"]){\r\n\t\t//if(\tapp[\"userData\"][\"containers\"][widget][\"tab\"] == app[\"userData\"][\"tabs\"][tabVal][\"id\"]){\r\n\t\t\t//crea el container\r\n\t\t\tif(app[\"userData\"][\"containers\"][widget][\"row\"] != null ){\r\n\t\t\t\t//someLoaded=false;\r\n\t\t\t\tfoundPos=false;\r\n\t\t\t\tcurDomWid=$('#tabs' + app[\"userData\"][\"containers\"][widget][\"tab\"] + ' #column_' +app[\"userData\"][\"containers\"][widget][\"col\"] + '_'+ app[\"userData\"][\"containers\"][widget][\"tab\"]).children(\":first\");\r\n\t\t\t\t\r\n\t\t\t\twhile(curDomWid.length > 0){//existen widgets en la columna\r\n\t\t\t\t\t\r\n\t\t\t\t\tcurrent=curDomWid.attr(\"id\");\r\n\t\t\t\t\tcurrent=current.substring(10);\r\n\t\t\t\t\tif(app[\"userData\"][\"containers\"][current][\"row\"] > app[\"userData\"][\"containers\"][widget][\"row\"]){//si encontramos la posicion\r\n\t\t\t\t\t\tfoundPos=true;\r\n\t\t\t\t\t\tcurDomWid.before('<div id=\"container_'+widget+'\" class=\"widget movable collapsable editable removable closeconfirm\"></div>');\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tcurDomWid=curDomWid.next(\".widget\");\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif(!foundPos){\r\n\t\t\t\t\t//cargamos al final del conenedor\r\n\t\t\t\t$('#tabs' + app[\"userData\"][\"containers\"][widget][\"tab\"] + ' #column_' + app[\"userData\"][\"containers\"][widget][\"col\"] + '_'+app[\"userData\"][\"containers\"][widget][\"tab\"]).append('<div id=\"container_'+widget+'\" class=\"widget movable collapsable editable removable closeconfirm\"></div>');\r\n\t\t\t\t}\t\r\n\t\t\t}else{\r\n\t\t\t\t//agregamos al final, pero se reordenan los ordenes al final para la columna\r\n\t\t\t\tapp[\"userData\"][\"containers\"][widget][\"row\"]=30000;\r\n\t\t\t\t$('#tabs' + app[\"userData\"][\"containers\"][widget][\"tab\"] + ' #column_' + app[\"userData\"][\"containers\"][widget][\"col\"] + '_'+app[\"userData\"][\"containers\"][widget][\"tab\"]).append('<div id=\"container_'+widget+'\" class=\"widget movable collapsable editable removable closeconfirm\"></div>');\r\n\t\t\t\treSort.push(widget);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t//titulo con icono\r\n\t\t\t$('#container_'+widget).append('<div class=\"widget-header\"><div class=\"text\"><img src=\"'+app[\"userData\"][\"containers\"][widget][\"widgetPreferences\"][\"icon\"]+'\" />'+ app[\"userData\"][\"containers\"][widget][\"title\"] +'</div></div>');\r\n\t\t\t//creamos la caja edit vacķa\r\n\t\t\t$('#container_'+widget).append('<div class=\"widget-editbox\"> </div>');\r\n\t\t\t//contenido, el BW carga el widget acį\r\n\t\t\t$('#container_'+widget).append('<div class=\"widget-content\" id=\"wcontent_'+widget+'\"> </div>');\r\n\t\t\t\r\n\t\t\tvar BW = new UWA.BlogWidget( {\r\n\t\t\t\tcontainer: document.getElementById('wcontent_'+widget),\r\n\t\t\t\tmoduleUrl: app[\"userData\"][\"containers\"][widget][\"widgetURL\"] } );\r\n\t\t\tBW.setConfiguration(\r\n\t\t\t\t{ 'borderWidth':'1', 'color':'#aaaaaa', 'displayTitle':false, 'displayFooter':false } );\r\n\r\n \t\tvar prefs = {};\r\n\t\t $.each(app['userData']['containers'][widget]['preferenceValues'], function() {\r\n\t\t if (prefs[this.name]) {\r\n\t\t if (!prefs[this.name].push) {\r\n\t\t prefs[this.name] = [prefs[this.name]];\r\n\t\t }\r\n\t\t prefs[this.name].push(this.value || '');\r\n\t\t } else {\r\n\t\t prefs[this.name] = this.value || '';\r\n\t\t }\r\n\t\t });\r\n\t\r\n\t\t\tBW.setPreferencesValues(prefs);\r\n\t\t\tfeed = app[\"userData\"][\"containers\"][widget][\"widgetPreferences\"][\"preferences\"];\r\n\t\t\teditObj = $('#container_'+widget+' .widget-editbox');\r\n\t\t\t\r\n\t\t\t//ańadimos lo necesario a la caja de edit\r\n\t\t\tsetPrefs(feed,editObj,BW, prefs);\r\n\t}\r\n\r\n\tfor(widget in reSort) resortContainer(widget);\r\n\t$.fn.EasyWidgets({\r\n\t\t//textos en espańol\r\n\t\ti18n : {\r\n\t\t editText : 'Editar',\r\n\t\t closeText : 'Cerrar',\r\n\t\t extendText : 'Extender',\r\n\t\t collapseText : 'Colapsar',\r\n\t\t cancelEditText : 'Cancelar',\r\n\t\t editTitle : 'Editar este widget',\r\n\t\t closeTitle : 'Cerrar este widget',\r\n\t\t confirmMsg : 'Remover este widget?',\r\n\t\t cancelEditTitle : 'Cancelar edicion',\r\n\t\t extendTitle : 'Extender este widget',\r\n\t\t collapseTitle : 'Colapsar este widget'\r\n\t\t },\r\n\t\t//permitir efectos al manipular los contenedores de widgets\r\n\t\teffects : {\r\n\t\t effectDuration : 100,\r\n\t\t widgetShow : 'slide',\r\n\t\t widgetHide : 'slide',\r\n\t\t widgetClose : 'slide',\r\n\t\t widgetExtend : 'slide',\r\n\t\t widgetCollapse : 'slide',\r\n\t\t widgetOpenEdit : 'slide',\r\n\t\t widgetCloseEdit : 'slide',\r\n\t\t widgetCancelEdit : 'slide'\r\n\t\t},\r\n\t\tcallbacks : {\r\n\t\t\t//al arrastrar un widget, actualizar el array de posiciones\r\n\t\t\tonDragStop: function(e,id){\r\n\t\t\t\twid=id[\"item\"][\"context\"][\"id\"];\r\n\t\t\t\twid=wid.substring(10)\r\n\t\t\t\tupdateArray(wid);\r\n\t\t\t},\r\n\t\t\t//al cerrar un widget, actualizar la DB, sacįndolo del tab\r\n\t\t\tonClose: function(e, id){\r\n\t\t\t\twid=id[0][\"id\"];\r\n\t\t\t\twid=wid.substring(10);\r\n\t\t\t\t$.ajax({\r\n\t\t\t\t url: \"/containers/\" + app[\"userData\"][\"containers\"][wid][\"id\"] + \".js\",\r\n\t\t\t\t type: \"POST\",\r\n\t\t\t\t data: \"_method=delete\",\r\n\t\t\t\t});\r\n\t\t\t }\r\n\t\t}\r\n\t});\r\n}", "createContentItems(content) {\n const count = content.length;\n const result = new Array(count);\n for (let i = 0; i < content.length; i++) {\n result[i] = this.layoutManager.createContentItem(content[i], this);\n }\n return result;\n }", "function add_placeholding_els(){\n var placeholders = [],\n i,\n len = 3;\n\n for (i = 0; i < len; i += 1) {\n //NOTE: We make it moveSAN to make the ellipse bold.\n //NOTE: Don't add ellipse on checkmate (unless we're adding the placeholder earlier (i.e., we're black)).\n placeholders[i] = makeElm('div',\n {\n class: 'move-cell move-san move' + (color == 'w' ? 'b' : 'w') + ' move-row' + even_odd,\n text: i === 0 && (color === \"b\" || san.slice(-1) !== \"#\") ? \"\\u2026\" : \"\\u00a0\"\n }); // \\u2026 is ellipse; \\u00a0 is non-breaking space.\n rows[cur_row].row_el.append(placeholders[i]);\n }\n\n rows[cur_row].placeholders = placeholders;\n }", "function renderUI(rows) {\n for (var i = 0; i < rows.length; i++) {\n var columnWidth = 600 / rows[i].columns.length;\n var rowDiv = \"\",\n columnDiv = \"\",\n columnGroup = \"\",\n eventItem = \"\";\n for (var j = rows[i].columns.length - 1; j >= 0; j--) {\n var columns = rows[i].columns[j].events;\n eventItem = \"\";\n for (var k = 0; k < columns.length; k++) {\n eventItem = eventItem + '<div class=\"event-item\" style=\"width:' + columnWidth + 'px;top:' + columns[k].start + 'px;\"><div style=\"background-color:' + columns[k].color + '\"></div><div>' + columns[k].label + '</div></div>';\n }\n columnGroup = columnGroup + '<div class=\"column\" style=\"width:' + columnWidth + 'px;\">' + eventItem + '</div>';\n }\n rowDiv = rowDiv + '<div class=\"row\">' + columnGroup + '</div>';\n $('#eventDisplayArea').append(rowDiv);\n }\n}", "function PlaceholderContainer() {\n\t\tthis.placeholderA = new PlaceholderElement();\n\t\tthis.placeholderB = new PlaceholderElement();\n\t}", "function makeBoxes(){\n var divWidth = 0;\n var Xval = 0;\n var Yval = 0;\n for (var i = 0; i < colLength; i++) {\n var currentVal = boxArray[i][0];\n divWidth = 0;\n Yval += boxHeight;\n for (var j = 0; j <= rowLength - 1; j++) {\n divWidth += boxWidth;\n Xval += boxWidth;\n if (boxArray[i][j + 1] !== currentVal) {\n makeDiv({\n width: divWidth,\n divXlocation: Xval,\n divYlocation: Yval\n });\n currentVal = boxArray[i][j + 1];\n divWidth = 0;\n }\n }\n }\n return null;\n }", "_initContainers() {\n const that = this;\n\n that.dataValidationContainer = document.createElement('div');\n that.dataValidationContainer.classList.add('smart-data-validation-container');\n\n that.criteriaContainer = document.createElement('div');\n that.criteriaContainer.classList.add('smart-criteria-container');\n\n that.criteriaTypeContainer = document.createElement('div');\n that.criteriaTypeContainer.classList.add('smart-criteria-type-container');\n\n that.inputsCriteriaContainer = document.createElement('div');\n that.inputsCriteriaContainer.classList.add('smart-input-criteria-container');\n\n that.textBetweenInputsHolder = document.createElement('div');\n that.textBetweenInputsHolder.classList.add('smart-text-between-inputs-container');\n\n that.onInvalidDataContainer = document.createElement('div');\n that.onInvalidDataContainer.classList.add('smart-on-invalid-data-container');\n\n that.appearanceContainer = document.createElement('div');\n that.appearanceContainer.classList.add('smart-appearance');\n\n that.footerButtonsContainer = document.createElement('div');\n that.footerButtonsContainer.classList.add('smart-footer-buttons');\n\n that._generateStaticElements();\n }", "function createGrid() {\n\t$('.header').append('<div class=\"container\"></div>'); //create container\n var $row = $(\"<div />\", {\n \tclass: 'row'\n\t});\n\tvar $square = $(\"<div />\", {\n \tclass: 'sq'\n\t});\n\n for (var i = 0; i < columns; i++) {\n $row.append($square.clone());\n }\n for (var i = 0; i < rows; i++) {\n $(\".container\").append($row.clone());\n }\n}", "function populateContainer(value) {\n\tvar size = (960-((value-1)*2+2)*2)/value;\n\tfor (var x = 0; x < value; x++) {\n for (var y = 0; y < value; y++) {\n \t//adding cells\n $(\"<div></div>\").appendTo(\"#container\");\n }\n }\n //adding width, height and hanvle hover function\n $(\"#container > div\").css(\"width\",size);\n $(\"#container > div\").css(\"height\",size);\n $(\"#container > div\").hover(function(){\n $(this).css(\"background-color\", \"black\")\n });\n}", "function fetchContainerElements() {\n var elements = {};\n try {\n // get document height\n elements.docHeight = $document[0].documentElement.offsetHeight\n // get navbar height\n elements.navbarHeight = $document[0].getElementById('mainnav').offsetHeight;\n // get bookmark container height\n elements.bookmarkHeight = $document[0].getElementById('bookmark-container').offsetHeight;\n // get record main container\n elements.container = $document[0].getElementById('main-content');\n } catch (error) {\n $log.warn(error);\n }\n return elements;\n }", "function initializeRows() {\n pillboxContainer.empty();\n var schedulesToAdd = [];\n for (var i = 0; i < schedules.length; i++) {\n schedulesToAdd.push(createNewRow(schedules[i]));\n }\n pillboxContainer.append(schedulesToAdd);\n medConflict(medlist);\n }", "function resizeEvents() {\n var $slices = $('.interlace');\n\n $slices.each(function() {\n var $slice = $(this);\n var originalHTML = $slice.find('.interlace-item').html();\n\n $slice.find('.interlace-item').removeClass('active');\n $slice.find('.interlace-clone-wrapper').remove();\n });\n\n $('.interlace').each(function() {\n App.interlace({\n el: $(this)\n });\n });\n }", "createGridElements() {\n let workingArray = [];\n for (let i = 0; i < this.cols; i++) {\n for (let j = 0; j < this.rows; j++) {\n let newElement = document.createElement('div');\n newElement.classList.add('cell');\n newElement.dataset.row = i.toString();\n newElement.dataset.column = j.toString();\n workingArray.push(newElement);\n this.grid.appendChild(newElement);\n }\n }\n return workingArray;\n }", "function nectarLiquidBGs() {\r\n\t\t\t\t\t$liquidBG_EL = [];\r\n\t\t\t\t\t\r\n\t\t\t\t\tif (typeof NectarLiquid == 'undefined' || nectarDOMInfo.usingFrontEndEditor) {\r\n\t\t\t\t\t\treturn;\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\t$('.row-bg-wrap[data-bg-animation*=\"displace-filter\"] .row-bg.using-image, .column-image-bg-wrap[data-bg-animation*=\"displace-filter\"] .column-image-bg').each(function (i) {\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tvar $that_el = $(this);\r\n\t\t\t\t\t\tvar $type;\r\n\t\t\t\t\t\tvar $el_type;\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif ($(this).is('.row-bg')) {\r\n\t\t\t\t\t\t\t$type = $(this).parents('.row-bg-wrap').attr('data-bg-animation');\r\n\t\t\t\t\t\t\t$el_type = 'row';\r\n\t\t\t\t\t\t} \r\n\t\t\t\t\t\telse if ($(this).is('.column-image-bg')) {\r\n\t\t\t\t\t\t\t$type = $(this).parents('.column-image-bg-wrap').attr('data-bg-animation');\r\n\t\t\t\t\t\t\t$el_type = 'col';\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t$liquidBG_EL[i] = new NectarLiquid($that_el, $type, $el_type);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t});\r\n\t\t\t\t}", "function r(){var a,b=M(),c=[];for(a=0;a<b;a++)c[a]=O(a).find(\"div.fc-day-content > div\");return c}", "function grid(dimensions = 16) {\r\n for(let i = 0; i < dimensions; i++) {\r\n divRows[i] = document.createElement(\"div\");\r\n divRows[i].classList.add(\"rows\");\r\n divRows[i].style.height = `calc(100% / ${dimensions})`;\r\n container.appendChild(divRows[i]);\r\n }\r\n \r\n for(let i = 0; i < dimensions; i++) {\r\n for(let j = 0; j < dimensions; j++) {\r\n divCols[j] = document.createElement(\"div\");\r\n divCols[j].classList.add(\"cols\");\r\n divRows[i].appendChild(divCols[j]);\r\n \r\n divRows[i].children[j].onmouseover = function() {\r\n divRows[i].children[j].style.backgroundColor = setColor();\r\n }\r\n \r\n }\r\n }\r\n}", "_refreshContainersArrays() {\n const that = this;\n\n for (let i = that._containers.length - 1; i >= 0; i--) {\n const container = that._containers[i];\n\n if (!document.body.contains(container)) {\n that._containers.splice(i, 1);\n\n const index = that._containersFixedHeight.indexOf(container);\n\n if (index > -1) {\n that._containersFixedHeight.splice(index, 1);\n that._additionalScrollButtons.splice(index, 1);\n }\n }\n }\n\n that._checkContainersLength();\n }", "function createDOM() {\n const container = document.getElementById('mineSweeper');\n for (let i = 0; i < sizeX; i++) {\n const div = document.createElement('div');\n div.classList.add('row');\n container.appendChild(div);\n }\n const rows = document.getElementsByClassName('row');\n for (let i = 0; i < rows.length; i++) {\n for (let j = 1; j <= sizeY; j++) {\n const div = document.createElement('div');\n div.setAttribute('data-position', (sizeY * i + j).toString());\n rows[i].appendChild(div);\n }\n }\n }", "function getEmptyRows(arr) {\n\tif(arr.length > 4) return arr;\n\tfor(let i=0; i < 5; i++) {\n\t\tif (arr[i] === undefined) {\n\t\t\tarr[i] = Div({className: 'player-box'})\n\t\t}\n\t}\n\treturn arr;\n}", "generateContainers() {\n\n // days of week container\n this.containerDaysOfWeek = this.artboard\n .selectAll(\".lgv-annotation-days-of-week\")\n .data(d => [d])\n .join(\n enter => enter.append(\"g\"),\n update => update,\n exit => exit.remove()\n )\n .attr(\"class\", \"lgv-annotation-days-of-week\")\n .attr(\"transform\", `translate(0,${this.paddingTop + this.artboardUnit})`);\n\n // month of year container\n this.containerWeeksOfYear = this.artboard\n .selectAll(\".lgv-annotation-months-of-year\")\n .data(d => [d])\n .join(\n enter => enter.append(\"g\"),\n update => update,\n exit => exit.remove()\n )\n .attr(\"class\", \"lgv-annotation-months-of-year\")\n .attr(\"transform\", `translate(${this.paddingSide},0)`);\n\n // calendar content container\n this.containerCalendar = this.artboard\n .selectAll(\".lgv-calendar\")\n .data(d => [d])\n .join(\n enter => enter.append(\"g\"),\n update => update,\n exit => exit.remove()\n )\n .attr(\"class\", \"lgv-calendar\")\n .attr(\"transform\", d => `translate(${this.paddingSide},${this.paddingTop})`);\n\n }", "function getUserContent(offset) {\n var myClass;\n var shapelist0 = [], shapelist1 = [], shapelist2 = [];\n var shapeArray = [shapelist0, shapelist1, shapelist2];\n for (i = 0 + offset, j = 0; i < shapeArray.length + offset; i++, j++) {\n var target = \"#shapelist\" + i + \" img\";\n console.log(target);\n $(target).each(function () {\n if ($(this).hasClass(\"colorRed\"))\n myClass = \"_red\"\n if ($(this).hasClass(\"colorGreen\"))\n myClass = \"_green\"\n if ($(this).hasClass(\"colorBlue\"))\n myClass = \"_blue\"\n console.log(this.id + myClass);\n shapeArray[j].push(this.id + myClass);\n });\n\n }\n return shapeArray;\n }", "get $elements() {\n if (this.#cached$elements === undefined) {\n this.#cached$elements = $(this.elements);\n }\n return this.#cached$elements;\n }", "function enableResizableContainers() {\n\t\t\tvar promise = $q.all([\n\t\t\t FindElement.byQuery(\".browserWrapper\"),\n\t\t\t FindElement.byQuery(\".leftContainer\"),\n\t\t\t FindElement.byQuery(\".rightContainer\"),\n\t\t\t FindElement.byId(\"emapTermArea\"),\n\t\t\t FindElement.byId(\"emapTermAreaWrapper\"),\n\t\t\t FindElement.byId(\"emapClipBoard\"),\n\t\t\t FindElement.byId(\"treeViewArea\"),\n\t\t\t FindElement.byId(\"treeViewAreaWrapper\")\n\t\t\t]).then(function(elements){\n\t\t\t\tvar browserWrapper = elements[0],\n\t\t\t\tleftContainer = elements[1],\n\t\t\t\trightContainer = elements[2],\n\t\t\t\temapTermArea = elements[3],\n\t\t\t\temapTermAreaWrapper = elements[4],\n\t\t\t\temapClipBoard = elements[5],\n\t\t\t\ttreeViewArea = elements[6],\n\t\t\t\ttreeViewAreaWrapper = elements[7];\n\t\t\t\t\n\t\t\t\t$(leftContainer).resizable({\n\t\t\t handles: 'e',\n\t\t\t minWidth: 260,\n\t\t\t maxWidth: 800,\n\t\t\t resize: function () {\n\t\t\t $(leftContainer).css('width', $(leftContainer).outerWidth() / $(browserWrapper).innerWidth() * 100 + '%');\n\t\t\t $(rightContainer).css('width', 99 - ($(leftContainer).outerWidth() / $(browserWrapper).innerWidth() * 100) + '%');\n\t\t\t }\n\t\t\t });\n\t\t\t\t\n\t\t\t\t$(emapTermAreaWrapper).resizable({\n\t\t\t handles: 's',\n\t\t\t minHeight: 100,\n\t\t\t resize: function () {\n\t\t\t $(emapTermArea).css('height', $(emapTermAreaWrapper).outerHeight() - 15 );\n\t\t\t }\n\t\t\t });\n\t\t\t\t\n\t\t\t\t$(emapClipBoard).resizable({\n\t\t\t handles: 's'\n\t\t\t });\n\t\t\t\t\n\t\t\t\t$(treeViewAreaWrapper).resizable({\n\t\t\t handles: 's',\n\t\t\t minHeight: 100,\n\t\t\t resize: function () {\n\t\t\t $(treeViewArea).css('height', $(treeViewAreaWrapper).outerHeight() - 15 );\n\t\t\t }\n\t\t\t });\n\t\t\t\t\n\t\t\t},function(error){\n\t\t\t ErrorMessage.handleError(error);\n\t\t\t\tthrow error;\n\t\t\t});\n\t\t\t\n\t\t\treturn promise;\n\t\t}", "getSearchResultsContainers() {\n return {\n searchArtistContainer: document.getElementById('search-artist-container'),\n searchAlbumContanier: document.getElementById('search-album-container'),\n searchTrackContainer: document.getElementById('search-track-container'),\n searchPlaylistContainer: document.getElementById('search-playlist-container')\n }\n }", "function getContainer() {\n \n var p = $slideupPanelClones.length;\n \n // Clone slide up panel model\n $slideupPanelClones[p] = $slideUpPanel.clone();\n $slideupPanelClones[p].attr('id','slideup-panel-' + p);\n $appCanvas.append( $slideupPanelClones[p] );\n \n return $slideupPanelClones[p];\n \n }", "function _gatherElements() {\n return jQuery('*[id]')\n .toArray()\n // use jQuery instances\n .map(function(oElement) {\n return jQuery(oElement);\n })\n .filter(function($element) {\n // is at least part of a control\n return $element.control().length > 0 &&\n // is the root of a control\n $element.attr('id') === $element.control()[0].getId();\n });\n }", "function entryContainer(){\n\tfor(i = 0; i < journalEntries.length; i++){\n\t\tvar div = document.createElement(\"div\");\n\t\tvar id = document.createAttribute(\"id\");\n\t\tvar h1 = document.createElement(\"h1\");\n\t\tvar p = document.createElement(\"p\");\n\t\tdocument.getElementById(\"container2\").appendChild(div);\n\t\tvar divs = document.getElementById(\"container2\").children;\n\t\tdivs[i].setAttribute(\"class\", \"content\");\n\t\ttargetClass[i].setAttribute(\"id\", journalEntries[i].id);\n\t\ttargetClass[i].appendChild(h1);\n\t\ttargetClass[i].appendChild(p);\n\t\tvar textContainer = divs[i].children;\n\t\ttextContainer[0].innerText = journalEntries[i].title;\n\t\ttextContainer[1].innerText = journalEntries[i].entry;\n\t}\n}", "createContainers() {\n extensionElements.controlsContainer = document.createElement('div');\n extensionElements.controlsContainer.classList.add('toyplug-controls-container');\n\n extensionElements.controlsContainerHeader = document.createElement('div');\n extensionElements.controlsContainerHeader.classList.add('ste-header');\n extensionElements.controlsContainer.appendChild(extensionElements.controlsContainerHeader);\n\n extensionElements.timeWrapper = document.createElement('div');\n extensionElements.timeWrapper.classList.add('time-slider');\n extensionElements.controlsContainer.appendChild(extensionElements.timeWrapper);\n\n extensionElements.mouseSlidersWrapper = document.createElement('div');\n extensionElements.mouseSlidersWrapper.classList.add('mouse-uniforms');\n extensionElements.controlsContainer.appendChild(extensionElements.mouseSlidersWrapper);\n\n extensionElements.controlsContainerFooter = document.createElement('div');\n extensionElements.controlsContainerFooter.classList.add('ste-footer');\n extensionElements.controlsContainer.appendChild(extensionElements.controlsContainerFooter);\n\n shaderToyElements.leftColumnContainer.insertBefore(extensionElements.controlsContainer, shaderToyElements.shaderInfo);\n }", "function _get_containers() {\n $.ajax({\n url: '/samples/ajax/cnt/visit/' + visit,\n type: 'GET',\n dataType: 'json',\n timeout: 5000,\n success: function(json){\n \n var drag = { \n containment: '#drag_container',\n stack: '#unassigned div',\n /*cursor: 'move',*/\n /*cancel: 'a',*/\n revert: true\n }\n \n $.each(json, function(i,c) {\n var a = c['SAMPLECHANGERLOCATION']\n //var b = c['BEAMLINELOCATION']\n var assigned = c['SAMPLECHANGERLOCATION'] && (c['BEAMLINELOCATION'] == bl) && (c['DEWARSTATUS'] == 'processing')\n \n if (!(c['CONTAINERID'] in containers)) {\n sc = $('div[sid='+c['SHIPPINGID']+']').children('div[did='+c['DEWARID']+']').children('div.containers')\n \n if (!assigned || (assigned && !$('#blp'+a).children('div').children('div[cid='+c['CONTAINERID']+']').length)) {\n \n $('<div cid=\"'+c['CONTAINERID']+'\" sid='+c['SHIPPINGID']+' did=\"'+c['DEWARID']+'\" loc=\"'+c['SAMPLECHANGERLOCATION']+'\" class=\"container\"><span class=\"r\"><a title=\"Click to view container contents\" href=\"/shipment/cid/'+c['CONTAINERID']+'\">View Container</a></span><h1>'+c['CODE']+'</h1></div>').appendTo(assigned ? ($('#blp'+a).children('div')) : sc).addClass(assigned ? 'assigned' : '').draggable(drag)\n containers[c['CONTAINERID']] = a\n }\n \n \n } else {\n d = $('div[cid='+c['CONTAINERID']+']')\n var state = c['SAMPLECHANGERLOCATION'] == d.attr('loc') && c['BEAMLINELOCATION'] == bl && c['DEWARSTATUS'] == 'processing'\n if (!state) {\n if (c['SAMPLECHANGERLOCATION'] && c['BEAMLINELOCATION'] == bl && c['DEWARSTATUS'] == 'processing') {\n d.appendTo($('#blp'+a).children('div')).addClass('assigned')\n } else d.appendTo($('div[sid='+c['SHIPPINGID']+']').children('div[did='+c['DEWARID']+']').children('div.containers')).removeClass('assigned')\n }\n \n }\n })\n \n map_callbacks()\n }\n })\n }", "function wrapContent() {\n canvas.find('.column').each(function() {\n var col = $(this);\n var contents = $();\n col.children().each(function() {\n var child = $(this);\n if (child.is('.row, .ge-tools-drawer, .ge-content')) {\n doWrap(contents);\n } else {\n contents = contents.add(child);\n }\n });\n doWrap(contents);\n });\n }", "function getDOMElements(){\r\n return {\r\n squares: Array.from(document.querySelectorAll(\".grid div\")),\r\n firstSquare: function(){ return this.squares[30] },\r\n squaresInActiveGameplace: Array.from(grid.querySelectorAll(\".activegameplace\")),\r\n firstSquareInRow: document.querySelectorAll(\".first-in-row\"),\r\n lastSquareInRow: document.querySelectorAll(\".last-in-row\"),\r\n music: document.getElementById(\"myAudio\")\r\n }\r\n}", "function qweryTimeContainers() { // inline time containers\n if (gSupported) return qwerySelectorAll(\n \"*[data-timecontainer], *[smil-timecontainer], *[timeContainer]\");\n // OLDIE (IE6, IE7) and no CSS Selector library\n var results = [];\n var tmp = document.getElementsByTagName(\"*\");\n var re = /^(par|seq|excl)$/i;\n for (var i = 0; i < tmp.length; i++) {\n if (re.test(tmp[i].nodeName)\n || tmp[i].getAttribute(\"data-timecontainer\")\n || tmp[i].getAttribute(\"smil-timecontainer\")\n || tmp[i].getAttribute(\"timeContainer\")) {\n results.push(tmp[i]);\n }\n }\n return results;\n }", "_storeItems() {\n const that = this,\n items = that.enableShadowDOM && that.shadowRoot ? that.shadowRoot.querySelectorAll('jqx-accordion-item') : that.getElementsByTagName('jqx-accordion-item');\n\n that._items = Array.from(items);\n\n if (that._items.length === 0) {\n that.$container.addClass('jqx-empty');\n return;\n }\n\n that.$container.removeClass('jqx-empty');\n\n const heights = that._getItemsHeights();\n\n for (let i = 0; i < that._items.length; i++) {\n that._updateExpanedContentLocalHeight(that._items[i], heights[i]);\n }\n }", "function initializeRows() {\n blogContainer.empty();\n var postsToAdd = [];\n for (var i = 0; i < posts.length; i++) {\n postsToAdd.push(createNewRow(posts[i]));\n }\n blogContainer.append(postsToAdd);\n }", "function get_values_from_fluid_rows(div) {\n var values = [];\n\n var rows = div.children('div:not([style*=\"display:none\"])');\n\n var custom_rows = [];\n rows.each(function () {\n var row = $(this);\n var col_values = [];\n if (get_custom_class(row).includes('_')) {\n var columns = row.children('input');\n\n columns.each(function () {\n var input = $(this);\n var val = input.val();\n\n if (val != null && val != '') {\n col_values.push(val);\n }\n });\n\n // Push to array only if there is at least one element.\n if (col_values.length > 0) {\n values.push(col_values);\n }\n }\n });\n\n return values;\n}", "function getOverflowInSheet(sheet) {\n var elements = sheet.children();\n var remainder = elements.length - 30;\n \n if (remainder <= 0)\n return [];\n \n var array = [];\n \n elements.each(function(i) {\n var element = $(this);\n if (i >= 30)\n array[i-30] = element;\n });\n \n \n return array;\n}", "function createDivs(number){\n\n grid.empty();\n\n for (var i = 0; i < number; i++) {\n var divNew = $(\"<div id=grid-div-\" + i + \"></div>\").addClass(\"grid-div\");\n grid.append(divNew);\n }\n\n var gridDivs = $('.grid-div');\n // Place always the last hovered div at the end of this array\n //var activeDivArray = [];\n\n function divHoverIn(div){\n div.css({\n \"background-color\": \"rgb(130, 51, 98)\"\n });\n\n //activeDivArray.push(div);\n\n }\n\n function divHoverOut(div) {\n\n // if(activeDivArray.length >= tailLength) {\n // console.log(activeDivArray);\n //\n // activeDivArray[0].css({\n // \"background-color\": \"rgb(65, 156, 130)\"\n // });\n //\n // activeDivArray.shift();\n // console.log(activeDivArray);\n // }\n\n }\n\n gridDivs.hover(function() {\n divHoverIn( $( this ) );\n }, function() {\n divHoverOut( $( this ) );\n });\n }", "function createDivs(maxRow) {\n var wrapperDiv = document.getElementById('mazeWrapper');\n var rowDiv;\n\tfor (var i=0; i < maxRow; i++) {\n\t var thisDiv = document.createElement('div');\n thisDiv.id = 'mazeRow-' + i;\n thisDiv.className = 'row';\n \t wrapperDiv.appendChild(thisDiv);\n for (var j=0; j < maxColumn; j++) {\n rowDiv = document.getElementById('mazeRow-' + i);\n var thisColumnDiv = document.createElement('div');\n thisColumnDiv.id = (i*maxRow)+j;\n thisColumnDiv.className = 'mazehole';\n //if a shape other then square is chosen\n var shape = $('#shapeChoice').val();\n thisColumnDiv.classList.add(shape);\n rowDiv.appendChild(thisColumnDiv);\n }\n }\n}", "buildGrid() {\n const $game = $(this.selector);\n for (let row = 0; row < this.Rows; row++) {\n const $row = $(\"<div>\")\n .addClass(\"row\");\n //columns must be nested inside of the rows. for-loop will generate columns.\n for (let col = 0; col < this.Cols; col++) {\n const $col = $(\"<div>\")\n .addClass(\"empty column\")\n .attr(\"data-column\", col)\n .attr(\"data-row\", row)\n $row.append($col);\n }\n $game.append($row);\n }\n }", "function makeRows(face_ids) {\n\n var rows = [];\n\n var counter = 0;\n\n face_ids.forEach(function(f,i){\n\n if (counter%12 == 0) rows.push($('<div class=\"row\"></div>'))\n\n var src = dir_path + '/' + database.faceMapToImage(f)\n\n var image = $('<img>')\n .prop('src',src)\n .prop('id',f)\n\n var col = $('<div class=\"col-xs-1 col-sm-1 col-md-1 filmstrip\"></div>')\n .append(image)\n\n rows[rows.length - 1].append(col)\n\n counter += 1\n\n })\n\n return rows\n\n }", "function initNeighbors() {\n var wf1d = window.frames[1].document;\n var retval = [\n [], null, []\n ];\n var indx = 0;\n var questions = $('table tr .bg', wf1d);\n questions.each(function (i) {\n if (indx == 0 && rgb2hex($(this).css('background-color')) == 'e2e2e2') {\n indx++;\n retval[indx] = [$(this)];\n indx++;\n } else {\n retval[indx].push($(this));\n }\n });\n return retval;\n}", "_handleContainers() {\n const that = this;\n let customContainer;\n\n if (typeof that.appendTo === 'string') {\n customContainer = document.getElementById(that.appendTo);\n }\n else if (that.appendTo instanceof HTMLElement) {\n customContainer = that.appendTo;\n }\n\n //Get or create the toast items container\n that._container = that._getToastContainer(customContainer);\n\n if (customContainer) {\n that._appendTo = customContainer;\n\n if (!that._container.parentElement) {\n //Add events listeners\n that._addContainerListeners(that._container);\n that._appendTo.appendChild(that._container);\n }\n\n return;\n }\n\n if (!customContainer && that.$.toastContainerCustom && !that.$.toastContainerCustom.children.length) {\n that._removeContainerListeners(that.$.toastContainerCustom);\n\n if (that.$.toastContainerCustom.parentElement) {\n that.$.toastContainerCustom.parentElement.removeChild(that.$.toastContainerCustom);\n }\n }\n\n if (!that._container.parentElement) {\n //Add events listeners\n that._addContainerListeners(that._container);\n document.body.appendChild(that._container);\n }\n }", "function waterfall(){\n var $boxsArr = $('#main').find('.box');\n var boxHeightArr = [];\n\n //计算浏览器宽度再除以盒子宽度,并设置#main宽度\n var boxWidth = $(\".box\").outerWidth();\n console.log(boxWidth);\n var leftWidth = $(\".allNews\").width();\n var cols = Math.floor(leftWidth/boxWidth);\n $(\"#main\").width(cols * boxWidth);\n $boxsArr.each(function(index,value){\n var h = $boxsArr.eq(index).outerHeight();\n if(index<cols){\n boxHeightArr[index] = h;\n }else{\n var minH = Math.min.apply(null,boxHeightArr);\n var minHIndex = $.inArray(minH,boxHeightArr); //在数组中找到某个值的索引\n $(value).css({\n \"position\":\"absolute\",\n \"top\":minH+\"px\",\n \"left\":minHIndex * boxWidth+\"px\"\n });\n boxHeightArr[minHIndex] += $boxsArr.eq(index).outerHeight();\n }\n });\n}", "function createNewDivGrid(divNumber){\n $(\"#inner-wrapper\").empty();\n for(i = 1; i <= divNumber; i++){\n $(\"#inner-wrapper\").append(columnDiv);\n for(j = 1; j <= divNumber; j++){\n $(\".row-wrapper\").last().append(gridDiv);\n }\n }\n}", "function loadGrid(x){\n for (let i = 0; i < x; i++){\n let row = document.createElement('div');\n row.style.height = (640/x) + 'px';\n row.style.width = '640px';\n row.className = 'gridRows';\n gridContainer.appendChild(row); \n \n for (let j = 0; j < x; j++){\n let square = document.createElement('div');\n square.style.width = 640/x + 'px';\n square.style.height = 640/x + 'px';\n square.className = 'gridSquares';\n row.appendChild(square);\n square.onmouseover = function(){\n square.style.backgroundColor = whichColor;\n square.style.border = 'none';\n };\n } \n }\n}", "function createDivs(gridDimension, canvasSize) {\n $(\".container\").children().remove();\n $(\".container\").append(\"<table>\");\n for(i=0; i< gridDimension; i++) {\n $(\".container\").append(\"<tr>\");\n for(j=0; j < gridDimension; j++) {\n $(\".container\").append(\"<td></td>\")\n $(\"td\").css(\"height\", canvasSize/gridDimension);\n $(\"td\").css(\"width\", canvasSize/gridDimension);\n }\n $(\".container\").append(\"</tr>\");\n }\n $(\".container\").append(\"</table>\");\n drawOnCanvas(getColor());\n}", "function cargarDulces() {\n // inicio carga de caramelo en tablero\n function dulce(r,c,obj,src) {\n return {\n r: r, \n c: c, \n src:src, \n locked:false, \n isInCombo:false, \n o:obj \n };\n }\n\n // preparando el tablero\n for (var r = 0; r < rows; r++) {\n grid[r]=[];\n for (var c =0; c < cols; c++) {\n grid[r][c]= new dulce(r,c,null,azarDulce());\n }\n }\n\n // Coordenadas iniciales:\n var height = $('.panel-tablero').height(); \n var cellHeight = height / 7;\n\n // creando imagenes en el tablero\n for (var r = 0; r < rows; r++) {\n for (var c =0; c< cols; c++) {\n var cell = $(\"<img class='dulce' id='dulce_\"+r+\"_\"+c+\"' r='\"+r+\"' c='\"+c+\n \"'ondrop='_onDrop(event)' ondragover='_onDragOverEnabled(event)'src='\"+\n grid[r][c].src+\"' style='height:\"+cellHeight+\"px'/>\");\n cell.attr(\"ondragstart\",\"_ondragstart(event)\");\n $(\".col-\"+(c+1)).append(cell);\n grid[r][c].o = cell;\n }\n }\n}", "function makeRows(rows, cols) {\n\n container.style.setProperty('--grid-rows', rows);\n container.style.setProperty('--grid-cols', cols);\n for (c = 0; c < (rows * cols); c++) {\n let cell = document.createElement(\"div\");\n\n /*Mouseover event that will 'listen' or watch for an event where the\n mouse is over one of the grids. Then it will run the function and\n change the background color to black.*/\n cell.addEventListener(\"mouseover\", function() {\n cell.setAttribute(\"style\", \"background-color:black;\");\n });\n container.appendChild(cell).className = \"grid-item\";\n }\n}", "renderContent(comps) {\n let row = this,\n cols = [],\n colName = row.props.id + '-col-';\n lodash.forEach(comps, (comp, i) => {\n let { ISResizer } = inlineStyles,\n colId = colName + i,\n resizerId = colId + '-handler',\n colWidth = comp.props.colWidth || null;\n if ( (i > 0) && row.props.resizable === 'true' ) {\n cols.push(row.addResizer(resizerId, colName, i));\n }\n cols.push(row.addColumn(colId, colWidth, comp));\n });\n return cols;\n }", "getAllChildren() {\n const children = this.jq.wrapper.find(this.jq.child)\n return children\n }", "function getServiceItems() {\n var serviceItems = [];\n\n $('.service-item').each(function(index){\n var item = $(this),\n //itemId = item.attr('id'),\n itemHeight = item.height(),\n itemOffTop = item.offset().top;\n\n serviceItems[index] = {\n 'el': item,\n //'itemId': itemId,\n 'itemOffTop': itemOffTop,\n 'height': itemHeight,\n 'center': itemOffTop + item.height()/2 - windowHeight/2\n }\n\n });\n\n return serviceItems;\n}", "function generateContent() {\n for (i = 0; i < database.length; i++) {\n\n // Creates div to contain content\n const contentContainer = document.createElement('div');\n contentContainer.setAttribute('class', 'container');\n contentContainer.setAttribute('id', i);\n document.body.appendChild(contentContainer);\n\n // Generates Image\n const img = document.createElement('img');\n img.setAttribute('src', database[i].img);\n img.setAttribute('class', 'img');\n contentContainer.appendChild(img);\n\n // Generates Title\n const title = document.createElement('h2');\n title.innerHTML = database[i].title;\n title.setAttribute('class', 'title');\n contentContainer.appendChild(title);\n\n // Generates Attribute\n const attribute = document.createElement('h4');\n attribute.innerHTML = database[i].attribute;\n attribute.setAttribute('class', 'attribute');\n contentContainer.appendChild(attribute);\n\n // Generates Date\n const date = document.createElement('h4');\n date.innerHTML = database[i].date;\n date.setAttribute('class', 'date');\n contentContainer.appendChild(date);\n\n // Generates Text Content\n const text = document.createElement('p');\n text.innerHTML = database[i].text;\n text.setAttribute('class', 'text');\n contentContainer.appendChild(text);\n }\n}", "function formEventsContainer() {\n var eventsWrapper = $(\"<div></div>\");\n var eventsListCont = $(\"<div></div>\");\n\n eventsWrapper.addClass(chatEventsMsgsWrapper.slice(1));\n eventsListCont.addClass(chatEventsListCont.slice(1));\n eventsWrapper.append(eventsListCont);\n\n return eventsWrapper;\n } // end of creating chat container component function", "get items() {\n const that = this;\n\n if (!that.isReady) {\n return;\n }\n\n const children = that.$.container.children;\n\n let items = [];\n\n for (let i = 0; i < children.length; i++) {\n if (children[i] instanceof JQX.SplitterItem || children[i].tagName === 'JQX-SPLITTER-ITEM') {\n items.push(children[i]);\n }\n }\n\n return items;\n }", "function placeholders(element) {\n\t\t\tvar result = [];\n\n\t\t\t// traverse all textnodes and split them in order to obtain only the placeholder nodes\n\t\t\ttextNodes(element).forEach(function(node) {\n\t\t\t\tresult = result.concat(splitter(node));\n\t\t\t});\n\n\t\t\treturn result;\n\t\t}", "maakDivs() {\n this.container = document.getElementById(\"cont\");\n for(let i = 0; i < 42; i++) {\n this.backside = document.createElement(\"div\");\n this.backside.className = 'items';\n this.container.appendChild(this.backside);\n }\n }", "reflow () {\n var last = []\n var cols = [...this.element.querySelectorAll('.js-col')]\n\n for (let i = 0, len = cols.length, col; i < len; i++) {\n col = cols[i]\n last.push(...Array.prototype.slice.call(col.childNodes, -2))\n if (col.childElementCount) col.removeChild(col.lastElementChild)\n if (col.childElementCount) col.removeChild(col.lastElementChild)\n }\n\n for (let i = 0, len = last.length; i < len; i++) {\n var shortest = cols.reduce((min, el) => {\n var height = el.offsetHeight\n return !min || height < min.height ? {el, height} : min\n }, null)\n shortest.el.appendChild(last[i])\n }\n }", "function initializeRows() {\n $todoContainer.empty();\n const rowsToAdd = [];\n for (let i = 0; i < todos.length; i++) {\n rowsToAdd.push(createNewRow(todos[i]));\n }\n $todoContainer.prepend(rowsToAdd);\n }", "function initDragWidgets(){\n\t\tvar ctx = $('.widget-container');\n\t\tvar aWidgets = ctx.find('.widget-list-item');\n\t\taWidgets.each(function (){\n\t\t\t$(this).johnDraggable({\n\t\t\t\tcontext : 'body',\n\t\t\t\ttargetWrapperClass : '.wrapper',\n\t\t\t\ttargetClass : '.layout-zone',\n\t\t\t\tfnDragEnd : function (oTargetWidget){\n\t\t\t\t\t//request html and append;\n\t\t\t\t\t//var html = $(this).html();\n\n\t\t\t\t}\n\t\t\t});\n\t\t});\n\t}", "function GridCreate() {\r\n var elBody = document.querySelector('body');\r\n var elDiv = document.createElement('div');\r\n\r\n for (var i = 0; i < 3; i++) {\r\n var elDiv = document.createElement('div');\r\n elDiv.setAttribute('id', 'container');\r\n for (var j = 0; j < 3; j++) {\r\n var elBut = document.createElement('div');\r\n elDiv.appendChild(elBut);\r\n elBut.style.background = '#E0E1E1';\r\n elBut.style.padding = '50px';\r\n elBut.style.cursor = 'pointer';\r\n\r\n elBut.setAttribute('class', 'case');\r\n }\r\n elBody.appendChild(elDiv);\r\n\r\n elDiv.style.display = 'flex';\r\n elDiv.style.justifyContent = 'center';\r\n }\r\n}", "_renderGrid() {\n\n\t\tconst $wrapper= document.createElement('div');\n\t\t$wrapper.classList.add('wrapper');\n\n\t\t// Iterate trough the grid and create elements to render\n\t\tthis._grid.forEach( (row, i) => {\n\n\t\t\tconst $row= document.createElement('div');\n\t\t\t$row.classList.add('board-row');\n\n\t\t\trow.forEach( (col, j) => {\n\n\t\t\t\tconst $col= document.createElement('mem-card');\n\n\t\t\t\t// Set properties\n\t\t\t\t$col.setAttribute('cardid', col.id);\n\t\t\t\t$col.setAttribute('image', col.image);\n\t\t\t\t$col.setAttribute('row', i);\n\t\t\t\t$col.setAttribute('col', j);\n\n\t\t\t\t$col.parentClickHandlerHook= (rowID, colID)=> this._cardSelectHandler(rowID, colID);\n\n\t\t\t\t$row.appendChild($col);\n\n\t\t\t\tcol['$elem']= $col;\n\t\t\t});\n\n\t\t\t$wrapper.appendChild($row);\n\t\t});\n\n\t\treturn $wrapper;\n\t}", "get undockedItems() {\n const that = this;\n\n if (!that.isReady) {\n return;\n }\n\n const tabsWindows = document.getElementsByTagName('jqx-tabs-window');\n let undockedWindows = [];\n\n for (let i = 0; i < tabsWindows.length; i++) {\n if (!tabsWindows[i].closest('jqx-docking-layout') && tabsWindows[i].layout === that) {\n tabsWindows[i].undocked = true;\n undockedWindows.push(tabsWindows[i]);\n }\n }\n\n return undockedWindows;\n }", "function backgroundBlocks() {\n for (let row = 0; row <= 3; row++) {\n for (let col = 0; col <= 3; col++) {\n $('#blocks').append(`<div class=\"block_behind bl_row${row}_col${col}\"></div>`);\n $(`.bl_row${row}_col${col}`).css('height', `${size}px`).css('width', `${size}px`);\n $(`.bl_row${row}_col${col}`).css('top', `${row*size}px`);\n $(`.bl_row${row}_col${col}`).css('left', `${col*size}px`);\n }\n }\n }", "function returnElementArray($container) {\n var nsp = '[data-' + ns + ']',\n // if an $el was given, then we scope our query to just look within the element\n DOM = $container ? $container.find(nsp) : $(nsp);\n\n return DOM;\n }", "function resizeElementsByRows(boxes, options) {\n\t\tvar currentRow = jQuery(), maxHeight, firstOffset = boxes.eq(0).offset().top;\n\t\tboxes.each(function(ind){\n\t\t\tvar curItem = jQuery(this);\n\t\t\tif(curItem.offset().top === firstOffset) {\n\t\t\t\tcurrentRow = currentRow.add(this);\n\t\t\t} else {\n\t\t\t\tmaxHeight = getMaxHeight(currentRow);\n\t\t\t\tresizeElements(currentRow, maxHeight, options);\n\t\t\t\tcurrentRow = curItem;\n\t\t\t\tfirstOffset = curItem.offset().top;\n\t\t\t}\n\t\t});\n\t\tif(currentRow.length) {\n\t\t\tmaxHeight = getMaxHeight(currentRow);\n\t\t\tresizeElements(currentRow, maxHeight, options);\n\t\t}\n\t}", "getTasksRows(tasks, colSize) {\n let taskRows = [];\n for (let i = 0; i < tasks.length; i += colSize) {\n if (tasks[i]) {\n const taskRowArray = [];\n for (let j = 0; j < colSize; j++) {\n if (tasks[i + j]) taskRowArray.push(tasks[i + j]);\n }\n\n taskRows.push(\n <div className=\"row\" style={{ marginTop: \"15px\" }} key={i}>\n {this.getTaskCols(taskRowArray, i, colSize)}\n </div>\n );\n }\n }\n return taskRows;\n }", "function resizeSignUpsContainers() {\n var SUP_Conts = $(\".SignUpEventContainer\")\n var winW = window.innerWidth;\n for (i = 0; i < SUP_Conts.length; i++) {\n var mc = SUP_Conts.get(i);\n mc.setAttribute('style', 'width:100%');\n if ((winW - 25) < mc.offsetWidth) {\n mc.setAttribute('style', 'width:' + (winW - 25) + 'px !important');\n }\n }\n var signUpMainCont = SUP_Conts.get(0);\n var signUpConts = $(\".SignUpEventTable\");\n for (i = 0; i < signUpConts.length; i++) {\n signUpConts.get(i).setAttribute('style', 'width:' + signUpMainCont.offsetWidth + 'px !important');\n }\n}", "function schedule_layout(){\n $('.schedule_t_row_schedule').each(function(index){\n var dataHeight = Math.round( $(this).children('.schedule_data').height() ),\n \tdataTop = $(this).children('.schedule_list').offset.top;\n $(this).find('.schedule_data .grid_wrap').css('height', dataHeight+'px');\n });\n}", "_removeContainerFixedHeight() {\n const that = this;\n\n for (let i = 0; i < that._containersFixedHeight.length; i++) {\n const container = that._containersFixedHeight[i];\n\n container.style.height = '';\n container.itemContainer.$.removeClass('scroll-buttons-shown');\n container.itemContainer.$.removeClass('one-button-shown');\n container.children[0].$.addClass('jqx-hidden');\n container.children[2].$.addClass('jqx-hidden');\n container.itemContainer.checkOverflow = true;\n }\n }", "function renderEntries() {\n //For each holiday array in holidaysAvailable\n $holidaysAvailable.forEach(function (holiday) {\n //Create a div object of class \"holidayEntry\"\n var $div = $('<div class=\"holidayEntry\"></div>');\n //Set the css of the div, setting it's background image and size, width, minimum height...\n //...margins, padding, position and overflow\n $div.css({'background-image': 'url(' + holiday.image + ')',\n 'width': '100%',\n 'min-height': '460px',\n 'background-repeat': 'no-repeat',\n '-webkit-background-size': '100% 460px',\n '-moz-background-size': '100% 460px',\n '-o-background-size': '100% 460px',\n 'background-size': '100% 460px',\n 'margin-bottom': '50px',\n 'margin-left': '0px',\n 'margin-right': '0px',\n 'margin-top': '0px',\n 'padding': '0px',\n 'position': 'relative',\n 'overflow': 'auto'\n });\n //Create a div of class \"row1\" and set it's display, align and width css values\n var $divRow1 = $('<div class=\"row1\"></div>').css({\n 'display': 'inline-flex',\n 'vertical-align': 'top',\n 'width': '100%'\n });\n //Create a div of class \"row1names\", setting it's width, height, background colour (transparent)...\n //...padding, text align and sizing css values\n var $divR1Pt1 = $('<div class=\"row1names\"></div>').css({\n 'width': '75%',\n 'height': 'auto',\n 'background-color': 'rgba(212,240,255,0.9)',\n 'padding-left': '13px',\n 'padding-right': '20%',\n 'vertical-align': 'top',\n 'text-align': 'left',\n '-webkit-box-sizing': 'border-box', /* Safari/Chrome, other WebKit */\n '-moz-box-sizing': 'border-box', /* Firefox, other Gecko */\n 'box-sizing': 'border-box' /* Opera/IE 8+ */\n });\n //Create a paragraph object of class \"hotelName\", setting it's colour, font size, overflow, word break...\n //...and hyphens css values\n var $text1 = $('<p><strong class=\"hotelName\">' + holiday.hotelName + '</strong></p>').css({\n 'color': '#000080',\n 'font-size': '22px',\n 'overflow-wrap': 'break-all',\n 'word-break': 'break-all',\n /* Adds a hyphen where the word breaks, if supported (No Blink) */\n '-ms-hyphens': 'auto',\n '-moz-hyphens': 'auto',\n '-webkit-hyphens': 'auto',\n '-o-hyphens': 'auto',\n 'hyphens': 'auto'\n });\n //Create a span for the star rating column, setting it's float and white-space css values\n var $starCol = $('<span></span>').append({\n 'float': 'left',\n 'white-space': 'nowrap'\n });\n //From 0 to the holiday's starRating value\n for (var i = 0; i < holiday.starRating; i++) {\n //Create an img element of class \"starRatingImg\", setting it's src and it's width, height...\n //...display and sizing css values\n var $star = $('<img class=\"starRatingImg\" src=\"assets/star.png\"></img>').css({\n 'width': '15px',\n 'height': '15px',\n 'display': 'inline',\n '-webkit-box-sizing': 'border-box'\n });\n //If the counting index is 0 (i.e. the beginning)\n if (i === 0) {\n //Set this star instance a left margin of 6 pixels\n $star.css({'margin-left': '6px'});\n }\n //Append the current star img element inside the starCol\n $starCol.append($star);\n }\n //Append the star column inside the text1 \"hotelName\" element\n $text1.append($starCol);\n //Create a paragraph element of class \"cityAndCountry\", setting it's colour and font size css values.\n //This element will store the holiday's city and country values\n var $text2 = $('<p class=\"cityAndCountry\">' + holiday.location.city + ', ' + holiday.location.country + '</p>').css({\n 'color': '#000080',\n 'font-size': '16px'\n });\n //Create a div elemnet of class \"row1price\", setting it's background colour, width, height, left border...\n //...line height, white space, position, padding, alignment and sizing css values\n var $divR1Pt2 = $('<div class=\"row1price\"></div>').css({'background-color': '#FFFF00',\n 'width': '25%',\n 'height': 'auto',\n 'border-left': '2px solid #000080',\n 'line-height': '2px',\n 'white-space': 'normal',\n 'position': 'relative',\n 'padding': '10px',\n 'vertical-align': 'center',\n 'text-align': 'left',\n '-webkit-box-sizing': 'border-box', /* Safari/Chrome, other WebKit */\n '-moz-box-sizing': 'border-box', /* Firefox, other Gecko */\n 'box-sizing': 'border-box' /* Opera/IE 8+ */\n });\n //Create a paragraph object of class \"priceText\", setting it's colour and font size css values\n var $text3 = $('<p class=\"priceText\"><strong>Holiday Price</strong></p>').css({\n 'color': '#000080',\n 'font-size': '16px'\n });\n //Create a paragraph object of class \"priceDouble\", setting it's colour and font size css values...\n //...This element stores the holiday's price value, using toFixed to convert the number ...\n //...to string as well as limit decimal places to 2\n var $text4 = $('<p><strong class=\"priceDouble\">&pound' + holiday.price.toFixed(2) + '</strong></p>').css({\n 'color': '#000080',\n 'font-size': '26px'\n });\n //Append the first text element (hotelName) to div row 1 part 1\n $divR1Pt1.append($text1);\n //Append the second text element (cityAndCountry) to div row 1 part 1\n $divR1Pt1.append($text2);\n //Append the third text element (priceText) to div row 1 part 2\n $divR1Pt2.append($text3);\n //Append the fouth text element (priceDouble) to div row 1 part 2\n $divR1Pt2.append($text4);\n //Append the div row 1 part 1 to the first div row\n $divRow1.append($divR1Pt1);\n //Append the div row 1 part 2 to the first div row\n $divRow1.append($divR1Pt2);\n //Append the first div row to the main div\n $div.append($divRow1);\n //Create div object of class \"row2\", setting the box shadow, background colour, width, height, position...\n //...margin top, overflow and float css values\n var $divRow2 = $('<div class=\"row2\"></div>').css({\n 'box-shadow': '0 3px 2px -2px gray',\n 'background-color': '#0080FF',\n 'width': '100%',\n 'height': 'auto',\n 'position': 'inherit',\n 'margin-top': '286px',\n 'overflow': 'hidden',\n 'float': 'left'\n });\n //Create a div of class row2pt1, setting it's width, height, vertical and text align, left and right padding...\n //...colour, display and float css values\n var $divRow2pt1 = $('<div class=\"row2pt1\"></div>').css({\n 'width': '75%',\n 'height': 'auto',\n 'vertical-align': 'top',\n 'text-align': 'left',\n 'padding-left': '15px',\n 'padding-right': '15px',\n 'color': '#FFF',\n 'display': 'inline',\n 'float': 'left'\n\n });\n //Variable for offspring (children and infant values)\n var offspring;\n //If the number of children and infants do not equal 0\n if (holiday.passengers.children !== 0 && holiday.passengers.infants !== 0) {\n //Set the offspring variable as a string featuring the number of children and infants\n offspring = \", <strong>\" + holiday.passengers.children + \"</strong> children & <strong>\" + holiday.passengers.infants + \"</strong> infants\";\n //If the number of children equals 1\n if (holiday.passengers.children === 1) {\n //Replace the word \"children\" in the offspring string as \"child\"\n offspring = offspring.replace(\"children\", \"child\");\n }\n //If the number of infants equals 1\n if (holiday.passengers.infants === 1) {\n //Replace the word \"infants\" in the offspring string as \"infant\"\n offspring = offspring.replace(\"infants\", \"infant\");\n }\n //Otherwise, if the number of children does not equal, but the number of infants does\n } else if (holiday.passengers.children !== 0 && holiday.passengers.infants === 0) {\n //Set the offspring variable as a string featuring the number of children\n offspring = \" & <strong>\" + holiday.passengers.children + \"</strong> children\";\n //If the number of children equals 1\n if (holiday.passengers.children === 1) {\n //Replace the word \"children\" in the offspring string as \"child\"\n offspring = offspring.replace(\"children\", \"child\");\n }\n //Otherwise, if the number of children equal 0, but the number of infants do not\n } else if (holiday.passengers.children === 0 && holiday.passengers.infants !== 0) {\n //Set the offspring variable as a string featuring the number of infants\n offspring = \" & <strong>\" + holiday.passengers.infants + \"</strong> infants\";\n //If the number of infants equals 1\n if (holiday.passengers.infants === 1) {\n //Replace the word \"infants\" in the offspring string as \"infant\"\n offspring = offspring.replace(\"infants\", \"infant\");\n }\n }\n //Create a div storing a paragraph of class \"row2Text\", itself containing the day, month and year...\n //...of the start date, the number of days, the departFrom value and the adults, children and infants.\n //Set the font size and float css values\n var $text5 = $(\"<div><p class='row2Text'><strong>\"\n + holiday.startDate.day + \" \" + holiday.startDate.month + \" \" + holiday.startDate.year + \"</strong> for <strong>\"\n + holiday.days + \"</strong> days from \"\n + holiday.departFrom + \", <strong>\"\n + holiday.passengers.adults + \"</strong> Adults\" + offspring + \"</p></div>\").css({\n 'font-size': '18px',\n 'float': 'left'\n });\n //Append the row2Text to div row 2 part 1\n $divRow2pt1.append($text5);\n //Append div row 2 part 1 to the main div row 2\n $divRow2.append($divRow2pt1);\n //Create a div element of class \"row2pt2\", setting it's width, height, vertical and text align, float...\n //...display and padding css elemnents\n var $divRow2pt2 = $('<div class=\"row2pt2\"></div>').css({\n 'width': '10%',\n 'height': 'auto',\n 'vertical-align': 'top',\n 'text-align': 'right',\n 'float': 'right',\n 'display': 'inline-block',\n 'padding': '10px'\n });\n //Create an img element of class \"arrowbtt\", setting its width, float, height and top and right margin...\n //...css elements\n var $arrButton = $(\"<img class='arrowBtt' src='assets/arrow.png'/>\").css({\n 'width': '20px',\n 'float': 'right',\n 'height': '40px',\n 'margin-top': '8px',\n 'margin-right': '8px'\n });\n //Create an empty div for storing elements, which will be shown or hidden depending on the state of the...\n //...arrow img button. Set the background colour, width, height, text align, colour, padding, float...\n //...and box shadow css elements.\n var $extendDiv = $('<div></div>').css({\n 'background-color': '#FFF',\n 'width': '99%',\n 'height': 'auto',\n 'text-align': 'center',\n 'color': '#00bfff',\n 'padding': '3%',\n 'display': 'block',\n 'float': 'left',\n 'padding-left': '10px',\n 'padding-right': '10px',\n 'box-shadow': '0 3px 2px -2px gray'\n });\n //Create a paragraph object storing the holiday's details, setting the width, font size, text align...\n //...and display css values\n var $extendDivText = $('<p>' + holiday.details + '</p>').css({\n 'width': '95%',\n 'font-size': '1.2em',\n 'text-align': 'justify',\n 'display': 'block'\n });\n //Append the extended div text inside the extendDiv\n $extendDiv.append($extendDivText);\n //Append a line break inside the extendDiv, putting it below the text\n $extendDiv.append('<br/>');\n //Create a button element of class \"button\", giving it text of \"BOOK NOW\" in bold text and setting...\n //...it's border and background colour, font colour, font size and bottom margin css values\n var $bookNowButton = $('<button class=\"button\"><strong>BOOK NOW</strong></button>').css({\n 'border-color': '#000080',\n 'background-color': '#000080',\n 'color': '#FFF',\n 'font-size': '24px',\n 'margin-bottom': '30px'\n });\n //Append the button inside the extended div\n $extendDiv.append($bookNowButton);\n //Attach a click listener to the arrow button, calling a function every time it is clicked\n $arrButton.click(function () {\n //If the extended div is not visible\n if ($extendDiv.is(':visible') === false) {\n //Show the extended div\n $extendDiv.show();\n //Set the arrow button's css values in a way that rotates it 90 degrees clockwise\n $arrButton.css({\n /* Safari */\n '-webkit-transform': 'rotate(90deg)',\n /* Firefox */\n '-moz-transform': 'rotate(90deg)',\n /* IE */\n '-ms-transform': 'rotate(90deg)',\n /* Opera */\n '-o-transform': 'rotate(90deg)',\n /* Internet Explorer */\n 'filter': 'progid:DXImageTransform.Microsoft.BasicImage(rotation=3)'\n });\n //Otherwise, if the extended div is visible\n } else {\n //Hide the extended div\n $extendDiv.hide();\n //Set the arrow button's css values in a way that reverts it back to it's original angle\n $arrButton.css({\n /* Safari */\n '-webkit-transform': 'rotate(0deg)',\n /* Firefox */\n '-moz-transform': 'rotate(0deg)',\n /* IE */\n '-ms-transform': 'rotate(0deg)',\n /* Opera */\n '-o-transform': 'rotate(0deg)',\n /* Internet Explorer */\n 'filter': 'progid:DXImageTransform.Microsoft.BasicImage(rotation=3)'\n });\n }\n });\n //Append the arrow button inside div row 2 part 2\n $divRow2pt2.append($arrButton);\n //Append div row 2 part 2 inside div row 2\n $divRow2.append($divRow2pt2);\n //Append the extended text div to div row 2\n $divRow2.append($extendDiv);\n //Hide the extended div as default\n $extendDiv.hide();\n //Append div row 2 inside the main div\n $div.append($divRow2);\n //Append the main div to the holidayListings element\n $(\".holidayListings\").append($div);\n });\n }", "function paintPatternsInModal() {\n // Delete previous printed data\n $(\"#patternsModal > div > div > div.modal-body\").empty();\n\n for (let i = 0; i < NETWORK.trainingPatterns.length; i++) {\n let pattern = NETWORK.trainingPatterns[i];\n\n let columns = (new Array(parseInt($(\"#width\").val()))).fill(\"1fr\").join(\" \");\n let rows = (new Array(parseInt($(\"#height\").val()))).fill(\"1fr\").join(\" \");\n let elements = pattern.data[0].map(function(item, index) {\n return `<div id=\"modal${i}${index}\" style=\"background-color: ${item == 1 ? \"white\" : \"black\"};\"></div>`\n })\n\n\n $(\"#patternsModal > div > div > div.modal-body\").append(`<div class=\"grid\" style=\"grid-template-columns: ${columns}; grid-template-rows: ${rows}\">${elements.join(\"\")}</div>`);\n }\n}", "function buildContent (data, appendName) {\n $.each(data, (index, item) => {\n var contentdiv = $(\"<div/>\").addClass(\"row align-items-center content\").appendTo(appendName);\n var imgdiv = $(\"<div/>\").addClass(\"col-md-6\").appendTo(contentdiv);\n var datadiv1 = $(\"<div/>\").addClass(\"col-md-6 text-center\").appendTo(contentdiv);\n var datadiv2 = $(\"<div/>\").addClass(\"row justify-content-center\").appendTo(datadiv1);\n var datadiv3 = $(\"<div/>\").addClass(\"col-10 col-lg-8 about my-5 mb-md-0\").appendTo(datadiv2);\n var img = \"<img src='\" + item.thumbnail + \"' class='img-fluid'>\";\n $(img).appendTo(imgdiv);\n var title = \"<h2>\" + item.title + \"</h2>\";\n $(title).appendTo(datadiv3);\n var text = \"<p class='lead'>\" + item.text + \"</p>\";\n $(text).appendTo(datadiv3);\n var link = \"<a href='\" + item.articleURL + \"'>read more</a>\";\n $(link).appendTo(datadiv3);\n });\n}", "function createGrid(){\n\n etchContainer.style.gridTemplateColumns = `repeat(${gridSize}, 1fr)`;\n etchContainer.style.gridTemplateRows = `repeat(${gridSize}, 1fr)`;\n \n for (let i = 0; i < gridSize * gridSize; i++){\n let etchSquareDiv = document.createElement(\"div\");\n etchSquareDiv.className = 'etchSquare';\n\n //add listener to change the color, for the sketching purposes\n etchSquareDiv.addEventListener(\"mouseenter\", function(){\n etchSquareDiv.style.backgroundColor = 'black';\n })\n\n etchContainer.appendChild(etchSquareDiv);\n } \n}", "initContainer(){\n if(this.isDissolve()){ \n this.el.css('marginLeft', Math.floor((this.containerWidth - this.contentWidth)/2))\n } else {\n this.el.css('marginLeft', '')\n }\n // reveal content that is cloaked at startup\n // todo optimization - not needed on every window resize?\n [this.el,this.content].map(el => el.css('opacity',1))\n }", "function displayBottomContainer(){\n var container = $('#bottomContainer');\n container.html('');\n var bottomContainer = logic.template(templates.templateBottomContainer, {taskToDo:taskToDo});\n container.append(bottomContainer);\n $('#active').on('click', filter);\n $('#completed').on('click', filter);\n $('#all').on('click', filter);\n }", "function createContentForTables () {\n //each column for TABLES will have it's template\n resetTableValuesBeforeRendering();\n var content_firstColumn =\n `<div class=\"col-12 col-lg-6 col-xl-3\">\n <div class=\"card\"><div class=\"card-body\"><span class=\"c-card-title\">Overall Status</span>` + returnRandomBMGBadge() + `</div></div>\n <div class=\"card\"><div class=\"card-body\"><span class=\"c-card-title\">RSS Status</span>` + returnRandomBMGBadge() + `</div></div>\n <div class=\"card\"><div class=\"card-body\"><span class=\"c-card-title\">Client RSS Status</span>` + returnRandomBMGBadge() + `</div></div>\n <div class=\"card\"><div class=\"card-body\"><span class=\"c-card-title\">Sticky Client Status</span>` + returnRandomBMGBadge() + `</div></div>\n <div class=\"card\"><div class=\"card-body\">\n <div><span class=\"c-card-title\">Interference Status - Overall</span>` + returnRandomBMGBadge() + `</div>\n <div><span class=\"c-card-title\">Interference Status Co- Channel</span>` + returnRandomBMGBadge() + `</div>\n <div><span class=\"c-card-title\">Interference Status - Adjecent</span>` + returnRandomBMGBadge() + `</div>\n </div></div>\n <div class=\"card\"><div class=\"card-body\"><span class=\"c-card-title\">HGw Interference</span>\n <div class=\"row c-small-text-for-cards\">\n <div class=\"col-6\">UniFi` + returnRandomBMGBadge() + `</div>\n <div class=\"col-6\">Home` + returnRandomBMGBadge() + `</div>\n </div>\n </div></div>\n <div class=\"card\"><div class=\"card-body\"><span class=\"c-card-title\">Retransmission Status</span>` + returnRandomBMGBadge() + `\n <div class=\"c-small-text-for-cards\">HGw Number of retransmissions\n <span class=\"float-right\">` + returnRandomNumberInRange(4500, 5300) + `</span>\n </div>\n </div></div>\n <div class=\"card\"><div class=\"card-body\">\n <div class=\"c-small-text-for-cards\">Total Number of Clients\n <span class=\"float-right\">` + returnRandomNumberInRange(5, 200) + `</span>\n </div>\n <div class=\"c-small-text-for-cards\">Max. number of concurent clients\n <span class=\"float-right\">` + returnRandomNumberInRange(1, 77) + `</span>\n </div> \n </div></div>\n <div class=\"card\"><div class=\"card-body\"><span class=\"c-card-title\">HGw Combined status</span>\n <div class=\"c-small-text-for-cards\">HGw Number of clients\n <span class=\"float-right\">` + returnRandomNumberInRange(10, 35) + `</span>\n </div>\n <div class=\"c-small-text-for-cards\">HGw Number of sticky clients\n <span class=\"float-right\">` + returnRandomNumberInRange(1, 5) + `</span>\n </div>\n <div class=\"c-small-text-for-cards\">Data transfered [GB]\n <span class=\"float-right\">` + returnRandomNumberInRange(3, 35) + `</span>\n </div> \n </div></div>\n </div>`;\n var content_secondColumn =\n `<div class=\"col-12 col-lg-6 col-xl-3\">\n <div class=\"card\"><div class=\"card-body\"><span class=\"c-card-title\">HGw Bitrate [Mbps]</span>` + returnKpiTable('Bitrate', true) + `</div></div>\n <div class=\"card\"><div class=\"card-body\">\n <div class=\"c-small-text-for-cards\">HGW total traffic [GB]\n <span class=\"float-right\">` + returnRandomNumberInRange(1, 17) + `</span>\n </div> \n </div></div>\n <div class=\"card\"><div class=\"card-body\"><span class=\"c-card-title\">HGw RSS</span>` + returnKpiTable('RSS [dBm]', true) + `</div></div>\n <div class=\"card\"><div class=\"card-body\"><span class=\"c-card-title\">HGw Interference network RSS</span>` + returnKpiTable('RSS [dBm]', false) + `</div></div>\n </div>`;\n var content_thirdColumn =\n `<div class=\"col-12 col-lg-6 col-xl-3 mt-1 mt-xl-0\">\n <div class=\"row\">\n <div class=\"col-12\">\n <div class=\"card\"><div class=\"card-body\"><span class=\"c-card-title\">WiFi connected time</span>` + returnPieChartPlaceholder(['Percent of time with connected user (s)']) + `</div></div>\n </div>\n </div>\n <div class=\"row\">\n <div class=\"col-12\">\n <div class=\"card\"><div class=\"card-body\">\n <span class=\"c-card-title\">HGw Channel</span>\n <div class=\"c-small-text-for-cards c-xs\">Auto channel enabled: ` + returnYesNoIcon(selectedContractData.contractHgwInfo.autoChannelEnabled) +`</div>\n <div class=\"c-small-text-for-cards c-xs\">Current channel: ` + selectedContractData.contractHgwInfo.channel +`</div>\n <div class=\"c-small-text-for-cards c-xs\">No. of changes: ` + returnRandomNumberInRange(1,99) +`</div>\n <div>` + returnPieChartPlaceholder(['Auto: Yes', 'Auto: No']) + `</div>\n </div></div>\n </div>\n </div>\n <div class=\"row\">\n <div class=\"col-12\">\n <div class=\"card\"><div class=\"card-body\"><span class=\"c-card-title\">HGw WiFi Usage</span>` + returnPieChartPlaceholder(['Low', 'Medium', 'High']) + `</div></div>\n </div>\n </div>\n <div class=\"row\">\n <div class=\"col-12\">\n <div class=\"card\"><div class=\"card-body\"><span class=\"c-card-title\">HGw Percent of time with Sticky Clients</span>` + returnPieChartPlaceholder(['Percent of time with sticky clients']) + `</div></div>\n </div> \n </div>\n </div>`;\n var content_fourthColumn =\n `<div class=\"col-12 col-lg-6 col-xl-3\">\n <div class=\"row\">\n <div class=\"col-12\">\n <div class=\"card\"><div class=\"card-body\"><span class=\"c-card-title\">HGw Interference</span>` + returnPieChartPlaceholder(['Low', 'Medium', 'High']) + `</div></div>\n </div> \n </div>\n <div class=\"row\">\n <div class=\"col-12\">\n <div class=\"card\"><div class=\"card-body\"><span class=\"c-card-title\">HGw Client's RSS Status</span>` + returnPieChartPlaceholder(['Good', 'Medium', 'Bad']) + `</div></div>\n </div>\n </div>\n <div class=\"row\">\n <div class=\"col-12\">\n <div class=\"card\"><div class=\"card-body\"><span class=\"c-card-title\">HGw Interference Home</span>` + returnPieChartPlaceholder(['Low', 'Medium', 'High']) + `</div></div>\n </div>\n </div>\n <div class=\"row\">\n <div class=\"col-12\">\n <div class=\"card\"><div class=\"card-body\"><span class=\"c-card-title\">HGw RSS Status</span>` + returnPieChartPlaceholder(['Good', 'Medium', 'Bad']) + `</div></div>\n </div> \n </div>\n </div>`; \n /* since we created placeholder containers (returnPieChartPlaceholder), we will start checking when those elements are added to DOM\n we want to attach PieChart graphs when those elements are added to DOM\n */\n startCheckingForAddedPiePlaceholders();\n //\n return (content_firstColumn + content_secondColumn + content_thirdColumn + content_fourthColumn);\n }", "createGrid() {\n const board = $(this.selector);\n board.empty();\n\n console.log(board);\n for (let x = 0; x < this.ROWS; x++) {\n const row = $('<div>').addClass('row');\n board.append(row);\n for (let y = 0; y < this.COLS; y++) {\n // gives each index of the rows and columns using the attr\n const col = $('<div>').addClass('col empty').attr('data-col', y).attr('data-row', x);\n row.append(col);\n }\n }\n\n }", "function initializeRows() {\n blogContainer.empty();\n var postsToAdd = [];\n var reversePoststoAdd\n for (var i = 0; i < post.length; i++) {\n postsToAdd.push(createNewRow(post[i]));\n }\n reversePoststoAdd = postsToAdd.reverse()\n blogContainer.append(reversePoststoAdd);\n }", "function genSchedQueueArray() {\n \n $schedQueueArray = [];\n $('.scheduling-queue .queue-label').each(function() {\n $i = $(this).parent();\n \n $schedRow = {};\n \n $schedRow['id'] = $i.find('.queue-label').attr('id').split('-')[2];\n $schedRow['label'] = $i.find('.queue-label').text();\n $schedRow['level'] = $i.find('.queue-level').attr('id');\n $schedRow['unit'] = $i.find('.queue-unit').attr('id');\n $schedRow['lesson'] = $i.find('.queue-lesson').attr('id');\n \n $schedQueueArray.push($schedRow);\n });\n \n return $schedQueueArray;\n}", "template() {\n return `<div id='container' class='jqx-container'>\n <div id='innerContainer' class ='jqx-inner-container'>\n <span id='falseContentContainer' inner-h-t-m-l='[[falseContent]]' class ='jqx-false-content-container'></span>\n <span id='switchThumb' class ='jqx-thumb'></span>\n <span id='trueContentContainer' inner-h-t-m-l='[[trueContent]]' class ='jqx-true-content-container'></span>\n </div>\n <input id='hiddenInput' class ='jqx-hidden-input' type='hidden'>\n </div>`;\n }", "function generateGrid(blocks){\n //subtracting by 10 due to the px values associated with the padding and margin properties\n var gridSquareHeightAndWidth = Math.floor(960/blocks)-10;\n var toAdd = document.createDocumentFragment();\n for(let x=1; x<=blocks; x++){\n for(let y=1; y<=blocks; y++){\n var gridSquare = document.createElement(\"div\");\n gridSquare.id = \"grid-square\";\n gridSquare.style.width = gridSquareHeightAndWidth + \"px\";\n gridSquare.style.height = gridSquareHeightAndWidth + \"px\";\n gridSquare.style.backgroundColor = \"white\";\n gridSquare.addEventListener(\"mouseover\", e => {\n e.target.style.backgroundColor = \"black\";\n })\n toAdd.appendChild(gridSquare);\n }\n }\n document.getElementById(\"container\").appendChild(toAdd); \n}", "function initializeRows() {\n noteContainer.empty();\n var notesToAdd = [];\n for (var i = 0; i < notes.length; i++) {\n notesToAdd.push(createNewRow(notes[i]));\n }\n noteContainer.prepend(notesToAdd);\n }", "function getMatrixContents(rows) {\n var matrixContents = new Array();\n for (let i = 0; i < rows.length; i++) {\n let row = rows[i].getElementsByClassName(\"matrixContent\");\n matrixContents.push([]);\n for (let j = 0; j < row.length; j++) {\n matrixContents[i].push(row[j]);\n }\n }\n return matrixContents;\n }", "function createGrid(numBox){\n var box = '<div class=\"box\"></div>';\n for(var i = 1; i <= numBox; i++){\n for(var j = 1; j <= numBox; j++){\n $('#container').append('<div class=\"box\"></div>');\n }\n }\n var size = (400 - (numBox * 2)) / numBox;\n $('.box').css({'height': size, 'width': size});\n }", "getDropContainers() {\n let dropContainers = [];\n for (let source in this.sources) {\n if (this.sources[source].container) {\n dropContainers.push(Game.getObjectById(this.sources[source].container));\n } else {\n if (source.room) {\n let myContainer = source.pos.findInRange(FIND_STRUCTURES, 1, {\n filter: {structureType: STRUCTURE_CONTAINER}\n })[0];\n if (myContainer) {\n this.sources[source].container = myContainer.id;\n droContainers.push(myContainer);\n }\n }\n }\n }\n return dropContainers;\n }", "function initWidgets() {\n var previewParent = $('#widget-preview', parentNode);\n var widgets = $('.ha-widget-container', previewParent);\n\n // Make widgets draggable.\n widgets\n .on('dragstart', onWidgetDragstart)\n .on('dragend', onWidgetDragend)\n .children().attr('draggable', 'true');\n\n // Create drop targets (dropping on the actual elements is pretty broken in HTML, apparently).\n widgets.each(function () {\n $('<div class=\"drop-target\">')\n .appendTo(previewParent)\n .attr('id', 'ha-widget-droptarget-' + viewmodel.getWidgetIdFromElementId(this.id))\n .on('dragenter', onWidgetDragenter)\n .on('dragleave', onWidgetDragleave)\n .on('dragover', onWidgetDragover)\n .on('drop', onWidgetDrop)\n ;\n });\n }", "createContainers() {\n try {\n extensionElements.controlsContainer = document.createElement(\n 'div'\n );\n extensionElements.controlsContainer.classList.add(\n 'toyplug-controls-container'\n );\n\n extensionElements.controlsContainerHeader = document.createElement(\n 'div'\n );\n extensionElements.controlsContainerHeader.classList.add(\n 'ste-header'\n );\n extensionElements.controlsContainer.appendChild(\n extensionElements.controlsContainerHeader\n );\n\n extensionElements.timeWrapper = document.createElement('div');\n extensionElements.timeWrapper.classList.add('time-slider');\n extensionElements.controlsContainer.appendChild(\n extensionElements.timeWrapper\n );\n\n extensionElements.mouseSlidersWrapper = document.createElement(\n 'div'\n );\n extensionElements.mouseSlidersWrapper.classList.add(\n 'mouse-uniforms'\n );\n extensionElements.controlsContainer.appendChild(\n extensionElements.mouseSlidersWrapper\n );\n\n extensionElements.controlsContainerFooter = document.createElement(\n 'div'\n );\n extensionElements.controlsContainerFooter.classList.add(\n 'ste-footer'\n );\n extensionElements.controlsContainer.appendChild(\n extensionElements.controlsContainerFooter\n );\n\n shaderToyElements.leftColumnContainer.insertBefore(\n extensionElements.controlsContainer,\n shaderToyElements.shaderInfo\n );\n\n return true;\n } catch (e) {\n console.error(e);\n\n return false;\n }\n }", "createDraggableRows() {\n const self = this;\n\n if (!this.settings.rowReorder) {\n return;\n }\n if (this.settings.groupable) {\n this.createDraggableRowsGroupable();\n return;\n }\n\n this.tableBody.children().filter(function () {\n return $(this).find('.datagrid-reorder-icon').length < 1;\n }).attr('data-arrange-exclude', true);\n\n // Attach the Drag API\n this.tableBody.arrange({\n placeholder: `<tr class=\"datagrid-reorder-placeholder\"><td colspan=\"${this.visibleColumns().length}\"></td></tr>`,\n handle: '.datagrid-reorder-icon',\n isVisualItems: true\n })\n .off('beforearrange.datagrid').on('beforearrange.datagrid', (e, status) => {\n if (self.isSafari) {\n status.start.css({ display: 'inline-block' });\n }\n })\n .off('arrangeupdate.datagrid')\n .on('arrangeupdate.datagrid', (e, status) => {\n if (self.isSafari) {\n status.end.css({ display: '' });\n }\n\n self.reorderRow(status.startIndex, status.endIndex, status);\n });\n }", "function wrapChildren() {\n const arr = [];\n const count = React.Children.count(children);\n const arrChildren = React.Children.toArray(children);\n if (count > 0) {\n arr.push(\n <Pane key=\"pane-0\" vertical={vertical}>\n {arrChildren[0]}\n </Pane>\n );\n if (count > 1) {\n // add divider\n const sty = {};\n if (vertical) sty.height = `${DIVIDER_SIZE}px`;\n else sty.width = `${DIVIDER_SIZE}px`;\n arr.push(\n <div\n key=\"divider\"\n className={resizing ? \"divider resizing\" : \"divider\"}\n onMouseDown={() => setResizing(true)}\n style={sty}\n >\n <div />\n </div>\n );\n // and set the second pane size via css flex-basis\n const secondPaneStyle = { flexBasis };\n arr.push(\n <Pane key=\"pane-1\" vertical={vertical} style={secondPaneStyle}>\n {arrChildren[1]}\n </Pane>\n );\n }\n }\n return arr;\n }", "function generateCells(){\r\n for (let y = 0; y < rows; y++){\r\n var row = doc.createElement('div');\r\n row.setAttribute('class', 'row');\r\n docBody.appendChild(row);\r\n for (let x = 0; x < cols; x++){\r\n let cell = doc.createElement('div');\r\n cell.textContent = 0;\r\n cell.setAttribute('class', 'cell');\r\n row.appendChild(cell);\r\n }\r\n }\r\n \r\n var cells = doc.querySelectorAll('.cell');\r\n\r\n for (let i = 0; i < cells.length; i++)\r\n {\r\n cells[i].addEventListener('mouseover', cellDrag);\r\n cells[i].addEventListener('click', cellClick);\r\n }\r\n\r\n return cells;\r\n\r\n}", "function createItems() {\n for (var i = 0; i <= 5; i++) {\n gridWrapper.append('<div class=\"gallery_mars__item___hide\"></div>');\n }\n }" ]
[ "0.5649352", "0.56072223", "0.5529934", "0.54228103", "0.53859407", "0.53843784", "0.53828293", "0.53321064", "0.5302756", "0.5291456", "0.52691966", "0.5238669", "0.5229802", "0.5219804", "0.52129", "0.52021295", "0.51813215", "0.517195", "0.5167175", "0.5163525", "0.51569563", "0.51346415", "0.51231414", "0.50876045", "0.50762194", "0.5019097", "0.5018579", "0.50168437", "0.50107443", "0.49999857", "0.49957532", "0.49928156", "0.49786863", "0.49784836", "0.49682593", "0.49286953", "0.49252254", "0.49251115", "0.4918545", "0.4918235", "0.49181068", "0.49056473", "0.4905002", "0.4900035", "0.48998365", "0.48936826", "0.48935047", "0.48745382", "0.48687413", "0.4851678", "0.48461127", "0.4842499", "0.4838149", "0.48279777", "0.4822745", "0.48215917", "0.47995487", "0.4798268", "0.47973233", "0.47943586", "0.4790477", "0.47898245", "0.4788736", "0.47882587", "0.47852698", "0.47804174", "0.4777122", "0.47699907", "0.47655624", "0.47619587", "0.47615105", "0.47547445", "0.47521123", "0.47516763", "0.47493693", "0.47430512", "0.47393423", "0.4733186", "0.47324938", "0.47276482", "0.47212443", "0.47168526", "0.47081092", "0.47042012", "0.4700647", "0.46978173", "0.469591", "0.4690792", "0.46878263", "0.46855482", "0.46845025", "0.46819034", "0.4681685", "0.46813798", "0.4680722", "0.4675683" ]
0.66352576
3
Mouse Handlers TODO: better documentation!
function attachHandlers(segments, modifiedEventId) { var segmentContainer = getDaySegmentContainer(); segmentElementEach(segments, function(segment, element, i) { var event = segment.event; if (event._id === modifiedEventId) { bindDaySeg(event, element, segment); }else{ element[0]._fci = i; // for lazySegBind } }); lazySegBind(segmentContainer, segments, bindDaySeg); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function addMouseHandlers() {\n container.addEventListener('mousedown', function(evt) {\n // console.log('mousedown', evt);\n lastX = evt.screenX;\n container.addEventListener('mousemove', mousemove);\n container.addEventListener('mouseup', function(e) {\n container.removeEventListener('mousemove', mousemove);\n });\n container.addEventListener('mouseout', function(e) {\n container.removeEventListener('mousemove', mousemove);\n });\n });\n}", "function mouseClicked() {\n if (start.start === false) {\n start.mouseClicked();\n } else {\n handler.mouseClicked();\n }\n if (handler.active === handler.warning && trigger.warning === false) {\n trigger.mouseClicked();\n }\n if (\n handler.active === handler.nameplate &&\n doorbell.ok === false &&\n doorbell.name.length >= 1\n ) {\n doorbell.mouseClicked();\n }\n if (\n handler.active === handler.decisionC1 ||\n handler.active === handler.decisionH3 ||\n handler.active === handler.decisionF1 ||\n handler.active === handler.decisionF3\n ) {\n decision1.mouseClicked();\n decision2.mouseClicked();\n }\n // red flags buttons\n if (handler.active === handler.annegretC1) {\n control.mouseClicked();\n }\n if (handler.active === handler.frankE6) {\n lie.mouseClicked();\n }\n if (handler.active === handler.monologueE3) {\n arm.mouseClicked();\n }\n if (handler.active === handler.annegretF8) {\n victim.mouseClicked();\n }\n if (handler.active === handler.monologueG2) {\n noise.mouseClicked();\n }\n if (handler.active === handler.monologueH8) {\n phone.mouseClicked();\n }\n\n if (handler.active === handler.end) {\n end.mouseClicked();\n }\n}", "function onMouseClick(e) {\n eventHandler.mouseClickHandler(e);\n}", "function MouseListener() {\n}", "function mouse(kind, pt, id) {\n \n}", "function mousePressed() {\n session.mousePressed();\n}", "_setupMouse () {\n this._events['mousemove'] = {event: this._handleMouseMove, context: document}\n this._events['mousedown'] = {event: this._handleMouseDown, context: document}\n this._events['mouseenter'] = {event: this._handleMouseEnter, context: document}\n this._events['mouseleave'] = {event: this._handleMouseLeave, context: document}\n this._events['mouseup'] = {event: this._handleMouseUp, context: document}\n }", "mousePressed() {\n console.log(\"Mouse pressed\");\n }", "function mouseUp() { }", "mouseDown(x, y, _isLeftButton) {}", "function handleMouseDown()\r\n{\r\n _mouse_down = true;\r\n}", "mouseDown(pt) {}", "mouseDown(pt) {}", "e_mouseEnter(e)\n\t{\n\t\t\n\t}", "_handleMouseInteraction() {\n const that = this;\n\n that._handleTextSelection();\n\n that._changeCheckState('pointer');\n that.focus();\n that._updateHidenInputNameAndValue();\n }", "_handleMouseInteraction() {\n const that = this;\n\n that._handleTextSelection();\n\n that._changeCheckState('pointer');\n that.focus();\n that._updateHidenInputNameAndValue();\n }", "function onMouseDown(event) { }", "function mousePressed() {\n startMouseX = mouseX;\n startMouseY = mouseY;\n }", "mouseEventsList(){\n this.mouseDownF = this.mouseDownF.bind(this);\n this.mouseMoveF = this.mouseMoveF.bind(this);\n this.mouseUpF = this.mouseUpF.bind(this);\n this.keyClick = this.keyClick.bind(this);\n this.handleFiles = this.handleFiles.bind(this);\n }", "on_mousedown(e, localX, localY) {\n\n }", "onIntersectedByMouse(){\n }", "function handleMouseClickEvent(data){\n\t// mouse move\n\t//stage.mouseMove(data['mouseClickEvent'][0], data['mouseClickEvent'][1]);\n\tstage.player.changedState = true;\n\n\t// mouse click\n\tstage.mouseClick(data['mouseClickEvent'][0], data['mouseClickEvent'][1]);\n}", "function mouseMoveHandler(e) {\r\n\tif (!e) {\r\n\t\te = event;\r\n\t}\r\n\tif (e.clientX) {\r\n\t //if there is an x pos property\r\n\t //GET MOUSE LOCATION\r\n\t\tv_xcoordinate = mouseX(e);\r\n\t\tv_ycoordinate = mouseY(e);\t\r\n\t\tv_havemouse = 1;\r\n\t}\r\n\tif (v_visible == 1) { \r\n\t\tpositionLayer();\t\r\n\t}\r\n}", "on_mousemove(e, localX, localY) {\n\n }", "function mousePressed(){\n console.log (mouseX, mouseY);\n}", "function handleMouseInput(dir) {\n game.handleMouseInput(this, dir);\n}", "function mouseClicked() {\n MouseClickedAtX = mouseX;\n MouseClickedAtY = mouseY;\n}", "function mouseMoved()\n{\n\t\n}", "function mouseDown(mousePos) {\n\t}", "function mouseDown(mousePos) {\n\t}", "function mouseevent(e){\n\t// console.log(`Event Type = ${e.type}`);\n}", "e_mouseOver(e)\n\t{\n\n\t}", "function mousePressed(){\n microBitConnect();\n}", "function Component_Handler() {\n\n /**\n * @property mouseEntered\n * @type boolean\n * @protected\n */\n this.mouseEntered = false;\n\n /**\n * @property mouseLeaved\n * @type boolean\n * @protected\n */\n this.mouseLeaved = true;\n }", "function Component_Handler() {\n\n /**\n * @property mouseEntered\n * @type boolean\n * @protected\n */\n this.mouseEntered = false;\n\n /**\n * @property mouseLeaved\n * @type boolean\n * @protected\n */\n this.mouseLeaved = true;\n }", "function mousePressed() {\n for (let i = 0; i < musicBlocks.length; i++) {\n let musicBlock = musicBlocks[i];\n\n musicBlock.mousePressed(width / 2, height / 2);\n\n }\n}", "mouseMove(x, y) {}", "function mousePressed() {\n init();\n}", "set Mouse0(value) {}", "function mousePressed() {\n\tinit();\n}", "function onMouseEvent(e) {\n\n\t\t\t// propagate the event to the callback with x,y coords\n\t\t\tmouseEventCB(e, translateMouseCoords(e.clientX, e.clientY));\n\t\t}", "onMouseDown(e) {}", "function mousePressed() {\n // Store mouse position when pressed\n mouse = [mouseX, mouseY];\n\n // Hirajoshi scale in C\n // https://www.pianoscales.org/hirajoshi.html\n const notes = [\"C\", \"Db\", \"F\", \"Gb\", \"Bb\"];\n const octaves = [2, 3, 4];\n const octave = random(octaves);\n const note = random(notes);\n synth.triggerAttackRelease(note + octave, \"8n\");\n}", "function mouse(event){\n\tlet x = event.clientX;\n\tlet y = event.clientY;\n\tlook(x,y);\n}", "function mousePressed () {\n for (let i = 0; i < screens.length; i++) {\n if (screens[i].onMousePressed) {\n screens[i].onMousePressed(mouseX, mouseY);\n }\n }\n}", "get Mouse0() {}", "function mouseClicked() {\n print(mouseX, mouseY)\n}", "_mouseEvent(eventType, e)\n\t{\n\t\tswitch(eventType)\n\t\t{\n\t\t\tcase ComponentEvent.MOUSE_OVER:\n\t\t\t\tdocument.body.style.cursor = 'pointer';\n\t\t\t\tbreak;\n\n\t\t\tcase ComponentEvent.MOUSE_OUT:\n\t\t\t\tdocument.body.style.cursor = 'default';\n\t\t\t\tbreak;\n\n\t\t\tdefault:\n\t\t\t\tbreak;\n\t\t}\n\n\t\tsuper._mouseEvent(eventType, e);\n\t}", "function mouseClicked(){\n // the x position will take the value of the horizontal mouse position\n xPos=mouseX;\n // the y position will take the value of the vertical mouse position\n yPos = mouseY;\n}", "function setmouseactions() {\n setTuntematonMouseAction();\n setTunnetutMouseAction();\n setTeemaMouseAction();\n //TODO: \"vihje sana\" class + newly exposed missing\n}", "_mouseEvent(eventType, e)\n\t{\n\t\tsuper._mouseEvent(eventType, e);\n\t}", "_mouseEvent(eventType, e)\n\t{\n\t\tsuper._mouseEvent(eventType, e);\n\t}", "_mouseEvent(eventType, e)\n\t{\n\t\tsuper._mouseEvent(eventType, e);\n\t}", "_mouseEvent(eventType, e)\n\t{\n\t\tsuper._mouseEvent(eventType, e);\n\t}", "_mouseEvent(eventType, e)\n\t{\n\t\tsuper._mouseEvent(eventType, e);\n\t}", "function delegateToMouseStateManager(event) {\n mouseStateManager.event(event);\n}", "_mouseEvent(eventType, e)\n\t{\n\t\tswitch(eventType)\n\t\t{\n\t\t\tcase ComponentEvent.MOUSE_OVER:\n\t\t\t\tdocument.body.style.cursor = 'pointer';\n\t\t\t\tbreak;\n\n\t\t\tcase ComponentEvent.MOUSE_OUT:\n\t\t\t\tdocument.body.style.cursor = 'default';\n\t\t\t\tbreak;\n\n\t\t\tcase ComponentEvent.CLICK:\n\t\t\t\tthis.SwitchState();\n\t\t\t\tbreak;\n\n\t\t\tdefault:\n\t\t\t\tbreak;\n\t\t}\n\n\t\tsuper._mouseEvent(eventType, e);\n\t}", "_mouseEvent(eventType, e)\n\t{\n\t\tswitch(eventType)\n\t\t{\n\t\t\tcase ComponentEvent.MOUSE_OVER:\n\t\t\t\tdocument.body.style.cursor = 'pointer';\n\t\t\t\tbreak;\n\n\t\t\tcase ComponentEvent.MOUSE_OUT:\n\t\t\t\tdocument.body.style.cursor = 'default';\n\t\t\t\tbreak;\n\n\t\t\tcase ComponentEvent.CLICK:\n\t\t\t\tthis.SwitchState();\n\t\t\t\tbreak;\n\n\t\t\tdefault:\n\t\t\t\tbreak;\n\t\t}\n\n\t\tsuper._mouseEvent(eventType, e);\n\t}", "function addMouseHandler(canvas) {\n canvas.addEventListener('mousemove', onMouseMove, false);\n canvas.addEventListener('mousedown', onMouseDown, false);\n canvas.addEventListener('mouseup', onMouseUp, false);\n canvas.addEventListener('mouseleave', onMouseLeave, false);\n}", "function useMouse (){\n\t\tstage.removeChild (chooseS);\n\t\tc.Ticker.addEventListener (\"tick\", foreverMouse);\t\n\t\t handleMouseBool = true;\n\t\t\tstartedBool = true;\n\t\t startGame ();\n\t\t\t\n\t\t\t\t\n\t\t //console.log (\"mouse gameplay\");\n\t\t\n\t\t\n\t\t}", "function mousePressed() {\n\n CheckButtons(Buttons);\n CheckHover(Buttons);\n\n}", "function init_mousemove() {\n if(document.layers) document.captureEvents(Event.MOUSEMOVE);\n document.onmousemove = dpl_mouse_move;\n document.onmousedown = dpl_mouse_click;\n }", "function mousePressed() {y=1}", "mouseReleased() {\n this.mouseEvent(\"mouseReleased\");\n }", "_mouseEvent(eventType, e)\n\t{\n\t\tswitch(eventType)\n\t\t{\n\t\t\tcase ComponentEvent.MOUSE_OVER:\n\t\t\t\tdocument.body.style.cursor = 'text';\n\t\t\t\tbreak;\n\n\t\t\tcase ComponentEvent.MOUSE_OUT:\n\t\t\t\tdocument.body.style.cursor = 'default';\n\t\t\t\tbreak;\n\n\t\t\tdefault:\n\t\t\t\tbreak;\n\t\t}\n\n\t\tsuper._mouseEvent(eventType, e);\n\t}", "function down(evt){mouseDown(getMousePos(evt));}", "function down(evt){mouseDown(getMousePos(evt));}", "function mousePressed(){\n for(var i=0; i<mirnas.length; i++){\n mirnas[i].clicked(mouseX,mouseY);\n }\n}", "function onMouseMove(e) {\n\t// store mouseX and mouseY position\n\tmouseX = e.clientX;\n\tmouseY = e.clientY;\n}", "function handler() {\n applyFishEye(\n sig.mousecaptor.mouseX,\n sig.mousecaptor.mouseY\n );\n }", "_bindCursorEvents() {\n\n this.sections\n .mouseenter(this.onEnter.bind(this))\n .mouseleave(this.onLeave.bind(this))\n .click(this.onClick.bind(this));\n\n }", "function mousePressed() {\n\tx = 40;//Cada vez que pressiona o mouse posicao x recebe o valor\n\ty = 10;//Cada vez que pressiona o mouse posicao y recebe o valor\n}", "mousedownHandler(event) {\n\n // Set mouse state\n if (this._state === this.STATE.NONE) {\n this._state = event.button;\n }\n\n this._moveCurr = this.getMouseLocation(event.pageX, event.pageY);\n\n this._canvas.addEventListener('mousemove', this.mousemove);\n this._canvas.addEventListener('mouseup', this.mouseup);\n }", "function handleMouseDown(event) {\n mouseDown = true;\n lastMouseX = event.clientX;\n lastMouseY = event.clientY;\n}", "function mouseClicked(){\n\tconsole.log(mouseX, mouseY);\n}", "mouseUp(x, y, _isLeftButton) {}", "function mouse_move_handler(e) {\n //Saves the previous coordinates\n mouse.px = mouse.x;\n mouse.py = mouse.y;\n\n //Sets the new coordinates\n mouse.x = e.offsetX || e.layerX;\n mouse.y = e.offsetY || e.layerY;\n }", "bindMouse() {\n const self = this;\n const el = this.element;\n // send event to CoreMouseService\n function sendEvent(ev) {\n // get mouse coordinates\n const pos = self._mouseService.getRawByteCoords(ev, self.screenElement, self.cols, self.rows);\n if (!pos) {\n return false;\n }\n let but;\n let action;\n switch (ev.overrideType || ev.type) {\n case 'mousemove':\n action = 32 /* MOVE */;\n if (ev.buttons === undefined) {\n // buttons is not supported on macOS, try to get a value from button instead\n but = 3 /* NONE */;\n if (ev.button !== undefined) {\n but = ev.button < 3 ? ev.button : 3 /* NONE */;\n }\n }\n else {\n // according to MDN buttons only reports up to button 5 (AUX2)\n but = ev.buttons & 1 ? 0 /* LEFT */ :\n ev.buttons & 4 ? 1 /* MIDDLE */ :\n ev.buttons & 2 ? 2 /* RIGHT */ :\n 3 /* NONE */; // fallback to NONE\n }\n break;\n case 'mouseup':\n action = 0 /* UP */;\n but = ev.button < 3 ? ev.button : 3 /* NONE */;\n break;\n case 'mousedown':\n action = 1 /* DOWN */;\n but = ev.button < 3 ? ev.button : 3 /* NONE */;\n break;\n case 'wheel':\n // only UP/DOWN wheel events are respected\n if (ev.deltaY !== 0) {\n action = ev.deltaY < 0 ? 0 /* UP */ : 1 /* DOWN */;\n }\n but = 4 /* WHEEL */;\n break;\n default:\n // dont handle other event types by accident\n return false;\n }\n // exit if we cannot determine valid button/action values\n // do nothing for higher buttons than wheel\n if (action === undefined || but === undefined || but > 4 /* WHEEL */) {\n return false;\n }\n return self._coreMouseService.triggerMouseEvent({\n col: pos.x - 33,\n row: pos.y - 33,\n button: but,\n action,\n ctrl: ev.ctrlKey,\n alt: ev.altKey,\n shift: ev.shiftKey\n });\n }\n /**\n * Event listener state handling.\n * We listen to the onProtocolChange event of CoreMouseService and put\n * requested listeners in `requestedEvents`. With this the listeners\n * have all bits to do the event listener juggling.\n * Note: 'mousedown' currently is \"always on\" and not managed\n * by onProtocolChange.\n */\n const requestedEvents = {\n mouseup: null,\n wheel: null,\n mousedrag: null,\n mousemove: null\n };\n const eventListeners = {\n mouseup: (ev) => {\n sendEvent(ev);\n if (!ev.buttons) {\n // if no other button is held remove global handlers\n this._document.removeEventListener('mouseup', requestedEvents.mouseup);\n if (requestedEvents.mousedrag) {\n this._document.removeEventListener('mousemove', requestedEvents.mousedrag);\n }\n }\n return this.cancel(ev);\n },\n wheel: (ev) => {\n sendEvent(ev);\n ev.preventDefault();\n return this.cancel(ev);\n },\n mousedrag: (ev) => {\n // deal only with move while a button is held\n if (ev.buttons) {\n sendEvent(ev);\n }\n },\n mousemove: (ev) => {\n // deal only with move without any button\n if (!ev.buttons) {\n sendEvent(ev);\n }\n }\n };\n this.register(this._coreMouseService.onProtocolChange(events => {\n // apply global changes on events\n if (events) {\n if (this.optionsService.options.logLevel === 'debug') {\n this._logService.debug('Binding to mouse events:', this._coreMouseService.explainEvents(events));\n }\n this.element.classList.add('enable-mouse-events');\n this._selectionService.disable();\n }\n else {\n this._logService.debug('Unbinding from mouse events.');\n this.element.classList.remove('enable-mouse-events');\n this._selectionService.enable();\n }\n // add/remove handlers from requestedEvents\n if (!(events & 8 /* MOVE */)) {\n el.removeEventListener('mousemove', requestedEvents.mousemove);\n requestedEvents.mousemove = null;\n }\n else if (!requestedEvents.mousemove) {\n el.addEventListener('mousemove', eventListeners.mousemove);\n requestedEvents.mousemove = eventListeners.mousemove;\n }\n if (!(events & 16 /* WHEEL */)) {\n el.removeEventListener('wheel', requestedEvents.wheel);\n requestedEvents.wheel = null;\n }\n else if (!requestedEvents.wheel) {\n el.addEventListener('wheel', eventListeners.wheel, { passive: false });\n requestedEvents.wheel = eventListeners.wheel;\n }\n if (!(events & 2 /* UP */)) {\n this._document.removeEventListener('mouseup', requestedEvents.mouseup);\n requestedEvents.mouseup = null;\n }\n else if (!requestedEvents.mouseup) {\n requestedEvents.mouseup = eventListeners.mouseup;\n }\n if (!(events & 4 /* DRAG */)) {\n this._document.removeEventListener('mousemove', requestedEvents.mousedrag);\n requestedEvents.mousedrag = null;\n }\n else if (!requestedEvents.mousedrag) {\n requestedEvents.mousedrag = eventListeners.mousedrag;\n }\n }));\n // force initial onProtocolChange so we dont miss early mouse requests\n this._coreMouseService.activeProtocol = this._coreMouseService.activeProtocol;\n /**\n * \"Always on\" event listeners.\n */\n this.register(addDisposableDomListener(el, 'mousedown', (ev) => {\n ev.preventDefault();\n this.focus();\n // Don't send the mouse button to the pty if mouse events are disabled or\n // if the selection manager is having selection forced (ie. a modifier is\n // held).\n if (!this._coreMouseService.areMouseEventsActive || this._selectionService.shouldForceSelection(ev)) {\n return;\n }\n sendEvent(ev);\n // Register additional global handlers which should keep reporting outside\n // of the terminal element.\n // Note: Other emulators also do this for 'mousedown' while a button\n // is held, we currently limit 'mousedown' to the terminal only.\n if (requestedEvents.mouseup) {\n this._document.addEventListener('mouseup', requestedEvents.mouseup);\n }\n if (requestedEvents.mousedrag) {\n this._document.addEventListener('mousemove', requestedEvents.mousedrag);\n }\n return this.cancel(ev);\n }));\n this.register(addDisposableDomListener(el, 'wheel', (ev) => {\n if (!requestedEvents.wheel) {\n // Convert wheel events into up/down events when the buffer does not have scrollback, this\n // enables scrolling in apps hosted in the alt buffer such as vim or tmux.\n if (!this.buffer.hasScrollback) {\n const amount = this.viewport.getLinesScrolled(ev);\n // Do nothing if there's no vertical scroll\n if (amount === 0) {\n return;\n }\n // Construct and send sequences\n const sequence = C0.ESC + (this._coreService.decPrivateModes.applicationCursorKeys ? 'O' : '[') + (ev.deltaY < 0 ? 'A' : 'B');\n let data = '';\n for (let i = 0; i < Math.abs(amount); i++) {\n data += sequence;\n }\n this._coreService.triggerDataEvent(data, true);\n }\n return;\n }\n }, { passive: true }));\n // allow wheel scrolling in\n // the shell for example\n this.register(addDisposableDomListener(el, 'wheel', (ev) => {\n if (requestedEvents.wheel)\n return;\n if (!this.viewport.onWheel(ev)) {\n return this.cancel(ev);\n }\n }, { passive: false }));\n this.register(addDisposableDomListener(el, 'touchstart', (ev) => {\n if (this._coreMouseService.areMouseEventsActive)\n return;\n this.viewport.onTouchStart(ev);\n return this.cancel(ev);\n }, { passive: true }));\n this.register(addDisposableDomListener(el, 'touchmove', (ev) => {\n if (this._coreMouseService.areMouseEventsActive)\n return;\n if (!this.viewport.onTouchMove(ev)) {\n return this.cancel(ev);\n }\n }, { passive: false }));\n }", "function handler() {\n applyFishEye(\n sig.mousecaptor.mouseX,\n sig.mousecaptor.mouseY\n );\n }", "function loadWhiteMouseTool() {\r\n Input.mouseMove = function (e) {\r\n\r\n }\r\n\r\n Input.mouseDown = function (e) {\r\n\r\n }\r\n\r\n Input.mouseUp = function (e) {\r\n\r\n }\r\n\r\n Input.doubleClick = function (e) {\r\n\r\n }\r\n\r\n Input.captureRightClick = function (e) {\r\n e.preventDefault();\r\n }\r\n\r\n Input.mouseHover = function () {\r\n\r\n }\r\n}", "mouseClicked() {\n if (currMouseAction == MouseAction.DELETE) {\n for (let i = 0; i < this.wire.length; i++) {\n if (this.wire[i].isMouseOver()) {\n // destroy the wire\n this.wire[i].destroy();\n delete this.wire[i];\n this.wire.splice(i, 1);\n }\n }\n }\n\n /** For each shortCircuit call mouseClicked*/\n for (let i = 0; i < this.shortCircuit.length; i++) { //Call mouseClicked Function for each shortCircuit\n this.shortCircuit[i].mouseClicked();\n }\n }", "function MouseUpEvent() {}", "function mouseDown(x, y, button) {\r\n\tif (button == 0 || button == 2) {\t// If the user clicks the right or left mouse button...\r\n\t\tmouseClick = true;\r\n\t}\r\n\t//*** Your Code Here\r\n}", "function mouseDown(e) {\n mousePress(e.button, true);\n}", "function showMouse(state) { }", "function mouseMoveHandler(e) {\n updateFromEvent(e);\n move(mouseX, mouseY);\n }", "function handleMouseMove(evt){\n\t\tdocument.getElementById(\"box\").style.cursor=\"crosshair\";\n\t}", "function themeMouseMove() {\n screen_has_mouse = true;\n }", "function mousePressed() {\n // Map mouse to the key index\n var key = floor(map(mouseX, 0, width, 0, notes.length));\n playNote(notes[key]);\n}", "function mousePressed() {\r\n mouseIsDown = true;\r\n}", "function cust_MouseDown() {\n\n}", "mouseUp(pt) {}", "mouseUp(pt) {}", "_handleMouseEnter() {\n this._hovered.next(this);\n }", "function mouseClicked(){\n\tloop()\n}", "OnMouseDown(e){\n\t\tif(this.disabled) return\n\n\t\tlet position = this.CalculatePosition(e)\n\t\tthis.MoveSlider(position)\n\n\t\twindow.addEventListener('mouseup', this.OnMouseUpBind)\n\t\twindow.addEventListener('mousemove', this.OnMouseMoveBind)\n\t}", "function onMouseDown(e) {\n\n\t\t\t// propagate the event to the callback with x,y coords\n\t\t\tmouseDownCB(e, translateMouseCoords(e.clientX, e.clientY));\n\t\t}", "function mousePressed() {\n noLoop();\n mouseDragged();\n}", "mouseDown(e){\n if(e.button == 0){\n e.stopPropagation();\n e.preventDefault();\n\n this.set('moveStart', true);\n\n const self = this;\n this.set('mouseMoveListener', function(e){\n if(self.mouseMove){\n self.mouseMove(e);\n }\n });\n\n this.set('mouseUpListener', function(e){\n if(self.mouseUp){\n self.mouseUp(e);\n }\n });\n\n document.addEventListener('mousemove', this.get('mouseMoveListener'));\n document.addEventListener('mouseup', this.get('mouseUpListener'));\n }\n }", "_onMouseDown(event) {\n if (this.disabled) {\n return;\n }\n\n // do not accept right mouse button clicks\n if (event instanceof MouseEvent) {\n if ((event.which || event.button) !== 1) {\n return;\n }\n }\n\n event.preventDefault();\n\n this._currentHandle = event.target.closest(`.${CLASSNAME_HANDLE}`);\n\n // If no handle was touched:\n // the closest handle needs to jump to the closest valid position\n if (!this._currentHandle) {\n const p = this._getPoint(event);\n const val = this._getValueFromCoord(p.pageX, p.pageY, true);\n\n this._currentHandle = this._findNearestHandle(p.pageX, p.pageY);\n this._updateValue(this._currentHandle, val);\n this._setHandleFocus(this._currentHandle);\n }\n\n this._currentHandle.classList.add('is-dragged');\n document.body.classList.add('u-coral-closedHand');\n\n this._draggingHandler = this._handleDragging.bind(this);\n this._mouseUpHandler = this._mouseUp.bind(this);\n\n events.on('mousemove.Slider', this._draggingHandler);\n events.on('mouseup.Slider', this._mouseUpHandler);\n\n events.on('touchmove.Slider', this._draggingHandler);\n events.on('touchend.Slider', this._mouseUpHandler);\n events.on('touchcancel.Slider', this._mouseUpHandler);\n\n this._setHandleFocus(this._currentHandle);\n }", "function mouseDown(e)\n{\n\tmouseClickDown = true;\n\tmouseX = e.clientX;\n\tmouseY = e.clientY;\n}" ]
[ "0.7325405", "0.72607493", "0.72038686", "0.71541834", "0.71367234", "0.70681775", "0.7033748", "0.7016471", "0.6984588", "0.6973756", "0.68919283", "0.68901193", "0.68901193", "0.6841584", "0.6834504", "0.6834504", "0.6806799", "0.67860967", "0.6755316", "0.6753611", "0.6753099", "0.67501265", "0.6738339", "0.67318535", "0.67272043", "0.67265165", "0.672622", "0.67183083", "0.6716584", "0.6716584", "0.67128366", "0.6700782", "0.6699512", "0.6698901", "0.6698901", "0.66922975", "0.6689618", "0.6687103", "0.6670438", "0.66680795", "0.6657476", "0.66510993", "0.66510445", "0.66483724", "0.66422254", "0.66338253", "0.6622751", "0.6616938", "0.6612435", "0.6611489", "0.6604638", "0.6604638", "0.6604638", "0.6604638", "0.6604638", "0.659805", "0.6575776", "0.6575776", "0.6572889", "0.6568507", "0.65666384", "0.65592384", "0.65524846", "0.6545005", "0.65432745", "0.65418214", "0.65418214", "0.65327716", "0.653173", "0.65297425", "0.65290344", "0.6512726", "0.65097016", "0.65088683", "0.6508035", "0.6500799", "0.64924777", "0.6491043", "0.64866", "0.648205", "0.6478156", "0.6476969", "0.6474924", "0.6472105", "0.6469709", "0.6466194", "0.6466071", "0.6465734", "0.646496", "0.64631945", "0.6460458", "0.64593416", "0.64593416", "0.6455923", "0.6454468", "0.6453931", "0.64523387", "0.6428564", "0.6424443", "0.6409577", "0.64094174" ]
0.0
-1
A cmp function for determining which segments should appear higher up
function compareDaySegments(a, b) { return (b.rightCol - b.leftCol) - (a.rightCol - a.leftCol) || // put wider events first b.event.allDay - a.event.allDay || // if tie, put all-day events first (booleans cast to 0/1) a.event.start - b.event.start || // if a tie, sort by event start date (a.event.title || '').localeCompare(b.event.title) // if a tie, sort by event title }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function compareForwardSlotSegs(seg1, seg2) {\n\t// put higher-pressure first\n\treturn seg2.forwardPressure - seg1.forwardPressure ||\n\t\t// put segments that are closer to initial edge first (and favor ones with no coords yet)\n\t\t(seg1.backwardCoord || 0) - (seg2.backwardCoord || 0) ||\n\t\t// do normal sorting...\n\t\tcompareSlotSegs(seg1, seg2);\n}", "function compareForwardSlotSegs(seg1, seg2) {\n\t// put higher-pressure first\n\treturn seg2.forwardPressure - seg1.forwardPressure ||\n\t\t// put segments that are closer to initial edge first (and favor ones with no coords yet)\n\t\t(seg1.backwardCoord || 0) - (seg2.backwardCoord || 0) ||\n\t\t// do normal sorting...\n\t\tcompareSlotSegs(seg1, seg2);\n}", "function compareForwardSlotSegs(seg1, seg2) {\n\t// put higher-pressure first\n\treturn seg2.forwardPressure - seg1.forwardPressure ||\n\t\t// put segments that are closer to initial edge first (and favor ones with no coords yet)\n\t\t(seg1.backwardCoord || 0) - (seg2.backwardCoord || 0) ||\n\t\t// do normal sorting...\n\t\tcompareSlotSegs(seg1, seg2);\n}", "function compareForwardSlotSegs(seg1, seg2) {\n\t// put higher-pressure first\n\treturn seg2.forwardPressure - seg1.forwardPressure ||\n\t\t// put segments that are closer to initial edge first (and favor ones with no coords yet)\n\t\t(seg1.backwardCoord || 0) - (seg2.backwardCoord || 0) ||\n\t\t// do normal sorting...\n\t\tcompareSlotSegs(seg1, seg2);\n}", "function compareForwardSlotSegs(seg1, seg2) {\n\t// put higher-pressure first\n\treturn seg2.forwardPressure - seg1.forwardPressure ||\n\t\t// put segments that are closer to initial edge first (and favor ones with no coords yet)\n\t\t(seg1.backwardCoord || 0) - (seg2.backwardCoord || 0) ||\n\t\t// do normal sorting...\n\t\tcompareSlotSegs(seg1, seg2);\n}", "function compareScoreArray(a, b) {\r\n let i = 0;\r\n while (i < a.length && i < b.length) {\r\n const diff = b[i] - a[i];\r\n // only keep going if diff === 0\r\n if (diff)\r\n return diff;\r\n i++;\r\n }\r\n // if the last subsegment was Static, the shorter segments should be sorted first\r\n // otherwise sort the longest segment first\r\n if (a.length < b.length) {\r\n return a.length === 1 && a[0] === 40 /* Static */ + 40 /* Segment */\r\n ? -1\r\n : 1;\r\n }\r\n else if (a.length > b.length) {\r\n return b.length === 1 && b[0] === 40 /* Static */ + 40 /* Segment */\r\n ? 1\r\n : -1;\r\n }\r\n return 0;\r\n}", "function compareScoreArray(a, b) {\r\n let i = 0;\r\n while (i < a.length && i < b.length) {\r\n const diff = b[i] - a[i];\r\n // only keep going if diff === 0\r\n if (diff)\r\n return diff;\r\n i++;\r\n }\r\n // if the last subsegment was Static, the shorter segments should be sorted first\r\n // otherwise sort the longest segment first\r\n if (a.length < b.length) {\r\n return a.length === 1 && a[0] === 40 /* Static */ + 40 /* Segment */\r\n ? -1\r\n : 1;\r\n }\r\n else if (a.length > b.length) {\r\n return b.length === 1 && b[0] === 40 /* Static */ + 40 /* Segment */\r\n ? 1\r\n : -1;\r\n }\r\n return 0;\r\n}", "function compareForwardSlotSegs(seg1, seg2) {\n\t// put higher-pressure first\n\treturn seg2.forwardPressure - seg1.forwardPressure ||\n\t\t// put segments that are closer to initial edge first (and favor ones with no coords yet)\n\t\t(seg1.backwardCoord || 0) - (seg2.backwardCoord || 0) ||\n\t\t// do normal sorting...\n\t\tcompareSegs(seg1, seg2);\n}", "function compareScoreArray(a, b) {\n let i = 0;\n while (i < a.length && i < b.length) {\n const diff = b[i] - a[i];\n // only keep going if diff === 0\n if (diff)\n return diff;\n i++;\n }\n // if the last subsegment was Static, the shorter segments should be sorted first\n // otherwise sort the longest segment first\n if (a.length < b.length) {\n return a.length === 1 && a[0] === 40 /* Static */ + 40 /* Segment */\n ? -1\n : 1;\n }\n else if (a.length > b.length) {\n return b.length === 1 && b[0] === 40 /* Static */ + 40 /* Segment */\n ? 1\n : -1;\n }\n return 0;\n}", "function compareForwardSlotSegs(seg1, seg2) {\n // put higher-pressure first\n return seg2.forwardPressure - seg1.forwardPressure ||\n // put segments that are closer to initial edge first (and favor ones with no coords yet)\n (seg1.backwardCoord || 0) - (seg2.backwardCoord || 0) ||\n // do normal sorting...\n compareSegs(seg1, seg2);\n }", "function compareDaySegments(a, b) {\n\treturn (b.rightCol - b.leftCol) - (a.rightCol - a.leftCol) || // put wider events first\n\t\tb.event.allDay - a.event.allDay || // if tie, put all-day events first (booleans cast to 0/1)\n\t\ta.event.start - b.event.start || // if a tie, sort by event start date\n\t\t(a.event.title || '').localeCompare(b.event.title); // if a tie, sort by event title\n}", "function compareDaySegments(a, b) {\n\treturn (b.rightCol - b.leftCol) - (a.rightCol - a.leftCol) || // put wider events first\n\t\tb.event.allDay - a.event.allDay || // if tie, put all-day events first (booleans cast to 0/1)\n\t\ta.event.start - b.event.start || // if a tie, sort by event start date\n\t\t(a.event.title || '').localeCompare(b.event.title); // if a tie, sort by event title\n}", "sort(first, second) {\n // 1. Find point of divergence of 2 routes\n let firstCurrent = first.next;\n let secondCurrent = second.next;\n while (firstCurrent != null && secondCurrent != null && firstCurrent.direction == secondCurrent.direction) {\n firstCurrent = firstCurrent.next;\n secondCurrent = secondCurrent.next;\n }\n // 2. Compare routes\n // 2.1 Point of divergence has been found\n if (firstCurrent != null && secondCurrent != null) {\n let priority1 = this.getPriority(firstCurrent.prev.direction, firstCurrent.direction);\n let priority2 = this.getPriority(secondCurrent.prev.direction, secondCurrent.direction);\n return this.compare(priority1, priority2);\n }\n // 2.2 Routes do not have point of divergence and they both finished in the same point\n if (firstCurrent == null && secondCurrent == null) {\n return 0;\n }\n // 2.3 Routes do not have point of divergence and but first one finished earlier than second one\n if (secondCurrent != null) {\n let priority = this.walkThroughRoute(second);\n // The idea here is that the route that ended earlier should be less or greater (depending on the sign)\n // than the route that still continues.\n // Why the ended route is less or greater? Because it should be placed closer to the edge during rendering\n return Math.sign(priority);\n }\n // 2.4 Routes do not have point of divergence and but second one finished earlier than first one\n if (firstCurrent != null) {\n let priority = this.walkThroughRoute(first);\n // The idea here same as above BUT we have to take into account that now second route is less or greater\n // than the first one, so sign should be reverted in order to avoid descending sorting\n return Math.sign(priority) * -1;\n }\n return 0;\n }", "compare(s) {\n if ( s.start < this.start ) {\n return 1;\n } else if ( s.start > this.start ) {\n return -1;\n } else if ( s.end < this.end ) {\n return 1;\n } else if ( s.end > this.end ) {\n return -1;\n }\n return 0;\n }", "function compareSlotSegs(seg1, seg2) {\n\treturn seg1.start - seg2.start || // earlier start time goes first\n\t\t(seg2.end - seg2.start) - (seg1.end - seg1.start) || // tie? longer-duration goes first\n\t\t(seg1.event.title || '').localeCompare(seg2.event.title); // tie? alphabetically by title\n}", "function compareSlotSegs(seg1, seg2) {\n\treturn seg1.start - seg2.start || // earlier start time goes first\n\t\t(seg2.end - seg2.start) - (seg1.end - seg1.start) || // tie? longer-duration goes first\n\t\t(seg1.event.title || '').localeCompare(seg2.event.title); // tie? alphabetically by title\n}", "function compareSlotSegs(seg1, seg2) {\n\treturn seg1.start - seg2.start || // earlier start time goes first\n\t\t(seg2.end - seg2.start) - (seg1.end - seg1.start) || // tie? longer-duration goes first\n\t\t(seg1.event.title || '').localeCompare(seg2.event.title); // tie? alphabetically by title\n}", "function compareSlotSegs(seg1, seg2) {\n\treturn seg1.start - seg2.start || // earlier start time goes first\n\t\t(seg2.end - seg2.start) - (seg1.end - seg1.start) || // tie? longer-duration goes first\n\t\t(seg1.event.title || '').localeCompare(seg2.event.title); // tie? alphabetically by title\n}", "function compareSlotSegs(seg1, seg2) {\n\treturn seg1.start - seg2.start || // earlier start time goes first\n\t\t(seg2.end - seg2.start) - (seg1.end - seg1.start) || // tie? longer-duration goes first\n\t\t(seg1.event.title || '').localeCompare(seg2.event.title); // tie? alphabetically by title\n}", "function sortByRangeStart(a,b){return a.start-b.start;}", "function cmp(a, b) { return a.line - b.line || a.ch - b.ch }", "function cmp(a, b) { return a.line - b.line || a.ch - b.ch }", "function cmp(a, b) { return a.line - b.line || a.ch - b.ch }", "function cmp(a, b) { return a.line - b.line || a.ch - b.ch }", "function cmp(a, b) { return a.line - b.line || a.ch - b.ch }", "function cmp(a, b) { return a.line - b.line || a.ch - b.ch }", "function cmp(a, b) { return a.line - b.line || a.ch - b.ch }", "function cmp(a, b) { return a.line - b.line || a.ch - b.ch }", "function cmp(a, b) { return a.line - b.line || a.ch - b.ch }", "function cmp(a, b) { return a.line - b.line || a.ch - b.ch }", "function cmp(a, b) { return a.line - b.line || a.ch - b.ch }", "function cmp(a, b) { return a.line - b.line || a.ch - b.ch }", "function cmp(a, b) { return a.line - b.line || a.ch - b.ch }", "function cmp(a, b) { return a.line - b.line || a.ch - b.ch }", "function cmp(a, b) { return a.line - b.line || a.ch - b.ch }", "function cmp(a, b) { return a.line - b.line || a.ch - b.ch }", "function cmp(a, b) { return a.line - b.line || a.ch - b.ch }", "function cmp(a, b) { return a.line - b.line || a.ch - b.ch }", "function cmp(a, b) { return a.line - b.line || a.ch - b.ch }", "function cmp(a, b) { return a.line - b.line || a.ch - b.ch }", "function cmp(a, b) { return a.line - b.line || a.ch - b.ch }", "function cmp(a, b) { return a.line - b.line || a.ch - b.ch }", "function cmp(a, b) { return a.line - b.line || a.ch - b.ch }", "function cmp(a, b) { return a.line - b.line || a.ch - b.ch }", "function cmp(a, b) { return a.line - b.line || a.ch - b.ch }", "function cmp(a, b) { return a.line - b.line || a.ch - b.ch }", "function cmp(a, b) { return a.line - b.line || a.ch - b.ch }", "function cmp(a, b) { return a.line - b.line || a.ch - b.ch }", "function cmp(a, b) { return a.line - b.line || a.ch - b.ch }", "function cmp(a, b) { return a.line - b.line || a.ch - b.ch }", "function cmp(a, b) { return a.line - b.line || a.ch - b.ch }", "function cmp(a, b) { return a.line - b.line || a.ch - b.ch }", "function cmp(a, b) { return a.line - b.line || a.ch - b.ch }", "function compare(a,b){ //condition for sort funtion ***\n var comparison=0;\n const scorea=a.points;\n const scoreb=b.points;\n if(scoreb > scorea){\n comparison=1;\n }else{\n comparison=-1;\n }\n return comparison;\n }", "function renderSortAux(e1, e2)\n{\n\tif (e1.y <= e2.y && e1.y > e2.y - Math.floor(e1.height * 0.8) && e1.z > e2.z) // if you're standing on top of them, you get drawn second\n\t{\n\t\treturn true;\n\t}\n\telse if (e1.y > e2.y) // if you're standing in front of them, you get drawn second\n\t{\n\t\treturn true;\n\t}\n\telse // otherwise, you're behind them and get drawn first\n\t{\n\t\treturn false;\n\t}\n}", "function oddComparator(home,away,flag){\n if(home >= away){\n if(flag == \"low\"){\n return [\"away\",away];\n }else{\n return [\"home\",home]\n }\n }else{\n if(flag == \"low\"){\n return [\"home\",home]\n }else{\n return [\"away\",away]\n }\n }\n}", "eventSorter(a, b) {\n const startA = a.dataStartMs || a.startMs, // dataXX are used if configured with fillTicks\n endA = a.dataEndMs || a.endMs,\n startB = b.dataStartMs || b.startMs,\n endB = b.dataEndMs || b.endMs,\n sameStart = startA === startB;\n\n if (sameStart) {\n if (endA - endB === 0) {\n return a.event.name < b.event.name ? -1 : 1;\n }\n return endA > endB ? -1 : 1;\n }\n\n return startA < startB ? -1 : 1;\n }", "function p(a){\n// Give preference to elements with certain criteria, so they have\n// a chance to be closer to the top.\na.sort(ya);for(var b=[],c=0;c<a.length;c++){\n// loop through subrows, starting with the topmost, until the segment\n// doesn't collide with other segments.\nfor(var d=a[c],e=0;e<b.length&&wa(d,b[e]);e++);\n// `j` now holds the desired subrow index\nb[e]?b[e].push(d):b[e]=[d]}return b}", "function painterSortStable( a, b ) {\n\n\tif ( a.groupOrder !== b.groupOrder ) {\n\n\t\treturn a.groupOrder - b.groupOrder;\n\n\t} else if ( a.renderOrder !== b.renderOrder ) {\n\n\t\treturn a.renderOrder - b.renderOrder;\n\n\t} else if ( a.program && b.program && a.program !== b.program ) {\n\n\t\treturn a.program.id - b.program.id;\n\n\t} else if ( a.material.id !== b.material.id ) {\n\n\t\treturn a.material.id - b.material.id;\n\n\t} else if ( a.z !== b.z ) {\n\n\t\treturn a.z - b.z;\n\n\t} else {\n\n\t\treturn a.id - b.id;\n\n\t}\n\n}", "function compareSegs(seg1, seg2) {\n return seg1.eventStartMS - seg2.eventStartMS || // earlier events go first\n seg2.eventDurationMS - seg1.eventDurationMS || // tie? longer events go first\n seg2.event.allDay - seg1.event.allDay || // tie? put all-day events first (booleans cast to 0/1)\n (seg1.event.title || '').localeCompare(seg2.event.title); // tie? alphabetically by title\n }", "function cmp(a, b) {\n return a.line - b.line || a.ch - b.ch;\n }", "function compare( a, b ) { //for sorting elements block in builded sidebar by num field\n if ( a.num < b.num ){\n return -1;\n }\n if ( a.num > b.num ){\n return 1;\n }\n return 0;\n }", "compare(a, b) {\n if (a.distance < b.distance) {\n return -1;\n }\n if (a.distance > b.distance) {\n return 1;\n }\n return 0;\n }", "function pa(a,b){\n// put higher-pressure first\n// put segments that are closer to initial edge first (and favor ones with no coords yet)\n// do normal sorting...\nreturn b.forwardPressure-a.forwardPressure||(a.backwardCoord||0)-(b.backwardCoord||0)||qa(a,b)}", "function byPriority(a, b) { // 8599\n var diff = b.priority - a.priority; // 8600\n if (diff !== 0) return diff; // 8601\n if (a.name !== b.name) return (a.name < b.name) ? -1 : 1; // 8602\n return a.index - b.index; // 8603\n } // 8604", "function oa(a,b){return a.end>b.start&&a.start<b.end}", "function compare(a,b) \n{\n if (a.CPT < b.CPT)\n return 1;\n if (a.CPT > b.CPT)\n return -1;\n return 0;\n}", "function orderliness(a) {\n\tlet sum = 0\n\tfor (let i = 0; i < a.length - 1; i++) {\n\t\tlet x = a[i]\n\t\tlet y = a[i + 1]\n\t\tsum += x < y ? 1 : x > y ? -1 : 0\n\t}\n\n\treturn sum / (a.length - 1)\n}", "function compare_asc(a, b) {\n return a - b;\n}", "function compare(f,g) {\n\tif (f.place_id > g.place_id)\n\t\treturn 1;\n\telse if (f.place_id < g.place_id)\n\t\treturn -1;\n\tvar A = new Date(f.begin_at);\n\tvar B = new Date(g.begin_at);\n\tif (A < B)\n\t\treturn -1;\n\tif (A > B)\n\t\treturn 1;\n\treturn 0;\n}", "function computeSlotSegCollisions(seg,otherSegs,results){if(results===void 0){results=[];}for(var i=0;i<otherSegs.length;i++){if(isSlotSegCollision(seg,otherSegs[i])){results.push(otherSegs[i]);}}return results;}// Do these segments occupy the same vertical space?", "function compareSegs(seg1, seg2) {\n\treturn seg1.eventStartMS - seg2.eventStartMS || // earlier events go first\n\t\tseg2.eventDurationMS - seg1.eventDurationMS || // tie? longer events go first\n\t\tseg2.event.allDay - seg1.event.allDay || // tie? put all-day events first (booleans cast to 0/1)\n\t\t(seg1.event.title || '').localeCompare(seg2.event.title); // tie? alphabetically by title\n}", "function sortCompare( a, b ) {\n if ( a.departure < b.departure ){\n return -1;\n }\n if ( a.departure > b.departure ){\n return 1;\n }\n return 0;\n }", "eventSorter(a, b) {\n const startA = a.dataStartMs || a.startDateMS,\n // dataXX are used if configured with fillTicks\n endA = a.dataEndMs || a.endDateMS,\n startB = b.dataStartMs || b.startDateMS,\n endB = b.dataEndMs || b.endDateMS,\n nameA = a.isModel ? a.name : a.eventRecord.name,\n nameB = b.isModel ? b.name : b.eventRecord.name,\n sameStart = startA === startB;\n\n if (sameStart) {\n if (endA - endB === 0) {\n return nameA < nameB ? -1 : 1;\n }\n\n return endA > endB ? -1 : 1;\n }\n\n return startA < startB ? -1 : 1;\n }", "eventSorter(a, b) {\n const startA = a.dataStartMs || a.startDateMS, // dataXX are used if configured with fillTicks\n endA = a.dataEndMs || a.endDateMS,\n startB = b.dataStartMs || b.startDateMS,\n endB = b.dataEndMs || b.endDateMS,\n sameStart = startA === startB;\n\n if (sameStart) {\n if (endA - endB === 0) {\n return a.eventRecord.name < b.eventRecord.name ? -1 : 1;\n }\n return endA > endB ? -1 : 1;\n }\n\n return startA < startB ? -1 : 1;\n }", "comparePoints (a, b) {\n let comparison = 0\n\n if (a.points > b.points) {\n comparison = -1\n } else if (b.points > a.points) {\n comparison = 1\n }\n return comparison\n }", "function comparePathParserScore(a, b) {\n let i = 0;\n const aScore = a.score;\n const bScore = b.score;\n while (i < aScore.length && i < bScore.length) {\n const comp = compareScoreArray(aScore[i], bScore[i]);\n // do not return if both are equal\n if (comp)\n return comp;\n i++;\n }\n // if a and b share the same score entries but b has more, sort b first\n return bScore.length - aScore.length;\n // this is the ternary version\n // return aScore.length < bScore.length\n // ? 1\n // : aScore.length > bScore.length\n // ? -1\n // : 0\n}", "compare(a, b) {\n if (a.Count < b.Count) {\n return -1;\n }\n if (a.Count > b.Count) {\n return 1;\n }\n return 0;\n }", "compare(point, another) {\n var result = Path.compare(point.path, another.path);\n\n if (result === 0) {\n if (point.offset < another.offset) return -1;\n if (point.offset > another.offset) return 1;\n return 0;\n }\n\n return result;\n }", "compare(point, another) {\n var result = Path.compare(point.path, another.path);\n\n if (result === 0) {\n if (point.offset < another.offset) return -1;\n if (point.offset > another.offset) return 1;\n return 0;\n }\n\n return result;\n }", "function ya(a,b){// put wider events first\n// if tie, put all-day events first (booleans cast to 0/1)\n// if a tie, sort by event start date\nreturn b.rightCol-b.leftCol-(a.rightCol-a.leftCol)||b.event.allDay-a.event.allDay||a.event.start-b.event.start||(a.event.title||\"\").localeCompare(b.event.title)}", "function comparePathParserScore(a, b) {\r\n let i = 0;\r\n const aScore = a.score;\r\n const bScore = b.score;\r\n while (i < aScore.length && i < bScore.length) {\r\n const comp = compareScoreArray(aScore[i], bScore[i]);\r\n // do not return if both are equal\r\n if (comp)\r\n return comp;\r\n i++;\r\n }\r\n // if a and b share the same score entries but b has more, sort b first\r\n return bScore.length - aScore.length;\r\n // this is the ternary version\r\n // return aScore.length < bScore.length\r\n // ? 1\r\n // : aScore.length > bScore.length\r\n // ? -1\r\n // : 0\r\n}", "function comparePathParserScore(a, b) {\r\n let i = 0;\r\n const aScore = a.score;\r\n const bScore = b.score;\r\n while (i < aScore.length && i < bScore.length) {\r\n const comp = compareScoreArray(aScore[i], bScore[i]);\r\n // do not return if both are equal\r\n if (comp)\r\n return comp;\r\n i++;\r\n }\r\n // if a and b share the same score entries but b has more, sort b first\r\n return bScore.length - aScore.length;\r\n // this is the ternary version\r\n // return aScore.length < bScore.length\r\n // ? 1\r\n // : aScore.length > bScore.length\r\n // ? -1\r\n // : 0\r\n}", "function compareFunc(a, b) {\n // GameUI.CustomUIConfig().sort_teams_compare_func;\n if (a.round_score < b.round_score) {\n return 1; // [ B, A ]\n } else if (a.round_score > b.round_score) {\n return -1; // [ A, B ]\n } else {\n return 0;\n }\n}", "function sortByRangeIndex(a,b){return a.index-b.index;}", "function byPriority(a,b){var diff=b.priority-a.priority;if(diff!==0)return diff;if(a.name!==b.name)return a.name<b.name?-1:1;return a.index-b.index;}", "function byPriority(a,b){var diff=b.priority-a.priority;if(diff!==0)return diff;if(a.name!==b.name)return a.name<b.name?-1:1;return a.index-b.index;}", "function exComparator( int1, int2){\r\n if (int1 > int2){\r\n return true;\r\n } else {\r\n return false;\r\n }\r\n}", "function exComparator( int1, int2){\r\n if (int1 > int2){\r\n return true;\r\n } else {\r\n return false;\r\n }\r\n}", "gt(other) { return this.cmp(other) > 0; }", "function CompareGrp(a,b){\n\t\t\tif(a.title > b.title)\n\t\t\t return 1\n\t\t if(a.title < b.title)\n\t\t\t return -1\n\t\t return 0 \n\t}", "async compare( a, b ) {\n\n if ( a.size < b.size ){\n return -1;\n }\n\n if ( a.size > b.size ){\n return 1;\n }\n \n return 0;\n }", "function sortingFunction(e1, e2) {\n var c = comparePaths(e1[2], e2[2]);\n if(c != 0) return c;\n if(e1.length == 4 && e2.length == 4)\n return e1[3] - e2[3];\n else\n return 0;\n}", "function sortByNum(a, b) {\n return (a.peoplenum + a.recognized) < (b.peoplenum + b.recognized);\n }", "function compare_start(a, b) {\n return a.start - b.start;\n }", "compareStudents (a, b) {\n let order = 0;\n\n if (a.fields.name_first < b.fields.name_first) {\n order = -1;\n }\n\n if (a.fields.name_first > b.fields.name_first) {\n order = 1;\n }\n\n return order;\n }", "function compareUnzonedRanges(range1,range2){return range1.startMs-range2.startMs;// earlier ranges go first\n}", "endsBefore(path, another) {\n var i = path.length - 1;\n var as = path.slice(0, i);\n var bs = another.slice(0, i);\n var av = path[i];\n var bv = another[i];\n return Path.equals(as, bs) && av < bv;\n }" ]
[ "0.68106085", "0.68106085", "0.68106085", "0.68106085", "0.68106085", "0.6807801", "0.6807801", "0.68019885", "0.6793479", "0.67888665", "0.64781076", "0.64781076", "0.64614296", "0.6412282", "0.631376", "0.631376", "0.631376", "0.631376", "0.631376", "0.6200559", "0.61750394", "0.61750394", "0.61750394", "0.61750394", "0.61750394", "0.61750394", "0.61750394", "0.61750394", "0.61750394", "0.61750394", "0.61750394", "0.61750394", "0.61750394", "0.61750394", "0.61750394", "0.61750394", "0.61750394", "0.61750394", "0.61750394", "0.61750394", "0.61750394", "0.61750394", "0.61750394", "0.61750394", "0.61750394", "0.61750394", "0.61750394", "0.61750394", "0.61750394", "0.61750394", "0.61750394", "0.61750394", "0.61750394", "0.6119148", "0.61156785", "0.60610294", "0.60525393", "0.6038788", "0.60373914", "0.6032771", "0.6021828", "0.601439", "0.60130465", "0.59701794", "0.5967363", "0.59586656", "0.59581065", "0.59255123", "0.5916983", "0.5889495", "0.58868015", "0.58785963", "0.5873718", "0.5848907", "0.58443433", "0.58386296", "0.58106124", "0.5808629", "0.57953274", "0.57953274", "0.57811725", "0.5778425", "0.5778425", "0.5765323", "0.5764485", "0.57602626", "0.57602626", "0.5758846", "0.5758846", "0.5758002", "0.5739116", "0.57333565", "0.5731062", "0.57232344", "0.57223576", "0.57020617", "0.5699804", "0.5690325" ]
0.6483268
11
BUG: unselect needs to be triggered when events are dragged+dropped
function SelectionManager() { var t = this; // exports t.select = select; t.unselect = unselect; t.reportSelection = reportSelection; t.daySelectionMousedown = daySelectionMousedown; // imports var opt = t.opt; var trigger = t.trigger; var defaultSelectionEnd = t.defaultSelectionEnd; var renderSelection = t.renderSelection; var clearSelection = t.clearSelection; // locals var selected = false; // unselectAuto if (opt('selectable') && opt('unselectAuto')) { $(document).mousedown(function(ev) { var ignore = opt('unselectCancel'); if (ignore) { if ($(ev.target).parents(ignore).length) { // could be optimized to stop after first match return; } } unselect(ev); }); } function select(startDate, endDate, allDay) { unselect(); if (!endDate) { endDate = defaultSelectionEnd(startDate, allDay); } renderSelection(startDate, endDate, allDay); reportSelection(startDate, endDate, allDay); } function unselect(ev) { if (selected) { selected = false; clearSelection(); trigger('unselect', null, ev); } } function reportSelection(startDate, endDate, allDay, ev) { selected = true; trigger('select', null, startDate, endDate, allDay, ev); } function daySelectionMousedown(ev) { // not really a generic manager method, oh well var cellToDate = t.cellToDate; var getIsCellAllDay = t.getIsCellAllDay; var hoverListener = t.getHoverListener(); var reportDayClick = t.reportDayClick; // this is hacky and sort of weird if (ev.which == 1 && opt('selectable')) { // which==1 means left mouse button unselect(ev); var _mousedownElement = this; var dates; hoverListener.start(function(cell, origCell) { // TODO: maybe put cellToDate/getIsCellAllDay info in cell clearSelection(); if (cell && getIsCellAllDay(cell)) { dates = [ cellToDate(origCell), cellToDate(cell) ].sort(dateCompare); renderSelection(dates[0], dates[1], true); }else{ dates = null; } }, ev); $(document).one('mouseup', function(ev) { hoverListener.stop(); if (dates) { if (+dates[0] == +dates[1]) { reportDayClick(dates[0], true, ev); } reportSelection(dates[0], dates[1], true, ev); } }); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "mouseUp(e){\n this._super(...arguments);\n\n\n if(e.path === undefined || e.path[0].tagName !== \"MULTI-SELECTION\"){\n return;\n }\n\n if(e.button == 0){\n e.stopPropagation();\n e.preventDefault();\n\n this.set('moveStart', false);\n }\n\n\n\n document.removeEventListener('mousemove', this.get('mouseMoveListener'));\n document.removeEventListener('mouseup', this.get('mouseUpListener'));\n\n\n }", "unSelectItem (i) { this.toggSel(false, i); }", "__unhighlight(e) {\n this.__dropArea.classList.remove('highlight');\n }", "function unselect(ev) {\n\t\tif (selected) {\n\t\t\tselected = false;\n\t\t\tclearSelection();\n\t\t\ttrigger('unselect', null, ev);\n\t\t}\n\t}", "function unselect(ev) {\n\t\tif (selected) {\n\t\t\tselected = false;\n\t\t\tclearSelection();\n\t\t\ttrigger('unselect', null, ev);\n\t\t}\n\t}", "function destroyDrag( ) {\r\n selected = null;\r\n }", "unSelectAll () { this.toggSelAll(false); }", "function removeSelectionHighlight() {\r\n hideSelectionRect();\r\n hideRotIndicator();\r\n }", "doUnselectItem() {\n if (this.selected) {\n this.selected.set('selected', false);\n this.set('selected',null);\n }\n }", "function ClearSelectionListeners() {\n map.off('mousedown');\n map.off('mousemove');\n map.off('mouseup');\n map.off('touchstart');\n map.off('touchmove');\n map.off('touchend');\n map.off('click');\n CancelPathSelection();\n }", "deselect () {\n let overlay = SelectionOverlay.getOverlay();\n if (overlay.isAttached\n && this.id === overlay.attachedTo.id) {\n overlay.detachFromObject();\n }\n }", "function unselectElement() {\r\n console.log('element unselected!');\r\n if (selectedElement != null) {\r\n selectedElement.classList.remove('uiSelected');\r\n selectedElement.classList.add('drag');\r\n\r\n // set selectedElement to uneditable, then saving the changed contents\r\n selectedElement.setAttribute(\"contentEditable\", false);\r\n changeText(selectedElement);\r\n }\r\n selectedElement = null;\r\n}", "suspendElementSelect() {\n $(this.editor.container).off('click');\n }", "_clearSelection(eventPrevented) {\n const that = this;\n\n if (that._selectedCells) {\n that._selectedCells.map(cell => {\n that._setCellState(cell, 'selected', false);\n });\n }\n\n that.selectedDates = [];\n that._selectedCells = [];\n\n if (that.selectionMode === 'many') {\n const months = that.$.monthsContainer.children;\n\n for (let m = 0; m < months.length; m++) {\n that._getMonthCells(months[m]).map(cell => {\n that._setCellState(cell, 'hover', false);\n });\n }\n }\n\n that._refreshFooter();\n\n //Update the hidden input\n that.$.hiddenInput.value = that.selectedDates.toString();\n\n if (!eventPrevented) {\n that.$.fireEvent('change', {\n 'value': []\n });\n }\n\n that._refreshTitle();\n }", "function unhighlight(event) {\n preventDefaults(event);\n dropArea.classList.remove('highlight');\n }", "function on_select_ponto(feature){\r\n\t\t\tselect_control.unselectAll({except:feature});\r\n\t\t}", "unselectText_() {\n try {\n this.win.getSelection().removeAllRanges();\n } catch (e) {\n // Selection API not supported.\n }\n }", "function d(a){o&&(o=!1,n(),k(\"unselect\",null,a))}", "function onMouseMoveEventOffHandler(ev){\n if(WorkStore.isSelected()) return;\n\n\n window.removeEventListener(MOUSE_DOWN, onMouseDownHandler);\n document.body.classList.remove(\"drag\");\n document.body.classList.remove(\"dragging\");\n}", "function handleToggleSelection(e) {\n\t\tif (e.target.classList.contains(\"canva\")) {\n\t\t\tstore.removeSelection();\n\t\t}\n\t}", "deselect(selectedMo) {\n const index = this.getIndexOfSelected(this.selected, selectedMo);\n if (index > -1) {\n this.selected.splice(index, 1);\n }\n this.onChange.emit(this.selected);\n }", "function unselectElem( svgElem ) {\n if ( typeof svgElem === 'object' && ! ( svgElem instanceof jQuery ) )\n svgElem = $(svgElem);\n if ( typeof svgElem === 'undefined' ) {\n svgElem = $(svgRoot).find('.selected');\n if ( svgElem.length === 0 )\n return;\n }\n else if( ! svgElem.hasClass('selected') )\n return;\n svgElem.removeClass('selected');\n //for ( var n=0; n<self.cfg.onUnselect.length; n++ )\n // svgElem.each( function () { self.cfg.onUnselect[n](this); } );\n svgElem.each( function () {\n for ( var n=0; n<self.cfg.onUnselect.length; n++ )\n self.cfg.onUnselect[n](this);\n } );\n }", "onDeselect() {\n // Do something when a section instance is selected\n }", "onDeselect() {\n // Do something when a section instance is selected\n }", "deselectBuckets() {\n this.props.deselectBuckets();\n this.props.disableSelectionMode();\n }", "_onMouseUp () {\n Actions.changeDragging(false);\n }", "function unselectSelectedAssessment() {\n if (selectedAssessment != null) {\n $(selectedAssessment).removeClass('selected');\n $(selectedAssessment).children('#select-badge').remove();\n selectedAssessment = null;\n $('.bank-item').draggable('disable');\n }\n hideAssessItems();\n\n}", "function thumb_select_delete() {\n\tvar $elem = $('.thumb_current');\n\t\n\tremove_watermark();\n\t$('#container').find('.selected').removeClass('selected');\n\t$elem.addClass('selected');\n\t$elem.addClass('delete_watermark');\n\t$('#container').isotope('reLayout', thumb_adjust_container_position);\n }", "_selectStartHandler(event) {\n const that = this;\n\n if (that._thumbDragged) {\n event.preventDefault();\n }\n }", "function unselectPreviousFeaturesPointClick() {\n var i;\n for(i=0; i< selectedFeatures.length; i++) {\n selectedFeatures[i].setStyle(null);\n }\n selectedFeatures = [];\n\n }", "function unselectByClick() {\n const points = this.getSelectedPoints();\n\n if (points.length > 0) {\n Highcharts.each(points, function(point) {\n if (selectedFlag.get() !== null) {\n point.update({\n color: flagsHash[selectedFlag.get()].color,\n name: flagsHash[selectedFlag.get()].val\n }, true);\n }\n point.select(false);\n });\n }\n}", "function selectSwitchOff(){\n\t\t\t\tislteIE9?$('body').on('selectstart.drag',function(){return false;}):$('body').addClass('lightbox-noselect lightbox-onmove');\n\t\t\t}", "function unselectAll() {\n if(_selected) {\n _selected.removeClass( selectionClasses );\n removeMenu( _selected );\n }\n }", "clearSelection(){\n this.selected = null\n }", "function mouseup() {\n if (!_this.props.mousedownNode && !_this.props.mousedownLink) {\n _this.resetSelected()\n }\n // avoid firing off unnecessary actions\n else {\n _this.props.onMousedownNodeUpdate(null)\n _this.props.onMousedownLinkUpdate(null)\n }\n }", "unselectSelectedLabel() {\n const label = this._.selectedLabel;\n if (label) {\n if (this._.mode === MODES.EDITION) {\n if (this._.selectedLabelTextDirty) {\n this.notifyLabelsChanged();\n this._.selectedLabelTextDirty = false;\n }\n document.getElementById(getLabelFocusId(label.id, this._.componentId)).blur();\n }\n this._.selectedLabel = null;\n this.renderForAWhile();\n this.forceUpdate();\n }\n }", "function UnselectSails()\n{\n\tnormalSailSelected = false;\n\tblueSailSelected = false;\n}", "function dragEnd(e) {\n active = false;\n}", "function unhighlight() {\n d3.select(this).classed('selected', false)\n }", "function deselect() {\n deselectTask(requireCursor());\n }", "clearSelection() {\n this._model.clearSelection();\n this._removeMouseDownListeners();\n this.refresh();\n this._onSelectionChange.fire();\n }", "_selectStartHandler(event) {\n if (this._dragging) {\n event.preventDefault();\n }\n }", "function clearSelectionEvents(array) {\n\t\t while (array.length) {\n\t\t var last = lst(array);\n\t\t if (last.ranges) array.pop();\n\t\t else break;\n\t\t }\n\t\t }", "clearSelected() {\n this.getSelectedIds().forEach(id => {\n if(this.get(id).created === false) {\n this.get(id).onStopDrawing({});\n }\n this.delete(id);\n });\n }", "_onHandleMouseUp(ev) {\n console.assert(this._mouseActive);\n\n ev.stopPropagation();\n ev.preventDefault();\n\n this._mouseActive = false;\n this._activeHandle = null;\n\n document.removeEventListener('mouseup', this._onHandleMouseUp, true);\n document.removeEventListener('mousemove', this._onHandleMouseMove, true);\n\n $('body').removeClass('revision-selector-grabbed');\n\n if (!_.isEqual(this._activeValues, this._values)) {\n this.trigger('revisionSelected', this._activeValues);\n }\n }", "function selectUnselectAll(){\r\n\t\tvar objUnselectedItems = getObjUnselectedItems();\r\n\t\tif(objUnselectedItems.length != 0)\r\n\t\t\tselectAllItems();\r\n\t\telse\r\n\t\t\tunselectAllItems();\r\n\t\t\r\n\t}", "_onRemove() {\n RB.DnDUploader.instance.unregisterDropTarget(this.$el);\n }", "function releaseSelection() {\n\t\ttry {\n\t\t\tthis.setOrigin(window.event.offsetX, window.event.offsetY);\n\t\t\tthis.setFinal(window.event.offsetX + 1, window.event.offsetX + 1);\n\t\t} catch (e) {\n\t\t}\n\t}", "function unselectNE() {\n\t\tvar ne = document.getElementById(this.rectid);\n\t\tne.fill.color = this.bgColor1;\n\t\tne.fill.color2 = this.bgColor2;\n\t\tif (this.bgType == BG_NONE) {\n\t\t\tne.fill.opacity = \"0%\";\n\t\t}\n\t\tthis.selected = false;\n\t\tif (this.miniNE != null) {\n\t\t\tthis.miniNE.writeMiniNetworkElement(this);\n\t\t}\n\t}", "function unselectObjects() {\n if(selected_poly == -1) return;\n var anid;\n\n var anid = main_canvas.GetAnnoIndex(selected_poly);\n if(view_ObjList) ChangeLinkColorBG(selected_poly);\n main_canvas.annotations[anid].UnfillPolygon();\n \n // Unselect object parts:\n var selected_poly_parts = getPartChildrens(selected_poly);\n for (var i=0; i<selected_poly_parts.length; i++) {\n\n var anid = main_canvas.GetAnnoIndex(selected_poly_parts[i]);\n if(anid >= 0 && (selected_poly_parts[i]!=selected_poly)) {\n main_canvas.annotations[anid].UnfillPolygon();\n if (main_canvas.annotations[anid].hidden) main_canvas.annotations[anid].DeletePolygon();\n }\n\n \n }\n \n // Reset selected_poly variable:\n selected_poly = -1;\n}", "clearSelection() {\n if (this._selected >= 0) {\n const item = this.items[this._selected];\n const tag = Array.from(this.container.children).filter(child => child.classList.contains('tag'))[this._selected];\n\n if (this.emit('before.unselect', {\n item,\n tag\n })) {\n if (tag) {\n tag.classList.remove('is-selected');\n }\n\n this._selected = -1;\n\n this.emit('after.unselect', {\n item,\n tag\n });\n }\n }\n\n return this;\n }", "function clearSelectionEvents(array) {\n\t\t while (array.length) {\n\t\t var last = lst(array);\n\t\t if (last.ranges) { array.pop(); }\n\t\t else { break }\n\t\t }\n\t\t }", "function clearSelectedStates() {\n angular.element('.ui-grid-custom-selected').removeClass('ui-grid-custom-selected');\n _scope.ugCustomSelect.selectedCells = [];\n _scope.ugCustomSelect.cellMap = {};\n }", "function stopSelect(e)\n{\n\tselectionStarted = false;\n\tif (selectStartX != selectStopX && selectStartY != selectStopY)\n\t{\n\t\tmaxX = Math.max(selectStartX, selectStopX)*ratioX + minX;\n\t\tminX = Math.min(selectStartX, selectStopX)*ratioX + minX;\n\t\tmaxY = Math.max(selectStartY, selectStopY)*ratioY + minY;\n\t\tminY = Math.min(selectStartY, selectStopY)*ratioY + minY;\n\t\tratioX = (maxX - minX) / width;\n\t\tratioY = (maxY - minY) / height;\n\t\trenderFractal();\n\t}\n}", "function deselect(e) {\n $('.pop').slideFadeToggle(function() {\n e.removeClass('selected');\n }); \n }", "deselectUITools() {\n $('.toolBtn').removeClass('active');\n $(this.app.canvas).removeClass('crosshair');\n }", "onUpKey() {\n\t\tthis.moveSelected(-1);\n\t}", "function clearSelectionEvents(array) {\n\t while (array.length) {\n\t var last = lst(array);\n\t if (last.ranges) array.pop();\n\t else break;\n\t }\n\t }", "function clearSelectionEvents(array) {\n\t while (array.length) {\n\t var last = lst(array);\n\t if (last.ranges) array.pop();\n\t else break;\n\t }\n\t }", "function clearSelectionEvents(array) {\n\t while (array.length) {\n\t var last = lst(array);\n\t if (last.ranges) array.pop();\n\t else break;\n\t }\n\t }", "function deselect(e) {\n\t$('.pop').slideFadeToggle(function() {\n\t\te.removeClass('selected');\n\t});\n}", "onMouseUp(event) {\n //Enables rotation again\n this.controls.enabled = true;\n //Sets the selected slot to null (the slot stops being selected)\n this.selected_slot = null;\n //Sets the selected face to null (the face stops being selected)\n this.selected_face = null;\n //Sets the selected closet component to null (the component stops being selected)\n this.selected_component = null;\n }", "function releaseMapSelection() {\n\t\tif (this.selectedNetworkElements != null) {\n\t\t\tfor (var i = 0; i < this.selectedNetworkElements.getLength(); i++) {\n\t\t\t\tthis.selectedNetworkElements.get(i).unselect();\n\t\t\t}\n\t\t}\n\t\tif (this.dottedSelection != null) {\n\t\t\tthis.dottedSelection.release();\n\t\t}\n\t\tthis.selectedNetworkElements = null;\n\t\tthis.selection.release();\n\t\tthis.dottedSelection = null;\n\t}", "function removeGhostSelection() {\n\t\t\teditor.on('Undo Redo SetContent', function(e) {\n\t\t\t\tif (!e.initial) {\n\t\t\t\t\teditor.execCommand('mceRepaint');\n\t\t\t\t}\n\t\t\t});\n\t\t}", "onBrushDeleteButtonOut() {\n this.mouseOverDeleteButton = false;\n }", "function clearSelect(e)\n{\n\tif (selectionStarted)\n\t{\n\t\tcanvas.width = canvas.width;\n\t\tctx.putImageData(imageData, 0, 0);\t\n\t}\n\tselectionStarted = false;\n}", "e_mouseUp(e)\n\t{\n\t\tthis.mouseState.isDown = false;\n\t\tthis.mouseState.dragEventFired = false;\n\n\t\tthis.componentsDragged.forEach(function(component)\n\t\t{\n\t\t\tcomponent.isDragged = false;\n\t\t});\n\t}", "function deselect() {\n if (!_selected || _element === undefined || !_visible || _animating) {\n return;\n }\n _selected = false;\n\n if (_fancyEffects) {\n TweenLite.to(_element, 0.5, {\n rotationY: 0,\n scale: 1,\n ease: Back.easeOut\n });\n TweenLite.to(_imageEl, 0.5, {\n alpha: _imageAlphaTarget,\n scale: 1,\n ease: Circ.easeOut\n });\n } else {\n TweenLite.to(_element, 0.5, {scale: 1, ease: Back.easeOut});\n TweenLite.to(_imageEl, 0.5, {\n alpha: _imageAlphaTarget,\n scale: 1,\n ease: Circ.easeOut\n });\n }\n\n }", "function setUISelectionClean(element) {\n element[UISelection] = undefined;\n}", "deselectAll(notify) {\n if (this.multiSelection) {\n this.selectedItems.forEach(function (item) {\n this.deselect(item, notify);\n }.bind(this));\n } else {\n this.deselect(this.selectedItem, notify);\n }\n }", "resetSelection() {\n if (!this.isSelectionEmpty()) {\n this._resetSelection();\n this._fireChangeSelection();\n }\n }", "function destroySelectMode(display) {\n// clear selected stuff\n\t$(\".ui-selected\", display).removeClass(\"ui-selected\")\n\tdisplay.selectable('destroy');\t\n}", "handleMouseUp() {\n let { map, isDrawingEnabled, option } = this.state;\n\n /**\n * We track it only for \"Draw\" drawing mode\n */\n if ( ! (isDrawingEnabled && option === \"draw\") ) return;\n\n this.refs.map.leafletElement.dragging.enable();\n map.mouseDown = false;\n this.setState({\n map: map,\n isDrawingEnabled: false\n });\n }", "detach() {\n this.draggable.off('drag:start', this[onDragStart]).off('drag:move', this[onDragMove]).off('drag:stop', this[onDragStop]);\n }", "function deselect(e) {\n $('.pop').slideFadeToggle(function() {\n e.removeClass('selected');\n });\n}", "deselectAll_() {\n this.selectedChips_.forEach((chipFoundation) => {\n chipFoundation.setSelected(false);\n });\n this.selectedChips_.length = 0;\n }", "detach() {\n this.draggable.off('drag:move', this[onDragMove]).off('drag:stop', this[onDragStop]);\n }", "resetSelection () {\n this.currentSelection = null\n }", "handleMouseUp(row, col) {\n this.setState({draggingStartNode: false});\n this.setState({draggingEndNode: false});\n this.setState({mouseIsPressed: false});\n }", "function unmarkSelection(node) {\n\n if (node.hasClass('bg-trans')) {\n swapBgTextColor(node);\n }\n\n node.removeClass('selected');\n node.css(\"border-color\", node.css(\"background-color\"));\n\n\n }", "deselectNode() {\n if (this.nodeDOM.nodeType == 1)\n this.nodeDOM.classList.remove(\"ProseMirror-selectednode\");\n if (this.contentDOM || !this.node.type.spec.draggable)\n this.dom.removeAttribute(\"draggable\");\n }", "function clearSelection() {\r\n map.deselectCountry();\r\n pc1.deselectLine();\r\n donut.deselectPie();\r\n sp1.deselectDot();\r\n }", "function clearSelectionEvents(array) {\r\n while (array.length) {\r\n var last = lst(array);\r\n if (last.ranges) array.pop();\r\n else break;\r\n }\r\n }", "function mup(e) {\r\n\t\t\t\t\t//remove event handler\r\n\t\t\t\t\t$(frameBody).off(\"mousemove\",mmove);\r\n\t\t\t\t\t$(frameBody).off(\"mouseleave\",mup);\r\n\t\t\t\t\t$(e.target).off(\"mouseup\",mup);\r\n\t\t\t\t\tisDrag=false;\r\n\t\t\t\t\tix=iy=\"\";\r\n\t\t\t\t}", "deselectAll () {\n this.list.views.forEach(row => {\n row.selected = false\n })\n }", "function clickHandler( event /*: JQueryEventObject */ ) {\n if ( $element.hasClass( pausedDragSelectClass ) ) return;\n if ( $element[0].dragData.firstX == $element[0].dragData.lastX\n && $element[0].dragData.firstY == $element[0].dragData.lastY ) {\n if ( $element.hasClass( SELECTED_FOR_DRAGGING_CLASS ) ) {\n $element.removeDragAndSizeSelection();\n } else {\n $element.addDragAndSizeSelection();\n }\n setTimeout( function () {\n var mouseMoveEvent = $.Event( 'mousemove' );\n mouseMoveEvent.pageX = event.pageX;\n mouseMoveEvent.pageY = event.pageY;\n $element.trigger( mouseMoveEvent );\n }, 0 );\n }\n }", "function _unSelectElement(type, $element) {\n\t\t\tif($element.isAvailable) {\n\t\t\t\tswitch(type) {\n\t\t\t\t\tcase 'room_choice':\n\t\t\t\t\t\tif(!$element.isCustom)\n\t\t\t\t\t\t\t$element.isAvailable = false;\n\t\t\t\t\t\t$element.css('color', '#59BAFF');\n\t\t\t\t\t\t$element.animate({\n\t\t\t\t\t\t\tbackgroundColor: 'transparent'\n\t\t\t\t\t\t}, 200, null);\n\t\t\t\t\t\t$element.find(\"i\").fadeOut(200, function() {\n\t\t\t\t\t\t\t$element.isAvailable = true;\n\t\t\t\t\t\t\t$element.data('selected', false);\n\t\t\t\t\t\t});\n\t\t\t\t\t\tif($element.isCustom) {\n\t\t\t\t\t\t\t$element.find(\"input\").css('color', '#59BAFF');\n\t\t\t\t\t\t\t$element.find(\"input\").css('border-bottom', '1px solid #59BAFF');\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'multiple_image_choice':\n\t\t\t\t\t\t$element.find(\".circle-select\").removeClass('selected');\n\t\t\t\t\t\t$element.find(\".circle-select .background\").fadeOut(200);\n\t\t\t\t\t\t$element.find(\".circle-select .inner-circle-icon\").fadeOut(200);\n\t\t\t\t\t\t$element.data('selected', false);\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}", "unSelectAll() {\n\n }", "clearSelection() {\n this._clearSelection();\n }", "function unregisterSelectedItemWatcher(cb){var i=selectedItemWatchers.indexOf(cb);if(i!=-1){selectedItemWatchers.splice(i,1);}}", "handleMouseUp(e) {\n if (e.originalEvent.button == 1) {\n window.talentTreePan = false;\n }\n }", "function dontPosSelect() {\n return false;\n }", "function fixIEMouseDown() {\n _ieSelectBack = doc.body.onselectstart;\n doc.body.onselectstart = fixIESelect;\n }", "function unselectTarget(response) {\n var index = sel_target.indexOf(response);\n if (index > -1) {\n sel_target.splice(index, 1);\n }\n console.log(\"Unselected \" + response + \" as Target!\");\n }", "mouseMove(prev, pt) {\n this.selected = -1;\n }", "function\tunselectAll() {\n for (i = 0; i < bubbles.length; ++i) {\n if (bubbles[i].isClicked)\n removeFromHistorical(bubbles[i].name);\n bubbles[i].yearClick = -1;\n bubbles[i].isClicked = false;\n document.getElementById(\"entity[\" + [bubbles[i].name] + \"]\").checked = false;\n }\n select = 0;\n updateSelectBubble();\n refreshDisplay();\n}", "function datasetChangeHandler(evt){\n while(selections.list.length > 0) {\n selections.removeSelection(selections.list[0]);\n }\n selectedSets.forEach(function(d){d.active=false;});\n that.draw();\n }", "clearSelection() {\n this.table.find('td.selected').removeClass('selected');\n }", "_resetSelection() {\n this.__selectedRangeArr = [];\n this.__anchorSelectionIndex = -1;\n this.__leadSelectionIndex = -1;\n }", "function deleteSelection() {\n tempSelectedDates.forEach(function (e) {\n dateRangeChart.dispatchAction({\n type: 'downplay',\n dataIndex: e[1],\n seriesIndex: e[2]\n });\n });\n tempSelectedDates = new Set([]);\n //update the selection date list\n var $ul = createSelectionUl(tempSelectedDates);\n $(\"#daysSelectedList\").empty().append($ul);\n }", "function dropper(event) {\n\n// Unregister the event handlers for mouseup and mousemove\n\n document.removeEventListener(\"mouseup\", dropper, true);\n document.removeEventListener(\"mousemove\", mover, true);\n\n// Prevent propagation of the event\n\n event.stopPropagation();\n} //** end of dropper" ]
[ "0.7253007", "0.7225936", "0.7091934", "0.7037729", "0.7037729", "0.6963049", "0.695516", "0.6848542", "0.6804019", "0.6766084", "0.6756574", "0.67009467", "0.66772723", "0.6669478", "0.66557145", "0.6649642", "0.6591466", "0.656879", "0.65635383", "0.6560086", "0.6545641", "0.651429", "0.649622", "0.649622", "0.6475829", "0.6456932", "0.6439604", "0.64313513", "0.64196384", "0.6418535", "0.6402785", "0.63693106", "0.6368862", "0.6352125", "0.6349533", "0.6336192", "0.63130355", "0.6305244", "0.63020474", "0.62837064", "0.62780994", "0.6274551", "0.62549603", "0.6253342", "0.62522584", "0.62496686", "0.6249526", "0.6237939", "0.62361753", "0.62347686", "0.6230736", "0.6227067", "0.62267375", "0.62252676", "0.6224973", "0.62237227", "0.619765", "0.61905944", "0.61905944", "0.61905944", "0.6183075", "0.617266", "0.61629605", "0.6159427", "0.6140272", "0.6138826", "0.6137902", "0.6134613", "0.6132955", "0.61268586", "0.6122096", "0.61190736", "0.6115878", "0.61104083", "0.61062086", "0.61061996", "0.6095563", "0.609513", "0.6093618", "0.6091492", "0.609084", "0.60867", "0.60794955", "0.6073976", "0.6067686", "0.6060456", "0.6058989", "0.6057704", "0.60556644", "0.60531807", "0.6052175", "0.60505515", "0.6047655", "0.6047573", "0.6043028", "0.60402846", "0.6035467", "0.60320055", "0.60310173", "0.60284287", "0.6022077" ]
0.0
-1
this fix was only necessary for jQuery UI 1.8.16 (and jQuery 1.7 or 1.7.1) upgrading to jQuery UI 1.8.17 (and using either jQuery 1.7 or 1.7.1) fixed the problem but keep this in here for 1.8.16 users and maybe remove it down the line
function _fixUIEvent(event) { // for issue 1168 if (event.pageX === undefined) { event.pageX = event.originalEvent.pageX; event.pageY = event.originalEvent.pageY; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function initjQueryUI() {\n var availableCategories = [\n \"category_01\",\n \"category_02\",\n \"category_03\",\n \"category_04\",\n \"category_05\",\n \"category_06\",\n \"category_07\",\n \"category_08\",\n \"category_09\",\n \"category_10\",\n \"category_11\",\n \"category_12\",\n \"category_13\",\n \"category_14\",\n \"category_15\",\n \"category_16\",\n \"category_17\",\n \"category_18\",\n \"category_19\",\n \"category_20\",\n \"category_21\",\n \"category_22\",\n \"category_23\",\n \"category_24\",\n \"category_25\",\n \"category_26\",\n \"category_27\"\n ];\n\n $( \"#categories\").autocomplete({\n source: availableCategories\n });\n\n $( \".open-close\").each(function(){\n var $this = jQuery(this),\n opener = $this.find('.opener'),\n activeClass = \"active\";\n\n opener.on('click', function(e){\n e.preventDefault();\n\n opener.parent().toggleClass(activeClass);\n });\n });\n\n $( \"#slider-range\" ).slider({\n range: true,\n min: 120,\n max: 8980,\n values: [ 120, 8980 ],\n slide: function( event, ui ) {\n $(\"#start\").val($(\"#slider-range\").slider(\"values\", 0));\n $(\"#end\").val($(\"#slider-range\").slider(\"values\", 1));\n }\n });\n \n $(\"#start\").val($(\"#slider-range\").slider(\"values\", 0));\n $(\"#end\").val($(\"#slider-range\").slider(\"values\", 1));\n}", "function jUIInit() {\r\n if (!Lazy.load(_fdk.load.ui, jUIInit)) return;\r\n datePickerInit();\r\n ckedInit();\r\n fajaxInit();\r\n fconfirmInit();\r\n gooMapiInit();\r\n fuupInit();\r\n slimboxInit();\r\n GaleryEdit.init();\r\n $(\".expand\").autogrow();\r\n}", "function AjaxLoading() {\n EndAjaxLoading();\n\n $(\"#dialog_progress\").dialog({\n modal: true,\n width: 150,\n height: 130,\n resizable: false,\n autosize: false\n }).siblings('.ui-dialog-titlebar').remove().css(\"z-index\", 1005);\n}", "function testjQueryUIDialog() {\n $(\"#content\").dialog({\n resizable: true,\n autoOpen: false,\n modal: true,\n width: 500,\n title: 'Application details',\n buttons: {\n Ok() {\n $(this).dialog(\"close\");\n }\n },\n open(event, ui) {\n $(this).html(\"<i class='fa fa-check'></i>\" + \"Congratulations! You're setup is successful :-)\");\n }\n }).dialog(\"open\");\n}", "function filteredUi(ui) {\r\n return {\r\n originalPosition: ui.originalPosition,\r\n originalSize: ui.originalSize,\r\n position: ui.position,\r\n size: ui.size\r\n };\r\n }", "function redraw() { // IE6/7 position:relative elements not moving fix\n\tif($.browser.msie) {\n\t\t$('#columnPicker').css('display','none');\n\t\t$('#columnPicker').css('display','block');\n\t}\n}", "function scriptLoadHandlerUI() {\n\n if( window.jQuery.ui === undefined || window.jQuery.ui.version === undefined || window.jQuery.ui.version !== REQUIRED_JQUERYUI_VERSION ) {\n\n // Same approach as above: create a new script element, only this time\n // source the jQuery UI code. My local jQuery variable is still\n // referencing the just-loaded jQuery library, so this jQuery UI\n // uses the correct base.\n //\n var scriptTag = scriptLoaderElement(\"http://code.jquery.com/ui/\"+REQUIRED_JQUERYUI_VERSION+\"/jquery-ui.min.js\",\n\t\t\t\t\t scriptLoadHandlerKnockoutJS);\n\n (document.getElementsByTagName(\"head\")[0] || document.documentElement).appendChild(scriptTag);\n\n } else {\n\n // jQuery UI is also already in the page\n //\n scriptLoadHandlerKnockoutJS();\n }\n\n }", "function initUI() {\r\n\r\n\t//there must be some bench processor selected, so make sure we are using one\r\n\t$(\"#benchProcess\").find(\"option\").first().attr(\"selected\", \"selected\");\r\n\r\n\t$('#btnBack').button({\r\n\t\ticons: {\r\n\t\t\tprimary: \"ui-icon-arrowthick-1-w\"\r\n\t\t}\r\n\t}).click(function() {\r\n\r\n\t\thistory.back(-1);\r\n\t});\r\n\r\n\tvar advancedJobOptionsCollapsed = $.cookie('advancedJobOptions') != 'false';\r\n\t$('#advancedSettings')\r\n\t.expandable(advancedJobOptionsCollapsed)\r\n\t.children('legend:first')\r\n\t.click(function() {\r\n\t\tvar advancedJobOptionsCollapsed = !$(this).data('open');\r\n\t\t$.cookie('advancedJobOptions',\r\n\t\t\tadvancedJobOptionsCollapsed,\r\n\t\t\t{expires: 10000, path: '/'});\r\n\t});\r\n\r\n\t$(\"#solverField\").expandable(true);\r\n\t$('#btnDone').button({\r\n\t\ticons: {\r\n\t\t\tsecondary: \"ui-icon-check\"\r\n\t\t}\r\n\t});\r\n\r\n\t$(\"#solverList\").dataTable({\r\n\t\t\"sDom\": getDataTablesDom(),\r\n\t\t\"iDisplayStart\": 0,\r\n\t\t\"iDisplayLength\": defaultPageSize,\r\n\t\t\"bServerSide\": true,\r\n\t\t\"sAjaxSource\": starexecRoot + \"services/\",\r\n\t\t\"sServerMethod\": 'POST',\r\n\t\t\"fnServerData\": fnPaginationHandler\r\n\t});\r\n\r\n\t$(\"#solverList\").on(\"mousedown\", \"tr\", function() {\r\n\t\tif ($(this).hasClass(\"row_selected\")) {\r\n\t\t\t$(this).removeClass(\"row_selected\");\r\n\t\t} else {\r\n\t\t\tunselectAll();\r\n\t\t\t$(this).addClass(\"row_selected\");\r\n\t\t}\r\n\t});\r\n}", "function ciWidgetspopup(curobj, widgets_hiddenobj){\r\n var curobj = jQuery(curobj);\r\n\tvar offset=curobj.offset();\r\n\tif(jQuery.browser.msie){\r\n\t\tjQuery(\"#\"+widgets_hiddenobj).css({left: (offset.left + (-547)) + 'px',top: (offset.top +(-369)) + 'px',\"display\":\"block\"});\r\n\t}\r\n\telse{\r\n\t\tjQuery(\"#\"+widgets_hiddenobj).css({left: (offset.left + (-547)) + 'px',top: (offset.top +(-361)) + 'px',\"display\":\"block\"});\r\n\t}\r\n return false;\r\n}", "function selOptionDialog(){\n $(\"#dlgokcancel_title\").text('');\n $(\"#dlgokcancel_title\").show().text(_('Выберите из списка'));\n\n //$.getJSON('systems_view_name', {view_tag: 'options'}, function(json){\n $('#dlgokcancel').dialog('option', 'title', _('Опции'));\n //$('#dlgokcancel').dialog('option', 'title', json.ext_data);\n //alert($(\"#dlgokcancel_title\").text());\n //});\n\n // инициализация диалога\n $(\"#dlgokcancel_content\").html('<strong>'+_('Загрузка...')+'</strong>').load('systems_options', function(){\n //alert('async load content');\n $(\"#tbl_systems_options\").Scrollable(280, '100%').tablesorter().find(\"thead>tr\").css(\"cursor\",\"pointer\");\n\n if ($(\"#dlgoptedit_opt_edt\").val())\n $(\"input:radio\").val([parseOptId($(\"#dlgoptedit_opt_edt\").val())]);\n else\n //$(\"input:radio\").val([$(\"input:radio:first\").val()])\n ;\n\n // определение кнопок\n $(\"#dlgokcancel_ok_btn\").unbind('click').click(function()\n {\n //fill_input_filtered_users();\n var sel_opt_id=$('input:radio[name=sel_option]:checked').val();\n\n fill_input_filtered_option(sel_opt_id, 'from_table');\n\n // закрываем\n $(\"#dlgokcancel\").dialog(\"close\");\n //alert('after dlgokcancel.close');\n\n }); //dlgoptedit_save_btn click\n //alert('after filtered_users, bind');\n });\n\n //alert('selUsersDialog2');\n\n // события\n $(\"#dlgokcancel\").unbind('keypress').keypress(function(e){if(e.keyCode==13){$(\"#dlgokcancel_ok_btn\").click();}});\n\n // определение кнопок\n $(\"#dlgokcancel_cancel_btn\").unbind('click').click(function(){$(\"#dlgokcancel\").dialog(\"close\");});\n\n if ($.browser.msie) {\n $( \"#dlgokcancel\" ).unbind( \"dialogclose\").bind( \"dialogclose\", function(event, ui) {\n $('#dlgoptedit_type_cmb').css('visibility', 'visible');\n });\n }\n // запуск диалога\n $(\"#dlgokcancel\").show().dialog(\"open\");\n //обязательно после show dialog\n if ($.browser.msie) {\n $('#dlgoptedit_type_cmb').css('visibility', 'hidden');\n $('#dlgokcancel .full_height').css('height', '346px');\n }\n //$(\"#dlgeoptdit_login_edt\").focus().select();\n //alert('selUsersDialog3');\n}", "function prepareUi() {\n $('#tabs').kendoTabStrip();\n renderGrid();\n dismissLoadingDialog(); \n}", "function prepareUi() {\n $('#tabs').kendoTabStrip();\n renderGrid();\n dismissLoadingDialog(); \n}", "function UI() {} //Created prototype from which we can re use all methods", "function initUpdatePlugin(){\r\n\r\n\t\tvar objButton = jQuery(\"#uc_button_update_plugin\");\r\n\t\t\r\n\t\tif(objButton.length == 0)\r\n\t\t\treturn(false);\r\n\t\t\r\n\t\t//init update plugin button\r\n\t\tobjButton.click(function(){\r\n\r\n\t\t\tjQuery(\"#dialog_update_plugin\").dialog({\r\n\t\t\t\tdialogClass:\"unite-ui\",\t\t\t\r\n\t\t\t\tminWidth:600,\r\n\t\t\t\tminHeight:400,\r\n\t\t\t\tmodal:true,\r\n\t\t\t});\r\n\t\t\t\r\n\t\t});\r\n\t\t\r\n\t}", "function setup_ui_elements()\n{\n LOG(1, \"setup_ui_elements()\");\n // set title\n document.title = \"WeatherPi @ \" + window.location.hostname;\n $( \"#header\" ).html(\"<h1>WeatherPi @ \" + window.location.hostname + \"</h1>\");\n\n // set up tabs\n $( \"#tabs\" ).tabs({\n create: function(event, ui) {\n var theTab = ui.tab.index();\n LOG(1, \"INIT tab created \" + theTab);\n set_up_tab(theTab);\n },\n activate: function(event, ui) {\n var theTab = ui.newTab.index();\n LOG(1, \"INIT tab selected \" + theTab);\n set_up_tab(theTab);\n }\n });\n\n // set up dialogs\n $('#error-dialog').dialog({\n autoOpen: false,\n height: 140,\n modal: true,\n open: function(event, ui){\n setTimeout(\"$('#error-dialog').dialog('close')\",3000);\n }\n });\n // set up settings accordion\n $('#settings_accordion').accordion({heightStyle: 'panel'});\n\n // set up buttons\n $( \"#button-update\" ).button();\n $( \"#button-save_settings\" ).button();\n}", "function j(a,c,d){function e(){j||(c.width(f).height(\"\").draggable(\"option\",\"grid\",null),j=!0)}var f,g,h,i=d.isStart,j=!0,k=z(),l=H(),m=W(),p=M(),q=L(),r=K(),t=I();c.draggable({opacity:n(\"dragOpacity\",\"month\"),// use whatever the month view was using\nrevertDuration:n(\"dragRevertDuration\"),start:function(b,d){o(\"eventDragStart\",c[0],a,b,d),Q(a,c),f=c.width(),k.start(function(b,d){if(U(),b){g=!1;var f=E(0,d.col),k=E(0,b.col);h=k.diff(f,\"days\"),b.row?// mouse is over bottom slots\ni?j&&(\n// convert event to temporary slot-event\nc.width(l-10),// don't use entire width\ns(c,Y.defaultTimedEventDuration/p*q),// the default height\nc.draggable(\"option\",\"grid\",[l,1]),j=!1):g=!0:(// on full-days\nT(a.start.clone().add(h,\"days\"),$(a).add(h,\"days\")),e()),g=g||j&&!h}else e(),g=!0;c.draggable(\"option\",\"revert\",g)},b,\"drag\")},stop:function(d,f){if(k.stop(),U(),o(\"eventDragStop\",c[0],a,d,f),g)// hasn't moved or is out of bounds (draggable has already reverted)\ne(),c.css(\"filter\",\"\"),// clear IE opacity side-effects\nP(a,c);else{// changed!\nvar i,l,n=a.start.clone().add(h,\"days\");j||(l=Math.round((c.offset().top-N().offset().top)/t),// why not use ui.offset.top?\ni=b.duration(m+l*r),n=Y.rezoneDate(n.clone().time(i))),R(c[0],a,n,d,f)}}})}", "function JQSliderCreate() {\r\n $(this)\r\n .removeClass('ui-corner-all ui-widget-content')\r\n .wrap('<span class=\"ui-slider-wrap\"></span>')\r\n .find('.ui-slider-handle')\r\n .removeClass('ui-corner-all ui-state-default');\r\n }", "function UI(){}", "function UI(){}", "function n(a,b){b.click(function(c){if(!b.hasClass(\"ui-draggable-dragging\")&&!b.hasClass(\"ui-resizable-resizing\"))return h(\"eventClick\",this,a,c)}).hover(function(b){h(\"eventMouseover\",this,a,b)},function(b){h(\"eventMouseout\",this,a,b)})}", "_setOptions(){this.set(\"options\",this._getPickerOptions(data,this.allowNull,this.icon))}", "function explainDQExclude() {\r\n\t$('#explain_exclude').dialog({ bgiframe: true, modal: true, width: 500, \r\n\t\tbuttons: {'Close':function(){$(this).dialog(\"close\");}}\r\n\t});\t\r\n}", "function d(){this._curInst=null,this._keyEvent=!1,this._disabledInputs=[],this._datepickerShowing=!1,this._inDialog=!1,this._mainDivId=\"ui-datepicker-div\",this._inlineClass=\"ui-datepicker-inline\",this._appendClass=\"ui-datepicker-append\",this._triggerClass=\"ui-datepicker-trigger\",this._dialogClass=\"ui-datepicker-dialog\",this._disableClass=\"ui-datepicker-disabled\",this._unselectableClass=\"ui-datepicker-unselectable\",this._currentClass=\"ui-datepicker-current-day\",this._dayOverClass=\"ui-datepicker-days-cell-over\",this.regional=[],this.regional[\"\"]={closeText:\"Done\",prevText:\"Prev\",nextText:\"Next\",currentText:\"Today\",monthNames:[\"January\",\"February\",\"March\",\"April\",\"May\",\"June\",\"July\",\"August\",\"September\",\"October\",\"November\",\"December\"],monthNamesShort:[\"Jan\",\"Feb\",\"Mar\",\"Apr\",\"May\",\"Jun\",\"Jul\",\"Aug\",\"Sep\",\"Oct\",\"Nov\",\"Dec\"],dayNames:[\"Sunday\",\"Monday\",\"Tuesday\",\"Wednesday\",\"Thursday\",\"Friday\",\"Saturday\"],dayNamesShort:[\"Sun\",\"Mon\",\"Tue\",\"Wed\",\"Thu\",\"Fri\",\"Sat\"],dayNamesMin:[\"Su\",\"Mo\",\"Tu\",\"We\",\"Th\",\"Fr\",\"Sa\"],weekHeader:\"Wk\",dateFormat:\"mm/dd/yy\",firstDay:0,isRTL:!1,showMonthAfterYear:!1,yearSuffix:\"\"},this._defaults={showOn:\"focus\",showAnim:\"fadeIn\",showOptions:{},defaultDate:null,appendText:\"\",buttonText:\"...\",buttonImage:\"\",buttonImageOnly:!1,hideIfNoPrevNext:!1,navigationAsDateFormat:!1,gotoCurrent:!1,changeMonth:!1,changeYear:!1,yearRange:\"c-10:c+10\",showOtherMonths:!1,selectOtherMonths:!1,showWeek:!1,calculateWeek:this.iso8601Week,shortYearCutoff:\"+10\",minDate:null,maxDate:null,duration:\"fast\",beforeShowDay:null,beforeShow:null,onSelect:null,onChangeMonthYear:null,onClose:null,numberOfMonths:1,showCurrentAtPos:0,stepMonths:1,stepBigMonths:12,altField:\"\",altFormat:\"\",constrainInput:!0,showButtonPanel:!1,autoSize:!1,disabled:!1},e.extend(this._defaults,this.regional[\"\"]),this.regional.en=e.extend(!0,{},this.regional[\"\"]),this.regional[\"en-US\"]=e.extend(!0,{},this.regional.en),this.dpDiv=p(e(\"<div id='\"+this._mainDivId+\"' class='ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all'></div>\"))}", "function updateDatepicker(){\n\t\t\t$( \".ui-datepicker-header\", dp ).addClass(\"ui-body-c ui-corner-top\").removeClass(\"ui-corner-all\");\n\t\t\t$( \".ui-datepicker-prev, .ui-datepicker-next\", dp ).attr(\"href\", \"#\");\n\t\t\t$( \".ui-datepicker-prev\", dp ).buttonMarkup({iconpos: \"notext\", icon: \"arrow-l\", shadow: true, corners: true});\n\t\t\t$( \".ui-datepicker-next\", dp ).buttonMarkup({iconpos: \"notext\", icon: \"arrow-r\", shadow: true, corners: true});\n\t\t\t$( \".ui-datepicker-calendar th\", dp ).addClass(\"ui-bar-c\");\n\t\t\t$( \".ui-datepicker-calendar td\", dp ).addClass(\"ui-body-c\");\n\t\t\t$( \".ui-datepicker-calendar a\", dp ).buttonMarkup({corners: false, shadow: false}); \n\t\t\t$( \".ui-datepicker-calendar a.ui-state-active\", dp ).addClass(\"ui-btn-active\"); // selected date\n\t\t\t$( \".ui-datepicker-calendar a.ui-state-highlight\", dp ).addClass(\"ui-btn-up-e\"); // today\"s date\n\t $( \".ui-datepicker-calendar .ui-btn\", dp ).each(function(){\n\t\t\t\tvar el = $(this);\n\t\t\t\t// remove extra button markup - necessary for date value to be interpreted correctly\n\t\t\t\tel.html( el.find( \".ui-btn-text\" ).text() ); \n\t });\n\t\t}", "function updateDatepicker(){\n\t\t\t$( \".ui-datepicker-header\", dp ).addClass(\"ui-body-c ui-corner-top\").removeClass(\"ui-corner-all\");\n\t\t\t$( \".ui-datepicker-prev, .ui-datepicker-next\", dp ).attr(\"href\", \"#\");\n\t\t\t$( \".ui-datepicker-prev\", dp ).buttonMarkup({iconpos: \"notext\", icon: \"arrow-l\", shadow: true, corners: true});\n\t\t\t$( \".ui-datepicker-next\", dp ).buttonMarkup({iconpos: \"notext\", icon: \"arrow-r\", shadow: true, corners: true});\n\t\t\t$( \".ui-datepicker-calendar th\", dp ).addClass(\"ui-bar-c\");\n\t\t\t$( \".ui-datepicker-calendar td\", dp ).addClass(\"ui-body-c\");\n\t\t\t$( \".ui-datepicker-calendar a\", dp ).buttonMarkup({corners: false, shadow: false}); \n\t\t\t$( \".ui-datepicker-calendar a.ui-state-active\", dp ).addClass(\"ui-btn-active\"); // selected date\n\t\t\t$( \".ui-datepicker-calendar a.ui-state-highlight\", dp ).addClass(\"ui-btn-up-e\"); // today\"s date\n\t $( \".ui-datepicker-calendar .ui-btn\", dp ).each(function(){\n\t\t\t\tvar el = $(this);\n\t\t\t\t// remove extra button markup - necessary for date value to be interpreted correctly\n\t\t\t\tel.html( el.find( \".ui-btn-text\" ).text() ); \n\t });\n\t\t}", "function UI() {}", "function UI() {}", "function UI() {}", "function construirDialogoGeneral() \r\n{ \r\n $(\"body\").append(\"<div id='dialogoGenaralDiv'><span/><\\/div>\");\r\n $(\"#dialogoGenaralDiv\").dialog(\r\n { \r\n autoOpen:false, modal:true, width:\"50%\", resizable:false, draggable:false, \r\n buttons: \r\n {\r\n \"Aceptar\": function() \r\n {\r\n $(this).dialog(\"close\"); \r\n }\r\n },\r\n \r\n open: function() \r\n {\r\n $('.ui-dialog-buttonpane').find('button:contains(\"Aceptar\")').button({icons: {primary: 'ui-icon-check'}});\r\n }\r\n });\r\n}//construirDialogoGeneral", "function _revert_element(ui) {\n // make element assume previous size\n if (ui.originalSize) {\n ui.helper.height(ui.originalSize.height);\n }\n}", "cleanupUI() {\n\n }", "function ResizeUsingPercentages(e, ui) {\n var parent = ui.element.parent();\n ui.element.css({\n width: ui.element.width() / parent.width() * 100 + \"%\",\n height: ui.element.height() / parent.height() * 100 + \"%\"\n });\n\n //after any resize jquery adds an absolute position, which we don't want unless the user has resized\n //so this removes it, unless we previously noted that the user had moved it\n if ($(ui.element).data('doRestoreRelativePosition')) {\n ui.element.css({\n position: '',\n top: '',\n left: ''\n });\n }\n $(ui.element).removeData('hadPreviouslyBeenRelocated');\n}", "function Datepicker(){this._curInst=null;// The current instance in use\nthis._keyEvent=false;// If the last event was a key event\nthis._disabledInputs=[];// List of date picker inputs that have been disabled\nthis._datepickerShowing=false;// True if the popup picker is showing , false if not\nthis._inDialog=false;// True if showing within a \"dialog\", false if not\nthis._mainDivId=\"ui-datepicker-div\";// The ID of the main datepicker division\nthis._inlineClass=\"ui-datepicker-inline\";// The name of the inline marker class\nthis._appendClass=\"ui-datepicker-append\";// The name of the append marker class\nthis._triggerClass=\"ui-datepicker-trigger\";// The name of the trigger marker class\nthis._dialogClass=\"ui-datepicker-dialog\";// The name of the dialog marker class\nthis._disableClass=\"ui-datepicker-disabled\";// The name of the disabled covering marker class\nthis._unselectableClass=\"ui-datepicker-unselectable\";// The name of the unselectable cell marker class\nthis._currentClass=\"ui-datepicker-current-day\";// The name of the current day marker class\nthis._dayOverClass=\"ui-datepicker-days-cell-over\";// The name of the day hover marker class\nthis.regional=[];// Available regional settings, indexed by language code\nthis.regional[\"\"]={// Default regional settings\ncloseText:\"Done\",// Display text for close link\nprevText:\"Prev\",// Display text for previous month link\nnextText:\"Next\",// Display text for next month link\ncurrentText:\"Today\",// Display text for current month link\nmonthNames:[\"January\",\"February\",\"March\",\"April\",\"May\",\"June\",\"July\",\"August\",\"September\",\"October\",\"November\",\"December\"],// Names of months for drop-down and formatting\nmonthNamesShort:[\"Jan\",\"Feb\",\"Mar\",\"Apr\",\"May\",\"Jun\",\"Jul\",\"Aug\",\"Sep\",\"Oct\",\"Nov\",\"Dec\"],// For formatting\ndayNames:[\"Sunday\",\"Monday\",\"Tuesday\",\"Wednesday\",\"Thursday\",\"Friday\",\"Saturday\"],// For formatting\ndayNamesShort:[\"Sun\",\"Mon\",\"Tue\",\"Wed\",\"Thu\",\"Fri\",\"Sat\"],// For formatting\ndayNamesMin:[\"Su\",\"Mo\",\"Tu\",\"We\",\"Th\",\"Fr\",\"Sa\"],// Column headings for days starting at Sunday\nweekHeader:\"Wk\",// Column header for week of the year\ndateFormat:\"mm/dd/yy\",// See format options on parseDate\nfirstDay:0,// The first day of the week, Sun = 0, Mon = 1, ...\nisRTL:false,// True if right-to-left language, false if left-to-right\nshowMonthAfterYear:false,// True if the year select precedes month, false for month then year\nyearSuffix:\"\"// Additional text to append to the year in the month headers\n};this._defaults={// Global defaults for all the date picker instances\nshowOn:\"focus\",// \"focus\" for popup on focus,\n// \"button\" for trigger button, or \"both\" for either\nshowAnim:\"fadeIn\",// Name of jQuery animation for popup\nshowOptions:{},// Options for enhanced animations\ndefaultDate:null,// Used when field is blank: actual date,\n// +/-number for offset from today, null for today\nappendText:\"\",// Display text following the input box, e.g. showing the format\nbuttonText:\"...\",// Text for trigger button\nbuttonImage:\"\",// URL for trigger button image\nbuttonImageOnly:false,// True if the image appears alone, false if it appears on a button\nhideIfNoPrevNext:false,// True to hide next/previous month links\n// if not applicable, false to just disable them\nnavigationAsDateFormat:false,// True if date formatting applied to prev/today/next links\ngotoCurrent:false,// True if today link goes back to current selection instead\nchangeMonth:false,// True if month can be selected directly, false if only prev/next\nchangeYear:false,// True if year can be selected directly, false if only prev/next\nyearRange:\"c-10:c+10\",// Range of years to display in drop-down,\n// either relative to today's year (-nn:+nn), relative to currently displayed year\n// (c-nn:c+nn), absolute (nnnn:nnnn), or a combination of the above (nnnn:-n)\nshowOtherMonths:false,// True to show dates in other months, false to leave blank\nselectOtherMonths:false,// True to allow selection of dates in other months, false for unselectable\nshowWeek:false,// True to show week of the year, false to not show it\ncalculateWeek:this.iso8601Week,// How to calculate the week of the year,\n// takes a Date and returns the number of the week for it\nshortYearCutoff:\"+10\",// Short year values < this are in the current century,\n// > this are in the previous century,\n// string value starting with \"+\" for current year + value\nminDate:null,// The earliest selectable date, or null for no limit\nmaxDate:null,// The latest selectable date, or null for no limit\nduration:\"fast\",// Duration of display/closure\nbeforeShowDay:null,// Function that takes a date and returns an array with\n// [0] = true if selectable, false if not, [1] = custom CSS class name(s) or \"\",\n// [2] = cell title (optional), e.g. $.datepicker.noWeekends\nbeforeShow:null,// Function that takes an input field and\n// returns a set of custom settings for the date picker\nonSelect:null,// Define a callback function when a date is selected\nonChangeMonthYear:null,// Define a callback function when the month or year is changed\nonClose:null,// Define a callback function when the datepicker is closed\nnumberOfMonths:1,// Number of months to show at a time\nshowCurrentAtPos:0,// The position in multipe months at which to show the current month (starting at 0)\nstepMonths:1,// Number of months to step back/forward\nstepBigMonths:12,// Number of months to step back/forward for the big links\naltField:\"\",// Selector for an alternate field to store selected dates into\naltFormat:\"\",// The date format to use for the alternate field\nconstrainInput:true,// The input is constrained by the current date format\nshowButtonPanel:false,// True to show button panel, false to not show it\nautoSize:false,// True to size the input for the date format, false to leave as is\ndisabled:false// The initial disabled state\n};$.extend(this._defaults,this.regional[\"\"]);this.regional.en=$.extend(true,{},this.regional[\"\"]);this.regional[\"en-US\"]=$.extend(true,{},this.regional.en);this.dpDiv=datepicker_bindHover($(\"<div id='\"+this._mainDivId+\"' class='ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all'></div>\"));}", "function Datepicker(){this._curInst=null;// The current instance in use\nthis._keyEvent=false;// If the last event was a key event\nthis._disabledInputs=[];// List of date picker inputs that have been disabled\nthis._datepickerShowing=false;// True if the popup picker is showing , false if not\nthis._inDialog=false;// True if showing within a \"dialog\", false if not\nthis._mainDivId=\"ui-datepicker-div\";// The ID of the main datepicker division\nthis._inlineClass=\"ui-datepicker-inline\";// The name of the inline marker class\nthis._appendClass=\"ui-datepicker-append\";// The name of the append marker class\nthis._triggerClass=\"ui-datepicker-trigger\";// The name of the trigger marker class\nthis._dialogClass=\"ui-datepicker-dialog\";// The name of the dialog marker class\nthis._disableClass=\"ui-datepicker-disabled\";// The name of the disabled covering marker class\nthis._unselectableClass=\"ui-datepicker-unselectable\";// The name of the unselectable cell marker class\nthis._currentClass=\"ui-datepicker-current-day\";// The name of the current day marker class\nthis._dayOverClass=\"ui-datepicker-days-cell-over\";// The name of the day hover marker class\nthis.regional=[];// Available regional settings, indexed by language code\nthis.regional[\"\"]={// Default regional settings\ncloseText:\"Done\",// Display text for close link\nprevText:\"Prev\",// Display text for previous month link\nnextText:\"Next\",// Display text for next month link\ncurrentText:\"Today\",// Display text for current month link\nmonthNames:[\"January\",\"February\",\"March\",\"April\",\"May\",\"June\",\"July\",\"August\",\"September\",\"October\",\"November\",\"December\"],// Names of months for drop-down and formatting\nmonthNamesShort:[\"Jan\",\"Feb\",\"Mar\",\"Apr\",\"May\",\"Jun\",\"Jul\",\"Aug\",\"Sep\",\"Oct\",\"Nov\",\"Dec\"],// For formatting\ndayNames:[\"Sunday\",\"Monday\",\"Tuesday\",\"Wednesday\",\"Thursday\",\"Friday\",\"Saturday\"],// For formatting\ndayNamesShort:[\"Sun\",\"Mon\",\"Tue\",\"Wed\",\"Thu\",\"Fri\",\"Sat\"],// For formatting\ndayNamesMin:[\"Su\",\"Mo\",\"Tu\",\"We\",\"Th\",\"Fr\",\"Sa\"],// Column headings for days starting at Sunday\nweekHeader:\"Wk\",// Column header for week of the year\ndateFormat:\"mm/dd/yy\",// See format options on parseDate\nfirstDay:0,// The first day of the week, Sun = 0, Mon = 1, ...\nisRTL:false,// True if right-to-left language, false if left-to-right\nshowMonthAfterYear:false,// True if the year select precedes month, false for month then year\nyearSuffix:\"\"// Additional text to append to the year in the month headers\n};this._defaults={// Global defaults for all the date picker instances\nshowOn:\"focus\",// \"focus\" for popup on focus,\n// \"button\" for trigger button, or \"both\" for either\nshowAnim:\"fadeIn\",// Name of jQuery animation for popup\nshowOptions:{},// Options for enhanced animations\ndefaultDate:null,// Used when field is blank: actual date,\n// +/-number for offset from today, null for today\nappendText:\"\",// Display text following the input box, e.g. showing the format\nbuttonText:\"...\",// Text for trigger button\nbuttonImage:\"\",// URL for trigger button image\nbuttonImageOnly:false,// True if the image appears alone, false if it appears on a button\nhideIfNoPrevNext:false,// True to hide next/previous month links\n// if not applicable, false to just disable them\nnavigationAsDateFormat:false,// True if date formatting applied to prev/today/next links\ngotoCurrent:false,// True if today link goes back to current selection instead\nchangeMonth:false,// True if month can be selected directly, false if only prev/next\nchangeYear:false,// True if year can be selected directly, false if only prev/next\nyearRange:\"c-10:c+10\",// Range of years to display in drop-down,\n// either relative to today's year (-nn:+nn), relative to currently displayed year\n// (c-nn:c+nn), absolute (nnnn:nnnn), or a combination of the above (nnnn:-n)\nshowOtherMonths:false,// True to show dates in other months, false to leave blank\nselectOtherMonths:false,// True to allow selection of dates in other months, false for unselectable\nshowWeek:false,// True to show week of the year, false to not show it\ncalculateWeek:this.iso8601Week,// How to calculate the week of the year,\n// takes a Date and returns the number of the week for it\nshortYearCutoff:\"+10\",// Short year values < this are in the current century,\n// > this are in the previous century,\n// string value starting with \"+\" for current year + value\nminDate:null,// The earliest selectable date, or null for no limit\nmaxDate:null,// The latest selectable date, or null for no limit\nduration:\"fast\",// Duration of display/closure\nbeforeShowDay:null,// Function that takes a date and returns an array with\n// [0] = true if selectable, false if not, [1] = custom CSS class name(s) or \"\",\n// [2] = cell title (optional), e.g. $.datepicker.noWeekends\nbeforeShow:null,// Function that takes an input field and\n// returns a set of custom settings for the date picker\nonSelect:null,// Define a callback function when a date is selected\nonChangeMonthYear:null,// Define a callback function when the month or year is changed\nonClose:null,// Define a callback function when the datepicker is closed\nnumberOfMonths:1,// Number of months to show at a time\nshowCurrentAtPos:0,// The position in multipe months at which to show the current month (starting at 0)\nstepMonths:1,// Number of months to step back/forward\nstepBigMonths:12,// Number of months to step back/forward for the big links\naltField:\"\",// Selector for an alternate field to store selected dates into\naltFormat:\"\",// The date format to use for the alternate field\nconstrainInput:true,// The input is constrained by the current date format\nshowButtonPanel:false,// True to show button panel, false to not show it\nautoSize:false,// True to size the input for the date format, false to leave as is\ndisabled:false// The initial disabled state\n};$.extend(this._defaults,this.regional[\"\"]);this.regional.en=$.extend(true,{},this.regional[\"\"]);this.regional[\"en-US\"]=$.extend(true,{},this.regional.en);this.dpDiv=datepicker_bindHover($(\"<div id='\"+this._mainDivId+\"' class='ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all'></div>\"));}", "function Datepicker(){this._curInst=null;// The current instance in use\nthis._keyEvent=false;// If the last event was a key event\nthis._disabledInputs=[];// List of date picker inputs that have been disabled\nthis._datepickerShowing=false;// True if the popup picker is showing , false if not\nthis._inDialog=false;// True if showing within a \"dialog\", false if not\nthis._mainDivId=\"ui-datepicker-div\";// The ID of the main datepicker division\nthis._inlineClass=\"ui-datepicker-inline\";// The name of the inline marker class\nthis._appendClass=\"ui-datepicker-append\";// The name of the append marker class\nthis._triggerClass=\"ui-datepicker-trigger\";// The name of the trigger marker class\nthis._dialogClass=\"ui-datepicker-dialog\";// The name of the dialog marker class\nthis._disableClass=\"ui-datepicker-disabled\";// The name of the disabled covering marker class\nthis._unselectableClass=\"ui-datepicker-unselectable\";// The name of the unselectable cell marker class\nthis._currentClass=\"ui-datepicker-current-day\";// The name of the current day marker class\nthis._dayOverClass=\"ui-datepicker-days-cell-over\";// The name of the day hover marker class\nthis.regional=[];// Available regional settings, indexed by language code\nthis.regional[\"\"]={// Default regional settings\ncloseText:\"Done\",// Display text for close link\nprevText:\"Prev\",// Display text for previous month link\nnextText:\"Next\",// Display text for next month link\ncurrentText:\"Today\",// Display text for current month link\nmonthNames:[\"January\",\"February\",\"March\",\"April\",\"May\",\"June\",\"July\",\"August\",\"September\",\"October\",\"November\",\"December\"],// Names of months for drop-down and formatting\nmonthNamesShort:[\"Jan\",\"Feb\",\"Mar\",\"Apr\",\"May\",\"Jun\",\"Jul\",\"Aug\",\"Sep\",\"Oct\",\"Nov\",\"Dec\"],// For formatting\ndayNames:[\"Sunday\",\"Monday\",\"Tuesday\",\"Wednesday\",\"Thursday\",\"Friday\",\"Saturday\"],// For formatting\ndayNamesShort:[\"Sun\",\"Mon\",\"Tue\",\"Wed\",\"Thu\",\"Fri\",\"Sat\"],// For formatting\ndayNamesMin:[\"Su\",\"Mo\",\"Tu\",\"We\",\"Th\",\"Fr\",\"Sa\"],// Column headings for days starting at Sunday\nweekHeader:\"Wk\",// Column header for week of the year\ndateFormat:\"mm/dd/yy\",// See format options on parseDate\nfirstDay:0,// The first day of the week, Sun = 0, Mon = 1, ...\nisRTL:false,// True if right-to-left language, false if left-to-right\nshowMonthAfterYear:false,// True if the year select precedes month, false for month then year\nyearSuffix:\"\"// Additional text to append to the year in the month headers\n};this._defaults={// Global defaults for all the date picker instances\nshowOn:\"focus\",// \"focus\" for popup on focus,\n// \"button\" for trigger button, or \"both\" for either\nshowAnim:\"fadeIn\",// Name of jQuery animation for popup\nshowOptions:{},// Options for enhanced animations\ndefaultDate:null,// Used when field is blank: actual date,\n// +/-number for offset from today, null for today\nappendText:\"\",// Display text following the input box, e.g. showing the format\nbuttonText:\"...\",// Text for trigger button\nbuttonImage:\"\",// URL for trigger button image\nbuttonImageOnly:false,// True if the image appears alone, false if it appears on a button\nhideIfNoPrevNext:false,// True to hide next/previous month links\n// if not applicable, false to just disable them\nnavigationAsDateFormat:false,// True if date formatting applied to prev/today/next links\ngotoCurrent:false,// True if today link goes back to current selection instead\nchangeMonth:false,// True if month can be selected directly, false if only prev/next\nchangeYear:false,// True if year can be selected directly, false if only prev/next\nyearRange:\"c-10:c+10\",// Range of years to display in drop-down,\n// either relative to today's year (-nn:+nn), relative to currently displayed year\n// (c-nn:c+nn), absolute (nnnn:nnnn), or a combination of the above (nnnn:-n)\nshowOtherMonths:false,// True to show dates in other months, false to leave blank\nselectOtherMonths:false,// True to allow selection of dates in other months, false for unselectable\nshowWeek:false,// True to show week of the year, false to not show it\ncalculateWeek:this.iso8601Week,// How to calculate the week of the year,\n// takes a Date and returns the number of the week for it\nshortYearCutoff:\"+10\",// Short year values < this are in the current century,\n// > this are in the previous century,\n// string value starting with \"+\" for current year + value\nminDate:null,// The earliest selectable date, or null for no limit\nmaxDate:null,// The latest selectable date, or null for no limit\nduration:\"fast\",// Duration of display/closure\nbeforeShowDay:null,// Function that takes a date and returns an array with\n// [0] = true if selectable, false if not, [1] = custom CSS class name(s) or \"\",\n// [2] = cell title (optional), e.g. $.datepicker.noWeekends\nbeforeShow:null,// Function that takes an input field and\n// returns a set of custom settings for the date picker\nonSelect:null,// Define a callback function when a date is selected\nonChangeMonthYear:null,// Define a callback function when the month or year is changed\nonClose:null,// Define a callback function when the datepicker is closed\nnumberOfMonths:1,// Number of months to show at a time\nshowCurrentAtPos:0,// The position in multipe months at which to show the current month (starting at 0)\nstepMonths:1,// Number of months to step back/forward\nstepBigMonths:12,// Number of months to step back/forward for the big links\naltField:\"\",// Selector for an alternate field to store selected dates into\naltFormat:\"\",// The date format to use for the alternate field\nconstrainInput:true,// The input is constrained by the current date format\nshowButtonPanel:false,// True to show button panel, false to not show it\nautoSize:false,// True to size the input for the date format, false to leave as is\ndisabled:false// The initial disabled state\n};$.extend(this._defaults,this.regional[\"\"]);this.regional.en=$.extend(true,{},this.regional[\"\"]);this.regional[\"en-US\"]=$.extend(true,{},this.regional.en);this.dpDiv=datepicker_bindHover($(\"<div id='\"+this._mainDivId+\"' class='ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all'></div>\"));}", "function initWidgetUI() {\n $(\".widget-wrapper\").each(function () {\n var widgetId = extractObjectIdFromElementId($(this).attr(\"id\"));\n styleWidgetButtons(widgetId);\n });\n }", "function buildUI(){\t\n\t\t\n\t\treturn;\n\t\t\n\t}", "function explainDQResolve() {\r\n\t$('#explain_resolve').dialog({ bgiframe: true, modal: true, width: 500, \r\n\t\tbuttons: {'Close':function(){$(this).dialog(\"close\");}}\r\n\t});\t\r\n}", "function initEventDatePicker() {\r\n LocalizeDatePicker();\r\n var dates = $(\"#event-startdate, #event-enddate\").datepicker({\r\n numberOfMonths: 2,\r\n minDate: -365,\r\n beforeShow: function (input, inst) { $(this).siblings('label:first').hide(); },\r\n onSelect: function (selectedDate) {\r\n $(this).siblings('label:first').hide();\r\n var option = this.id == \"event-startdate\" ? \"minDate\" : \"maxDate\", instance = $(this).data('datepicker');\r\n date = $.datepicker.parseDate(instance.settings.dateFormat || $.datepicker._defaults.dateFormat, selectedDate, instance.settings);\r\n dates.not(this).datepicker('option', option, date);\r\n },\r\n onClose: function (dateText, inst) { if ($(this).val() == \"\") { $(this).siblings('label:first').show(); } }\r\n });\r\n}", "function Datepicker(){this._curInst = null; // The current instance in use\nthis._keyEvent = false; // If the last event was a key event\nthis._disabledInputs = []; // List of date picker inputs that have been disabled\nthis._datepickerShowing = false; // True if the popup picker is showing , false if not\nthis._inDialog = false; // True if showing within a \"dialog\", false if not\nthis._mainDivId = \"ui-datepicker-div\"; // The ID of the main datepicker division\nthis._inlineClass = \"ui-datepicker-inline\"; // The name of the inline marker class\nthis._appendClass = \"ui-datepicker-append\"; // The name of the append marker class\nthis._triggerClass = \"ui-datepicker-trigger\"; // The name of the trigger marker class\nthis._dialogClass = \"ui-datepicker-dialog\"; // The name of the dialog marker class\nthis._disableClass = \"ui-datepicker-disabled\"; // The name of the disabled covering marker class\nthis._unselectableClass = \"ui-datepicker-unselectable\"; // The name of the unselectable cell marker class\nthis._currentClass = \"ui-datepicker-current-day\"; // The name of the current day marker class\nthis._dayOverClass = \"ui-datepicker-days-cell-over\"; // The name of the day hover marker class\nthis.regional = []; // Available regional settings, indexed by language code\nthis.regional[\"\"] = { // Default regional settings\ncloseText:\"Done\", // Display text for close link\nprevText:\"Prev\", // Display text for previous month link\nnextText:\"Next\", // Display text for next month link\ncurrentText:\"Today\", // Display text for current month link\nmonthNames:[\"January\",\"February\",\"March\",\"April\",\"May\",\"June\",\"July\",\"August\",\"September\",\"October\",\"November\",\"December\"], // Names of months for drop-down and formatting\nmonthNamesShort:[\"Jan\",\"Feb\",\"Mar\",\"Apr\",\"May\",\"Jun\",\"Jul\",\"Aug\",\"Sep\",\"Oct\",\"Nov\",\"Dec\"], // For formatting\ndayNames:[\"Sunday\",\"Monday\",\"Tuesday\",\"Wednesday\",\"Thursday\",\"Friday\",\"Saturday\"], // For formatting\ndayNamesShort:[\"Sun\",\"Mon\",\"Tue\",\"Wed\",\"Thu\",\"Fri\",\"Sat\"], // For formatting\ndayNamesMin:[\"Su\",\"Mo\",\"Tu\",\"We\",\"Th\",\"Fr\",\"Sa\"], // Column headings for days starting at Sunday\nweekHeader:\"Wk\", // Column header for week of the year\ndateFormat:\"mm/dd/yy\", // See format options on parseDate\nfirstDay:0, // The first day of the week, Sun = 0, Mon = 1, ...\nisRTL:false, // True if right-to-left language, false if left-to-right\nshowMonthAfterYear:false, // True if the year select precedes month, false for month then year\nyearSuffix:\"\" // Additional text to append to the year in the month headers\n};this._defaults = { // Global defaults for all the date picker instances\nshowOn:\"focus\", // \"focus\" for popup on focus,\n// \"button\" for trigger button, or \"both\" for either\nshowAnim:\"fadeIn\", // Name of jQuery animation for popup\nshowOptions:{}, // Options for enhanced animations\ndefaultDate:null, // Used when field is blank: actual date,\n// +/-number for offset from today, null for today\nappendText:\"\", // Display text following the input box, e.g. showing the format\nbuttonText:\"...\", // Text for trigger button\nbuttonImage:\"\", // URL for trigger button image\nbuttonImageOnly:false, // True if the image appears alone, false if it appears on a button\nhideIfNoPrevNext:false, // True to hide next/previous month links\n// if not applicable, false to just disable them\nnavigationAsDateFormat:false, // True if date formatting applied to prev/today/next links\ngotoCurrent:false, // True if today link goes back to current selection instead\nchangeMonth:false, // True if month can be selected directly, false if only prev/next\nchangeYear:false, // True if year can be selected directly, false if only prev/next\nyearRange:\"c-10:c+10\", // Range of years to display in drop-down,\n// either relative to today's year (-nn:+nn), relative to currently displayed year\n// (c-nn:c+nn), absolute (nnnn:nnnn), or a combination of the above (nnnn:-n)\nshowOtherMonths:false, // True to show dates in other months, false to leave blank\nselectOtherMonths:false, // True to allow selection of dates in other months, false for unselectable\nshowWeek:false, // True to show week of the year, false to not show it\ncalculateWeek:this.iso8601Week, // How to calculate the week of the year,\n// takes a Date and returns the number of the week for it\nshortYearCutoff:\"+10\", // Short year values < this are in the current century,\n// > this are in the previous century,\n// string value starting with \"+\" for current year + value\nminDate:null, // The earliest selectable date, or null for no limit\nmaxDate:null, // The latest selectable date, or null for no limit\nduration:\"fast\", // Duration of display/closure\nbeforeShowDay:null, // Function that takes a date and returns an array with\n// [0] = true if selectable, false if not, [1] = custom CSS class name(s) or \"\",\n// [2] = cell title (optional), e.g. $.datepicker.noWeekends\nbeforeShow:null, // Function that takes an input field and\n// returns a set of custom settings for the date picker\nonSelect:null, // Define a callback function when a date is selected\nonChangeMonthYear:null, // Define a callback function when the month or year is changed\nonClose:null, // Define a callback function when the datepicker is closed\nnumberOfMonths:1, // Number of months to show at a time\nshowCurrentAtPos:0, // The position in multipe months at which to show the current month (starting at 0)\nstepMonths:1, // Number of months to step back/forward\nstepBigMonths:12, // Number of months to step back/forward for the big links\naltField:\"\", // Selector for an alternate field to store selected dates into\naltFormat:\"\", // The date format to use for the alternate field\nconstrainInput:true, // The input is constrained by the current date format\nshowButtonPanel:false, // True to show button panel, false to not show it\nautoSize:false, // True to size the input for the date format, false to leave as is\ndisabled:false // The initial disabled state\n};$.extend(this._defaults,this.regional[\"\"]);this.regional.en = $.extend(true,{},this.regional[\"\"]);this.regional[\"en-US\"] = $.extend(true,{},this.regional.en);this.dpDiv = datepicker_bindHover($(\"<div id='\" + this._mainDivId + \"' class='ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all'></div>\"));}", "function Datepicker(){this._curInst = null; // The current instance in use\nthis._keyEvent = false; // If the last event was a key event\nthis._disabledInputs = []; // List of date picker inputs that have been disabled\nthis._datepickerShowing = false; // True if the popup picker is showing , false if not\nthis._inDialog = false; // True if showing within a \"dialog\", false if not\nthis._mainDivId = \"ui-datepicker-div\"; // The ID of the main datepicker division\nthis._inlineClass = \"ui-datepicker-inline\"; // The name of the inline marker class\nthis._appendClass = \"ui-datepicker-append\"; // The name of the append marker class\nthis._triggerClass = \"ui-datepicker-trigger\"; // The name of the trigger marker class\nthis._dialogClass = \"ui-datepicker-dialog\"; // The name of the dialog marker class\nthis._disableClass = \"ui-datepicker-disabled\"; // The name of the disabled covering marker class\nthis._unselectableClass = \"ui-datepicker-unselectable\"; // The name of the unselectable cell marker class\nthis._currentClass = \"ui-datepicker-current-day\"; // The name of the current day marker class\nthis._dayOverClass = \"ui-datepicker-days-cell-over\"; // The name of the day hover marker class\nthis.regional = []; // Available regional settings, indexed by language code\nthis.regional[\"\"] = { // Default regional settings\ncloseText:\"Done\", // Display text for close link\nprevText:\"Prev\", // Display text for previous month link\nnextText:\"Next\", // Display text for next month link\ncurrentText:\"Today\", // Display text for current month link\nmonthNames:[\"January\",\"February\",\"March\",\"April\",\"May\",\"June\",\"July\",\"August\",\"September\",\"October\",\"November\",\"December\"], // Names of months for drop-down and formatting\nmonthNamesShort:[\"Jan\",\"Feb\",\"Mar\",\"Apr\",\"May\",\"Jun\",\"Jul\",\"Aug\",\"Sep\",\"Oct\",\"Nov\",\"Dec\"], // For formatting\ndayNames:[\"Sunday\",\"Monday\",\"Tuesday\",\"Wednesday\",\"Thursday\",\"Friday\",\"Saturday\"], // For formatting\ndayNamesShort:[\"Sun\",\"Mon\",\"Tue\",\"Wed\",\"Thu\",\"Fri\",\"Sat\"], // For formatting\ndayNamesMin:[\"Su\",\"Mo\",\"Tu\",\"We\",\"Th\",\"Fr\",\"Sa\"], // Column headings for days starting at Sunday\nweekHeader:\"Wk\", // Column header for week of the year\ndateFormat:\"mm/dd/yy\", // See format options on parseDate\nfirstDay:0, // The first day of the week, Sun = 0, Mon = 1, ...\nisRTL:false, // True if right-to-left language, false if left-to-right\nshowMonthAfterYear:false, // True if the year select precedes month, false for month then year\nyearSuffix:\"\" // Additional text to append to the year in the month headers\n};this._defaults = { // Global defaults for all the date picker instances\nshowOn:\"focus\", // \"focus\" for popup on focus,\n// \"button\" for trigger button, or \"both\" for either\nshowAnim:\"fadeIn\", // Name of jQuery animation for popup\nshowOptions:{}, // Options for enhanced animations\ndefaultDate:null, // Used when field is blank: actual date,\n// +/-number for offset from today, null for today\nappendText:\"\", // Display text following the input box, e.g. showing the format\nbuttonText:\"...\", // Text for trigger button\nbuttonImage:\"\", // URL for trigger button image\nbuttonImageOnly:false, // True if the image appears alone, false if it appears on a button\nhideIfNoPrevNext:false, // True to hide next/previous month links\n// if not applicable, false to just disable them\nnavigationAsDateFormat:false, // True if date formatting applied to prev/today/next links\ngotoCurrent:false, // True if today link goes back to current selection instead\nchangeMonth:false, // True if month can be selected directly, false if only prev/next\nchangeYear:false, // True if year can be selected directly, false if only prev/next\nyearRange:\"c-10:c+10\", // Range of years to display in drop-down,\n// either relative to today's year (-nn:+nn), relative to currently displayed year\n// (c-nn:c+nn), absolute (nnnn:nnnn), or a combination of the above (nnnn:-n)\nshowOtherMonths:false, // True to show dates in other months, false to leave blank\nselectOtherMonths:false, // True to allow selection of dates in other months, false for unselectable\nshowWeek:false, // True to show week of the year, false to not show it\ncalculateWeek:this.iso8601Week, // How to calculate the week of the year,\n// takes a Date and returns the number of the week for it\nshortYearCutoff:\"+10\", // Short year values < this are in the current century,\n// > this are in the previous century,\n// string value starting with \"+\" for current year + value\nminDate:null, // The earliest selectable date, or null for no limit\nmaxDate:null, // The latest selectable date, or null for no limit\nduration:\"fast\", // Duration of display/closure\nbeforeShowDay:null, // Function that takes a date and returns an array with\n// [0] = true if selectable, false if not, [1] = custom CSS class name(s) or \"\",\n// [2] = cell title (optional), e.g. $.datepicker.noWeekends\nbeforeShow:null, // Function that takes an input field and\n// returns a set of custom settings for the date picker\nonSelect:null, // Define a callback function when a date is selected\nonChangeMonthYear:null, // Define a callback function when the month or year is changed\nonClose:null, // Define a callback function when the datepicker is closed\nnumberOfMonths:1, // Number of months to show at a time\nshowCurrentAtPos:0, // The position in multipe months at which to show the current month (starting at 0)\nstepMonths:1, // Number of months to step back/forward\nstepBigMonths:12, // Number of months to step back/forward for the big links\naltField:\"\", // Selector for an alternate field to store selected dates into\naltFormat:\"\", // The date format to use for the alternate field\nconstrainInput:true, // The input is constrained by the current date format\nshowButtonPanel:false, // True to show button panel, false to not show it\nautoSize:false, // True to size the input for the date format, false to leave as is\ndisabled:false // The initial disabled state\n};$.extend(this._defaults,this.regional[\"\"]);this.regional.en = $.extend(true,{},this.regional[\"\"]);this.regional[\"en-US\"] = $.extend(true,{},this.regional.en);this.dpDiv = datepicker_bindHover($(\"<div id='\" + this._mainDivId + \"' class='ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all'></div>\"));}", "function initUI() {\n var resize= $(\"#content\");\n var containerWidth = $(\"body\").width();\n\n $(resize).resizable({\n handles: 'e',\n /*maxWidth: 450,\n minWidth: 120,*/\n classes: { \"ui-resizable-handle\": \"hidden-xs hidden-sm\" },\n resize: function(event, ui){\n var currentWidth = ui.size.width;\n\n // this accounts for padding in the panels +\n // borders, you could calculate this using jQuery\n var padding = 12;\n\n // this accounts for some lag in the ui.size value, if you take this away\n // you'll get some instable behaviour\n $(this).width(containerWidth - currentWidth - padding);\n\n // set the content panel width\n $(\"#content\").width(currentWidth);\n }\n });\n}", "function PopUpCode(heading) {\n $(\".ui-dialog-titlebar\").show();\n $(\".ui-dialog-title\").html(heading);\n $(\".ui-dialog-titlebar\").css(\"font-size\", \"11px\");\n $(\".ui-dialog-titlebar\").css(\"background\", \"#0F628C\");\n $(\".ui-dialog-titlebar\").css(\"color\", \"#ffffff\");\n $(\".ui-dialog-buttonpane\").css(\"background\", \"none\");\n}", "function calendarDisplay () {\n $.datepicker.setDefaults({\n onSelect: function () {\n var oldValue = $(this).val()\n var newValue = ' ' + oldValue.substring(0, 2) + ' / ' + oldValue.substring(8, 10)\n $(this).val(newValue)\n // console.log(\"calendarClosed\")\n // console.log($(this))\n }\n })\n\n $('.datepicker').datepicker('option', 'firstDay', 1)\n $('.datepicker').datepicker('option', 'maxDate', null)\n $('.datepicker').datepicker('option', 'dayNames', [ 'DOM', 'LUN', 'MAR', 'MIÉ', 'JUE', 'VIE', 'SÁB' ])\n $('.datepicker').datepicker('option', 'dayNamesMin', [ 'DOM', 'LUN', 'MAR', 'MIÉ', 'JUE', 'VIE', 'SÁB' ])\n $('.datepicker').datepicker('option', 'dayNamesShort', [ 'DOM', 'LUN', 'MAR', 'MIÉ', 'JUE', 'VIE', 'SÁB' ])\n $('.datepicker').datepicker('option', 'monthNames', [ 'Enero', 'Febrero', 'Marzo', 'Abril', 'Mayo', 'Junio', 'Julio', 'Agosto', 'Septiembre', 'Octubre', 'Noviembre', 'Diciembre' ])\n\n $('.datepicker').datepicker({\n firstDay: 1,\n dayNames: [ 'DOM', 'LUN', 'MAR', 'MIÉ', 'JUE', 'VIE', 'SÁB' ],\n dayNamesMin: [ 'DOM', 'LUN', 'MAR', 'MIÉ', 'JUE', 'VIE', 'SÁB' ],\n dayNamesShort: [ 'DOM', 'LUN', 'MAR', 'MIÉ', 'JUE', 'VIE', 'SÁB' ],\n monthNames: [ 'Enero', 'Febrero', 'Marzo', 'Abril', 'Mayo', 'Junio', 'Julio', 'Agosto', 'Septiembre', 'Octubre', 'Noviembre', 'Diciembre' ],\n maxDate: null,\n changeMonth: true,\n changeYear: true\n })\n $('#ui-datepicker-div').hide()\n }", "function initDraggable() {\n $(\"body .draggable .draggable-region\").live(\"mousedown\", function(evt){\n try{\n $(\"body\").addClass(\"noselect\");\n var obj = $(this);\n var clkObj = $(evt.target);\n //Return if disabled\n if (obj.hasClass(\"disabled\") || clkObj.hasClass(\"fakeLink\") || clkObj.get(0).tagName.toUpperCase() == \"A\") {return;}\n var wholeObj = obj.closest(\".draggable\");\n if (wholeObj.hasClass(\"disabled\")) {return;}\n //Events and Classes\n wholeObj.addClass(\"draggable-down\");\n if(UTIL.getID(\"draggable-overlay-hack\") == null) {\n $(document.body).append(\"<div id='draggable-overlay-hack' style='height:100%;width:100%;position:fixed;top:0;left:0;'></div>\");\n }\n var overlay = $(\"#draggable-overlay-hack\");\n overlay.css({\"display\" : \"block\", \"z-index\" : \"1000\", \"cursor\" : \"move\"});\n overlay.bind(\"mousemove.draggable\", function(e){\n var wholeObj = obj.closest(\".draggable\");\n wholeObj.removeClass(\"draggable-down\").addClass(\"draggable-move\");\n //Update Position\n var coor = wholeObj.attr(\"draggableAnchor\").split(\",\");\n var ancX = parseInt(coor[0]);\n var ancY = parseInt(coor[1]);\n var pos = wholeObj.offset();\n var absX = pos.left;\n var absY = pos.top;\n var relX = parseInt(wholeObj.css(\"left\"),10);\n var relY = parseInt(wholeObj.css(\"top\"),10);\n var mRelX = e.pageX - absX;\n var mRelY = e.pageY - absY;\n wholeObj.css({\"left\" : (relX+(mRelX-ancX))+\"px\", \"top\" : (relY+(mRelY-ancY))+\"px\"});\n })\n .bind(\"mouseup.draggable mouseleave.draggable\", function(){\n $(\"body\").removeClass(\"noselect\");\n var wholeObj = obj.closest(\".draggable\");\n wholeObj.removeClass(\"draggable-down draggable-move\").removeAttr(\"draggableAnchor\");\n $(this).unbind(\".draggable\").css({\"display\": \"none\", \"cursor\" : \"auto\"});\n });\n //Record the anchor point for the object\n var relX = evt.layerX ? evt.layerX : evt.offsetX;\n var relY = evt.layerY ? evt.layerY : evt.offsetY;\n wholeObj.attr(\"draggableAnchor\", relX+\",\"+relY);\n }catch(e){alert(e)}\n });\n}", "function aq_sortable_list_init() {\n\t\t$('.aq-sortable-list').sortable({\n\t\t\tcontainment: \"parent\",\n\t\t\tplaceholder: \"ui-state-highlight\"\n\t\t});\n\t}", "function aq_sortable_list_init() {\n\t\t$('.aq-sortable-list').sortable({\n\t\t\tcontainment: \"parent\",\n\t\t\tplaceholder: \"ui-state-highlight\",\n\t\t\topacity: 0.6,\n\t\t\tcursor: 'move',\n\t\t\trevert: true\n\t\t});\n\t}", "function updateSliderTooltips(ui) {\n\tvar fullUI = $('#slider-range').slider('option');\n\tvar handle = $(ui.handle);\n\tvar offset = handle.offset();\n\tvar first = $('#slider-range').children('.ui-slider-handle').first();\n\tvar pos = handle.is(first) ? 0 : 1;\n\tvar value = new Date(fullUI.values[pos]).format('d-MM-yyyy<br/>hh:mm');\n\t\t\n\tvar tooltip = $('#slider-container .timeline-tooltip');\n\ttooltip\n\t\t.html(value)\n\t\t.css('top', offset.top + 10 )\n\t\t.css('left', offset.left - tooltip.width() / 2)\n\t\t.show();\n}", "function HTMLUI () {}", "function removePopupMessages ( ) {\r\n $(\".ui-dialog\").remove()\r\n}", "function removeAddSlideUI() {\n\t\t$('#add_slide_wrapper').html('');\n\t}", "function initAddSubjectDialog() {\n //there's only one add subject button\n $(\".add_subj_dialog\").dialog({\n closeOnEscape: true,\n title: \"Add Subject\", \n draggable: true, \n resizable: false, \n modal: true, \n autoOpen: false,\n });\n}", "function k(a,c,d){function e(){k||(c.width(f).height(\"\").draggable(\"option\",\"grid\",null),k=!0)}var f,g,h,i,j=d.isStart,k=!0,l=A(),m=I(),n=X(),q=N(),r=M(),t=L(),u=K();c.draggable({opacity:o(\"dragOpacity\",\"month\"),// use whatever the month view was using\nrevertDuration:o(\"dragRevertDuration\"),start:function(b,d){p(\"eventDragStart\",c[0],a,b,d),R(a,c),f=c.width(),l.start(function(b,d){if(V(),b){g=!1,i=d.col;var f=G(0,d.col),l=G(0,b.col);h=l.diff(f,\"days\"),b.row?// mouse is over bottom slots\nj?k&&(\n// convert event to temporary slot-event\nc.width(m-10),// don't use entire width\ns(c,Z.defaultTimedEventDuration/q*r),// the default height\nc.draggable(\"option\",\"grid\",[m,1]),k=!1):g=!0:(// on full-days\nU(a.start.clone().add(h,\"days\"),_(a).add(h,\"days\"),!0,1),e()),g=g||k&&!h}else e(),g=!0;c.draggable(\"option\",\"revert\",g)},b,\"drag\")},stop:function(d,f){if(l.stop(),V(),p(\"eventDragStop\",c[0],a,d,f),g)// hasn't moved or is out of bounds (draggable has already reverted)\ne(),c.css(\"filter\",\"\"),// clear IE opacity side-effects\nQ(a,c);else{// changed!\n// calculate column delta\nvar h=Math.round((c.offset().left-O().offset().left)/m),j=a.resources;h!==i&&(j=[aa()[h].id]);var o,q,r=a.start.clone();k||(q=Math.round((c.offset().top-O().offset().top)/u),// why not use ui.offset.top?\no=b.duration(n+q*t),r=Z.rezoneDate(r.clone().time(o))),S(c[0],a,j,r,d,f)}}})}", "function JQSliderCreate()\n\t{\n\t\t$(this)\n\t\t\t.removeClass('ui-corner-all ui-widget-content')\n\t\t\t.wrap('<span class=\"ui-slider-wrap\"></span>')\n\t\t\t.find('.ui-slider-handle')\n\t\t\t.removeClass('ui-corner-all ui-state-default');\n\t}", "function initWidgets(resetMainWindowHeight) {\r\n\t// If flag is set, reset the main window's height (footer will move vertically if loading page contents via ajax)\r\n\tresetMainWindowHeight = !!resetMainWindowHeight;\r\n\tif (resetMainWindowHeight) resizeMainWindowSub();\r\n\t// Enable any jQuery UI buttons\r\n\tif ($('.jqbutton').length) \t $('.jqbutton' ).button();\r\n\tif ($('.jqbuttonsm').length) $('.jqbuttonsm' ).button();\r\n\tif ($('.jqbuttonmed').length) $('.jqbuttonmed').button();\r\n\t// Enable sliders\r\n\tinitSliders();\r\n\t// Pop-up date-picker initialization\r\n\tif ($('.cal').length) $('.cal').datepicker({ \r\n\t\tonSelect: function(){ $(this).focus(); dataEntryFormValuesChanged=true; try{ calculate();doBranching(); }catch(e){ } },\r\n\t\tbuttonText: 'Click to select a date', yearRange: '-100:+10', showOn: 'button', buttonImage: app_path_images+'date.png', \r\n\t\tbuttonImageOnly: true, changeMonth: true, changeYear: true, dateFormat: 'yy-mm-dd'\r\n\t});\r\n\t// Pop-up date-picker initialization\r\n\tif ($('.date_ymd').length) $('.date_ymd').datepicker({ \r\n\t\tonSelect: function(){ $(this).focus(); dataEntryFormValuesChanged=true; try{ calculate();doBranching(); }catch(e){ } },\r\n\t\tbuttonText: 'Click to select a date', yearRange: '-100:+10', showOn: 'button', buttonImage: app_path_images+'date.png', \r\n\t\tbuttonImageOnly: true, changeMonth: true, changeYear: true, dateFormat: 'yy-mm-dd', constrainInput: false\r\n\t});\r\n\tif ($('.date_mdy').length) $('.date_mdy').datepicker({ \r\n\t\tonSelect: function(){ $(this).focus(); dataEntryFormValuesChanged=true; try{ calculate();doBranching(); }catch(e){ } },\r\n\t\tbuttonText: 'Click to select a date', yearRange: '-100:+10', showOn: 'button', buttonImage: app_path_images+'date.png', \r\n\t\tbuttonImageOnly: true, changeMonth: true, changeYear: true, dateFormat: 'mm-dd-yy', constrainInput: false\r\n\t});\r\n\tif ($('.date_dmy').length) $('.date_dmy').datepicker({ \r\n\t\tonSelect: function(){ $(this).focus(); dataEntryFormValuesChanged=true; try{ calculate();doBranching(); }catch(e){ } },\r\n\t\tbuttonText: 'Click to select a date', yearRange: '-100:+10', showOn: 'button', buttonImage: app_path_images+'date.png', \r\n\t\tbuttonImageOnly: true, changeMonth: true, changeYear: true, dateFormat: 'dd-mm-yy', constrainInput: false\r\n\t});\r\n\t// Pop-up time-picker initialization\r\n\t$('.time2').timepicker({\r\n\t\tonClose: function(dateText, inst){ $('#'+$(inst).attr('id')).blur(); dataEntryFormValuesChanged=true; try{ calculate();doBranching(); }catch(e){ } },\r\n\t\thour: currentTime('h'), minute: currentTime('m'), buttonText: 'Click to select a time', \r\n\t\tshowOn: 'button', buttonImage: app_path_images+'timer.png', buttonImageOnly: true, timeFormat: 'hh:mm'\r\n\t});\r\n\t// Pop-up datetime-picker initialization\r\n\t$('.datetime_ymd').datetimepicker({\r\n\t\tonClose: function(dateText, inst){ $('#'+$(inst).attr('id')).blur(); dataEntryFormValuesChanged=true; try{ calculate();doBranching(); }catch(e){ } },\r\n\t\tbuttonText: 'Click to select a date', yearRange: '-100:+10', changeMonth: true, changeYear: true, dateFormat: 'yy-mm-dd',\r\n\t\thour: currentTime('h'), minute: currentTime('m'), buttonText: 'Click to select a date/time', \r\n\t\tshowOn: 'button', buttonImage: app_path_images+'datetime.png', buttonImageOnly: true, timeFormat: 'hh:mm', constrainInput: false\r\n\t});\r\n\t$('.datetime_mdy').datetimepicker({\r\n\t\tonClose: function(dateText, inst){ $('#'+$(inst).attr('id')).blur(); dataEntryFormValuesChanged=true; try{ calculate();doBranching(); }catch(e){ } },\r\n\t\tbuttonText: 'Click to select a date', yearRange: '-100:+10', changeMonth: true, changeYear: true, dateFormat: 'mm-dd-yy',\r\n\t\thour: currentTime('h'), minute: currentTime('m'), buttonText: 'Click to select a date/time', \r\n\t\tshowOn: 'button', buttonImage: app_path_images+'datetime.png', buttonImageOnly: true, timeFormat: 'hh:mm', constrainInput: false\r\n\t});\r\n\t$('.datetime_dmy').datetimepicker({\r\n\t\tonClose: function(dateText, inst){ $('#'+$(inst).attr('id')).blur(); dataEntryFormValuesChanged=true; try{ calculate();doBranching(); }catch(e){ } },\r\n\t\tbuttonText: 'Click to select a date', yearRange: '-100:+10', changeMonth: true, changeYear: true, dateFormat: 'dd-mm-yy',\r\n\t\thour: currentTime('h'), minute: currentTime('m'), buttonText: 'Click to select a date/time', \r\n\t\tshowOn: 'button', buttonImage: app_path_images+'datetime.png', buttonImageOnly: true, timeFormat: 'hh:mm', constrainInput: false\r\n\t});\r\n\t// Pop-up datetime-picker initialization (w/ seconds)\r\n\t$('.datetime_seconds_ymd').datetimepicker({\r\n\t\tonClose: function(dateText, inst){ $('#'+$(inst).attr('id')).blur(); dataEntryFormValuesChanged=true; try{ calculate();doBranching(); }catch(e){ } },\r\n\t\tbuttonText: 'Click to select a date', yearRange: '-100:+10', changeMonth: true, changeYear: true, dateFormat: 'yy-mm-dd',\r\n\t\thour: currentTime('h'), minute: currentTime('m'), buttonText: 'Click to select a date/time', \r\n\t\tshowOn: 'button', buttonImage: app_path_images+'datetime.png', buttonImageOnly: true, timeFormat: 'hh:mm:ss', constrainInput: false\r\n\t});\r\n\t$('.datetime_seconds_mdy').datetimepicker({\r\n\t\tonClose: function(dateText, inst){ $('#'+$(inst).attr('id')).blur(); dataEntryFormValuesChanged=true; try{ calculate();doBranching(); }catch(e){ } },\r\n\t\tbuttonText: 'Click to select a date', yearRange: '-100:+10', changeMonth: true, changeYear: true, dateFormat: 'mm-dd-yy',\r\n\t\thour: currentTime('h'), minute: currentTime('m'), buttonText: 'Click to select a date/time', \r\n\t\tshowOn: 'button', buttonImage: app_path_images+'datetime.png', buttonImageOnly: true, timeFormat: 'hh:mm:ss', constrainInput: false\r\n\t});\r\n\t$('.datetime_seconds_dmy').datetimepicker({\r\n\t\tonClose: function(dateText, inst){ $('#'+$(inst).attr('id')).blur(); dataEntryFormValuesChanged=true; try{ calculate();doBranching(); }catch(e){ } },\r\n\t\tbuttonText: 'Click to select a date', yearRange: '-100:+10', changeMonth: true, changeYear: true, dateFormat: 'dd-mm-yy',\r\n\t\thour: currentTime('h'), minute: currentTime('m'), buttonText: 'Click to select a date/time', \r\n\t\tshowOn: 'button', buttonImage: app_path_images+'datetime.png', buttonImageOnly: true, timeFormat: 'hh:mm:ss', constrainInput: false\r\n\t});\r\n}", "function apr_dialog_callback(data,type){\n var list = jQuery(\"#dialog-data\");\n console.log('APR:Dialog - changed');\n jQuery(\"#dialog-default\").css(\"height\",\"0px\");\n jQuery(\"#dialog-none\").hide();\n list.html(data);\n}", "function setupUIWidgets() {\n $(\"input[type='radio']\").checkboxradio();\n}", "function initPicker() {\n //so not selected when started\n $(\"select\").prop(\"selectedIndex\", -1);\n\n $(\"select\").imagepicker({\n hide_select : true,\n show_label : true\n })\n }", "function selObjectDialog(){\n $('#dlgokcancel').dialog('option', 'title', _('Объекты'));\n $(\"#dlgokcancel_title\").show().text(_('Выберите из списка'));\n\n // инициализация диалога\n $(\"#dlgokcancel_content\").html('<strong>'+_('Загрузка...')+'</strong>').load('systems_objects_by_type', {id_system: cur_id_system, obj_type: $(\"#dlgoptedit_type_cmb>option:selected\").val()}, function(){\n //alert('async load content');\n $(\"#tbl_systems_objects_by_type\").Scrollable(180, '100%').tablesorter().find(\"thead>tr\").css(\"cursor\",\"pointer\");\n\n if ($(\"#dlgoptedit_obj_id_edt\").val())\n $(\"input:radio\").val([$(\"#dlgoptedit_obj_id_edt\").val()]);\n else\n $(\"input:radio\").val([$(\"input:radio:first\").val()]);\n\n // определение кнопок\n $(\"#dlgokcancel_ok_btn\").unbind('click').click(function()\n {\n //fill_input_filtered_users();\n var sel_object_id=$('input:radio[name=sel_object]:checked').val();\n\n fill_inputs_filtered_object(sel_object_id, 'from_table');\n\n // закрываем\n $(\"#dlgokcancel\").dialog(\"close\");\n //alert('after dlgokcancel.close');\n\n }); //dlgoptedit_save_btn click\n //alert('after filtered_users, bind');\n });\n\n //alert('selUsersDialog2');\n\n // события\n $(\"#dlgokcancel\").unbind('keypress').keypress(function(e){if(e.keyCode==13){$(\"#dlgokcancel_ok_btn\").click();}});\n\n // определение кнопок\n $(\"#dlgokcancel_cancel_btn\").unbind('click').click(function(){$(\"#dlgokcancel\").dialog(\"close\");});\n\n if ($.browser.msie) {\n $( \"#dlgokcancel\" ).unbind( \"dialogclose\").bind( \"dialogclose\", function(event, ui) {\n $('#dlgoptedit_type_cmb').css('visibility', 'visible');\n });\n }\n // запуск диалога\n $(\"#dlgokcancel\").show().dialog(\"open\");\n //обязательно после show dialog\n if ($.browser.msie) {\n $('#dlgoptedit_type_cmb').css('visibility', 'hidden');\n $('#dlgokcancel .full_height').css('height', '250px');\n }\n //$(\"#dlgeoptdit_login_edt\").focus().select();\n\n //alert('selUsersDialog3');\n}", "update(ui) {\n const enable_if = (name, condition) => {\n const element = this.element.querySelector(`.action[data-name=\"${name}\"]`);\n element.disabled = !condition;\n };\n\n enable_if(\"Undo\", ui.history.present !== 0);\n enable_if(\"Redo\", ui.history.present < ui.history.actions.length);\n enable_if(\"Select all\", ui.selection.size < ui.quiver.all_cells().length);\n enable_if(\"Deselect all\", ui.selection.size > 0);\n enable_if(\"Delete\", ui.selection.size > 0);\n enable_if(\"Centre view\", ui.quiver.cells.length > 0 && ui.quiver.cells[0].size > 0);\n enable_if(\"Zoom in\", ui.scale < 1);\n enable_if(\"Zoom out\", ui.scale > -2.5);\n enable_if(\"Reset zoom\", ui.scale !== 0);\n }", "function UI() {\n }", "function updateFreeSelect ( e , ui ) {\n if ( $('.node_frame.ui-selected, node_frame.ui-selecting, .network_frame.ui-selected,.network_ui-selecting, .customShape.ui-selected, .customShape.ui-selecting').length > 0 ) {\n $('#lab-viewport').addClass('freeSelectMode')\n }\n window.freeSelectedNodes = []\n if ( LOCK == 0 && ( ROLE == 'admin' || ROLE == 'editor' )) {\n $.when ( lab_topology.setDraggable($('.node_frame, .network_frame, .customShape'), false) ).done ( function () {\n $.when( lab_topology.clearDragSelection() ).done( function () {\n lab_topology.setDraggable($('.node_frame.ui-selected, node_frame.ui-selecting, .network_frame.ui-selected,.network_ui-selecting, .customShape.ui-selected, .customShape.ui-selecting'),true)\n lab_topology.addToDragSelection($('.node_frame.ui-selected, node_frame.ui-selecting, .network_frame.ui-selected,.network_ui-selecting, .customShape.ui-selected, .customShape.ui-selecting'))\n });\n\n });\n } else {\n $('.customShape.ui-selected, .customShape.ui-selecting').removeClass('ui-selecting').removeClass('ui-selected')\n }\n $('.free-selected').removeClass('free-selected')\n $('.node_frame.ui-selected, node_frame.ui-selecting').addClass('free-selected')\n $('.network_frame.ui-selected, network_frame.ui-selecting').addClass('free-selected')\n $('.customShape.ui-selected, customShape.ui-selecting').addClass('free-selected')\n $('.node_frame.ui-selected, .node_frame.ui-selecting').each(function() {\n window.freeSelectedNodes.push({ name: $(this).data(\"name\") , path: $(this).data(\"path\") , type: 'node' });\n\n });\n}", "function set001_updateUI() {\n\n} // .end of set001_updateUI", "function _migrateDataTojQueryUI110(data){\n\t\tvar withinElement = jQuery(window);\n\t\tdata.within = {\n\t\t\telement: withinElement,\n\t\t\tisWindow: true,\n\t\t\toffset: withinElement.offset() || { left: 0, top: 0 },\n\t\t\tscrollLeft: withinElement.scrollLeft(),\n\t\t\tscrollTop: withinElement.scrollTop(),\n\t\t\twidth: withinElement.width(),\n\t\t\theight: withinElement.height()\n\t\t};\n\t\tdata.collisionPosition = {\n\t\t\tmarginLeft: 0,\n\t\t\tmarginTop: 0\n\t\t};\n\t\treturn data;\n\t}", "function datepickerClose(obj) {\n\t$(obj).css(\"display\", \"none\");\n\t$(obj).prev().focus();\n}", "function fixIESelect() {\n return false;\n }", "function InitializeUI() {\n // Buttons\n $(\"#Rx_jqxButtonAdd\").jqxButton({ width: '80', theme: \"custom\" });\n $(\"#Rx_jqxButtonEdit\").jqxButton({ width: '80', theme: \"custom\" });\n $(\"#Rx_jqxButtonDelete\").jqxButton({ width: '70', theme: \"custom\" });\n $(\"#Rx_jqxButtonCancel\").jqxButton({ width: '70', theme: \"custom\" });\n $(\"#Rx_jqxButtonSave\").jqxButton({ width: '70', theme: \"custom\" });\n\n\n // TextBoxes \n $(\"#Rx_jqxIdTxt\").jqxInput({ width: globalColumnWidth, height: '20px' });\n $(\"#Rx_jqxGenericDrugNameTxt\").jqxInput({ width: globalColumnWidth, height: '20px' });\n $(\"#Rx_jqxBRandDrugNamesTxt\").jqxInput({ width: globalColumnWidth, height: '20px' });\n $(\"#Rx_jqxDescriptionTxt\").jqxInput({ width: globalColumnWidth, height: '20px' }); \n $(\"#Rx_jqxUserForTxt\").jqxInput({ width: globalColumnWidth, height: '20px' });\n $(\"#Rx_jqxSideEffectsTxt\").jqxInput({ width: globalColumnWidth, height: '20px' });\n\n // Dropdown\n $(\"#Rx_jqxDrugTypeDdn\").jqxDropDownList({ source: drugTypeSource, selectedIndex: 1, width: globalColumnWidth, height: '20', theme: \"custom\" });\n $(\"#Rx_jqxIntakeDdn\").jqxDropDownList({ source: intakeSource, selectedIndex: 1, width: globalColumnWidth, height: '20', theme: \"custom\" });\n $(\"#Rx_jqxFormDdn\").jqxDropDownList({ source: formSource, selectedIndex: 1, width: globalColumnWidth, height: '20', theme: \"custom\" });\n $(\"#Rx_jqxColorDdn\").jqxDropDownList({ source: colorSource, selectedIndex: 1, width: globalColumnWidth, height: '20', theme: \"custom\" });\n $(\"#Rx_jqxShapeDdn\").jqxDropDownList({ source: shapeSource, selectedIndex: 1, width: globalColumnWidth, height: '20', theme: \"custom\" });\n\n // Data Adaptor\n BindData2Grid(screenData);\n\n // Grid\n $(\"#Rx_jqxgrid\").jqxGrid(\n {\n theme: \"custom\",\n width: \"100%\",\n height: \"580\",\n source: dataAdapter,\n sortable: true, \n filterable: true,\n pageable: true,\n rowsheight: 50,\n columns: [\n {\n text: '',\n datafield: 'photo',\n cellsrenderer: cellsrenderer,\n width: \"5%\",\n height: \"100\"\n },\n {\n text: 'Rx Id',\n datafield: 'id',\n width: \"8%\",\n renderer: columnsrenderer\n },\n {\n text: 'GENERIC DRUG NAME',\n datafield: 'gnricDrugName',\n width: \"15%\",\n renderer: columnsrenderer\n },\n {\n text: 'BRAND DRUG NAMES',\n datafield: 'tradeName',\n width: \"15%\",\n renderer: columnsrenderer\n },\n {\n text: 'DRUG TYPE',\n datafield: 'drugType',\n width: \"13%\",\n renderer: columnsrenderer\n },\n {\n text: 'DESCRIPTION',\n datafield: 'drugDescr',\n width: \"13%\",\n renderer: columnsrenderer\n },\n {\n text: 'INTAKE',\n datafield: 'inTake',\n width: \"13%\",\n renderer: columnsrenderer\n },\n {\n text: 'FORM',\n datafield: 'form',\n width: \"13%\",\n renderer: columnsrenderer\n },\n {\n text: 'COLOR',\n datafield: 'color',\n width: \"13%\",\n renderer: columnsrenderer\n },\n {\n text: 'SHAPE',\n datafield: 'shape',\n width: \"8%\",\n renderer: columnsrenderer\n },\n {\n text: 'USED FOR',\n datafield: 'usedFor',\n width: \"8%\",\n renderer: columnsrenderer\n }\n ]\n });\n\n // Event Binding\n $(\"#Rx_jqxgrid\").bind('rowselect', function (event) {\n selectedRowIndex = event.args.rowindex;\n \n $(\"#Rx_jqxIdTxt\").val(screenData[selectedRowIndex][\"id\"]);\n $(\"#Rx_jqxGenericDrugNameTxt\").val(screenData[selectedRowIndex][\"gnricDrugName\"]);\n $(\"#Rx_jqxBRandDrugNamesTxt\").val(screenData[selectedRowIndex][\"tradeName\"]);\n $(\"#Rx_jqxDescriptionTxt\").val(screenData[selectedRowIndex][\"drugDescr\"]);\n $(\"#Rx_jqxUserForTxt\").val(screenData[selectedRowIndex][\"usedFor\"]);\n $(\"#Rx_jqxSideEffectsTxt\").val(screenData[selectedRowIndex][\"sideEffects\"]);\n \n $(\"#Rx_jqxDrugTypeDdn\").jqxDropDownList('selectIndex', jQuery.inArray(screenData[selectedRowIndex][\"drugType\"], drugTypeSource));\n $(\"#Rx_jqxIntakeDdn\").jqxDropDownList('selectIndex', jQuery.inArray(screenData[selectedRowIndex][\"inTake\"], intakeSource));\n $(\"#Rx_jqxFormDdn\").jqxDropDownList('selectIndex', jQuery.inArray(screenData[selectedRowIndex][\"form\"], formSource));\n $(\"#Rx_jqxColorDdn\").jqxDropDownList('selectIndex', jQuery.inArray(screenData[selectedRowIndex][\"color\"], colorSource));\n $(\"#Rx_jqxShapeDdn\").jqxDropDownList('selectIndex', jQuery.inArray(screenData[selectedRowIndex][\"shape\"], shapeSource));\n });\n}", "function partOutOfStock() {\n\n console.log(\"in partOutOfStock\");\n var outOfStockMessage = \"<p style='margin: 10px 10px 10px 10px; color:red; font-size:13px; font-weight: bold;'> This Part is out of stock. </p>\";\n $(\"#partsOutOfStock\").html(outOfStockMessage);\n $(\"#partsOutOfStock\").dialog({\n title: 'Warning',\n resizable: true,\n //width: 400,\n modal: true,\n buttons: [\n {\n text: \"Ok\",\n id: \"btnOkOutOfStock\",\n // class: \"btn-primary\",\n //class: \"btn btn-primary btn-large\",\n click: function () {\n $(this).dialog('close');\n AddPart();\n }\n },\n {\n text: \"Cancel\",\n id: \"btnCancelOutOfStock\",\n //class: \"btn-danger\",\n //class: \"btn btn-danger btn-large\",\n click: function () {\n $(this).dialog('close');\n }\n }],\n close: function (event, ui) {\n $(this).dialog('destroy');\n },\n open: function () {\n $(\"#btnOkOutOfStock\").removeAttr(\"class\");\n $(\"#btnOkOutOfStock\").addClass(\"btn btn-primary btn-large\");\n $(\"#btnCancelOutOfStock\").removeAttr(\"class\");\n $(\"#btnCancelOutOfStock\").addClass(\"btn btn-danger btn-large\");\n }\n });\n}", "function resetDeploymentResultUI(){\n console.log('utils.resetDeploymentResultUI() TO BE CODED')\n}", "function deleteArchive() {\n $(\"#delete-dialog\").dialog({\n resizable: false,\n draggable: false,\n height: 200,\n width: 400,\n modal: true,\n buttons: {\n \"Yes\": function () {\n deleteArchiveBackend();\n $(this).siblings(\".ui-dialog-titlebar\").find(\"button\").remove();\n $(this).siblings(\".ui-dialog-buttonpane\").remove();\n $(this).children(\"p\").text(\"Deleting from archive...\");\n $(this).children(\"img\").show();\n },\n \"No\": function () { $(this).dialog(\"close\"); }\n }\n });\n}", "function updateJQuery($) {\n if (!$ || ($ && $.bridget)) {\n return;\n }\n $.bridget = jQueryBridget;\n }", "function showDialog(options) {\n\n // default options \n var myOptions = {\n position: { my: 'center', at: 'center' },\n modal: true,\n width: 'auto',\n height: 'auto',\n show: 'explode',\n hide: 'explode',\n resizable: true,\n draggable: true,\n divID: 'dialog',\n title: 'The following error occured.',\n icon: 'error',\n };\n\n // merge supplied options\n $.extend(true, myOptions, options);\n\n // check if div exits, otherwise add it\n if ($('#' + myOptions.divID).length == 0) {\n jQuery('<div/>', {\n id: myOptions.divID,\n }).appendTo('body');\n }\n\n // add message content\n $('#' + myOptions.divID).html(myOptions.content);\n\n // munge title\n myOptions.title = '<span class=\"glyphicon ' + CD_Library.Icons[myOptions.icon] + '\"></span> &nbsp;' + myOptions.title;\n\n // add buttons (default CLOSE)\n if (!myOptions.buttons) {\n myOptions.dialogClass = 'no-close';\n myOptions.buttons = [{\n text: 'CLOSE',\n click: function () { $(this).dialog('destroy').remove(); },\n title: 'Close Window',\n class: 'btn btn-primary btn-default',\n icon: 'close'\n }];\n }\n\n // add icons for button QTips\n $.each(myOptions.buttons, function (i, obj) {\n obj.create = function () {\n $(this).attr({ 'data-icon': obj.icon });\n };\n });\n\n // clear UI nopad\n $('#' + myOptions.divID).removeClass('nopad');\n\n // show dialog\n $('#' + myOptions.divID).dialog(myOptions);\n\n // apply QTtip \n $('.ui-dialog-titlebar-close').attr({ 'title': 'Close Window', 'data-icon': 'close' });\n $('.ui-dialog button').on('click', function () { QTip(); });\n\n // add tooltips\n QTip();\n\n // focus default button\n $('.ui-dialog .btn-success').focus();\n\n}", "function updateJQuery($) {\n if (!$ || ($ && $.bridget)) {\n return;\n }\n $.bridget = jQueryBridget;\n }", "function drag_toolbar(){\n\t jQuery(\"#button_options\").draggable({\n\t\t//containment: [46, 90, 1281, 750]\n\t\t containment: [46, 90, window.innerWidth-100, window.innerHeight]\n\t });\n\t jQuery(\"#calculatordialog\").draggable({\n\t\t//containment: [50, 95, 1120, 740]\n\t\t containment: [50, 95, window.innerWidth - 250, window.innerHeight]\n\t });\n }", "function mouseup(e) {\r\n fsw_state = 0;\r\n ui_modified = true;\r\n}", "function pandaUILoaded() {\n if (savedSearchUI) { savedSearchUI.pandaUILoaded(); savedSearchUI = null; }\n if (MyOptions) MyOptions.resetToolTips();\n}", "function BPUI() { }", "function unblockUI(el) {\n $(el).unblock();\n}", "function unblockUI(el) {\r\n $(el).unblock();\r\n }", "function unblockUI(el) {\r\n $(el).unblock();\r\n }", "function setDnR(){\n\n try{\n\n $('.DroppedItem').draggable({\n drag: function(event, ui){\n if ((ui.offset.top <= 100) && (ui.offset.left <= 600)){\n $(self).offset.top(100);\n }\n\n },\n scroll : true\n }).resizable();\n \n }catch(E){\n raiseException(E);\n }\n\n\n}", "function handleDrag(event, ui, status) {\n\t\tui = $(ui);\n\t\tvar draggedElem = $(ui[0].helper);\n\n\t\tswitch(status) {\n\t\t\tcase DRAG:\n\t\t\t\tbreak;\n\t\t\tcase DROP:\n\t\t\t\tdraggedElem.css({\n\t\t\t\t\t\"left\" : 0,\n\t\t\t\t\t\"top\" : 0\n\t\t\t\t});\n\t\t\t\tbreak;\n\t\t}\n\t}", "function selUsersDialog(){\n //$(\"#dlgokcancel_title\").text('');\n $(\"#dlgokcancel_title\").show().text(_('Выберите из списка'));\n\n //$.getJSON('systems_view_name', {view_tag: 'users'}, function(json){\n //$('#dlgokcancel').dialog('option', 'title', json.ext_data);\n $('#dlgokcancel').dialog('option', 'title', _('Пользователи'));\n //alert($(\"#dlgokcancel_title\").text());\n //});\n //alert('selUsersDialog1');\n var bi;\n function store_filtered_users(){\n filtered_users = $.map(bi[0].biGetSelected(['id'], 'array'), function (dic){return dic[\"id\"];});\n }\n\n // инициализация диалога\n $(\"#dlgokcancel_content\").html('<strong>'+_('Загрузка...')+'</strong>').load('systems_users', {use_filter: 1, sel_users: sel_users}, function(){\n //alert('async load content');\n bi = $(\"#tbl_systems_users\").Scrollable(380, '100%').tablesorter().find(\"thead>tr\").css(\"cursor\",\"pointer\").end().BoxIt({tdClass: 'hac'});\n\n //alert(filtered_users);\n //checked_rows = [];\n //for (var i in filtered_users){\n // checked_rows.push(filtered_users[i]);\n //}\n //alert('filtered_users='+filtered_users);\n bi[0].BoxItSelectRows(filtered_users);\n\n // скрываем фильтр\n $(\"#tbl_systems_users tfoot\").hide();\n\n // определение кнопок\n $(\"#dlgokcancel_ok_btn\").unbind('click').click(function()\n {\n store_filtered_users();\n fill_input_filtered_users();\n\n // закрываем\n $(\"#dlgokcancel\").dialog(\"close\");\n //alert('after dlgokcancel.close');\n if(filtered_users.length>1) {\n $(\"div.rewrite_rule_check\").show();\n $(\"input#rewrite_rule_box\").removeAttr(\"checked\");\n } else {\n $(\"input#rewrite_rule_box\").removeAttr(\"checked\");\n $(\"div.rewrite_rule_check\").hide();\n }\n\n }); //dlgoptedit_save_btn click\n //alert('after filtered_users, bind');\n });\n\n //alert('selUsersDialog2');\n\n // события\n $(\"#dlgokcancel\").unbind('keypress').keypress(function(e){if(e.keyCode==13){$(\"#dlgokcancel_ok_btn\").click();}});\n\n // определение кнопок\n $(\"#dlgokcancel_cancel_btn\").unbind('click').click(function(){$(\"#dlgokcancel\").dialog(\"close\");});\n\n if ($.browser.msie) {\n $( \"#dlgokcancel\" ).unbind( \"dialogclose\").bind( \"dialogclose\", function(event, ui) {\n $('#dlgoptedit_type_cmb').css('visibility', 'visible');\n });\n }\n\n // запуск диалога\n $(\"#dlgokcancel\").show().dialog(\"open\");\n //обязательно после show dialog\n if ($.browser.msie) {\n $('#dlgoptedit_type_cmb').css('visibility', 'hidden');\n $('#dlgokcancel .full_height').css('height', '446px');\n }\n\n //$(\"#dlgeoptdit_login_edt\").focus().select();\n\n //alert('selUsersDialog3');\n}", "function Datepicker() {\n this._curInst = null; // The current instance in use\n this._keyEvent = false; // If the last event was a key event\n this._disabledInputs = []; // List of date picker inputs that have been disabled\n this._datepickerShowing = false; // True if the popup picker is showing , false if not\n this._inDialog = false; // True if showing within a \"dialog\", false if not\n this._mainDivId = \"ui-datepicker-div\"; // The ID of the main datepicker division\n this._inlineClass = \"ui-datepicker-inline\"; // The name of the inline marker class\n this._appendClass = \"ui-datepicker-append\"; // The name of the append marker class\n this._triggerClass = \"ui-datepicker-trigger\"; // The name of the trigger marker class\n this._dialogClass = \"ui-datepicker-dialog\"; // The name of the dialog marker class\n this._disableClass = \"ui-datepicker-disabled\"; // The name of the disabled covering marker class\n this._unselectableClass = \"ui-datepicker-unselectable\"; // The name of the unselectable cell marker class\n this._currentClass = \"ui-datepicker-current-day\"; // The name of the current day marker class\n this._dayOverClass = \"ui-datepicker-days-cell-over\"; // The name of the day hover marker class\n this.regional = []; // Available regional settings, indexed by language code\n this.regional[ \"\" ] = { // Default regional settings\n closeText: \"Done\", // Display text for close link\n prevText: \"Prev\", // Display text for previous month link\n nextText: \"Next\", // Display text for next month link\n currentText: \"Today\", // Display text for current month link\n monthNames: [ \"January\",\"February\",\"March\",\"April\",\"May\",\"June\",\n \"July\",\"August\",\"September\",\"October\",\"November\",\"December\" ], // Names of months for drop-down and formatting\n monthNamesShort: [ \"Jan\", \"Feb\", \"Mar\", \"Apr\", \"May\", \"Jun\", \"Jul\", \"Aug\", \"Sep\", \"Oct\", \"Nov\", \"Dec\" ], // For formatting\n dayNames: [ \"Sunday\", \"Monday\", \"Tuesday\", \"Wednesday\", \"Thursday\", \"Friday\", \"Saturday\" ], // For formatting\n dayNamesShort: [ \"Sun\", \"Mon\", \"Tue\", \"Wed\", \"Thu\", \"Fri\", \"Sat\" ], // For formatting\n dayNamesMin: [ \"Su\",\"Mo\",\"Tu\",\"We\",\"Th\",\"Fr\",\"Sa\" ], // Column headings for days starting at Sunday\n weekHeader: \"Wk\", // Column header for week of the year\n dateFormat: \"mm/dd/yy\", // See format options on parseDate\n firstDay: 0, // The first day of the week, Sun = 0, Mon = 1, ...\n isRTL: false, // True if right-to-left language, false if left-to-right\n showMonthAfterYear: false, // True if the year select precedes month, false for month then year\n yearSuffix: \"\" // Additional text to append to the year in the month headers\n };\n this._defaults = { // Global defaults for all the date picker instances\n showOn: \"focus\", // \"focus\" for popup on focus,\n // \"button\" for trigger button, or \"both\" for either\n showAnim: \"fadeIn\", // Name of jQuery animation for popup\n showOptions: {}, // Options for enhanced animations\n defaultDate: null, // Used when field is blank: actual date,\n // +/-number for offset from today, null for today\n appendText: \"\", // Display text following the input box, e.g. showing the format\n buttonText: \"...\", // Text for trigger button\n buttonImage: \"\", // URL for trigger button image\n buttonImageOnly: false, // True if the image appears alone, false if it appears on a button\n hideIfNoPrevNext: false, // True to hide next/previous month links\n // if not applicable, false to just disable them\n navigationAsDateFormat: false, // True if date formatting applied to prev/today/next links\n gotoCurrent: false, // True if today link goes back to current selection instead\n changeMonth: false, // True if month can be selected directly, false if only prev/next\n changeYear: false, // True if year can be selected directly, false if only prev/next\n yearRange: \"c-10:c+10\", // Range of years to display in drop-down,\n // either relative to today's year (-nn:+nn), relative to currently displayed year\n // (c-nn:c+nn), absolute (nnnn:nnnn), or a combination of the above (nnnn:-n)\n showOtherMonths: false, // True to show dates in other months, false to leave blank\n selectOtherMonths: false, // True to allow selection of dates in other months, false for unselectable\n showWeek: false, // True to show week of the year, false to not show it\n calculateWeek: this.iso8601Week, // How to calculate the week of the year,\n // takes a Date and returns the number of the week for it\n shortYearCutoff: \"+10\", // Short year values < this are in the current century,\n // > this are in the previous century,\n // string value starting with \"+\" for current year + value\n minDate: null, // The earliest selectable date, or null for no limit\n maxDate: null, // The latest selectable date, or null for no limit\n duration: \"fast\", // Duration of display/closure\n beforeShowDay: null, // Function that takes a date and returns an array with\n // [0] = true if selectable, false if not, [1] = custom CSS class name(s) or \"\",\n // [2] = cell title (optional), e.g. $.datepicker.noWeekends\n beforeShow: null, // Function that takes an input field and\n // returns a set of custom settings for the date picker\n onSelect: null, // Define a callback function when a date is selected\n onChangeMonthYear: null, // Define a callback function when the month or year is changed\n onClose: null, // Define a callback function when the datepicker is closed\n numberOfMonths: 1, // Number of months to show at a time\n showCurrentAtPos: 0, // The position in multipe months at which to show the current month (starting at 0)\n stepMonths: 1, // Number of months to step back/forward\n stepBigMonths: 12, // Number of months to step back/forward for the big links\n altField: \"\", // Selector for an alternate field to store selected dates into\n altFormat: \"\", // The date format to use for the alternate field\n constrainInput: true, // The input is constrained by the current date format\n showButtonPanel: false, // True to show button panel, false to not show it\n autoSize: false, // True to size the input for the date format, false to leave as is\n disabled: false // The initial disabled state\n };\n $.extend( this._defaults, this.regional[ \"\" ] );\n this.regional.en = $.extend( true, {}, this.regional[ \"\" ] );\n this.regional[ \"en-US\" ] = $.extend( true, {}, this.regional.en );\n this.dpDiv = datepicker_bindHover( $( \"<div id='\" + this._mainDivId + \"' class='ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all'></div>\" ) );\n}", "function resetPosition (event) {\n var positionOptions = ['width', 'height', 'minWidth', 'minHeight', 'maxHeight', 'maxWidth', 'position'];\n var windowHeight = $(window).height();\n var adjustedOptions = {};\n var option, optionValue, adjustedValue;\n for (var n = 0; n < positionOptions.length; n++) {\n option = positionOptions[n];\n optionValue = event.data[option];\n if (optionValue) {\n // jQuery UI does not support percentages on heights, convert to pixels.\n if (typeof optionValue === 'string' && /%$/.test(optionValue) && /height/i.test(option)) {\n adjustedValue = parseInt(0.01 * parseInt(optionValue, 10) * windowHeight, 10);\n // Don't force the dialog to be bigger vertically than needed.\n if (option === 'height' && $element.parent().outerHeight() < adjustedValue) {\n adjustedValue = 'auto';\n }\n adjustedOptions[option] = adjustedValue;\n }\n else {\n adjustedOptions[option] = optionValue;\n }\n }\n }\n $element.dialog('option', adjustedOptions);\n }", "function initLayerAnimationDialog() {\n var curAnimHandle = (currentAnimationType == 'customin') ? jQuery('#layer_animation').val() : jQuery('#layer_endanimation').val();\n var curAnimText = (currentAnimationType == 'customin') ? jQuery('#layer_animation option:selected').text() : jQuery('#layer_endanimation option:selected').text();\n var isOriginal = (curAnimHandle.indexOf('custom') > -1) ? false : true;\n var layerEasing = (currentAnimationType == 'customin') ? jQuery('#layer_easing option:selected').val() : jQuery('#layer_endeasing option:selected').val();\n var layerSpeed = (currentAnimationType == 'customin') ? jQuery('#layer_speed').val() : jQuery('#layer_endspeed').val();\n if (layerEasing == 'nothing') layerEasing = jQuery('#layer_easing option:selected').val();\n jQuery('#caption-easing-demo').val(layerEasing);\n if (parseInt(layerSpeed) == 0) layerSpeed = 600;\n jQuery('input[name=\"captionspeed\"]').val(layerSpeed);\n var cic = jQuery('#caption-inout-controll');\n cic.data('direction', 0);\n jQuery('#revshowmetheinanim').addClass(\"reviconinaction\");\n jQuery('#revshowmetheoutanim').removeClass(\"reviconinaction\");\n //set the transition direction to out\n if (currentAnimationType == 'customout') jQuery('#caption-inout-controll').click();\n jQuery(\"#layeranimeditor_wrap\").dialog({\n modal: true,\n resizable: false,\n title: 'Layer Animation Editor',\n minWidth: 700,\n minHeight: 500,\n closeOnEscape: true,\n open: function() {\n jQuery(this).closest(\".ui-dialog\").find(\".ui-button\").each(function(i) {\n var cl;\n if (i == 0) cl = \"revgray\";\n if (i == 1) cl = \"revgreen\";\n if (i == 2) cl = \"revred\";\n if (i == 3) cl = \"revred\";\n jQuery(this).addClass(cl).addClass(\"button-primary\").addClass(\"rev-uibuttons\");\n })\n },\n close: function() {\n setInAnimOfPreview();\n },\n buttons: {\n \"Save/Change\": function() {\n var animObj = createNewAnimObj();\n UniteAdminRev.setErrorMessageID(\"dialog_error_message\");\n jQuery('#current-layer-handle').text(curAnimText);\n jQuery('input[name=\"layeranimation_save_as\"]').val(curAnimText);\n jQuery(\"#dialog-change-layeranimation\").dialog({\n modal: true,\n buttons: {\n 'Save as': function() {\n jQuery(\"#dialog-change-layeranimation-save-as\").dialog({\n modal: true,\n buttons: {\n 'Save as new': function() {\n var id = checkIfAnimExists(jQuery('input[name=\"layeranimation_save_as\"]').val());\n var update = true;\n if (id !== false) {\n update = false;\n if (confirm(\"Animation already exists, overwrite?\")) {\n updateAnimInDb(jQuery('input[name=\"layeranimation_save_as\"]').val(), animObj, id);\n update = true;\n }\n } else {\n updateAnimInDb(jQuery('input[name=\"layeranimation_save_as\"]').val(), animObj, false);\n }\n if (update) {\n jQuery(\"#dialog-change-layeranimation-save-as\").dialog(\"close\");\n jQuery(\"#dialog-change-layeranimation\").dialog(\"close\");\n jQuery(this).dialog(\"close\");\n jQuery(\"#layeranimeditor_wrap\").dialog(\"close\");\n setInAnimOfPreview();\n }\n }\n }\n });\n },\n Save: function() {\n var id = checkIfAnimExists(jQuery('input[name=\"layeranimation_save_as\"]').val());\n if (id !== false) {\n if (confirm(\"Really overwrite animation?\")) {\n updateAnimInDb(jQuery('input[name=\"layeranimation_save_as\"]').val(), animObj, id);\n jQuery(this).dialog(\"close\");\n jQuery(\"#layeranimeditor_wrap\").dialog(\"close\");\n setInAnimOfPreview();\n }\n } else {\n updateAnimInDb(jQuery('input[name=\"layeranimation_save_as\"]').val(), animObj, false);\n jQuery(this).dialog(\"close\");\n jQuery(\"#layeranimeditor_wrap\").dialog(\"close\");\n setInAnimOfPreview();\n }\n }\n }\n });\n },\n \"Cancel\": function() {\n jQuery(this).dialog(\"close\");\n setInAnimOfPreview();\n },\n Delete: function() {\n if (isOriginal) {\n alert(\"Default animations can't be deleted\");\n } else {\n if (confirm('Really delete the animation \"' + curAnimText + '\"?')) {\n deleteAnimInDb(curAnimHandle);\n setInAnimOfPreview();\n jQuery(\"#layeranimeditor_wrap\").dialog(\"close\");\n }\n }\n }\n }\n });\n jQuery(\"#caption-rotationx-slider\").slider({\n range: \"min\",\n min: -980,\n max: 980,\n step: 10,\n slide: function(event, ui) {\n jQuery('input[name=\"rotationx\"]').val(ui.value);\n }\n });\n jQuery(\"#caption-rotationy-slider\").slider({\n range: \"min\",\n min: -980,\n max: 980,\n step: 10,\n slide: function(event, ui) {\n jQuery('input[name=\"rotationy\"]').val(ui.value);\n }\n });\n jQuery(\"#caption-rotationz-slider\").slider({\n range: \"min\",\n min: -980,\n max: 980,\n step: 10,\n slide: function(event, ui) {\n jQuery('input[name=\"rotationz\"]').val(ui.value);\n }\n });\n jQuery(\"#caption-movex-slider\").slider({\n range: \"min\",\n min: -2000,\n max: 2000,\n step: 10,\n slide: function(event, ui) {\n jQuery('input[name=\"movex\"]').val(ui.value);\n }\n });\n jQuery(\"#caption-movey-slider\").slider({\n range: \"min\",\n min: -2000,\n max: 2000,\n step: 10,\n slide: function(event, ui) {\n jQuery('input[name=\"movey\"]').val(ui.value);\n }\n });\n jQuery(\"#caption-movez-slider\").slider({\n range: \"min\",\n min: -2000,\n max: 2000,\n step: 10,\n slide: function(event, ui) {\n jQuery('input[name=\"movez\"]').val(ui.value);\n }\n });\n jQuery(\"#caption-scalex-slider\").slider({\n range: \"min\",\n min: 0,\n max: 800,\n step: 10,\n slide: function(event, ui) {\n jQuery('input[name=\"scalex\"]').val(ui.value);\n }\n });\n jQuery(\"#caption-scaley-slider\").slider({\n range: \"min\",\n min: 0,\n max: 800,\n step: 10,\n slide: function(event, ui) {\n jQuery('input[name=\"scaley\"]').val(ui.value);\n }\n });\n jQuery(\"#caption-skewx-slider\").slider({\n range: \"min\",\n min: -180,\n max: 180,\n step: 1,\n slide: function(event, ui) {\n jQuery('input[name=\"skewx\"]').val(ui.value);\n }\n });\n jQuery(\"#caption-skewy-slider\").slider({\n range: \"min\",\n min: -180,\n max: 180,\n step: 1,\n slide: function(event, ui) {\n jQuery('input[name=\"skewy\"]').val(ui.value);\n }\n });\n jQuery(\"#caption-opacity-slider\").slider({\n range: \"min\",\n min: -0,\n max: 100,\n step: 1,\n slide: function(event, ui) {\n jQuery('input[name=\"captionopacity\"]').val(ui.value);\n }\n });\n jQuery(\"#caption-perspective-slider\").slider({\n range: \"min\",\n min: -3000,\n max: 3000,\n step: 1,\n slide: function(event, ui) {\n jQuery('input[name=\"captionperspective\"]').val(ui.value);\n }\n });\n jQuery(\"#caption-originx-slider\").slider({\n range: \"min\",\n min: -200,\n max: 200,\n step: 10,\n slide: function(event, ui) {\n jQuery('input[name=\"originx\"]').val(ui.value);\n }\n });\n jQuery(\"#caption-originy-slider\").slider({\n range: \"min\",\n min: -200,\n max: 200,\n step: 10,\n slide: function(event, ui) {\n jQuery('input[name=\"originy\"]').val(ui.value);\n }\n });\n }", "function initInteractions(){\n $('.inner', '#imageSelections').sortable({handle:'.icon-move',items: '.item', cursor: 'move', containment: 'parent', opacity: .65, tolerance: 'pointer'});\n }", "_onWheelWhileResizing(evt) {\n evt.preventDefault();\n evt.stopPropagation();\n }", "function makeDialog(who, whoName, btns, left){\r\n $(who).dialog({\r\n \"autoOpen\": true,\r\n \"title\": whoName,\r\n \"buttons\": btns,\r\n\t\t\"modal\": true,\r\n\t\t\"position\": [left],\r\n \"minHeight\": 300,\r\n \"width\": 540,\r\n \"resizable\": true,\r\n \"open\": function (event, ui) {\r\n $('.ui-widget-overlay').css({'opacity':'0.2'});\r\n }\r\n });\r\n\t//dialog的X事件\r\n\t$('.ui-icon-closethick').click(function () {\r\n fn_ClearDialogData();\r\n\t});\r\n}", "function revslider_showDoubleJqueryError(e) { var t = \"Revolution Slider Error: You have some jquery.js library include that comes after the revolution files js include.\";\n t += \"<br> This includes make eliminates the revolution slider libraries, and make it not work.\";\n t += \"<br><br> To fix it you can:<br>&nbsp;&nbsp;&nbsp; 1. In the Slider Settings -> Troubleshooting set option: <strong><b>Put JS Includes To Body</b></strong> option to true.\";\n t += \"<br>&nbsp;&nbsp;&nbsp; 2. Find the double jquery.js include and remove it.\";\n t = \"<span style='font-size:16px;color:#BC0C06;'>\" + t + \"</span>\";\n jQuery(e).show().html(t) }", "function searchUILoaded() { if (MyOptions) MyOptions.resetToolTips(); }", "function createOnClickListenerRemove() {\n$(\".ui-icon-close\").click(function(){\n $(this).parent().remove();\n \n console.log($(this).parent());\n \n console.log(elementsToSort);\n\n var selector = $($(this).parent()).text();\n var idx = elementsToSort.indexOf(lookUpFilter[selector]);\n \n if (idx > -1){\n elementsToSort.splice(idx, 1);}\n \n \n var idxo = order.indexOf(selector);\n \n if (idxo > -1){\n order.splice(idxo, 1);}\n \n sortShowindData(elementsToSort,order);\n});\n}", "cancel() {\n $('#snmpDialog').jqxWindow('hide');\n }", "function ugCheckForMinJQueryVersion(){\n\t\t\n\t\tvar isMinJQuery = g_ugFunctions.checkMinJqueryVersion(\"1.8.0\");\n\t\t\n\t\tif(isMinJQuery == false)\n\t\t\tthrow new Error(\"The gallery can run from jquery 1.8 You have jQuery \"+jQuery.fn.jquery+\" Please update your jQuery library.\");\n\t}", "function update(event, ui) {\n var formsetPrefix = $(event.target.lastElementChild).attr('data-formset-prefix');\n var formset = $('.formset[data-formset-prefix=\"' + formsetPrefix + '\"]');\n updateFormset(formset);\n}", "function datePickerInit() {\n var cb = function(start, end, label) {\n console.log(start.toISOString(), end.toISOString(), label);\n $('#reportrange span').html(start.format('MMMM D, YYYY') + ' - ' + end.format('MMMM D, YYYY'));\n //alert(\"Callback has fired: [\" + start.format('MMMM D, YYYY') + \" to \" + end.format('MMMM D, YYYY') + \", label = \" + label + \"]\");\n };\n\n var optionSet1 = {\n startDate: moment().subtract(29, 'days'),\n endDate: moment(),\n minDate: '01/01/2012',\n maxDate: '12/31/2015',\n dateLimit: {\n days: 60\n },\n showDropdowns: true,\n showWeekNumbers: true,\n timePicker: false,\n timePickerIncrement: 1,\n timePicker12Hour: true,\n ranges: {\n 'Today': [moment(), moment()],\n 'Yesterday': [moment().subtract(1, 'days'), moment().subtract(1, 'days')],\n 'Last 7 Days': [moment().subtract(6, 'days'), moment()],\n 'Last 30 Days': [moment().subtract(29, 'days'), moment()],\n 'This Month': [moment().startOf('month'), moment().endOf('month')],\n 'Last Month': [moment().subtract(1, 'month').startOf('month'), moment().subtract(1, 'month').endOf('month')]\n },\n opens: 'left',\n buttonClasses: ['btn btn-default'],\n applyClass: 'btn-small btn-primary',\n cancelClass: 'btn-small',\n format: 'MM/DD/YYYY',\n separator: ' to ',\n locale: {\n applyLabel: 'Submit',\n cancelLabel: 'Clear',\n fromLabel: 'From',\n toLabel: 'To',\n customRangeLabel: 'Custom',\n daysOfWeek: ['Su', 'Mo', 'Tu', 'We', 'Th', 'Fr', 'Sa'],\n monthNames: ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'],\n firstDay: 1\n }\n };\n $('#reportrange span').html(moment().subtract(29, 'days').format('MMMM D, YYYY') + ' - ' + moment().format('MMMM D, YYYY'));\n $('#reportrange').daterangepicker(optionSet1, cb);\n $('#reportrange').on('show.daterangepicker', function() {\n console.log(\"show event fired\");\n });\n $('#reportrange').on('hide.daterangepicker', function() {\n console.log(\"hide event fired\");\n });\n $('#reportrange').on('apply.daterangepicker', function(ev, picker) {\n console.log(\"apply event fired, start/end dates are \" + picker.startDate.format('MMMM D, YYYY') + \" to \" + picker.endDate.format('MMMM D, YYYY'));\n });\n $('#reportrange').on('cancel.daterangepicker', function(ev, picker) {\n console.log(\"cancel event fired\");\n });\n $('#options1').click(function() {\n $('#reportrange').data('daterangepicker').setOptions(optionSet1, cb);\n });\n $('#options2').click(function() {\n $('#reportrange').data('daterangepicker').setOptions(optionSet2, cb);\n });\n $('#destroy').click(function() {\n $('#reportrange').data('daterangepicker').remove();\n });\n}" ]
[ "0.6307034", "0.55371004", "0.5473524", "0.54328907", "0.5421005", "0.5413723", "0.5277024", "0.5276856", "0.52655715", "0.5233915", "0.52104104", "0.52104104", "0.5195492", "0.5126642", "0.5119821", "0.511224", "0.5094471", "0.50847304", "0.50847304", "0.5067438", "0.5060098", "0.5044331", "0.50432134", "0.50388116", "0.50388116", "0.50199413", "0.50199413", "0.50199413", "0.50135237", "0.5013218", "0.49980488", "0.49862698", "0.49624348", "0.49624348", "0.49624348", "0.49595627", "0.49485275", "0.49480924", "0.49473056", "0.4940886", "0.4940886", "0.49377003", "0.49344486", "0.49254188", "0.4924381", "0.49210697", "0.49192438", "0.49155846", "0.4906408", "0.4897597", "0.48957238", "0.488846", "0.48846844", "0.48836094", "0.4879376", "0.48738354", "0.48715326", "0.48691764", "0.48577282", "0.48560712", "0.48428327", "0.48350054", "0.4829192", "0.48284936", "0.48192966", "0.48165706", "0.47930583", "0.47928444", "0.47825333", "0.47776943", "0.47745094", "0.47742823", "0.47627681", "0.47625452", "0.47606012", "0.47481757", "0.47470802", "0.47443834", "0.47417456", "0.47417456", "0.47396252", "0.47216752", "0.4717068", "0.47113615", "0.47089952", "0.46968848", "0.4696835", "0.46966276", "0.46960533", "0.46957475", "0.46953565", "0.4695138", "0.4694363", "0.4692899", "0.46848163", "0.4684806" ]
0.53458726
10
obtener el total de segundos de los videos tipo Flexbox Video Tip: convertir a un array de objetos Tip2: split
function getVideos(str, tipo){ return str .replace('<ul>','') .replace('</ul>','') .replace('</l','asd') .split('<li') .map( video =>( { duracion: video.split('"')[1], tipo: video.split('>')[1] } )); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function obtenerSegundos(frame){\r\n return frame/fpsVideo;\r\n}", "function getVideos(str) {\n return str\n .replace('<ul>','')\n .replace('</ul>','')\n .split('</li>')\n .slice(0,-1)\n .map(video => (\n {\n min: parseInt(video\n .split('\"')[1]\n .split(':')[0]),\n seg: parseInt(video\n .split('\"')[1]\n .split(':')[1]),\n tipo: video.split('>')[1]\n }\n ))\n ;\n}", "function caricarecent(vid){\n var i;\n for(i=0;i<recommender_size;i++){\n key=(localStorage.getItem(\"counter\")-i-1+recommender_size)%recommender_size;\n var video=localStorage.getItem(key);\n if (video==null)\n return i; //dimensione di out\n vid.push(video); //returna null se l'eselmento non esiste\n //out.push(video);\n }\n return recommender_size;\n }", "function getVideoDurationPerJobs(getVideoDurationServiceUrl, videoLength) {\n $.get(getVideoDurationServiceUrl, {'videoLength' : videoLength}, function(data) {\n videoDurationPerJob = new Array();\n obj = jQuery.parseJSON(data);\n $.each(obj, function(index, value) {\n videoDurationPerJob[index] = parseInt(value);\n });\n });\n}", "function getVideoParams(input,mk2) {\n let paramsArr\n if(mk2){\n paramsArr = input.split('-')\n }else {\n paramsArr = input.split(\"TI:\")[1].split(\"-\");\n }\n \n paramsArr[0] = paramsArr[0].trim();\n paramsArr[1] = paramsArr[1].trim();\n let StartTimeStrArr = [];\n let startMinute;\n let startHour;\n let startSecond;\n let startTimeNum = 0;\n let end = {};\n let needChangeDuration = true;\n let duration;\n\n let params = {};\n\n if (paramsArr[0].includes(\".\")) {\n const startTimeArr = paramsArr[0].split(\".\");\n const endTimeArr = paramsArr[1].split(\".\");\n\n if (startTimeArr.length == 2) {\n StartTimeStrArr.push(\"00\");\n StartTimeStrArr.push(\n startTimeArr[0].length < 2\n ? \"0\" + startTimeArr[0]\n : startTimeArr[0]\n );\n StartTimeStrArr.push(\n startTimeArr[1].length < 2\n ? \"0\" + startTimeArr[1]\n : startTimeArr[1]\n );\n\n startHour = 0;\n startMinute = parseInt(startTimeArr[0]) * 60;\n startSecond = parseInt(startTimeArr[1]);\n }\n if (endTimeArr.length == 2) {\n end.hour = 0;\n end.minute = parseInt(endTimeArr[0]) * 60;\n end.second = parseInt(endTimeArr[1]);\n } else if (endTimeArr.length === 1) {\n needChangeDuration = false;\n duration = parseInt(endTimeArr[0]);\n }\n\n //加一,减一,是为了避免剪切视频不精准或者数据不精准,导致该剪进去的没剪进去\n // end.time = end.hour + end.minute+end.second + 1\n // startTimeNum = startHour + startMinute + startSecond -1\n\n end.time = end.hour + end.minute + end.second;\n startTimeNum = startHour + startMinute + startSecond;\n\n let startTime = StartTimeStrArr.join(\":\");\n needChangeDuration && (duration = end.time - startTimeNum);\n if (duration < 0) {\n console.log(\"error: duration is negative\");\n }\n\n params.duration = duration;\n params.start = startTime;\n // console.log(params)\n \n }else if(paramsArr[0].includes(':')){\n\n let startTime = paramsArr[0]\n let endTime = paramsArr[1]\n\n let startTimeSplitByColon = startTime.split(':')\n let endTimeSplitByColon = endTime.split(':')\n let startNum = parseInt(startTimeSplitByColon[0])*3600 + parseInt(startTimeSplitByColon[1])*60 + parseInt(startTimeSplitByColon[2])\n let endNum = parseInt(endTimeSplitByColon[0])*3600 + parseInt(endTimeSplitByColon[1])*60 + parseInt(endTimeSplitByColon[2])\n let duration = endNum - startNum\n if(!paramsArr[1].includes('.')){\n duration = paramsArr[1]\n }\n \n\n params.duration = duration;\n params.start = startTime;\n // console.log(paramsArr[1].includes('.'))\n }\n // console.log(params)\n return params;\n}", "function videoProperties() {\n // r = video1.width/video1.height;\n w = video1.width;\n h = video1.height;\n // console.log(w,h);\n}", "function getTitleNDuration(videoSelector,duration){\r\n let titleElementsArr=document.querySelectorAll(videoSelector);\r\n let durationElementArr=document.querySelectorAll(duration);\r\n let titleDurArr=[];\r\n for(let i=0;i<durationElementArr.length;i++){\r\n let title=titleElementsArr[i].innerText.trim();\r\n let duration=durationElementArr[i].innerText.trim();\r\n titleDurArr.push({title,duration})\r\n }\r\n return titleDurArr;\r\n}", "function arrVideo(name, emotions, times) {\n this.name = name;\n this.emotions = emotions;\n this.times = times;\n}", "function arrVideo(name, emotions, times) {\n this.name = name;\n this.emotions = emotions;\n this.times = times;\n}", "debug_multi()\n {\n let pos = 0;\n for (let video in this._videoDivs)\n {\n if (pos != 0)\n {\n this.assignToSecondary(Number(video));\n }\n pos++;\n }\n }", "function getVideos() {\n let videoArray = [];\n for (let mediaIndexer = 0; mediaIndexer < 3; mediaIndexer += 1) {\n //screenShot[0] === thumbnail\n //screenShot[1] === videoUrl\n const screenShot = {\n thumbnail: `'https://steam-content-videos.s3-us-west-2.amazonaws.com/steam_screenshot${mediaIndexer}.png'`,\n videoUrl: `'https://steam-content-videos.s3-us-west-2.amazonaws.com/steam_content_video${mediaIndexer}.mp4'`\n }\n\n videoArray.push(screenShot)\n }\n return JSON.stringify(videoArray);\n}", "getNumberOfVideos() { //method to get total number of videos displayed on home page\n return this.videos.length;\n }", "function changeDurationMovies(arr){\nvar horasIndex = arr.indexOf(\"h\");\n\nvar horas = 0;\nif (horasIndex >= 0){\n horas = parseInt(arr.slice(0,horasIndex));\n}\nvar minutos = 0\nif (arr.includes(\"min\"))\n{\n minutos = parseInt(arr.split(\" \").pop());\n}\n\nreturn horas * 60 + minutos;\n}", "function feedPlayer(videoArrays, videoSrcData, video, mediaSource, visibleTopLimit = 7){\n\n\tconst containerPn = document.getElementsByClassName('pn')[0];\n\tconst references = document.getElementsByClassName('info-display-references')[0];\n\n\t//when mediaSource is ready to recieve files/video segments\n\tmediaSource.addEventListener('sourceopen', function(){\n\n\t\t//Add files/video segments codec and allow playback order indep. of file's timestamp\n\t const sourceBuffer = mediaSource.addSourceBuffer(videoSrcData.mimeCodec);\n\t sourceBuffer.mode = 'sequence';\n\n\t //Check total files size and alert developers\n\t let totalMBytes = 0;\n\n\t for(let i = 0; i < videoArrays.length; i++){\n\t \ttotalMBytes += videoArrays[i].files.reduce( (running, video) => running + video.buffer.byteLength, 0);\n\t }\n\t\t \n\t\ttotalMBytes = Number((totalMBytes / (1024 * 1024)).toFixed(2)); //size in MB\n\n\t\tif(totalMBytes * 2 > videoSrcData.bufferQuota.size){\n\t\t\tconsole.error(`Files total size (${totalMBytes} MB) will exceed the buffer size \"Pn=n!\" needs to work properly (${Math.round(totalMBytes * 2)} MB). ${videoSrcData.bufferQuota.browser}'s buffer quota is ${videoSrcData.bufferQuota.size}MB. Reduce file sizes or append files in smaller batches (and change the appendBuffer logic!!!)`);\n\t\t}else{\n\t\t\t//simulate Flash buffer empty before loading new squence\n\t\t\tconst updateDisplay = updateDisplayInfo();\n\t\t\tupdateDisplay.buffer('empty');\n\t\t\t\n\t\t\tconst track = video.addTextTrack(\"metadata\");\n\t\t\tnextSequence(videoSrcData, videoArrays, video, sourceBuffer, null, track);\t\t\t\t\t\n\t\t\tcueListener(track, video, sourceBuffer, sequenceData);\n }\n\n \t \tconst sequenceLimitCSS = Number(window.getComputedStyle(document.querySelector('body'),'::before').getPropertyValue('content').replace(/\\\"/g, ''));\n\t\tsequenceData.visible = (sequenceLimitCSS > 0 && sequenceLimitCSS < visibleTopLimit) ? sequenceLimitCSS : visibleTopLimit;\n\n\t containerPn.insertBefore(video, references);\n\n\t});\n\n}", "@computed \n get partitionToArray() {\n const numOfRoom = String(this.numOfRoom);\n const numOfLivingroom = String(this.numOfLivingroom);\n const numOfBathroom = String(this.numOfBathroom);\n return [numOfRoom,numOfLivingroom, numOfBathroom];\n }", "function rellenarArray(Arr){\n var line4 = [];\n a = 0;\n var j = 0;\n count = 0;\n media = 0;\n for (var prop_name in Arr) {\n a = parseFloat(prop_name); \n line4.push([a, Arr[prop_name]]) \n if (j==0){\n inicio = a;\n maximo = parseFloat(Arr[prop_name]);\n minimo = parseFloat(Arr[prop_name]);\n j = 1; \n }\n if (parseFloat(Arr[prop_name]) > maximo){maximo = parseFloat(Arr[prop_name])}\n if (parseFloat(Arr[prop_name]) < minimo){minimo = parseFloat(Arr[prop_name])}\n media += parseFloat(Arr[prop_name]);\n count += 1;\n };\n finGra = a;\n media = media/count;\n return line4;\n}", "function turnHoursToMinutes(arr) {\n let newArray = 0\n let duration = arr.map(movies => movies.duration)\n let pelisPorMinutos = []\n for (let i = 0; i < duration.length; i++) {\n let hours = duration[i].split(\" \");\n if (hours[0].indexOf('h') === -1) {\n hours[0] = '0h'\n }\n let hour = (hours[0]) ? parseInt(hours[0]) : 0; // if ternario\n let minutes = (hours[1]) ? parseInt(hours[1]) : 0;\n let totalMinutes = (hour * 60) + minutes;\n pelisPorMinutos.push(totalMinutes)\n };\n for (i = 0; i < arr.length; i++) {\n arr[i].duration = null\n }\n for (j = 0; j < pelisPorMinutos.length; j++) {\n arr[j].duration += pelisPorMinutos[j]\n\n }\n return newArray = arr\n\n}", "function consoleFn() {\n let arr = document.querySelectorAll(\"#stats.style-scope .ytd-playlist-sidebar-primary-info-renderer\");\n let newArr = [];\n newArr.push(arr[0].innerText); //no. of videos\n newArr.push(arr[1].innerText); //no. of views\n return newArr;\n}", "tracksForPlaylist(genres , duration){\n let tracks = this.getTracksMatchingGenres(genres);\n let res = [];\n for(let i=0;this.sumarTiempoDeTracks(res)<duration && i<tracks.length;i++){ \n res[i]=tracks[i];\n }\n return res;\n}", "function trk_get_video_st() {\n var video_st = [];\n var cnt = yt_players.length;\n var active = false;\n for (var i = 0; i < cnt; i += 1) {\n\tvar player = yt_players[i];\n\tvar st = player.getPlayerState();\n\tif (st == YT.PlayerState.PLAYING) {\n\t active = true;\n\t}\n\tvideo_st.push(yt_ids[i]);\n\tvideo_st.push(st);\n\tvideo_st.push(Math.floor(player.getCurrentTime()));\n\tvideo_st.push(Math.floor(player.getDuration()));\n }\n return [active, video_st];\n}", "function howManyMovies(arr) {\n var spielbergMovies = [];\n \n}", "function divideInArray(elenco){\n return parola=elenco.split(\" \");\n}", "getVideoBps() {\n return parseInt(this._videoBpsInput.value);\n }", "getAllVideoURLs() {\n return this.completeRecordings.map((recording) => {\n //gerando um arquivo blbo de cada gravação\n const superBuffer = new Blob(recording, { type: this.videoType });\n //gerando a url de download\n return window.URL.createObjectURL(superBuffer);\n });\n }", "function media(a) {\r\n // scrivete il vostro codice qui\r\n let s = 0, c = 0, m = 0;\r\n for (var i in a) {\r\n s += a[i];\r\n c++;\r\n }\r\n m = s / c;\r\n return m;\r\n}", "function inmueble_videoInmuebleCampos(posit, datos_json) {\n\tvar contenedorDatos = $(\"#contenedorInmuebleVideos\");\n\tcontenedorDatos.html(\"\");\n\t\n\tinmueble_positions = Array();\n\tinmueble_pos_comp = -1;\n\t\t\t\n\tfor (var x = 0; x < datos_json.length; x++) {\n\t\tdivImagen = document.createElement(\"div\");\n\t\tdivImagen.className = \"thumbImg\";\n\t\t\n\t\tdivImagen.innerHTML =\n\t\t\t\"<table>\"+\n\t\t\t\t\"<tr>\"+\n\t\t\t\t\t\"<td style='text-align:left;'><a href='\"+datos_json[x].campo2+\"' target='_blank'>\"+datos_json[x].campo2+\"</a></td>\"+\n\t\t\t\t\t\"<td width='15'>\"+\n\t\t\t\t\t\t(isBorrarTuplas ? (\"<img src='images/btnCerrar.png' width='12' style='cursor:pointer; position:relative;' onclick='bool_borrar = true; inmueble_abrirModificarVideos(\"+posit+\", \"+datos_json[x].campo1+\");' />\") : \"\")+\n\t\t\t\t\t\"</td>\"+\n\t\t\t\t\"</tr>\"+\n\t\t\t\"</table>\";\n\t\t\t\n\t\tcontenedorDatos.append(divImagen);\n\t\tinmueble_positions.push(Array(datos_json[x].campo1, datos_json[x].campo2));\n\t}\n}", "function inmueble_videoInmuebleCampos(posit, datos_json) {\n\tvar contenedorDatos = $(\"#contenedorInmuebleVideos\");\n\tcontenedorDatos.html(\"\");\n\t\n\tinmueble_positions = Array();\n\tinmueble_pos_comp = -1;\n\t\t\t\n\tfor (var x = 0; x < datos_json.length; x++) {\n\t\tdivImagen = document.createElement(\"div\");\n\t\tdivImagen.className = \"thumbImg\";\n\t\t\n\t\tdivImagen.innerHTML =\n\t\t\t\"<table>\"+\n\t\t\t\t\"<tr>\"+\n\t\t\t\t\t\"<td style='text-align:left;'><a href='\"+datos_json[x].campo2+\"' target='_blank'>\"+datos_json[x].campo2+\"</a></td>\"+\n\t\t\t\t\t\"<td width='15'>\"+\n\t\t\t\t\t\t(isBorrarTuplas ? (\"<img src='images/btnCerrar.png' width='12' style='cursor:pointer; position:relative;' onclick='bool_borrar = true; inmueble_abrirModificarVideos(\"+posit+\", \"+datos_json[x].campo1+\");' />\") : \"\")+\n\t\t\t\t\t\"</td>\"+\n\t\t\t\t\"</tr>\"+\n\t\t\t\"</table>\";\n\t\t\t\n\t\tcontenedorDatos.append(divImagen);\n\t\tinmueble_positions.push(Array(datos_json[x].campo1, datos_json[x].campo2));\n\t}\n}", "function paginatedVideos(data) {\n var monthNames = [ \"January\", \"February\", \"March\", \"April\", \"May\", \"June\",\n \"July\", \"August\", \"September\", \"October\", \"November\", \"December\" ];\n var contentAV = '<div class=\"related-audio-video\">';\n\n var current_url = $.param.fragment();\n\n $.each(data.media, function(rInd, rElm) {\n contentAV += '<div class=\"shanti-thumbnail video col-lg-2 col-md-3 col-sm-4 col-xs-12\">';\n contentAV += '<div class=\"shanti-thumbnail-image shanti-field-video\">';\n contentAV += '<a href=\"#' + current_url + '&nid=' + rElm.nid + '\" class=\"shanti-thumbnail-link\">';\n contentAV += '<span class=\"overlay\">';\n contentAV += '<span class=\"icon\"></span>';\n contentAV += '</span>';\n contentAV += '<img src=\"' + rElm.thumbnail + '/width/360/height/270/type/2/bgcolor/000000' + '\" alt=\"Video\" typeof=\"foaf:Image\" class=\"k-no-rotate\">';\n contentAV += '<i class=\"shanticon-video thumbtype\"></i>';\n contentAV += '</a>';\n contentAV += '</div>';\n contentAV += '<div class=\"shanti-thumbnail-info\">';\n contentAV += '<div class=\"body-wrap\">';\n contentAV += '<div class=\"shanti-thumbnail-field shanti-field-created\">';\n contentAV += '<span class=\"shanti-field-content\">';\n var date = new Date(parseInt(rElm.created) * 1000);\n contentAV += date.getDate() + ' ' + monthNames[date.getMonth()] + ' ' + date.getFullYear();\n contentAV += '</span>';\n contentAV += '<div class=\"shanti-thumbnail-field shanti-field-title\">';\n contentAV += '<span class=\"field-content\">';\n contentAV += '<a href=\"#' + current_url + '&nid=' + rElm.nid + '\" class=\"shanti-thumbnail-link\">';\n contentAV += rElm.title;\n contentAV += '</a>';\n contentAV += '</span>';\n contentAV += '</div>';\n contentAV += '<div class=\"shanti-thumbnail-field shanti-field-duration\">';\n contentAV += '<span class=\"field-content\">' + rElm.duration.formatted + '</span>';\n contentAV += '</div>';\n contentAV += '</div>';\n contentAV += '</div>';\n contentAV += '<div class=\"footer-wrap\">';\n contentAV += '</div>';\n contentAV += '</div>';\n contentAV += '</div>';\n });\n\n contentAV += '</div>';\n\n $(\"#tab-audio-video .related-audio-video\").empty().html(contentAV);\n}", "getSegments() {\n return this.version\n .match(/[0-9]+|[a-z]+/gi)\n .map((s) => (/^\\d+$/.test(s) ? Number(s) : s));\n }", "render(){\n\n //hardcoded array \n let vidArray=[];\n\n //hardcoded data\n vidArray.push( new vid(\"TEX @ TOR Gm5: Blue Jays take lead in wild 7th inning\",\"Oct 14, 2015\", \"10/14/15: Jose Bautista crushes a long go-ahead three-run homer in the 7th inning of ALDS Game 5\",\n \"MLB\",\"1.1M views\", [\"wow\",\"ye-haw\"], \"./Assets/Images/920x920.jpg\"));\n vidArray.push(new vid(\"Jose Bautista hammers go-ahead three-run shot in ALDS Game 5, delivers epic bat flip\",\"Oct 14, 2015\", \"10/14/15: Jose Bautista crushes a long go-ahead three-run homer in the 7th inning of ALDS Game 5\",\n \"MLB\",\"2,304,189 views\",[\"wow\",\"ye-haw\"],\"./Assets/Images/maxresdefault.jpg\"));\n vidArray.push(new vid(\"TEX @ TOR Gm5: Blue Jays take lead in wild 7th inning\", \"Oct 14, 2015\",\"10/14/15: Jose Bautista crushes a long go-ahead three-run homer in the 7th inning of ALDS Game 5\",\n \"MLB\",\"1.1M views\",[\"wow\",\"ye-haw\"],\"./Assets/Images/american-league-wild-card-game---minnesota-twins-v-new-york-yankees-8119099224ebf5b5.jpg\"));\n vidArray.push(new vid(\"TEX @ TOR Gm5: Blue Jays take lead in wild 7th inning\", \"Oct 14, 2015\",\"10/14/15: Jose Bautista crushes a long go-ahead three-run homer in the 7th inning of ALDS Game 5\",\n \"MLB\",\"1.1M views\",[\"wow\",\"ye-haw\"],\"./Assets/Images/BASEBALL-MLB-HOU-LAD-.jpg\"));\n vidArray.push(new vid(\"TEX @ TOR Gm5: Blue Jays take lead in wild 7th inning\", \"Oct 14, 2015\",\"10/14/15: Jose Bautista crushes a long go-ahead three-run homer in the 7th inning of ALDS Game 5\",\n \"MLB\",\"1.1M views\",[\"wow\",\"ye-haw\"],\"./Assets/Images/Big-Read-Vladimir-Guerrero-Jr-Swings-470x264.jpg\"));\n vidArray.push(new vid(\"TEX @ TOR Gm5: Blue Jays take lead in wild 7th inning\", \"Oct 14, 2015\",\"10/14/15: Jose Bautista crushes a long go-ahead three-run homer in the 7th inning of ALDS Game 5\",\n \"MLB\",\"1.1M views\", [\"wow\",\"ye-haw\"] ,\"./Assets/Images/donaldson.jpg\"));\n vidArray.push(new vid(\"TEX @ TOR Gm5: Blue Jays take lead in wild 7th inning\", \"Oct 14, 2015\",\"10/14/15: Jose Bautista crushes a long go-ahead three-run homer in the 7th inning of ALDS Game 5\",\n \"MLB\",\"1.1M views\", [\"wow\",\"ye-haw\"] ,\"./Assets/Images/hqdefault.jpg\"));\n vidArray.push(new vid(\"TEX @ TOR Gm5: Blue Jays take lead in wild 7th inning\", \"Oct 14, 2015\",\"10/14/15: Jose Bautista crushes a long go-ahead three-run homer in the 7th inning of ALDS Game 5\",\n \"MLB\",\"1.1M views\", [\"wow\",\"ye-haw\"] ,\"./Assets/Images/maxresdefault.jpg\"));\n vidArray.push(new vid(\"TEX @ TOR Gm5: Blue Jays take lead in wild 7th inning\", \"Oct 14, 2015\",\"10/14/15: Jose Bautista crushes a long go-ahead three-run homer in the 7th inning of ALDS Game 5\",\n \"MLB\",\"1.1M views\", [\"wow\",\"ye-haw\"] ,\"./Assets/Images/PR6AGOQ7XREI5B7UMKM3KAGWFA.jpg\"));\n vidArray.push(new vid(\"TEX @ TOR Gm5: Blue Jays take lead in wild 7th inning\", \"Oct 14, 2015\",\"10/14/15: Jose Bautista crushes a long go-ahead three-run homer in the 7th inning of ALDS Game 5\",\n \"MLB\",\"1.1M views\", [\"wow\",\"ye-haw\"] ,\"./Assets/Images/r241851_600x400_3-2.jpg\"));\n vidArray.push(new vid(\"TEX @ TOR Gm5: Blue Jays take lead in wild 7th inning\", \"Oct 14, 2015\",\"10/14/15: Jose Bautista crushes a long go-ahead three-run homer in the 7th inning of ALDS Game 5\",\n \"MLB\",\"1.1M views\", [\"wow\",\"ye-haw\"] ,\"./Assets/Images/THKMOYWFLWJCPXQ.20170430201114.jpg\"));\n\n \n //index of current video\n let currentVid = 1;\n let current = vidArray.splice(currentVid,1);\n//\n return(\n <div className=\"video-container margin\">\n <Video current={current[0]}></Video>\n <VidList vidArray={vidArray}></VidList>\n </div>\n );\n\n }", "function howManyMovies(array) {\n \n}", "async function getVideoInfo() {\n\tlet videos = document.querySelectorAll(\n\t\t'ytd-browse #contents #contents #items ytd-thumbnail .yt-simple-endpoint.inline-block.style-scope.ytd-thumbnail'\n\t);\n\tlet titleEles = document.querySelectorAll('#contents #contents #items #video-title');\n\n\tlet srcAry = [];\n\n\tfor (let i = 0; i < videos.length; i++) {\n\t\tlet titleEle = titleEles[i];\n\t\tlet videoTitle = titleEle.innerText;\n\t\tlet videoInfo = {};\n\t\tlet video = videos[i];\n\t\tlet href = video.getAttribute('href');\n\t\tlet vars = href.split('?')[1];\n\t\tlet src = vars.split('v=')[1];\n\n\t\tvideoTitle ? (videoInfo.title = videoTitle) : '';\n\t\tsrc ? (videoInfo.id = src) : '';\n\t\tsrcAry.push(videoInfo);\n\t}\n\n\treturn srcAry;\n}", "function splitVideo(ctx) {\n /* Generating the unique ids for the elements */\n const firstHalfId = getUniqueID()\n const secondHalfId = getUniqueID()\n \n /* Accessing key members for rendering */\n const targetNode = window.references[ctx.target.id]\n const targetNodeEnd = targetNode.data.metadata.endTime\n const targetNodeStart = targetNode.data.metadata.startTime\n \n /* Calculating the split moment relative to the current target */\n const newStartTime = ctx.offsetX * \n targetNode.data.metadata.duration / ctx.target.clientWidth\n \n /* Generating the new TimelineNodes */\n const splitTime = targetNodeStart + newStartTime\n const firstHalfNode = new TimelineNode(\n buildVideoResource(\n ctx.target, window.references[ctx.target.id].data.metadata.title,\n (targetNode.prev) ? \n targetNode.prev.data.metadata.baseDuration + targetNode.prev.data.metadata.duration : \n 0,\n targetNodeStart, splitTime)\n )\n const secondHalfNode = new TimelineNode(\n buildVideoResource(ctx.target, window.references[ctx.target.id].data.metadata.title,\n firstHalfNode.data.metadata.baseDuration + firstHalfNode.data.metadata.duration, \n splitTime, targetNodeEnd)\n )\n\n /* Generating the new HTML elements */\n const firstHalfElement = renderTimelineBlock(firstHalfNode, firstHalfId)\n const secondHalfElement = renderTimelineBlock(secondHalfNode, secondHalfId)\n \n firstHalfNode.data.videoCore = firstHalfElement\n secondHalfNode.data.videoCore = secondHalfElement\n\n /* Updating the refereneces hashmap */\n window.references[firstHalfId] = firstHalfNode\n window.references[secondHalfId] = secondHalfNode\n \n /* Appending the new elements to DOM */\n $(ctx.target).after(firstHalfElement)\n $(firstHalfElement).after(secondHalfElement)\n\n /* Linking the new nodes to the timeline doubly linked list */\n firstHalfNode.next = secondHalfNode\n firstHalfNode.prev = targetNode.prev\n secondHalfNode.prev = firstHalfNode\n secondHalfNode.next = targetNode.next\n \n /* If there exists an element after the split */\n if (targetNode.next) {\n targetNode.next.prev = secondHalfNode\n }\n\n /* If there exists an element before the split */\n if (previous = targetNode.prev) {\n previous.next = firstHalfNode\n } else {\n window.timeline = firstHalfNode\n window.timelineDuration = targetNode.data.metadata.duration\n }\n\n /* Removing the current target */\n $(ctx.target).remove()\n window.rightClickCtx = null\n delete window.references[ctx.target.id]\n\n /* Restarting the timeline playback */\n window.currentVideoSelectedForPlayback = window.timeline\n window.currentVideoSelectedForPlayback.data.videoCore.currentTime = \n window.currentVideoSelectedForPlayback.data.metadata.startTime\n\n renderCurrentPlaybackBar(window.currentVideoSelectedForPlayback)\n}", "function updateIntroLoader(item, arrayNum, videoArrays){\n\n\tconst videoElement = item.getElementsByTagName('video')[0];\n\n\tconst fileName = item.getElementsByTagName('img')[0].getAttribute('src').split(\"/\")[2].split(\".\")[0] + \".mp4\";\n const videoSrc = videoArrays[arrayNum].files.find( video => video.name === fileName );\n\n\tconst blob = new Blob([videoSrc.buffer], { type: \"video/mp4\" });\n\tvideoElement.src = window.URL.createObjectURL(blob);\n\tvideoElement.mute = \"mute\";\n\tvideoElement.loop = \"loop\";\n\tvideoElement.play();\n\tvideoElement.addEventListener(\"playing\", removeLoading);\n\n\tfunction removeLoading(){\n\t\titem.classList.add('intro-description-loading-list-item_loaded');\n\t\tvideoElement.removeEventListener(\"playing\", removeLoading);\n\t}\n\n}", "function getSRC() {\n let vidSrc = document.getElementById('video').getAttribute('src');\n // console.log(\"SRC attribute: \", vidSrc);\n let srcList = [];\n if (vidSrc == '../images/kaiboom_v1.mp4') {\n let src1 = '../images/kaiboom_v1.mp4';\n let src2 = '../images/kaiboom_v2.mp4';\n let src3 = '../images/kaiboom_v3.mp4';\n srcList.push(src1);\n srcList.push(src2);\n srcList.push(src3);\n }\n if (vidSrc == '../images/Jamming_1_4.m4v') {\n let src1 = '../images/Jamming_1_4.m4v';\n let src2 = '../images/Jamming_2_1.m4v';\n let src3 = '../images/Jamming_3_1.m4v';\n srcList.push(src1);\n srcList.push(src2);\n srcList.push(src3);\n }\n if (vidSrc == '../images/travel_app_v0.mp4') {\n let src1 = '../images/travel_app_v0.mp4';\n let src2 = '../images/travel_app_v1.mp4';\n let src3 = '../images/travel_app_v2.mp4';\n srcList.push(src1);\n srcList.push(src2);\n srcList.push(src3);\n console.log('weathertrip')\n }\n if (vidSrc == '../images/TreasureMap1.mp4') {\n let src1 = '../images/TreasureMap1.mp4';\n let src2 = '../images/TreasureMap2.mp4';\n let src3 = '../images/TreasureMap3.mp4';\n srcList.push(src1);\n srcList.push(src2);\n srcList.push(src3);\n }\n return srcList;\n}", "function calcularMedia(puntuacionesPartidos) {\n let sumaPuntos = 0;\n for (let i = 0; i < puntuacionesPartidos.length; i++) {\n sumaPuntos += puntuacionesPartidos[i];\n }\n return Math.round(sumaPuntos / puntuacionesPartidos.length);\n}", "get videoLengthInSeconds() {\n return getVideoLengthInSeconds(this.videoLength);\n }", "function calculateCurrentVideo(){\n\tvar i = 0;\n\tvar lastLength = 0;\n\ttotalLength = 0;\n\n\tdateTime = new Date().getTime() / 1000;\n\tglobalTimeStamp = Math.floor(dateTime - startTime);\n\n\tfor(i = 0; totalLength < globalTimeStamp; i++){\n\t\ttotalLength = totalLength + parseInt(quickLooks[i].split('~')[3]);\n\t\tlastLength = parseInt(quickLooks[i].split('~')[3]);\n\n\t}\n\n\tglobalTimeStamp = lastLength - (totalLength - globalTimeStamp);\n\tcurrentVideoIndex = i - 1;\n\n}", "function pushVideoInfo(li){\r\n // recupere l'url directe de la video a partir de l'url de la page contenant la video\r\n\t\tfunction getUrlVideo(urlPage){\r\n // recupere l'url directe de la video dans le contenu de la page de la video\r\n // plusieurs urls sont définies en général dans des tag \"<source\" sur la page de la video\r\n // on suppose que l'url de la video HD est celle contenant \"HD\" dans son nom et de type \"mp4\"\r\n\t\t\tfunction extractionUrlVideo(txtPage){\r\n\t\t\t\tvar tab=txtPage.match(/<source src=\".*HD([^\\\"]+)\".*type=\"video\\/mp4\"/ig);\r\n if (!tab || tab.length==0) throw [typeof tab,\"La structure a changé : pas de chaine'<source src=' dans la page :\",urlPage].join(\" \");\r\n\t\t\t\tvar urls=[]\r\n\t\t\t\tforEach (tab, function (elt){\r\n\t\t\t\t\tvar url=(elt.match(/src=\"(.*)\"/))[1];\r\n\t\t\t\t\turls.push(url);\r\n\t\t\t\t});\r\n\t\t\t\tif (urls.length==0) throw [\"Aucune url de vidéo dans la page :\",urlPage].join(\" \");\r\n\t\t\t\treturn urls.pop();\r\n\t\t\t}\r\n \r\n // lance l'extraction en récupérant le contenu de la page de la video par une requete http synchrone\r\n\t\t return extractionUrlVideo(httpSync(urlPage));\r\n\t\t}\r\n \r\n // récupération du titre, categorie et url de la page conteant la video\r\n\t\ttry {\r\n //url de la page video est dans le 'href' du lien du 'li' courant\r\n\t\t\tvar urlPageVideo=trim(tags(li,'a')[0].attributes[\"href\"].value);\r\n //categorie est dans le 'span' du 'h3' du 'li' courant\r\n\t\t\tvar categorieVideo=trim(tags(tags(li,'h3')[0], 'span')[0].firstChild.nodeValue);\r\n // titre video est l'element texte du h3\r\n\t\t\tvar titreVideo=trim(tags(li,'h3')[0].lastChild.nodeValue);\r\n\t\r\n\t\t vids.push ({categorie:categorieVideo,titre:titreVideo,url:getUrlVideo(urlPageVideo)});\r\n\t\t} catch (erreur) {\r\n\t\t alert(\"Impossible de récupérer les infos d'une des vidéos. exception : \"+erreur);\r\n\t\t throw \"Traitement interrompu sur erreur.\";\r\n\t\t}\r\n\t}", "function findVideos() {\n let videos = document.querySelectorAll('.video');\n\n for (let i = 0; i < videos.length; i++) {\n setupVideo(videos[i]);\n }\n}", "getP() {\r\n let p = [];\r\n let unparseP = this.#rawtext[2];\r\n for(let line of unparseP.split('\\n')) {\r\n if(line.split('\\t').length == 2) { p.push(parseFloat(line.split('\\t')[1])); }\r\n }\r\n\r\n this.processingTimes = p;\r\n }", "function splitVideo(videoName, splitTimeInSeconds) {\r\n\tvar requestData = '{'\r\n\t\t\t+ '\"command\" : \"splitVideo\",'\r\n\t\t\t+ '\"arguments\" : {'\r\n\t\t\t+ '\"video\" : \"' + videoName + '\",'\r\n\t\t\t+ '\"splitTimeInSeconds\" : ' + splitTimeInSeconds + ''\r\n\t\t\t+ '}'\r\n\t\t\t+ '}';\r\n\tmakeAsynchronousPostRequest(requestData, refresh, null);\t// Defined in \"/olive/scripts/master.js\".\r\n}", "function getAllVideos(data){\n var videos = [];\n for (var i = 0; i < data.length; i++) {\n for (var j = 0; j < data[i].videos.length; j++) {\n videos.push(data[i].videos[j].id);\n }\n }\n return videos;\n}", "function playSqOfSegments(transcripts) {\n videoSrc = transcripts[counter]['src']\n inPoint = transcripts[counter]['inPoint']\n outPoint = transcripts[counter]['outPoint']\n playOneSegment(videoSrc, inPoint, outPoint)\n }", "findSlots(){\n\t\tconst slots=[];\n\t\tconst data=this.props.data;\n\t\tconst ar=this.props.ar;\n\t\tconst differenceArray=[];\n\t\tfor(let i=0;i<ar.length;i++){\n\t\t\tdifferenceArray.push(0);\n\t\t}\n\t\tfor(let i=0;i<data.length;i++){\n\t\t\tconst indexRange=findStartandEndIndex(data[i],ar);\n\t\t\tdifferenceArray[indexRange.start]++;\n\t\t\tif(indexRange.end<ar.length-1)\n\t\t\t\tdifferenceArray[indexRange.end+1]--;\n\t\t}\n\t\tfor(let i=1;i<ar.length;i++){\n\t\t\tdifferenceArray[i]+=differenceArray[i-1];\n\t\t}\n\t\tfor(let i=0;i<ar.length;i++){\n\t\t\tif(differenceArray[i]===0)\n\t\t\t\tslots.push(i);\n\t\t}\n\t\treturn slots;\n\t}", "getVideoTabContents() {\n\t\tlet isActive = false;\n\t\tconst videos = this.state.itemData.playableContent.filter(content => {\n\t\t\treturn content.mimeType.indexOf('video') !== -1;\n\t\t})\n\t\tif(videos.length > 0) {\n\t\t\tconst transcript = this.state.itemData.rawData.layer__asr || null;//TranscriptExample;\n\t\t\tconst content = videos.map((mediaObject, index) => {\n\t\t\t\tmediaObject.id = 'video__' + index;\n\t\t\t\tif(!isActive) {\n\t\t\t\t\tisActive = this.checkMediaObjectIsSelected.call(this, mediaObject);\n\t\t\t\t}\n\t\t\t\treturn (\n\t\t\t\t\t<FlexPlayer\n\t\t\t\t\t\tuser={this.props.user} //current user\n\t\t\t\t\t\tproject={this.state.activeProject} //selected via the ProjectSelector\n\t\t\t\t\t\tresourceId={this.state.itemData.resourceId}\n transcript={transcript}\n\t\t\t\t\t\tcollectionId={this.state.itemData.index}\n\t\t\t\t\t\tmediaObject={mediaObject} //TODO make this plural for playlist support\n\t\t\t\t\t\tactive={this.state.activeMediaTab == index}\n\t\t\t\t\t\tenableFragmentMode={false} //add this to config\n\t\t\t\t\t\tannotationSupport={this.props.recipe.ingredients.annotationSupport} //annotation support the component should provide\n\t\t\t\t\t\tannotationLayers={this.props.recipe.ingredients.annotationLayers} //so the player can distribute annotations in layers\n\t\t\t\t\t/>\n\t\t\t\t);\n\t\t\t});\n\t\t\treturn {type : 'video', content : content, active : isActive}\n\t\t}\n\t\treturn null;\n\t}", "function setupVideos() {\n vid2 = $('#vid02')[0];\n vidSB01 = $('#vidSB01')[0];\n }", "function splitVideoIdsIntoSets() {\n var tmpArray = [];\n // grab the first 100 as a new array, push into sets array\n tmpArray = videoIds.splice(0, 100);\n videoIdSets.push(tmpArray);\n // function recalls itself until videoIds array is empty\n if (videoIds.length > 0) {\n splitVideoIdsIntoSets();\n } else {\n return;\n }\n }", "function getVideoIds(videos){\n const videoIds = []\n videos.forEach(vid => {\n try {\n const id = vid.contentDetails.videoId\n videoIds.push(id)\n }catch (error){\n const id = vid.id.videoId\n videoIds.push(id)\n }\n })\n return videoIds\n}", "function fn_subtitle_videolist(data, pos) {\n setTimeout(function() {\n var mainUl = document.getElementById('videolistul');\n var maindiv = document.getElementById('videolistdiv');\n var array = data;\n var navigation_pos = window.localStorage.getItem(\"titlepos\");\n var subtitle_pos = window.localStorage.getItem(\"subtitlepos\");\n var level3pos = window.localStorage.getItem(\"level3pos\");\n var from_search_page = window.localStorage.getItem(\"from_search_list\");\n\n var title_array = [];\n\n\n for (var i = 0; i < array['navigation'][navigation_pos]['subtitle'][subtitle_pos]['level3'][level3pos]['videourl'][pos]['videolist'].length; i++) {\n\n var video = array['navigation'][navigation_pos]['subtitle'][subtitle_pos]['level3'][level3pos]['videourl'][pos]['videolist'];\n\n $(\".title_name\").html(video[0]['displayName']);\n console.log(\"for loop \" + video[i]['file']);\n\n var innerli = document.createElement('li');\n\n\n var innerA = document.createElement('a');\n\n var list_v = document.createElement('div');\n\n list_v.setAttribute('class', 'list-v');\n list_v.setAttribute('id', i);\n list_v.setAttribute('video_title', i);\n var list_v_img = document.createElement('img');\n\n var logo = $(\".logo\").height();\n var imgLoad = $(\".imgLoad\").height();\n var contenttop = $(\".content-top\").height();\n var clr = $(\".clr\").height();\n var accormvideolist = $(\".accor-m video-list-new-layout\").height();\n var divForm = $(\"#divForm\").height();\n var accormdownloadpage = $(\"#accor-m download-page\").height();\n var totalheight = logo + imgLoad + contenttop + clr + accormvideolist + divForm + accormdownloadpage;\n var videoHeight = window.innerHeight - totalheight;\n if (window.innerHeight > window.innerWidth) {\n var deviceType = (navigator.userAgent.match(/iPad/i)) == \"iPad\" ? \"iPad\" : (navigator.userAgent.match(/iPhone/i)) == \"iPhone\" ? \"iPhone\" : (navigator.userAgent.match(/Android/i)) == \"Android\" ? \"Android\" : (navigator.userAgent.match(/BlackBerry/i)) == \"BlackBerry\" ? \"BlackBerry\" : \"null\";\n\n if (deviceType == \"iPad\") {\n var size = (window.innerHeight * 300) / 1024;\n videoHeight = videoHeight - size;\n }\n }\n if (i == 0) {\n file_exist_download(video[0]['title'], video[0]['file'], video[0]['image'], videoHeight, window.innerWidth);\n }\n\n\n\n\n console.log(\"-----------------------------\" + video[i]['image']);\n var videotitle = video[i]['title'].replace(/\\s+/g, '');\n\n list_v_img.setAttribute('src', root_path1 + \"/GymWijzer/Thumbnail/\" + videotitle + \"/video_thumbnail.jpg\");\n list_v_img.setAttribute('onError', \"this.onerror=null;this.src='\" + video[i]['image'] + \"';\");\n\n\n if (i == 0) {\n poster_file_exist(video[i]['title'], video[i]['image']);\n }\n\n list_v_img.setAttribute('height', 100);\n list_v_img.setAttribute('width', 100);\n list_v.appendChild(list_v_img);\n\n\n\n var paly_b = document.createElement('div');\n paly_b.setAttribute('class', 'paly-b');\n\n var fa_fa_play = document.createElement('i');\n fa_fa_play.setAttribute('class', 'fa fa-play');\n paly_b.appendChild(fa_fa_play);\n list_v.appendChild(paly_b);\n list_v.setAttribute('vid_name', video[i]['title']);\n list_v.setAttribute('vid_displayName', video[i]['displayName']);\n list_v.setAttribute('vid_url', video[i]['file']);\n\n var fileexist = \"GymWijzer/Video/\" + video[i]['title'] + \".mp4\";\n\n window.requestFileSystem(LocalFileSystem.PERSISTENT, 0, function(fileSystem) {\n var entry = fileSystem.root;\n\n entry.getFile(fileexist, {\n create: false,\n exclusive: false\n }, function(dir) {\n var root_path = fileSystem.root.toURL();\n image = root_path + \"/GymWijzer/Thumbnail/\" + filename + \"/video_thumbnail.jpg\";\n image = image.replace(/\\s+/g, '');\n list_v.setAttribute('vid_image', image);\n }, function(error) {\n list_v.setAttribute('vid_image', video[i]['image']);\n });\n }, null);\n\n\n\n\n innerA.appendChild(list_v);\n\n\n var span = document.createElement('span');\n span.innerHTML = video[i]['displayName'];\n title_array[i] = video[i]['title'];\n innerA.appendChild(span);\n innerli.appendChild(innerA);\n mainUl.appendChild(innerli);\n\n\n\n\n var span1 = document.createElement('span');\n span1.innerHTML = video[i]['description'];\n span1.setAttribute('class', 'des_2');\n\n innerA.appendChild(span1);\n\n\n var trash_i = document.createElement('i');\n var center_i = document.createElement('center');\n trash_i.setAttribute('class', 'fa fa-trash');\n trash_i.setAttribute('trash_videname', video[i]['title']);\n innerA.appendChild(trash_i);\n\n innerli.appendChild(innerA);\n mainUl.appendChild(innerli);\n\n console.log(from_search_page);\n if (from_search_page == \"true\") {\n\n var video_pos = window.localStorage.getItem(\"videopos\");\n\n\n if (i == video_pos) {\n window.localStorage.setItem(\"videoname\", video[video_pos]['title']);\n window.localStorage.setItem(\"videourl\", video[video_pos]['file']);\n window.localStorage.setItem(\"videoimage\", video[video_pos]['image']);\n\n\n window.localStorage.setItem(\"from_search_list\", false);\n console.log(\"from_search_page \" + window.localStorage.getItem(\"from_search_list\"));\n\n\n }\n } else {\n\n console.log(\"else call\");\n if (i == 0) {\n window.localStorage.setItem(\"videoname\", video[i]['title']);\n window.localStorage.setItem(\"videourl\", video[i]['file']);\n window.localStorage.setItem(\"videoimage\", video[i]['image']);\n\n }\n\n }\n\n }\n\n maindiv.appendChild(mainUl);\n jQuery(\".list-v\").click(function() {\n\n var videoname = $(this).attr('vid_name');\n var videourl = $(this).attr('vid_url');\n var videoimage = $(this).attr('vid_image');\n var id = $(this).attr('id');\n console.log(\"mage url is :>\" + videoimage);\n poster_file_exist(videoname, videoimage);\n\n window.localStorage.setItem(\"videoid\", id);\n window.localStorage.setItem(\"videoname\", videoname);\n //alert(videourl);\n window.localStorage.setItem(\"videourl\", videourl);\n window.localStorage.setItem(\"videoimage\", videoimage);\n\n\n $(\".title_name\").html($(this).attr('vid_displayName'));\n var logo = $(\".logo\").height();\n var imgLoad = $(\".imgLoad\").height();\n var contenttop = $(\".content-top\").height();\n var clr = $(\".clr\").height();\n var accormvideolist = $(\".accor-m video-list-new-layout\").height();\n var divForm = $(\"#divForm\").height();\n var accormdownloadpage = $(\"#accor-m download-page\").height();\n var totalheight = logo + imgLoad + contenttop + clr + accormvideolist + divForm + accormdownloadpage;\n\n file_exist_download(videoname, videourl, videoimage, videoHeight, window.innerWidth);\n\n });\n jQuery(\".fa.fa-trash\").click(function() {\n\n trahsname = $(this).attr('trash_videname');\n jQuery.fancybox.open(\"#conform_donwload\");\n\n\n });\n\n\n\n\n setTimeout(function() {\n for (var l = 0; l < title_array.length; l++) {\n console.log(\"titkw name :> \" + title_array[l]);\n file_exist(title_array[l], l);\n }\n\n }, 2500); //Timeout changed\n\n\n\n\n }, 2500); //Timeout changed\n\n}", "function video() {\n for(i = 0; i < 5; i++) {\n if(document.getElementById(\"frame\" + i).getAttribute(\"alt\") == \"empty\") {//verif max 5 videos avec attribut alt\n var inputVal = document.getElementById(\"video\").value;\n var x = document.createElement(\"iframe\");\n var frame0 = document.getElementById(\"frame\" + i);\n frame0.setAttribute(\"alt\", \"full\");//verif max 5 videos avec attribut alt\n x.setAttribute(\"src\", inputVal);\n frame0.appendChild(x);//affichage video\n var pocebleu = document.createElement(\"button\");\n var poceroje = document.createElement(\"button\");\n pocebleu.setAttribute(\"id\", \"bleu\" + i);\n poceroje.setAttribute(\"id\", \"rouge\" + i);\n pocebleu.setAttribute(\"class\", \"btn btn-success\");\n poceroje.setAttribute(\"class\", \"btn btn-danger\");x\n pocebleu.innerHTML = \"0\";\n poceroje.innerHTML = \"0\";\n pocebleu.style.backgroundColor = \"blue\";\n poceroje.style.backgroundColor = \"red\";\n pocebleu.style.color = \"white\";\n poceroje.style.color = \"white\";\n frame0.appendChild(pocebleu);//affichage like\n frame0.appendChild(poceroje);//affichage dislike\n document.getElementById(\"count\").setAttribute(\"alt\", i);\n return;\n }\n if ((document.getElementById(\"frame4\").getAttribute(\"alt\") == \"full\")) {//verif max 5 videos avec attribut alt\n alert(\"max 5 videos\");\n return;\n }\n }\n}", "function actualitzarVides(current){\n document.getElementById(\"vida\").innerHTML = \"\";\n let vidas = \"\";\n\n for(let i = 0; i < (VIDA_MAX - current); i++){\n vidas += \"<img class='broken-heart' alt='corazon-roto' src='./resources/heart/heart-3.png'>\";\n }\n\n if(VIDA_MAX < current) {\n vidas = \"\";\n //console.log(current);\n //console.log(VIDA_MAX);\n for(let i = VIDA_MAX; i < current; i++){\n vidas += \"<img class='golden-heart' alt='corazon' src='./resources/heart/heart.png'>\";\n }\n\n for(let i = 0; i < VIDA_MAX; i++){\n vidas += \"<img alt='corazon' src='./resources/heart/heart.png'>\";\n }\n } else {\n for(let i = 0; i < current; i++){\n vidas += \"<img alt='corazon' src='./resources/heart/heart.png'>\";\n }\n }\n\n document.getElementById(\"vida\").innerHTML += vidas;\n\n \n}", "function calcularVueltas(Pares){\n\t\tvar arreglo = new Array(mVueltas);\n\t\tvar cont = 0;\n\t\tvar dato;\n\t\tvar mVueltas = parseInt(vueltas.value);\n\t\tvar pares = Pares;\n\t\tvar temp;\n\t\tvar unidad = 1;\n\t\tfor (var i = 0; i < Pares; i++) {\n\t\t\tif(cont < mVueltas){\n\t\t\t\tif(arreglo[cont] == null){\n\t\t\t\t\tarreglo[cont] = 0;\n\t\t\t\t}\n\t\t\t\ttemp = arreglo[cont];\n\t\t\t\tarreglo[cont] = temp + unidad;\n\t\t\t\tcont++;\n\t\t\t\t\n\t\t\t}else{\n\t\t\t\tcont = 0;\n\t\t\t\ttemp = arreglo[cont];\n\t\t\t\tarreglo[cont] = temp + unidad;\n\t\t\t\tcont++;\n\t\t\t}\t\n\t\t}\n\t\treturn arreglo;\t\t\n\t}", "function playerControler() {\n var video = document.getElementById(\"Videotv\");\n var image = document.getElementById(\"Imagetv\");\n var count =0; // conta os elementos\n var toplay; //guarda o url do item a reproduzir :)\n var value = 4;\n var playlistsize = $(\"#playlistsize\").val();\n playlist = String($(\"#playlist\").val()).split(\";\");\n for(var i=0;i<playlistsize;i++){\n if($(\"#nextmultimedia\").val()==playlistsize || $(\"#nextmultimedia\").val()==0){\n $(\"#nextmultimedia\").val(1);\n toplay = playlist[1];\n break;\n }else{\n if(count==$(\"#nextmultimedia\").val() && $(\"#nextmultimedia\").val()<playlistsize){\n toplay = playlist[value-3];\n $(\"#nextmultimedia\").val(count+1);\n break;\n }\n }\n value=value+4;\n count++;\n }\n if(playlist[value-2]=='video'){\n $('#Imagetv').hide();\n $(\"#Videotv\").show();\n video.src = toplay;\n video.play();\n videoManager();\n }else if(playlist[value-2]=='image'){\n $(\"#Videotv\").hide();\n $('#Imagetv').show();\n $('#targetTime').val(playlist[value-1]);\n image.src = toplay;\n startImageTime();\n }\n}", "function turnHoursToMinutes(array1) {\n array = [...array1]\n let movieDuration = []\n let minutes = 0\n array.forEach(elm => {\n\n movieDuration = elm.duration.split(\" \")\n console.log(movieDuration)\n movieDuration.forEach(elm2 => {\n\n\n if (elm2.includes(\"h\")) {\n minutes = parseInt(elm2) * 60\n\n } else if (elm2.includes(\"min\")) {\n minutes += parseInt(elm2)\n\n }\n\n\n })\n console.log(minutes)\n elm.duration = minutes\n\n\n\n })\n return array\n}", "function eltdInitVideoBackgroundSize(){\n\n $('.eltd-section .eltd-video-wrap').each(function(){\n\n var element = $(this);\n var sectionWidth = element.closest('.eltd-section').outerWidth();\n element.width(sectionWidth);\n\n var sectionHeight = element.closest('.eltd-section').outerHeight();\n eltd.minVideoWidth = eltd.videoRatio * (sectionHeight+20);\n element.height(sectionHeight);\n\n var scaleH = sectionWidth / eltd.videoWidthOriginal;\n var scaleV = sectionHeight / eltd.videoHeightOriginal;\n var scale = scaleV;\n if (scaleH > scaleV)\n scale = scaleH;\n if (scale * eltd.videoWidthOriginal < eltd.minVideoWidth) {scale = eltd.minVideoWidth / eltd.videoWidthOriginal;}\n\n element.find('video, .mejs-overlay, .mejs-poster').width(Math.ceil(scale * eltd.videoWidthOriginal +2));\n element.find('video, .mejs-overlay, .mejs-poster').height(Math.ceil(scale * eltd.videoHeightOriginal +2));\n element.scrollLeft((element.find('video').width() - sectionWidth) / 2);\n element.find('.mejs-overlay, .mejs-poster').scrollTop((element.find('video').height() - (sectionHeight)) / 2);\n element.scrollTop((element.find('video').height() - sectionHeight) / 2);\n });\n\n }", "function arrayPares2(arreglo) {\n let aux = arreglo.pop();\n if (aux % 2 == 0) {\n arreglo.unshift(aux); //pongo adelante del arreglo el ultimo elemento del arreglo si es par\n }\n aux = arreglo.pop();\n if (aux % 2 == 0) {\n arreglo.unshift(aux); //pongo adelante del arreglo el ultimo elemento del arreglo si es par\n }\n aux = arreglo.pop();\n if (aux % 2 == 0) {\n arreglo.unshift(aux); //pongo adelante del arreglo el ultimo elemento del arreglo si es par\n }\n aux = arreglo.pop();\n if (aux % 2 == 0) {\n arreglo.unshift(aux); //pongo adelante del arreglo el ultimo elemento del arreglo si es par\n }\n return arreglo;\n}", "function findSize(lyr) {\n var res = [];\n\n var exp = \"var obj = thisLayer.sourceRectAtTime();\\\n [obj.width,obj.height]\";\n var tempProp = lyr(\"ADBE Effect Parade\").addProperty(\"ADBE Point Control\");\n tempProp(1).expression = exp;\n res = tempProp(1).valueAtTime(0,false);\n tempProp.remove(); \n return res;\n }", "function videoDimensions() {\n\tjQuery('.sc_video_player').each(function() {\n\t\t\"use strict\";\n\t\tvar player = jQuery(this).eq(0);\n\t\tvar ratio = (player.data('ratio') ? player.data('ratio').split(':') : (player.find('[data-ratio]').length>0 ? player.find('[data-ratio]').data('ratio').split(':') : [16,9]));\n\t\tratio = ratio.length!=2 || ratio[0]==0 || ratio[1]==0 ? 16/9 : ratio[0]/ratio[1];\n\t\tvar cover = jQuery(this).find('.sc_video_play_button img');\n\t\tvar ht = player.find('.sc_video_player_title').height();\n\t\tvar w_attr = player.data('width');\n\t\tvar h_attr = player.data('height');\n\t\tif (!w_attr || !h_attr) {\n\t\t\treturn;\n\t\t}\n\t\tvar percent = (''+w_attr).substr(-1)=='%';\n\t\tw_attr = parseInt(w_attr);\n\t\th_attr = parseInt(h_attr);\n\t\tvar w_real = Math.min(percent ? 10000 : w_attr, player.parents('div,article').width()), //player.width();\n\t\t\th_real = Math.round(percent ? w_real/ratio : w_real/w_attr*h_attr);\n\t\tif (parseInt(player.attr('data-last-width'))==w_real) return;\n\t\tif (percent) {\n\t\t\tplayer.height(h_real + (isNaN(ht) ? 0 : ht));\n\t\t\tif (cover.length > 0) cover.height(h_real);\n\t\t} else {\n\t\t\tplayer.css({'width': w_real+'px', 'height': h_real + (isNaN(ht) ? 0 : ht)+'px'});\n\t\t\tif (cover.length > 0) cover.height(h_real);\n\t\t}\n\t\tplayer.attr('data-last-width', w_real);\n\t});\n\tjQuery('video.sc_video').each(function() {\n\t\t\"use strict\";\n\t\tvar video = jQuery(this).eq(0);\n\t\tvar ratio = (video.data('ratio')!=undefined ? video.data('ratio').split(':') : [16,9]);\n\t\tratio = ratio.length!=2 || ratio[0]==0 || ratio[1]==0 ? 16/9 : ratio[0]/ratio[1];\n\t\tvar mejs_cont = video.parents('.mejs-video');\n\t\tvar player = video.parents('.sc_video_player');\n\t\tvar w_attr = player.length>0 ? player.data('width') : video.data('width');\n\t\tvar h_attr = player.length>0 ? player.data('height') : video.data('height');\n\t\tif (!w_attr || !h_attr) {\n\t\t\treturn;\n\t\t}\n\t\tvar percent = (''+w_attr).substr(-1)=='%';\n\t\tw_attr = parseInt(w_attr);\n\t\th_attr = parseInt(h_attr);\n\t\tvar w_real = Math.round(mejs_cont.length > 0 ? Math.min(percent ? 10000 : w_attr, mejs_cont.parents('div,article').width()) : video.width()),\n\t\t\th_real = Math.round(percent ? w_real/ratio : w_real/w_attr*h_attr);\n\t\tif (parseInt(video.attr('data-last-width'))==w_real) return;\n\t\tif (mejs_cont.length > 0 && mejs) {\n\t\t\tsetMejsPlayerDimensions(video, w_real, h_real);\n\t\t}\n\t\tif (percent) {\n\t\t\tvideo.height(h_real);\n\t\t} else {\n\t\t\tvideo.attr({'width': w_real, 'height': h_real}).css({'width': w_real+'px', 'height': h_real+'px'});\n\t\t}\n\t\tvideo.attr('data-last-width', w_real);\n\t});\n\tjQuery('video.sc_video_bg').each(function() {\n\t\t\"use strict\";\n\t\tvar video = jQuery(this).eq(0);\n\t\tvar ratio = (video.data('ratio')!=undefined ? video.data('ratio').split(':') : [16,9]);\n\t\tratio = ratio.length!=2 || ratio[0]==0 || ratio[1]==0 ? 16/9 : ratio[0]/ratio[1];\n\t\tvar mejs_cont = video.parents('.mejs-video');\n\t\tvar container = mejs_cont.length>0 ? mejs_cont.parent() : video.parent();\n\t\tvar w = container.width();\n\t\tvar h = container.height();\n\t\tvar w1 = Math.ceil(h*ratio);\n\t\tvar h1 = Math.ceil(w/ratio);\n\t\tif (video.parents('.sc_parallax').length > 0) {\n\t\t\tvar windowHeight = jQuery(window).height();\n\t\t\tvar speed = Number(video.parents('.sc_parallax').data('parallax-speed'));\n\t\t\tvar h_add = Math.ceil(Math.abs((windowHeight-h)*speed));\n\t\t\tif (h1 < h + h_add) {\n\t\t\t\th1 = h + h_add;\n\t\t\t\tw1 = Math.ceil(h1 * ratio);\n\t\t\t}\n\t\t}\n\t\tif (h1 < h) {\n\t\t\th1 = h;\n\t\t\tw1 = Math.ceil(h1 * ratio);\n\t\t}\n\t\tif (w1 < w) { \n\t\t\tw1 = w;\n\t\t\th1 = Math.ceil(w1 / ratio);\n\t\t}\n\t\tvar l = Math.round((w1-w)/2);\n\t\tvar t = Math.round((h1-h)/2);\n\t\tif (parseInt(video.attr('data-last-width'))==w1) return;\n\t\tif (mejs_cont.length > 0) {\n\t\t\tsetMejsPlayerDimensions(video, w1, h1);\n\t\t\tmejs_cont.css({'left': -l+'px', 'top': -t+'px'});\n\t\t} else\n\t\t\tvideo.css({'left': -l+'px', 'top': -t+'px'});\n\t\tvideo.attr({'width': w1, 'height': h1, 'data-last-width':w1}).css({'width':w1+'px', 'height':h1+'px'});\n\t\tif (video.css('opacity')==0) video.animate({'opacity': 1}, 3000);\n\t});\n\tjQuery('iframe').each(function() {\n\t\t\"use strict\";\n\t\tvar iframe = jQuery(this).eq(0);\n\t\tvar ratio = (iframe.data('ratio')!=undefined ? iframe.data('ratio').split(':') : (iframe.find('[data-ratio]').length>0 ? iframe.find('[data-ratio]').data('ratio').split(':') : [16,9]));\n\t\tratio = ratio.length!=2 || ratio[0]==0 || ratio[1]==0 ? 16/9 : ratio[0]/ratio[1];\n\t\tvar w_attr = iframe.attr('width');\n\t\tvar h_attr = iframe.attr('height');\n\t\tvar player = iframe.parents('.sc_video_player');\n\t\tif (player.length > 0) {\n\t\t\tw_attr = player.data('width');\n\t\t\th_attr = player.data('height');\n\t\t}\n\t\tif (!w_attr || !h_attr) {\n\t\t\treturn;\n\t\t}\n\t\tvar percent = (''+w_attr).substr(-1)=='%';\n\t\tw_attr = parseInt(w_attr);\n\t\th_attr = parseInt(h_attr);\n\t\tvar w_real = player.length > 0 ? player.width() : iframe.width(),\n\t\t\th_real = Math.round(percent ? w_real/ratio : w_real/w_attr*h_attr);\n\t\tif (parseInt(iframe.attr('data-last-width'))==w_real) return;\n\t\tiframe.css({'width': w_real+'px', 'height': h_real+'px'});\n\t});\n}", "function videoCounter(counter, list) {\n var type;\n var listLength = list.length;\n\n video = list[counter - 1];\n\n // if the counter is the same as the length of the list, reset it\n if (counter === listLength) {\n counter = 0;\n }\n\n return {\n video: video,\n counter: counter\n }\n }", "function LoadingVideos(arrayVideo = []){\n\tvar itemHtml;\n\t\n\tg_currentVideoArray = arrayVideo;\n\t//clear media items in media gallery\n\t$(\"#video-grid-container\").empty();\n\n\tfor(let i = 0; i < arrayVideo.length; i++){\n\t\tvar imageUrl, strName;\n\t\tvar fileInfo = [];\n\t\t\n\t\tfileInfo = arrayVideo[i];\n\t\timageUrl = fileInfo[\"path\"];\n\t\tstrName = fileInfo[\"name\"];\n\n\t\titemHtml = `<div class=\"col-md-4 media-logo\" id=\"video-logo-container-`+ i +`\">\n\t\t\t\t\t\t<button class=\"media-logo-btn\" onclick=\"OnVideoSelect(`+ i +`);\" >\n\t\t\t\t\t\t\t<img class=\"img-fluid media-logo-img\" src=\"./images/assets/5.png\" alt=\"\">\n\t\t\t\t\t\t</button>\n\t\t\t\t\t\t<label class=\"media-menu-txt\">` + strName + `</label>\n\t\t\t\t\t</div>`;\n\t\t$(\"#video-grid-container\").append(itemHtml);\n\t}\n\t\n\tif(g_currentVideoArray.length > 0){\n\t\tOnVideoSelect(0);\n\t}\n}", "function getData() {\n console.log(\"Duration array length: \" + props.durations.length);\n // Changes with time signature\n const num = Math.ceil(props.durations.length );\n if(num === 1) {\n return [];\n }\n const points = new Array(num).fill(1);\n\n // Return the coordinates in the array where x is the index and y is the duration\n return points.map((point, index) => {\n console.log(\"Duration:\" + (Math.ceil(props.durations[index] - props.durations[(index - 1)])));\n let duration = props.durations[index] - props.durations[(index - 1)];\n return {x: index + 1, y: duration};\n });\n }", "function mostrarMovimientosEnPantalla() {\n let cartel = document.getElementById('movimientos');\n let limite = document.getElementById('movimientos-restantes');\n cartel.innerText = movimientos.length;\n limite.innerText = `Movimientos restantes: ${limiteMovimientos}`;\n}", "function fitVideo(){\n\t\"use strict\";\n\t\n\t$j(\".portfolio_images\").fitVids();\n\t$j(\".video_holder\").fitVids();\n\t$j(\".format-video .post_image\").fitVids();\n\t$j(\".format-video .q_masonry_blog_post_image\").fitVids();\n}", "duration() {\n return this.tracks.reduce((trackMax, track) => Math.max(trackMax, track.keyframes.reduce((kfMax, kf) => Math.max(kfMax, kf.time), 0)), 0);\n }", "function turnHoursToMinutes(movieArray) {\n\n const durationMovie = movieArray.map(e => e.duration)\n let minutesPerHour = 0\n let minutes = 0\n const totalMinutes = []\n\n durationMovie.forEach(function (m, idx) {\n for (i = 0; i < m.length; i++) {\n if (m[i] === 'h') {\n minutesPerHour = parseInt(m[i - 1] * 60)\n } else if (m[i] === 'm') {\n minutes = parseInt(m[i - 2] + m[i - 1])\n }\n }\n totalMinutes.push({ duration: minutesPerHour + minutes })\n })\n\n return totalMinutes\n}", "get numberOfVampiresFromOriginal() {\n let currentVamp = this;\n let vampCount = 0;\n while (currentVamp.creator) {\n currentVamp = currentVamp.creator;\n vampCount++;\n }\n return vampCount;\n }", "function turnHoursToMinutes(someArray) {\n\n let arrayCopy = JSON.parse(JSON.stringify(someArray));\n let hours = 0;\n let minutes = 0;\n\n arrayCopy.forEach(eachMovie => {\n let newArray = eachMovie.duration.split(\"\");\n //console.log(newArray);\n //console.log(newArray[0]*60);\n eachMovie.duration = (parseInt(newArray[0], 10)*60+(parseInt (newArray[3], 10)*10)+(parseInt(newArray[4], 10)))\n //console.log(arrayCopy);\n return arrayCopy\n })\n}", "fetchCards() {\n this.cards.push(\n {\n image: \"https://picsum.photos/200/300?random=1\",\n type: 'video',\n duration: 3600,\n title: 'Title 1',\n cardinality: 'single'\n },\n {\n image: \"https://picsum.photos/200/300?random=2\",\n type: 'playlist',\n duration: 1000,\n title: 'Title 2',\n cardinality: 'collection'\n },\n {\n image: \"https://picsum.photos/200/300?random=3\",\n type: 'playlist',\n duration: 2300,\n title: 'Title 3',\n cardinality: 'collection'\n },\n {\n image: \"https://picsum.photos/200/300?random=4\",\n type: 'news',\n duration: 4600,\n title: 'Title 4',\n cardinality: 'single'\n },\n {\n image: \"https://picsum.photos/200/300?random=5\",\n type: 'playlist',\n duration: 1500,\n title: 'Title 5',\n cardinality: 'collection'\n },\n {\n image: \"https://picsum.photos/200/300?random=6\",\n type: 'other',\n duration: 800,\n title: 'Title 6',\n cardinality: 'single'\n },\n {\n image: \"https://picsum.photos/200/300?random=7\",\n type: 'news',\n duration: 1600,\n title: 'Title 7',\n cardinality: 'single'\n },\n {\n image: \"https://picsum.photos/200/300?random=8\",\n type: 'playlist',\n duration: 2400,\n title: 'Title 8',\n cardinality: 'collection'\n },\n {\n image: \"https://picsum.photos/200/300?random=9\",\n type: 'video',\n duration: 3600,\n title: 'Title 9',\n cardinality: 'single'\n }\n )\n }", "function turnHoursToMinutes(arr) {\n let durationMin = [];\n let movieTime = 0;\n //forma de fazer a cópia criando um novo array sem referenciar\n const newArr = JSON.parse(JSON.stringify(arr));\n durationMin = newArr.map(function (item, index) {\n //verificar se existe parâmetro de horas.\n //Se tiver, o indexOf vai retornar um valor acima de -1.\n //Se tiver o h, pegar o valor do inicio até o indice do h, que são as horas, e multiplica por 0.\n if (item.duration.indexOf('h') >= 0) {\n movieTime += item.duration.slice(0, item.duration.indexOf('h')) * 60;\n //se tiver minutos, pega o valor entre o espaço e o m e converte em numero, com a multiplicação por 1\n if (item.duration.indexOf('m') >= 0) {\n movieTime += 1 * item.duration.slice(item.duration.indexOf(' '), item.duration.indexOf('m'));\n }\n } else {\n // se nao tiver h, o valor do inicio até o indice de m será os minutos.\n // o 1* é pra converter rapidamente a string em numero.\n movieTime += 1 * item.duration.slice(0, item.duration.indexOf('m'));\n }\n //atribui o valor calculado para a duraçao de cada objeto\n item.duration = movieTime;\n //retorna o objeto, ou seja, o item.\n return item;\n });\n return durationMin;\n }", "function turnHoursToMinutes(arr){\n var newArray = arr.map(function(movie){\n return movie.duration.split(\" \");\n });\n var arrTimeFormated = []; \n for (var i = 0; i < newArray.length; i++){\n var horas = Number(newArray[i][0].slice(0,1));\n var min = Number(newArray[i][1].slice(0,2));\n arrTimeFormated.push(horas*60 + min);\n }\n return arrTimeFormated;\n}", "get length() {\n let result = 0;\n for (let i = 0; i < this.sections.length; i += 2)\n result += this.sections[i];\n return result;\n }", "piquesAleatoire() {\n\t\t// position y aleatoire pour 4 piques\n\t\tlet tirage = [];\n\t\twhile (tirage.length < 4) {\n\t\t\tlet nombreAleatoire = Math.round(Utl.aleatoire(4, 12));\n\t\t\tif (tirage.indexOf(nombreAleatoire) === -1) {\n\t\t\t\ttirage.push(nombreAleatoire);\n\t\t\t}\n\t\t}\n\t\treturn tirage;\n\t}", "function turnHoursToMinutes(array){\n const newDuration = array.map(movie => {\n return movie.duration.split(\"\");\n });\n return newDuration;\n }", "function _sizeVideo() {\n\t\tdata.windowHeight = $(window).height() - data.padding;\n\t\tdata.windowWidth = $(window).width() - data.padding;\n\t\tdata.videoMarginTop = 0;\n\t\tdata.videoMarginLeft = 0;\n\t\t\n\t\tif (data.isMobile) {\n\t\t\tdata.$meta.css({ \n\t\t\t\twidth: data.windowWidth\n\t\t\t});\n\t\t\tdata.metaHeight = data.$meta.outerHeight(true);\n\t\t\t\n\t\t\tdata.contentHeight = data.windowHeight;\n\t\t\tdata.contentWidth = data.windowWidth;\n\t\t\t\n\t\t\tdata.videoWidth = data.windowWidth;\n\t\t\tdata.videoHeight = data.videoWidth * data.options.videoRatio;\n\t\t\t\n\t\t\tif (data.videoHeight > data.windowHeight - data.metaHeight) {\n\t\t\t\tdata.videoHeight = data.windowHeight - data.metaHeight;\n\t\t\t\tdata.videoWidth = data.videoHeight * data.options.videoRatio;\n\t\t\t}\n\t\t\t\n\t\t\tdata.videoMarginTop = (data.contentHeight - data.videoHeight) / 2;\n\t\t\tdata.videoMarginLeft = (data.contentWidth - data.videoWidth) / 2;\n\t\t} else {\n\t\t\tdata.windowHeight -= data.options.margin;\n\t\t\tdata.windowWidth -= data.options.margin;\n\t\t\t\n\t\t\tdata.videoWidth = (data.options.videoWidth > data.windowWidth) ? data.windowWidth : data.options.videoWidth;\n\t\t\tdata.videoHeight = data.videoWidth * data.options.videoRatio;\n\t\t\t\n\t\t\tdata.contentHeight = data.videoHeight;\n\t\t\tdata.contentWidth = data.videoWidth;\n\t\t}\n\t\t\n\t\tdata.$content.css({ \n\t\t\theight: (data.isMobile) ? data.contentHeight : \"auto\",\n\t\t\twidth: data.contentWidth \n\t\t});\n\t\tdata.$meta.css({ \n\t\t\twidth: data.contentWidth \n\t\t});\n\t\tdata.$videoWrapper.css({ \n\t\t\theight: data.videoHeight, \n\t\t\twidth: data.videoWidth,\n\t\t\tmarginTop: data.videoMarginTop,\n\t\t\tmarginLeft: data.videoMarginLeft\n\t\t});\n\t\t\n\t\tif (!data.isMobile) {\n\t\t\tdata.metaHeight = data.$meta.outerHeight(true);\n\t\t\tdata.contentHeight = data.videoHeight + data.metaHeight;\n\t\t}\n\t\tdata.contentWidth = data.videoWidth;\n\t}", "function getClipNames (seq, sequences) {\n for (var k = 0; k < sequences.length; k++) {\n // $.pype.log('getClipNames seq.guid ' + seq.guid );\n // $.pype.log(' getClipNames sequences[k].id ' + sequences[k].sequenceID );\n if (seq.guid === sequences[k].sequenceID) {\n // $.pype.log('Sequence ' + seq.name + ' has ' + app.project.sequences[k].videoTracks.numTracks +' video tracks' );\n // $.pype.log('Sequence ' + seq.name + ' has ' + app.project.sequences[k].audioTracks.numTracks +' audio tracks' );\n\n // VIDEO CLIPS IN SEQUENCES\n for (var l = 0; l < sequences[k].videoTracks.numTracks; l++) {\n var videoTrack = seq.getVideoTrackAt(l);\n // $.pype.log(seq.name + ' has video track '+ videoTrack.name + ' at index ' + l);\n var clipCounter = 0;\n var numOfClips = app.project.sequences[k].videoTracks[l].clips.numTracks;\n // $.pype.log('\\n' + bin.name + ' ' + seq.name + ' ' + videoTrack.name + ' has ' + numOfClips + ' clips');\n for (var m = 0; m < numOfClips; m++) {\n // var clip = app.project.sequences[k].videoTracks[l].clips[m];\n // $.pype.log('clips in video tracks: ' + m + ' - ' + clip); TrackItem, doesn't have name property\n // if a clip was deleted and another one added, the index of the new one is one or more higher\n while (clipCounter < numOfClips) { // undefined because of old clips\n if (videoTrack.getItemAt(m).name) {\n clipCounter++;\n // $.pype.log('getClipNames ' + seq.name + ' ' + videoTrack.name + ' has ' + videoTrack.getItemAt(m).name); Object\n\n for (var s = 0; s < sequences.length; s++) {\n if (seq.guid === sequences[s].sequenceID) {\n sequences[s].clipNames.push(videoTrack.getItemAt(m).name);\n }\n }\n }\n m++;\n }\n }\n }\n // $.pype.log('jsx after video loop clipsInSequences:' + clipsInSequences);\n\n // AUDIO CLIPS IN SEQUENCES\n for (var l = 0; l < sequences[k].audioTracks.numTracks; l++) {\n var audioTrack = seq.getAudioTrackAt(l);\n // $.pype.log(bin.name + ' ' + seq.name + ' has audio track '+ audioTrack.name + ' at index ' + l);\n // $.pype.log('\\n' + bin.name + ' ' + seq.name + ' ' + audioTrack.name + ' has ' + app.project.sequences[k].audioTracks[l].clips.numTracks + ' clips');\n clipCounter = 0;\n numOfClips = app.project.sequences[k].audioTracks[l].clips.numTracks;\n\n for (var m = 0; m < numOfClips; m++) {\n var clip = app.project.sequences[k].audioTracks[l].clips[m];\n $.pype.log('clips in audio tracks: ' + m + ' - ' + clip);\n // if a clip was deleted and another one added, the index of the new one is one or more higher\n while (clipCounter < numOfClips) { // undefined because of old clips\n if (audioTrack.getItemAt(m).name) {\n clipCounter++;\n // $.pype.log(seq.name + ' ' + audioTrack.name + ' has ' + audioTrack.getItemAt(m).name);\n\n for (var s = 0; s < sequences.length; s++) {\n if (seq.guid === sequences[s].sequenceID) {\n sequences[s].clipNames.push(audioTrack.getItemAt(m).name);\n }\n }\n }\n m++;\n }\n }\n }\n } // end if\n } // end for\n } // end getClipNames", "function calculateMedia(bClass) {\n let m = [];\n\n for (var i = 0; i < NAttr; i++) {\n let sum = 0;\n for (var j = 0; j < bClass.length; j++) {\n sum += parseFloat(bClass[j][i][0]);\n }\n m.push([sum]);\n }\n\n for (var i = 0; i < m.length; i++) {\n m[i][0] = (1 / bClass.length) * m[i][0];\n }\n\n return m;\n}", "function set_option(idx) {\n // set video timeline options\n var video_elems = document.getElementsByClassName('timeline_element');\n for (var elem of video_elems) {\n var timeline = elem.querySelector('.video_timeline');\n var _cut_points = timeline.getAttribute('points');\n var _point_classes = timeline.getAttribute('point_class');\n\n var cut_point_split = _cut_points.split(',');\n var point_classes_split = _point_classes.split(',');\n\n timeline.innerHTML = \"\"; \n \n for (var i = 0; i < cut_point_split.length; i++) {\n var cls_idx = point_classes_split[i];\n if (cls_idx.length == 0) {\n continue;\n }\n if (cls_idx == idx-1) {\n var time = cut_point_split[i];\n var time_minute = parseInt(time.substring(0,2));\n var time_second = parseInt(time.substring(3,5));\n create_cut_point_ui(elem, idx-1, time_minute*60+time_second);\n }\n }\n }\n}", "getVideoProgress(video) {\n\t\treturn this.videosProgress[video.id] !== undefined ? this.videosProgress[video.id] : 0;\n\t}", "function hoursToMinutes(array) {\n\n\n let result = array.map(movie => {\n\n let container = {};\n\n container.title = movie.title;\n container.year = movie.year;\n container.director = movie.director;\n\n let duracion = movie.duration;\n let duracionArray = duracion.split(\"h\");\n let horas = parseInt(duracionArray[0]);\n\n let minutosArray = duracionArray[1].split(\"min\");\n let minutos = parseInt(minutosArray[0]);\n\n if (isNaN(minutos)) {\n minutos = 0;\n } \n\n let duracionMinutos = (horas * 60) + minutos;\n console.log(duracionMinutos);\n \n container.duration = duracionMinutos;\n container.genre = movie.genre;\n container.score = movie.score;\n\n return container;\n });\n\n return result;\n}", "parse( objdata )\r\n\t{\r\n\t\tvar lines = objdata.split('\\n');\r\n\t\tfor ( var i=0; i<lines.length; ++i ) \r\n\t\t{\r\n\t\t\tvar line = lines[i].trim();\r\n\t\t\tvar elem = line.split(/\\s+/);\r\n\t\t\tswitch ( elem[0][0] ) \r\n\t\t\t{\r\n\t\t\t\t// Vértices...\r\n\t\t\t\tcase 'v':\r\n\t\t\t\t\tswitch ( elem[0].length ) \r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t// Coordenadas de los vértices\r\n\t\t\t\t\t\tcase 1:\r\n\t\t\t\t\t\t\tthis.vpos.push( [ parseFloat(elem[1]), parseFloat(elem[2]), parseFloat(elem[3]) ] );\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\tcase 2:\r\n\t\t\t\t\t\t\tswitch ( elem[0][1] ) \r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t// Coordenada de textura\r\n\t\t\t\t\t\t\t\tcase 't':\r\n\t\t\t\t\t\t\t\t\tthis.tpos.push( [ parseFloat(elem[1]), parseFloat(elem[2]) ] );\r\n\t\t\t\t\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t\t\t\t\t// Normal\r\n\t\t\t\t\t\t\t\tcase 'n':\r\n\t\t\t\t\t\t\t\t\tthis.norm.push( [ parseFloat(elem[1]), parseFloat(elem[2]), parseFloat(elem[3]) ] );\r\n\t\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t// Caras...\r\n\t\t\t\tcase 'f':\r\n\t\t\t\t\tvar f=[], tf=[], nf=[];\r\n\t\t\t\t\tfor ( var j=1; j<elem.length; ++j ) \r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tvar ids = elem[j].split('/');\r\n\t\t\t\t\t\tvar vid = parseInt(ids[0]);\r\n\r\n\t\t\t\t\t\tif ( vid < 0 ) vid = this.vpos.length + vid + 1;\r\n\t\t\t\t\t\tf.push( vid - 1 );\r\n\r\n\t\t\t\t\t\tif ( ids.length > 1 && ids[1] !== \"\" ) \r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tvar tid = parseInt(ids[1]);\r\n\t\t\t\t\t\t\tif ( tid < 0 ) tid = this.tpos.length + tid + 1;\r\n\t\t\t\t\t\t\ttf.push( tid - 1 );\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\tif ( ids.length > 2 && ids[2] !== \"\" ) \r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tvar nid = parseInt(ids[2]);\r\n\t\t\t\t\t\t\tif ( nid < 0 ) nid = this.norm.length + nid + 1;\r\n\t\t\t\t\t\t\tnf.push( nid - 1 );\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tthis.face.push(f);\r\n\t\t\t\t\tif ( tf.length ) this.tfac.push(tf);\r\n\t\t\t\t\tif ( nf.length ) this.nfac.push(nf);\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t}", "getVideos(){\n return this.getFiles().forEach(file => file.convert());\n }", "function getDivs() {\n let len = Number(document.getElementById('changeDivs').value);\n let width = calculateWidth(len);\n let margin = calculateMargin(len);\n return [len, width, margin];\n}", "function nextSegment() {\n if (editor.splitData && editor.splitData.splits) {\n var playerPaused = getPlayerPaused();\n if (!playerPaused) {\n pauseVideo();\n }\n\n var currSplitItem = getCurrentSplitItem();\n var new_id = currSplitItem.id + 1;\n\n new_id = (new_id >= editor.splitData.splits.length) ? 0 : new_id;\n\n var idFound = true;\n if ((new_id < 0) || (new_id >= editor.splitData.splits.length)) {\n idFound = false;\n }\n /*\n\telse if (!editor.splitData.splits[new_id].enabled) {\n idFound = false;\n new_id = (new_id >= (editor.splitData.splits.length - 1)) ? 0 : new_id;\n\n for (var i = new_id + 1; i < editor.splitData.splits.length; ++i) {\n if (editor.splitData.splits[i].enabled) {\n new_id = i;\n idFound = true;\n break;\n }\n }\n }\n\t*/\n if (!idFound) {\n for (var i = 0; i < new_id; ++i) {\n // if (editor.splitData.splits[i].enabled) {\n new_id = i;\n idFound = true;\n break;\n // }\n }\n }\n\n if (idFound) {\n selectSegmentListElement(new_id, !playerPaused);\n }\n if (!playerPaused) {\n playVideo();\n }\n }\n}", "get numberOfVampiresFromOriginal() {\n let vamp = this;\n let count = 0;\n\n while (vamp.creator) {\n vamp = vamp.creator;\n count++;\n }\n\n return count;\n }", "function GetSizeOfItems(ns) {\n var ns2 = (ns == 'w') ? 'width' : 'height', ns3 = (ns == 'w') ? 'Width' : 'Height', names = [ns + 'Self', ns + 'ToPadding', ns + 'ToBorder', ns + 'ToMargin'];\n // Reset property at first\n for (i = 0; i < names.length; i++) {\n p[names[i]] = [];\n }\n // Setup each item\n va.$pagItem.each(function () {\n var $itemCur = $(this), dSelf = M.R(M[ns3]($itemCur)), \n // Distance around of item: padding, border, margin\n dPadding = M.R(M['Inner' + ns3]($itemCur) - dSelf), dPadToBor = M.R(M['Outer' + ns3]($itemCur) - dSelf), dPadToMar = M.R(M['Outer' + ns3]($itemCur, true) - dSelf);\n // Setup size of pagItem when have option: width, height, minWidth, maxWidth...\n var optsMin = opag['min' + ns3], optsMax = opag['max' + ns3];\n if ($.isNumeric(opag[ns2]))\n dSelf = opag[ns2];\n if ($.isNumeric(optsMin) && dSelf < optsMin)\n dSelf = optsMin;\n if ($.isNumeric(optsMax) && dSelf > optsMax)\n dSelf = optsMax;\n // Push all size into array[]\n // Part size is sum -> because size 'self' can change\n p[names[0]].push(dSelf);\n p[names[1]].push(dSelf + dPadding);\n p[names[2]].push(dSelf + dPadToBor);\n p[names[3]].push(dSelf + dPadToMar);\n });\n /**\n * SETUP OTHER SIZE\n * + Size Min - Max of pagItem\n * + Total size of all pagItems\n */\n p[ns + 'Min'] = Math.min.apply(null, p[names[0]]);\n p[ns + 'Max'] = Math.max.apply(null, p[names[0]]);\n p[ns + 'Sum'] = M.Sum(p[names[3]]);\n }", "load(data) {\n super.load(data);\n const videoInfo = _1.BaseVideo.parseRawData(data);\n this.watchingCount = +videoInfo.viewCount.videoViewCountRenderer.viewCount.runs\n .map((r) => r.text)\n .join(\" \")\n .replace(/[^0-9]/g, \"\");\n this.chatContinuation =\n data[3].response.contents.twoColumnWatchNextResults.conversationBar.liveChatRenderer.continuations[0].reloadContinuationData.continuation;\n return this;\n }", "function LoadingVideoThumbs(arrayVideo = []){\n\tvar itemHtml;\n\t\n\tg_currentVideoThumbArray = arrayVideo;\n\t//clear media items in media gallery\n\t$(\"#video-thumb-grid-container\").empty();\n\n\tfor(let i = 0; i < arrayVideo.length; i++){\n\t\tvar imageUrl, strName;\n\t\tvar fileInfo = [];\n\t\t\n\t\tfileInfo = arrayVideo[i];\n\t\timageUrl = fileInfo[\"path\"];\n\t\tstrName = fileInfo[\"name\"];\n\n\t\titemHtml = `<div class=\"col-md-4 media-logo\" id=\"video-thumb-logo-container-`+ i +`\">\n\t\t\t\t\t\t<button class=\"media-logo-btn\" onclick=\"OnVideoThumbSelect(`+ i +`);\" >\n\t\t\t\t\t\t\t<img class=\"img-fluid media-logo-img\" src=\"`+ imageUrl +`\" alt=\"\">\n\t\t\t\t\t\t</button>\n\t\t\t\t\t\t<label class=\"media-menu-txt\">` + strName + `</label>\n\t\t\t\t\t</div>`;\n\t\t$(\"#video-thumb-grid-container\").append(itemHtml);\n\t}\n\t\n\tif(g_currentVideoThumbArray.length > 0){\n\t\tOnVideoThumbSelect(0);\n\t}\n}", "function initVideoBackgroundSize(){\n\t\"use strict\";\n\t\n\t$j('.section .video-wrap').each(function(i){\n\t\t\n\t\tvar $sectionWidth = $j(this).closest('.section').outerWidth();\n\t\t$j(this).width($sectionWidth);\n\t\t\n\t\tvar $sectionHeight = $j(this).closest('.section').outerHeight();\n\t\tmin_w = vid_ratio * ($sectionHeight+20);\n\t\t$j(this).height($sectionHeight);\n\t\n\t\tvar scale_h = $sectionWidth / video_width_original;\n\t\tvar scale_v = ($sectionHeight - header_height) / video_height_original; \n\t\tvar scale = scale_v;\n\t\tif (scale_h > scale_v)\n\t\t\tscale = scale_h;\n\t\tif (scale * video_width_original < min_w) {scale = min_w / video_width_original;}\n\t\t\t\t\n\t\t$j(this).find('video, .mejs-overlay, .mejs-poster').width(Math.ceil(scale * video_width_original +2));\n\t\t$j(this).find('video, .mejs-overlay, .mejs-poster').height(Math.ceil(scale * video_height_original +2));\n\t\t$j(this).scrollLeft(($j(this).find('video').width() - $sectionWidth) / 2);\n\t\t$j(this).find('.mejs-overlay, .mejs-poster').scrollTop(($j(this).find('video').height() - ($sectionHeight)) / 2);\n\t\t$j(this).scrollTop(($j(this).find('video').height() - ($sectionHeight)) / 2);\n\t});\n\t\n\t$j('.carousel .item .video .video-wrap').each(function(i){\n\t\t\n\t\tvar $slideWidth = $j(window).width();\n\t\t$j(this).width($slideWidth);\n\t\t\n\t\tvar mob_header = $j(window).width() < 1000 ? $j('header.page_header').height() - 6 : 0; // 6 is because of the display: inline-block\n\t\tvar $slideHeight = $j(this).closest('.carousel.slide').height() - mob_header;\n\t\t\n\t\tmin_w = vid_ratio * ($slideHeight+20);\n\t\t$j(this).height($slideHeight);\n\t\n\t\tvar scale_h = $slideWidth / video_width_original;\n\t\tvar scale_v = ($slideHeight - header_height) / video_height_original; \n\t\tvar scale = scale_v;\n\t\tif (scale_h > scale_v)\n\t\t\tscale = scale_h;\n\t\tif (scale * video_width_original < min_w) {scale = min_w / video_width_original;}\n\t\t\t\t\n\t\t$j(this).find('video, .mejs-overlay, .mejs-poster').width(Math.ceil(scale * video_width_original +2));\n\t\t$j(this).find('video, .mejs-overlay, .mejs-poster').height(Math.ceil(scale * video_height_original +2));\n\t\t$j(this).scrollLeft(($j(this).find('video').width() - $slideWidth) / 2);\n\t\t$j(this).find('.mejs-overlay, .mejs-poster').scrollTop(($j(this).find('video').height() - ($slideHeight)) / 2);\n\t\t$j(this).scrollTop(($j(this).find('video').height() - ($slideHeight)) / 2);\n\t});\n\t\n\t$j('.portfolio_single .video .video-wrap, .blog_holder .video .video-wrap').each(function(i){ \n \n\t\tvar $this = $j(this); \n\n\t\tvar $videoWidth = $j(this).closest('.video').outerWidth(); \n\t\t$j(this).width($videoWidth); \n\t\tvar $videoHeight = ($videoWidth*9)/16; \n\n\t\tif(navigator.userAgent.match(/(Android|iPod|iPhone|iPad|IEMobile|Opera Mini)/)){ \n\t\t\t$this.parent().width($videoWidth); \n\t\t\t$this.parent().height($videoHeight); \n\t\t} \n\n\t\tmin_w = vid_ratio * ($videoHeight+20); \n\t\t$j(this).height($videoHeight); \n\n\t\tvar scale_h = $videoWidth / video_width_original; \n\t\tvar scale_v = ($videoHeight - header_height) / video_height_original; \n\t\tvar scale = scale_v; \n\t\tif (scale_h > scale_v) \n\t\t\tscale = scale_h; \n\t\tif (scale * video_width_original < min_w) {scale = min_w / video_width_original;} \n\n\t\t$j(this).find('video, .mejs-overlay, .mejs-poster').width(Math.ceil(scale * video_width_original +2)); \n\t\t$j(this).find('video, .mejs-overlay, .mejs-poster').height(Math.ceil(scale * video_height_original +2)); \n\t\t$j(this).scrollLeft(($j(this).find('video').width() - $videoWidth) / 2); \n\t\t$j(this).find('.mejs-overlay, .mejs-poster').scrollTop(($j(this).find('video').height() - ($videoHeight)) / 2); \n\t\t$j(this).scrollTop(($j(this).find('video').height() - ($videoHeight)) / 2); \n\t}); \n\t\n}", "function pagination() {\n return function (input, pageth, elPerPage) {\n\n if (!input || !input.length) return;\n\n // var videoPerPage = window.constants.VIDEO_PER_PAGE;\n // elPerPage = parseInt(elPerPage);\n\n pageth = parseInt(pageth);\n elPerPage = parseInt(elPerPage);\n\n let numEl = input.length;\n let start = (pageth - 1) * elPerPage;\n let end = start + elPerPage;\n\n // //console.log('==========')\n // //console.log(`num ele ${numEl}`);\n // //console.log(`page: ${pageth}`);\n // //console.log(`elperpage: ${elPerPage}`);\n // //console.log(`start: ${start}`);\n // //console.log(`end: ${end}`);\n // if (pageth > numEl / elPerPage + 1) return; // pageth > num pages\n return input.slice(start, end);\n\n \n }\n}", "function fn_videolist(data) {\n var mainUl = document.getElementById('mainUl');\n var maindiv = document.getElementById('maindiv');\n\n $.ajax({\n url: data,\n type: \"get\",\n dataType: \"json\",\n beforeSend: function() {\n var imgLoad = document.getElementById(\"imgLoad\");\n },\n success: function(data, textStatus, jqXHR) {\n\n\n\n array = data_to_array(data);\n var navigation_pos = window.localStorage.getItem(\"titlepos\");\n var subtitle_pos = window.localStorage.getItem(\"subtitlepos\");\n\n var from_search_page = window.localStorage.getItem(\"from_search_list\");\n\n var level3pos = window.localStorage.getItem(\"level3pos\");\n\n\n $(\".title_name\").html(array['navigation'][navigation_pos]['subtitle'][subtitle_pos]['level3'][level3pos]['titlename']);\n\n var niveauLength = array['navigation'][navigation_pos]['subtitle'][subtitle_pos]['level3'][level3pos]['videourl'].length;\n if (niveauLength > 4)\n\n {\n $(\".gym-content\").addClass(\"sixitem\");\n\n }\n\n\n for (var i = 0; i < array['navigation'][navigation_pos]['subtitle'][subtitle_pos]['level3'][level3pos]['videourl'].length; i++) {\n var video = array['navigation'][navigation_pos]['subtitle'][subtitle_pos]['level3'][level3pos]['videourl'];\n\n\n if (i == 0) {\n\n var init_load_value = video[0]['videolist'];\n var logo = $(\".logo\").height();\n var imgLoad = $(\".imgLoad\").height();\n var contenttop = $(\".content-top\").height();\n var clr = $(\".clr\").height();\n var accormvideolist = $(\".accor-m video-list-new-layout\").height();\n var divForm = $(\"#divForm\").height();\n var accormdownloadpage = $(\"#accor-m download-page\").height();\n var totalheight = logo + imgLoad + contenttop + clr + accormvideolist + divForm + accormdownloadpage;\n var videoHeight = window.innerHeight - totalheight;\n if (window.innerHeight > window.innerWidth) {\n var deviceType = (navigator.userAgent.match(/iPad/i)) == \"iPad\" ? \"iPad\" : (navigator.userAgent.match(/iPhone/i)) == \"iPhone\" ? \"iPhone\" : (navigator.userAgent.match(/Android/i)) == \"Android\" ? \"Android\" : (navigator.userAgent.match(/BlackBerry/i)) == \"BlackBerry\" ? \"BlackBerry\" : \"null\";\n\n //alert(deviceType);\n if (deviceType == \"iPad\") {\n var size = (window.innerHeight * 300) / 1024;\n videoHeight = videoHeight - size;\n }\n }\n\n\n\n file_exist_download(init_load_value[0]['title'], init_load_value[0]['file'], init_load_value[0]['image'], videoHeight, window.innerWidth);\n\n\n\n if (from_search_page == \"true\") {\n\n var video_type_pos = window.localStorage.getItem(\"videotypepos\");\n console.log(\"video type pos :>\" + video_type_pos);\n\n fn_subtitle_videolist(array, video_type_pos);\n\n\n } else {\n fn_subtitle_videolist(data, i);\n\n\n window.localStorage.setItem(\"videoname\", init_load_value[0]['title']);\n window.localStorage.setItem(\"videourl\", init_load_value[0]['file']);\n window.localStorage.setItem(\"videoimage\", init_load_value[0]['image']);\n\n\n\n\n }\n\n }\n\n var innerli = document.createElement('li');\n innerli.setAttribute('class', \"innerli\");\n innerli.setAttribute('id', i);\n innerli.setAttribute('ida', i);\n var innerA = document.createElement('a');\n\n innerA.setAttribute('class', 'ui-link');\n\n\n var span = document.createElement('span');\n span.innerHTML = video[i]['titlename'];\n innerli.setAttribute('name', video[i]['titlename']);\n innerA.appendChild(span);\n\n innerli.appendChild(innerA);\n\n mainUl.appendChild(innerli);\n\n }\n var LevelId = array['navigation'][navigation_pos]['subtitle'][subtitle_pos]['level3'][level3pos]['id'];\n if (LevelId == \"levelid33\" || LevelId == \"levelid21\" || LevelId == \"levelid29\" || LevelId == \"levelid23\") {\n\n setTimeout(function() {\n $(\"#videolistul li\").remove();\n if (LevelId == \"levelid23\") {\n window.localStorage.setItem(\"videoid\", \"3\");\n fn_subtitle_videolist(array, \"3\");\n } else {\n\n\n window.localStorage.setItem(\"videoid\", \"2\");\n fn_subtitle_videolist(array, \"2\");\n }\n\n }, 2500);\n }\n\n\n jQuery(\".innerli\").click(function() {\n\n var id = $(this).attr('ida');\n var navigation_pos = window.localStorage.getItem(\"titlepos\");\n if (navigation_pos == \"11\") {\n window.localStorage.setItem(\"Niveau\", id);\n }\n var name = $(this).attr('name');\n window.localStorage.setItem(\"videoid\", id);\n $(\"#videolistul li\").remove();\n fn_subtitle_videolist(array, id);\n\n\n\n });\n },\n error: function(jqXHR, textStatus, errorThrown) {\n console.log('error loading data :' + errorThrown);\n var imgLoad = document.getElementById(\"imgLoad\");\n imgLoad.style.display = \"none\";\n }\n });\n}", "toJSON() {\n let parts = [];\n for (let i = 0; i < this.sections.length; i += 2) {\n let len = this.sections[i], ins = this.sections[i + 1];\n if (ins < 0)\n parts.push(len);\n else if (ins == 0)\n parts.push([len]);\n else\n parts.push([len].concat(this.inserted[i >> 1].toJSON()));\n }\n return parts;\n }", "function pazymiuVidurkis(){\n var a=5;\n var b=10;\n var c=8;\n var d=6;\n var e=8;\n var vid=(a+b+c+d+e)/5;\n console.log(\"Pazymiai:\",a+\";\",b+\";\",c+\";\",d+\";\",e+\";\",\"Pazymiu vidurkis:\",vid+\";\");\n}", "function getAllVideos(){\n var contents = Contents_Live.find({ \"code\": Session.get(\"UserLogged\").code });\n var videosArray = [];\n contents.forEach(function(doc){\n var res = doc.contentType.split(\"/\");\n if(res[0] == \"video\"){\n var obj = {\n '_id': doc._id,\n 'videoName': doc.contentName\n };\n videosArray.push(obj);\n }\n });\n if(videosArray.length > 0){\n return videosArray;\n }else{\n return null;\n }\n}", "get numberOfVampiresFromOriginal() {\n let vampCount = 0;\n let currentVamp = this;\n while (currentVamp.creator !== null) {\n vampCount += 1;\n currentVamp = currentVamp.creator;\n }\n return vampCount;\n }", "function getReadingOrientationNumbers() {\n let temp = Array.prototype.slice.call(document.getElementsByClassName('tap-box'));\n let ret = [];\n\n let one = 0;\n let two = 9;\n let three = 18;\n for (let i = 0; i < 3; i++) {\n for (let j = 0; j < 3; j++) {\n Array.prototype.push.apply(ret, temp.slice(one, one + 3));\n Array.prototype.push.apply(ret, temp.slice(two, two + 3));\n Array.prototype.push.apply(ret, temp.slice(three, three + 3));\n one = one + 3;\n two = two + 3;\n three = three + 3;\n }\n one = one + 18;\n two = two + 18;\n three = three + 18;\n }\n return ret;\n}", "function getReadingOrientationNumbers() {\n let temp = Array.prototype.slice.call(document.getElementsByClassName('tap-box'));\n let ret = [];\n\n let one = 0;\n let two = 9;\n let three = 18;\n for (let i = 0; i < 3; i++) {\n for (let j = 0; j < 3; j++) {\n Array.prototype.push.apply(ret, temp.slice(one, one + 3));\n Array.prototype.push.apply(ret, temp.slice(two, two + 3));\n Array.prototype.push.apply(ret, temp.slice(three, three + 3));\n one = one + 3;\n two = two + 3;\n three = three + 3;\n }\n one = one + 18;\n two = two + 18;\n three = three + 18;\n }\n return ret;\n}", "function extraerMediasExactasPortero(html) {\r\n\tvar mediasExactas = new Array();\r\n\tmediasExactas[\"calidad\"] = extraerMediaExactaStat(\"calidad\", html);\r\n\tmediasExactas[\"resistencia\"] = extraerMediaExactaStat(\"resistencia\", html);\r\n\tmediasExactas[\"velocidad\"] = extraerMediaExactaStat(\"velocidad\", html);\r\n\tmediasExactas[\"pase\"] = extraerMediaExactaStat(\"pase\", html);\r\n\tmediasExactas[\"entradas\"] = extraerMediaExactaStat(\"entradas\", html);\r\n\tmediasExactas[\"agresividad\"] = extraerMediaExactaStat(\"agresividad\", html);\r\n\tmediasExactas[\"remate\"] = extraerMediaExactaStat(\"agilidad\", html);\r\n\tmediasExactas[\"tiro\"] = extraerMediaExactaStat(\"paradas\", html);\r\n\tmediasExactas[\"conduccion\"] = extraerMediaExactaStat(\"faltas\", html);\r\n\tmediasExactas[\"desmarque\"] = extraerMediaExactaStat(\"penaltys\", html);\r\n\tmediasExactas[\"mediareal\"] = calcularMediaRealJugador(mediasExactas);\r\n\treturn mediasExactas;\r\n}", "function turnHoursToMinutes(movieLength) {\n const total = movieLength.map((value, index, originalArray) => {\n return {duration: value.duration};\n });\n//console.log(total);\n const minsArray = total.map((value, index, originalArray) => {\n let totalMin = 0;\n let durationSplit = value.duration.split(' ');\n //console.log(\"split\", durationSplit);\n for (let i = 0; i < durationSplit.length; i++){\n if(durationSplit[i].includes('h')){\n totalMin += parseInt(durationSplit[i])*60;\n } else {\n totalMin += parseInt(durationSplit[i]);\n }\n }\n return {duration: totalMin};\n\n });\n\n //console.log(\"HERE\",minsArray);\n\n // let parsed = parseInt('h');\n // if (isNaN(parsed)) { return 0 }\n // return parsed * 60;\n return minsArray;\n}", "async function main() {\n try {\n // const {results} = await obterPessoas('la')\n // primeiro pegar o peso\n // const pesos = results.map(item => parseInt(item.height))\n // vai vir um array de ints ex: [20, 40, 11] = ?\n // const total = pesos.reduce((anterior, proximo) => {\n // return anterior + proximo\n // })\n // console.log('pesos', pesos)\n // console.log('total de pesos', total)\n\n // agora pegar um valor de listas\n const minhaLista = [\n ['Erick', 'Weldel'],\n ['NodeBR', 'Nerdzão']\n ]\n const total = minhaLista.meuReduce((anterior, proximo) => {\n return anterior.concat(proximo)\n }, [])\n .join(', ')\n\n console.log('total', total)\n } catch (error) {\n console.error('DEU RUIM', error)\n }\n}" ]
[ "0.637815", "0.60176593", "0.55935615", "0.55656695", "0.5530902", "0.55077314", "0.54658556", "0.544976", "0.544976", "0.543223", "0.54244405", "0.53835005", "0.53707284", "0.5365971", "0.53656", "0.5351448", "0.53184927", "0.52987015", "0.5260848", "0.52544564", "0.5252349", "0.52302396", "0.5200068", "0.51683575", "0.5161799", "0.50885576", "0.50885576", "0.50872505", "0.5071021", "0.5065158", "0.50646204", "0.50523245", "0.5031946", "0.5031166", "0.5012978", "0.5006233", "0.5006038", "0.50029653", "0.49991298", "0.49988395", "0.49618527", "0.49538216", "0.4952781", "0.49480402", "0.49464408", "0.49364913", "0.49285027", "0.4910156", "0.4909019", "0.49069196", "0.49013683", "0.48969612", "0.4874483", "0.486569", "0.486037", "0.4851867", "0.48494005", "0.48481047", "0.48336375", "0.48207068", "0.48178846", "0.48164007", "0.48089653", "0.47992083", "0.47973073", "0.4795973", "0.47955483", "0.4774333", "0.47717717", "0.47658762", "0.4763946", "0.47507796", "0.47449732", "0.474348", "0.47401562", "0.4737604", "0.47358063", "0.47340018", "0.47327873", "0.47276714", "0.47267786", "0.4726692", "0.47247696", "0.47231275", "0.47182372", "0.4712307", "0.47104043", "0.47069693", "0.47013274", "0.4700641", "0.46990374", "0.4696549", "0.46875897", "0.46852323", "0.46821934", "0.46813938", "0.46813938", "0.4679581", "0.467867", "0.46781033" ]
0.52928656
18
Patch records for all destroyed widgets must be added because we need a DOM node reference for the destroy function
function destroyWidgets(vNode, patch, index) { if (isWidget(vNode)) { if (typeof vNode.destroy === "function") { patch[index] = appendPatch( patch[index], new VPatch(VPatch.REMOVE, vNode, null) ) } } else if (isVNode(vNode) && (vNode.hasWidgets || vNode.hasThunks)) { var children = vNode.children var len = children.length for (var i = 0; i < len; i++) { var child = children[i] index += 1 destroyWidgets(child, patch, index) if (isVNode(child) && child.count) { index += child.count } } } else if (isThunk(vNode)) { thunks(vNode, null, patch, index) } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function destroyWidgets ( vNode, patch, index ) {\n if ( isWidget( vNode ) ) {\n if ( typeof vNode.destroy === \"function\" ) {\n patch[ index ] = appendPatch(\n patch[ index ],\n new VPatch( VPatch.REMOVE, vNode, null )\n )\n }\n } else if ( isVNode( vNode ) && (vNode.hasWidgets || vNode.hasThunks) ) {\n var children = vNode.children\n var len = children.length\n for ( var i = 0; i < len; i++ ) {\n var child = children[ i ]\n index += 1\n\n destroyWidgets( child, patch, index )\n\n if ( isVNode( child ) && child.count ) {\n index += child.count\n }\n }\n } else if ( isThunk( vNode ) ) {\n thunks( vNode, null, patch, index )\n }\n }", "function detached() {\n var id = widget.objectID;\n var notWidget = Nevow.Athena.Widget._athenaWidgets[id];\n detachCalls.push([widget.widgetParent, notWidget]);\n }", "function destroyWidgets(vNode, patch, index) {\n if (isWidget(vNode)) {\n if (typeof vNode.destroy === \"function\") {\n patch[index] = new VPatch(VPatch.REMOVE, vNode, null)\n }\n } else if (isVNode(vNode) && vNode.hasWidgets) {\n var children = vNode.children\n var len = children.length\n for (var i = 0; i < len; i++) {\n var child = children[i]\n index += 1\n\n destroyWidgets(child, patch, index)\n\n if (isVNode(child) && child.count) {\n index += child.count\n }\n }\n }\n}", "function destroyWidgets(vNode, patch, index) {\n if (isWidget(vNode)) {\n if (typeof vNode.destroy === \"function\") {\n patch[index] = new VPatch(VPatch.REMOVE, vNode, null)\n }\n } else if (isVNode(vNode) && vNode.hasWidgets) {\n var children = vNode.children\n var len = children.length\n for (var i = 0; i < len; i++) {\n var child = children[i]\n index += 1\n\n destroyWidgets(child, patch, index)\n\n if (isVNode(child) && child.count) {\n index += child.count\n }\n }\n }\n}", "function destroyWidgets(vNode, patch, index) {\n if (isWidget(vNode)) {\n if (typeof vNode.destroy === \"function\") {\n patch[index] = new VPatch(VPatch.REMOVE, vNode, null)\n }\n } else if (isVNode(vNode) && vNode.hasWidgets) {\n var children = vNode.children\n var len = children.length\n for (var i = 0; i < len; i++) {\n var child = children[i]\n index += 1\n\n destroyWidgets(child, patch, index)\n\n if (isVNode(child) && child.count) {\n index += child.count\n }\n }\n }\n}", "function destroyWidgets(vNode, patch, index) {\n if (isWidget(vNode)) {\n if (typeof vNode.destroy === \"function\") {\n patch[index] = new VPatch(VPatch.REMOVE, vNode, null)\n }\n } else if (isVNode(vNode) && vNode.hasWidgets) {\n var children = vNode.children\n var len = children.length\n for (var i = 0; i < len; i++) {\n var child = children[i]\n index += 1\n\n destroyWidgets(child, patch, index)\n\n if (isVNode(child) && child.count) {\n index += child.count\n }\n }\n }\n}", "clean () {\n for (var d = 0; d < this.data.length; d++) {\n // Remove empty rows\n if (!this.data[d].length) { this.data.splice(d, 1); this.clean(); return }\n\n // Loop through data and make sure each widget has an id\n for (var w = 0; w < this.data[d].length; w++) {\n this.cleanWidget(this.data[d][w])\n }\n }\n\n this.onChange(JSON.parse(JSON.stringify(this.data)))\n }", "function destroyWidgets(vNode, patch, index) {\n if (isWidget(vNode)) {\n if (typeof vNode.destroy === \"function\") {\n patch[index] = appendPatch(\n patch[index],\n new VPatch(VPatch.REMOVE, vNode, null)\n )\n }\n } else if (isVNode(vNode) && (vNode.hasWidgets || vNode.hasThunks)) {\n var children = vNode.children\n var len = children.length\n for (var i = 0; i < len; i++) {\n var child = children[i]\n index += 1\n\n destroyWidgets(child, patch, index)\n\n if (isVNode(child) && child.count) {\n index += child.count\n }\n }\n } else if (isThunk(vNode)) {\n thunks(vNode, null, patch, index)\n }\n }", "function destroyWidgets(vNode, patch, index) {\n if (isWidget(vNode)) {\n if (typeof vNode.destroy === \"function\") {\n patch[index] = appendPatch(\n patch[index],\n new VPatch(VPatch.REMOVE, vNode, null)\n )\n }\n } else if (isVNode(vNode) && (vNode.hasWidgets || vNode.hasThunks)) {\n var children = vNode.children\n var len = children.length\n for (var i = 0; i < len; i++) {\n var child = children[i]\n index += 1\n\n destroyWidgets(child, patch, index)\n\n if (isVNode(child) && child.count) {\n index += child.count\n }\n }\n }\n}", "destroy () {\n // unbind event handlers and clear elements created\n }", "function destroyWidgets(vNode, patch, index) {\n\t if (isWidget(vNode)) {\n\t if (typeof vNode.destroy === \"function\") {\n\t patch[index] = appendPatch(\n\t patch[index],\n\t new VPatch(VPatch.REMOVE, vNode, null)\n\t )\n\t }\n\t } else if (isVNode(vNode) && (vNode.hasWidgets || vNode.hasThunks)) {\n\t var children = vNode.children\n\t var len = children.length\n\t for (var i = 0; i < len; i++) {\n\t var child = children[i]\n\t index += 1\n\t\n\t destroyWidgets(child, patch, index)\n\t\n\t if (isVNode(child) && child.count) {\n\t index += child.count\n\t }\n\t }\n\t } else if (isThunk(vNode)) {\n\t thunks(vNode, null, patch, index)\n\t }\n\t}", "update() {\n\t this.element.parentElement.querySelector('.widget').remove();\n\t this._init();\n\t }", "function destroyWidgets(vNode, patch, index) {\n if (isWidget(vNode)) {\n if (typeof vNode.destroy === \"function\") {\n patch[index] = appendPatch(\n patch[index],\n new VPatch(VPatch.REMOVE, vNode, null)\n )\n }\n } else if (isVNode(vNode) && (vNode.hasWidgets || vNode.hasThunks)) {\n var children = vNode.children\n var len = children.length\n for (var i = 0; i < len; i++) {\n var child = children[i]\n index += 1\n\n destroyWidgets(child, patch, index)\n\n if (isVNode(child) && child.count) {\n index += child.count\n }\n }\n } else if (isThunk(vNode)) {\n thunks(vNode, null, patch, index)\n }\n}", "function destroyWidgets(vNode, patch, index) {\n if (isWidget(vNode)) {\n if (typeof vNode.destroy === \"function\") {\n patch[index] = appendPatch(\n patch[index],\n new VPatch(VPatch.REMOVE, vNode, null)\n )\n }\n } else if (isVNode(vNode) && (vNode.hasWidgets || vNode.hasThunks)) {\n var children = vNode.children\n var len = children.length\n for (var i = 0; i < len; i++) {\n var child = children[i]\n index += 1\n\n destroyWidgets(child, patch, index)\n\n if (isVNode(child) && child.count) {\n index += child.count\n }\n }\n } else if (isThunk(vNode)) {\n thunks(vNode, null, patch, index)\n }\n}", "function destroyWidgets(vNode, patch, index) {\n if (isWidget(vNode)) {\n if (typeof vNode.destroy === \"function\") {\n patch[index] = appendPatch(\n patch[index],\n new VPatch(VPatch.REMOVE, vNode, null)\n )\n }\n } else if (isVNode(vNode) && (vNode.hasWidgets || vNode.hasThunks)) {\n var children = vNode.children\n var len = children.length\n for (var i = 0; i < len; i++) {\n var child = children[i]\n index += 1\n\n destroyWidgets(child, patch, index)\n\n if (isVNode(child) && child.count) {\n index += child.count\n }\n }\n } else if (isThunk(vNode)) {\n thunks(vNode, null, patch, index)\n }\n}", "function destroyWidgets(vNode, patch, index) {\n if (isWidget(vNode)) {\n if (typeof vNode.destroy === \"function\") {\n patch[index] = appendPatch(\n patch[index],\n new VPatch(VPatch.REMOVE, vNode, null)\n )\n }\n } else if (isVNode(vNode) && (vNode.hasWidgets || vNode.hasThunks)) {\n var children = vNode.children\n var len = children.length\n for (var i = 0; i < len; i++) {\n var child = children[i]\n index += 1\n\n destroyWidgets(child, patch, index)\n\n if (isVNode(child) && child.count) {\n index += child.count\n }\n }\n } else if (isThunk(vNode)) {\n thunks(vNode, null, patch, index)\n }\n}", "function destroyWidgets(vNode, patch, index) {\n if (isWidget(vNode)) {\n if (typeof vNode.destroy === \"function\") {\n patch[index] = appendPatch(\n patch[index],\n new VPatch(VPatch.REMOVE, vNode, null)\n )\n }\n } else if (isVNode(vNode) && (vNode.hasWidgets || vNode.hasThunks)) {\n var children = vNode.children\n var len = children.length\n for (var i = 0; i < len; i++) {\n var child = children[i]\n index += 1\n\n destroyWidgets(child, patch, index)\n\n if (isVNode(child) && child.count) {\n index += child.count\n }\n }\n } else if (isThunk(vNode)) {\n thunks(vNode, null, patch, index)\n }\n}", "function destroyWidgets(vNode, patch, index) {\n if (isWidget(vNode)) {\n if (typeof vNode.destroy === \"function\") {\n patch[index] = appendPatch(\n patch[index],\n new VPatch(VPatch.REMOVE, vNode, null)\n )\n }\n } else if (isVNode(vNode) && (vNode.hasWidgets || vNode.hasThunks)) {\n var children = vNode.children\n var len = children.length\n for (var i = 0; i < len; i++) {\n var child = children[i]\n index += 1\n\n destroyWidgets(child, patch, index)\n\n if (isVNode(child) && child.count) {\n index += child.count\n }\n }\n } else if (isThunk(vNode)) {\n thunks(vNode, null, patch, index)\n }\n}", "function destroyWidgets(vNode, patch, index) {\n if (isWidget(vNode)) {\n if (typeof vNode.destroy === \"function\") {\n patch[index] = appendPatch(\n patch[index],\n new VPatch(VPatch.REMOVE, vNode, null)\n )\n }\n } else if (isVNode(vNode) && (vNode.hasWidgets || vNode.hasThunks)) {\n var children = vNode.children\n var len = children.length\n for (var i = 0; i < len; i++) {\n var child = children[i]\n index += 1\n\n destroyWidgets(child, patch, index)\n\n if (isVNode(child) && child.count) {\n index += child.count\n }\n }\n } else if (isThunk(vNode)) {\n thunks(vNode, null, patch, index)\n }\n}", "function destroyWidgets(vNode, patch, index) {\n if (isWidget(vNode)) {\n if (typeof vNode.destroy === \"function\") {\n patch[index] = appendPatch(\n patch[index],\n new VPatch(VPatch.REMOVE, vNode, null)\n )\n }\n } else if (isVNode(vNode) && (vNode.hasWidgets || vNode.hasThunks)) {\n var children = vNode.children\n var len = children.length\n for (var i = 0; i < len; i++) {\n var child = children[i]\n index += 1\n\n destroyWidgets(child, patch, index)\n\n if (isVNode(child) && child.count) {\n index += child.count\n }\n }\n } else if (isThunk(vNode)) {\n thunks(vNode, null, patch, index)\n }\n}", "function destroyWidgets(vNode, patch, index) {\n if (isWidget(vNode)) {\n if (typeof vNode.destroy === \"function\") {\n patch[index] = appendPatch(\n patch[index],\n new VPatch(VPatch.REMOVE, vNode, null)\n )\n }\n } else if (isVNode(vNode) && (vNode.hasWidgets || vNode.hasThunks)) {\n var children = vNode.children\n var len = children.length\n for (var i = 0; i < len; i++) {\n var child = children[i]\n index += 1\n\n destroyWidgets(child, patch, index)\n\n if (isVNode(child) && child.count) {\n index += child.count\n }\n }\n } else if (isThunk(vNode)) {\n thunks(vNode, null, patch, index)\n }\n}", "function destroyWidgets(vNode, patch, index) {\n if (isWidget(vNode)) {\n if (typeof vNode.destroy === \"function\") {\n patch[index] = appendPatch(\n patch[index],\n new VPatch(VPatch.REMOVE, vNode, null)\n )\n }\n } else if (isVNode(vNode) && (vNode.hasWidgets || vNode.hasThunks)) {\n var children = vNode.children\n var len = children.length\n for (var i = 0; i < len; i++) {\n var child = children[i]\n index += 1\n\n destroyWidgets(child, patch, index)\n\n if (isVNode(child) && child.count) {\n index += child.count\n }\n }\n } else if (isThunk(vNode)) {\n thunks(vNode, null, patch, index)\n }\n}", "function destroyWidgets(vNode, patch, index) {\n if (isWidget(vNode)) {\n if (typeof vNode.destroy === \"function\") {\n patch[index] = appendPatch(\n patch[index],\n new VPatch(VPatch.REMOVE, vNode, null)\n )\n }\n } else if (isVNode(vNode) && (vNode.hasWidgets || vNode.hasThunks)) {\n var children = vNode.children\n var len = children.length\n for (var i = 0; i < len; i++) {\n var child = children[i]\n index += 1\n\n destroyWidgets(child, patch, index)\n\n if (isVNode(child) && child.count) {\n index += child.count\n }\n }\n } else if (isThunk(vNode)) {\n thunks(vNode, null, patch, index)\n }\n}", "function destroyWidgets(vNode, patch, index) {\n if (isWidget(vNode)) {\n if (typeof vNode.destroy === \"function\") {\n patch[index] = appendPatch(\n patch[index],\n new VPatch(VPatch.REMOVE, vNode, null)\n )\n }\n } else if (isVNode(vNode) && (vNode.hasWidgets || vNode.hasThunks)) {\n var children = vNode.children\n var len = children.length\n for (var i = 0; i < len; i++) {\n var child = children[i]\n index += 1\n\n destroyWidgets(child, patch, index)\n\n if (isVNode(child) && child.count) {\n index += child.count\n }\n }\n } else if (isThunk(vNode)) {\n thunks(vNode, null, patch, index)\n }\n}", "remove_widget(widget_id) {\n delete this.data[widget_id];\n }", "destroy() {\n if (!isNullOrUndefined(this.owner)) {\n this.unWireEvent();\n }\n this.pages = [];\n this.pages = undefined;\n this.fieldStacks = [];\n this.fieldStacks = undefined;\n this.splittedCellWidgets = [];\n this.splittedCellWidgets = undefined;\n this.fields = [];\n this.fields = undefined;\n if (this.layout) {\n this.layout.destroy();\n }\n this.layout = undefined;\n if (!isNullOrUndefined(this.render)) {\n this.render.destroy();\n }\n this.render = undefined;\n if (this.dialogInternal) {\n this.dialogInternal.destroy();\n }\n this.dialogInternal = undefined;\n if (this.dialogInternal2) {\n this.dialogInternal2.destroy();\n this.dialogInternal2 = undefined;\n }\n if (this.dialogTarget1 && this.dialogTarget1.parentElement) {\n this.dialogTarget1.parentElement.removeChild(this.dialogTarget1);\n }\n this.dialogTarget1 = undefined;\n if (this.dialogTarget2 && this.dialogTarget2.parentElement) {\n this.dialogTarget2.parentElement.removeChild(this.dialogTarget2);\n }\n this.dialogTarget2 = undefined;\n if (!isNullOrUndefined(this.touchStart)) {\n this.touchStart.innerHTML = '';\n }\n if (this.textHelper) {\n this.textHelper.destroy();\n }\n this.textHelper = undefined;\n this.touchStart = undefined;\n if (!isNullOrUndefined(this.touchEnd)) {\n this.touchEnd.innerHTML = '';\n }\n this.touchEnd = undefined;\n if (!isNullOrUndefined(this.containerCanvasIn)) {\n this.containerCanvasIn.innerHTML = '';\n }\n this.containerCanvasIn = undefined;\n if (!isNullOrUndefined(this.selectionCanvasIn)) {\n this.selectionCanvasIn.innerHTML = '';\n }\n this.selectionCanvasIn = undefined;\n if (!isNullOrUndefined(this.editableDiv)) {\n this.editableDiv.innerHTML = '';\n this.editableDiv.parentElement.removeChild(this.editableDiv);\n }\n this.editableDiv = undefined;\n if (!isNullOrUndefined(this.pageContainer)) {\n this.pageContainer.innerHTML = '';\n }\n this.pageContainer = undefined;\n if (!isNullOrUndefined(this.viewerContainer)) {\n this.viewerContainer.innerHTML = '';\n }\n this.viewerContainer = undefined;\n this.owner = undefined;\n this.heightInfoCollection = undefined;\n }", "destroy(){\n\n const fields = [\n this._stockNum,\n this._vin,\n this._year,\n this._make,\n this._model,\n this._miles,\n this._location,\n this._price\n ];\n\n for(let field of fields) field.clearEvents();\n if(this._parentRow.nextElementSibling) this._parentRow.nextElementSibling.getElementsByTagName(\"input\")[0].focus();\n this._parentRow.remove();\n\n this.__dispatchEvent(EVENT_OBJECT_DESTROYED, new ObjectDestroyedEventArgs(this));\n }", "function onDOMChanged(records) {\n records.forEach(function(record) {\n switch (record.type) {\n case 'attributes':\n watch(record.target);\n break;\n\n case 'childList':\n toArray(record.addedNodes).forEach(watch);\n toArray(record.removedNodes).forEach(unwatch);\n break;\n }\n });\n }", "__destroy() {\n this.__removeChildren();\n this.__remove();\n }", "function afterEach(){\n\t\tgrid.domNode.style.display = \"\";\n\n\t\tfor(var i = handles.length; i--;){\n\t\t\thandles[i].remove && handles[i].remove();\n\t\t}\n\t\thandles = [];\n\t}", "function mod_change_records() {\n //\n document.getElementById('content-div').removeAll();\n document.getElementById('modify-header').removeAll();\n document.getElementById('input-div').removeAll();\n //\n //\n var head_elements = Array(\n {'elm' : 'H4','textNode' : 'Click on a record in the table to modify it.'},\n {'elm' : 'LABEL', 'className' : 'label', 'textNode' : 'Show Deleted Records'},\n {'elm' : 'INPUT', 'id' : 'show-deleted', 'type' : 'checkbox', 'events' : [{'event' : 'click', 'function' : gen_stock_table.bind(null,1,'creation_timestamp','DESC')}]},\n {'elm' : 'BR'},\n {'elm' : 'LABEL', 'className' : 'label-12em', 'textNode' : 'Narrow by Item Number:'},\n {'elm' : 'INPUT', 'id' : 'search-item-number', 'type' : 'text', 'events' : [{'event' : 'keyup', 'function' : gen_stock_table.bind(null,1,'creation_timestamp','DESC')}]}\n );\n //\n addChildren(document.getElementById('input-div'),head_elements);\n //\n gen_stock_table(1,'creation_timestamp','DESC');\n}", "function killListElement() {\n\n Array.prototype.forEach.call($scope.childNodes, function (el, i) {\n var Elname = dom.getName(el);\n if (typeof Elname === 'undefined') {\n el.parentNode.removeChild(el);\n } else {\n var name = /\\[(.*?)\\]/gi.exec(Elname)[1];\n\n if (!model.get(Elname)\n || typeof field[name] === 'undefined'\n || !cls.preRenderView($scope, field[name])) {\n\n el.parentNode.removeChild(el);\n }\n }\n\n });\n\n }", "function destroy() {\n var jqMe = element.jqSelf();\n jqMe.html();\n }", "beforeDestroy () {\n unwatchAll(this);\n }", "destroy() {\n window.removeEventListener('resize', this._boundResizeHandler);\n\n if(this._watcher && this._watcher.type === 'event') {\n document.body.removeEventListener('DOMNodeInserted', this._watcher.handler);\n document.body.removeEventListener('DOMNodeRemoved', this._watcher.handler);\n } else if(this._watcher && this._watcher.type === 'observer') {\n this._watcher.handler.disconnect();\n }\n\n this.rows = [];\n\n [...this.element.children].forEach((child) => {\n child.style.top = '';\n child.style[this.options.direction] = '';\n });\n\n this.options = null;\n this.element.style.height = '';\n this.element = null;\n }", "moveWidget (widgetId, location) {\n for (var r = 0; r < this.data.length; r++) {\n for (var w = 0; w < this.data[r].length; w++) {\n if (String(this.data[r][w].id) === String(widgetId)) {\n let widget = Object.assign({}, this.data[r][w])\n // Remove from data\n this.data[r].splice(w, 1)\n\n // Add to data\n this.addWidget(widget, location)\n\n this.clean()\n return\n }\n }\n }\n }", "update() {\n\t /**\n\t * It is somewhat complex to properly update, especially when the widget is currently\n\t * showing a list of geotrace/geoshape points. Hence we use the inefficient but robust\n\t * method to re-initialize instead.\n\t */\n\t const widget = this.element.parentElement.querySelector('.widget');\n\t if (widget) {\n\t widget.remove();\n\t this.loadMap = undefined;\n\t this.map = undefined;\n\t this.polyline = undefined;\n\t this.polygon = undefined;\n\t this._init();\n\t }\n\t }", "function destroy() {\n\t\t\t\tdocument.removeEventListener(eventType.WIDGET_DEFINED, defineWidget, true);\n\t\t\t\tdocument.removeEventListener(eventType.DESTROY, destroy, false);\n\t\t\t}", "function doWbWidgetsFinalize() {\n if(_createEventsHandle) { //unsubscribe from 'widget create' events\n dojo.unsubscribe(_createEventsHandle);\n _createEventsHandle = null;\n }\n\n if(_commandEventsHandle) {//unsubscribe from 'command' events\n dojo.unsubscribe(_commandEventsHandle);\n _commandEventsHandle=null;\n }\n \n for(ndx in _widgets) { //if there are any widgets and any are subscribed, then unsubscribe them\n if(_widgets[ndx].unsubscribeFromEvents)\n _widgets[ndx].unsubscribeFromEvents();\n }\n}", "static actualize() {\n for (let i = 0; i < refs.length ; ++i) {\n const ref = refs[i];\n if (ref.isOutdated()) {\n ref.remove();\n refs.splice(i--, 1);\n }\n }\n }", "invalidate () {\n this.focus = null\n\n this.invoke('unarchive', null)\n\n this.reconcile()\n }", "destroy () {\n this.getElement().remove()\n }", "reRender() {\n this.removeAllChildrenComponents()\n\n this.build()\n }", "function updateAllWidgets() {\n\tduplicateRemovedEvents = removeDuplicateEvents(allEvents);\n\tupdateMarkers(duplicateRemovedEvents);\n\tupdateScroller(duplicateRemovedEvents);\n}", "function wipe() {\n removeAllEventsFromDisplay();\n cosmo.view.cal.itemRegistry = new cosmo.util.hash.Hash();\n }", "function visualManager (records) {\n let nodes, node;\n\n records.forEach(record => {\n nodes = record.removedNodes;\n if (!nodes || !nodes.length) return;\n\n for (let i=0; i<nodes.length; ++i) {\n node = nodes[i];\n if (node.querySelectorAll) {\n if (!node.__visual__)\n select(node).selectAll('.d3-visual').each(destroy);\n else\n destroy.call(node);\n }\n }\n });\n}", "removeSelf() {\n this.DOM.wrap.remove();\n\n /*\n this.getChildren.forEach((child) => {\n child.offline();\n });*/\n }", "destroy() {\n this.domElementProvider.destroyCreatedElements();\n }", "clearCell(cellElement) {\n if (cellElement.widgets) {\n cellElement.widgets.forEach((widget) => {\n // destroy widget and remove reference to it\n delete this.widgetMap[widget.id];\n widget.destroy();\n });\n cellElement.widgets = null;\n }\n }", "cleanWidget (widget) {\n if (!widget.id) { widget.id = Math.floor(Math.random() * 1000000) }\n }", "removeResource(evt) {\n evt.preventDefault();\n let button = $(evt.target);\n this.view.attr(\"hidden\", \"\"); // do not show the block\n this.destroyed = true\n this.registry.showSaveNote();\n }", "updated() {\n this.el.reset();\n }", "function update(){\n for(var i = 0; i < particleWidgetsList.length; i++){\n particleWidgetsList[i].update();\n if(particleWidgetsList[i].particles.length <= 0) particleWidgetsList[i].alive = false;\n }\n for(var i = 0; i < particleWidgetsList.length; i++){\n if(!particleWidgetsList[i].alive){\n particleWidgetsList.splice(i, 1);\n }\n }\n }", "function deinitExistingRows() {\n var view = null;\n removeAllChildren($.mediumSwatchRefinement);\n _.each(listenerViews, function(view) {\n view.removeEventListener('click', onViewClick);\n });\n}", "function updateDOM() {\n\tvar newTree = render(data);\n\tvar patches = diff(tree, newTree);\n\trootNode = patch(rootNode, patches);\n\ttree = newTree;\n}", "clearOldTintsAndMargins(){\n\n let gridsContainer = document.querySelector('.container');\n let gridsConChildren = Array.from(gridsContainer.children);\n\n this.clearOldTints(gridsConChildren);\n\n this.clearOldMargins(gridsConChildren);\n\n //update state\n this.currentThreadId = this.props.commentThreadDoc._id;\n this.hasNewComment = false;\n }", "destroy() {\r\n if (this.parent.contains(this.elem)) this.parent.removeChild(this.elem);\r\n }", "refillNotes() {\n if(this.dirtyNotesId.size + 1 !== this.notes.length) {\n this.dataTableData = JSON.parse(JSON.stringify(this.notes));\n this.notes.splice(0, 0, {\n id: this.currentMaxId + 1 + '',\n top: null,\n left: null,\n isDirty: false,\n fieldName: \"Note Label\",\n comment: \"A note in time saves nine!\",\n isDragToggleEnabled : false,\n isDragEnabled : false,\n });\n this.currentMaxId += 1\n }\n }", "function cleanUpDragulaInstances (instances) {\n for (var i = instances.length - 1; i >= 0; i--) {\n var el = instances[i];\n for (var j = el.containers.length - 1; j >= 0; j--) {\n var container = el.containers[j];\n if (isAttachedToDom(container)) {\n break;\n }\n }\n if (j === -1) {\n // none of this instance's containers are attached, so remove from list of instances\n instances.splice(i, 1);\n }\n }\n }", "function resetContainers() {\n \n $(\"#featureList\").empty();\n $(\"#form\").empty();\n $(\"#selectedFeatureList\").empty();\n $(\"#legend\").empty();\n \n}", "destroy() {\n\t\tthis.runFinalReadReport()\n\t\tthis.stopObservation()\n\t\tthis.currentlyObservedElements = new Set()\n\t\tthis.visibleElements = new Set()\n\t}", "destroy() {\n this.node.parentNode.removeChild(this.node);\n }", "deconstruct () {\r\n this.removeChild(this.title)\r\n\r\n for (let button of this.buttons) {\r\n this.removeChild(button)\r\n }\r\n\r\n for (let axis of this.axis) {\r\n this.removeChild(axis)\r\n }\r\n }", "function initWidgets() {\n var previewParent = $('#widget-preview', parentNode);\n var widgets = $('.ha-widget-container', previewParent);\n\n // Make widgets draggable.\n widgets\n .on('dragstart', onWidgetDragstart)\n .on('dragend', onWidgetDragend)\n .children().attr('draggable', 'true');\n\n // Create drop targets (dropping on the actual elements is pretty broken in HTML, apparently).\n widgets.each(function () {\n $('<div class=\"drop-target\">')\n .appendTo(previewParent)\n .attr('id', 'ha-widget-droptarget-' + viewmodel.getWidgetIdFromElementId(this.id))\n .on('dragenter', onWidgetDragenter)\n .on('dragleave', onWidgetDragleave)\n .on('dragover', onWidgetDragover)\n .on('drop', onWidgetDrop)\n ;\n });\n }", "triggerRedraw() {\n \tlet jtabid = this.idFor('jtab');\n\t$(jtabid).empty();\n\tthis.jsonToTopTable(this, $(jtabid));\n}", "function renderFilterWidgets() {\n $(\".widgetFilter\").remove();\n\n // Get active filter widgets items from local storage\n let activeWidgets = JSON.parse(localStorage.getItem(\"smallTalk_activeWidgets\"));\n if (activeWidgets === null) {\n activeWidgets = [];\n }\n\n for (let i = 0; i < registeredWidgets.length; i++) {\n let $widgetFilter = $(\"<li>\");\n $widgetFilter.addClass(\"widgetFilter\");\n\n let $widgetFilterA = $(\"<a>\");\n\n let $widgetFilterForm = $(\"<form>\");\n $widgetFilterForm.attr(\"action\", \"#\");\n\n let $widgetFilterLabel = $(\"<label>\");\n\n let $widgetFilterInput = $(\"<input>\");\n $widgetFilterInput.attr(\"type\", \"checkbox\");\n $widgetFilterInput.attr(\"id\", `widgetFilter-${registeredWidgets[i].widgetConsName}`);\n $widgetFilterInput.addClass(\"filled-in\");\n\n // Check if an item already exists in the array and either add new or delete and add\n let validateWidget = activeWidgets.filter(widget => (widget.widgetConsName === registeredWidgets[i].widgetConsName));\n\n if (validateWidget.length !== 0) {\n $widgetFilterInput.prop(\"checked\", true);\n }\n\n let $widgetFilterSpan = $(\"<span>\");\n $widgetFilterSpan.text(registeredWidgets[i].widgetName);\n\n $widgetFilterLabel.append($widgetFilterInput);\n $widgetFilterLabel.append($widgetFilterSpan);\n $widgetFilterForm.append($widgetFilterLabel);\n $widgetFilterA.append($widgetFilterForm);\n $widgetFilter.append($widgetFilterA);\n\n $(\"#widgetsSlideOut\").append($widgetFilter);\n }\n}", "_cleanUp() {\n this.removeChildren();\n\n // Remove references to the old shapes to ensure that they're rerendered\n this._q2Box = null;\n this._q3Box = null;\n this._medianLine = null;\n this._outerBorderShape = null;\n this._innerBorderShape = null;\n }", "_addRemoveRow(action) {\n const that = this;\n\n if (action === 'add' && (that.dimensions > 1 || (that.dimensions === 1 && that.columns === 1))) {\n that._cells.push([]);\n\n const newRow = document.createElement('tr'),\n fragment = document.createDocumentFragment(),\n newRowIndex = that._cells.length - 1,\n newCells = [];\n\n newRow.classList.add('jqx-array-table-row');\n\n for (let j = 0; j < that.columns; j++) {\n const currentNewCell = document.createElement('td');\n\n currentNewCell.classList.add('jqx-array-table-data');\n\n if (that._elementGap) {\n currentNewCell.classList.add('jqx-array-table-data-gap');\n }\n\n that._cells[newRowIndex].push({ td: currentNewCell });\n newCells.push(currentNewCell);\n fragment.appendChild(currentNewCell);\n }\n\n newRow.appendChild(fragment);\n that._tableBody.appendChild(newRow);\n\n for (let i = 0; i < newCells.length; i++) {\n that._initializeWidget(newRowIndex, i);\n }\n\n that.rows++;\n\n if (that._suppressScroll !== true) {\n that._scroll();\n }\n }\n else if (action === 'remove' && that.rows > 1) {\n const rowToRemove = that._tableBody.children[that._tableBody.children.length - 1],\n cellsToRemove = that._cells[that._cells.length - 1];\n\n for (let k = 0; k < cellsToRemove.length; k++) {\n cellsToRemove[k].widget.$.unlisten('change');\n cellsToRemove[k].widget.$.unlisten('click');\n }\n\n that._tableBody.removeChild(rowToRemove);\n that._cells.pop();\n that.rows--;\n }\n }", "willDestroyElement() {\n this._super(...arguments);\n\n this._hideEditDialog();\n }", "function onPageUpdate(layout) {\n\n function createPlusButton(row, col) {\n return $('<button/>', { text: '+', 'class': 'big-plus', title: 'Add a widget to the page...' })\n .click(() => showAddWidgetModalDialog({ column: col, item: row })); \n } \n let numberOfColumns = layout.length;\n if (layout[0].length == 0) {\n for (let i = 0; i < layout.length; i++)\n layout[i] = [null];\n }\n let maxRows = layout[0].length;\n let table = $(\"<table/>\", { id: 'chart-grid' });\n let padding = 32;\n let headerHeight = 48;\n let minRowHeight = 160;\n let rowsPerScreen = maxRows;\n let windowHeight = $(window).height();\n let rowHeight = 0;\n while (rowsPerScreen > 0 && rowHeight < minRowHeight) {\n rowHeight = Math.round((windowHeight - headerHeight) / rowsPerScreen) - padding; // padding is subtracted\n rowsPerScreen--; // in case we do another round try one less per screen\n }\n if (rowHeight == 0) {\n rowHeight = windowHeight - headerHeight - padding;\n }\n for (let row = 0; row < maxRows; row++) {\n let tr = $(\"<tr/>\");\n for (let col = 0; col < numberOfColumns; col++) {\n let cell = layout[col][row];\n if (cell) {\n let rowspan = cell.rowspan;\n let height = (rowspan * rowHeight);\n let td = $(\"<td/>\", { colspan: cell.colspan, rowspan: rowspan, style: 'height: '+height+\"px;\"});\n const widget = cell.widget;\n const widgetTarget = 'widget-' + widget.target;\n let existingWidget = $('#' + widgetTarget);\n if (existingWidget.length > 0) {\n existingWidget.appendTo(td); // recycle the widget already rendered into the page\n } else {\n // add a blank widget box, filled during data update\n td.append($('<div/>', { id : widgetTarget, class: 'Widget' })\n .append(Components.createWidgetHeader(createWidgetHeaderModel(widget)))\n .append($('<div/>', { class: 'WidgetContent' })\n .append(createChartContainer(widget))\n .append(Components.createAlertTable({}))\n .append(Components.createAnnotationTable({}))\n .append(Components.createIndicator({})))\n .append(Components.createLegend([]))); \n }\n tr.append(td);\n } else if (cell === null) {\n tr.append($(\"<td/>\", { style: 'height: '+rowHeight+'px;'})\n .append($('<div/>', { class: 'Widget empty'}).append(createPlusButton(row, col)))); \n }\n }\n table.append(tr);\n }\n $('#chart-container').empty();\n $('#chart-container').append(table);\n }", "function formChanged(specificWidgetArray) {\r\n// Old \r\n//function formChanged() {\r\n// END CHANGE BY Marc TABARY - 2017-03-06 - ALLOW DISABLED SPECIFIC WIDGET\r\n var updateRight = dojo.byId('updateRight');\r\n if (updateRight && updateRight.value == 'NO') {\r\n return;\r\n }\r\n disableWidget('newButton');\r\n disableWidget('newButtonList');\r\n enableWidget('saveButton');\r\n disableWidget('printButton');\r\n disableWidget('printButtonPdf');\r\n disableWidget('copyButton');\r\n enableWidget('undoButton');\r\n showWidget('undoButton');\r\n disableWidget('deleteButton');\r\n disableWidget('refreshButton');\r\n hideWidget('refreshButton');\r\n disableWidget('mailButton');\r\n disableWidget('multiUpdateButton');\r\n disableWidget('indentDecreaseButton');\r\n disableWidget('indentIncreaseButton');\r\n formChangeInProgress = true;\r\n grid = dijit.byId(\"objectGrid\");\r\n if (grid) {\r\n // saveSelection=grid.selection;\r\n grid.selectionMode = \"none\";\r\n\r\n }\r\n buttonRightLock();\r\n\r\n// ADD BY Marc TABARY - 2017-03-06 - - ALLOW DISABLED SPECIFIC WIDGET\r\n if (specificWidgetArray!==undefined) {\r\n // This parameter must be an array\r\n if (specificWidgetArray instanceof Array) {\r\n for (i = 0; i < specificWidgetArray.length; i++) {\r\n if (dijit.byId(specificWidgetArray[i])) { // Widget\r\n disableWidget(specificWidgetArray[i]);\r\n } else if(specificWidgetArray[i].indexOf('_spe_')!=-1) { // Specific attributes '_spe_'\r\n // Search the id DOM\r\n var theIdName = 'id_'+specificWidgetArray[i].replace('_spe_','');\r\n var theId = document.getElementById(theIdName);\r\n if (theId!==null) {\r\n theIdName = theIdName.toLowerCase();\r\n if(theIdName.indexOf('button')!=-1) { // Button => Hide\r\n theId.style.visibility = \"hidden\";\r\n } else { // Else, readonly\r\n theId.readOnly=true;\r\n theId.class +=' \"readOnly\"';\r\n}\r\n }\r\n }\r\n }\r\n }\r\n }\r\n// END ADD BY Marc TABARY - 2017-03-06 - - ALLOW DISABLED SPECIFIC WIDGET\r\n\r\n}", "initDraggableWidgets() {\n const scope = this;\n //drag widgets\n $(\".droppable-widget\").droppable({\n accept: \".draggable-widget\",\n drop: function (event, ui) {\n const source = $(ui.draggable);\n const widgetId = source.data(\"id\");\n const exist = scope.checkForDuplicateWidgetsInRow(this, widgetId);\n if (!exist) {\n const groupId = source.data(\"group-id\");\n const widget = scope.getWidgetFromTemplate(groupId, widgetId, source.text());\n $(this).append(widget);\n scope.registerDroppableWidgets();\n $(\".droppable-widget\").sortable({ axis: \"x\" }).disableSelection();\n } else {\n scope.toast.notify({ heading: \"A widget can only appear once in a row\" });\n }\n }\n });\n }", "function render() {\n\n // clear everything\n $(\"#section-watchlist ul\").empty();\n $(\"#section-browse ul\").empty();\n\n // insert watchlist items\n model.watchlistItems.forEach(function(movie) {\n // PANEL HEADING\n var panelHeading = $('<div>').attr('class', 'panel-heading');\n var title = $(\"<h6></h6>\").text(movie.original_title);\n panelHeading.append(title);\n\n // PANEL BODY\n var panelBody = $('<div>').attr('class', 'panel-body');\n // Clicking should remove this movie from the watchlist and re-render\n var watchedButton = $('<button>')\n .text('I watched it')\n .click(function(){\n //console.log(model.watchlistItems);\n //model.watchlistItems\n for (var i = 0; i < model.watchlistItems.length; i++){\n if (model.watchlistItems[i].original_title == movie.original_title){\n //console.log('current ' + model.watchlistItems[i].original_title);\n model.watchlistItems.splice(i, 1);\n }\n }\n render();\n });\n\n watchedButton.attr('class', 'btn btn-danger');\n \n // add a poster image and append it inside the \n // panel body above the button\n var movieImage = $('<img>')\n .attr('src', api.posterUrl(movie))\n .attr('class', 'img-responsive')\n\n panelBody.append(movieImage);\n panelBody.append(watchedButton);\n \n console.log(movie);\n\n // re-implement the li as a bootstrap panel with a heading and a body\n var itemView = $(\"<li></li>\")\n .append(panelHeading)\n .append(panelBody)\n .attr(\"class\", \"panel panel-default\");\n\n $(\"#section-watchlist ul\").append(itemView);\n });\n\n // insert browse items\n model.browseItems.forEach(function(movie) {\n\n var title = $(\"<h4></h4>\").text(movie.original_title);\n\n var button = $(\"<button class='btn btn-primary'></button>\")\n .text(\"Add to Watchlist\")\n .click(function() {\n model.watchlistItems.push(movie);\n render();\n })\n .prop(\"disabled\", model.watchlistItems.indexOf(movie) !== -1);\n\n var overview = $(\"<p></p>\").text(movie.overview);\n\n // append everything to itemView, along with an <hr/>\n var itemView = $(\"<li class='list-group-item'></li>\")\n .append(title)\n .append(overview)\n .append(button);\n \n // append the itemView to the list\n $(\"#section-browse ul\").append(itemView);\n });\n \n}", "removePersistedData (room, destroyYjsInstances = true) {\n this.ys.forEach((cnf, y) => {\n if (y.room === room) {\n if (destroyYjsInstances) {\n y.destroy();\n } else {\n this.deinit(y);\n }\n }\n });\n }", "function removeWidget(widget) {\r\n storage.get(\"tiles\", function(storage_data) {\r\n var widgets = storage_data.tiles;\r\n\r\n delete widgets[widget];\r\n\r\n storage.set({\"tiles\": widgets})\r\n });\r\n}", "function rerenderElements(kv) {\n let list = document.getElementById(namelistidmap[kv]);\n list.innerHTML = \"\";\n if (kv === \"runs\") {\n console.log(\"Step 4.runs\");\n createRunElements();\n } else if (kv == \"configs\") {\n console.log(\"Step 4.configs\");\n createConfigElements();\n } else if (kv == \"evals\") {\n console.log(\"Step 4.evals\");\n createEvalElements();\n } else if (kv == \"locations\") {\n console.log(\"Step 4.locations\");\n createLocationElements();\n }\n}", "_destroy() {\n this.$element.removeClass('is-editing');\n this.$element.off('click', '[data-edit]');\n this.$element.off('click', '[data-save]');\n this.$element.off('keydown', ':input');\n this.$element.off('.zf.trigger');\n }", "destroy() {\n nodes.splice(nodes.indexOf(el), 1);\n }", "function attachDeleteEdit(){\n $('.delete-properties').off();\n $('.delete-properties').click(function(){\n $(this).closest('.form-group').remove();\n propertyNumEdit--;\n });\n}", "reset_ui(){\n this.maxitems=10;\n this.agg_flows={};\n this.dom.find(\".drilldown_data\").remove();\n this.dom.append($(this.haml_dom[1]).clone());\n }", "updateTags() {\n let tags = this.get('tags');\n let oldTags = tags.filterBy('id', null);\n\n tags.removeObjects(oldTags);\n oldTags.invoke('deleteRecord');\n }", "destroy() {\n for (let i = 0; i < this._contentItems.length; i++) {\n this._contentItems[i].destroy();\n }\n this._contentItems = [];\n this.emitBaseBubblingEvent('beforeItemDestroyed');\n this._element.remove();\n this.emitBaseBubblingEvent('itemDestroyed');\n }", "function cleanBitchList() {\n bitchList.forEach((element) => app.stage.removeChild(element));\n}", "function deleteCreation(id){\n $(\"#currentCreation\").remove();\n $(\"#making\").slideUp(\"slow\");\n var widget=GetWidget(id);\n var idPanel= widget.panel;\n var panel=GetPanel(idPanel) \n panel.deleteElement(widget)\n}", "clear(){\n\t\tthis.shapes = [];\n\t\tthis.setLastUpdated();\n\t}", "function finaliseButtonDisplay(specificWidgetArray) {\r\n// Old \r\n//function finaliseButtonDisplay() {\r\n// END CHANGE BY Marc TABARY - 2017-03-06 - ALLOW DISABLED SPECIFIC WIDGET\r\n\r\n// ADD BY Marc TABARY - 2017-03-06 - - ALLOW DISABLED SPECIFIC WIDGET\r\n if (specificWidgetArray!==undefined) {\r\n // This parameter must be an array\r\n if (specificWidgetArray instanceof Array) {\r\n for (i = 0; i < specificWidgetArray.length; i++) {\r\n enableWidget(specificWidgetArray[i]);\r\n }\r\n }\r\n }\r\n// END ADD BY Marc TABARY - 2017-03-06 - - ALLOW DISABLED SPECIFIC WIDGET\r\n\r\n id = dojo.byId(\"id\");\r\n if (id) {\r\n if (id.value == \"\") {\r\n // id exists but is not set => new item, all buttons locked until first\r\n // change\r\n formLock();\r\n enableWidget('newButton');\r\n enableWidget('newButtonList');\r\n enableWidget('saveButton');\r\n disableWidget('undoButton');\r\n disableWidget('mailButton');\r\n disableWidget('changeStatusButton');\r\n disableWidget('subscribeButton');\r\n if (dijit.byId(\"objectGrid\")) {\r\n enableWidget('multiUpdateButton');\r\n } else {\r\n disableWidget('multiUpdateButton');\r\n disableWidget('indentDecreaseButton');\r\n disableWidget('indentIncreaseButton');\r\n }\r\n }\r\n } else {\r\n // id does not exist => not selected, only new button possible\r\n formLock();\r\n enableWidget('newButton');\r\n enableWidget('newButtonList');\r\n disableWidget('changeStatusButton');\r\n disableWidget('subscribeButton');\r\n if (dijit.byId(\"objectGrid\")) {\r\n enableWidget('multiUpdateButton');\r\n } else {\r\n disableWidget('multiUpdateButton');\r\n }\r\n // but show print buttons if not in objectDetail (buttonDiv exists)\r\n if (!dojo.byId(\"buttonDiv\")) {\r\n enableWidget('printButton');\r\n enableWidget('printButtonPdf');\r\n }\r\n }\r\n buttonRightLock();\r\n}", "function flush_historial(){\n // get list of chldren elements\n let hist = document.getElementsByClassName('historial')[0];\n let hist_list = hist.children;\n // loop and destroy, but only from index 1 onwards\n for (let i = 1; i < hist_list.length; i++) {\n hist_list[i].remove();\n }\n}", "removeAllEvents() {\n this.destroy();\n }", "destroy() {\n // this.group = null;\n this.$el = null;\n }", "function cleanElems() {\n if (afterInit) {\n delete mStyle.style;\n delete mStyle.modElem;\n }\n }", "function cleanElems() {\n if (afterInit) {\n delete mStyle.style;\n delete mStyle.modElem;\n }\n }", "function cleanElems() {\n if (afterInit) {\n delete mStyle.style;\n delete mStyle.modElem;\n }\n }", "function cleanElems() {\n if (afterInit) {\n delete mStyle.style;\n delete mStyle.modElem;\n }\n }", "function cleanElems() {\n if (afterInit) {\n delete mStyle.style;\n delete mStyle.modElem;\n }\n }", "doDestroy() {\n // To remove timeouts\n this._rows.forEach(row => row.destroy());\n\n super.doDestroy();\n }", "removeForm() {\n if (this.$formContainer === null) {\n return;\n }\n\n delete this.formSaveAjax;\n // Allow form widgets to detach properly.\n Drupal.detachBehaviors(this.$formContainer.get(0), null, 'unload');\n this.$formContainer\n .off('change.quickedit', ':input')\n .off('keypress.quickedit', 'input')\n .remove();\n this.$formContainer = null;\n }", "function clean_item()\n{\n // clean widget area before any add-action\n RMPApplication.debug (\"begin Item cleaned\");\n c_debug(debug.init, \"=> clean_item\");\n id_details_item.setVisible(true);\n id_details_item.open();\n RMPApplication.set(\"my_item\", \"{}\");\n RMPApplication.set(\"action\", \"add\");\n RMPApplication.debug(\"end \" + itemName + \" Widget Area cleaned\");\n}", "_onWidgetRemoved(sender, widget) {\n if (widget === this._lastCurrent) {\n this._lastCurrent = null;\n }\n ArrayExt.removeAt(this._items, this._findWidgetIndex(widget));\n this._sideBar.removeTab(widget.title);\n this._refreshVisibility();\n }", "destroyChildBinders(binders, handler) {\n if (!binders || !binders.length) {\n return;\n }\n\n binders = binders.splice(0);\n\n if (handler._isSoleChild) { // Supper fast way to just clear the UI\n const parentEle = handler._placeholderEle.parentNode;\n parentEle.textContent = \"\";\n parentEle.appendChild(handler._placeholderEle);\n setTimeout(() => {\n arrayForEach(binders, binder => binder._destroy());\n });\n }\n else {\n arrayForEach(binders, binder => binder._destroy());\n }\n }" ]
[ "0.63805413", "0.6362039", "0.6346743", "0.6346743", "0.6346743", "0.6346743", "0.6340742", "0.62802815", "0.6216467", "0.61937296", "0.61604196", "0.6133201", "0.6096818", "0.6096818", "0.6096818", "0.6096818", "0.6096818", "0.6096818", "0.6096818", "0.6096818", "0.6096818", "0.6096818", "0.6096818", "0.6096818", "0.5982368", "0.59769905", "0.5958504", "0.5764526", "0.575818", "0.57573396", "0.575703", "0.5675546", "0.567255", "0.5602787", "0.5601428", "0.55999553", "0.5590645", "0.55835646", "0.55808145", "0.5524021", "0.5522479", "0.5516604", "0.54926634", "0.54883146", "0.5476101", "0.54749775", "0.5461123", "0.54559743", "0.54501367", "0.5448538", "0.5443523", "0.54334724", "0.54288536", "0.5425305", "0.54096156", "0.53980947", "0.53767216", "0.53670007", "0.5366041", "0.5363697", "0.536351", "0.5359943", "0.5355965", "0.535436", "0.5324521", "0.53187597", "0.5298077", "0.529737", "0.5291258", "0.52879524", "0.52856004", "0.5284743", "0.52844745", "0.52826196", "0.52763766", "0.5271682", "0.52678096", "0.52677834", "0.5260982", "0.5257146", "0.52499694", "0.52472943", "0.5244355", "0.52437603", "0.5237957", "0.5234536", "0.5229635", "0.52291685", "0.52290815", "0.5220897", "0.5220897", "0.5220897", "0.5220897", "0.5220897", "0.5213417", "0.52080643", "0.52060443", "0.52053064", "0.5202681" ]
0.61678755
11
Create a subpatch for thunks
function thunks(a, b, patch, index) { var nodes = handleThunk(a, b) var thunkPatch = diff(nodes.a, nodes.b) if (hasPatches(thunkPatch)) { patch[index] = new VPatch(VPatch.THUNK, null, thunkPatch) } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function thunks ( a, b, patch, index ) {\n var nodes = handleThunk( a, b )\n var thunkPatch = diff( nodes.a, nodes.b )\n if ( hasPatches( thunkPatch ) ) {\n patch[ index ] = new VPatch( VPatch.THUNK, null, thunkPatch )\n }\n }", "function thunks(a, b, patch, index) {\n var nodes = handleThunk(a, b)\n var thunkPatch = diff(nodes.a, nodes.b)\n if (hasPatches(thunkPatch)) {\n patch[index] = new VPatch(VPatch.THUNK, null, thunkPatch)\n }\n }", "function thunks(a, b, patch, index) {\n var nodes = handleThunk(a, b)\n var thunkPatch = diff(nodes.a, nodes.b)\n if (hasPatches(thunkPatch)) {\n patch[index] = new VPatch(VPatch.THUNK, null, thunkPatch)\n }\n}", "function thunks(a, b, patch, index) {\n var nodes = handleThunk(a, b)\n var thunkPatch = diff(nodes.a, nodes.b)\n if (hasPatches(thunkPatch)) {\n patch[index] = new VPatch(VPatch.THUNK, null, thunkPatch)\n }\n}", "function thunks(a, b, patch, index) {\n var nodes = handleThunk(a, b)\n var thunkPatch = diff(nodes.a, nodes.b)\n if (hasPatches(thunkPatch)) {\n patch[index] = new VPatch(VPatch.THUNK, null, thunkPatch)\n }\n}", "function thunks(a, b, patch, index) {\n var nodes = handleThunk(a, b)\n var thunkPatch = diff(nodes.a, nodes.b)\n if (hasPatches(thunkPatch)) {\n patch[index] = new VPatch(VPatch.THUNK, null, thunkPatch)\n }\n}", "function thunks(a, b, patch, index) {\n var nodes = handleThunk(a, b)\n var thunkPatch = diff(nodes.a, nodes.b)\n if (hasPatches(thunkPatch)) {\n patch[index] = new VPatch(VPatch.THUNK, null, thunkPatch)\n }\n}", "function thunks(a, b, patch, index) {\n var nodes = handleThunk(a, b)\n var thunkPatch = diff(nodes.a, nodes.b)\n if (hasPatches(thunkPatch)) {\n patch[index] = new VPatch(VPatch.THUNK, null, thunkPatch)\n }\n}", "function thunks(a, b, patch, index) {\n var nodes = handleThunk(a, b)\n var thunkPatch = diff(nodes.a, nodes.b)\n if (hasPatches(thunkPatch)) {\n patch[index] = new VPatch(VPatch.THUNK, null, thunkPatch)\n }\n}", "function thunks(a, b, patch, index) {\n var nodes = handleThunk(a, b)\n var thunkPatch = diff(nodes.a, nodes.b)\n if (hasPatches(thunkPatch)) {\n patch[index] = new VPatch(VPatch.THUNK, null, thunkPatch)\n }\n}", "function thunks(a, b, patch, index) {\n var nodes = handleThunk(a, b)\n var thunkPatch = diff(nodes.a, nodes.b)\n if (hasPatches(thunkPatch)) {\n patch[index] = new VPatch(VPatch.THUNK, null, thunkPatch)\n }\n}", "function thunks(a, b, patch, index) {\n var nodes = handleThunk(a, b)\n var thunkPatch = diff(nodes.a, nodes.b)\n if (hasPatches(thunkPatch)) {\n patch[index] = new VPatch(VPatch.THUNK, null, thunkPatch)\n }\n}", "function thunks(a, b, patch, index) {\n var nodes = handleThunk(a, b);\n var thunkPatch = diff(nodes.a, nodes.b)\n if (hasPatches(thunkPatch)) {\n patch[index] = new VPatch(VPatch.THUNK, null, thunkPatch)\n }\n}", "function thunks(a, b, patch, index) {\n var nodes = handleThunk(a, b);\n var thunkPatch = diff(nodes.a, nodes.b)\n if (hasPatches(thunkPatch)) {\n patch[index] = new VPatch(VPatch.THUNK, null, thunkPatch)\n }\n}", "function thunks(a, b, patch, index) {\n var nodes = handleThunk(a, b);\n var thunkPatch = diff(nodes.a, nodes.b)\n if (hasPatches(thunkPatch)) {\n patch[index] = new VPatch(VPatch.THUNK, null, thunkPatch)\n }\n}", "function thunks(a, b, patch, index) {\n var nodes = handleThunk(a, b);\n var thunkPatch = diff(nodes.a, nodes.b)\n if (hasPatches(thunkPatch)) {\n patch[index] = new VPatch(VPatch.THUNK, null, thunkPatch)\n }\n}", "function thunks(a, b, patch, index) {\n var nodes = handleThunk(a, b);\n var thunkPatch = diff(nodes.a, nodes.b)\n if (hasPatches(thunkPatch)) {\n patch[index] = new VPatch(VPatch.THUNK, null, thunkPatch)\n }\n}", "function thunks(a, b, patch, index) {\n var nodes = handleThunk(a, b);\n var thunkPatch = diff(nodes.a, nodes.b)\n if (hasPatches(thunkPatch)) {\n patch[index] = new VPatch(VPatch.THUNK, null, thunkPatch)\n }\n}", "patch() {\n }", "patchMethodCall() {\n this.patchNonMethodCall();\n }", "patchDynamicMethodCall() {\n this.patchNonMethodCall();\n }", "static monkeyPatch(object, methodName, options, f) {\n const patchedFunction = new PatchedFunction(object, methodName);\n const patch = new Patch(patchedFunction, options, f);\n patchedFunction.addPatch(patch);\n return patch;\n }", "patch(patch, index, value) {\n return this._patchers[index](patch, value);\n }", "function handleInsertPatchNode(vnode, currentPath, patch, toInitialize, toRemain, cnode) {\n patch.push(createPatchNode({}, vnode, __WEBPACK_IMPORTED_MODULE_3__constant__[\"PATCH_ACTION_INSERT\"]));\n if (Object(__WEBPACK_IMPORTED_MODULE_1__common__[\"e\" /* isComponentVnode */])(vnode)) {\n const nextIndex = vnode.transferKey === undefined ? Object(__WEBPACK_IMPORTED_MODULE_1__common__[\"j\" /* vnodePathToString */])(currentPath) : vnode.transferKey;\n toInitialize[nextIndex] = createCnode(vnode, cnode);\n } else if (vnode.children !== undefined) {\n Object(__WEBPACK_IMPORTED_MODULE_1__common__[\"m\" /* walkVnodes */])(vnode.children, (childVnode, vnodePath) => {\n if (Object(__WEBPACK_IMPORTED_MODULE_1__common__[\"e\" /* isComponentVnode */])(childVnode)) {\n const nextIndex = childVnode.transferKey === undefined ? Object(__WEBPACK_IMPORTED_MODULE_1__common__[\"j\" /* vnodePathToString */])(currentPath.concat(vnodePath)) : childVnode.transferKey;\n\n // Because current vnode is a new vnode,\n // so its child vnode patch action will have \"remain\" type only if it has a transferKey\n if (childVnode.transferKey !== undefined && cnode.next[nextIndex] !== undefined) {\n toRemain[nextIndex] = cnode.next[nextIndex];\n if (childVnode.transferKey !== undefined) {\n childVnode.action = { type: __WEBPACK_IMPORTED_MODULE_3__constant__[\"PATCH_ACTION_MOVE_FROM\"] };\n }\n } else {\n toInitialize[nextIndex] = createCnode(childVnode, cnode);\n }\n\n return true;\n }\n });\n }\n}", "_patchInsertApply(patchInfo) {\n let info = Object.assign({}, patchInfo, {end: patchInfo.start});\n this._patchReplaceApply(info);\n /*istanbul ignore else*/\n if (patchInfo.reparse) this._parseInvoke();\n }", "function handleRemainLikePatchNode(lastVnode = {}, vnode, actionType, currentPath, cnode, patch, toInitialize, toRemain, nextTransferKeyedVnodes) {\n const patchNode = createPatchNode(lastVnode, vnode, actionType);\n\n if (Object(__WEBPACK_IMPORTED_MODULE_1__common__[\"e\" /* isComponentVnode */])(vnode)) {\n const path = Object(__WEBPACK_IMPORTED_MODULE_1__common__[\"j\" /* vnodePathToString */])(currentPath);\n toRemain[path] = cnode.next[path];\n } else {\n patchNode.patch = diffNodeDetail(lastVnode, vnode);\n if (vnode.children !== undefined) {\n /* eslint-disable no-use-before-define */\n const childDiffResult = diff(lastVnode.children, vnode.children, currentPath, cnode, nextTransferKeyedVnodes);\n /* eslint-enable no-use-before-define */\n Object.assign(toInitialize, childDiffResult.toInitialize);\n Object.assign(toRemain, childDiffResult.toRemain);\n patchNode.children = childDiffResult.patch;\n }\n }\n patch.push(patchNode);\n}", "static monkeyPatchOnce(object, methodName) {\n return new Promise((resolve, reject) => {\n this.monkeyPatch(object, methodName, data => {\n data.patch.cancel();\n resolve(data);\n });\n });\n }", "function handleToMovePatchNode() {}", "function PatchLine() { }", "function thunk(fn /*, args */) {\n\n}", "function PATCH(){\n\n}", "unpatch () {\n this._instrumented.forEach((instrumentation, moduleExports) => {\n instrumentation.unpatch(moduleExports)\n })\n\n debug('Unpatched')\n }", "patch(patchInfo) {\n // Invoke pre patching hook\n if (this._opts.prePatchApply && this._opts.prePatchApply(this, patchInfo) === VirtualActions.PATCH_REJECT) return;\n\n // Accept rule reparse as default postPatch behavior\n if (patchInfo.reparse === undefined) {\n patchInfo = Object.assign({}, patchInfo, {reparse: true});\n }\n\n this._patchApply(patchInfo);\n\n // Invoke post patching hook\n if (this._opts.postPatchApply) this._opts.postPatchApply(this, patchInfo);\n }", "implementPatchOperators(patch, existingPage) {\n const clonedBases = {};\n if (patch.$push) {\n append(patch.$push);\n } else if (patch.$pullAll) {\n _.each(patch.$pullAll, function(val, key) {\n cloneOriginalBase(key);\n self.apos.util.set(patch, key, _.differenceWith(self.apos.util.get(patch, key) || [], Array.isArray(val) ? val : [], function(a, b) {\n return _.isEqual(a, b);\n }));\n });\n } else if (patch.$pullAllById) {\n _.each(patch.$pullAllById, function(val, key) {\n cloneOriginalBase(key);\n if (!Array.isArray(val)) {\n val = [ val ];\n }\n self.apos.util.set(patch, key, _.differenceWith(self.apos.util.get(patch, key) || [], Array.isArray(val) ? val : [], function(a, b) {\n return a._id === b;\n }));\n });\n } else if (patch.$move) {\n _.each(patch.$move, function(val, key) {\n cloneOriginalBase(key);\n if ((val == null) || (!((typeof val) === 'object'))) {\n return;\n }\n const existing = self.apos.util.get(patch, key) || [];\n const index = existing.findIndex(item => item._id === val.$item);\n if (index === -1) {\n return;\n }\n const itemValue = existing[index];\n existing.splice(index, 1);\n if (val.$before) {\n const beforeIndex = existing.findIndex(item => item._id === val.$before);\n if (beforeIndex !== -1) {\n existing.splice(beforeIndex, 0, itemValue);\n } else {\n existing.splice(index, 0, itemValue);\n }\n } else if (val.$after) {\n const afterIndex = existing.findIndex(item => item._id === val.$after);\n if (afterIndex !== -1) {\n existing.splice(afterIndex + 1, 0, itemValue);\n } else {\n existing.splice(index, 0, itemValue);\n }\n } else {\n existing.splice(index, 0, itemValue);\n }\n });\n }\n _.each(patch, function(val, key) {\n if (key.charAt(0) !== '$') {\n let atReference = false;\n if (key.charAt(0) === '@') {\n atReference = key;\n key = self.apos.util.resolveAtReference(existingPage, key);\n if (key && patch[key.split('.')[0]]) {\n // This base has already been cloned into the patch, or it\n // otherwise touches this base, so we need to re-resolve\n // the reference or indexes may be incorrect\n key = self.apos.util.resolveAtReference(patch, atReference);\n }\n }\n // Simple replacement with a dot path\n if (atReference || (key.indexOf('.') !== -1)) {\n cloneOriginalBase(key);\n self.apos.util.set(patch, key, val);\n }\n }\n });\n function append(data) {\n _.each(data, function(val, key) {\n cloneOriginalBase(key);\n if (val && val.$each) {\n const each = Array.isArray(val.$each) ? val.$each : [];\n const existing = self.apos.util.get(patch, key) || [];\n if (!Array.isArray(existing)) {\n throw self.apos.error('invalid', 'existing property is not an array', {\n dotPath: key\n });\n }\n let position;\n if (_.has(val, '$position')) {\n position = self.apos.launder.integer(val.$position);\n if ((position < 0) || (position > existing.length)) {\n position = existing.length;\n }\n } else if (_.has(val, '$before')) {\n position = _.findIndex(existing, item => item._id === val.$before);\n if (position === -1) {\n position = existing.length;\n }\n } else if (_.has(val, '$after')) {\n position = _.findIndex(existing, item => item._id === val.$after);\n if (position === -1) {\n position = existing.length;\n } else {\n // after\n position++;\n }\n } else {\n position = existing.length;\n }\n const updated = existing.slice(0, position).concat(each).concat(existing.slice(position));\n self.apos.util.set(patch, key, updated);\n } else {\n const existing = self.apos.util.get(patch, key) || [];\n existing.push(val);\n self.apos.util.set(patch, key, existing);\n }\n });\n }\n function cloneOriginalBase(key) {\n if (key.charAt(0) === '@') {\n let _id = key.substring(1);\n const dot = _id.indexOf('.');\n if (dot !== -1) {\n _id = _id.substring(0, dot);\n }\n const result = self.apos.util.findNestedObjectAndDotPathById(existingPage, _id, { ignoreDynamicProperties: true });\n if (!result) {\n throw self.apos.error('invalid', {\n '@path': key\n });\n }\n key = result.dotPath;\n }\n if (key.indexOf('.') === -1) {\n // No need, we are replacing the base\n }\n const base = key.split('.')[0];\n if (!clonedBases[base]) {\n if (_.has(existingPage, base)) {\n // We need all the properties, even impermanent ones,\n // because relationships are read-write in 3.x\n patch[base] = klona(existingPage[base]);\n }\n clonedBases[base] = true;\n }\n }\n }", "patch(...args) {\n this.route('patch', ...args);\n }", "function ChildReconciler(shouldTrackSideEffects){function deleteChild(returnFiber,childToDelete){if(!shouldTrackSideEffects){// Noop.\nreturn;}// Deletions are added in reversed order so we add it to the front.\n// At this point, the return fiber's effect list is empty except for\n// deletions, so we can just append the deletion to the list. The remaining\n// effects aren't added until the complete phase. Once we implement\n// resuming, this may not be true.\nvar last=returnFiber.lastEffect;if(last!==null){last.nextEffect=childToDelete;returnFiber.lastEffect=childToDelete;}else{returnFiber.firstEffect=returnFiber.lastEffect=childToDelete;}childToDelete.nextEffect=null;childToDelete.effectTag=Deletion;}function deleteRemainingChildren(returnFiber,currentFirstChild){if(!shouldTrackSideEffects){// Noop.\nreturn null;}// TODO: For the shouldClone case, this could be micro-optimized a bit by\n// assuming that after the first child we've already added everything.\nvar childToDelete=currentFirstChild;while(childToDelete!==null){deleteChild(returnFiber,childToDelete);childToDelete=childToDelete.sibling;}return null;}function mapRemainingChildren(returnFiber,currentFirstChild){// Add the remaining children to a temporary map so that we can find them by\n// keys quickly. Implicit (null) keys get added to this set with their index\nvar existingChildren=new Map();var existingChild=currentFirstChild;while(existingChild!==null){if(existingChild.key!==null){existingChildren.set(existingChild.key,existingChild);}else{existingChildren.set(existingChild.index,existingChild);}existingChild=existingChild.sibling;}return existingChildren;}function useFiber(fiber,pendingProps,expirationTime){// We currently set sibling to null and index to 0 here because it is easy\n// to forget to do before returning it. E.g. for the single child case.\nvar clone=createWorkInProgress(fiber,pendingProps,expirationTime);clone.index=0;clone.sibling=null;return clone;}function placeChild(newFiber,lastPlacedIndex,newIndex){newFiber.index=newIndex;if(!shouldTrackSideEffects){// Noop.\nreturn lastPlacedIndex;}var current$$1=newFiber.alternate;if(current$$1!==null){var oldIndex=current$$1.index;if(oldIndex<lastPlacedIndex){// This is a move.\nnewFiber.effectTag=Placement;return lastPlacedIndex;}else{// This item can stay in place.\nreturn oldIndex;}}else{// This is an insertion.\nnewFiber.effectTag=Placement;return lastPlacedIndex;}}function placeSingleChild(newFiber){// This is simpler for the single child case. We only need to do a\n// placement for inserting new children.\nif(shouldTrackSideEffects&&newFiber.alternate===null){newFiber.effectTag=Placement;}return newFiber;}function updateTextNode(returnFiber,current$$1,textContent,expirationTime){if(current$$1===null||current$$1.tag!==HostText){// Insert\nvar created=createFiberFromText(textContent,returnFiber.mode,expirationTime);created.return=returnFiber;return created;}else{// Update\nvar existing=useFiber(current$$1,textContent,expirationTime);existing.return=returnFiber;return existing;}}function updateElement(returnFiber,current$$1,element,expirationTime){if(current$$1!==null&&current$$1.elementType===element.type){// Move based on index\nvar existing=useFiber(current$$1,element.props,expirationTime);existing.ref=coerceRef(returnFiber,current$$1,element);existing.return=returnFiber;{existing._debugSource=element._source;existing._debugOwner=element._owner;}return existing;}else{// Insert\nvar created=createFiberFromElement(element,returnFiber.mode,expirationTime);created.ref=coerceRef(returnFiber,current$$1,element);created.return=returnFiber;return created;}}function updatePortal(returnFiber,current$$1,portal,expirationTime){if(current$$1===null||current$$1.tag!==HostPortal||current$$1.stateNode.containerInfo!==portal.containerInfo||current$$1.stateNode.implementation!==portal.implementation){// Insert\nvar created=createFiberFromPortal(portal,returnFiber.mode,expirationTime);created.return=returnFiber;return created;}else{// Update\nvar existing=useFiber(current$$1,portal.children||[],expirationTime);existing.return=returnFiber;return existing;}}function updateFragment(returnFiber,current$$1,fragment,expirationTime,key){if(current$$1===null||current$$1.tag!==Fragment){// Insert\nvar created=createFiberFromFragment(fragment,returnFiber.mode,expirationTime,key);created.return=returnFiber;return created;}else{// Update\nvar existing=useFiber(current$$1,fragment,expirationTime);existing.return=returnFiber;return existing;}}function createChild(returnFiber,newChild,expirationTime){if(typeof newChild==='string'||typeof newChild==='number'){// Text nodes don't have keys. If the previous node is implicitly keyed\n// we can continue to replace it without aborting even if it is not a text\n// node.\nvar created=createFiberFromText(''+newChild,returnFiber.mode,expirationTime);created.return=returnFiber;return created;}if((typeof newChild==='undefined'?'undefined':_typeof(newChild))==='object'&&newChild!==null){switch(newChild.$$typeof){case REACT_ELEMENT_TYPE:{var _created=createFiberFromElement(newChild,returnFiber.mode,expirationTime);_created.ref=coerceRef(returnFiber,null,newChild);_created.return=returnFiber;return _created;}case REACT_PORTAL_TYPE:{var _created2=createFiberFromPortal(newChild,returnFiber.mode,expirationTime);_created2.return=returnFiber;return _created2;}}if(isArray(newChild)||getIteratorFn(newChild)){var _created3=createFiberFromFragment(newChild,returnFiber.mode,expirationTime,null);_created3.return=returnFiber;return _created3;}throwOnInvalidObjectType(returnFiber,newChild);}{if(typeof newChild==='function'){warnOnFunctionType();}}return null;}function updateSlot(returnFiber,oldFiber,newChild,expirationTime){// Update the fiber if the keys match, otherwise return null.\nvar key=oldFiber!==null?oldFiber.key:null;if(typeof newChild==='string'||typeof newChild==='number'){// Text nodes don't have keys. If the previous node is implicitly keyed\n// we can continue to replace it without aborting even if it is not a text\n// node.\nif(key!==null){return null;}return updateTextNode(returnFiber,oldFiber,''+newChild,expirationTime);}if((typeof newChild==='undefined'?'undefined':_typeof(newChild))==='object'&&newChild!==null){switch(newChild.$$typeof){case REACT_ELEMENT_TYPE:{if(newChild.key===key){if(newChild.type===REACT_FRAGMENT_TYPE){return updateFragment(returnFiber,oldFiber,newChild.props.children,expirationTime,key);}return updateElement(returnFiber,oldFiber,newChild,expirationTime);}else{return null;}}case REACT_PORTAL_TYPE:{if(newChild.key===key){return updatePortal(returnFiber,oldFiber,newChild,expirationTime);}else{return null;}}}if(isArray(newChild)||getIteratorFn(newChild)){if(key!==null){return null;}return updateFragment(returnFiber,oldFiber,newChild,expirationTime,null);}throwOnInvalidObjectType(returnFiber,newChild);}{if(typeof newChild==='function'){warnOnFunctionType();}}return null;}function updateFromMap(existingChildren,returnFiber,newIdx,newChild,expirationTime){if(typeof newChild==='string'||typeof newChild==='number'){// Text nodes don't have keys, so we neither have to check the old nor\n// new node for the key. If both are text nodes, they match.\nvar matchedFiber=existingChildren.get(newIdx)||null;return updateTextNode(returnFiber,matchedFiber,''+newChild,expirationTime);}if((typeof newChild==='undefined'?'undefined':_typeof(newChild))==='object'&&newChild!==null){switch(newChild.$$typeof){case REACT_ELEMENT_TYPE:{var _matchedFiber=existingChildren.get(newChild.key===null?newIdx:newChild.key)||null;if(newChild.type===REACT_FRAGMENT_TYPE){return updateFragment(returnFiber,_matchedFiber,newChild.props.children,expirationTime,newChild.key);}return updateElement(returnFiber,_matchedFiber,newChild,expirationTime);}case REACT_PORTAL_TYPE:{var _matchedFiber2=existingChildren.get(newChild.key===null?newIdx:newChild.key)||null;return updatePortal(returnFiber,_matchedFiber2,newChild,expirationTime);}}if(isArray(newChild)||getIteratorFn(newChild)){var _matchedFiber3=existingChildren.get(newIdx)||null;return updateFragment(returnFiber,_matchedFiber3,newChild,expirationTime,null);}throwOnInvalidObjectType(returnFiber,newChild);}{if(typeof newChild==='function'){warnOnFunctionType();}}return null;}/**\n * Warns if there is a duplicate or missing key\n */function warnOnInvalidKey(child,knownKeys){{if((typeof child==='undefined'?'undefined':_typeof(child))!=='object'||child===null){return knownKeys;}switch(child.$$typeof){case REACT_ELEMENT_TYPE:case REACT_PORTAL_TYPE:warnForMissingKey(child);var key=child.key;if(typeof key!=='string'){break;}if(knownKeys===null){knownKeys=new Set();knownKeys.add(key);break;}if(!knownKeys.has(key)){knownKeys.add(key);break;}warning$1(false,'Encountered two children with the same key, `%s`. '+'Keys should be unique so that components maintain their identity '+'across updates. Non-unique keys may cause children to be '+'duplicated and/or omitted — the behavior is unsupported and '+'could change in a future version.',key);break;default:break;}}return knownKeys;}function reconcileChildrenArray(returnFiber,currentFirstChild,newChildren,expirationTime){// This algorithm can't optimize by searching from both ends since we\n// don't have backpointers on fibers. I'm trying to see how far we can get\n// with that model. If it ends up not being worth the tradeoffs, we can\n// add it later.\n// Even with a two ended optimization, we'd want to optimize for the case\n// where there are few changes and brute force the comparison instead of\n// going for the Map. It'd like to explore hitting that path first in\n// forward-only mode and only go for the Map once we notice that we need\n// lots of look ahead. This doesn't handle reversal as well as two ended\n// search but that's unusual. Besides, for the two ended optimization to\n// work on Iterables, we'd need to copy the whole set.\n// In this first iteration, we'll just live with hitting the bad case\n// (adding everything to a Map) in for every insert/move.\n// If you change this code, also update reconcileChildrenIterator() which\n// uses the same algorithm.\n{// First, validate keys.\nvar knownKeys=null;for(var i=0;i<newChildren.length;i++){var child=newChildren[i];knownKeys=warnOnInvalidKey(child,knownKeys);}}var resultingFirstChild=null;var previousNewFiber=null;var oldFiber=currentFirstChild;var lastPlacedIndex=0;var newIdx=0;var nextOldFiber=null;for(;oldFiber!==null&&newIdx<newChildren.length;newIdx++){if(oldFiber.index>newIdx){nextOldFiber=oldFiber;oldFiber=null;}else{nextOldFiber=oldFiber.sibling;}var newFiber=updateSlot(returnFiber,oldFiber,newChildren[newIdx],expirationTime);if(newFiber===null){// TODO: This breaks on empty slots like null children. That's\n// unfortunate because it triggers the slow path all the time. We need\n// a better way to communicate whether this was a miss or null,\n// boolean, undefined, etc.\nif(oldFiber===null){oldFiber=nextOldFiber;}break;}if(shouldTrackSideEffects){if(oldFiber&&newFiber.alternate===null){// We matched the slot, but we didn't reuse the existing fiber, so we\n// need to delete the existing child.\ndeleteChild(returnFiber,oldFiber);}}lastPlacedIndex=placeChild(newFiber,lastPlacedIndex,newIdx);if(previousNewFiber===null){// TODO: Move out of the loop. This only happens for the first run.\nresultingFirstChild=newFiber;}else{// TODO: Defer siblings if we're not at the right index for this slot.\n// I.e. if we had null values before, then we want to defer this\n// for each null value. However, we also don't want to call updateSlot\n// with the previous one.\npreviousNewFiber.sibling=newFiber;}previousNewFiber=newFiber;oldFiber=nextOldFiber;}if(newIdx===newChildren.length){// We've reached the end of the new children. We can delete the rest.\ndeleteRemainingChildren(returnFiber,oldFiber);return resultingFirstChild;}if(oldFiber===null){// If we don't have any more existing children we can choose a fast path\n// since the rest will all be insertions.\nfor(;newIdx<newChildren.length;newIdx++){var _newFiber=createChild(returnFiber,newChildren[newIdx],expirationTime);if(!_newFiber){continue;}lastPlacedIndex=placeChild(_newFiber,lastPlacedIndex,newIdx);if(previousNewFiber===null){// TODO: Move out of the loop. This only happens for the first run.\nresultingFirstChild=_newFiber;}else{previousNewFiber.sibling=_newFiber;}previousNewFiber=_newFiber;}return resultingFirstChild;}// Add all children to a key map for quick lookups.\nvar existingChildren=mapRemainingChildren(returnFiber,oldFiber);// Keep scanning and use the map to restore deleted items as moves.\nfor(;newIdx<newChildren.length;newIdx++){var _newFiber2=updateFromMap(existingChildren,returnFiber,newIdx,newChildren[newIdx],expirationTime);if(_newFiber2){if(shouldTrackSideEffects){if(_newFiber2.alternate!==null){// The new fiber is a work in progress, but if there exists a\n// current, that means that we reused the fiber. We need to delete\n// it from the child list so that we don't add it to the deletion\n// list.\nexistingChildren.delete(_newFiber2.key===null?newIdx:_newFiber2.key);}}lastPlacedIndex=placeChild(_newFiber2,lastPlacedIndex,newIdx);if(previousNewFiber===null){resultingFirstChild=_newFiber2;}else{previousNewFiber.sibling=_newFiber2;}previousNewFiber=_newFiber2;}}if(shouldTrackSideEffects){// Any existing children that weren't consumed above were deleted. We need\n// to add them to the deletion list.\nexistingChildren.forEach(function(child){return deleteChild(returnFiber,child);});}return resultingFirstChild;}function reconcileChildrenIterator(returnFiber,currentFirstChild,newChildrenIterable,expirationTime){// This is the same implementation as reconcileChildrenArray(),\n// but using the iterator instead.\nvar iteratorFn=getIteratorFn(newChildrenIterable);!(typeof iteratorFn==='function')?invariant(false,'An object is not an iterable. This error is likely caused by a bug in React. Please file an issue.'):void 0;{// We don't support rendering Generators because it's a mutation.\n// See https://github.com/facebook/react/issues/12995\nif(typeof Symbol==='function'&&// $FlowFixMe Flow doesn't know about toStringTag\nnewChildrenIterable[Symbol.toStringTag]==='Generator'){!didWarnAboutGenerators?warning$1(false,'Using Generators as children is unsupported and will likely yield '+'unexpected results because enumerating a generator mutates it. '+'You may convert it to an array with `Array.from()` or the '+'`[...spread]` operator before rendering. Keep in mind '+'you might need to polyfill these features for older browsers.'):void 0;didWarnAboutGenerators=true;}// Warn about using Maps as children\nif(newChildrenIterable.entries===iteratorFn){!didWarnAboutMaps?warning$1(false,'Using Maps as children is unsupported and will likely yield '+'unexpected results. Convert it to a sequence/iterable of keyed '+'ReactElements instead.'):void 0;didWarnAboutMaps=true;}// First, validate keys.\n// We'll get a different iterator later for the main pass.\nvar _newChildren=iteratorFn.call(newChildrenIterable);if(_newChildren){var knownKeys=null;var _step=_newChildren.next();for(;!_step.done;_step=_newChildren.next()){var child=_step.value;knownKeys=warnOnInvalidKey(child,knownKeys);}}}var newChildren=iteratorFn.call(newChildrenIterable);!(newChildren!=null)?invariant(false,'An iterable object provided no iterator.'):void 0;var resultingFirstChild=null;var previousNewFiber=null;var oldFiber=currentFirstChild;var lastPlacedIndex=0;var newIdx=0;var nextOldFiber=null;var step=newChildren.next();for(;oldFiber!==null&&!step.done;newIdx++,step=newChildren.next()){if(oldFiber.index>newIdx){nextOldFiber=oldFiber;oldFiber=null;}else{nextOldFiber=oldFiber.sibling;}var newFiber=updateSlot(returnFiber,oldFiber,step.value,expirationTime);if(newFiber===null){// TODO: This breaks on empty slots like null children. That's\n// unfortunate because it triggers the slow path all the time. We need\n// a better way to communicate whether this was a miss or null,\n// boolean, undefined, etc.\nif(!oldFiber){oldFiber=nextOldFiber;}break;}if(shouldTrackSideEffects){if(oldFiber&&newFiber.alternate===null){// We matched the slot, but we didn't reuse the existing fiber, so we\n// need to delete the existing child.\ndeleteChild(returnFiber,oldFiber);}}lastPlacedIndex=placeChild(newFiber,lastPlacedIndex,newIdx);if(previousNewFiber===null){// TODO: Move out of the loop. This only happens for the first run.\nresultingFirstChild=newFiber;}else{// TODO: Defer siblings if we're not at the right index for this slot.\n// I.e. if we had null values before, then we want to defer this\n// for each null value. However, we also don't want to call updateSlot\n// with the previous one.\npreviousNewFiber.sibling=newFiber;}previousNewFiber=newFiber;oldFiber=nextOldFiber;}if(step.done){// We've reached the end of the new children. We can delete the rest.\ndeleteRemainingChildren(returnFiber,oldFiber);return resultingFirstChild;}if(oldFiber===null){// If we don't have any more existing children we can choose a fast path\n// since the rest will all be insertions.\nfor(;!step.done;newIdx++,step=newChildren.next()){var _newFiber3=createChild(returnFiber,step.value,expirationTime);if(_newFiber3===null){continue;}lastPlacedIndex=placeChild(_newFiber3,lastPlacedIndex,newIdx);if(previousNewFiber===null){// TODO: Move out of the loop. This only happens for the first run.\nresultingFirstChild=_newFiber3;}else{previousNewFiber.sibling=_newFiber3;}previousNewFiber=_newFiber3;}return resultingFirstChild;}// Add all children to a key map for quick lookups.\nvar existingChildren=mapRemainingChildren(returnFiber,oldFiber);// Keep scanning and use the map to restore deleted items as moves.\nfor(;!step.done;newIdx++,step=newChildren.next()){var _newFiber4=updateFromMap(existingChildren,returnFiber,newIdx,step.value,expirationTime);if(_newFiber4!==null){if(shouldTrackSideEffects){if(_newFiber4.alternate!==null){// The new fiber is a work in progress, but if there exists a\n// current, that means that we reused the fiber. We need to delete\n// it from the child list so that we don't add it to the deletion\n// list.\nexistingChildren.delete(_newFiber4.key===null?newIdx:_newFiber4.key);}}lastPlacedIndex=placeChild(_newFiber4,lastPlacedIndex,newIdx);if(previousNewFiber===null){resultingFirstChild=_newFiber4;}else{previousNewFiber.sibling=_newFiber4;}previousNewFiber=_newFiber4;}}if(shouldTrackSideEffects){// Any existing children that weren't consumed above were deleted. We need\n// to add them to the deletion list.\nexistingChildren.forEach(function(child){return deleteChild(returnFiber,child);});}return resultingFirstChild;}function reconcileSingleTextNode(returnFiber,currentFirstChild,textContent,expirationTime){// There's no need to check for keys on text nodes since we don't have a\n// way to define them.\nif(currentFirstChild!==null&&currentFirstChild.tag===HostText){// We already have an existing node so let's just update it and delete\n// the rest.\ndeleteRemainingChildren(returnFiber,currentFirstChild.sibling);var existing=useFiber(currentFirstChild,textContent,expirationTime);existing.return=returnFiber;return existing;}// The existing first child is not a text node so we need to create one\n// and delete the existing ones.\ndeleteRemainingChildren(returnFiber,currentFirstChild);var created=createFiberFromText(textContent,returnFiber.mode,expirationTime);created.return=returnFiber;return created;}function reconcileSingleElement(returnFiber,currentFirstChild,element,expirationTime){var key=element.key;var child=currentFirstChild;while(child!==null){// TODO: If key === null and child.key === null, then this only applies to\n// the first item in the list.\nif(child.key===key){if(child.tag===Fragment?element.type===REACT_FRAGMENT_TYPE:child.elementType===element.type){deleteRemainingChildren(returnFiber,child.sibling);var existing=useFiber(child,element.type===REACT_FRAGMENT_TYPE?element.props.children:element.props,expirationTime);existing.ref=coerceRef(returnFiber,child,element);existing.return=returnFiber;{existing._debugSource=element._source;existing._debugOwner=element._owner;}return existing;}else{deleteRemainingChildren(returnFiber,child);break;}}else{deleteChild(returnFiber,child);}child=child.sibling;}if(element.type===REACT_FRAGMENT_TYPE){var created=createFiberFromFragment(element.props.children,returnFiber.mode,expirationTime,element.key);created.return=returnFiber;return created;}else{var _created4=createFiberFromElement(element,returnFiber.mode,expirationTime);_created4.ref=coerceRef(returnFiber,currentFirstChild,element);_created4.return=returnFiber;return _created4;}}function reconcileSinglePortal(returnFiber,currentFirstChild,portal,expirationTime){var key=portal.key;var child=currentFirstChild;while(child!==null){// TODO: If key === null and child.key === null, then this only applies to\n// the first item in the list.\nif(child.key===key){if(child.tag===HostPortal&&child.stateNode.containerInfo===portal.containerInfo&&child.stateNode.implementation===portal.implementation){deleteRemainingChildren(returnFiber,child.sibling);var existing=useFiber(child,portal.children||[],expirationTime);existing.return=returnFiber;return existing;}else{deleteRemainingChildren(returnFiber,child);break;}}else{deleteChild(returnFiber,child);}child=child.sibling;}var created=createFiberFromPortal(portal,returnFiber.mode,expirationTime);created.return=returnFiber;return created;}// This API will tag the children with the side-effect of the reconciliation\n// itself. They will be added to the side-effect list as we pass through the\n// children and the parent.\nfunction reconcileChildFibers(returnFiber,currentFirstChild,newChild,expirationTime){// This function is not recursive.\n// If the top level item is an array, we treat it as a set of children,\n// not as a fragment. Nested arrays on the other hand will be treated as\n// fragment nodes. Recursion happens at the normal flow.\n// Handle top level unkeyed fragments as if they were arrays.\n// This leads to an ambiguity between <>{[...]}</> and <>...</>.\n// We treat the ambiguous cases above the same.\nvar isUnkeyedTopLevelFragment=(typeof newChild==='undefined'?'undefined':_typeof(newChild))==='object'&&newChild!==null&&newChild.type===REACT_FRAGMENT_TYPE&&newChild.key===null;if(isUnkeyedTopLevelFragment){newChild=newChild.props.children;}// Handle object types\nvar isObject=(typeof newChild==='undefined'?'undefined':_typeof(newChild))==='object'&&newChild!==null;if(isObject){switch(newChild.$$typeof){case REACT_ELEMENT_TYPE:return placeSingleChild(reconcileSingleElement(returnFiber,currentFirstChild,newChild,expirationTime));case REACT_PORTAL_TYPE:return placeSingleChild(reconcileSinglePortal(returnFiber,currentFirstChild,newChild,expirationTime));}}if(typeof newChild==='string'||typeof newChild==='number'){return placeSingleChild(reconcileSingleTextNode(returnFiber,currentFirstChild,''+newChild,expirationTime));}if(isArray(newChild)){return reconcileChildrenArray(returnFiber,currentFirstChild,newChild,expirationTime);}if(getIteratorFn(newChild)){return reconcileChildrenIterator(returnFiber,currentFirstChild,newChild,expirationTime);}if(isObject){throwOnInvalidObjectType(returnFiber,newChild);}{if(typeof newChild==='function'){warnOnFunctionType();}}if(typeof newChild==='undefined'&&!isUnkeyedTopLevelFragment){// If the new child is undefined, and the return fiber is a composite\n// component, throw an error. If Fiber return types are disabled,\n// we already threw above.\nswitch(returnFiber.tag){case ClassComponent:{{var instance=returnFiber.stateNode;if(instance.render._isMockFunction){// We allow auto-mocks to proceed as if they're returning null.\nbreak;}}}// Intentionally fall through to the next case, which handles both\n// functions and classes\n// eslint-disable-next-lined no-fallthrough\ncase FunctionComponent:{var Component=returnFiber.type;invariant(false,'%s(...): Nothing was returned from render. This usually means a return statement is missing. Or, to render nothing, return null.',Component.displayName||Component.name||'Component');}}}// Remaining cases are all treated as empty.\nreturn deleteRemainingChildren(returnFiber,currentFirstChild);}return reconcileChildFibers;}", "function ChildReconciler(shouldTrackSideEffects){function deleteChild(returnFiber,childToDelete){if(!shouldTrackSideEffects){// Noop.\nreturn;}// Deletions are added in reversed order so we add it to the front.\n// At this point, the return fiber's effect list is empty except for\n// deletions, so we can just append the deletion to the list. The remaining\n// effects aren't added until the complete phase. Once we implement\n// resuming, this may not be true.\nvar last=returnFiber.lastEffect;if(last!==null){last.nextEffect=childToDelete;returnFiber.lastEffect=childToDelete;}else{returnFiber.firstEffect=returnFiber.lastEffect=childToDelete;}childToDelete.nextEffect=null;childToDelete.effectTag=Deletion;}function deleteRemainingChildren(returnFiber,currentFirstChild){if(!shouldTrackSideEffects){// Noop.\nreturn null;}// TODO: For the shouldClone case, this could be micro-optimized a bit by\n// assuming that after the first child we've already added everything.\nvar childToDelete=currentFirstChild;while(childToDelete!==null){deleteChild(returnFiber,childToDelete);childToDelete=childToDelete.sibling;}return null;}function mapRemainingChildren(returnFiber,currentFirstChild){// Add the remaining children to a temporary map so that we can find them by\n// keys quickly. Implicit (null) keys get added to this set with their index\nvar existingChildren=new Map();var existingChild=currentFirstChild;while(existingChild!==null){if(existingChild.key!==null){existingChildren.set(existingChild.key,existingChild);}else{existingChildren.set(existingChild.index,existingChild);}existingChild=existingChild.sibling;}return existingChildren;}function useFiber(fiber,pendingProps,expirationTime){// We currently set sibling to null and index to 0 here because it is easy\n// to forget to do before returning it. E.g. for the single child case.\nvar clone=createWorkInProgress(fiber,pendingProps,expirationTime);clone.index=0;clone.sibling=null;return clone;}function placeChild(newFiber,lastPlacedIndex,newIndex){newFiber.index=newIndex;if(!shouldTrackSideEffects){// Noop.\nreturn lastPlacedIndex;}var current$$1=newFiber.alternate;if(current$$1!==null){var oldIndex=current$$1.index;if(oldIndex<lastPlacedIndex){// This is a move.\nnewFiber.effectTag=Placement;return lastPlacedIndex;}else{// This item can stay in place.\nreturn oldIndex;}}else{// This is an insertion.\nnewFiber.effectTag=Placement;return lastPlacedIndex;}}function placeSingleChild(newFiber){// This is simpler for the single child case. We only need to do a\n// placement for inserting new children.\nif(shouldTrackSideEffects&&newFiber.alternate===null){newFiber.effectTag=Placement;}return newFiber;}function updateTextNode(returnFiber,current$$1,textContent,expirationTime){if(current$$1===null||current$$1.tag!==HostText){// Insert\nvar created=createFiberFromText(textContent,returnFiber.mode,expirationTime);created.return=returnFiber;return created;}else{// Update\nvar existing=useFiber(current$$1,textContent,expirationTime);existing.return=returnFiber;return existing;}}function updateElement(returnFiber,current$$1,element,expirationTime){if(current$$1!==null&&current$$1.elementType===element.type){// Move based on index\nvar existing=useFiber(current$$1,element.props,expirationTime);existing.ref=coerceRef(returnFiber,current$$1,element);existing.return=returnFiber;{existing._debugSource=element._source;existing._debugOwner=element._owner;}return existing;}else{// Insert\nvar created=createFiberFromElement(element,returnFiber.mode,expirationTime);created.ref=coerceRef(returnFiber,current$$1,element);created.return=returnFiber;return created;}}function updatePortal(returnFiber,current$$1,portal,expirationTime){if(current$$1===null||current$$1.tag!==HostPortal||current$$1.stateNode.containerInfo!==portal.containerInfo||current$$1.stateNode.implementation!==portal.implementation){// Insert\nvar created=createFiberFromPortal(portal,returnFiber.mode,expirationTime);created.return=returnFiber;return created;}else{// Update\nvar existing=useFiber(current$$1,portal.children||[],expirationTime);existing.return=returnFiber;return existing;}}function updateFragment(returnFiber,current$$1,fragment,expirationTime,key){if(current$$1===null||current$$1.tag!==Fragment){// Insert\nvar created=createFiberFromFragment(fragment,returnFiber.mode,expirationTime,key);created.return=returnFiber;return created;}else{// Update\nvar existing=useFiber(current$$1,fragment,expirationTime);existing.return=returnFiber;return existing;}}function createChild(returnFiber,newChild,expirationTime){if(typeof newChild==='string'||typeof newChild==='number'){// Text nodes don't have keys. If the previous node is implicitly keyed\n// we can continue to replace it without aborting even if it is not a text\n// node.\nvar created=createFiberFromText(''+newChild,returnFiber.mode,expirationTime);created.return=returnFiber;return created;}if(_typeof(newChild)==='object'&&newChild!==null){switch(newChild.$$typeof){case REACT_ELEMENT_TYPE:{var _created=createFiberFromElement(newChild,returnFiber.mode,expirationTime);_created.ref=coerceRef(returnFiber,null,newChild);_created.return=returnFiber;return _created;}case REACT_PORTAL_TYPE:{var _created2=createFiberFromPortal(newChild,returnFiber.mode,expirationTime);_created2.return=returnFiber;return _created2;}}if(isArray(newChild)||getIteratorFn(newChild)){var _created3=createFiberFromFragment(newChild,returnFiber.mode,expirationTime,null);_created3.return=returnFiber;return _created3;}throwOnInvalidObjectType(returnFiber,newChild);}{if(typeof newChild==='function'){warnOnFunctionType();}}return null;}function updateSlot(returnFiber,oldFiber,newChild,expirationTime){// Update the fiber if the keys match, otherwise return null.\nvar key=oldFiber!==null?oldFiber.key:null;if(typeof newChild==='string'||typeof newChild==='number'){// Text nodes don't have keys. If the previous node is implicitly keyed\n// we can continue to replace it without aborting even if it is not a text\n// node.\nif(key!==null){return null;}return updateTextNode(returnFiber,oldFiber,''+newChild,expirationTime);}if(_typeof(newChild)==='object'&&newChild!==null){switch(newChild.$$typeof){case REACT_ELEMENT_TYPE:{if(newChild.key===key){if(newChild.type===REACT_FRAGMENT_TYPE){return updateFragment(returnFiber,oldFiber,newChild.props.children,expirationTime,key);}return updateElement(returnFiber,oldFiber,newChild,expirationTime);}else{return null;}}case REACT_PORTAL_TYPE:{if(newChild.key===key){return updatePortal(returnFiber,oldFiber,newChild,expirationTime);}else{return null;}}}if(isArray(newChild)||getIteratorFn(newChild)){if(key!==null){return null;}return updateFragment(returnFiber,oldFiber,newChild,expirationTime,null);}throwOnInvalidObjectType(returnFiber,newChild);}{if(typeof newChild==='function'){warnOnFunctionType();}}return null;}function updateFromMap(existingChildren,returnFiber,newIdx,newChild,expirationTime){if(typeof newChild==='string'||typeof newChild==='number'){// Text nodes don't have keys, so we neither have to check the old nor\n// new node for the key. If both are text nodes, they match.\nvar matchedFiber=existingChildren.get(newIdx)||null;return updateTextNode(returnFiber,matchedFiber,''+newChild,expirationTime);}if(_typeof(newChild)==='object'&&newChild!==null){switch(newChild.$$typeof){case REACT_ELEMENT_TYPE:{var _matchedFiber=existingChildren.get(newChild.key===null?newIdx:newChild.key)||null;if(newChild.type===REACT_FRAGMENT_TYPE){return updateFragment(returnFiber,_matchedFiber,newChild.props.children,expirationTime,newChild.key);}return updateElement(returnFiber,_matchedFiber,newChild,expirationTime);}case REACT_PORTAL_TYPE:{var _matchedFiber2=existingChildren.get(newChild.key===null?newIdx:newChild.key)||null;return updatePortal(returnFiber,_matchedFiber2,newChild,expirationTime);}}if(isArray(newChild)||getIteratorFn(newChild)){var _matchedFiber3=existingChildren.get(newIdx)||null;return updateFragment(returnFiber,_matchedFiber3,newChild,expirationTime,null);}throwOnInvalidObjectType(returnFiber,newChild);}{if(typeof newChild==='function'){warnOnFunctionType();}}return null;}/**\n * Warns if there is a duplicate or missing key\n */function warnOnInvalidKey(child,knownKeys){{if(_typeof(child)!=='object'||child===null){return knownKeys;}switch(child.$$typeof){case REACT_ELEMENT_TYPE:case REACT_PORTAL_TYPE:warnForMissingKey(child);var key=child.key;if(typeof key!=='string'){break;}if(knownKeys===null){knownKeys=new Set();knownKeys.add(key);break;}if(!knownKeys.has(key)){knownKeys.add(key);break;}warning$1(false,'Encountered two children with the same key, `%s`. '+'Keys should be unique so that components maintain their identity '+'across updates. Non-unique keys may cause children to be '+'duplicated and/or omitted — the behavior is unsupported and '+'could change in a future version.',key);break;default:break;}}return knownKeys;}function reconcileChildrenArray(returnFiber,currentFirstChild,newChildren,expirationTime){// This algorithm can't optimize by searching from both ends since we\n// don't have backpointers on fibers. I'm trying to see how far we can get\n// with that model. If it ends up not being worth the tradeoffs, we can\n// add it later.\n// Even with a two ended optimization, we'd want to optimize for the case\n// where there are few changes and brute force the comparison instead of\n// going for the Map. It'd like to explore hitting that path first in\n// forward-only mode and only go for the Map once we notice that we need\n// lots of look ahead. This doesn't handle reversal as well as two ended\n// search but that's unusual. Besides, for the two ended optimization to\n// work on Iterables, we'd need to copy the whole set.\n// In this first iteration, we'll just live with hitting the bad case\n// (adding everything to a Map) in for every insert/move.\n// If you change this code, also update reconcileChildrenIterator() which\n// uses the same algorithm.\n{// First, validate keys.\nvar knownKeys=null;for(var i=0;i<newChildren.length;i++){var child=newChildren[i];knownKeys=warnOnInvalidKey(child,knownKeys);}}var resultingFirstChild=null;var previousNewFiber=null;var oldFiber=currentFirstChild;var lastPlacedIndex=0;var newIdx=0;var nextOldFiber=null;for(;oldFiber!==null&&newIdx<newChildren.length;newIdx++){if(oldFiber.index>newIdx){nextOldFiber=oldFiber;oldFiber=null;}else{nextOldFiber=oldFiber.sibling;}var newFiber=updateSlot(returnFiber,oldFiber,newChildren[newIdx],expirationTime);if(newFiber===null){// TODO: This breaks on empty slots like null children. That's\n// unfortunate because it triggers the slow path all the time. We need\n// a better way to communicate whether this was a miss or null,\n// boolean, undefined, etc.\nif(oldFiber===null){oldFiber=nextOldFiber;}break;}if(shouldTrackSideEffects){if(oldFiber&&newFiber.alternate===null){// We matched the slot, but we didn't reuse the existing fiber, so we\n// need to delete the existing child.\ndeleteChild(returnFiber,oldFiber);}}lastPlacedIndex=placeChild(newFiber,lastPlacedIndex,newIdx);if(previousNewFiber===null){// TODO: Move out of the loop. This only happens for the first run.\nresultingFirstChild=newFiber;}else{// TODO: Defer siblings if we're not at the right index for this slot.\n// I.e. if we had null values before, then we want to defer this\n// for each null value. However, we also don't want to call updateSlot\n// with the previous one.\npreviousNewFiber.sibling=newFiber;}previousNewFiber=newFiber;oldFiber=nextOldFiber;}if(newIdx===newChildren.length){// We've reached the end of the new children. We can delete the rest.\ndeleteRemainingChildren(returnFiber,oldFiber);return resultingFirstChild;}if(oldFiber===null){// If we don't have any more existing children we can choose a fast path\n// since the rest will all be insertions.\nfor(;newIdx<newChildren.length;newIdx++){var _newFiber=createChild(returnFiber,newChildren[newIdx],expirationTime);if(!_newFiber){continue;}lastPlacedIndex=placeChild(_newFiber,lastPlacedIndex,newIdx);if(previousNewFiber===null){// TODO: Move out of the loop. This only happens for the first run.\nresultingFirstChild=_newFiber;}else{previousNewFiber.sibling=_newFiber;}previousNewFiber=_newFiber;}return resultingFirstChild;}// Add all children to a key map for quick lookups.\nvar existingChildren=mapRemainingChildren(returnFiber,oldFiber);// Keep scanning and use the map to restore deleted items as moves.\nfor(;newIdx<newChildren.length;newIdx++){var _newFiber2=updateFromMap(existingChildren,returnFiber,newIdx,newChildren[newIdx],expirationTime);if(_newFiber2){if(shouldTrackSideEffects){if(_newFiber2.alternate!==null){// The new fiber is a work in progress, but if there exists a\n// current, that means that we reused the fiber. We need to delete\n// it from the child list so that we don't add it to the deletion\n// list.\nexistingChildren.delete(_newFiber2.key===null?newIdx:_newFiber2.key);}}lastPlacedIndex=placeChild(_newFiber2,lastPlacedIndex,newIdx);if(previousNewFiber===null){resultingFirstChild=_newFiber2;}else{previousNewFiber.sibling=_newFiber2;}previousNewFiber=_newFiber2;}}if(shouldTrackSideEffects){// Any existing children that weren't consumed above were deleted. We need\n// to add them to the deletion list.\nexistingChildren.forEach(function(child){return deleteChild(returnFiber,child);});}return resultingFirstChild;}function reconcileChildrenIterator(returnFiber,currentFirstChild,newChildrenIterable,expirationTime){// This is the same implementation as reconcileChildrenArray(),\n// but using the iterator instead.\nvar iteratorFn=getIteratorFn(newChildrenIterable);!(typeof iteratorFn==='function')?invariant(false,'An object is not an iterable. This error is likely caused by a bug in React. Please file an issue.'):void 0;{// We don't support rendering Generators because it's a mutation.\n// See https://github.com/facebook/react/issues/12995\nif(typeof Symbol==='function'&&// $FlowFixMe Flow doesn't know about toStringTag\nnewChildrenIterable[Symbol.toStringTag]==='Generator'){!didWarnAboutGenerators?warning$1(false,'Using Generators as children is unsupported and will likely yield '+'unexpected results because enumerating a generator mutates it. '+'You may convert it to an array with `Array.from()` or the '+'`[...spread]` operator before rendering. Keep in mind '+'you might need to polyfill these features for older browsers.'):void 0;didWarnAboutGenerators=true;}// Warn about using Maps as children\nif(newChildrenIterable.entries===iteratorFn){!didWarnAboutMaps?warning$1(false,'Using Maps as children is unsupported and will likely yield '+'unexpected results. Convert it to a sequence/iterable of keyed '+'ReactElements instead.'):void 0;didWarnAboutMaps=true;}// First, validate keys.\n// We'll get a different iterator later for the main pass.\nvar _newChildren=iteratorFn.call(newChildrenIterable);if(_newChildren){var knownKeys=null;var _step=_newChildren.next();for(;!_step.done;_step=_newChildren.next()){var child=_step.value;knownKeys=warnOnInvalidKey(child,knownKeys);}}}var newChildren=iteratorFn.call(newChildrenIterable);!(newChildren!=null)?invariant(false,'An iterable object provided no iterator.'):void 0;var resultingFirstChild=null;var previousNewFiber=null;var oldFiber=currentFirstChild;var lastPlacedIndex=0;var newIdx=0;var nextOldFiber=null;var step=newChildren.next();for(;oldFiber!==null&&!step.done;newIdx++,step=newChildren.next()){if(oldFiber.index>newIdx){nextOldFiber=oldFiber;oldFiber=null;}else{nextOldFiber=oldFiber.sibling;}var newFiber=updateSlot(returnFiber,oldFiber,step.value,expirationTime);if(newFiber===null){// TODO: This breaks on empty slots like null children. That's\n// unfortunate because it triggers the slow path all the time. We need\n// a better way to communicate whether this was a miss or null,\n// boolean, undefined, etc.\nif(!oldFiber){oldFiber=nextOldFiber;}break;}if(shouldTrackSideEffects){if(oldFiber&&newFiber.alternate===null){// We matched the slot, but we didn't reuse the existing fiber, so we\n// need to delete the existing child.\ndeleteChild(returnFiber,oldFiber);}}lastPlacedIndex=placeChild(newFiber,lastPlacedIndex,newIdx);if(previousNewFiber===null){// TODO: Move out of the loop. This only happens for the first run.\nresultingFirstChild=newFiber;}else{// TODO: Defer siblings if we're not at the right index for this slot.\n// I.e. if we had null values before, then we want to defer this\n// for each null value. However, we also don't want to call updateSlot\n// with the previous one.\npreviousNewFiber.sibling=newFiber;}previousNewFiber=newFiber;oldFiber=nextOldFiber;}if(step.done){// We've reached the end of the new children. We can delete the rest.\ndeleteRemainingChildren(returnFiber,oldFiber);return resultingFirstChild;}if(oldFiber===null){// If we don't have any more existing children we can choose a fast path\n// since the rest will all be insertions.\nfor(;!step.done;newIdx++,step=newChildren.next()){var _newFiber3=createChild(returnFiber,step.value,expirationTime);if(_newFiber3===null){continue;}lastPlacedIndex=placeChild(_newFiber3,lastPlacedIndex,newIdx);if(previousNewFiber===null){// TODO: Move out of the loop. This only happens for the first run.\nresultingFirstChild=_newFiber3;}else{previousNewFiber.sibling=_newFiber3;}previousNewFiber=_newFiber3;}return resultingFirstChild;}// Add all children to a key map for quick lookups.\nvar existingChildren=mapRemainingChildren(returnFiber,oldFiber);// Keep scanning and use the map to restore deleted items as moves.\nfor(;!step.done;newIdx++,step=newChildren.next()){var _newFiber4=updateFromMap(existingChildren,returnFiber,newIdx,step.value,expirationTime);if(_newFiber4!==null){if(shouldTrackSideEffects){if(_newFiber4.alternate!==null){// The new fiber is a work in progress, but if there exists a\n// current, that means that we reused the fiber. We need to delete\n// it from the child list so that we don't add it to the deletion\n// list.\nexistingChildren.delete(_newFiber4.key===null?newIdx:_newFiber4.key);}}lastPlacedIndex=placeChild(_newFiber4,lastPlacedIndex,newIdx);if(previousNewFiber===null){resultingFirstChild=_newFiber4;}else{previousNewFiber.sibling=_newFiber4;}previousNewFiber=_newFiber4;}}if(shouldTrackSideEffects){// Any existing children that weren't consumed above were deleted. We need\n// to add them to the deletion list.\nexistingChildren.forEach(function(child){return deleteChild(returnFiber,child);});}return resultingFirstChild;}function reconcileSingleTextNode(returnFiber,currentFirstChild,textContent,expirationTime){// There's no need to check for keys on text nodes since we don't have a\n// way to define them.\nif(currentFirstChild!==null&&currentFirstChild.tag===HostText){// We already have an existing node so let's just update it and delete\n// the rest.\ndeleteRemainingChildren(returnFiber,currentFirstChild.sibling);var existing=useFiber(currentFirstChild,textContent,expirationTime);existing.return=returnFiber;return existing;}// The existing first child is not a text node so we need to create one\n// and delete the existing ones.\ndeleteRemainingChildren(returnFiber,currentFirstChild);var created=createFiberFromText(textContent,returnFiber.mode,expirationTime);created.return=returnFiber;return created;}function reconcileSingleElement(returnFiber,currentFirstChild,element,expirationTime){var key=element.key;var child=currentFirstChild;while(child!==null){// TODO: If key === null and child.key === null, then this only applies to\n// the first item in the list.\nif(child.key===key){if(child.tag===Fragment?element.type===REACT_FRAGMENT_TYPE:child.elementType===element.type){deleteRemainingChildren(returnFiber,child.sibling);var existing=useFiber(child,element.type===REACT_FRAGMENT_TYPE?element.props.children:element.props,expirationTime);existing.ref=coerceRef(returnFiber,child,element);existing.return=returnFiber;{existing._debugSource=element._source;existing._debugOwner=element._owner;}return existing;}else{deleteRemainingChildren(returnFiber,child);break;}}else{deleteChild(returnFiber,child);}child=child.sibling;}if(element.type===REACT_FRAGMENT_TYPE){var created=createFiberFromFragment(element.props.children,returnFiber.mode,expirationTime,element.key);created.return=returnFiber;return created;}else{var _created4=createFiberFromElement(element,returnFiber.mode,expirationTime);_created4.ref=coerceRef(returnFiber,currentFirstChild,element);_created4.return=returnFiber;return _created4;}}function reconcileSinglePortal(returnFiber,currentFirstChild,portal,expirationTime){var key=portal.key;var child=currentFirstChild;while(child!==null){// TODO: If key === null and child.key === null, then this only applies to\n// the first item in the list.\nif(child.key===key){if(child.tag===HostPortal&&child.stateNode.containerInfo===portal.containerInfo&&child.stateNode.implementation===portal.implementation){deleteRemainingChildren(returnFiber,child.sibling);var existing=useFiber(child,portal.children||[],expirationTime);existing.return=returnFiber;return existing;}else{deleteRemainingChildren(returnFiber,child);break;}}else{deleteChild(returnFiber,child);}child=child.sibling;}var created=createFiberFromPortal(portal,returnFiber.mode,expirationTime);created.return=returnFiber;return created;}// This API will tag the children with the side-effect of the reconciliation\n// itself. They will be added to the side-effect list as we pass through the\n// children and the parent.\nfunction reconcileChildFibers(returnFiber,currentFirstChild,newChild,expirationTime){// This function is not recursive.\n// If the top level item is an array, we treat it as a set of children,\n// not as a fragment. Nested arrays on the other hand will be treated as\n// fragment nodes. Recursion happens at the normal flow.\n// Handle top level unkeyed fragments as if they were arrays.\n// This leads to an ambiguity between <>{[...]}</> and <>...</>.\n// We treat the ambiguous cases above the same.\nvar isUnkeyedTopLevelFragment=_typeof(newChild)==='object'&&newChild!==null&&newChild.type===REACT_FRAGMENT_TYPE&&newChild.key===null;if(isUnkeyedTopLevelFragment){newChild=newChild.props.children;}// Handle object types\nvar isObject=_typeof(newChild)==='object'&&newChild!==null;if(isObject){switch(newChild.$$typeof){case REACT_ELEMENT_TYPE:return placeSingleChild(reconcileSingleElement(returnFiber,currentFirstChild,newChild,expirationTime));case REACT_PORTAL_TYPE:return placeSingleChild(reconcileSinglePortal(returnFiber,currentFirstChild,newChild,expirationTime));}}if(typeof newChild==='string'||typeof newChild==='number'){return placeSingleChild(reconcileSingleTextNode(returnFiber,currentFirstChild,''+newChild,expirationTime));}if(isArray(newChild)){return reconcileChildrenArray(returnFiber,currentFirstChild,newChild,expirationTime);}if(getIteratorFn(newChild)){return reconcileChildrenIterator(returnFiber,currentFirstChild,newChild,expirationTime);}if(isObject){throwOnInvalidObjectType(returnFiber,newChild);}{if(typeof newChild==='function'){warnOnFunctionType();}}if(typeof newChild==='undefined'&&!isUnkeyedTopLevelFragment){// If the new child is undefined, and the return fiber is a composite\n// component, throw an error. If Fiber return types are disabled,\n// we already threw above.\nswitch(returnFiber.tag){case ClassComponent:{{var instance=returnFiber.stateNode;if(instance.render._isMockFunction){// We allow auto-mocks to proceed as if they're returning null.\nbreak;}}}// Intentionally fall through to the next case, which handles both\n// functions and classes\n// eslint-disable-next-lined no-fallthrough\ncase FunctionComponent:{var Component=returnFiber.type;invariant(false,'%s(...): Nothing was returned from render. This usually means a return statement is missing. Or, to render nothing, return null.',Component.displayName||Component.name||'Component');}}}// Remaining cases are all treated as empty.\nreturn deleteRemainingChildren(returnFiber,currentFirstChild);}return reconcileChildFibers;}", "function thunkify(thunkFn) {\n return (...args) => {\n return (cb) => {\n thunkFn.apply(this, [...args, cb]);\n };\n };\n}", "function ChildReconciler(shouldTrackSideEffects){function deleteChild(returnFiber,childToDelete){if(!shouldTrackSideEffects){// Noop.\nreturn;}// Deletions are added in reversed order so we add it to the front.\n// At this point, the return fiber's effect list is empty except for\n// deletions, so we can just append the deletion to the list. The remaining\n// effects aren't added until the complete phase. Once we implement\n// resuming, this may not be true.\nvar last=returnFiber.lastEffect;if(last!==null){last.nextEffect=childToDelete;returnFiber.lastEffect=childToDelete;}else{returnFiber.firstEffect=returnFiber.lastEffect=childToDelete;}childToDelete.nextEffect=null;childToDelete.effectTag=Deletion;}function deleteRemainingChildren(returnFiber,currentFirstChild){if(!shouldTrackSideEffects){// Noop.\nreturn null;}// TODO: For the shouldClone case, this could be micro-optimized a bit by\n// assuming that after the first child we've already added everything.\nvar childToDelete=currentFirstChild;while(childToDelete!==null){deleteChild(returnFiber,childToDelete);childToDelete=childToDelete.sibling;}return null;}function mapRemainingChildren(returnFiber,currentFirstChild){// Add the remaining children to a temporary map so that we can find them by\n// keys quickly. Implicit (null) keys get added to this set with their index\nvar existingChildren=new Map();var existingChild=currentFirstChild;while(existingChild!==null){if(existingChild.key!==null){existingChildren.set(existingChild.key,existingChild);}else{existingChildren.set(existingChild.index,existingChild);}existingChild=existingChild.sibling;}return existingChildren;}function useFiber(fiber,pendingProps,expirationTime){// We currently set sibling to null and index to 0 here because it is easy\n// to forget to do before returning it. E.g. for the single child case.\nvar clone=createWorkInProgress(fiber,pendingProps);clone.index=0;clone.sibling=null;return clone;}function placeChild(newFiber,lastPlacedIndex,newIndex){newFiber.index=newIndex;if(!shouldTrackSideEffects){// Noop.\nreturn lastPlacedIndex;}var current$$1=newFiber.alternate;if(current$$1!==null){var oldIndex=current$$1.index;if(oldIndex<lastPlacedIndex){// This is a move.\nnewFiber.effectTag=Placement;return lastPlacedIndex;}else{// This item can stay in place.\nreturn oldIndex;}}else{// This is an insertion.\nnewFiber.effectTag=Placement;return lastPlacedIndex;}}function placeSingleChild(newFiber){// This is simpler for the single child case. We only need to do a\n// placement for inserting new children.\nif(shouldTrackSideEffects&&newFiber.alternate===null){newFiber.effectTag=Placement;}return newFiber;}function updateTextNode(returnFiber,current$$1,textContent,expirationTime){if(current$$1===null||current$$1.tag!==HostText){// Insert\nvar created=createFiberFromText(textContent,returnFiber.mode,expirationTime);created.return=returnFiber;return created;}else{// Update\nvar existing=useFiber(current$$1,textContent);existing.return=returnFiber;return existing;}}function updateElement(returnFiber,current$$1,element,expirationTime){if(current$$1!==null&&current$$1.elementType===element.type){// Move based on index\nvar existing=useFiber(current$$1,element.props);existing.ref=coerceRef(returnFiber,current$$1,element);existing.return=returnFiber;{existing._debugSource=element._source;existing._debugOwner=element._owner;}return existing;}else{// Insert\nvar created=createFiberFromElement(element,returnFiber.mode,expirationTime);created.ref=coerceRef(returnFiber,current$$1,element);created.return=returnFiber;return created;}}function updatePortal(returnFiber,current$$1,portal,expirationTime){if(current$$1===null||current$$1.tag!==HostPortal||current$$1.stateNode.containerInfo!==portal.containerInfo||current$$1.stateNode.implementation!==portal.implementation){// Insert\nvar created=createFiberFromPortal(portal,returnFiber.mode,expirationTime);created.return=returnFiber;return created;}else{// Update\nvar existing=useFiber(current$$1,portal.children||[]);existing.return=returnFiber;return existing;}}function updateFragment(returnFiber,current$$1,fragment,expirationTime,key){if(current$$1===null||current$$1.tag!==Fragment){// Insert\nvar created=createFiberFromFragment(fragment,returnFiber.mode,expirationTime,key);created.return=returnFiber;return created;}else{// Update\nvar existing=useFiber(current$$1,fragment);existing.return=returnFiber;return existing;}}function createChild(returnFiber,newChild,expirationTime){if(typeof newChild==='string'||typeof newChild==='number'){// Text nodes don't have keys. If the previous node is implicitly keyed\n// we can continue to replace it without aborting even if it is not a text\n// node.\nvar created=createFiberFromText(''+newChild,returnFiber.mode,expirationTime);created.return=returnFiber;return created;}if(typeof newChild==='object'&&newChild!==null){switch(newChild.$$typeof){case REACT_ELEMENT_TYPE:{var _created=createFiberFromElement(newChild,returnFiber.mode,expirationTime);_created.ref=coerceRef(returnFiber,null,newChild);_created.return=returnFiber;return _created;}case REACT_PORTAL_TYPE:{var _created2=createFiberFromPortal(newChild,returnFiber.mode,expirationTime);_created2.return=returnFiber;return _created2;}}if(isArray(newChild)||getIteratorFn(newChild)){var _created3=createFiberFromFragment(newChild,returnFiber.mode,expirationTime,null);_created3.return=returnFiber;return _created3;}throwOnInvalidObjectType(returnFiber,newChild);}{if(typeof newChild==='function'){warnOnFunctionType();}}return null;}function updateSlot(returnFiber,oldFiber,newChild,expirationTime){// Update the fiber if the keys match, otherwise return null.\nvar key=oldFiber!==null?oldFiber.key:null;if(typeof newChild==='string'||typeof newChild==='number'){// Text nodes don't have keys. If the previous node is implicitly keyed\n// we can continue to replace it without aborting even if it is not a text\n// node.\nif(key!==null){return null;}return updateTextNode(returnFiber,oldFiber,''+newChild,expirationTime);}if(typeof newChild==='object'&&newChild!==null){switch(newChild.$$typeof){case REACT_ELEMENT_TYPE:{if(newChild.key===key){if(newChild.type===REACT_FRAGMENT_TYPE){return updateFragment(returnFiber,oldFiber,newChild.props.children,expirationTime,key);}return updateElement(returnFiber,oldFiber,newChild,expirationTime);}else{return null;}}case REACT_PORTAL_TYPE:{if(newChild.key===key){return updatePortal(returnFiber,oldFiber,newChild,expirationTime);}else{return null;}}}if(isArray(newChild)||getIteratorFn(newChild)){if(key!==null){return null;}return updateFragment(returnFiber,oldFiber,newChild,expirationTime,null);}throwOnInvalidObjectType(returnFiber,newChild);}{if(typeof newChild==='function'){warnOnFunctionType();}}return null;}function updateFromMap(existingChildren,returnFiber,newIdx,newChild,expirationTime){if(typeof newChild==='string'||typeof newChild==='number'){// Text nodes don't have keys, so we neither have to check the old nor\n// new node for the key. If both are text nodes, they match.\nvar matchedFiber=existingChildren.get(newIdx)||null;return updateTextNode(returnFiber,matchedFiber,''+newChild,expirationTime);}if(typeof newChild==='object'&&newChild!==null){switch(newChild.$$typeof){case REACT_ELEMENT_TYPE:{var _matchedFiber=existingChildren.get(newChild.key===null?newIdx:newChild.key)||null;if(newChild.type===REACT_FRAGMENT_TYPE){return updateFragment(returnFiber,_matchedFiber,newChild.props.children,expirationTime,newChild.key);}return updateElement(returnFiber,_matchedFiber,newChild,expirationTime);}case REACT_PORTAL_TYPE:{var _matchedFiber2=existingChildren.get(newChild.key===null?newIdx:newChild.key)||null;return updatePortal(returnFiber,_matchedFiber2,newChild,expirationTime);}}if(isArray(newChild)||getIteratorFn(newChild)){var _matchedFiber3=existingChildren.get(newIdx)||null;return updateFragment(returnFiber,_matchedFiber3,newChild,expirationTime,null);}throwOnInvalidObjectType(returnFiber,newChild);}{if(typeof newChild==='function'){warnOnFunctionType();}}return null;}/**\n * Warns if there is a duplicate or missing key\n */function warnOnInvalidKey(child,knownKeys){{if(typeof child!=='object'||child===null){return knownKeys;}switch(child.$$typeof){case REACT_ELEMENT_TYPE:case REACT_PORTAL_TYPE:warnForMissingKey(child);var key=child.key;if(typeof key!=='string'){break;}if(knownKeys===null){knownKeys=new Set();knownKeys.add(key);break;}if(!knownKeys.has(key)){knownKeys.add(key);break;}warning$1(false,'Encountered two children with the same key, `%s`. '+'Keys should be unique so that components maintain their identity '+'across updates. Non-unique keys may cause children to be '+'duplicated and/or omitted — the behavior is unsupported and '+'could change in a future version.',key);break;default:break;}}return knownKeys;}function reconcileChildrenArray(returnFiber,currentFirstChild,newChildren,expirationTime){// This algorithm can't optimize by searching from both ends since we\n// don't have backpointers on fibers. I'm trying to see how far we can get\n// with that model. If it ends up not being worth the tradeoffs, we can\n// add it later.\n// Even with a two ended optimization, we'd want to optimize for the case\n// where there are few changes and brute force the comparison instead of\n// going for the Map. It'd like to explore hitting that path first in\n// forward-only mode and only go for the Map once we notice that we need\n// lots of look ahead. This doesn't handle reversal as well as two ended\n// search but that's unusual. Besides, for the two ended optimization to\n// work on Iterables, we'd need to copy the whole set.\n// In this first iteration, we'll just live with hitting the bad case\n// (adding everything to a Map) in for every insert/move.\n// If you change this code, also update reconcileChildrenIterator() which\n// uses the same algorithm.\n{// First, validate keys.\nvar knownKeys=null;for(var i=0;i<newChildren.length;i++){var child=newChildren[i];knownKeys=warnOnInvalidKey(child,knownKeys);}}var resultingFirstChild=null;var previousNewFiber=null;var oldFiber=currentFirstChild;var lastPlacedIndex=0;var newIdx=0;var nextOldFiber=null;for(;oldFiber!==null&&newIdx<newChildren.length;newIdx++){if(oldFiber.index>newIdx){nextOldFiber=oldFiber;oldFiber=null;}else{nextOldFiber=oldFiber.sibling;}var newFiber=updateSlot(returnFiber,oldFiber,newChildren[newIdx],expirationTime);if(newFiber===null){// TODO: This breaks on empty slots like null children. That's\n// unfortunate because it triggers the slow path all the time. We need\n// a better way to communicate whether this was a miss or null,\n// boolean, undefined, etc.\nif(oldFiber===null){oldFiber=nextOldFiber;}break;}if(shouldTrackSideEffects){if(oldFiber&&newFiber.alternate===null){// We matched the slot, but we didn't reuse the existing fiber, so we\n// need to delete the existing child.\ndeleteChild(returnFiber,oldFiber);}}lastPlacedIndex=placeChild(newFiber,lastPlacedIndex,newIdx);if(previousNewFiber===null){// TODO: Move out of the loop. This only happens for the first run.\nresultingFirstChild=newFiber;}else{// TODO: Defer siblings if we're not at the right index for this slot.\n// I.e. if we had null values before, then we want to defer this\n// for each null value. However, we also don't want to call updateSlot\n// with the previous one.\npreviousNewFiber.sibling=newFiber;}previousNewFiber=newFiber;oldFiber=nextOldFiber;}if(newIdx===newChildren.length){// We've reached the end of the new children. We can delete the rest.\ndeleteRemainingChildren(returnFiber,oldFiber);return resultingFirstChild;}if(oldFiber===null){// If we don't have any more existing children we can choose a fast path\n// since the rest will all be insertions.\nfor(;newIdx<newChildren.length;newIdx++){var _newFiber=createChild(returnFiber,newChildren[newIdx],expirationTime);if(!_newFiber){continue;}lastPlacedIndex=placeChild(_newFiber,lastPlacedIndex,newIdx);if(previousNewFiber===null){// TODO: Move out of the loop. This only happens for the first run.\nresultingFirstChild=_newFiber;}else{previousNewFiber.sibling=_newFiber;}previousNewFiber=_newFiber;}return resultingFirstChild;}// Add all children to a key map for quick lookups.\nvar existingChildren=mapRemainingChildren(returnFiber,oldFiber);// Keep scanning and use the map to restore deleted items as moves.\nfor(;newIdx<newChildren.length;newIdx++){var _newFiber2=updateFromMap(existingChildren,returnFiber,newIdx,newChildren[newIdx],expirationTime);if(_newFiber2){if(shouldTrackSideEffects){if(_newFiber2.alternate!==null){// The new fiber is a work in progress, but if there exists a\n// current, that means that we reused the fiber. We need to delete\n// it from the child list so that we don't add it to the deletion\n// list.\nexistingChildren.delete(_newFiber2.key===null?newIdx:_newFiber2.key);}}lastPlacedIndex=placeChild(_newFiber2,lastPlacedIndex,newIdx);if(previousNewFiber===null){resultingFirstChild=_newFiber2;}else{previousNewFiber.sibling=_newFiber2;}previousNewFiber=_newFiber2;}}if(shouldTrackSideEffects){// Any existing children that weren't consumed above were deleted. We need\n// to add them to the deletion list.\nexistingChildren.forEach(function(child){return deleteChild(returnFiber,child);});}return resultingFirstChild;}function reconcileChildrenIterator(returnFiber,currentFirstChild,newChildrenIterable,expirationTime){// This is the same implementation as reconcileChildrenArray(),\n// but using the iterator instead.\nvar iteratorFn=getIteratorFn(newChildrenIterable);!(typeof iteratorFn==='function')?invariant(false,'An object is not an iterable. This error is likely caused by a bug in React. Please file an issue.'):void 0;{// We don't support rendering Generators because it's a mutation.\n// See https://github.com/facebook/react/issues/12995\nif(typeof Symbol==='function'&&// $FlowFixMe Flow doesn't know about toStringTag\nnewChildrenIterable[Symbol.toStringTag]==='Generator'){!didWarnAboutGenerators?warning$1(false,'Using Generators as children is unsupported and will likely yield '+'unexpected results because enumerating a generator mutates it. '+'You may convert it to an array with `Array.from()` or the '+'`[...spread]` operator before rendering. Keep in mind '+'you might need to polyfill these features for older browsers.'):void 0;didWarnAboutGenerators=true;}// Warn about using Maps as children\nif(newChildrenIterable.entries===iteratorFn){!didWarnAboutMaps?warning$1(false,'Using Maps as children is unsupported and will likely yield '+'unexpected results. Convert it to a sequence/iterable of keyed '+'ReactElements instead.'):void 0;didWarnAboutMaps=true;}// First, validate keys.\n// We'll get a different iterator later for the main pass.\nvar _newChildren=iteratorFn.call(newChildrenIterable);if(_newChildren){var knownKeys=null;var _step=_newChildren.next();for(;!_step.done;_step=_newChildren.next()){var child=_step.value;knownKeys=warnOnInvalidKey(child,knownKeys);}}}var newChildren=iteratorFn.call(newChildrenIterable);!(newChildren!=null)?invariant(false,'An iterable object provided no iterator.'):void 0;var resultingFirstChild=null;var previousNewFiber=null;var oldFiber=currentFirstChild;var lastPlacedIndex=0;var newIdx=0;var nextOldFiber=null;var step=newChildren.next();for(;oldFiber!==null&&!step.done;newIdx++,step=newChildren.next()){if(oldFiber.index>newIdx){nextOldFiber=oldFiber;oldFiber=null;}else{nextOldFiber=oldFiber.sibling;}var newFiber=updateSlot(returnFiber,oldFiber,step.value,expirationTime);if(newFiber===null){// TODO: This breaks on empty slots like null children. That's\n// unfortunate because it triggers the slow path all the time. We need\n// a better way to communicate whether this was a miss or null,\n// boolean, undefined, etc.\nif(!oldFiber){oldFiber=nextOldFiber;}break;}if(shouldTrackSideEffects){if(oldFiber&&newFiber.alternate===null){// We matched the slot, but we didn't reuse the existing fiber, so we\n// need to delete the existing child.\ndeleteChild(returnFiber,oldFiber);}}lastPlacedIndex=placeChild(newFiber,lastPlacedIndex,newIdx);if(previousNewFiber===null){// TODO: Move out of the loop. This only happens for the first run.\nresultingFirstChild=newFiber;}else{// TODO: Defer siblings if we're not at the right index for this slot.\n// I.e. if we had null values before, then we want to defer this\n// for each null value. However, we also don't want to call updateSlot\n// with the previous one.\npreviousNewFiber.sibling=newFiber;}previousNewFiber=newFiber;oldFiber=nextOldFiber;}if(step.done){// We've reached the end of the new children. We can delete the rest.\ndeleteRemainingChildren(returnFiber,oldFiber);return resultingFirstChild;}if(oldFiber===null){// If we don't have any more existing children we can choose a fast path\n// since the rest will all be insertions.\nfor(;!step.done;newIdx++,step=newChildren.next()){var _newFiber3=createChild(returnFiber,step.value,expirationTime);if(_newFiber3===null){continue;}lastPlacedIndex=placeChild(_newFiber3,lastPlacedIndex,newIdx);if(previousNewFiber===null){// TODO: Move out of the loop. This only happens for the first run.\nresultingFirstChild=_newFiber3;}else{previousNewFiber.sibling=_newFiber3;}previousNewFiber=_newFiber3;}return resultingFirstChild;}// Add all children to a key map for quick lookups.\nvar existingChildren=mapRemainingChildren(returnFiber,oldFiber);// Keep scanning and use the map to restore deleted items as moves.\nfor(;!step.done;newIdx++,step=newChildren.next()){var _newFiber4=updateFromMap(existingChildren,returnFiber,newIdx,step.value,expirationTime);if(_newFiber4!==null){if(shouldTrackSideEffects){if(_newFiber4.alternate!==null){// The new fiber is a work in progress, but if there exists a\n// current, that means that we reused the fiber. We need to delete\n// it from the child list so that we don't add it to the deletion\n// list.\nexistingChildren.delete(_newFiber4.key===null?newIdx:_newFiber4.key);}}lastPlacedIndex=placeChild(_newFiber4,lastPlacedIndex,newIdx);if(previousNewFiber===null){resultingFirstChild=_newFiber4;}else{previousNewFiber.sibling=_newFiber4;}previousNewFiber=_newFiber4;}}if(shouldTrackSideEffects){// Any existing children that weren't consumed above were deleted. We need\n// to add them to the deletion list.\nexistingChildren.forEach(function(child){return deleteChild(returnFiber,child);});}return resultingFirstChild;}function reconcileSingleTextNode(returnFiber,currentFirstChild,textContent,expirationTime){// There's no need to check for keys on text nodes since we don't have a\n// way to define them.\nif(currentFirstChild!==null&&currentFirstChild.tag===HostText){// We already have an existing node so let's just update it and delete\n// the rest.\ndeleteRemainingChildren(returnFiber,currentFirstChild.sibling);var existing=useFiber(currentFirstChild,textContent);existing.return=returnFiber;return existing;}// The existing first child is not a text node so we need to create one\n// and delete the existing ones.\ndeleteRemainingChildren(returnFiber,currentFirstChild);var created=createFiberFromText(textContent,returnFiber.mode,expirationTime);created.return=returnFiber;return created;}function reconcileSingleElement(returnFiber,currentFirstChild,element,expirationTime){var key=element.key;var child=currentFirstChild;while(child!==null){// TODO: If key === null and child.key === null, then this only applies to\n// the first item in the list.\nif(child.key===key){if(child.tag===Fragment?element.type===REACT_FRAGMENT_TYPE:child.elementType===element.type){deleteRemainingChildren(returnFiber,child.sibling);var existing=useFiber(child,element.type===REACT_FRAGMENT_TYPE?element.props.children:element.props);existing.ref=coerceRef(returnFiber,child,element);existing.return=returnFiber;{existing._debugSource=element._source;existing._debugOwner=element._owner;}return existing;}else{deleteRemainingChildren(returnFiber,child);break;}}else{deleteChild(returnFiber,child);}child=child.sibling;}if(element.type===REACT_FRAGMENT_TYPE){var created=createFiberFromFragment(element.props.children,returnFiber.mode,expirationTime,element.key);created.return=returnFiber;return created;}else{var _created4=createFiberFromElement(element,returnFiber.mode,expirationTime);_created4.ref=coerceRef(returnFiber,currentFirstChild,element);_created4.return=returnFiber;return _created4;}}function reconcileSinglePortal(returnFiber,currentFirstChild,portal,expirationTime){var key=portal.key;var child=currentFirstChild;while(child!==null){// TODO: If key === null and child.key === null, then this only applies to\n// the first item in the list.\nif(child.key===key){if(child.tag===HostPortal&&child.stateNode.containerInfo===portal.containerInfo&&child.stateNode.implementation===portal.implementation){deleteRemainingChildren(returnFiber,child.sibling);var existing=useFiber(child,portal.children||[]);existing.return=returnFiber;return existing;}else{deleteRemainingChildren(returnFiber,child);break;}}else{deleteChild(returnFiber,child);}child=child.sibling;}var created=createFiberFromPortal(portal,returnFiber.mode,expirationTime);created.return=returnFiber;return created;}// This API will tag the children with the side-effect of the reconciliation\n// itself. They will be added to the side-effect list as we pass through the\n// children and the parent.\nfunction reconcileChildFibers(returnFiber,currentFirstChild,newChild,expirationTime){// This function is not recursive.\n// If the top level item is an array, we treat it as a set of children,\n// not as a fragment. Nested arrays on the other hand will be treated as\n// fragment nodes. Recursion happens at the normal flow.\n// Handle top level unkeyed fragments as if they were arrays.\n// This leads to an ambiguity between <>{[...]}</> and <>...</>.\n// We treat the ambiguous cases above the same.\nvar isUnkeyedTopLevelFragment=typeof newChild==='object'&&newChild!==null&&newChild.type===REACT_FRAGMENT_TYPE&&newChild.key===null;if(isUnkeyedTopLevelFragment){newChild=newChild.props.children;}// Handle object types\nvar isObject=typeof newChild==='object'&&newChild!==null;if(isObject){switch(newChild.$$typeof){case REACT_ELEMENT_TYPE:return placeSingleChild(reconcileSingleElement(returnFiber,currentFirstChild,newChild,expirationTime));case REACT_PORTAL_TYPE:return placeSingleChild(reconcileSinglePortal(returnFiber,currentFirstChild,newChild,expirationTime));}}if(typeof newChild==='string'||typeof newChild==='number'){return placeSingleChild(reconcileSingleTextNode(returnFiber,currentFirstChild,''+newChild,expirationTime));}if(isArray(newChild)){return reconcileChildrenArray(returnFiber,currentFirstChild,newChild,expirationTime);}if(getIteratorFn(newChild)){return reconcileChildrenIterator(returnFiber,currentFirstChild,newChild,expirationTime);}if(isObject){throwOnInvalidObjectType(returnFiber,newChild);}{if(typeof newChild==='function'){warnOnFunctionType();}}if(typeof newChild==='undefined'&&!isUnkeyedTopLevelFragment){// If the new child is undefined, and the return fiber is a composite\n// component, throw an error. If Fiber return types are disabled,\n// we already threw above.\nswitch(returnFiber.tag){case ClassComponent:{{var instance=returnFiber.stateNode;if(instance.render._isMockFunction){// We allow auto-mocks to proceed as if they're returning null.\nbreak;}}}// Intentionally fall through to the next case, which handles both\n// functions and classes\n// eslint-disable-next-lined no-fallthrough\ncase FunctionComponent:{var Component=returnFiber.type;invariant(false,'%s(...): Nothing was returned from render. This usually means a return statement is missing. Or, to render nothing, return null.',Component.displayName||Component.name||'Component');}}}// Remaining cases are all treated as empty.\nreturn deleteRemainingChildren(returnFiber,currentFirstChild);}return reconcileChildFibers;}", "function ChildReconciler(shouldTrackSideEffects){function deleteChild(returnFiber,childToDelete){if(!shouldTrackSideEffects){// Noop.\nreturn;}// Deletions are added in reversed order so we add it to the front.\n// At this point, the return fiber's effect list is empty except for\n// deletions, so we can just append the deletion to the list. The remaining\n// effects aren't added until the complete phase. Once we implement\n// resuming, this may not be true.\nvar last=returnFiber.lastEffect;if(last!==null){last.nextEffect=childToDelete;returnFiber.lastEffect=childToDelete;}else{returnFiber.firstEffect=returnFiber.lastEffect=childToDelete;}childToDelete.nextEffect=null;childToDelete.effectTag=Deletion;}function deleteRemainingChildren(returnFiber,currentFirstChild){if(!shouldTrackSideEffects){// Noop.\nreturn null;}// TODO: For the shouldClone case, this could be micro-optimized a bit by\n// assuming that after the first child we've already added everything.\nvar childToDelete=currentFirstChild;while(childToDelete!==null){deleteChild(returnFiber,childToDelete);childToDelete=childToDelete.sibling;}return null;}function mapRemainingChildren(returnFiber,currentFirstChild){// Add the remaining children to a temporary map so that we can find them by\n// keys quickly. Implicit (null) keys get added to this set with their index\nvar existingChildren=new Map();var existingChild=currentFirstChild;while(existingChild!==null){if(existingChild.key!==null){existingChildren.set(existingChild.key,existingChild);}else{existingChildren.set(existingChild.index,existingChild);}existingChild=existingChild.sibling;}return existingChildren;}function useFiber(fiber,pendingProps,expirationTime){// We currently set sibling to null and index to 0 here because it is easy\n// to forget to do before returning it. E.g. for the single child case.\nvar clone=createWorkInProgress(fiber,pendingProps,expirationTime);clone.index=0;clone.sibling=null;return clone;}function placeChild(newFiber,lastPlacedIndex,newIndex){newFiber.index=newIndex;if(!shouldTrackSideEffects){// Noop.\nreturn lastPlacedIndex;}var current=newFiber.alternate;if(current!==null){var oldIndex=current.index;if(oldIndex<lastPlacedIndex){// This is a move.\nnewFiber.effectTag=Placement;return lastPlacedIndex;}else{// This item can stay in place.\nreturn oldIndex;}}else{// This is an insertion.\nnewFiber.effectTag=Placement;return lastPlacedIndex;}}function placeSingleChild(newFiber){// This is simpler for the single child case. We only need to do a\n// placement for inserting new children.\nif(shouldTrackSideEffects&&newFiber.alternate===null){newFiber.effectTag=Placement;}return newFiber;}function updateTextNode(returnFiber,current,textContent,expirationTime){if(current===null||current.tag!==HostText){// Insert\nvar created=createFiberFromText(textContent,returnFiber.internalContextTag,expirationTime);created['return']=returnFiber;return created;}else{// Update\nvar existing=useFiber(current,textContent,expirationTime);existing['return']=returnFiber;return existing;}}function updateElement(returnFiber,current,element,expirationTime){if(current!==null&&current.type===element.type){// Move based on index\nvar existing=useFiber(current,element.props,expirationTime);existing.ref=coerceRef(current,element);existing['return']=returnFiber;{existing._debugSource=element._source;existing._debugOwner=element._owner;}return existing;}else{// Insert\nvar created=createFiberFromElement(element,returnFiber.internalContextTag,expirationTime);created.ref=coerceRef(current,element);created['return']=returnFiber;return created;}}function updateCall(returnFiber,current,call,expirationTime){// TODO: Should this also compare handler to determine whether to reuse?\nif(current===null||current.tag!==CallComponent){// Insert\nvar created=createFiberFromCall(call,returnFiber.internalContextTag,expirationTime);created['return']=returnFiber;return created;}else{// Move based on index\nvar existing=useFiber(current,call,expirationTime);existing['return']=returnFiber;return existing;}}function updateReturn(returnFiber,current,returnNode,expirationTime){if(current===null||current.tag!==ReturnComponent){// Insert\nvar created=createFiberFromReturn(returnNode,returnFiber.internalContextTag,expirationTime);created.type=returnNode.value;created['return']=returnFiber;return created;}else{// Move based on index\nvar existing=useFiber(current,null,expirationTime);existing.type=returnNode.value;existing['return']=returnFiber;return existing;}}function updatePortal(returnFiber,current,portal,expirationTime){if(current===null||current.tag!==HostPortal||current.stateNode.containerInfo!==portal.containerInfo||current.stateNode.implementation!==portal.implementation){// Insert\nvar created=createFiberFromPortal(portal,returnFiber.internalContextTag,expirationTime);created['return']=returnFiber;return created;}else{// Update\nvar existing=useFiber(current,portal.children||[],expirationTime);existing['return']=returnFiber;return existing;}}function updateFragment(returnFiber,current,fragment,expirationTime,key){if(current===null||current.tag!==Fragment){// Insert\nvar created=createFiberFromFragment(fragment,returnFiber.internalContextTag,expirationTime,key);created['return']=returnFiber;return created;}else{// Update\nvar existing=useFiber(current,fragment,expirationTime);existing['return']=returnFiber;return existing;}}function createChild(returnFiber,newChild,expirationTime){if(typeof newChild==='string'||typeof newChild==='number'){// Text nodes don't have keys. If the previous node is implicitly keyed\n// we can continue to replace it without aborting even if it is not a text\n// node.\nvar created=createFiberFromText(''+newChild,returnFiber.internalContextTag,expirationTime);created['return']=returnFiber;return created;}if((typeof newChild==='undefined'?'undefined':_typeof(newChild))==='object'&&newChild!==null){switch(newChild.$$typeof){case REACT_ELEMENT_TYPE:{if(newChild.type===REACT_FRAGMENT_TYPE){var _created=createFiberFromFragment(newChild.props.children,returnFiber.internalContextTag,expirationTime,newChild.key);_created['return']=returnFiber;return _created;}else{var _created2=createFiberFromElement(newChild,returnFiber.internalContextTag,expirationTime);_created2.ref=coerceRef(null,newChild);_created2['return']=returnFiber;return _created2;}}case REACT_CALL_TYPE:{var _created3=createFiberFromCall(newChild,returnFiber.internalContextTag,expirationTime);_created3['return']=returnFiber;return _created3;}case REACT_RETURN_TYPE:{var _created4=createFiberFromReturn(newChild,returnFiber.internalContextTag,expirationTime);_created4.type=newChild.value;_created4['return']=returnFiber;return _created4;}case REACT_PORTAL_TYPE:{var _created5=createFiberFromPortal(newChild,returnFiber.internalContextTag,expirationTime);_created5['return']=returnFiber;return _created5;}}if(isArray$1(newChild)||getIteratorFn(newChild)){var _created6=createFiberFromFragment(newChild,returnFiber.internalContextTag,expirationTime,null);_created6['return']=returnFiber;return _created6;}throwOnInvalidObjectType(returnFiber,newChild);}{if(typeof newChild==='function'){warnOnFunctionType();}}return null;}function updateSlot(returnFiber,oldFiber,newChild,expirationTime){// Update the fiber if the keys match, otherwise return null.\nvar key=oldFiber!==null?oldFiber.key:null;if(typeof newChild==='string'||typeof newChild==='number'){// Text nodes don't have keys. If the previous node is implicitly keyed\n// we can continue to replace it without aborting even if it is not a text\n// node.\nif(key!==null){return null;}return updateTextNode(returnFiber,oldFiber,''+newChild,expirationTime);}if((typeof newChild==='undefined'?'undefined':_typeof(newChild))==='object'&&newChild!==null){switch(newChild.$$typeof){case REACT_ELEMENT_TYPE:{if(newChild.key===key){if(newChild.type===REACT_FRAGMENT_TYPE){return updateFragment(returnFiber,oldFiber,newChild.props.children,expirationTime,key);}return updateElement(returnFiber,oldFiber,newChild,expirationTime);}else{return null;}}case REACT_CALL_TYPE:{if(newChild.key===key){return updateCall(returnFiber,oldFiber,newChild,expirationTime);}else{return null;}}case REACT_RETURN_TYPE:{// Returns don't have keys. If the previous node is implicitly keyed\n// we can continue to replace it without aborting even if it is not a\n// yield.\nif(key===null){return updateReturn(returnFiber,oldFiber,newChild,expirationTime);}else{return null;}}case REACT_PORTAL_TYPE:{if(newChild.key===key){return updatePortal(returnFiber,oldFiber,newChild,expirationTime);}else{return null;}}}if(isArray$1(newChild)||getIteratorFn(newChild)){if(key!==null){return null;}return updateFragment(returnFiber,oldFiber,newChild,expirationTime,null);}throwOnInvalidObjectType(returnFiber,newChild);}{if(typeof newChild==='function'){warnOnFunctionType();}}return null;}function updateFromMap(existingChildren,returnFiber,newIdx,newChild,expirationTime){if(typeof newChild==='string'||typeof newChild==='number'){// Text nodes don't have keys, so we neither have to check the old nor\n// new node for the key. If both are text nodes, they match.\nvar matchedFiber=existingChildren.get(newIdx)||null;return updateTextNode(returnFiber,matchedFiber,''+newChild,expirationTime);}if((typeof newChild==='undefined'?'undefined':_typeof(newChild))==='object'&&newChild!==null){switch(newChild.$$typeof){case REACT_ELEMENT_TYPE:{var _matchedFiber=existingChildren.get(newChild.key===null?newIdx:newChild.key)||null;if(newChild.type===REACT_FRAGMENT_TYPE){return updateFragment(returnFiber,_matchedFiber,newChild.props.children,expirationTime,newChild.key);}return updateElement(returnFiber,_matchedFiber,newChild,expirationTime);}case REACT_CALL_TYPE:{var _matchedFiber2=existingChildren.get(newChild.key===null?newIdx:newChild.key)||null;return updateCall(returnFiber,_matchedFiber2,newChild,expirationTime);}case REACT_RETURN_TYPE:{// Returns don't have keys, so we neither have to check the old nor\n// new node for the key. If both are returns, they match.\nvar _matchedFiber3=existingChildren.get(newIdx)||null;return updateReturn(returnFiber,_matchedFiber3,newChild,expirationTime);}case REACT_PORTAL_TYPE:{var _matchedFiber4=existingChildren.get(newChild.key===null?newIdx:newChild.key)||null;return updatePortal(returnFiber,_matchedFiber4,newChild,expirationTime);}}if(isArray$1(newChild)||getIteratorFn(newChild)){var _matchedFiber5=existingChildren.get(newIdx)||null;return updateFragment(returnFiber,_matchedFiber5,newChild,expirationTime,null);}throwOnInvalidObjectType(returnFiber,newChild);}{if(typeof newChild==='function'){warnOnFunctionType();}}return null;}/**\n * Warns if there is a duplicate or missing key\n */function warnOnInvalidKey(child,knownKeys){{if((typeof child==='undefined'?'undefined':_typeof(child))!=='object'||child===null){return knownKeys;}switch(child.$$typeof){case REACT_ELEMENT_TYPE:case REACT_CALL_TYPE:case REACT_PORTAL_TYPE:warnForMissingKey(child);var key=child.key;if(typeof key!=='string'){break;}if(knownKeys===null){knownKeys=new Set();knownKeys.add(key);break;}if(!knownKeys.has(key)){knownKeys.add(key);break;}warning(false,'Encountered two children with the same key, `%s`. '+'Keys should be unique so that components maintain their identity '+'across updates. Non-unique keys may cause children to be '+'duplicated and/or omitted — the behavior is unsupported and '+'could change in a future version.%s',key,getCurrentFiberStackAddendum$1());break;default:break;}}return knownKeys;}function reconcileChildrenArray(returnFiber,currentFirstChild,newChildren,expirationTime){// This algorithm can't optimize by searching from boths ends since we\n// don't have backpointers on fibers. I'm trying to see how far we can get\n// with that model. If it ends up not being worth the tradeoffs, we can\n// add it later.\n// Even with a two ended optimization, we'd want to optimize for the case\n// where there are few changes and brute force the comparison instead of\n// going for the Map. It'd like to explore hitting that path first in\n// forward-only mode and only go for the Map once we notice that we need\n// lots of look ahead. This doesn't handle reversal as well as two ended\n// search but that's unusual. Besides, for the two ended optimization to\n// work on Iterables, we'd need to copy the whole set.\n// In this first iteration, we'll just live with hitting the bad case\n// (adding everything to a Map) in for every insert/move.\n// If you change this code, also update reconcileChildrenIterator() which\n// uses the same algorithm.\n{// First, validate keys.\nvar knownKeys=null;for(var i=0;i<newChildren.length;i++){var child=newChildren[i];knownKeys=warnOnInvalidKey(child,knownKeys);}}var resultingFirstChild=null;var previousNewFiber=null;var oldFiber=currentFirstChild;var lastPlacedIndex=0;var newIdx=0;var nextOldFiber=null;for(;oldFiber!==null&&newIdx<newChildren.length;newIdx++){if(oldFiber.index>newIdx){nextOldFiber=oldFiber;oldFiber=null;}else{nextOldFiber=oldFiber.sibling;}var newFiber=updateSlot(returnFiber,oldFiber,newChildren[newIdx],expirationTime);if(newFiber===null){// TODO: This breaks on empty slots like null children. That's\n// unfortunate because it triggers the slow path all the time. We need\n// a better way to communicate whether this was a miss or null,\n// boolean, undefined, etc.\nif(oldFiber===null){oldFiber=nextOldFiber;}break;}if(shouldTrackSideEffects){if(oldFiber&&newFiber.alternate===null){// We matched the slot, but we didn't reuse the existing fiber, so we\n// need to delete the existing child.\ndeleteChild(returnFiber,oldFiber);}}lastPlacedIndex=placeChild(newFiber,lastPlacedIndex,newIdx);if(previousNewFiber===null){// TODO: Move out of the loop. This only happens for the first run.\nresultingFirstChild=newFiber;}else{// TODO: Defer siblings if we're not at the right index for this slot.\n// I.e. if we had null values before, then we want to defer this\n// for each null value. However, we also don't want to call updateSlot\n// with the previous one.\npreviousNewFiber.sibling=newFiber;}previousNewFiber=newFiber;oldFiber=nextOldFiber;}if(newIdx===newChildren.length){// We've reached the end of the new children. We can delete the rest.\ndeleteRemainingChildren(returnFiber,oldFiber);return resultingFirstChild;}if(oldFiber===null){// If we don't have any more existing children we can choose a fast path\n// since the rest will all be insertions.\nfor(;newIdx<newChildren.length;newIdx++){var _newFiber=createChild(returnFiber,newChildren[newIdx],expirationTime);if(!_newFiber){continue;}lastPlacedIndex=placeChild(_newFiber,lastPlacedIndex,newIdx);if(previousNewFiber===null){// TODO: Move out of the loop. This only happens for the first run.\nresultingFirstChild=_newFiber;}else{previousNewFiber.sibling=_newFiber;}previousNewFiber=_newFiber;}return resultingFirstChild;}// Add all children to a key map for quick lookups.\nvar existingChildren=mapRemainingChildren(returnFiber,oldFiber);// Keep scanning and use the map to restore deleted items as moves.\nfor(;newIdx<newChildren.length;newIdx++){var _newFiber2=updateFromMap(existingChildren,returnFiber,newIdx,newChildren[newIdx],expirationTime);if(_newFiber2){if(shouldTrackSideEffects){if(_newFiber2.alternate!==null){// The new fiber is a work in progress, but if there exists a\n// current, that means that we reused the fiber. We need to delete\n// it from the child list so that we don't add it to the deletion\n// list.\nexistingChildren['delete'](_newFiber2.key===null?newIdx:_newFiber2.key);}}lastPlacedIndex=placeChild(_newFiber2,lastPlacedIndex,newIdx);if(previousNewFiber===null){resultingFirstChild=_newFiber2;}else{previousNewFiber.sibling=_newFiber2;}previousNewFiber=_newFiber2;}}if(shouldTrackSideEffects){// Any existing children that weren't consumed above were deleted. We need\n// to add them to the deletion list.\nexistingChildren.forEach(function(child){return deleteChild(returnFiber,child);});}return resultingFirstChild;}function reconcileChildrenIterator(returnFiber,currentFirstChild,newChildrenIterable,expirationTime){// This is the same implementation as reconcileChildrenArray(),\n// but using the iterator instead.\nvar iteratorFn=getIteratorFn(newChildrenIterable);!(typeof iteratorFn==='function')?invariant(false,'An object is not an iterable. This error is likely caused by a bug in React. Please file an issue.'):void 0;{// Warn about using Maps as children\nif(typeof newChildrenIterable.entries==='function'){var possibleMap=newChildrenIterable;if(possibleMap.entries===iteratorFn){warning(didWarnAboutMaps,'Using Maps as children is unsupported and will likely yield '+'unexpected results. Convert it to a sequence/iterable of keyed '+'ReactElements instead.%s',getCurrentFiberStackAddendum$1());didWarnAboutMaps=true;}}// First, validate keys.\n// We'll get a different iterator later for the main pass.\nvar _newChildren=iteratorFn.call(newChildrenIterable);if(_newChildren){var knownKeys=null;var _step=_newChildren.next();for(;!_step.done;_step=_newChildren.next()){var child=_step.value;knownKeys=warnOnInvalidKey(child,knownKeys);}}}var newChildren=iteratorFn.call(newChildrenIterable);!(newChildren!=null)?invariant(false,'An iterable object provided no iterator.'):void 0;var resultingFirstChild=null;var previousNewFiber=null;var oldFiber=currentFirstChild;var lastPlacedIndex=0;var newIdx=0;var nextOldFiber=null;var step=newChildren.next();for(;oldFiber!==null&&!step.done;newIdx++,step=newChildren.next()){if(oldFiber.index>newIdx){nextOldFiber=oldFiber;oldFiber=null;}else{nextOldFiber=oldFiber.sibling;}var newFiber=updateSlot(returnFiber,oldFiber,step.value,expirationTime);if(newFiber===null){// TODO: This breaks on empty slots like null children. That's\n// unfortunate because it triggers the slow path all the time. We need\n// a better way to communicate whether this was a miss or null,\n// boolean, undefined, etc.\nif(!oldFiber){oldFiber=nextOldFiber;}break;}if(shouldTrackSideEffects){if(oldFiber&&newFiber.alternate===null){// We matched the slot, but we didn't reuse the existing fiber, so we\n// need to delete the existing child.\ndeleteChild(returnFiber,oldFiber);}}lastPlacedIndex=placeChild(newFiber,lastPlacedIndex,newIdx);if(previousNewFiber===null){// TODO: Move out of the loop. This only happens for the first run.\nresultingFirstChild=newFiber;}else{// TODO: Defer siblings if we're not at the right index for this slot.\n// I.e. if we had null values before, then we want to defer this\n// for each null value. However, we also don't want to call updateSlot\n// with the previous one.\npreviousNewFiber.sibling=newFiber;}previousNewFiber=newFiber;oldFiber=nextOldFiber;}if(step.done){// We've reached the end of the new children. We can delete the rest.\ndeleteRemainingChildren(returnFiber,oldFiber);return resultingFirstChild;}if(oldFiber===null){// If we don't have any more existing children we can choose a fast path\n// since the rest will all be insertions.\nfor(;!step.done;newIdx++,step=newChildren.next()){var _newFiber3=createChild(returnFiber,step.value,expirationTime);if(_newFiber3===null){continue;}lastPlacedIndex=placeChild(_newFiber3,lastPlacedIndex,newIdx);if(previousNewFiber===null){// TODO: Move out of the loop. This only happens for the first run.\nresultingFirstChild=_newFiber3;}else{previousNewFiber.sibling=_newFiber3;}previousNewFiber=_newFiber3;}return resultingFirstChild;}// Add all children to a key map for quick lookups.\nvar existingChildren=mapRemainingChildren(returnFiber,oldFiber);// Keep scanning and use the map to restore deleted items as moves.\nfor(;!step.done;newIdx++,step=newChildren.next()){var _newFiber4=updateFromMap(existingChildren,returnFiber,newIdx,step.value,expirationTime);if(_newFiber4!==null){if(shouldTrackSideEffects){if(_newFiber4.alternate!==null){// The new fiber is a work in progress, but if there exists a\n// current, that means that we reused the fiber. We need to delete\n// it from the child list so that we don't add it to the deletion\n// list.\nexistingChildren['delete'](_newFiber4.key===null?newIdx:_newFiber4.key);}}lastPlacedIndex=placeChild(_newFiber4,lastPlacedIndex,newIdx);if(previousNewFiber===null){resultingFirstChild=_newFiber4;}else{previousNewFiber.sibling=_newFiber4;}previousNewFiber=_newFiber4;}}if(shouldTrackSideEffects){// Any existing children that weren't consumed above were deleted. We need\n// to add them to the deletion list.\nexistingChildren.forEach(function(child){return deleteChild(returnFiber,child);});}return resultingFirstChild;}function reconcileSingleTextNode(returnFiber,currentFirstChild,textContent,expirationTime){// There's no need to check for keys on text nodes since we don't have a\n// way to define them.\nif(currentFirstChild!==null&&currentFirstChild.tag===HostText){// We already have an existing node so let's just update it and delete\n// the rest.\ndeleteRemainingChildren(returnFiber,currentFirstChild.sibling);var existing=useFiber(currentFirstChild,textContent,expirationTime);existing['return']=returnFiber;return existing;}// The existing first child is not a text node so we need to create one\n// and delete the existing ones.\ndeleteRemainingChildren(returnFiber,currentFirstChild);var created=createFiberFromText(textContent,returnFiber.internalContextTag,expirationTime);created['return']=returnFiber;return created;}function reconcileSingleElement(returnFiber,currentFirstChild,element,expirationTime){var key=element.key;var child=currentFirstChild;while(child!==null){// TODO: If key === null and child.key === null, then this only applies to\n// the first item in the list.\nif(child.key===key){if(child.tag===Fragment?element.type===REACT_FRAGMENT_TYPE:child.type===element.type){deleteRemainingChildren(returnFiber,child.sibling);var existing=useFiber(child,element.type===REACT_FRAGMENT_TYPE?element.props.children:element.props,expirationTime);existing.ref=coerceRef(child,element);existing['return']=returnFiber;{existing._debugSource=element._source;existing._debugOwner=element._owner;}return existing;}else{deleteRemainingChildren(returnFiber,child);break;}}else{deleteChild(returnFiber,child);}child=child.sibling;}if(element.type===REACT_FRAGMENT_TYPE){var created=createFiberFromFragment(element.props.children,returnFiber.internalContextTag,expirationTime,element.key);created['return']=returnFiber;return created;}else{var _created7=createFiberFromElement(element,returnFiber.internalContextTag,expirationTime);_created7.ref=coerceRef(currentFirstChild,element);_created7['return']=returnFiber;return _created7;}}function reconcileSingleCall(returnFiber,currentFirstChild,call,expirationTime){var key=call.key;var child=currentFirstChild;while(child!==null){// TODO: If key === null and child.key === null, then this only applies to\n// the first item in the list.\nif(child.key===key){if(child.tag===CallComponent){deleteRemainingChildren(returnFiber,child.sibling);var existing=useFiber(child,call,expirationTime);existing['return']=returnFiber;return existing;}else{deleteRemainingChildren(returnFiber,child);break;}}else{deleteChild(returnFiber,child);}child=child.sibling;}var created=createFiberFromCall(call,returnFiber.internalContextTag,expirationTime);created['return']=returnFiber;return created;}function reconcileSingleReturn(returnFiber,currentFirstChild,returnNode,expirationTime){// There's no need to check for keys on yields since they're stateless.\nvar child=currentFirstChild;if(child!==null){if(child.tag===ReturnComponent){deleteRemainingChildren(returnFiber,child.sibling);var existing=useFiber(child,null,expirationTime);existing.type=returnNode.value;existing['return']=returnFiber;return existing;}else{deleteRemainingChildren(returnFiber,child);}}var created=createFiberFromReturn(returnNode,returnFiber.internalContextTag,expirationTime);created.type=returnNode.value;created['return']=returnFiber;return created;}function reconcileSinglePortal(returnFiber,currentFirstChild,portal,expirationTime){var key=portal.key;var child=currentFirstChild;while(child!==null){// TODO: If key === null and child.key === null, then this only applies to\n// the first item in the list.\nif(child.key===key){if(child.tag===HostPortal&&child.stateNode.containerInfo===portal.containerInfo&&child.stateNode.implementation===portal.implementation){deleteRemainingChildren(returnFiber,child.sibling);var existing=useFiber(child,portal.children||[],expirationTime);existing['return']=returnFiber;return existing;}else{deleteRemainingChildren(returnFiber,child);break;}}else{deleteChild(returnFiber,child);}child=child.sibling;}var created=createFiberFromPortal(portal,returnFiber.internalContextTag,expirationTime);created['return']=returnFiber;return created;}// This API will tag the children with the side-effect of the reconciliation\n// itself. They will be added to the side-effect list as we pass through the\n// children and the parent.\nfunction reconcileChildFibers(returnFiber,currentFirstChild,newChild,expirationTime){// This function is not recursive.\n// If the top level item is an array, we treat it as a set of children,\n// not as a fragment. Nested arrays on the other hand will be treated as\n// fragment nodes. Recursion happens at the normal flow.\n// Handle top level unkeyed fragments as if they were arrays.\n// This leads to an ambiguity between <>{[...]}</> and <>...</>.\n// We treat the ambiguous cases above the same.\nif((typeof newChild==='undefined'?'undefined':_typeof(newChild))==='object'&&newChild!==null&&newChild.type===REACT_FRAGMENT_TYPE&&newChild.key===null){newChild=newChild.props.children;}// Handle object types\nvar isObject=(typeof newChild==='undefined'?'undefined':_typeof(newChild))==='object'&&newChild!==null;if(isObject){switch(newChild.$$typeof){case REACT_ELEMENT_TYPE:return placeSingleChild(reconcileSingleElement(returnFiber,currentFirstChild,newChild,expirationTime));case REACT_CALL_TYPE:return placeSingleChild(reconcileSingleCall(returnFiber,currentFirstChild,newChild,expirationTime));case REACT_RETURN_TYPE:return placeSingleChild(reconcileSingleReturn(returnFiber,currentFirstChild,newChild,expirationTime));case REACT_PORTAL_TYPE:return placeSingleChild(reconcileSinglePortal(returnFiber,currentFirstChild,newChild,expirationTime));}}if(typeof newChild==='string'||typeof newChild==='number'){return placeSingleChild(reconcileSingleTextNode(returnFiber,currentFirstChild,''+newChild,expirationTime));}if(isArray$1(newChild)){return reconcileChildrenArray(returnFiber,currentFirstChild,newChild,expirationTime);}if(getIteratorFn(newChild)){return reconcileChildrenIterator(returnFiber,currentFirstChild,newChild,expirationTime);}if(isObject){throwOnInvalidObjectType(returnFiber,newChild);}{if(typeof newChild==='function'){warnOnFunctionType();}}if(typeof newChild==='undefined'){// If the new child is undefined, and the return fiber is a composite\n// component, throw an error. If Fiber return types are disabled,\n// we already threw above.\nswitch(returnFiber.tag){case ClassComponent:{{var instance=returnFiber.stateNode;if(instance.render._isMockFunction){// We allow auto-mocks to proceed as if they're returning null.\nbreak;}}}// Intentionally fall through to the next case, which handles both\n// functions and classes\n// eslint-disable-next-lined no-fallthrough\ncase FunctionalComponent:{var Component=returnFiber.type;invariant(false,'%s(...): Nothing was returned from render. This usually means a return statement is missing. Or, to render nothing, return null.',Component.displayName||Component.name||'Component');}}}// Remaining cases are all treated as empty.\nreturn deleteRemainingChildren(returnFiber,currentFirstChild);}return reconcileChildFibers;}", "function ChildReconciler(shouldTrackSideEffects){function deleteChild(returnFiber,childToDelete){if(!shouldTrackSideEffects){// Noop.\nreturn;}// Deletions are added in reversed order so we add it to the front.\n// At this point, the return fiber's effect list is empty except for\n// deletions, so we can just append the deletion to the list. The remaining\n// effects aren't added until the complete phase. Once we implement\n// resuming, this may not be true.\nvar last=returnFiber.lastEffect;if(last!==null){last.nextEffect=childToDelete;returnFiber.lastEffect=childToDelete;}else{returnFiber.firstEffect=returnFiber.lastEffect=childToDelete;}childToDelete.nextEffect=null;childToDelete.effectTag=Deletion;}function deleteRemainingChildren(returnFiber,currentFirstChild){if(!shouldTrackSideEffects){// Noop.\nreturn null;}// TODO: For the shouldClone case, this could be micro-optimized a bit by\n// assuming that after the first child we've already added everything.\nvar childToDelete=currentFirstChild;while(childToDelete!==null){deleteChild(returnFiber,childToDelete);childToDelete=childToDelete.sibling;}return null;}function mapRemainingChildren(returnFiber,currentFirstChild){// Add the remaining children to a temporary map so that we can find them by\n// keys quickly. Implicit (null) keys get added to this set with their index\nvar existingChildren=new Map();var existingChild=currentFirstChild;while(existingChild!==null){if(existingChild.key!==null){existingChildren.set(existingChild.key,existingChild);}else{existingChildren.set(existingChild.index,existingChild);}existingChild=existingChild.sibling;}return existingChildren;}function useFiber(fiber,pendingProps,expirationTime){// We currently set sibling to null and index to 0 here because it is easy\n// to forget to do before returning it. E.g. for the single child case.\nvar clone=createWorkInProgress(fiber,pendingProps,expirationTime);clone.index=0;clone.sibling=null;return clone;}function placeChild(newFiber,lastPlacedIndex,newIndex){newFiber.index=newIndex;if(!shouldTrackSideEffects){// Noop.\nreturn lastPlacedIndex;}var current=newFiber.alternate;if(current!==null){var oldIndex=current.index;if(oldIndex<lastPlacedIndex){// This is a move.\nnewFiber.effectTag=Placement;return lastPlacedIndex;}else{// This item can stay in place.\nreturn oldIndex;}}else{// This is an insertion.\nnewFiber.effectTag=Placement;return lastPlacedIndex;}}function placeSingleChild(newFiber){// This is simpler for the single child case. We only need to do a\n// placement for inserting new children.\nif(shouldTrackSideEffects&&newFiber.alternate===null){newFiber.effectTag=Placement;}return newFiber;}function updateTextNode(returnFiber,current,textContent,expirationTime){if(current===null||current.tag!==HostText){// Insert\nvar created=createFiberFromText(textContent,returnFiber.internalContextTag,expirationTime);created['return']=returnFiber;return created;}else{// Update\nvar existing=useFiber(current,textContent,expirationTime);existing['return']=returnFiber;return existing;}}function updateElement(returnFiber,current,element,expirationTime){if(current!==null&&current.type===element.type){// Move based on index\nvar existing=useFiber(current,element.props,expirationTime);existing.ref=coerceRef(current,element);existing['return']=returnFiber;{existing._debugSource=element._source;existing._debugOwner=element._owner;}return existing;}else{// Insert\nvar created=createFiberFromElement(element,returnFiber.internalContextTag,expirationTime);created.ref=coerceRef(current,element);created['return']=returnFiber;return created;}}function updateCall(returnFiber,current,call,expirationTime){// TODO: Should this also compare handler to determine whether to reuse?\nif(current===null||current.tag!==CallComponent){// Insert\nvar created=createFiberFromCall(call,returnFiber.internalContextTag,expirationTime);created['return']=returnFiber;return created;}else{// Move based on index\nvar existing=useFiber(current,call,expirationTime);existing['return']=returnFiber;return existing;}}function updateReturn(returnFiber,current,returnNode,expirationTime){if(current===null||current.tag!==ReturnComponent){// Insert\nvar created=createFiberFromReturn(returnNode,returnFiber.internalContextTag,expirationTime);created.type=returnNode.value;created['return']=returnFiber;return created;}else{// Move based on index\nvar existing=useFiber(current,null,expirationTime);existing.type=returnNode.value;existing['return']=returnFiber;return existing;}}function updatePortal(returnFiber,current,portal,expirationTime){if(current===null||current.tag!==HostPortal||current.stateNode.containerInfo!==portal.containerInfo||current.stateNode.implementation!==portal.implementation){// Insert\nvar created=createFiberFromPortal(portal,returnFiber.internalContextTag,expirationTime);created['return']=returnFiber;return created;}else{// Update\nvar existing=useFiber(current,portal.children||[],expirationTime);existing['return']=returnFiber;return existing;}}function updateFragment(returnFiber,current,fragment,expirationTime,key){if(current===null||current.tag!==Fragment){// Insert\nvar created=createFiberFromFragment(fragment,returnFiber.internalContextTag,expirationTime,key);created['return']=returnFiber;return created;}else{// Update\nvar existing=useFiber(current,fragment,expirationTime);existing['return']=returnFiber;return existing;}}function createChild(returnFiber,newChild,expirationTime){if(typeof newChild==='string'||typeof newChild==='number'){// Text nodes don't have keys. If the previous node is implicitly keyed\n// we can continue to replace it without aborting even if it is not a text\n// node.\nvar created=createFiberFromText(''+newChild,returnFiber.internalContextTag,expirationTime);created['return']=returnFiber;return created;}if((typeof newChild==='undefined'?'undefined':_typeof(newChild))==='object'&&newChild!==null){switch(newChild.$$typeof){case REACT_ELEMENT_TYPE:{if(newChild.type===REACT_FRAGMENT_TYPE){var _created=createFiberFromFragment(newChild.props.children,returnFiber.internalContextTag,expirationTime,newChild.key);_created['return']=returnFiber;return _created;}else{var _created2=createFiberFromElement(newChild,returnFiber.internalContextTag,expirationTime);_created2.ref=coerceRef(null,newChild);_created2['return']=returnFiber;return _created2;}}case REACT_CALL_TYPE:{var _created3=createFiberFromCall(newChild,returnFiber.internalContextTag,expirationTime);_created3['return']=returnFiber;return _created3;}case REACT_RETURN_TYPE:{var _created4=createFiberFromReturn(newChild,returnFiber.internalContextTag,expirationTime);_created4.type=newChild.value;_created4['return']=returnFiber;return _created4;}case REACT_PORTAL_TYPE:{var _created5=createFiberFromPortal(newChild,returnFiber.internalContextTag,expirationTime);_created5['return']=returnFiber;return _created5;}}if(isArray$1(newChild)||getIteratorFn(newChild)){var _created6=createFiberFromFragment(newChild,returnFiber.internalContextTag,expirationTime,null);_created6['return']=returnFiber;return _created6;}throwOnInvalidObjectType(returnFiber,newChild);}{if(typeof newChild==='function'){warnOnFunctionType();}}return null;}function updateSlot(returnFiber,oldFiber,newChild,expirationTime){// Update the fiber if the keys match, otherwise return null.\nvar key=oldFiber!==null?oldFiber.key:null;if(typeof newChild==='string'||typeof newChild==='number'){// Text nodes don't have keys. If the previous node is implicitly keyed\n// we can continue to replace it without aborting even if it is not a text\n// node.\nif(key!==null){return null;}return updateTextNode(returnFiber,oldFiber,''+newChild,expirationTime);}if((typeof newChild==='undefined'?'undefined':_typeof(newChild))==='object'&&newChild!==null){switch(newChild.$$typeof){case REACT_ELEMENT_TYPE:{if(newChild.key===key){if(newChild.type===REACT_FRAGMENT_TYPE){return updateFragment(returnFiber,oldFiber,newChild.props.children,expirationTime,key);}return updateElement(returnFiber,oldFiber,newChild,expirationTime);}else{return null;}}case REACT_CALL_TYPE:{if(newChild.key===key){return updateCall(returnFiber,oldFiber,newChild,expirationTime);}else{return null;}}case REACT_RETURN_TYPE:{// Returns don't have keys. If the previous node is implicitly keyed\n// we can continue to replace it without aborting even if it is not a\n// yield.\nif(key===null){return updateReturn(returnFiber,oldFiber,newChild,expirationTime);}else{return null;}}case REACT_PORTAL_TYPE:{if(newChild.key===key){return updatePortal(returnFiber,oldFiber,newChild,expirationTime);}else{return null;}}}if(isArray$1(newChild)||getIteratorFn(newChild)){if(key!==null){return null;}return updateFragment(returnFiber,oldFiber,newChild,expirationTime,null);}throwOnInvalidObjectType(returnFiber,newChild);}{if(typeof newChild==='function'){warnOnFunctionType();}}return null;}function updateFromMap(existingChildren,returnFiber,newIdx,newChild,expirationTime){if(typeof newChild==='string'||typeof newChild==='number'){// Text nodes don't have keys, so we neither have to check the old nor\n// new node for the key. If both are text nodes, they match.\nvar matchedFiber=existingChildren.get(newIdx)||null;return updateTextNode(returnFiber,matchedFiber,''+newChild,expirationTime);}if((typeof newChild==='undefined'?'undefined':_typeof(newChild))==='object'&&newChild!==null){switch(newChild.$$typeof){case REACT_ELEMENT_TYPE:{var _matchedFiber=existingChildren.get(newChild.key===null?newIdx:newChild.key)||null;if(newChild.type===REACT_FRAGMENT_TYPE){return updateFragment(returnFiber,_matchedFiber,newChild.props.children,expirationTime,newChild.key);}return updateElement(returnFiber,_matchedFiber,newChild,expirationTime);}case REACT_CALL_TYPE:{var _matchedFiber2=existingChildren.get(newChild.key===null?newIdx:newChild.key)||null;return updateCall(returnFiber,_matchedFiber2,newChild,expirationTime);}case REACT_RETURN_TYPE:{// Returns don't have keys, so we neither have to check the old nor\n// new node for the key. If both are returns, they match.\nvar _matchedFiber3=existingChildren.get(newIdx)||null;return updateReturn(returnFiber,_matchedFiber3,newChild,expirationTime);}case REACT_PORTAL_TYPE:{var _matchedFiber4=existingChildren.get(newChild.key===null?newIdx:newChild.key)||null;return updatePortal(returnFiber,_matchedFiber4,newChild,expirationTime);}}if(isArray$1(newChild)||getIteratorFn(newChild)){var _matchedFiber5=existingChildren.get(newIdx)||null;return updateFragment(returnFiber,_matchedFiber5,newChild,expirationTime,null);}throwOnInvalidObjectType(returnFiber,newChild);}{if(typeof newChild==='function'){warnOnFunctionType();}}return null;}/**\n * Warns if there is a duplicate or missing key\n */function warnOnInvalidKey(child,knownKeys){{if((typeof child==='undefined'?'undefined':_typeof(child))!=='object'||child===null){return knownKeys;}switch(child.$$typeof){case REACT_ELEMENT_TYPE:case REACT_CALL_TYPE:case REACT_PORTAL_TYPE:warnForMissingKey(child);var key=child.key;if(typeof key!=='string'){break;}if(knownKeys===null){knownKeys=new Set();knownKeys.add(key);break;}if(!knownKeys.has(key)){knownKeys.add(key);break;}warning(false,'Encountered two children with the same key, `%s`. '+'Keys should be unique so that components maintain their identity '+'across updates. Non-unique keys may cause children to be '+'duplicated and/or omitted — the behavior is unsupported and '+'could change in a future version.%s',key,getCurrentFiberStackAddendum$1());break;default:break;}}return knownKeys;}function reconcileChildrenArray(returnFiber,currentFirstChild,newChildren,expirationTime){// This algorithm can't optimize by searching from boths ends since we\n// don't have backpointers on fibers. I'm trying to see how far we can get\n// with that model. If it ends up not being worth the tradeoffs, we can\n// add it later.\n// Even with a two ended optimization, we'd want to optimize for the case\n// where there are few changes and brute force the comparison instead of\n// going for the Map. It'd like to explore hitting that path first in\n// forward-only mode and only go for the Map once we notice that we need\n// lots of look ahead. This doesn't handle reversal as well as two ended\n// search but that's unusual. Besides, for the two ended optimization to\n// work on Iterables, we'd need to copy the whole set.\n// In this first iteration, we'll just live with hitting the bad case\n// (adding everything to a Map) in for every insert/move.\n// If you change this code, also update reconcileChildrenIterator() which\n// uses the same algorithm.\n{// First, validate keys.\nvar knownKeys=null;for(var i=0;i<newChildren.length;i++){var child=newChildren[i];knownKeys=warnOnInvalidKey(child,knownKeys);}}var resultingFirstChild=null;var previousNewFiber=null;var oldFiber=currentFirstChild;var lastPlacedIndex=0;var newIdx=0;var nextOldFiber=null;for(;oldFiber!==null&&newIdx<newChildren.length;newIdx++){if(oldFiber.index>newIdx){nextOldFiber=oldFiber;oldFiber=null;}else{nextOldFiber=oldFiber.sibling;}var newFiber=updateSlot(returnFiber,oldFiber,newChildren[newIdx],expirationTime);if(newFiber===null){// TODO: This breaks on empty slots like null children. That's\n// unfortunate because it triggers the slow path all the time. We need\n// a better way to communicate whether this was a miss or null,\n// boolean, undefined, etc.\nif(oldFiber===null){oldFiber=nextOldFiber;}break;}if(shouldTrackSideEffects){if(oldFiber&&newFiber.alternate===null){// We matched the slot, but we didn't reuse the existing fiber, so we\n// need to delete the existing child.\ndeleteChild(returnFiber,oldFiber);}}lastPlacedIndex=placeChild(newFiber,lastPlacedIndex,newIdx);if(previousNewFiber===null){// TODO: Move out of the loop. This only happens for the first run.\nresultingFirstChild=newFiber;}else{// TODO: Defer siblings if we're not at the right index for this slot.\n// I.e. if we had null values before, then we want to defer this\n// for each null value. However, we also don't want to call updateSlot\n// with the previous one.\npreviousNewFiber.sibling=newFiber;}previousNewFiber=newFiber;oldFiber=nextOldFiber;}if(newIdx===newChildren.length){// We've reached the end of the new children. We can delete the rest.\ndeleteRemainingChildren(returnFiber,oldFiber);return resultingFirstChild;}if(oldFiber===null){// If we don't have any more existing children we can choose a fast path\n// since the rest will all be insertions.\nfor(;newIdx<newChildren.length;newIdx++){var _newFiber=createChild(returnFiber,newChildren[newIdx],expirationTime);if(!_newFiber){continue;}lastPlacedIndex=placeChild(_newFiber,lastPlacedIndex,newIdx);if(previousNewFiber===null){// TODO: Move out of the loop. This only happens for the first run.\nresultingFirstChild=_newFiber;}else{previousNewFiber.sibling=_newFiber;}previousNewFiber=_newFiber;}return resultingFirstChild;}// Add all children to a key map for quick lookups.\nvar existingChildren=mapRemainingChildren(returnFiber,oldFiber);// Keep scanning and use the map to restore deleted items as moves.\nfor(;newIdx<newChildren.length;newIdx++){var _newFiber2=updateFromMap(existingChildren,returnFiber,newIdx,newChildren[newIdx],expirationTime);if(_newFiber2){if(shouldTrackSideEffects){if(_newFiber2.alternate!==null){// The new fiber is a work in progress, but if there exists a\n// current, that means that we reused the fiber. We need to delete\n// it from the child list so that we don't add it to the deletion\n// list.\nexistingChildren['delete'](_newFiber2.key===null?newIdx:_newFiber2.key);}}lastPlacedIndex=placeChild(_newFiber2,lastPlacedIndex,newIdx);if(previousNewFiber===null){resultingFirstChild=_newFiber2;}else{previousNewFiber.sibling=_newFiber2;}previousNewFiber=_newFiber2;}}if(shouldTrackSideEffects){// Any existing children that weren't consumed above were deleted. We need\n// to add them to the deletion list.\nexistingChildren.forEach(function(child){return deleteChild(returnFiber,child);});}return resultingFirstChild;}function reconcileChildrenIterator(returnFiber,currentFirstChild,newChildrenIterable,expirationTime){// This is the same implementation as reconcileChildrenArray(),\n// but using the iterator instead.\nvar iteratorFn=getIteratorFn(newChildrenIterable);!(typeof iteratorFn==='function')?invariant(false,'An object is not an iterable. This error is likely caused by a bug in React. Please file an issue.'):void 0;{// Warn about using Maps as children\nif(typeof newChildrenIterable.entries==='function'){var possibleMap=newChildrenIterable;if(possibleMap.entries===iteratorFn){warning(didWarnAboutMaps,'Using Maps as children is unsupported and will likely yield '+'unexpected results. Convert it to a sequence/iterable of keyed '+'ReactElements instead.%s',getCurrentFiberStackAddendum$1());didWarnAboutMaps=true;}}// First, validate keys.\n// We'll get a different iterator later for the main pass.\nvar _newChildren=iteratorFn.call(newChildrenIterable);if(_newChildren){var knownKeys=null;var _step=_newChildren.next();for(;!_step.done;_step=_newChildren.next()){var child=_step.value;knownKeys=warnOnInvalidKey(child,knownKeys);}}}var newChildren=iteratorFn.call(newChildrenIterable);!(newChildren!=null)?invariant(false,'An iterable object provided no iterator.'):void 0;var resultingFirstChild=null;var previousNewFiber=null;var oldFiber=currentFirstChild;var lastPlacedIndex=0;var newIdx=0;var nextOldFiber=null;var step=newChildren.next();for(;oldFiber!==null&&!step.done;newIdx++,step=newChildren.next()){if(oldFiber.index>newIdx){nextOldFiber=oldFiber;oldFiber=null;}else{nextOldFiber=oldFiber.sibling;}var newFiber=updateSlot(returnFiber,oldFiber,step.value,expirationTime);if(newFiber===null){// TODO: This breaks on empty slots like null children. That's\n// unfortunate because it triggers the slow path all the time. We need\n// a better way to communicate whether this was a miss or null,\n// boolean, undefined, etc.\nif(!oldFiber){oldFiber=nextOldFiber;}break;}if(shouldTrackSideEffects){if(oldFiber&&newFiber.alternate===null){// We matched the slot, but we didn't reuse the existing fiber, so we\n// need to delete the existing child.\ndeleteChild(returnFiber,oldFiber);}}lastPlacedIndex=placeChild(newFiber,lastPlacedIndex,newIdx);if(previousNewFiber===null){// TODO: Move out of the loop. This only happens for the first run.\nresultingFirstChild=newFiber;}else{// TODO: Defer siblings if we're not at the right index for this slot.\n// I.e. if we had null values before, then we want to defer this\n// for each null value. However, we also don't want to call updateSlot\n// with the previous one.\npreviousNewFiber.sibling=newFiber;}previousNewFiber=newFiber;oldFiber=nextOldFiber;}if(step.done){// We've reached the end of the new children. We can delete the rest.\ndeleteRemainingChildren(returnFiber,oldFiber);return resultingFirstChild;}if(oldFiber===null){// If we don't have any more existing children we can choose a fast path\n// since the rest will all be insertions.\nfor(;!step.done;newIdx++,step=newChildren.next()){var _newFiber3=createChild(returnFiber,step.value,expirationTime);if(_newFiber3===null){continue;}lastPlacedIndex=placeChild(_newFiber3,lastPlacedIndex,newIdx);if(previousNewFiber===null){// TODO: Move out of the loop. This only happens for the first run.\nresultingFirstChild=_newFiber3;}else{previousNewFiber.sibling=_newFiber3;}previousNewFiber=_newFiber3;}return resultingFirstChild;}// Add all children to a key map for quick lookups.\nvar existingChildren=mapRemainingChildren(returnFiber,oldFiber);// Keep scanning and use the map to restore deleted items as moves.\nfor(;!step.done;newIdx++,step=newChildren.next()){var _newFiber4=updateFromMap(existingChildren,returnFiber,newIdx,step.value,expirationTime);if(_newFiber4!==null){if(shouldTrackSideEffects){if(_newFiber4.alternate!==null){// The new fiber is a work in progress, but if there exists a\n// current, that means that we reused the fiber. We need to delete\n// it from the child list so that we don't add it to the deletion\n// list.\nexistingChildren['delete'](_newFiber4.key===null?newIdx:_newFiber4.key);}}lastPlacedIndex=placeChild(_newFiber4,lastPlacedIndex,newIdx);if(previousNewFiber===null){resultingFirstChild=_newFiber4;}else{previousNewFiber.sibling=_newFiber4;}previousNewFiber=_newFiber4;}}if(shouldTrackSideEffects){// Any existing children that weren't consumed above were deleted. We need\n// to add them to the deletion list.\nexistingChildren.forEach(function(child){return deleteChild(returnFiber,child);});}return resultingFirstChild;}function reconcileSingleTextNode(returnFiber,currentFirstChild,textContent,expirationTime){// There's no need to check for keys on text nodes since we don't have a\n// way to define them.\nif(currentFirstChild!==null&&currentFirstChild.tag===HostText){// We already have an existing node so let's just update it and delete\n// the rest.\ndeleteRemainingChildren(returnFiber,currentFirstChild.sibling);var existing=useFiber(currentFirstChild,textContent,expirationTime);existing['return']=returnFiber;return existing;}// The existing first child is not a text node so we need to create one\n// and delete the existing ones.\ndeleteRemainingChildren(returnFiber,currentFirstChild);var created=createFiberFromText(textContent,returnFiber.internalContextTag,expirationTime);created['return']=returnFiber;return created;}function reconcileSingleElement(returnFiber,currentFirstChild,element,expirationTime){var key=element.key;var child=currentFirstChild;while(child!==null){// TODO: If key === null and child.key === null, then this only applies to\n// the first item in the list.\nif(child.key===key){if(child.tag===Fragment?element.type===REACT_FRAGMENT_TYPE:child.type===element.type){deleteRemainingChildren(returnFiber,child.sibling);var existing=useFiber(child,element.type===REACT_FRAGMENT_TYPE?element.props.children:element.props,expirationTime);existing.ref=coerceRef(child,element);existing['return']=returnFiber;{existing._debugSource=element._source;existing._debugOwner=element._owner;}return existing;}else{deleteRemainingChildren(returnFiber,child);break;}}else{deleteChild(returnFiber,child);}child=child.sibling;}if(element.type===REACT_FRAGMENT_TYPE){var created=createFiberFromFragment(element.props.children,returnFiber.internalContextTag,expirationTime,element.key);created['return']=returnFiber;return created;}else{var _created7=createFiberFromElement(element,returnFiber.internalContextTag,expirationTime);_created7.ref=coerceRef(currentFirstChild,element);_created7['return']=returnFiber;return _created7;}}function reconcileSingleCall(returnFiber,currentFirstChild,call,expirationTime){var key=call.key;var child=currentFirstChild;while(child!==null){// TODO: If key === null and child.key === null, then this only applies to\n// the first item in the list.\nif(child.key===key){if(child.tag===CallComponent){deleteRemainingChildren(returnFiber,child.sibling);var existing=useFiber(child,call,expirationTime);existing['return']=returnFiber;return existing;}else{deleteRemainingChildren(returnFiber,child);break;}}else{deleteChild(returnFiber,child);}child=child.sibling;}var created=createFiberFromCall(call,returnFiber.internalContextTag,expirationTime);created['return']=returnFiber;return created;}function reconcileSingleReturn(returnFiber,currentFirstChild,returnNode,expirationTime){// There's no need to check for keys on yields since they're stateless.\nvar child=currentFirstChild;if(child!==null){if(child.tag===ReturnComponent){deleteRemainingChildren(returnFiber,child.sibling);var existing=useFiber(child,null,expirationTime);existing.type=returnNode.value;existing['return']=returnFiber;return existing;}else{deleteRemainingChildren(returnFiber,child);}}var created=createFiberFromReturn(returnNode,returnFiber.internalContextTag,expirationTime);created.type=returnNode.value;created['return']=returnFiber;return created;}function reconcileSinglePortal(returnFiber,currentFirstChild,portal,expirationTime){var key=portal.key;var child=currentFirstChild;while(child!==null){// TODO: If key === null and child.key === null, then this only applies to\n// the first item in the list.\nif(child.key===key){if(child.tag===HostPortal&&child.stateNode.containerInfo===portal.containerInfo&&child.stateNode.implementation===portal.implementation){deleteRemainingChildren(returnFiber,child.sibling);var existing=useFiber(child,portal.children||[],expirationTime);existing['return']=returnFiber;return existing;}else{deleteRemainingChildren(returnFiber,child);break;}}else{deleteChild(returnFiber,child);}child=child.sibling;}var created=createFiberFromPortal(portal,returnFiber.internalContextTag,expirationTime);created['return']=returnFiber;return created;}// This API will tag the children with the side-effect of the reconciliation\n// itself. They will be added to the side-effect list as we pass through the\n// children and the parent.\nfunction reconcileChildFibers(returnFiber,currentFirstChild,newChild,expirationTime){// This function is not recursive.\n// If the top level item is an array, we treat it as a set of children,\n// not as a fragment. Nested arrays on the other hand will be treated as\n// fragment nodes. Recursion happens at the normal flow.\n// Handle top level unkeyed fragments as if they were arrays.\n// This leads to an ambiguity between <>{[...]}</> and <>...</>.\n// We treat the ambiguous cases above the same.\nif((typeof newChild==='undefined'?'undefined':_typeof(newChild))==='object'&&newChild!==null&&newChild.type===REACT_FRAGMENT_TYPE&&newChild.key===null){newChild=newChild.props.children;}// Handle object types\nvar isObject=(typeof newChild==='undefined'?'undefined':_typeof(newChild))==='object'&&newChild!==null;if(isObject){switch(newChild.$$typeof){case REACT_ELEMENT_TYPE:return placeSingleChild(reconcileSingleElement(returnFiber,currentFirstChild,newChild,expirationTime));case REACT_CALL_TYPE:return placeSingleChild(reconcileSingleCall(returnFiber,currentFirstChild,newChild,expirationTime));case REACT_RETURN_TYPE:return placeSingleChild(reconcileSingleReturn(returnFiber,currentFirstChild,newChild,expirationTime));case REACT_PORTAL_TYPE:return placeSingleChild(reconcileSinglePortal(returnFiber,currentFirstChild,newChild,expirationTime));}}if(typeof newChild==='string'||typeof newChild==='number'){return placeSingleChild(reconcileSingleTextNode(returnFiber,currentFirstChild,''+newChild,expirationTime));}if(isArray$1(newChild)){return reconcileChildrenArray(returnFiber,currentFirstChild,newChild,expirationTime);}if(getIteratorFn(newChild)){return reconcileChildrenIterator(returnFiber,currentFirstChild,newChild,expirationTime);}if(isObject){throwOnInvalidObjectType(returnFiber,newChild);}{if(typeof newChild==='function'){warnOnFunctionType();}}if(typeof newChild==='undefined'){// If the new child is undefined, and the return fiber is a composite\n// component, throw an error. If Fiber return types are disabled,\n// we already threw above.\nswitch(returnFiber.tag){case ClassComponent:{{var instance=returnFiber.stateNode;if(instance.render._isMockFunction){// We allow auto-mocks to proceed as if they're returning null.\nbreak;}}}// Intentionally fall through to the next case, which handles both\n// functions and classes\n// eslint-disable-next-lined no-fallthrough\ncase FunctionalComponent:{var Component=returnFiber.type;invariant(false,'%s(...): Nothing was returned from render. This usually means a return statement is missing. Or, to render nothing, return null.',Component.displayName||Component.name||'Component');}}}// Remaining cases are all treated as empty.\nreturn deleteRemainingChildren(returnFiber,currentFirstChild);}return reconcileChildFibers;}", "function ChildReconciler(shouldTrackSideEffects){function deleteChild(returnFiber,childToDelete){if(!shouldTrackSideEffects){// Noop.\nreturn;}// Deletions are added in reversed order so we add it to the front.\n// At this point, the return fiber's effect list is empty except for\n// deletions, so we can just append the deletion to the list. The remaining\n// effects aren't added until the complete phase. Once we implement\n// resuming, this may not be true.\nvar last=returnFiber.lastEffect;if(last!==null){last.nextEffect=childToDelete;returnFiber.lastEffect=childToDelete;}else{returnFiber.firstEffect=returnFiber.lastEffect=childToDelete;}childToDelete.nextEffect=null;childToDelete.effectTag=Deletion;}function deleteRemainingChildren(returnFiber,currentFirstChild){if(!shouldTrackSideEffects){// Noop.\nreturn null;}// TODO: For the shouldClone case, this could be micro-optimized a bit by\n// assuming that after the first child we've already added everything.\nvar childToDelete=currentFirstChild;while(childToDelete!==null){deleteChild(returnFiber,childToDelete);childToDelete=childToDelete.sibling;}return null;}function mapRemainingChildren(returnFiber,currentFirstChild){// Add the remaining children to a temporary map so that we can find them by\n// keys quickly. Implicit (null) keys get added to this set with their index\nvar existingChildren=new Map();var existingChild=currentFirstChild;while(existingChild!==null){if(existingChild.key!==null){existingChildren.set(existingChild.key,existingChild);}else{existingChildren.set(existingChild.index,existingChild);}existingChild=existingChild.sibling;}return existingChildren;}function useFiber(fiber,pendingProps,expirationTime){// We currently set sibling to null and index to 0 here because it is easy\n// to forget to do before returning it. E.g. for the single child case.\nvar clone=createWorkInProgress(fiber,pendingProps,expirationTime);clone.index=0;clone.sibling=null;return clone;}function placeChild(newFiber,lastPlacedIndex,newIndex){newFiber.index=newIndex;if(!shouldTrackSideEffects){// Noop.\nreturn lastPlacedIndex;}var current=newFiber.alternate;if(current!==null){var oldIndex=current.index;if(oldIndex<lastPlacedIndex){// This is a move.\nnewFiber.effectTag=Placement;return lastPlacedIndex;}else{// This item can stay in place.\nreturn oldIndex;}}else{// This is an insertion.\nnewFiber.effectTag=Placement;return lastPlacedIndex;}}function placeSingleChild(newFiber){// This is simpler for the single child case. We only need to do a\n// placement for inserting new children.\nif(shouldTrackSideEffects&&newFiber.alternate===null){newFiber.effectTag=Placement;}return newFiber;}function updateTextNode(returnFiber,current,textContent,expirationTime){if(current===null||current.tag!==HostText){// Insert\nvar created=createFiberFromText(textContent,returnFiber.mode,expirationTime);created.return=returnFiber;return created;}else{// Update\nvar existing=useFiber(current,textContent,expirationTime);existing.return=returnFiber;return existing;}}function updateElement(returnFiber,current,element,expirationTime){if(current!==null&&current.type===element.type){// Move based on index\nvar existing=useFiber(current,element.props,expirationTime);existing.ref=coerceRef(returnFiber,current,element);existing.return=returnFiber;{existing._debugSource=element._source;existing._debugOwner=element._owner;}return existing;}else{// Insert\nvar created=createFiberFromElement(element,returnFiber.mode,expirationTime);created.ref=coerceRef(returnFiber,current,element);created.return=returnFiber;return created;}}function updatePortal(returnFiber,current,portal,expirationTime){if(current===null||current.tag!==HostPortal||current.stateNode.containerInfo!==portal.containerInfo||current.stateNode.implementation!==portal.implementation){// Insert\nvar created=createFiberFromPortal(portal,returnFiber.mode,expirationTime);created.return=returnFiber;return created;}else{// Update\nvar existing=useFiber(current,portal.children||[],expirationTime);existing.return=returnFiber;return existing;}}function updateFragment(returnFiber,current,fragment,expirationTime,key){if(current===null||current.tag!==Fragment){// Insert\nvar created=createFiberFromFragment(fragment,returnFiber.mode,expirationTime,key);created.return=returnFiber;return created;}else{// Update\nvar existing=useFiber(current,fragment,expirationTime);existing.return=returnFiber;return existing;}}function createChild(returnFiber,newChild,expirationTime){if(typeof newChild==='string'||typeof newChild==='number'){// Text nodes don't have keys. If the previous node is implicitly keyed\n// we can continue to replace it without aborting even if it is not a text\n// node.\nvar created=createFiberFromText(''+newChild,returnFiber.mode,expirationTime);created.return=returnFiber;return created;}if((typeof newChild==='undefined'?'undefined':_typeof(newChild))==='object'&&newChild!==null){switch(newChild.$$typeof){case REACT_ELEMENT_TYPE:{var _created=createFiberFromElement(newChild,returnFiber.mode,expirationTime);_created.ref=coerceRef(returnFiber,null,newChild);_created.return=returnFiber;return _created;}case REACT_PORTAL_TYPE:{var _created2=createFiberFromPortal(newChild,returnFiber.mode,expirationTime);_created2.return=returnFiber;return _created2;}}if(isArray$1(newChild)||getIteratorFn(newChild)){var _created3=createFiberFromFragment(newChild,returnFiber.mode,expirationTime,null);_created3.return=returnFiber;return _created3;}throwOnInvalidObjectType(returnFiber,newChild);}{if(typeof newChild==='function'){warnOnFunctionType();}}return null;}function updateSlot(returnFiber,oldFiber,newChild,expirationTime){// Update the fiber if the keys match, otherwise return null.\nvar key=oldFiber!==null?oldFiber.key:null;if(typeof newChild==='string'||typeof newChild==='number'){// Text nodes don't have keys. If the previous node is implicitly keyed\n// we can continue to replace it without aborting even if it is not a text\n// node.\nif(key!==null){return null;}return updateTextNode(returnFiber,oldFiber,''+newChild,expirationTime);}if((typeof newChild==='undefined'?'undefined':_typeof(newChild))==='object'&&newChild!==null){switch(newChild.$$typeof){case REACT_ELEMENT_TYPE:{if(newChild.key===key){if(newChild.type===REACT_FRAGMENT_TYPE){return updateFragment(returnFiber,oldFiber,newChild.props.children,expirationTime,key);}return updateElement(returnFiber,oldFiber,newChild,expirationTime);}else{return null;}}case REACT_PORTAL_TYPE:{if(newChild.key===key){return updatePortal(returnFiber,oldFiber,newChild,expirationTime);}else{return null;}}}if(isArray$1(newChild)||getIteratorFn(newChild)){if(key!==null){return null;}return updateFragment(returnFiber,oldFiber,newChild,expirationTime,null);}throwOnInvalidObjectType(returnFiber,newChild);}{if(typeof newChild==='function'){warnOnFunctionType();}}return null;}function updateFromMap(existingChildren,returnFiber,newIdx,newChild,expirationTime){if(typeof newChild==='string'||typeof newChild==='number'){// Text nodes don't have keys, so we neither have to check the old nor\n// new node for the key. If both are text nodes, they match.\nvar matchedFiber=existingChildren.get(newIdx)||null;return updateTextNode(returnFiber,matchedFiber,''+newChild,expirationTime);}if((typeof newChild==='undefined'?'undefined':_typeof(newChild))==='object'&&newChild!==null){switch(newChild.$$typeof){case REACT_ELEMENT_TYPE:{var _matchedFiber=existingChildren.get(newChild.key===null?newIdx:newChild.key)||null;if(newChild.type===REACT_FRAGMENT_TYPE){return updateFragment(returnFiber,_matchedFiber,newChild.props.children,expirationTime,newChild.key);}return updateElement(returnFiber,_matchedFiber,newChild,expirationTime);}case REACT_PORTAL_TYPE:{var _matchedFiber2=existingChildren.get(newChild.key===null?newIdx:newChild.key)||null;return updatePortal(returnFiber,_matchedFiber2,newChild,expirationTime);}}if(isArray$1(newChild)||getIteratorFn(newChild)){var _matchedFiber3=existingChildren.get(newIdx)||null;return updateFragment(returnFiber,_matchedFiber3,newChild,expirationTime,null);}throwOnInvalidObjectType(returnFiber,newChild);}{if(typeof newChild==='function'){warnOnFunctionType();}}return null;}/**\n * Warns if there is a duplicate or missing key\n */function warnOnInvalidKey(child,knownKeys){{if((typeof child==='undefined'?'undefined':_typeof(child))!=='object'||child===null){return knownKeys;}switch(child.$$typeof){case REACT_ELEMENT_TYPE:case REACT_PORTAL_TYPE:warnForMissingKey(child);var key=child.key;if(typeof key!=='string'){break;}if(knownKeys===null){knownKeys=new Set();knownKeys.add(key);break;}if(!knownKeys.has(key)){knownKeys.add(key);break;}warning(false,'Encountered two children with the same key, `%s`. '+'Keys should be unique so that components maintain their identity '+'across updates. Non-unique keys may cause children to be '+'duplicated and/or omitted — the behavior is unsupported and '+'could change in a future version.%s',key,getCurrentFiberStackAddendum$7());break;default:break;}}return knownKeys;}function reconcileChildrenArray(returnFiber,currentFirstChild,newChildren,expirationTime){// This algorithm can't optimize by searching from boths ends since we\n// don't have backpointers on fibers. I'm trying to see how far we can get\n// with that model. If it ends up not being worth the tradeoffs, we can\n// add it later.\n// Even with a two ended optimization, we'd want to optimize for the case\n// where there are few changes and brute force the comparison instead of\n// going for the Map. It'd like to explore hitting that path first in\n// forward-only mode and only go for the Map once we notice that we need\n// lots of look ahead. This doesn't handle reversal as well as two ended\n// search but that's unusual. Besides, for the two ended optimization to\n// work on Iterables, we'd need to copy the whole set.\n// In this first iteration, we'll just live with hitting the bad case\n// (adding everything to a Map) in for every insert/move.\n// If you change this code, also update reconcileChildrenIterator() which\n// uses the same algorithm.\n{// First, validate keys.\nvar knownKeys=null;for(var i=0;i<newChildren.length;i++){var child=newChildren[i];knownKeys=warnOnInvalidKey(child,knownKeys);}}var resultingFirstChild=null;var previousNewFiber=null;var oldFiber=currentFirstChild;var lastPlacedIndex=0;var newIdx=0;var nextOldFiber=null;for(;oldFiber!==null&&newIdx<newChildren.length;newIdx++){if(oldFiber.index>newIdx){nextOldFiber=oldFiber;oldFiber=null;}else{nextOldFiber=oldFiber.sibling;}var newFiber=updateSlot(returnFiber,oldFiber,newChildren[newIdx],expirationTime);if(newFiber===null){// TODO: This breaks on empty slots like null children. That's\n// unfortunate because it triggers the slow path all the time. We need\n// a better way to communicate whether this was a miss or null,\n// boolean, undefined, etc.\nif(oldFiber===null){oldFiber=nextOldFiber;}break;}if(shouldTrackSideEffects){if(oldFiber&&newFiber.alternate===null){// We matched the slot, but we didn't reuse the existing fiber, so we\n// need to delete the existing child.\ndeleteChild(returnFiber,oldFiber);}}lastPlacedIndex=placeChild(newFiber,lastPlacedIndex,newIdx);if(previousNewFiber===null){// TODO: Move out of the loop. This only happens for the first run.\nresultingFirstChild=newFiber;}else{// TODO: Defer siblings if we're not at the right index for this slot.\n// I.e. if we had null values before, then we want to defer this\n// for each null value. However, we also don't want to call updateSlot\n// with the previous one.\npreviousNewFiber.sibling=newFiber;}previousNewFiber=newFiber;oldFiber=nextOldFiber;}if(newIdx===newChildren.length){// We've reached the end of the new children. We can delete the rest.\ndeleteRemainingChildren(returnFiber,oldFiber);return resultingFirstChild;}if(oldFiber===null){// If we don't have any more existing children we can choose a fast path\n// since the rest will all be insertions.\nfor(;newIdx<newChildren.length;newIdx++){var _newFiber=createChild(returnFiber,newChildren[newIdx],expirationTime);if(!_newFiber){continue;}lastPlacedIndex=placeChild(_newFiber,lastPlacedIndex,newIdx);if(previousNewFiber===null){// TODO: Move out of the loop. This only happens for the first run.\nresultingFirstChild=_newFiber;}else{previousNewFiber.sibling=_newFiber;}previousNewFiber=_newFiber;}return resultingFirstChild;}// Add all children to a key map for quick lookups.\nvar existingChildren=mapRemainingChildren(returnFiber,oldFiber);// Keep scanning and use the map to restore deleted items as moves.\nfor(;newIdx<newChildren.length;newIdx++){var _newFiber2=updateFromMap(existingChildren,returnFiber,newIdx,newChildren[newIdx],expirationTime);if(_newFiber2){if(shouldTrackSideEffects){if(_newFiber2.alternate!==null){// The new fiber is a work in progress, but if there exists a\n// current, that means that we reused the fiber. We need to delete\n// it from the child list so that we don't add it to the deletion\n// list.\nexistingChildren.delete(_newFiber2.key===null?newIdx:_newFiber2.key);}}lastPlacedIndex=placeChild(_newFiber2,lastPlacedIndex,newIdx);if(previousNewFiber===null){resultingFirstChild=_newFiber2;}else{previousNewFiber.sibling=_newFiber2;}previousNewFiber=_newFiber2;}}if(shouldTrackSideEffects){// Any existing children that weren't consumed above were deleted. We need\n// to add them to the deletion list.\nexistingChildren.forEach(function(child){return deleteChild(returnFiber,child);});}return resultingFirstChild;}function reconcileChildrenIterator(returnFiber,currentFirstChild,newChildrenIterable,expirationTime){// This is the same implementation as reconcileChildrenArray(),\n// but using the iterator instead.\nvar iteratorFn=getIteratorFn(newChildrenIterable);!(typeof iteratorFn==='function')?invariant(false,'An object is not an iterable. This error is likely caused by a bug in React. Please file an issue.'):void 0;{// Warn about using Maps as children\nif(newChildrenIterable.entries===iteratorFn){!didWarnAboutMaps?warning(false,'Using Maps as children is unsupported and will likely yield '+'unexpected results. Convert it to a sequence/iterable of keyed '+'ReactElements instead.%s',getCurrentFiberStackAddendum$7()):void 0;didWarnAboutMaps=true;}// First, validate keys.\n// We'll get a different iterator later for the main pass.\nvar _newChildren=iteratorFn.call(newChildrenIterable);if(_newChildren){var knownKeys=null;var _step=_newChildren.next();for(;!_step.done;_step=_newChildren.next()){var child=_step.value;knownKeys=warnOnInvalidKey(child,knownKeys);}}}var newChildren=iteratorFn.call(newChildrenIterable);!(newChildren!=null)?invariant(false,'An iterable object provided no iterator.'):void 0;var resultingFirstChild=null;var previousNewFiber=null;var oldFiber=currentFirstChild;var lastPlacedIndex=0;var newIdx=0;var nextOldFiber=null;var step=newChildren.next();for(;oldFiber!==null&&!step.done;newIdx++,step=newChildren.next()){if(oldFiber.index>newIdx){nextOldFiber=oldFiber;oldFiber=null;}else{nextOldFiber=oldFiber.sibling;}var newFiber=updateSlot(returnFiber,oldFiber,step.value,expirationTime);if(newFiber===null){// TODO: This breaks on empty slots like null children. That's\n// unfortunate because it triggers the slow path all the time. We need\n// a better way to communicate whether this was a miss or null,\n// boolean, undefined, etc.\nif(!oldFiber){oldFiber=nextOldFiber;}break;}if(shouldTrackSideEffects){if(oldFiber&&newFiber.alternate===null){// We matched the slot, but we didn't reuse the existing fiber, so we\n// need to delete the existing child.\ndeleteChild(returnFiber,oldFiber);}}lastPlacedIndex=placeChild(newFiber,lastPlacedIndex,newIdx);if(previousNewFiber===null){// TODO: Move out of the loop. This only happens for the first run.\nresultingFirstChild=newFiber;}else{// TODO: Defer siblings if we're not at the right index for this slot.\n// I.e. if we had null values before, then we want to defer this\n// for each null value. However, we also don't want to call updateSlot\n// with the previous one.\npreviousNewFiber.sibling=newFiber;}previousNewFiber=newFiber;oldFiber=nextOldFiber;}if(step.done){// We've reached the end of the new children. We can delete the rest.\ndeleteRemainingChildren(returnFiber,oldFiber);return resultingFirstChild;}if(oldFiber===null){// If we don't have any more existing children we can choose a fast path\n// since the rest will all be insertions.\nfor(;!step.done;newIdx++,step=newChildren.next()){var _newFiber3=createChild(returnFiber,step.value,expirationTime);if(_newFiber3===null){continue;}lastPlacedIndex=placeChild(_newFiber3,lastPlacedIndex,newIdx);if(previousNewFiber===null){// TODO: Move out of the loop. This only happens for the first run.\nresultingFirstChild=_newFiber3;}else{previousNewFiber.sibling=_newFiber3;}previousNewFiber=_newFiber3;}return resultingFirstChild;}// Add all children to a key map for quick lookups.\nvar existingChildren=mapRemainingChildren(returnFiber,oldFiber);// Keep scanning and use the map to restore deleted items as moves.\nfor(;!step.done;newIdx++,step=newChildren.next()){var _newFiber4=updateFromMap(existingChildren,returnFiber,newIdx,step.value,expirationTime);if(_newFiber4!==null){if(shouldTrackSideEffects){if(_newFiber4.alternate!==null){// The new fiber is a work in progress, but if there exists a\n// current, that means that we reused the fiber. We need to delete\n// it from the child list so that we don't add it to the deletion\n// list.\nexistingChildren.delete(_newFiber4.key===null?newIdx:_newFiber4.key);}}lastPlacedIndex=placeChild(_newFiber4,lastPlacedIndex,newIdx);if(previousNewFiber===null){resultingFirstChild=_newFiber4;}else{previousNewFiber.sibling=_newFiber4;}previousNewFiber=_newFiber4;}}if(shouldTrackSideEffects){// Any existing children that weren't consumed above were deleted. We need\n// to add them to the deletion list.\nexistingChildren.forEach(function(child){return deleteChild(returnFiber,child);});}return resultingFirstChild;}function reconcileSingleTextNode(returnFiber,currentFirstChild,textContent,expirationTime){// There's no need to check for keys on text nodes since we don't have a\n// way to define them.\nif(currentFirstChild!==null&&currentFirstChild.tag===HostText){// We already have an existing node so let's just update it and delete\n// the rest.\ndeleteRemainingChildren(returnFiber,currentFirstChild.sibling);var existing=useFiber(currentFirstChild,textContent,expirationTime);existing.return=returnFiber;return existing;}// The existing first child is not a text node so we need to create one\n// and delete the existing ones.\ndeleteRemainingChildren(returnFiber,currentFirstChild);var created=createFiberFromText(textContent,returnFiber.mode,expirationTime);created.return=returnFiber;return created;}function reconcileSingleElement(returnFiber,currentFirstChild,element,expirationTime){var key=element.key;var child=currentFirstChild;while(child!==null){// TODO: If key === null and child.key === null, then this only applies to\n// the first item in the list.\nif(child.key===key){if(child.tag===Fragment?element.type===REACT_FRAGMENT_TYPE:child.type===element.type){deleteRemainingChildren(returnFiber,child.sibling);var existing=useFiber(child,element.type===REACT_FRAGMENT_TYPE?element.props.children:element.props,expirationTime);existing.ref=coerceRef(returnFiber,child,element);existing.return=returnFiber;{existing._debugSource=element._source;existing._debugOwner=element._owner;}return existing;}else{deleteRemainingChildren(returnFiber,child);break;}}else{deleteChild(returnFiber,child);}child=child.sibling;}if(element.type===REACT_FRAGMENT_TYPE){var created=createFiberFromFragment(element.props.children,returnFiber.mode,expirationTime,element.key);created.return=returnFiber;return created;}else{var _created4=createFiberFromElement(element,returnFiber.mode,expirationTime);_created4.ref=coerceRef(returnFiber,currentFirstChild,element);_created4.return=returnFiber;return _created4;}}function reconcileSinglePortal(returnFiber,currentFirstChild,portal,expirationTime){var key=portal.key;var child=currentFirstChild;while(child!==null){// TODO: If key === null and child.key === null, then this only applies to\n// the first item in the list.\nif(child.key===key){if(child.tag===HostPortal&&child.stateNode.containerInfo===portal.containerInfo&&child.stateNode.implementation===portal.implementation){deleteRemainingChildren(returnFiber,child.sibling);var existing=useFiber(child,portal.children||[],expirationTime);existing.return=returnFiber;return existing;}else{deleteRemainingChildren(returnFiber,child);break;}}else{deleteChild(returnFiber,child);}child=child.sibling;}var created=createFiberFromPortal(portal,returnFiber.mode,expirationTime);created.return=returnFiber;return created;}// This API will tag the children with the side-effect of the reconciliation\n// itself. They will be added to the side-effect list as we pass through the\n// children and the parent.\nfunction reconcileChildFibers(returnFiber,currentFirstChild,newChild,expirationTime){// This function is not recursive.\n// If the top level item is an array, we treat it as a set of children,\n// not as a fragment. Nested arrays on the other hand will be treated as\n// fragment nodes. Recursion happens at the normal flow.\n// Handle top level unkeyed fragments as if they were arrays.\n// This leads to an ambiguity between <>{[...]}</> and <>...</>.\n// We treat the ambiguous cases above the same.\nvar isUnkeyedTopLevelFragment=(typeof newChild==='undefined'?'undefined':_typeof(newChild))==='object'&&newChild!==null&&newChild.type===REACT_FRAGMENT_TYPE&&newChild.key===null;if(isUnkeyedTopLevelFragment){newChild=newChild.props.children;}// Handle object types\nvar isObject=(typeof newChild==='undefined'?'undefined':_typeof(newChild))==='object'&&newChild!==null;if(isObject){switch(newChild.$$typeof){case REACT_ELEMENT_TYPE:return placeSingleChild(reconcileSingleElement(returnFiber,currentFirstChild,newChild,expirationTime));case REACT_PORTAL_TYPE:return placeSingleChild(reconcileSinglePortal(returnFiber,currentFirstChild,newChild,expirationTime));}}if(typeof newChild==='string'||typeof newChild==='number'){return placeSingleChild(reconcileSingleTextNode(returnFiber,currentFirstChild,''+newChild,expirationTime));}if(isArray$1(newChild)){return reconcileChildrenArray(returnFiber,currentFirstChild,newChild,expirationTime);}if(getIteratorFn(newChild)){return reconcileChildrenIterator(returnFiber,currentFirstChild,newChild,expirationTime);}if(isObject){throwOnInvalidObjectType(returnFiber,newChild);}{if(typeof newChild==='function'){warnOnFunctionType();}}if(typeof newChild==='undefined'&&!isUnkeyedTopLevelFragment){// If the new child is undefined, and the return fiber is a composite\n// component, throw an error. If Fiber return types are disabled,\n// we already threw above.\nswitch(returnFiber.tag){case ClassComponent:{{var instance=returnFiber.stateNode;if(instance.render._isMockFunction){// We allow auto-mocks to proceed as if they're returning null.\nbreak;}}}// Intentionally fall through to the next case, which handles both\n// functions and classes\n// eslint-disable-next-lined no-fallthrough\ncase FunctionalComponent:{var Component=returnFiber.type;invariant(false,'%s(...): Nothing was returned from render. This usually means a return statement is missing. Or, to render nothing, return null.',Component.displayName||Component.name||'Component');}}}// Remaining cases are all treated as empty.\nreturn deleteRemainingChildren(returnFiber,currentFirstChild);}return reconcileChildFibers;}", "function ChildReconciler(shouldTrackSideEffects){function deleteChild(returnFiber,childToDelete){if(!shouldTrackSideEffects){// Noop.\nreturn;}// Deletions are added in reversed order so we add it to the front.\n// At this point, the return fiber's effect list is empty except for\n// deletions, so we can just append the deletion to the list. The remaining\n// effects aren't added until the complete phase. Once we implement\n// resuming, this may not be true.\nvar last=returnFiber.lastEffect;if(last!==null){last.nextEffect=childToDelete;returnFiber.lastEffect=childToDelete;}else{returnFiber.firstEffect=returnFiber.lastEffect=childToDelete;}childToDelete.nextEffect=null;childToDelete.effectTag=Deletion;}function deleteRemainingChildren(returnFiber,currentFirstChild){if(!shouldTrackSideEffects){// Noop.\nreturn null;}// TODO: For the shouldClone case, this could be micro-optimized a bit by\n// assuming that after the first child we've already added everything.\nvar childToDelete=currentFirstChild;while(childToDelete!==null){deleteChild(returnFiber,childToDelete);childToDelete=childToDelete.sibling;}return null;}function mapRemainingChildren(returnFiber,currentFirstChild){// Add the remaining children to a temporary map so that we can find them by\n// keys quickly. Implicit (null) keys get added to this set with their index\nvar existingChildren=new Map();var existingChild=currentFirstChild;while(existingChild!==null){if(existingChild.key!==null){existingChildren.set(existingChild.key,existingChild);}else{existingChildren.set(existingChild.index,existingChild);}existingChild=existingChild.sibling;}return existingChildren;}function useFiber(fiber,pendingProps,expirationTime){// We currently set sibling to null and index to 0 here because it is easy\n// to forget to do before returning it. E.g. for the single child case.\nvar clone=createWorkInProgress(fiber,pendingProps,expirationTime);clone.index=0;clone.sibling=null;return clone;}function placeChild(newFiber,lastPlacedIndex,newIndex){newFiber.index=newIndex;if(!shouldTrackSideEffects){// Noop.\nreturn lastPlacedIndex;}var current=newFiber.alternate;if(current!==null){var oldIndex=current.index;if(oldIndex<lastPlacedIndex){// This is a move.\nnewFiber.effectTag=Placement;return lastPlacedIndex;}else{// This item can stay in place.\nreturn oldIndex;}}else{// This is an insertion.\nnewFiber.effectTag=Placement;return lastPlacedIndex;}}function placeSingleChild(newFiber){// This is simpler for the single child case. We only need to do a\n// placement for inserting new children.\nif(shouldTrackSideEffects&&newFiber.alternate===null){newFiber.effectTag=Placement;}return newFiber;}function updateTextNode(returnFiber,current,textContent,expirationTime){if(current===null||current.tag!==HostText){// Insert\nvar created=createFiberFromText(textContent,returnFiber.mode,expirationTime);created['return']=returnFiber;return created;}else{// Update\nvar existing=useFiber(current,textContent,expirationTime);existing['return']=returnFiber;return existing;}}function updateElement(returnFiber,current,element,expirationTime){if(current!==null&&current.type===element.type){// Move based on index\nvar existing=useFiber(current,element.props,expirationTime);existing.ref=coerceRef(returnFiber,current,element);existing['return']=returnFiber;{existing._debugSource=element._source;existing._debugOwner=element._owner;}return existing;}else{// Insert\nvar created=createFiberFromElement(element,returnFiber.mode,expirationTime);created.ref=coerceRef(returnFiber,current,element);created['return']=returnFiber;return created;}}function updatePortal(returnFiber,current,portal,expirationTime){if(current===null||current.tag!==HostPortal||current.stateNode.containerInfo!==portal.containerInfo||current.stateNode.implementation!==portal.implementation){// Insert\nvar created=createFiberFromPortal(portal,returnFiber.mode,expirationTime);created['return']=returnFiber;return created;}else{// Update\nvar existing=useFiber(current,portal.children||[],expirationTime);existing['return']=returnFiber;return existing;}}function updateFragment(returnFiber,current,fragment,expirationTime,key){if(current===null||current.tag!==Fragment){// Insert\nvar created=createFiberFromFragment(fragment,returnFiber.mode,expirationTime,key);created['return']=returnFiber;return created;}else{// Update\nvar existing=useFiber(current,fragment,expirationTime);existing['return']=returnFiber;return existing;}}function createChild(returnFiber,newChild,expirationTime){if(typeof newChild==='string'||typeof newChild==='number'){// Text nodes don't have keys. If the previous node is implicitly keyed\n// we can continue to replace it without aborting even if it is not a text\n// node.\nvar created=createFiberFromText(''+newChild,returnFiber.mode,expirationTime);created['return']=returnFiber;return created;}if(typeof newChild==='object'&&newChild!==null){switch(newChild.$$typeof){case REACT_ELEMENT_TYPE:{var _created=createFiberFromElement(newChild,returnFiber.mode,expirationTime);_created.ref=coerceRef(returnFiber,null,newChild);_created['return']=returnFiber;return _created;}case REACT_PORTAL_TYPE:{var _created2=createFiberFromPortal(newChild,returnFiber.mode,expirationTime);_created2['return']=returnFiber;return _created2;}}if(isArray$1(newChild)||getIteratorFn(newChild)){var _created3=createFiberFromFragment(newChild,returnFiber.mode,expirationTime,null);_created3['return']=returnFiber;return _created3;}throwOnInvalidObjectType(returnFiber,newChild);}{if(typeof newChild==='function'){warnOnFunctionType();}}return null;}function updateSlot(returnFiber,oldFiber,newChild,expirationTime){// Update the fiber if the keys match, otherwise return null.\nvar key=oldFiber!==null?oldFiber.key:null;if(typeof newChild==='string'||typeof newChild==='number'){// Text nodes don't have keys. If the previous node is implicitly keyed\n// we can continue to replace it without aborting even if it is not a text\n// node.\nif(key!==null){return null;}return updateTextNode(returnFiber,oldFiber,''+newChild,expirationTime);}if(typeof newChild==='object'&&newChild!==null){switch(newChild.$$typeof){case REACT_ELEMENT_TYPE:{if(newChild.key===key){if(newChild.type===REACT_FRAGMENT_TYPE){return updateFragment(returnFiber,oldFiber,newChild.props.children,expirationTime,key);}return updateElement(returnFiber,oldFiber,newChild,expirationTime);}else{return null;}}case REACT_PORTAL_TYPE:{if(newChild.key===key){return updatePortal(returnFiber,oldFiber,newChild,expirationTime);}else{return null;}}}if(isArray$1(newChild)||getIteratorFn(newChild)){if(key!==null){return null;}return updateFragment(returnFiber,oldFiber,newChild,expirationTime,null);}throwOnInvalidObjectType(returnFiber,newChild);}{if(typeof newChild==='function'){warnOnFunctionType();}}return null;}function updateFromMap(existingChildren,returnFiber,newIdx,newChild,expirationTime){if(typeof newChild==='string'||typeof newChild==='number'){// Text nodes don't have keys, so we neither have to check the old nor\n// new node for the key. If both are text nodes, they match.\nvar matchedFiber=existingChildren.get(newIdx)||null;return updateTextNode(returnFiber,matchedFiber,''+newChild,expirationTime);}if(typeof newChild==='object'&&newChild!==null){switch(newChild.$$typeof){case REACT_ELEMENT_TYPE:{var _matchedFiber=existingChildren.get(newChild.key===null?newIdx:newChild.key)||null;if(newChild.type===REACT_FRAGMENT_TYPE){return updateFragment(returnFiber,_matchedFiber,newChild.props.children,expirationTime,newChild.key);}return updateElement(returnFiber,_matchedFiber,newChild,expirationTime);}case REACT_PORTAL_TYPE:{var _matchedFiber2=existingChildren.get(newChild.key===null?newIdx:newChild.key)||null;return updatePortal(returnFiber,_matchedFiber2,newChild,expirationTime);}}if(isArray$1(newChild)||getIteratorFn(newChild)){var _matchedFiber3=existingChildren.get(newIdx)||null;return updateFragment(returnFiber,_matchedFiber3,newChild,expirationTime,null);}throwOnInvalidObjectType(returnFiber,newChild);}{if(typeof newChild==='function'){warnOnFunctionType();}}return null;}/**\n * Warns if there is a duplicate or missing key\n */function warnOnInvalidKey(child,knownKeys){{if(typeof child!=='object'||child===null){return knownKeys;}switch(child.$$typeof){case REACT_ELEMENT_TYPE:case REACT_PORTAL_TYPE:warnForMissingKey(child);var key=child.key;if(typeof key!=='string'){break;}if(knownKeys===null){knownKeys=new Set();knownKeys.add(key);break;}if(!knownKeys.has(key)){knownKeys.add(key);break;}warning(false,'Encountered two children with the same key, `%s`. '+'Keys should be unique so that components maintain their identity '+'across updates. Non-unique keys may cause children to be '+'duplicated and/or omitted — the behavior is unsupported and '+'could change in a future version.%s',key,getCurrentFiberStackAddendum$7());break;default:break;}}return knownKeys;}function reconcileChildrenArray(returnFiber,currentFirstChild,newChildren,expirationTime){// This algorithm can't optimize by searching from boths ends since we\n// don't have backpointers on fibers. I'm trying to see how far we can get\n// with that model. If it ends up not being worth the tradeoffs, we can\n// add it later.\n// Even with a two ended optimization, we'd want to optimize for the case\n// where there are few changes and brute force the comparison instead of\n// going for the Map. It'd like to explore hitting that path first in\n// forward-only mode and only go for the Map once we notice that we need\n// lots of look ahead. This doesn't handle reversal as well as two ended\n// search but that's unusual. Besides, for the two ended optimization to\n// work on Iterables, we'd need to copy the whole set.\n// In this first iteration, we'll just live with hitting the bad case\n// (adding everything to a Map) in for every insert/move.\n// If you change this code, also update reconcileChildrenIterator() which\n// uses the same algorithm.\n{// First, validate keys.\nvar knownKeys=null;for(var i=0;i<newChildren.length;i++){var child=newChildren[i];knownKeys=warnOnInvalidKey(child,knownKeys);}}var resultingFirstChild=null;var previousNewFiber=null;var oldFiber=currentFirstChild;var lastPlacedIndex=0;var newIdx=0;var nextOldFiber=null;for(;oldFiber!==null&&newIdx<newChildren.length;newIdx++){if(oldFiber.index>newIdx){nextOldFiber=oldFiber;oldFiber=null;}else{nextOldFiber=oldFiber.sibling;}var newFiber=updateSlot(returnFiber,oldFiber,newChildren[newIdx],expirationTime);if(newFiber===null){// TODO: This breaks on empty slots like null children. That's\n// unfortunate because it triggers the slow path all the time. We need\n// a better way to communicate whether this was a miss or null,\n// boolean, undefined, etc.\nif(oldFiber===null){oldFiber=nextOldFiber;}break;}if(shouldTrackSideEffects){if(oldFiber&&newFiber.alternate===null){// We matched the slot, but we didn't reuse the existing fiber, so we\n// need to delete the existing child.\ndeleteChild(returnFiber,oldFiber);}}lastPlacedIndex=placeChild(newFiber,lastPlacedIndex,newIdx);if(previousNewFiber===null){// TODO: Move out of the loop. This only happens for the first run.\nresultingFirstChild=newFiber;}else{// TODO: Defer siblings if we're not at the right index for this slot.\n// I.e. if we had null values before, then we want to defer this\n// for each null value. However, we also don't want to call updateSlot\n// with the previous one.\npreviousNewFiber.sibling=newFiber;}previousNewFiber=newFiber;oldFiber=nextOldFiber;}if(newIdx===newChildren.length){// We've reached the end of the new children. We can delete the rest.\ndeleteRemainingChildren(returnFiber,oldFiber);return resultingFirstChild;}if(oldFiber===null){// If we don't have any more existing children we can choose a fast path\n// since the rest will all be insertions.\nfor(;newIdx<newChildren.length;newIdx++){var _newFiber=createChild(returnFiber,newChildren[newIdx],expirationTime);if(!_newFiber){continue;}lastPlacedIndex=placeChild(_newFiber,lastPlacedIndex,newIdx);if(previousNewFiber===null){// TODO: Move out of the loop. This only happens for the first run.\nresultingFirstChild=_newFiber;}else{previousNewFiber.sibling=_newFiber;}previousNewFiber=_newFiber;}return resultingFirstChild;}// Add all children to a key map for quick lookups.\nvar existingChildren=mapRemainingChildren(returnFiber,oldFiber);// Keep scanning and use the map to restore deleted items as moves.\nfor(;newIdx<newChildren.length;newIdx++){var _newFiber2=updateFromMap(existingChildren,returnFiber,newIdx,newChildren[newIdx],expirationTime);if(_newFiber2){if(shouldTrackSideEffects){if(_newFiber2.alternate!==null){// The new fiber is a work in progress, but if there exists a\n// current, that means that we reused the fiber. We need to delete\n// it from the child list so that we don't add it to the deletion\n// list.\nexistingChildren['delete'](_newFiber2.key===null?newIdx:_newFiber2.key);}}lastPlacedIndex=placeChild(_newFiber2,lastPlacedIndex,newIdx);if(previousNewFiber===null){resultingFirstChild=_newFiber2;}else{previousNewFiber.sibling=_newFiber2;}previousNewFiber=_newFiber2;}}if(shouldTrackSideEffects){// Any existing children that weren't consumed above were deleted. We need\n// to add them to the deletion list.\nexistingChildren.forEach(function(child){return deleteChild(returnFiber,child);});}return resultingFirstChild;}function reconcileChildrenIterator(returnFiber,currentFirstChild,newChildrenIterable,expirationTime){// This is the same implementation as reconcileChildrenArray(),\n// but using the iterator instead.\nvar iteratorFn=getIteratorFn(newChildrenIterable);!(typeof iteratorFn==='function')?invariant(false,'An object is not an iterable. This error is likely caused by a bug in React. Please file an issue.'):void 0;{// Warn about using Maps as children\nif(newChildrenIterable.entries===iteratorFn){!didWarnAboutMaps?warning(false,'Using Maps as children is unsupported and will likely yield '+'unexpected results. Convert it to a sequence/iterable of keyed '+'ReactElements instead.%s',getCurrentFiberStackAddendum$7()):void 0;didWarnAboutMaps=true;}// First, validate keys.\n// We'll get a different iterator later for the main pass.\nvar _newChildren=iteratorFn.call(newChildrenIterable);if(_newChildren){var knownKeys=null;var _step=_newChildren.next();for(;!_step.done;_step=_newChildren.next()){var child=_step.value;knownKeys=warnOnInvalidKey(child,knownKeys);}}}var newChildren=iteratorFn.call(newChildrenIterable);!(newChildren!=null)?invariant(false,'An iterable object provided no iterator.'):void 0;var resultingFirstChild=null;var previousNewFiber=null;var oldFiber=currentFirstChild;var lastPlacedIndex=0;var newIdx=0;var nextOldFiber=null;var step=newChildren.next();for(;oldFiber!==null&&!step.done;newIdx++,step=newChildren.next()){if(oldFiber.index>newIdx){nextOldFiber=oldFiber;oldFiber=null;}else{nextOldFiber=oldFiber.sibling;}var newFiber=updateSlot(returnFiber,oldFiber,step.value,expirationTime);if(newFiber===null){// TODO: This breaks on empty slots like null children. That's\n// unfortunate because it triggers the slow path all the time. We need\n// a better way to communicate whether this was a miss or null,\n// boolean, undefined, etc.\nif(!oldFiber){oldFiber=nextOldFiber;}break;}if(shouldTrackSideEffects){if(oldFiber&&newFiber.alternate===null){// We matched the slot, but we didn't reuse the existing fiber, so we\n// need to delete the existing child.\ndeleteChild(returnFiber,oldFiber);}}lastPlacedIndex=placeChild(newFiber,lastPlacedIndex,newIdx);if(previousNewFiber===null){// TODO: Move out of the loop. This only happens for the first run.\nresultingFirstChild=newFiber;}else{// TODO: Defer siblings if we're not at the right index for this slot.\n// I.e. if we had null values before, then we want to defer this\n// for each null value. However, we also don't want to call updateSlot\n// with the previous one.\npreviousNewFiber.sibling=newFiber;}previousNewFiber=newFiber;oldFiber=nextOldFiber;}if(step.done){// We've reached the end of the new children. We can delete the rest.\ndeleteRemainingChildren(returnFiber,oldFiber);return resultingFirstChild;}if(oldFiber===null){// If we don't have any more existing children we can choose a fast path\n// since the rest will all be insertions.\nfor(;!step.done;newIdx++,step=newChildren.next()){var _newFiber3=createChild(returnFiber,step.value,expirationTime);if(_newFiber3===null){continue;}lastPlacedIndex=placeChild(_newFiber3,lastPlacedIndex,newIdx);if(previousNewFiber===null){// TODO: Move out of the loop. This only happens for the first run.\nresultingFirstChild=_newFiber3;}else{previousNewFiber.sibling=_newFiber3;}previousNewFiber=_newFiber3;}return resultingFirstChild;}// Add all children to a key map for quick lookups.\nvar existingChildren=mapRemainingChildren(returnFiber,oldFiber);// Keep scanning and use the map to restore deleted items as moves.\nfor(;!step.done;newIdx++,step=newChildren.next()){var _newFiber4=updateFromMap(existingChildren,returnFiber,newIdx,step.value,expirationTime);if(_newFiber4!==null){if(shouldTrackSideEffects){if(_newFiber4.alternate!==null){// The new fiber is a work in progress, but if there exists a\n// current, that means that we reused the fiber. We need to delete\n// it from the child list so that we don't add it to the deletion\n// list.\nexistingChildren['delete'](_newFiber4.key===null?newIdx:_newFiber4.key);}}lastPlacedIndex=placeChild(_newFiber4,lastPlacedIndex,newIdx);if(previousNewFiber===null){resultingFirstChild=_newFiber4;}else{previousNewFiber.sibling=_newFiber4;}previousNewFiber=_newFiber4;}}if(shouldTrackSideEffects){// Any existing children that weren't consumed above were deleted. We need\n// to add them to the deletion list.\nexistingChildren.forEach(function(child){return deleteChild(returnFiber,child);});}return resultingFirstChild;}function reconcileSingleTextNode(returnFiber,currentFirstChild,textContent,expirationTime){// There's no need to check for keys on text nodes since we don't have a\n// way to define them.\nif(currentFirstChild!==null&&currentFirstChild.tag===HostText){// We already have an existing node so let's just update it and delete\n// the rest.\ndeleteRemainingChildren(returnFiber,currentFirstChild.sibling);var existing=useFiber(currentFirstChild,textContent,expirationTime);existing['return']=returnFiber;return existing;}// The existing first child is not a text node so we need to create one\n// and delete the existing ones.\ndeleteRemainingChildren(returnFiber,currentFirstChild);var created=createFiberFromText(textContent,returnFiber.mode,expirationTime);created['return']=returnFiber;return created;}function reconcileSingleElement(returnFiber,currentFirstChild,element,expirationTime){var key=element.key;var child=currentFirstChild;while(child!==null){// TODO: If key === null and child.key === null, then this only applies to\n// the first item in the list.\nif(child.key===key){if(child.tag===Fragment?element.type===REACT_FRAGMENT_TYPE:child.type===element.type){deleteRemainingChildren(returnFiber,child.sibling);var existing=useFiber(child,element.type===REACT_FRAGMENT_TYPE?element.props.children:element.props,expirationTime);existing.ref=coerceRef(returnFiber,child,element);existing['return']=returnFiber;{existing._debugSource=element._source;existing._debugOwner=element._owner;}return existing;}else{deleteRemainingChildren(returnFiber,child);break;}}else{deleteChild(returnFiber,child);}child=child.sibling;}if(element.type===REACT_FRAGMENT_TYPE){var created=createFiberFromFragment(element.props.children,returnFiber.mode,expirationTime,element.key);created['return']=returnFiber;return created;}else{var _created4=createFiberFromElement(element,returnFiber.mode,expirationTime);_created4.ref=coerceRef(returnFiber,currentFirstChild,element);_created4['return']=returnFiber;return _created4;}}function reconcileSinglePortal(returnFiber,currentFirstChild,portal,expirationTime){var key=portal.key;var child=currentFirstChild;while(child!==null){// TODO: If key === null and child.key === null, then this only applies to\n// the first item in the list.\nif(child.key===key){if(child.tag===HostPortal&&child.stateNode.containerInfo===portal.containerInfo&&child.stateNode.implementation===portal.implementation){deleteRemainingChildren(returnFiber,child.sibling);var existing=useFiber(child,portal.children||[],expirationTime);existing['return']=returnFiber;return existing;}else{deleteRemainingChildren(returnFiber,child);break;}}else{deleteChild(returnFiber,child);}child=child.sibling;}var created=createFiberFromPortal(portal,returnFiber.mode,expirationTime);created['return']=returnFiber;return created;}// This API will tag the children with the side-effect of the reconciliation\n// itself. They will be added to the side-effect list as we pass through the\n// children and the parent.\nfunction reconcileChildFibers(returnFiber,currentFirstChild,newChild,expirationTime){// This function is not recursive.\n// If the top level item is an array, we treat it as a set of children,\n// not as a fragment. Nested arrays on the other hand will be treated as\n// fragment nodes. Recursion happens at the normal flow.\n// Handle top level unkeyed fragments as if they were arrays.\n// This leads to an ambiguity between <>{[...]}</> and <>...</>.\n// We treat the ambiguous cases above the same.\nvar isUnkeyedTopLevelFragment=typeof newChild==='object'&&newChild!==null&&newChild.type===REACT_FRAGMENT_TYPE&&newChild.key===null;if(isUnkeyedTopLevelFragment){newChild=newChild.props.children;}// Handle object types\nvar isObject=typeof newChild==='object'&&newChild!==null;if(isObject){switch(newChild.$$typeof){case REACT_ELEMENT_TYPE:return placeSingleChild(reconcileSingleElement(returnFiber,currentFirstChild,newChild,expirationTime));case REACT_PORTAL_TYPE:return placeSingleChild(reconcileSinglePortal(returnFiber,currentFirstChild,newChild,expirationTime));}}if(typeof newChild==='string'||typeof newChild==='number'){return placeSingleChild(reconcileSingleTextNode(returnFiber,currentFirstChild,''+newChild,expirationTime));}if(isArray$1(newChild)){return reconcileChildrenArray(returnFiber,currentFirstChild,newChild,expirationTime);}if(getIteratorFn(newChild)){return reconcileChildrenIterator(returnFiber,currentFirstChild,newChild,expirationTime);}if(isObject){throwOnInvalidObjectType(returnFiber,newChild);}{if(typeof newChild==='function'){warnOnFunctionType();}}if(typeof newChild==='undefined'&&!isUnkeyedTopLevelFragment){// If the new child is undefined, and the return fiber is a composite\n// component, throw an error. If Fiber return types are disabled,\n// we already threw above.\nswitch(returnFiber.tag){case ClassComponent:{{var instance=returnFiber.stateNode;if(instance.render._isMockFunction){// We allow auto-mocks to proceed as if they're returning null.\nbreak;}}}// Intentionally fall through to the next case, which handles both\n// functions and classes\n// eslint-disable-next-lined no-fallthrough\ncase FunctionalComponent:{var Component=returnFiber.type;invariant(false,'%s(...): Nothing was returned from render. This usually means a return statement is missing. Or, to render nothing, return null.',Component.displayName||Component.name||'Component');}}}// Remaining cases are all treated as empty.\nreturn deleteRemainingChildren(returnFiber,currentFirstChild);}return reconcileChildFibers;}", "function ChildReconciler(shouldTrackSideEffects){function deleteChild(returnFiber,childToDelete){if(!shouldTrackSideEffects){// Noop.\nreturn;}// Deletions are added in reversed order so we add it to the front.\n// At this point, the return fiber's effect list is empty except for\n// deletions, so we can just append the deletion to the list. The remaining\n// effects aren't added until the complete phase. Once we implement\n// resuming, this may not be true.\nvar last=returnFiber.lastEffect;if(last!==null){last.nextEffect=childToDelete;returnFiber.lastEffect=childToDelete;}else{returnFiber.firstEffect=returnFiber.lastEffect=childToDelete;}childToDelete.nextEffect=null;childToDelete.flags=Deletion;}function deleteRemainingChildren(returnFiber,currentFirstChild){if(!shouldTrackSideEffects){// Noop.\nreturn null;}// TODO: For the shouldClone case, this could be micro-optimized a bit by\n// assuming that after the first child we've already added everything.\nvar childToDelete=currentFirstChild;while(childToDelete!==null){deleteChild(returnFiber,childToDelete);childToDelete=childToDelete.sibling;}return null;}function mapRemainingChildren(returnFiber,currentFirstChild){// Add the remaining children to a temporary map so that we can find them by\n// keys quickly. Implicit (null) keys get added to this set with their index\n// instead.\nvar existingChildren=new Map();var existingChild=currentFirstChild;while(existingChild!==null){if(existingChild.key!==null){existingChildren.set(existingChild.key,existingChild);}else{existingChildren.set(existingChild.index,existingChild);}existingChild=existingChild.sibling;}return existingChildren;}function useFiber(fiber,pendingProps){// We currently set sibling to null and index to 0 here because it is easy\n// to forget to do before returning it. E.g. for the single child case.\nvar clone=createWorkInProgress(fiber,pendingProps);clone.index=0;clone.sibling=null;return clone;}function placeChild(newFiber,lastPlacedIndex,newIndex){newFiber.index=newIndex;if(!shouldTrackSideEffects){// Noop.\nreturn lastPlacedIndex;}var current=newFiber.alternate;if(current!==null){var oldIndex=current.index;if(oldIndex<lastPlacedIndex){// This is a move.\nnewFiber.flags=Placement;return lastPlacedIndex;}else{// This item can stay in place.\nreturn oldIndex;}}else{// This is an insertion.\nnewFiber.flags=Placement;return lastPlacedIndex;}}function placeSingleChild(newFiber){// This is simpler for the single child case. We only need to do a\n// placement for inserting new children.\nif(shouldTrackSideEffects&&newFiber.alternate===null){newFiber.flags=Placement;}return newFiber;}function updateTextNode(returnFiber,current,textContent,lanes){if(current===null||current.tag!==HostText){// Insert\nvar created=createFiberFromText(textContent,returnFiber.mode,lanes);created.return=returnFiber;return created;}else{// Update\nvar existing=useFiber(current,textContent);existing.return=returnFiber;return existing;}}function updateElement(returnFiber,current,element,lanes){if(current!==null){if(current.elementType===element.type||// Keep this check inline so it only runs on the false path:\nisCompatibleFamilyForHotReloading(current,element)){// Move based on index\nvar existing=useFiber(current,element.props);existing.ref=coerceRef(returnFiber,current,element);existing.return=returnFiber;{existing._debugSource=element._source;existing._debugOwner=element._owner;}return existing;}}// Insert\nvar created=createFiberFromElement(element,returnFiber.mode,lanes);created.ref=coerceRef(returnFiber,current,element);created.return=returnFiber;return created;}function updatePortal(returnFiber,current,portal,lanes){if(current===null||current.tag!==HostPortal||current.stateNode.containerInfo!==portal.containerInfo||current.stateNode.implementation!==portal.implementation){// Insert\nvar created=createFiberFromPortal(portal,returnFiber.mode,lanes);created.return=returnFiber;return created;}else{// Update\nvar existing=useFiber(current,portal.children||[]);existing.return=returnFiber;return existing;}}function updateFragment(returnFiber,current,fragment,lanes,key){if(current===null||current.tag!==Fragment){// Insert\nvar created=createFiberFromFragment(fragment,returnFiber.mode,lanes,key);created.return=returnFiber;return created;}else{// Update\nvar existing=useFiber(current,fragment);existing.return=returnFiber;return existing;}}function createChild(returnFiber,newChild,lanes){if(typeof newChild==='string'||typeof newChild==='number'){// Text nodes don't have keys. If the previous node is implicitly keyed\n// we can continue to replace it without aborting even if it is not a text\n// node.\nvar created=createFiberFromText(''+newChild,returnFiber.mode,lanes);created.return=returnFiber;return created;}if(_typeof(newChild)==='object'&&newChild!==null){switch(newChild.$$typeof){case REACT_ELEMENT_TYPE:{var _created=createFiberFromElement(newChild,returnFiber.mode,lanes);_created.ref=coerceRef(returnFiber,null,newChild);_created.return=returnFiber;return _created;}case REACT_PORTAL_TYPE:{var _created2=createFiberFromPortal(newChild,returnFiber.mode,lanes);_created2.return=returnFiber;return _created2;}}if(isArray$1(newChild)||getIteratorFn(newChild)){var _created3=createFiberFromFragment(newChild,returnFiber.mode,lanes,null);_created3.return=returnFiber;return _created3;}throwOnInvalidObjectType(returnFiber,newChild);}{if(typeof newChild==='function'){warnOnFunctionType(returnFiber);}}return null;}function updateSlot(returnFiber,oldFiber,newChild,lanes){// Update the fiber if the keys match, otherwise return null.\nvar key=oldFiber!==null?oldFiber.key:null;if(typeof newChild==='string'||typeof newChild==='number'){// Text nodes don't have keys. If the previous node is implicitly keyed\n// we can continue to replace it without aborting even if it is not a text\n// node.\nif(key!==null){return null;}return updateTextNode(returnFiber,oldFiber,''+newChild,lanes);}if(_typeof(newChild)==='object'&&newChild!==null){switch(newChild.$$typeof){case REACT_ELEMENT_TYPE:{if(newChild.key===key){if(newChild.type===REACT_FRAGMENT_TYPE){return updateFragment(returnFiber,oldFiber,newChild.props.children,lanes,key);}return updateElement(returnFiber,oldFiber,newChild,lanes);}else{return null;}}case REACT_PORTAL_TYPE:{if(newChild.key===key){return updatePortal(returnFiber,oldFiber,newChild,lanes);}else{return null;}}}if(isArray$1(newChild)||getIteratorFn(newChild)){if(key!==null){return null;}return updateFragment(returnFiber,oldFiber,newChild,lanes,null);}throwOnInvalidObjectType(returnFiber,newChild);}{if(typeof newChild==='function'){warnOnFunctionType(returnFiber);}}return null;}function updateFromMap(existingChildren,returnFiber,newIdx,newChild,lanes){if(typeof newChild==='string'||typeof newChild==='number'){// Text nodes don't have keys, so we neither have to check the old nor\n// new node for the key. If both are text nodes, they match.\nvar matchedFiber=existingChildren.get(newIdx)||null;return updateTextNode(returnFiber,matchedFiber,''+newChild,lanes);}if(_typeof(newChild)==='object'&&newChild!==null){switch(newChild.$$typeof){case REACT_ELEMENT_TYPE:{var _matchedFiber=existingChildren.get(newChild.key===null?newIdx:newChild.key)||null;if(newChild.type===REACT_FRAGMENT_TYPE){return updateFragment(returnFiber,_matchedFiber,newChild.props.children,lanes,newChild.key);}return updateElement(returnFiber,_matchedFiber,newChild,lanes);}case REACT_PORTAL_TYPE:{var _matchedFiber2=existingChildren.get(newChild.key===null?newIdx:newChild.key)||null;return updatePortal(returnFiber,_matchedFiber2,newChild,lanes);}}if(isArray$1(newChild)||getIteratorFn(newChild)){var _matchedFiber3=existingChildren.get(newIdx)||null;return updateFragment(returnFiber,_matchedFiber3,newChild,lanes,null);}throwOnInvalidObjectType(returnFiber,newChild);}{if(typeof newChild==='function'){warnOnFunctionType(returnFiber);}}return null;}/**\n * Warns if there is a duplicate or missing key\n */function warnOnInvalidKey(child,knownKeys,returnFiber){{if(_typeof(child)!=='object'||child===null){return knownKeys;}switch(child.$$typeof){case REACT_ELEMENT_TYPE:case REACT_PORTAL_TYPE:warnForMissingKey(child,returnFiber);var key=child.key;if(typeof key!=='string'){break;}if(knownKeys===null){knownKeys=new Set();knownKeys.add(key);break;}if(!knownKeys.has(key)){knownKeys.add(key);break;}error('Encountered two children with the same key, `%s`. '+'Keys should be unique so that components maintain their identity '+'across updates. Non-unique keys may cause children to be '+'duplicated and/or omitted — the behavior is unsupported and '+'could change in a future version.',key);break;}}return knownKeys;}function reconcileChildrenArray(returnFiber,currentFirstChild,newChildren,lanes){// This algorithm can't optimize by searching from both ends since we\n// don't have backpointers on fibers. I'm trying to see how far we can get\n// with that model. If it ends up not being worth the tradeoffs, we can\n// add it later.\n// Even with a two ended optimization, we'd want to optimize for the case\n// where there are few changes and brute force the comparison instead of\n// going for the Map. It'd like to explore hitting that path first in\n// forward-only mode and only go for the Map once we notice that we need\n// lots of look ahead. This doesn't handle reversal as well as two ended\n// search but that's unusual. Besides, for the two ended optimization to\n// work on Iterables, we'd need to copy the whole set.\n// In this first iteration, we'll just live with hitting the bad case\n// (adding everything to a Map) in for every insert/move.\n// If you change this code, also update reconcileChildrenIterator() which\n// uses the same algorithm.\n{// First, validate keys.\nvar knownKeys=null;for(var i=0;i<newChildren.length;i++){var child=newChildren[i];knownKeys=warnOnInvalidKey(child,knownKeys,returnFiber);}}var resultingFirstChild=null;var previousNewFiber=null;var oldFiber=currentFirstChild;var lastPlacedIndex=0;var newIdx=0;var nextOldFiber=null;for(;oldFiber!==null&&newIdx<newChildren.length;newIdx++){if(oldFiber.index>newIdx){nextOldFiber=oldFiber;oldFiber=null;}else{nextOldFiber=oldFiber.sibling;}var newFiber=updateSlot(returnFiber,oldFiber,newChildren[newIdx],lanes);if(newFiber===null){// TODO: This breaks on empty slots like null children. That's\n// unfortunate because it triggers the slow path all the time. We need\n// a better way to communicate whether this was a miss or null,\n// boolean, undefined, etc.\nif(oldFiber===null){oldFiber=nextOldFiber;}break;}if(shouldTrackSideEffects){if(oldFiber&&newFiber.alternate===null){// We matched the slot, but we didn't reuse the existing fiber, so we\n// need to delete the existing child.\ndeleteChild(returnFiber,oldFiber);}}lastPlacedIndex=placeChild(newFiber,lastPlacedIndex,newIdx);if(previousNewFiber===null){// TODO: Move out of the loop. This only happens for the first run.\nresultingFirstChild=newFiber;}else{// TODO: Defer siblings if we're not at the right index for this slot.\n// I.e. if we had null values before, then we want to defer this\n// for each null value. However, we also don't want to call updateSlot\n// with the previous one.\npreviousNewFiber.sibling=newFiber;}previousNewFiber=newFiber;oldFiber=nextOldFiber;}if(newIdx===newChildren.length){// We've reached the end of the new children. We can delete the rest.\ndeleteRemainingChildren(returnFiber,oldFiber);return resultingFirstChild;}if(oldFiber===null){// If we don't have any more existing children we can choose a fast path\n// since the rest will all be insertions.\nfor(;newIdx<newChildren.length;newIdx++){var _newFiber=createChild(returnFiber,newChildren[newIdx],lanes);if(_newFiber===null){continue;}lastPlacedIndex=placeChild(_newFiber,lastPlacedIndex,newIdx);if(previousNewFiber===null){// TODO: Move out of the loop. This only happens for the first run.\nresultingFirstChild=_newFiber;}else{previousNewFiber.sibling=_newFiber;}previousNewFiber=_newFiber;}return resultingFirstChild;}// Add all children to a key map for quick lookups.\nvar existingChildren=mapRemainingChildren(returnFiber,oldFiber);// Keep scanning and use the map to restore deleted items as moves.\nfor(;newIdx<newChildren.length;newIdx++){var _newFiber2=updateFromMap(existingChildren,returnFiber,newIdx,newChildren[newIdx],lanes);if(_newFiber2!==null){if(shouldTrackSideEffects){if(_newFiber2.alternate!==null){// The new fiber is a work in progress, but if there exists a\n// current, that means that we reused the fiber. We need to delete\n// it from the child list so that we don't add it to the deletion\n// list.\nexistingChildren.delete(_newFiber2.key===null?newIdx:_newFiber2.key);}}lastPlacedIndex=placeChild(_newFiber2,lastPlacedIndex,newIdx);if(previousNewFiber===null){resultingFirstChild=_newFiber2;}else{previousNewFiber.sibling=_newFiber2;}previousNewFiber=_newFiber2;}}if(shouldTrackSideEffects){// Any existing children that weren't consumed above were deleted. We need\n// to add them to the deletion list.\nexistingChildren.forEach(function(child){return deleteChild(returnFiber,child);});}return resultingFirstChild;}function reconcileChildrenIterator(returnFiber,currentFirstChild,newChildrenIterable,lanes){// This is the same implementation as reconcileChildrenArray(),\n// but using the iterator instead.\nvar iteratorFn=getIteratorFn(newChildrenIterable);if(!(typeof iteratorFn==='function')){{throw Error(\"An object is not an iterable. This error is likely caused by a bug in React. Please file an issue.\");}}{// We don't support rendering Generators because it's a mutation.\n// See https://github.com/facebook/react/issues/12995\nif(typeof Symbol==='function'&&// $FlowFixMe Flow doesn't know about toStringTag\nnewChildrenIterable[Symbol.toStringTag]==='Generator'){if(!didWarnAboutGenerators){error('Using Generators as children is unsupported and will likely yield '+'unexpected results because enumerating a generator mutates it. '+'You may convert it to an array with `Array.from()` or the '+'`[...spread]` operator before rendering. Keep in mind '+'you might need to polyfill these features for older browsers.');}didWarnAboutGenerators=true;}// Warn about using Maps as children\nif(newChildrenIterable.entries===iteratorFn){if(!didWarnAboutMaps){error('Using Maps as children is not supported. '+'Use an array of keyed ReactElements instead.');}didWarnAboutMaps=true;}// First, validate keys.\n// We'll get a different iterator later for the main pass.\nvar _newChildren=iteratorFn.call(newChildrenIterable);if(_newChildren){var knownKeys=null;var _step=_newChildren.next();for(;!_step.done;_step=_newChildren.next()){var child=_step.value;knownKeys=warnOnInvalidKey(child,knownKeys,returnFiber);}}}var newChildren=iteratorFn.call(newChildrenIterable);if(!(newChildren!=null)){{throw Error(\"An iterable object provided no iterator.\");}}var resultingFirstChild=null;var previousNewFiber=null;var oldFiber=currentFirstChild;var lastPlacedIndex=0;var newIdx=0;var nextOldFiber=null;var step=newChildren.next();for(;oldFiber!==null&&!step.done;newIdx++,step=newChildren.next()){if(oldFiber.index>newIdx){nextOldFiber=oldFiber;oldFiber=null;}else{nextOldFiber=oldFiber.sibling;}var newFiber=updateSlot(returnFiber,oldFiber,step.value,lanes);if(newFiber===null){// TODO: This breaks on empty slots like null children. That's\n// unfortunate because it triggers the slow path all the time. We need\n// a better way to communicate whether this was a miss or null,\n// boolean, undefined, etc.\nif(oldFiber===null){oldFiber=nextOldFiber;}break;}if(shouldTrackSideEffects){if(oldFiber&&newFiber.alternate===null){// We matched the slot, but we didn't reuse the existing fiber, so we\n// need to delete the existing child.\ndeleteChild(returnFiber,oldFiber);}}lastPlacedIndex=placeChild(newFiber,lastPlacedIndex,newIdx);if(previousNewFiber===null){// TODO: Move out of the loop. This only happens for the first run.\nresultingFirstChild=newFiber;}else{// TODO: Defer siblings if we're not at the right index for this slot.\n// I.e. if we had null values before, then we want to defer this\n// for each null value. However, we also don't want to call updateSlot\n// with the previous one.\npreviousNewFiber.sibling=newFiber;}previousNewFiber=newFiber;oldFiber=nextOldFiber;}if(step.done){// We've reached the end of the new children. We can delete the rest.\ndeleteRemainingChildren(returnFiber,oldFiber);return resultingFirstChild;}if(oldFiber===null){// If we don't have any more existing children we can choose a fast path\n// since the rest will all be insertions.\nfor(;!step.done;newIdx++,step=newChildren.next()){var _newFiber3=createChild(returnFiber,step.value,lanes);if(_newFiber3===null){continue;}lastPlacedIndex=placeChild(_newFiber3,lastPlacedIndex,newIdx);if(previousNewFiber===null){// TODO: Move out of the loop. This only happens for the first run.\nresultingFirstChild=_newFiber3;}else{previousNewFiber.sibling=_newFiber3;}previousNewFiber=_newFiber3;}return resultingFirstChild;}// Add all children to a key map for quick lookups.\nvar existingChildren=mapRemainingChildren(returnFiber,oldFiber);// Keep scanning and use the map to restore deleted items as moves.\nfor(;!step.done;newIdx++,step=newChildren.next()){var _newFiber4=updateFromMap(existingChildren,returnFiber,newIdx,step.value,lanes);if(_newFiber4!==null){if(shouldTrackSideEffects){if(_newFiber4.alternate!==null){// The new fiber is a work in progress, but if there exists a\n// current, that means that we reused the fiber. We need to delete\n// it from the child list so that we don't add it to the deletion\n// list.\nexistingChildren.delete(_newFiber4.key===null?newIdx:_newFiber4.key);}}lastPlacedIndex=placeChild(_newFiber4,lastPlacedIndex,newIdx);if(previousNewFiber===null){resultingFirstChild=_newFiber4;}else{previousNewFiber.sibling=_newFiber4;}previousNewFiber=_newFiber4;}}if(shouldTrackSideEffects){// Any existing children that weren't consumed above were deleted. We need\n// to add them to the deletion list.\nexistingChildren.forEach(function(child){return deleteChild(returnFiber,child);});}return resultingFirstChild;}function reconcileSingleTextNode(returnFiber,currentFirstChild,textContent,lanes){// There's no need to check for keys on text nodes since we don't have a\n// way to define them.\nif(currentFirstChild!==null&&currentFirstChild.tag===HostText){// We already have an existing node so let's just update it and delete\n// the rest.\ndeleteRemainingChildren(returnFiber,currentFirstChild.sibling);var existing=useFiber(currentFirstChild,textContent);existing.return=returnFiber;return existing;}// The existing first child is not a text node so we need to create one\n// and delete the existing ones.\ndeleteRemainingChildren(returnFiber,currentFirstChild);var created=createFiberFromText(textContent,returnFiber.mode,lanes);created.return=returnFiber;return created;}function reconcileSingleElement(returnFiber,currentFirstChild,element,lanes){var key=element.key;var child=currentFirstChild;while(child!==null){// TODO: If key === null and child.key === null, then this only applies to\n// the first item in the list.\nif(child.key===key){switch(child.tag){case Fragment:{if(element.type===REACT_FRAGMENT_TYPE){deleteRemainingChildren(returnFiber,child.sibling);var existing=useFiber(child,element.props.children);existing.return=returnFiber;{existing._debugSource=element._source;existing._debugOwner=element._owner;}return existing;}break;}case Block:// We intentionally fallthrough here if enableBlocksAPI is not on.\n// eslint-disable-next-lined no-fallthrough\ndefault:{if(child.elementType===element.type||// Keep this check inline so it only runs on the false path:\nisCompatibleFamilyForHotReloading(child,element)){deleteRemainingChildren(returnFiber,child.sibling);var _existing3=useFiber(child,element.props);_existing3.ref=coerceRef(returnFiber,child,element);_existing3.return=returnFiber;{_existing3._debugSource=element._source;_existing3._debugOwner=element._owner;}return _existing3;}break;}}// Didn't match.\ndeleteRemainingChildren(returnFiber,child);break;}else{deleteChild(returnFiber,child);}child=child.sibling;}if(element.type===REACT_FRAGMENT_TYPE){var created=createFiberFromFragment(element.props.children,returnFiber.mode,lanes,element.key);created.return=returnFiber;return created;}else{var _created4=createFiberFromElement(element,returnFiber.mode,lanes);_created4.ref=coerceRef(returnFiber,currentFirstChild,element);_created4.return=returnFiber;return _created4;}}function reconcileSinglePortal(returnFiber,currentFirstChild,portal,lanes){var key=portal.key;var child=currentFirstChild;while(child!==null){// TODO: If key === null and child.key === null, then this only applies to\n// the first item in the list.\nif(child.key===key){if(child.tag===HostPortal&&child.stateNode.containerInfo===portal.containerInfo&&child.stateNode.implementation===portal.implementation){deleteRemainingChildren(returnFiber,child.sibling);var existing=useFiber(child,portal.children||[]);existing.return=returnFiber;return existing;}else{deleteRemainingChildren(returnFiber,child);break;}}else{deleteChild(returnFiber,child);}child=child.sibling;}var created=createFiberFromPortal(portal,returnFiber.mode,lanes);created.return=returnFiber;return created;}// This API will tag the children with the side-effect of the reconciliation\n// itself. They will be added to the side-effect list as we pass through the\n// children and the parent.\nfunction reconcileChildFibers(returnFiber,currentFirstChild,newChild,lanes){// This function is not recursive.\n// If the top level item is an array, we treat it as a set of children,\n// not as a fragment. Nested arrays on the other hand will be treated as\n// fragment nodes. Recursion happens at the normal flow.\n// Handle top level unkeyed fragments as if they were arrays.\n// This leads to an ambiguity between <>{[...]}</> and <>...</>.\n// We treat the ambiguous cases above the same.\nvar isUnkeyedTopLevelFragment=_typeof(newChild)==='object'&&newChild!==null&&newChild.type===REACT_FRAGMENT_TYPE&&newChild.key===null;if(isUnkeyedTopLevelFragment){newChild=newChild.props.children;}// Handle object types\nvar isObject=_typeof(newChild)==='object'&&newChild!==null;if(isObject){switch(newChild.$$typeof){case REACT_ELEMENT_TYPE:return placeSingleChild(reconcileSingleElement(returnFiber,currentFirstChild,newChild,lanes));case REACT_PORTAL_TYPE:return placeSingleChild(reconcileSinglePortal(returnFiber,currentFirstChild,newChild,lanes));}}if(typeof newChild==='string'||typeof newChild==='number'){return placeSingleChild(reconcileSingleTextNode(returnFiber,currentFirstChild,''+newChild,lanes));}if(isArray$1(newChild)){return reconcileChildrenArray(returnFiber,currentFirstChild,newChild,lanes);}if(getIteratorFn(newChild)){return reconcileChildrenIterator(returnFiber,currentFirstChild,newChild,lanes);}if(isObject){throwOnInvalidObjectType(returnFiber,newChild);}{if(typeof newChild==='function'){warnOnFunctionType(returnFiber);}}if(typeof newChild==='undefined'&&!isUnkeyedTopLevelFragment){// If the new child is undefined, and the return fiber is a composite\n// component, throw an error. If Fiber return types are disabled,\n// we already threw above.\nswitch(returnFiber.tag){case ClassComponent:{{var instance=returnFiber.stateNode;if(instance.render._isMockFunction){// We allow auto-mocks to proceed as if they're returning null.\nbreak;}}}// Intentionally fall through to the next case, which handles both\n// functions and classes\n// eslint-disable-next-lined no-fallthrough\ncase Block:case FunctionComponent:case ForwardRef:case SimpleMemoComponent:{{{throw Error((getComponentName(returnFiber.type)||'Component')+\"(...): Nothing was returned from render. This usually means a return statement is missing. Or, to render nothing, return null.\");}}}}}// Remaining cases are all treated as empty.\nreturn deleteRemainingChildren(returnFiber,currentFirstChild);}return reconcileChildFibers;}", "function ChildReconciler(shouldTrackSideEffects){function deleteChild(returnFiber,childToDelete){if(!shouldTrackSideEffects){// Noop.\nreturn;}// Deletions are added in reversed order so we add it to the front.\n// At this point, the return fiber's effect list is empty except for\n// deletions, so we can just append the deletion to the list. The remaining\n// effects aren't added until the complete phase. Once we implement\n// resuming, this may not be true.\nvar last=returnFiber.lastEffect;if(last!==null){last.nextEffect=childToDelete;returnFiber.lastEffect=childToDelete;}else {returnFiber.firstEffect=returnFiber.lastEffect=childToDelete;}childToDelete.nextEffect=null;childToDelete.flags=Deletion;}function deleteRemainingChildren(returnFiber,currentFirstChild){if(!shouldTrackSideEffects){// Noop.\nreturn null;}// TODO: For the shouldClone case, this could be micro-optimized a bit by\n// assuming that after the first child we've already added everything.\nvar childToDelete=currentFirstChild;while(childToDelete!==null){deleteChild(returnFiber,childToDelete);childToDelete=childToDelete.sibling;}return null;}function mapRemainingChildren(returnFiber,currentFirstChild){// Add the remaining children to a temporary map so that we can find them by\n// keys quickly. Implicit (null) keys get added to this set with their index\n// instead.\nvar existingChildren=new Map();var existingChild=currentFirstChild;while(existingChild!==null){if(existingChild.key!==null){existingChildren.set(existingChild.key,existingChild);}else {existingChildren.set(existingChild.index,existingChild);}existingChild=existingChild.sibling;}return existingChildren;}function useFiber(fiber,pendingProps){// We currently set sibling to null and index to 0 here because it is easy\n// to forget to do before returning it. E.g. for the single child case.\nvar clone=createWorkInProgress(fiber,pendingProps);clone.index=0;clone.sibling=null;return clone;}function placeChild(newFiber,lastPlacedIndex,newIndex){newFiber.index=newIndex;if(!shouldTrackSideEffects){// Noop.\nreturn lastPlacedIndex;}var current=newFiber.alternate;if(current!==null){var oldIndex=current.index;if(oldIndex<lastPlacedIndex){// This is a move.\nnewFiber.flags=Placement;return lastPlacedIndex;}else {// This item can stay in place.\nreturn oldIndex;}}else {// This is an insertion.\nnewFiber.flags=Placement;return lastPlacedIndex;}}function placeSingleChild(newFiber){// This is simpler for the single child case. We only need to do a\n// placement for inserting new children.\nif(shouldTrackSideEffects&&newFiber.alternate===null){newFiber.flags=Placement;}return newFiber;}function updateTextNode(returnFiber,current,textContent,lanes){if(current===null||current.tag!==HostText){// Insert\nvar created=createFiberFromText(textContent,returnFiber.mode,lanes);created.return=returnFiber;return created;}else {// Update\nvar existing=useFiber(current,textContent);existing.return=returnFiber;return existing;}}function updateElement(returnFiber,current,element,lanes){if(current!==null){if(current.elementType===element.type||// Keep this check inline so it only runs on the false path:\nisCompatibleFamilyForHotReloading(current,element)){// Move based on index\nvar existing=useFiber(current,element.props);existing.ref=coerceRef(returnFiber,current,element);existing.return=returnFiber;{existing._debugSource=element._source;existing._debugOwner=element._owner;}return existing;}}// Insert\nvar created=createFiberFromElement(element,returnFiber.mode,lanes);created.ref=coerceRef(returnFiber,current,element);created.return=returnFiber;return created;}function updatePortal(returnFiber,current,portal,lanes){if(current===null||current.tag!==HostPortal||current.stateNode.containerInfo!==portal.containerInfo||current.stateNode.implementation!==portal.implementation){// Insert\nvar created=createFiberFromPortal(portal,returnFiber.mode,lanes);created.return=returnFiber;return created;}else {// Update\nvar existing=useFiber(current,portal.children||[]);existing.return=returnFiber;return existing;}}function updateFragment(returnFiber,current,fragment,lanes,key){if(current===null||current.tag!==Fragment){// Insert\nvar created=createFiberFromFragment(fragment,returnFiber.mode,lanes,key);created.return=returnFiber;return created;}else {// Update\nvar existing=useFiber(current,fragment);existing.return=returnFiber;return existing;}}function createChild(returnFiber,newChild,lanes){if(typeof newChild==='string'||typeof newChild==='number'){// Text nodes don't have keys. If the previous node is implicitly keyed\n// we can continue to replace it without aborting even if it is not a text\n// node.\nvar created=createFiberFromText(''+newChild,returnFiber.mode,lanes);created.return=returnFiber;return created;}if(typeof newChild==='object'&&newChild!==null){switch(newChild.$$typeof){case REACT_ELEMENT_TYPE:{var _created=createFiberFromElement(newChild,returnFiber.mode,lanes);_created.ref=coerceRef(returnFiber,null,newChild);_created.return=returnFiber;return _created;}case REACT_PORTAL_TYPE:{var _created2=createFiberFromPortal(newChild,returnFiber.mode,lanes);_created2.return=returnFiber;return _created2;}}if(isArray$1(newChild)||getIteratorFn(newChild)){var _created3=createFiberFromFragment(newChild,returnFiber.mode,lanes,null);_created3.return=returnFiber;return _created3;}throwOnInvalidObjectType(returnFiber,newChild);}{if(typeof newChild==='function'){warnOnFunctionType(returnFiber);}}return null;}function updateSlot(returnFiber,oldFiber,newChild,lanes){// Update the fiber if the keys match, otherwise return null.\nvar key=oldFiber!==null?oldFiber.key:null;if(typeof newChild==='string'||typeof newChild==='number'){// Text nodes don't have keys. If the previous node is implicitly keyed\n// we can continue to replace it without aborting even if it is not a text\n// node.\nif(key!==null){return null;}return updateTextNode(returnFiber,oldFiber,''+newChild,lanes);}if(typeof newChild==='object'&&newChild!==null){switch(newChild.$$typeof){case REACT_ELEMENT_TYPE:{if(newChild.key===key){if(newChild.type===REACT_FRAGMENT_TYPE){return updateFragment(returnFiber,oldFiber,newChild.props.children,lanes,key);}return updateElement(returnFiber,oldFiber,newChild,lanes);}else {return null;}}case REACT_PORTAL_TYPE:{if(newChild.key===key){return updatePortal(returnFiber,oldFiber,newChild,lanes);}else {return null;}}}if(isArray$1(newChild)||getIteratorFn(newChild)){if(key!==null){return null;}return updateFragment(returnFiber,oldFiber,newChild,lanes,null);}throwOnInvalidObjectType(returnFiber,newChild);}{if(typeof newChild==='function'){warnOnFunctionType(returnFiber);}}return null;}function updateFromMap(existingChildren,returnFiber,newIdx,newChild,lanes){if(typeof newChild==='string'||typeof newChild==='number'){// Text nodes don't have keys, so we neither have to check the old nor\n// new node for the key. If both are text nodes, they match.\nvar matchedFiber=existingChildren.get(newIdx)||null;return updateTextNode(returnFiber,matchedFiber,''+newChild,lanes);}if(typeof newChild==='object'&&newChild!==null){switch(newChild.$$typeof){case REACT_ELEMENT_TYPE:{var _matchedFiber=existingChildren.get(newChild.key===null?newIdx:newChild.key)||null;if(newChild.type===REACT_FRAGMENT_TYPE){return updateFragment(returnFiber,_matchedFiber,newChild.props.children,lanes,newChild.key);}return updateElement(returnFiber,_matchedFiber,newChild,lanes);}case REACT_PORTAL_TYPE:{var _matchedFiber2=existingChildren.get(newChild.key===null?newIdx:newChild.key)||null;return updatePortal(returnFiber,_matchedFiber2,newChild,lanes);}}if(isArray$1(newChild)||getIteratorFn(newChild)){var _matchedFiber3=existingChildren.get(newIdx)||null;return updateFragment(returnFiber,_matchedFiber3,newChild,lanes,null);}throwOnInvalidObjectType(returnFiber,newChild);}{if(typeof newChild==='function'){warnOnFunctionType(returnFiber);}}return null;}/**\n * Warns if there is a duplicate or missing key\n */function warnOnInvalidKey(child,knownKeys,returnFiber){{if(typeof child!=='object'||child===null){return knownKeys;}switch(child.$$typeof){case REACT_ELEMENT_TYPE:case REACT_PORTAL_TYPE:warnForMissingKey(child,returnFiber);var key=child.key;if(typeof key!=='string'){break;}if(knownKeys===null){knownKeys=new Set();knownKeys.add(key);break;}if(!knownKeys.has(key)){knownKeys.add(key);break;}error('Encountered two children with the same key, `%s`. '+'Keys should be unique so that components maintain their identity '+'across updates. Non-unique keys may cause children to be '+'duplicated and/or omitted — the behavior is unsupported and '+'could change in a future version.',key);break;}}return knownKeys;}function reconcileChildrenArray(returnFiber,currentFirstChild,newChildren,lanes){// This algorithm can't optimize by searching from both ends since we\n// don't have backpointers on fibers. I'm trying to see how far we can get\n// with that model. If it ends up not being worth the tradeoffs, we can\n// add it later.\n// Even with a two ended optimization, we'd want to optimize for the case\n// where there are few changes and brute force the comparison instead of\n// going for the Map. It'd like to explore hitting that path first in\n// forward-only mode and only go for the Map once we notice that we need\n// lots of look ahead. This doesn't handle reversal as well as two ended\n// search but that's unusual. Besides, for the two ended optimization to\n// work on Iterables, we'd need to copy the whole set.\n// In this first iteration, we'll just live with hitting the bad case\n// (adding everything to a Map) in for every insert/move.\n// If you change this code, also update reconcileChildrenIterator() which\n// uses the same algorithm.\n{// First, validate keys.\nvar knownKeys=null;for(var i=0;i<newChildren.length;i++){var child=newChildren[i];knownKeys=warnOnInvalidKey(child,knownKeys,returnFiber);}}var resultingFirstChild=null;var previousNewFiber=null;var oldFiber=currentFirstChild;var lastPlacedIndex=0;var newIdx=0;var nextOldFiber=null;for(;oldFiber!==null&&newIdx<newChildren.length;newIdx++){if(oldFiber.index>newIdx){nextOldFiber=oldFiber;oldFiber=null;}else {nextOldFiber=oldFiber.sibling;}var newFiber=updateSlot(returnFiber,oldFiber,newChildren[newIdx],lanes);if(newFiber===null){// TODO: This breaks on empty slots like null children. That's\n// unfortunate because it triggers the slow path all the time. We need\n// a better way to communicate whether this was a miss or null,\n// boolean, undefined, etc.\nif(oldFiber===null){oldFiber=nextOldFiber;}break;}if(shouldTrackSideEffects){if(oldFiber&&newFiber.alternate===null){// We matched the slot, but we didn't reuse the existing fiber, so we\n// need to delete the existing child.\ndeleteChild(returnFiber,oldFiber);}}lastPlacedIndex=placeChild(newFiber,lastPlacedIndex,newIdx);if(previousNewFiber===null){// TODO: Move out of the loop. This only happens for the first run.\nresultingFirstChild=newFiber;}else {// TODO: Defer siblings if we're not at the right index for this slot.\n// I.e. if we had null values before, then we want to defer this\n// for each null value. However, we also don't want to call updateSlot\n// with the previous one.\npreviousNewFiber.sibling=newFiber;}previousNewFiber=newFiber;oldFiber=nextOldFiber;}if(newIdx===newChildren.length){// We've reached the end of the new children. We can delete the rest.\ndeleteRemainingChildren(returnFiber,oldFiber);return resultingFirstChild;}if(oldFiber===null){// If we don't have any more existing children we can choose a fast path\n// since the rest will all be insertions.\nfor(;newIdx<newChildren.length;newIdx++){var _newFiber=createChild(returnFiber,newChildren[newIdx],lanes);if(_newFiber===null){continue;}lastPlacedIndex=placeChild(_newFiber,lastPlacedIndex,newIdx);if(previousNewFiber===null){// TODO: Move out of the loop. This only happens for the first run.\nresultingFirstChild=_newFiber;}else {previousNewFiber.sibling=_newFiber;}previousNewFiber=_newFiber;}return resultingFirstChild;}// Add all children to a key map for quick lookups.\nvar existingChildren=mapRemainingChildren(returnFiber,oldFiber);// Keep scanning and use the map to restore deleted items as moves.\nfor(;newIdx<newChildren.length;newIdx++){var _newFiber2=updateFromMap(existingChildren,returnFiber,newIdx,newChildren[newIdx],lanes);if(_newFiber2!==null){if(shouldTrackSideEffects){if(_newFiber2.alternate!==null){// The new fiber is a work in progress, but if there exists a\n// current, that means that we reused the fiber. We need to delete\n// it from the child list so that we don't add it to the deletion\n// list.\nexistingChildren.delete(_newFiber2.key===null?newIdx:_newFiber2.key);}}lastPlacedIndex=placeChild(_newFiber2,lastPlacedIndex,newIdx);if(previousNewFiber===null){resultingFirstChild=_newFiber2;}else {previousNewFiber.sibling=_newFiber2;}previousNewFiber=_newFiber2;}}if(shouldTrackSideEffects){// Any existing children that weren't consumed above were deleted. We need\n// to add them to the deletion list.\nexistingChildren.forEach(function(child){return deleteChild(returnFiber,child);});}return resultingFirstChild;}function reconcileChildrenIterator(returnFiber,currentFirstChild,newChildrenIterable,lanes){// This is the same implementation as reconcileChildrenArray(),\n// but using the iterator instead.\nvar iteratorFn=getIteratorFn(newChildrenIterable);if(!(typeof iteratorFn==='function')){{throw Error(\"An object is not an iterable. This error is likely caused by a bug in React. Please file an issue.\");}}{// We don't support rendering Generators because it's a mutation.\n// See https://github.com/facebook/react/issues/12995\nif(typeof Symbol==='function'&&// $FlowFixMe Flow doesn't know about toStringTag\nnewChildrenIterable[Symbol.toStringTag]==='Generator'){if(!didWarnAboutGenerators){error('Using Generators as children is unsupported and will likely yield '+'unexpected results because enumerating a generator mutates it. '+'You may convert it to an array with `Array.from()` or the '+'`[...spread]` operator before rendering. Keep in mind '+'you might need to polyfill these features for older browsers.');}didWarnAboutGenerators=true;}// Warn about using Maps as children\nif(newChildrenIterable.entries===iteratorFn){if(!didWarnAboutMaps){error('Using Maps as children is not supported. '+'Use an array of keyed ReactElements instead.');}didWarnAboutMaps=true;}// First, validate keys.\n// We'll get a different iterator later for the main pass.\nvar _newChildren=iteratorFn.call(newChildrenIterable);if(_newChildren){var knownKeys=null;var _step=_newChildren.next();for(;!_step.done;_step=_newChildren.next()){var child=_step.value;knownKeys=warnOnInvalidKey(child,knownKeys,returnFiber);}}}var newChildren=iteratorFn.call(newChildrenIterable);if(!(newChildren!=null)){{throw Error(\"An iterable object provided no iterator.\");}}var resultingFirstChild=null;var previousNewFiber=null;var oldFiber=currentFirstChild;var lastPlacedIndex=0;var newIdx=0;var nextOldFiber=null;var step=newChildren.next();for(;oldFiber!==null&&!step.done;newIdx++,step=newChildren.next()){if(oldFiber.index>newIdx){nextOldFiber=oldFiber;oldFiber=null;}else {nextOldFiber=oldFiber.sibling;}var newFiber=updateSlot(returnFiber,oldFiber,step.value,lanes);if(newFiber===null){// TODO: This breaks on empty slots like null children. That's\n// unfortunate because it triggers the slow path all the time. We need\n// a better way to communicate whether this was a miss or null,\n// boolean, undefined, etc.\nif(oldFiber===null){oldFiber=nextOldFiber;}break;}if(shouldTrackSideEffects){if(oldFiber&&newFiber.alternate===null){// We matched the slot, but we didn't reuse the existing fiber, so we\n// need to delete the existing child.\ndeleteChild(returnFiber,oldFiber);}}lastPlacedIndex=placeChild(newFiber,lastPlacedIndex,newIdx);if(previousNewFiber===null){// TODO: Move out of the loop. This only happens for the first run.\nresultingFirstChild=newFiber;}else {// TODO: Defer siblings if we're not at the right index for this slot.\n// I.e. if we had null values before, then we want to defer this\n// for each null value. However, we also don't want to call updateSlot\n// with the previous one.\npreviousNewFiber.sibling=newFiber;}previousNewFiber=newFiber;oldFiber=nextOldFiber;}if(step.done){// We've reached the end of the new children. We can delete the rest.\ndeleteRemainingChildren(returnFiber,oldFiber);return resultingFirstChild;}if(oldFiber===null){// If we don't have any more existing children we can choose a fast path\n// since the rest will all be insertions.\nfor(;!step.done;newIdx++,step=newChildren.next()){var _newFiber3=createChild(returnFiber,step.value,lanes);if(_newFiber3===null){continue;}lastPlacedIndex=placeChild(_newFiber3,lastPlacedIndex,newIdx);if(previousNewFiber===null){// TODO: Move out of the loop. This only happens for the first run.\nresultingFirstChild=_newFiber3;}else {previousNewFiber.sibling=_newFiber3;}previousNewFiber=_newFiber3;}return resultingFirstChild;}// Add all children to a key map for quick lookups.\nvar existingChildren=mapRemainingChildren(returnFiber,oldFiber);// Keep scanning and use the map to restore deleted items as moves.\nfor(;!step.done;newIdx++,step=newChildren.next()){var _newFiber4=updateFromMap(existingChildren,returnFiber,newIdx,step.value,lanes);if(_newFiber4!==null){if(shouldTrackSideEffects){if(_newFiber4.alternate!==null){// The new fiber is a work in progress, but if there exists a\n// current, that means that we reused the fiber. We need to delete\n// it from the child list so that we don't add it to the deletion\n// list.\nexistingChildren.delete(_newFiber4.key===null?newIdx:_newFiber4.key);}}lastPlacedIndex=placeChild(_newFiber4,lastPlacedIndex,newIdx);if(previousNewFiber===null){resultingFirstChild=_newFiber4;}else {previousNewFiber.sibling=_newFiber4;}previousNewFiber=_newFiber4;}}if(shouldTrackSideEffects){// Any existing children that weren't consumed above were deleted. We need\n// to add them to the deletion list.\nexistingChildren.forEach(function(child){return deleteChild(returnFiber,child);});}return resultingFirstChild;}function reconcileSingleTextNode(returnFiber,currentFirstChild,textContent,lanes){// There's no need to check for keys on text nodes since we don't have a\n// way to define them.\nif(currentFirstChild!==null&&currentFirstChild.tag===HostText){// We already have an existing node so let's just update it and delete\n// the rest.\ndeleteRemainingChildren(returnFiber,currentFirstChild.sibling);var existing=useFiber(currentFirstChild,textContent);existing.return=returnFiber;return existing;}// The existing first child is not a text node so we need to create one\n// and delete the existing ones.\ndeleteRemainingChildren(returnFiber,currentFirstChild);var created=createFiberFromText(textContent,returnFiber.mode,lanes);created.return=returnFiber;return created;}function reconcileSingleElement(returnFiber,currentFirstChild,element,lanes){var key=element.key;var child=currentFirstChild;while(child!==null){// TODO: If key === null and child.key === null, then this only applies to\n// the first item in the list.\nif(child.key===key){switch(child.tag){case Fragment:{if(element.type===REACT_FRAGMENT_TYPE){deleteRemainingChildren(returnFiber,child.sibling);var existing=useFiber(child,element.props.children);existing.return=returnFiber;{existing._debugSource=element._source;existing._debugOwner=element._owner;}return existing;}break;}case Block:// We intentionally fallthrough here if enableBlocksAPI is not on.\n// eslint-disable-next-lined no-fallthrough\ndefault:{if(child.elementType===element.type||// Keep this check inline so it only runs on the false path:\nisCompatibleFamilyForHotReloading(child,element)){deleteRemainingChildren(returnFiber,child.sibling);var _existing3=useFiber(child,element.props);_existing3.ref=coerceRef(returnFiber,child,element);_existing3.return=returnFiber;{_existing3._debugSource=element._source;_existing3._debugOwner=element._owner;}return _existing3;}break;}}// Didn't match.\ndeleteRemainingChildren(returnFiber,child);break;}else {deleteChild(returnFiber,child);}child=child.sibling;}if(element.type===REACT_FRAGMENT_TYPE){var created=createFiberFromFragment(element.props.children,returnFiber.mode,lanes,element.key);created.return=returnFiber;return created;}else {var _created4=createFiberFromElement(element,returnFiber.mode,lanes);_created4.ref=coerceRef(returnFiber,currentFirstChild,element);_created4.return=returnFiber;return _created4;}}function reconcileSinglePortal(returnFiber,currentFirstChild,portal,lanes){var key=portal.key;var child=currentFirstChild;while(child!==null){// TODO: If key === null and child.key === null, then this only applies to\n// the first item in the list.\nif(child.key===key){if(child.tag===HostPortal&&child.stateNode.containerInfo===portal.containerInfo&&child.stateNode.implementation===portal.implementation){deleteRemainingChildren(returnFiber,child.sibling);var existing=useFiber(child,portal.children||[]);existing.return=returnFiber;return existing;}else {deleteRemainingChildren(returnFiber,child);break;}}else {deleteChild(returnFiber,child);}child=child.sibling;}var created=createFiberFromPortal(portal,returnFiber.mode,lanes);created.return=returnFiber;return created;}// This API will tag the children with the side-effect of the reconciliation\n// itself. They will be added to the side-effect list as we pass through the\n// children and the parent.\nfunction reconcileChildFibers(returnFiber,currentFirstChild,newChild,lanes){// This function is not recursive.\n// If the top level item is an array, we treat it as a set of children,\n// not as a fragment. Nested arrays on the other hand will be treated as\n// fragment nodes. Recursion happens at the normal flow.\n// Handle top level unkeyed fragments as if they were arrays.\n// This leads to an ambiguity between <>{[...]}</> and <>...</>.\n// We treat the ambiguous cases above the same.\nvar isUnkeyedTopLevelFragment=typeof newChild==='object'&&newChild!==null&&newChild.type===REACT_FRAGMENT_TYPE&&newChild.key===null;if(isUnkeyedTopLevelFragment){newChild=newChild.props.children;}// Handle object types\nvar isObject=typeof newChild==='object'&&newChild!==null;if(isObject){switch(newChild.$$typeof){case REACT_ELEMENT_TYPE:return placeSingleChild(reconcileSingleElement(returnFiber,currentFirstChild,newChild,lanes));case REACT_PORTAL_TYPE:return placeSingleChild(reconcileSinglePortal(returnFiber,currentFirstChild,newChild,lanes));}}if(typeof newChild==='string'||typeof newChild==='number'){return placeSingleChild(reconcileSingleTextNode(returnFiber,currentFirstChild,''+newChild,lanes));}if(isArray$1(newChild)){return reconcileChildrenArray(returnFiber,currentFirstChild,newChild,lanes);}if(getIteratorFn(newChild)){return reconcileChildrenIterator(returnFiber,currentFirstChild,newChild,lanes);}if(isObject){throwOnInvalidObjectType(returnFiber,newChild);}{if(typeof newChild==='function'){warnOnFunctionType(returnFiber);}}if(typeof newChild==='undefined'&&!isUnkeyedTopLevelFragment){// If the new child is undefined, and the return fiber is a composite\n// component, throw an error. If Fiber return types are disabled,\n// we already threw above.\nswitch(returnFiber.tag){case ClassComponent:{{var instance=returnFiber.stateNode;if(instance.render._isMockFunction){// We allow auto-mocks to proceed as if they're returning null.\nbreak;}}}// Intentionally fall through to the next case, which handles both\n// functions and classes\n// eslint-disable-next-lined no-fallthrough\ncase Block:case FunctionComponent:case ForwardRef:case SimpleMemoComponent:{{{throw Error((getComponentName(returnFiber.type)||'Component')+\"(...): Nothing was returned from render. This usually means a return statement is missing. Or, to render nothing, return null.\");}}}}}// Remaining cases are all treated as empty.\nreturn deleteRemainingChildren(returnFiber,currentFirstChild);}return reconcileChildFibers;}", "function ChildReconciler(shouldTrackSideEffects){function deleteChild(returnFiber,childToDelete){if(!shouldTrackSideEffects){// Noop.\nreturn;}// Deletions are added in reversed order so we add it to the front.\n// At this point, the return fiber's effect list is empty except for\n// deletions, so we can just append the deletion to the list. The remaining\n// effects aren't added until the complete phase. Once we implement\n// resuming, this may not be true.\nvar last=returnFiber.lastEffect;if(last!==null){last.nextEffect=childToDelete;returnFiber.lastEffect=childToDelete;}else{returnFiber.firstEffect=returnFiber.lastEffect=childToDelete;}childToDelete.nextEffect=null;childToDelete.effectTag=Deletion;}function deleteRemainingChildren(returnFiber,currentFirstChild){if(!shouldTrackSideEffects){// Noop.\nreturn null;}// TODO: For the shouldClone case, this could be micro-optimized a bit by\n// assuming that after the first child we've already added everything.\nvar childToDelete=currentFirstChild;while(childToDelete!==null){deleteChild(returnFiber,childToDelete);childToDelete=childToDelete.sibling;}return null;}function mapRemainingChildren(returnFiber,currentFirstChild){// Add the remaining children to a temporary map so that we can find them by\n// keys quickly. Implicit (null) keys get added to this set with their index\n// instead.\nvar existingChildren=new Map();var existingChild=currentFirstChild;while(existingChild!==null){if(existingChild.key!==null){existingChildren.set(existingChild.key,existingChild);}else{existingChildren.set(existingChild.index,existingChild);}existingChild=existingChild.sibling;}return existingChildren;}function useFiber(fiber,pendingProps){// We currently set sibling to null and index to 0 here because it is easy\n// to forget to do before returning it. E.g. for the single child case.\nvar clone=createWorkInProgress(fiber,pendingProps);clone.index=0;clone.sibling=null;return clone;}function placeChild(newFiber,lastPlacedIndex,newIndex){newFiber.index=newIndex;if(!shouldTrackSideEffects){// Noop.\nreturn lastPlacedIndex;}var current=newFiber.alternate;if(current!==null){var oldIndex=current.index;if(oldIndex<lastPlacedIndex){// This is a move.\nnewFiber.effectTag=Placement;return lastPlacedIndex;}else{// This item can stay in place.\nreturn oldIndex;}}else{// This is an insertion.\nnewFiber.effectTag=Placement;return lastPlacedIndex;}}function placeSingleChild(newFiber){// This is simpler for the single child case. We only need to do a\n// placement for inserting new children.\nif(shouldTrackSideEffects&&newFiber.alternate===null){newFiber.effectTag=Placement;}return newFiber;}function updateTextNode(returnFiber,current,textContent,expirationTime){if(current===null||current.tag!==HostText){// Insert\nvar created=createFiberFromText(textContent,returnFiber.mode,expirationTime);created[\"return\"]=returnFiber;return created;}else{// Update\nvar existing=useFiber(current,textContent);existing[\"return\"]=returnFiber;return existing;}}function updateElement(returnFiber,current,element,expirationTime){if(current!==null){if(current.elementType===element.type||// Keep this check inline so it only runs on the false path:\nisCompatibleFamilyForHotReloading(current,element)){// Move based on index\nvar existing=useFiber(current,element.props);existing.ref=coerceRef(returnFiber,current,element);existing[\"return\"]=returnFiber;{existing._debugSource=element._source;existing._debugOwner=element._owner;}return existing;}}// Insert\nvar created=createFiberFromElement(element,returnFiber.mode,expirationTime);created.ref=coerceRef(returnFiber,current,element);created[\"return\"]=returnFiber;return created;}function updatePortal(returnFiber,current,portal,expirationTime){if(current===null||current.tag!==HostPortal||current.stateNode.containerInfo!==portal.containerInfo||current.stateNode.implementation!==portal.implementation){// Insert\nvar created=createFiberFromPortal(portal,returnFiber.mode,expirationTime);created[\"return\"]=returnFiber;return created;}else{// Update\nvar existing=useFiber(current,portal.children||[]);existing[\"return\"]=returnFiber;return existing;}}function updateFragment(returnFiber,current,fragment,expirationTime,key){if(current===null||current.tag!==Fragment){// Insert\nvar created=createFiberFromFragment(fragment,returnFiber.mode,expirationTime,key);created[\"return\"]=returnFiber;return created;}else{// Update\nvar existing=useFiber(current,fragment);existing[\"return\"]=returnFiber;return existing;}}function createChild(returnFiber,newChild,expirationTime){if(typeof newChild==='string'||typeof newChild==='number'){// Text nodes don't have keys. If the previous node is implicitly keyed\n// we can continue to replace it without aborting even if it is not a text\n// node.\nvar created=createFiberFromText(''+newChild,returnFiber.mode,expirationTime);created[\"return\"]=returnFiber;return created;}if(_typeof(newChild)==='object'&&newChild!==null){switch(newChild.$$typeof){case REACT_ELEMENT_TYPE:{var _created=createFiberFromElement(newChild,returnFiber.mode,expirationTime);_created.ref=coerceRef(returnFiber,null,newChild);_created[\"return\"]=returnFiber;return _created;}case REACT_PORTAL_TYPE:{var _created2=createFiberFromPortal(newChild,returnFiber.mode,expirationTime);_created2[\"return\"]=returnFiber;return _created2;}}if(isArray$1(newChild)||getIteratorFn(newChild)){var _created3=createFiberFromFragment(newChild,returnFiber.mode,expirationTime,null);_created3[\"return\"]=returnFiber;return _created3;}throwOnInvalidObjectType(returnFiber,newChild);}{if(typeof newChild==='function'){warnOnFunctionType();}}return null;}function updateSlot(returnFiber,oldFiber,newChild,expirationTime){// Update the fiber if the keys match, otherwise return null.\nvar key=oldFiber!==null?oldFiber.key:null;if(typeof newChild==='string'||typeof newChild==='number'){// Text nodes don't have keys. If the previous node is implicitly keyed\n// we can continue to replace it without aborting even if it is not a text\n// node.\nif(key!==null){return null;}return updateTextNode(returnFiber,oldFiber,''+newChild,expirationTime);}if(_typeof(newChild)==='object'&&newChild!==null){switch(newChild.$$typeof){case REACT_ELEMENT_TYPE:{if(newChild.key===key){if(newChild.type===REACT_FRAGMENT_TYPE){return updateFragment(returnFiber,oldFiber,newChild.props.children,expirationTime,key);}return updateElement(returnFiber,oldFiber,newChild,expirationTime);}else{return null;}}case REACT_PORTAL_TYPE:{if(newChild.key===key){return updatePortal(returnFiber,oldFiber,newChild,expirationTime);}else{return null;}}}if(isArray$1(newChild)||getIteratorFn(newChild)){if(key!==null){return null;}return updateFragment(returnFiber,oldFiber,newChild,expirationTime,null);}throwOnInvalidObjectType(returnFiber,newChild);}{if(typeof newChild==='function'){warnOnFunctionType();}}return null;}function updateFromMap(existingChildren,returnFiber,newIdx,newChild,expirationTime){if(typeof newChild==='string'||typeof newChild==='number'){// Text nodes don't have keys, so we neither have to check the old nor\n// new node for the key. If both are text nodes, they match.\nvar matchedFiber=existingChildren.get(newIdx)||null;return updateTextNode(returnFiber,matchedFiber,''+newChild,expirationTime);}if(_typeof(newChild)==='object'&&newChild!==null){switch(newChild.$$typeof){case REACT_ELEMENT_TYPE:{var _matchedFiber=existingChildren.get(newChild.key===null?newIdx:newChild.key)||null;if(newChild.type===REACT_FRAGMENT_TYPE){return updateFragment(returnFiber,_matchedFiber,newChild.props.children,expirationTime,newChild.key);}return updateElement(returnFiber,_matchedFiber,newChild,expirationTime);}case REACT_PORTAL_TYPE:{var _matchedFiber2=existingChildren.get(newChild.key===null?newIdx:newChild.key)||null;return updatePortal(returnFiber,_matchedFiber2,newChild,expirationTime);}}if(isArray$1(newChild)||getIteratorFn(newChild)){var _matchedFiber3=existingChildren.get(newIdx)||null;return updateFragment(returnFiber,_matchedFiber3,newChild,expirationTime,null);}throwOnInvalidObjectType(returnFiber,newChild);}{if(typeof newChild==='function'){warnOnFunctionType();}}return null;}/**\n * Warns if there is a duplicate or missing key\n */function warnOnInvalidKey(child,knownKeys){{if(_typeof(child)!=='object'||child===null){return knownKeys;}switch(child.$$typeof){case REACT_ELEMENT_TYPE:case REACT_PORTAL_TYPE:warnForMissingKey(child);var key=child.key;if(typeof key!=='string'){break;}if(knownKeys===null){knownKeys=new Set();knownKeys.add(key);break;}if(!knownKeys.has(key)){knownKeys.add(key);break;}error('Encountered two children with the same key, `%s`. '+'Keys should be unique so that components maintain their identity '+'across updates. Non-unique keys may cause children to be '+'duplicated and/or omitted — the behavior is unsupported and '+'could change in a future version.',key);break;}}return knownKeys;}function reconcileChildrenArray(returnFiber,currentFirstChild,newChildren,expirationTime){// This algorithm can't optimize by searching from both ends since we\n// don't have backpointers on fibers. I'm trying to see how far we can get\n// with that model. If it ends up not being worth the tradeoffs, we can\n// add it later.\n// Even with a two ended optimization, we'd want to optimize for the case\n// where there are few changes and brute force the comparison instead of\n// going for the Map. It'd like to explore hitting that path first in\n// forward-only mode and only go for the Map once we notice that we need\n// lots of look ahead. This doesn't handle reversal as well as two ended\n// search but that's unusual. Besides, for the two ended optimization to\n// work on Iterables, we'd need to copy the whole set.\n// In this first iteration, we'll just live with hitting the bad case\n// (adding everything to a Map) in for every insert/move.\n// If you change this code, also update reconcileChildrenIterator() which\n// uses the same algorithm.\n{// First, validate keys.\nvar knownKeys=null;for(var i=0;i<newChildren.length;i++){var child=newChildren[i];knownKeys=warnOnInvalidKey(child,knownKeys);}}var resultingFirstChild=null;var previousNewFiber=null;var oldFiber=currentFirstChild;var lastPlacedIndex=0;var newIdx=0;var nextOldFiber=null;for(;oldFiber!==null&&newIdx<newChildren.length;newIdx++){if(oldFiber.index>newIdx){nextOldFiber=oldFiber;oldFiber=null;}else{nextOldFiber=oldFiber.sibling;}var newFiber=updateSlot(returnFiber,oldFiber,newChildren[newIdx],expirationTime);if(newFiber===null){// TODO: This breaks on empty slots like null children. That's\n// unfortunate because it triggers the slow path all the time. We need\n// a better way to communicate whether this was a miss or null,\n// boolean, undefined, etc.\nif(oldFiber===null){oldFiber=nextOldFiber;}break;}if(shouldTrackSideEffects){if(oldFiber&&newFiber.alternate===null){// We matched the slot, but we didn't reuse the existing fiber, so we\n// need to delete the existing child.\ndeleteChild(returnFiber,oldFiber);}}lastPlacedIndex=placeChild(newFiber,lastPlacedIndex,newIdx);if(previousNewFiber===null){// TODO: Move out of the loop. This only happens for the first run.\nresultingFirstChild=newFiber;}else{// TODO: Defer siblings if we're not at the right index for this slot.\n// I.e. if we had null values before, then we want to defer this\n// for each null value. However, we also don't want to call updateSlot\n// with the previous one.\npreviousNewFiber.sibling=newFiber;}previousNewFiber=newFiber;oldFiber=nextOldFiber;}if(newIdx===newChildren.length){// We've reached the end of the new children. We can delete the rest.\ndeleteRemainingChildren(returnFiber,oldFiber);return resultingFirstChild;}if(oldFiber===null){// If we don't have any more existing children we can choose a fast path\n// since the rest will all be insertions.\nfor(;newIdx<newChildren.length;newIdx++){var _newFiber=createChild(returnFiber,newChildren[newIdx],expirationTime);if(_newFiber===null){continue;}lastPlacedIndex=placeChild(_newFiber,lastPlacedIndex,newIdx);if(previousNewFiber===null){// TODO: Move out of the loop. This only happens for the first run.\nresultingFirstChild=_newFiber;}else{previousNewFiber.sibling=_newFiber;}previousNewFiber=_newFiber;}return resultingFirstChild;}// Add all children to a key map for quick lookups.\nvar existingChildren=mapRemainingChildren(returnFiber,oldFiber);// Keep scanning and use the map to restore deleted items as moves.\nfor(;newIdx<newChildren.length;newIdx++){var _newFiber2=updateFromMap(existingChildren,returnFiber,newIdx,newChildren[newIdx],expirationTime);if(_newFiber2!==null){if(shouldTrackSideEffects){if(_newFiber2.alternate!==null){// The new fiber is a work in progress, but if there exists a\n// current, that means that we reused the fiber. We need to delete\n// it from the child list so that we don't add it to the deletion\n// list.\nexistingChildren[\"delete\"](_newFiber2.key===null?newIdx:_newFiber2.key);}}lastPlacedIndex=placeChild(_newFiber2,lastPlacedIndex,newIdx);if(previousNewFiber===null){resultingFirstChild=_newFiber2;}else{previousNewFiber.sibling=_newFiber2;}previousNewFiber=_newFiber2;}}if(shouldTrackSideEffects){// Any existing children that weren't consumed above were deleted. We need\n// to add them to the deletion list.\nexistingChildren.forEach(function(child){return deleteChild(returnFiber,child);});}return resultingFirstChild;}function reconcileChildrenIterator(returnFiber,currentFirstChild,newChildrenIterable,expirationTime){// This is the same implementation as reconcileChildrenArray(),\n// but using the iterator instead.\nvar iteratorFn=getIteratorFn(newChildrenIterable);if(!(typeof iteratorFn==='function')){{throw Error(\"An object is not an iterable. This error is likely caused by a bug in React. Please file an issue.\");}}{// We don't support rendering Generators because it's a mutation.\n// See https://github.com/facebook/react/issues/12995\nif(typeof Symbol==='function'&&// $FlowFixMe Flow doesn't know about toStringTag\nnewChildrenIterable[Symbol.toStringTag]==='Generator'){if(!didWarnAboutGenerators){error('Using Generators as children is unsupported and will likely yield '+'unexpected results because enumerating a generator mutates it. '+'You may convert it to an array with `Array.from()` or the '+'`[...spread]` operator before rendering. Keep in mind '+'you might need to polyfill these features for older browsers.');}didWarnAboutGenerators=true;}// Warn about using Maps as children\nif(newChildrenIterable.entries===iteratorFn){if(!didWarnAboutMaps){error('Using Maps as children is unsupported and will likely yield '+'unexpected results. Convert it to a sequence/iterable of keyed '+'ReactElements instead.');}didWarnAboutMaps=true;}// First, validate keys.\n// We'll get a different iterator later for the main pass.\nvar _newChildren=iteratorFn.call(newChildrenIterable);if(_newChildren){var knownKeys=null;var _step=_newChildren.next();for(;!_step.done;_step=_newChildren.next()){var child=_step.value;knownKeys=warnOnInvalidKey(child,knownKeys);}}}var newChildren=iteratorFn.call(newChildrenIterable);if(!(newChildren!=null)){{throw Error(\"An iterable object provided no iterator.\");}}var resultingFirstChild=null;var previousNewFiber=null;var oldFiber=currentFirstChild;var lastPlacedIndex=0;var newIdx=0;var nextOldFiber=null;var step=newChildren.next();for(;oldFiber!==null&&!step.done;newIdx++,step=newChildren.next()){if(oldFiber.index>newIdx){nextOldFiber=oldFiber;oldFiber=null;}else{nextOldFiber=oldFiber.sibling;}var newFiber=updateSlot(returnFiber,oldFiber,step.value,expirationTime);if(newFiber===null){// TODO: This breaks on empty slots like null children. That's\n// unfortunate because it triggers the slow path all the time. We need\n// a better way to communicate whether this was a miss or null,\n// boolean, undefined, etc.\nif(oldFiber===null){oldFiber=nextOldFiber;}break;}if(shouldTrackSideEffects){if(oldFiber&&newFiber.alternate===null){// We matched the slot, but we didn't reuse the existing fiber, so we\n// need to delete the existing child.\ndeleteChild(returnFiber,oldFiber);}}lastPlacedIndex=placeChild(newFiber,lastPlacedIndex,newIdx);if(previousNewFiber===null){// TODO: Move out of the loop. This only happens for the first run.\nresultingFirstChild=newFiber;}else{// TODO: Defer siblings if we're not at the right index for this slot.\n// I.e. if we had null values before, then we want to defer this\n// for each null value. However, we also don't want to call updateSlot\n// with the previous one.\npreviousNewFiber.sibling=newFiber;}previousNewFiber=newFiber;oldFiber=nextOldFiber;}if(step.done){// We've reached the end of the new children. We can delete the rest.\ndeleteRemainingChildren(returnFiber,oldFiber);return resultingFirstChild;}if(oldFiber===null){// If we don't have any more existing children we can choose a fast path\n// since the rest will all be insertions.\nfor(;!step.done;newIdx++,step=newChildren.next()){var _newFiber3=createChild(returnFiber,step.value,expirationTime);if(_newFiber3===null){continue;}lastPlacedIndex=placeChild(_newFiber3,lastPlacedIndex,newIdx);if(previousNewFiber===null){// TODO: Move out of the loop. This only happens for the first run.\nresultingFirstChild=_newFiber3;}else{previousNewFiber.sibling=_newFiber3;}previousNewFiber=_newFiber3;}return resultingFirstChild;}// Add all children to a key map for quick lookups.\nvar existingChildren=mapRemainingChildren(returnFiber,oldFiber);// Keep scanning and use the map to restore deleted items as moves.\nfor(;!step.done;newIdx++,step=newChildren.next()){var _newFiber4=updateFromMap(existingChildren,returnFiber,newIdx,step.value,expirationTime);if(_newFiber4!==null){if(shouldTrackSideEffects){if(_newFiber4.alternate!==null){// The new fiber is a work in progress, but if there exists a\n// current, that means that we reused the fiber. We need to delete\n// it from the child list so that we don't add it to the deletion\n// list.\nexistingChildren[\"delete\"](_newFiber4.key===null?newIdx:_newFiber4.key);}}lastPlacedIndex=placeChild(_newFiber4,lastPlacedIndex,newIdx);if(previousNewFiber===null){resultingFirstChild=_newFiber4;}else{previousNewFiber.sibling=_newFiber4;}previousNewFiber=_newFiber4;}}if(shouldTrackSideEffects){// Any existing children that weren't consumed above were deleted. We need\n// to add them to the deletion list.\nexistingChildren.forEach(function(child){return deleteChild(returnFiber,child);});}return resultingFirstChild;}function reconcileSingleTextNode(returnFiber,currentFirstChild,textContent,expirationTime){// There's no need to check for keys on text nodes since we don't have a\n// way to define them.\nif(currentFirstChild!==null&&currentFirstChild.tag===HostText){// We already have an existing node so let's just update it and delete\n// the rest.\ndeleteRemainingChildren(returnFiber,currentFirstChild.sibling);var existing=useFiber(currentFirstChild,textContent);existing[\"return\"]=returnFiber;return existing;}// The existing first child is not a text node so we need to create one\n// and delete the existing ones.\ndeleteRemainingChildren(returnFiber,currentFirstChild);var created=createFiberFromText(textContent,returnFiber.mode,expirationTime);created[\"return\"]=returnFiber;return created;}function reconcileSingleElement(returnFiber,currentFirstChild,element,expirationTime){var key=element.key;var child=currentFirstChild;while(child!==null){// TODO: If key === null and child.key === null, then this only applies to\n// the first item in the list.\nif(child.key===key){switch(child.tag){case Fragment:{if(element.type===REACT_FRAGMENT_TYPE){deleteRemainingChildren(returnFiber,child.sibling);var existing=useFiber(child,element.props.children);existing[\"return\"]=returnFiber;{existing._debugSource=element._source;existing._debugOwner=element._owner;}return existing;}break;}case Block:// We intentionally fallthrough here if enableBlocksAPI is not on.\n// eslint-disable-next-lined no-fallthrough\ndefault:{if(child.elementType===element.type||// Keep this check inline so it only runs on the false path:\nisCompatibleFamilyForHotReloading(child,element)){deleteRemainingChildren(returnFiber,child.sibling);var _existing3=useFiber(child,element.props);_existing3.ref=coerceRef(returnFiber,child,element);_existing3[\"return\"]=returnFiber;{_existing3._debugSource=element._source;_existing3._debugOwner=element._owner;}return _existing3;}break;}}// Didn't match.\ndeleteRemainingChildren(returnFiber,child);break;}else{deleteChild(returnFiber,child);}child=child.sibling;}if(element.type===REACT_FRAGMENT_TYPE){var created=createFiberFromFragment(element.props.children,returnFiber.mode,expirationTime,element.key);created[\"return\"]=returnFiber;return created;}else{var _created4=createFiberFromElement(element,returnFiber.mode,expirationTime);_created4.ref=coerceRef(returnFiber,currentFirstChild,element);_created4[\"return\"]=returnFiber;return _created4;}}function reconcileSinglePortal(returnFiber,currentFirstChild,portal,expirationTime){var key=portal.key;var child=currentFirstChild;while(child!==null){// TODO: If key === null and child.key === null, then this only applies to\n// the first item in the list.\nif(child.key===key){if(child.tag===HostPortal&&child.stateNode.containerInfo===portal.containerInfo&&child.stateNode.implementation===portal.implementation){deleteRemainingChildren(returnFiber,child.sibling);var existing=useFiber(child,portal.children||[]);existing[\"return\"]=returnFiber;return existing;}else{deleteRemainingChildren(returnFiber,child);break;}}else{deleteChild(returnFiber,child);}child=child.sibling;}var created=createFiberFromPortal(portal,returnFiber.mode,expirationTime);created[\"return\"]=returnFiber;return created;}// This API will tag the children with the side-effect of the reconciliation\n// itself. They will be added to the side-effect list as we pass through the\n// children and the parent.\nfunction reconcileChildFibers(returnFiber,currentFirstChild,newChild,expirationTime){// This function is not recursive.\n// If the top level item is an array, we treat it as a set of children,\n// not as a fragment. Nested arrays on the other hand will be treated as\n// fragment nodes. Recursion happens at the normal flow.\n// Handle top level unkeyed fragments as if they were arrays.\n// This leads to an ambiguity between <>{[...]}</> and <>...</>.\n// We treat the ambiguous cases above the same.\nvar isUnkeyedTopLevelFragment=_typeof(newChild)==='object'&&newChild!==null&&newChild.type===REACT_FRAGMENT_TYPE&&newChild.key===null;if(isUnkeyedTopLevelFragment){newChild=newChild.props.children;}// Handle object types\nvar isObject=_typeof(newChild)==='object'&&newChild!==null;if(isObject){switch(newChild.$$typeof){case REACT_ELEMENT_TYPE:return placeSingleChild(reconcileSingleElement(returnFiber,currentFirstChild,newChild,expirationTime));case REACT_PORTAL_TYPE:return placeSingleChild(reconcileSinglePortal(returnFiber,currentFirstChild,newChild,expirationTime));}}if(typeof newChild==='string'||typeof newChild==='number'){return placeSingleChild(reconcileSingleTextNode(returnFiber,currentFirstChild,''+newChild,expirationTime));}if(isArray$1(newChild)){return reconcileChildrenArray(returnFiber,currentFirstChild,newChild,expirationTime);}if(getIteratorFn(newChild)){return reconcileChildrenIterator(returnFiber,currentFirstChild,newChild,expirationTime);}if(isObject){throwOnInvalidObjectType(returnFiber,newChild);}{if(typeof newChild==='function'){warnOnFunctionType();}}if(typeof newChild==='undefined'&&!isUnkeyedTopLevelFragment){// If the new child is undefined, and the return fiber is a composite\n// component, throw an error. If Fiber return types are disabled,\n// we already threw above.\nswitch(returnFiber.tag){case ClassComponent:{{var instance=returnFiber.stateNode;if(instance.render._isMockFunction){// We allow auto-mocks to proceed as if they're returning null.\nbreak;}}}// Intentionally fall through to the next case, which handles both\n// functions and classes\n// eslint-disable-next-lined no-fallthrough\ncase FunctionComponent:{var Component=returnFiber.type;{{throw Error((Component.displayName||Component.name||'Component')+\"(...): Nothing was returned from render. This usually means a return statement is missing. Or, to render nothing, return null.\");}}}}}// Remaining cases are all treated as empty.\nreturn deleteRemainingChildren(returnFiber,currentFirstChild);}return reconcileChildFibers;}", "function ChildReconciler(shouldTrackSideEffects){function deleteChild(returnFiber,childToDelete){if(!shouldTrackSideEffects){// Noop.\nreturn;}// Deletions are added in reversed order so we add it to the front.\n// At this point, the return fiber's effect list is empty except for\n// deletions, so we can just append the deletion to the list. The remaining\n// effects aren't added until the complete phase. Once we implement\n// resuming, this may not be true.\nvar last=returnFiber.lastEffect;if(last!==null){last.nextEffect=childToDelete;returnFiber.lastEffect=childToDelete;}else{returnFiber.firstEffect=returnFiber.lastEffect=childToDelete;}childToDelete.nextEffect=null;childToDelete.effectTag=Deletion;}function deleteRemainingChildren(returnFiber,currentFirstChild){if(!shouldTrackSideEffects){// Noop.\nreturn null;}// TODO: For the shouldClone case, this could be micro-optimized a bit by\n// assuming that after the first child we've already added everything.\nvar childToDelete=currentFirstChild;while(childToDelete!==null){deleteChild(returnFiber,childToDelete);childToDelete=childToDelete.sibling;}return null;}function mapRemainingChildren(returnFiber,currentFirstChild){// Add the remaining children to a temporary map so that we can find them by\n// keys quickly. Implicit (null) keys get added to this set with their index\n// instead.\nvar existingChildren=new Map();var existingChild=currentFirstChild;while(existingChild!==null){if(existingChild.key!==null){existingChildren.set(existingChild.key,existingChild);}else{existingChildren.set(existingChild.index,existingChild);}existingChild=existingChild.sibling;}return existingChildren;}function useFiber(fiber,pendingProps){// We currently set sibling to null and index to 0 here because it is easy\n// to forget to do before returning it. E.g. for the single child case.\nvar clone=createWorkInProgress(fiber,pendingProps);clone.index=0;clone.sibling=null;return clone;}function placeChild(newFiber,lastPlacedIndex,newIndex){newFiber.index=newIndex;if(!shouldTrackSideEffects){// Noop.\nreturn lastPlacedIndex;}var current=newFiber.alternate;if(current!==null){var oldIndex=current.index;if(oldIndex<lastPlacedIndex){// This is a move.\nnewFiber.effectTag=Placement;return lastPlacedIndex;}else{// This item can stay in place.\nreturn oldIndex;}}else{// This is an insertion.\nnewFiber.effectTag=Placement;return lastPlacedIndex;}}function placeSingleChild(newFiber){// This is simpler for the single child case. We only need to do a\n// placement for inserting new children.\nif(shouldTrackSideEffects&&newFiber.alternate===null){newFiber.effectTag=Placement;}return newFiber;}function updateTextNode(returnFiber,current,textContent,expirationTime){if(current===null||current.tag!==HostText){// Insert\nvar created=createFiberFromText(textContent,returnFiber.mode,expirationTime);created.return=returnFiber;return created;}else{// Update\nvar existing=useFiber(current,textContent);existing.return=returnFiber;return existing;}}function updateElement(returnFiber,current,element,expirationTime){if(current!==null){if(current.elementType===element.type||// Keep this check inline so it only runs on the false path:\nisCompatibleFamilyForHotReloading(current,element)){// Move based on index\nvar existing=useFiber(current,element.props);existing.ref=coerceRef(returnFiber,current,element);existing.return=returnFiber;{existing._debugSource=element._source;existing._debugOwner=element._owner;}return existing;}}// Insert\nvar created=createFiberFromElement(element,returnFiber.mode,expirationTime);created.ref=coerceRef(returnFiber,current,element);created.return=returnFiber;return created;}function updatePortal(returnFiber,current,portal,expirationTime){if(current===null||current.tag!==HostPortal||current.stateNode.containerInfo!==portal.containerInfo||current.stateNode.implementation!==portal.implementation){// Insert\nvar created=createFiberFromPortal(portal,returnFiber.mode,expirationTime);created.return=returnFiber;return created;}else{// Update\nvar existing=useFiber(current,portal.children||[]);existing.return=returnFiber;return existing;}}function updateFragment(returnFiber,current,fragment,expirationTime,key){if(current===null||current.tag!==Fragment){// Insert\nvar created=createFiberFromFragment(fragment,returnFiber.mode,expirationTime,key);created.return=returnFiber;return created;}else{// Update\nvar existing=useFiber(current,fragment);existing.return=returnFiber;return existing;}}function createChild(returnFiber,newChild,expirationTime){if(typeof newChild==='string'||typeof newChild==='number'){// Text nodes don't have keys. If the previous node is implicitly keyed\n// we can continue to replace it without aborting even if it is not a text\n// node.\nvar created=createFiberFromText(''+newChild,returnFiber.mode,expirationTime);created.return=returnFiber;return created;}if(typeof newChild==='object'&&newChild!==null){switch(newChild.$$typeof){case REACT_ELEMENT_TYPE:{var _created=createFiberFromElement(newChild,returnFiber.mode,expirationTime);_created.ref=coerceRef(returnFiber,null,newChild);_created.return=returnFiber;return _created;}case REACT_PORTAL_TYPE:{var _created2=createFiberFromPortal(newChild,returnFiber.mode,expirationTime);_created2.return=returnFiber;return _created2;}}if(isArray$1(newChild)||getIteratorFn(newChild)){var _created3=createFiberFromFragment(newChild,returnFiber.mode,expirationTime,null);_created3.return=returnFiber;return _created3;}throwOnInvalidObjectType(returnFiber,newChild);}{if(typeof newChild==='function'){warnOnFunctionType();}}return null;}function updateSlot(returnFiber,oldFiber,newChild,expirationTime){// Update the fiber if the keys match, otherwise return null.\nvar key=oldFiber!==null?oldFiber.key:null;if(typeof newChild==='string'||typeof newChild==='number'){// Text nodes don't have keys. If the previous node is implicitly keyed\n// we can continue to replace it without aborting even if it is not a text\n// node.\nif(key!==null){return null;}return updateTextNode(returnFiber,oldFiber,''+newChild,expirationTime);}if(typeof newChild==='object'&&newChild!==null){switch(newChild.$$typeof){case REACT_ELEMENT_TYPE:{if(newChild.key===key){if(newChild.type===REACT_FRAGMENT_TYPE){return updateFragment(returnFiber,oldFiber,newChild.props.children,expirationTime,key);}return updateElement(returnFiber,oldFiber,newChild,expirationTime);}else{return null;}}case REACT_PORTAL_TYPE:{if(newChild.key===key){return updatePortal(returnFiber,oldFiber,newChild,expirationTime);}else{return null;}}}if(isArray$1(newChild)||getIteratorFn(newChild)){if(key!==null){return null;}return updateFragment(returnFiber,oldFiber,newChild,expirationTime,null);}throwOnInvalidObjectType(returnFiber,newChild);}{if(typeof newChild==='function'){warnOnFunctionType();}}return null;}function updateFromMap(existingChildren,returnFiber,newIdx,newChild,expirationTime){if(typeof newChild==='string'||typeof newChild==='number'){// Text nodes don't have keys, so we neither have to check the old nor\n// new node for the key. If both are text nodes, they match.\nvar matchedFiber=existingChildren.get(newIdx)||null;return updateTextNode(returnFiber,matchedFiber,''+newChild,expirationTime);}if(typeof newChild==='object'&&newChild!==null){switch(newChild.$$typeof){case REACT_ELEMENT_TYPE:{var _matchedFiber=existingChildren.get(newChild.key===null?newIdx:newChild.key)||null;if(newChild.type===REACT_FRAGMENT_TYPE){return updateFragment(returnFiber,_matchedFiber,newChild.props.children,expirationTime,newChild.key);}return updateElement(returnFiber,_matchedFiber,newChild,expirationTime);}case REACT_PORTAL_TYPE:{var _matchedFiber2=existingChildren.get(newChild.key===null?newIdx:newChild.key)||null;return updatePortal(returnFiber,_matchedFiber2,newChild,expirationTime);}}if(isArray$1(newChild)||getIteratorFn(newChild)){var _matchedFiber3=existingChildren.get(newIdx)||null;return updateFragment(returnFiber,_matchedFiber3,newChild,expirationTime,null);}throwOnInvalidObjectType(returnFiber,newChild);}{if(typeof newChild==='function'){warnOnFunctionType();}}return null;}/**\n * Warns if there is a duplicate or missing key\n */function warnOnInvalidKey(child,knownKeys){{if(typeof child!=='object'||child===null){return knownKeys;}switch(child.$$typeof){case REACT_ELEMENT_TYPE:case REACT_PORTAL_TYPE:warnForMissingKey(child);var key=child.key;if(typeof key!=='string'){break;}if(knownKeys===null){knownKeys=new Set();knownKeys.add(key);break;}if(!knownKeys.has(key)){knownKeys.add(key);break;}error('Encountered two children with the same key, `%s`. '+'Keys should be unique so that components maintain their identity '+'across updates. Non-unique keys may cause children to be '+'duplicated and/or omitted — the behavior is unsupported and '+'could change in a future version.',key);break;}}return knownKeys;}function reconcileChildrenArray(returnFiber,currentFirstChild,newChildren,expirationTime){// This algorithm can't optimize by searching from both ends since we\n// don't have backpointers on fibers. I'm trying to see how far we can get\n// with that model. If it ends up not being worth the tradeoffs, we can\n// add it later.\n// Even with a two ended optimization, we'd want to optimize for the case\n// where there are few changes and brute force the comparison instead of\n// going for the Map. It'd like to explore hitting that path first in\n// forward-only mode and only go for the Map once we notice that we need\n// lots of look ahead. This doesn't handle reversal as well as two ended\n// search but that's unusual. Besides, for the two ended optimization to\n// work on Iterables, we'd need to copy the whole set.\n// In this first iteration, we'll just live with hitting the bad case\n// (adding everything to a Map) in for every insert/move.\n// If you change this code, also update reconcileChildrenIterator() which\n// uses the same algorithm.\n{// First, validate keys.\nvar knownKeys=null;for(var i=0;i<newChildren.length;i++){var child=newChildren[i];knownKeys=warnOnInvalidKey(child,knownKeys);}}var resultingFirstChild=null;var previousNewFiber=null;var oldFiber=currentFirstChild;var lastPlacedIndex=0;var newIdx=0;var nextOldFiber=null;for(;oldFiber!==null&&newIdx<newChildren.length;newIdx++){if(oldFiber.index>newIdx){nextOldFiber=oldFiber;oldFiber=null;}else{nextOldFiber=oldFiber.sibling;}var newFiber=updateSlot(returnFiber,oldFiber,newChildren[newIdx],expirationTime);if(newFiber===null){// TODO: This breaks on empty slots like null children. That's\n// unfortunate because it triggers the slow path all the time. We need\n// a better way to communicate whether this was a miss or null,\n// boolean, undefined, etc.\nif(oldFiber===null){oldFiber=nextOldFiber;}break;}if(shouldTrackSideEffects){if(oldFiber&&newFiber.alternate===null){// We matched the slot, but we didn't reuse the existing fiber, so we\n// need to delete the existing child.\ndeleteChild(returnFiber,oldFiber);}}lastPlacedIndex=placeChild(newFiber,lastPlacedIndex,newIdx);if(previousNewFiber===null){// TODO: Move out of the loop. This only happens for the first run.\nresultingFirstChild=newFiber;}else{// TODO: Defer siblings if we're not at the right index for this slot.\n// I.e. if we had null values before, then we want to defer this\n// for each null value. However, we also don't want to call updateSlot\n// with the previous one.\npreviousNewFiber.sibling=newFiber;}previousNewFiber=newFiber;oldFiber=nextOldFiber;}if(newIdx===newChildren.length){// We've reached the end of the new children. We can delete the rest.\ndeleteRemainingChildren(returnFiber,oldFiber);return resultingFirstChild;}if(oldFiber===null){// If we don't have any more existing children we can choose a fast path\n// since the rest will all be insertions.\nfor(;newIdx<newChildren.length;newIdx++){var _newFiber=createChild(returnFiber,newChildren[newIdx],expirationTime);if(_newFiber===null){continue;}lastPlacedIndex=placeChild(_newFiber,lastPlacedIndex,newIdx);if(previousNewFiber===null){// TODO: Move out of the loop. This only happens for the first run.\nresultingFirstChild=_newFiber;}else{previousNewFiber.sibling=_newFiber;}previousNewFiber=_newFiber;}return resultingFirstChild;}// Add all children to a key map for quick lookups.\nvar existingChildren=mapRemainingChildren(returnFiber,oldFiber);// Keep scanning and use the map to restore deleted items as moves.\nfor(;newIdx<newChildren.length;newIdx++){var _newFiber2=updateFromMap(existingChildren,returnFiber,newIdx,newChildren[newIdx],expirationTime);if(_newFiber2!==null){if(shouldTrackSideEffects){if(_newFiber2.alternate!==null){// The new fiber is a work in progress, but if there exists a\n// current, that means that we reused the fiber. We need to delete\n// it from the child list so that we don't add it to the deletion\n// list.\nexistingChildren.delete(_newFiber2.key===null?newIdx:_newFiber2.key);}}lastPlacedIndex=placeChild(_newFiber2,lastPlacedIndex,newIdx);if(previousNewFiber===null){resultingFirstChild=_newFiber2;}else{previousNewFiber.sibling=_newFiber2;}previousNewFiber=_newFiber2;}}if(shouldTrackSideEffects){// Any existing children that weren't consumed above were deleted. We need\n// to add them to the deletion list.\nexistingChildren.forEach(function(child){return deleteChild(returnFiber,child);});}return resultingFirstChild;}function reconcileChildrenIterator(returnFiber,currentFirstChild,newChildrenIterable,expirationTime){// This is the same implementation as reconcileChildrenArray(),\n// but using the iterator instead.\nvar iteratorFn=getIteratorFn(newChildrenIterable);if(!(typeof iteratorFn==='function')){{throw Error(\"An object is not an iterable. This error is likely caused by a bug in React. Please file an issue.\");}}{// We don't support rendering Generators because it's a mutation.\n// See https://github.com/facebook/react/issues/12995\nif(typeof Symbol==='function'&&// $FlowFixMe Flow doesn't know about toStringTag\nnewChildrenIterable[Symbol.toStringTag]==='Generator'){if(!didWarnAboutGenerators){error('Using Generators as children is unsupported and will likely yield '+'unexpected results because enumerating a generator mutates it. '+'You may convert it to an array with `Array.from()` or the '+'`[...spread]` operator before rendering. Keep in mind '+'you might need to polyfill these features for older browsers.');}didWarnAboutGenerators=true;}// Warn about using Maps as children\nif(newChildrenIterable.entries===iteratorFn){if(!didWarnAboutMaps){error('Using Maps as children is unsupported and will likely yield '+'unexpected results. Convert it to a sequence/iterable of keyed '+'ReactElements instead.');}didWarnAboutMaps=true;}// First, validate keys.\n// We'll get a different iterator later for the main pass.\nvar _newChildren=iteratorFn.call(newChildrenIterable);if(_newChildren){var knownKeys=null;var _step=_newChildren.next();for(;!_step.done;_step=_newChildren.next()){var child=_step.value;knownKeys=warnOnInvalidKey(child,knownKeys);}}}var newChildren=iteratorFn.call(newChildrenIterable);if(!(newChildren!=null)){{throw Error(\"An iterable object provided no iterator.\");}}var resultingFirstChild=null;var previousNewFiber=null;var oldFiber=currentFirstChild;var lastPlacedIndex=0;var newIdx=0;var nextOldFiber=null;var step=newChildren.next();for(;oldFiber!==null&&!step.done;newIdx++,step=newChildren.next()){if(oldFiber.index>newIdx){nextOldFiber=oldFiber;oldFiber=null;}else{nextOldFiber=oldFiber.sibling;}var newFiber=updateSlot(returnFiber,oldFiber,step.value,expirationTime);if(newFiber===null){// TODO: This breaks on empty slots like null children. That's\n// unfortunate because it triggers the slow path all the time. We need\n// a better way to communicate whether this was a miss or null,\n// boolean, undefined, etc.\nif(oldFiber===null){oldFiber=nextOldFiber;}break;}if(shouldTrackSideEffects){if(oldFiber&&newFiber.alternate===null){// We matched the slot, but we didn't reuse the existing fiber, so we\n// need to delete the existing child.\ndeleteChild(returnFiber,oldFiber);}}lastPlacedIndex=placeChild(newFiber,lastPlacedIndex,newIdx);if(previousNewFiber===null){// TODO: Move out of the loop. This only happens for the first run.\nresultingFirstChild=newFiber;}else{// TODO: Defer siblings if we're not at the right index for this slot.\n// I.e. if we had null values before, then we want to defer this\n// for each null value. However, we also don't want to call updateSlot\n// with the previous one.\npreviousNewFiber.sibling=newFiber;}previousNewFiber=newFiber;oldFiber=nextOldFiber;}if(step.done){// We've reached the end of the new children. We can delete the rest.\ndeleteRemainingChildren(returnFiber,oldFiber);return resultingFirstChild;}if(oldFiber===null){// If we don't have any more existing children we can choose a fast path\n// since the rest will all be insertions.\nfor(;!step.done;newIdx++,step=newChildren.next()){var _newFiber3=createChild(returnFiber,step.value,expirationTime);if(_newFiber3===null){continue;}lastPlacedIndex=placeChild(_newFiber3,lastPlacedIndex,newIdx);if(previousNewFiber===null){// TODO: Move out of the loop. This only happens for the first run.\nresultingFirstChild=_newFiber3;}else{previousNewFiber.sibling=_newFiber3;}previousNewFiber=_newFiber3;}return resultingFirstChild;}// Add all children to a key map for quick lookups.\nvar existingChildren=mapRemainingChildren(returnFiber,oldFiber);// Keep scanning and use the map to restore deleted items as moves.\nfor(;!step.done;newIdx++,step=newChildren.next()){var _newFiber4=updateFromMap(existingChildren,returnFiber,newIdx,step.value,expirationTime);if(_newFiber4!==null){if(shouldTrackSideEffects){if(_newFiber4.alternate!==null){// The new fiber is a work in progress, but if there exists a\n// current, that means that we reused the fiber. We need to delete\n// it from the child list so that we don't add it to the deletion\n// list.\nexistingChildren.delete(_newFiber4.key===null?newIdx:_newFiber4.key);}}lastPlacedIndex=placeChild(_newFiber4,lastPlacedIndex,newIdx);if(previousNewFiber===null){resultingFirstChild=_newFiber4;}else{previousNewFiber.sibling=_newFiber4;}previousNewFiber=_newFiber4;}}if(shouldTrackSideEffects){// Any existing children that weren't consumed above were deleted. We need\n// to add them to the deletion list.\nexistingChildren.forEach(function(child){return deleteChild(returnFiber,child);});}return resultingFirstChild;}function reconcileSingleTextNode(returnFiber,currentFirstChild,textContent,expirationTime){// There's no need to check for keys on text nodes since we don't have a\n// way to define them.\nif(currentFirstChild!==null&&currentFirstChild.tag===HostText){// We already have an existing node so let's just update it and delete\n// the rest.\ndeleteRemainingChildren(returnFiber,currentFirstChild.sibling);var existing=useFiber(currentFirstChild,textContent);existing.return=returnFiber;return existing;}// The existing first child is not a text node so we need to create one\n// and delete the existing ones.\ndeleteRemainingChildren(returnFiber,currentFirstChild);var created=createFiberFromText(textContent,returnFiber.mode,expirationTime);created.return=returnFiber;return created;}function reconcileSingleElement(returnFiber,currentFirstChild,element,expirationTime){var key=element.key;var child=currentFirstChild;while(child!==null){// TODO: If key === null and child.key === null, then this only applies to\n// the first item in the list.\nif(child.key===key){switch(child.tag){case Fragment:{if(element.type===REACT_FRAGMENT_TYPE){deleteRemainingChildren(returnFiber,child.sibling);var existing=useFiber(child,element.props.children);existing.return=returnFiber;{existing._debugSource=element._source;existing._debugOwner=element._owner;}return existing;}break;}case Block:// We intentionally fallthrough here if enableBlocksAPI is not on.\n// eslint-disable-next-lined no-fallthrough\ndefault:{if(child.elementType===element.type||// Keep this check inline so it only runs on the false path:\nisCompatibleFamilyForHotReloading(child,element)){deleteRemainingChildren(returnFiber,child.sibling);var _existing3=useFiber(child,element.props);_existing3.ref=coerceRef(returnFiber,child,element);_existing3.return=returnFiber;{_existing3._debugSource=element._source;_existing3._debugOwner=element._owner;}return _existing3;}break;}}// Didn't match.\ndeleteRemainingChildren(returnFiber,child);break;}else{deleteChild(returnFiber,child);}child=child.sibling;}if(element.type===REACT_FRAGMENT_TYPE){var created=createFiberFromFragment(element.props.children,returnFiber.mode,expirationTime,element.key);created.return=returnFiber;return created;}else{var _created4=createFiberFromElement(element,returnFiber.mode,expirationTime);_created4.ref=coerceRef(returnFiber,currentFirstChild,element);_created4.return=returnFiber;return _created4;}}function reconcileSinglePortal(returnFiber,currentFirstChild,portal,expirationTime){var key=portal.key;var child=currentFirstChild;while(child!==null){// TODO: If key === null and child.key === null, then this only applies to\n// the first item in the list.\nif(child.key===key){if(child.tag===HostPortal&&child.stateNode.containerInfo===portal.containerInfo&&child.stateNode.implementation===portal.implementation){deleteRemainingChildren(returnFiber,child.sibling);var existing=useFiber(child,portal.children||[]);existing.return=returnFiber;return existing;}else{deleteRemainingChildren(returnFiber,child);break;}}else{deleteChild(returnFiber,child);}child=child.sibling;}var created=createFiberFromPortal(portal,returnFiber.mode,expirationTime);created.return=returnFiber;return created;}// This API will tag the children with the side-effect of the reconciliation\n// itself. They will be added to the side-effect list as we pass through the\n// children and the parent.\nfunction reconcileChildFibers(returnFiber,currentFirstChild,newChild,expirationTime){// This function is not recursive.\n// If the top level item is an array, we treat it as a set of children,\n// not as a fragment. Nested arrays on the other hand will be treated as\n// fragment nodes. Recursion happens at the normal flow.\n// Handle top level unkeyed fragments as if they were arrays.\n// This leads to an ambiguity between <>{[...]}</> and <>...</>.\n// We treat the ambiguous cases above the same.\nvar isUnkeyedTopLevelFragment=typeof newChild==='object'&&newChild!==null&&newChild.type===REACT_FRAGMENT_TYPE&&newChild.key===null;if(isUnkeyedTopLevelFragment){newChild=newChild.props.children;}// Handle object types\nvar isObject=typeof newChild==='object'&&newChild!==null;if(isObject){switch(newChild.$$typeof){case REACT_ELEMENT_TYPE:return placeSingleChild(reconcileSingleElement(returnFiber,currentFirstChild,newChild,expirationTime));case REACT_PORTAL_TYPE:return placeSingleChild(reconcileSinglePortal(returnFiber,currentFirstChild,newChild,expirationTime));}}if(typeof newChild==='string'||typeof newChild==='number'){return placeSingleChild(reconcileSingleTextNode(returnFiber,currentFirstChild,''+newChild,expirationTime));}if(isArray$1(newChild)){return reconcileChildrenArray(returnFiber,currentFirstChild,newChild,expirationTime);}if(getIteratorFn(newChild)){return reconcileChildrenIterator(returnFiber,currentFirstChild,newChild,expirationTime);}if(isObject){throwOnInvalidObjectType(returnFiber,newChild);}{if(typeof newChild==='function'){warnOnFunctionType();}}if(typeof newChild==='undefined'&&!isUnkeyedTopLevelFragment){// If the new child is undefined, and the return fiber is a composite\n// component, throw an error. If Fiber return types are disabled,\n// we already threw above.\nswitch(returnFiber.tag){case ClassComponent:{{var instance=returnFiber.stateNode;if(instance.render._isMockFunction){// We allow auto-mocks to proceed as if they're returning null.\nbreak;}}}// Intentionally fall through to the next case, which handles both\n// functions and classes\n// eslint-disable-next-lined no-fallthrough\ncase FunctionComponent:{var Component=returnFiber.type;{{throw Error((Component.displayName||Component.name||'Component')+\"(...): Nothing was returned from render. This usually means a return statement is missing. Or, to render nothing, return null.\");}}}}}// Remaining cases are all treated as empty.\nreturn deleteRemainingChildren(returnFiber,currentFirstChild);}return reconcileChildFibers;}", "function ChildReconciler(shouldTrackSideEffects){function deleteChild(returnFiber,childToDelete){if(!shouldTrackSideEffects){// Noop.\nreturn;}// Deletions are added in reversed order so we add it to the front.\n// At this point, the return fiber's effect list is empty except for\n// deletions, so we can just append the deletion to the list. The remaining\n// effects aren't added until the complete phase. Once we implement\n// resuming, this may not be true.\nvar last=returnFiber.lastEffect;if(last!==null){last.nextEffect=childToDelete;returnFiber.lastEffect=childToDelete;}else{returnFiber.firstEffect=returnFiber.lastEffect=childToDelete;}childToDelete.nextEffect=null;childToDelete.effectTag=Deletion;}function deleteRemainingChildren(returnFiber,currentFirstChild){if(!shouldTrackSideEffects){// Noop.\nreturn null;}// TODO: For the shouldClone case, this could be micro-optimized a bit by\n// assuming that after the first child we've already added everything.\nvar childToDelete=currentFirstChild;while(childToDelete!==null){deleteChild(returnFiber,childToDelete);childToDelete=childToDelete.sibling;}return null;}function mapRemainingChildren(returnFiber,currentFirstChild){// Add the remaining children to a temporary map so that we can find them by\n// keys quickly. Implicit (null) keys get added to this set with their index\n// instead.\nvar existingChildren=new Map();var existingChild=currentFirstChild;while(existingChild!==null){if(existingChild.key!==null){existingChildren.set(existingChild.key,existingChild);}else{existingChildren.set(existingChild.index,existingChild);}existingChild=existingChild.sibling;}return existingChildren;}function useFiber(fiber,pendingProps){// We currently set sibling to null and index to 0 here because it is easy\n// to forget to do before returning it. E.g. for the single child case.\nvar clone=createWorkInProgress(fiber,pendingProps);clone.index=0;clone.sibling=null;return clone;}function placeChild(newFiber,lastPlacedIndex,newIndex){newFiber.index=newIndex;if(!shouldTrackSideEffects){// Noop.\nreturn lastPlacedIndex;}var current=newFiber.alternate;if(current!==null){var oldIndex=current.index;if(oldIndex<lastPlacedIndex){// This is a move.\nnewFiber.effectTag=Placement;return lastPlacedIndex;}else{// This item can stay in place.\nreturn oldIndex;}}else{// This is an insertion.\nnewFiber.effectTag=Placement;return lastPlacedIndex;}}function placeSingleChild(newFiber){// This is simpler for the single child case. We only need to do a\n// placement for inserting new children.\nif(shouldTrackSideEffects&&newFiber.alternate===null){newFiber.effectTag=Placement;}return newFiber;}function updateTextNode(returnFiber,current,textContent,expirationTime){if(current===null||current.tag!==HostText){// Insert\nvar created=createFiberFromText(textContent,returnFiber.mode,expirationTime);created.return=returnFiber;return created;}else{// Update\nvar existing=useFiber(current,textContent);existing.return=returnFiber;return existing;}}function updateElement(returnFiber,current,element,expirationTime){if(current!==null){if(current.elementType===element.type||// Keep this check inline so it only runs on the false path:\nisCompatibleFamilyForHotReloading(current,element)){// Move based on index\nvar existing=useFiber(current,element.props);existing.ref=coerceRef(returnFiber,current,element);existing.return=returnFiber;{existing._debugSource=element._source;existing._debugOwner=element._owner;}return existing;}}// Insert\nvar created=createFiberFromElement(element,returnFiber.mode,expirationTime);created.ref=coerceRef(returnFiber,current,element);created.return=returnFiber;return created;}function updatePortal(returnFiber,current,portal,expirationTime){if(current===null||current.tag!==HostPortal||current.stateNode.containerInfo!==portal.containerInfo||current.stateNode.implementation!==portal.implementation){// Insert\nvar created=createFiberFromPortal(portal,returnFiber.mode,expirationTime);created.return=returnFiber;return created;}else{// Update\nvar existing=useFiber(current,portal.children||[]);existing.return=returnFiber;return existing;}}function updateFragment(returnFiber,current,fragment,expirationTime,key){if(current===null||current.tag!==Fragment){// Insert\nvar created=createFiberFromFragment(fragment,returnFiber.mode,expirationTime,key);created.return=returnFiber;return created;}else{// Update\nvar existing=useFiber(current,fragment);existing.return=returnFiber;return existing;}}function createChild(returnFiber,newChild,expirationTime){if(typeof newChild==='string'||typeof newChild==='number'){// Text nodes don't have keys. If the previous node is implicitly keyed\n// we can continue to replace it without aborting even if it is not a text\n// node.\nvar created=createFiberFromText(''+newChild,returnFiber.mode,expirationTime);created.return=returnFiber;return created;}if(typeof newChild==='object'&&newChild!==null){switch(newChild.$$typeof){case REACT_ELEMENT_TYPE:{var _created=createFiberFromElement(newChild,returnFiber.mode,expirationTime);_created.ref=coerceRef(returnFiber,null,newChild);_created.return=returnFiber;return _created;}case REACT_PORTAL_TYPE:{var _created2=createFiberFromPortal(newChild,returnFiber.mode,expirationTime);_created2.return=returnFiber;return _created2;}}if(isArray$1(newChild)||getIteratorFn(newChild)){var _created3=createFiberFromFragment(newChild,returnFiber.mode,expirationTime,null);_created3.return=returnFiber;return _created3;}throwOnInvalidObjectType(returnFiber,newChild);}{if(typeof newChild==='function'){warnOnFunctionType();}}return null;}function updateSlot(returnFiber,oldFiber,newChild,expirationTime){// Update the fiber if the keys match, otherwise return null.\nvar key=oldFiber!==null?oldFiber.key:null;if(typeof newChild==='string'||typeof newChild==='number'){// Text nodes don't have keys. If the previous node is implicitly keyed\n// we can continue to replace it without aborting even if it is not a text\n// node.\nif(key!==null){return null;}return updateTextNode(returnFiber,oldFiber,''+newChild,expirationTime);}if(typeof newChild==='object'&&newChild!==null){switch(newChild.$$typeof){case REACT_ELEMENT_TYPE:{if(newChild.key===key){if(newChild.type===REACT_FRAGMENT_TYPE){return updateFragment(returnFiber,oldFiber,newChild.props.children,expirationTime,key);}return updateElement(returnFiber,oldFiber,newChild,expirationTime);}else{return null;}}case REACT_PORTAL_TYPE:{if(newChild.key===key){return updatePortal(returnFiber,oldFiber,newChild,expirationTime);}else{return null;}}}if(isArray$1(newChild)||getIteratorFn(newChild)){if(key!==null){return null;}return updateFragment(returnFiber,oldFiber,newChild,expirationTime,null);}throwOnInvalidObjectType(returnFiber,newChild);}{if(typeof newChild==='function'){warnOnFunctionType();}}return null;}function updateFromMap(existingChildren,returnFiber,newIdx,newChild,expirationTime){if(typeof newChild==='string'||typeof newChild==='number'){// Text nodes don't have keys, so we neither have to check the old nor\n// new node for the key. If both are text nodes, they match.\nvar matchedFiber=existingChildren.get(newIdx)||null;return updateTextNode(returnFiber,matchedFiber,''+newChild,expirationTime);}if(typeof newChild==='object'&&newChild!==null){switch(newChild.$$typeof){case REACT_ELEMENT_TYPE:{var _matchedFiber=existingChildren.get(newChild.key===null?newIdx:newChild.key)||null;if(newChild.type===REACT_FRAGMENT_TYPE){return updateFragment(returnFiber,_matchedFiber,newChild.props.children,expirationTime,newChild.key);}return updateElement(returnFiber,_matchedFiber,newChild,expirationTime);}case REACT_PORTAL_TYPE:{var _matchedFiber2=existingChildren.get(newChild.key===null?newIdx:newChild.key)||null;return updatePortal(returnFiber,_matchedFiber2,newChild,expirationTime);}}if(isArray$1(newChild)||getIteratorFn(newChild)){var _matchedFiber3=existingChildren.get(newIdx)||null;return updateFragment(returnFiber,_matchedFiber3,newChild,expirationTime,null);}throwOnInvalidObjectType(returnFiber,newChild);}{if(typeof newChild==='function'){warnOnFunctionType();}}return null;}/**\n * Warns if there is a duplicate or missing key\n */function warnOnInvalidKey(child,knownKeys){{if(typeof child!=='object'||child===null){return knownKeys;}switch(child.$$typeof){case REACT_ELEMENT_TYPE:case REACT_PORTAL_TYPE:warnForMissingKey(child);var key=child.key;if(typeof key!=='string'){break;}if(knownKeys===null){knownKeys=new Set();knownKeys.add(key);break;}if(!knownKeys.has(key)){knownKeys.add(key);break;}error('Encountered two children with the same key, `%s`. '+'Keys should be unique so that components maintain their identity '+'across updates. Non-unique keys may cause children to be '+'duplicated and/or omitted — the behavior is unsupported and '+'could change in a future version.',key);break;}}return knownKeys;}function reconcileChildrenArray(returnFiber,currentFirstChild,newChildren,expirationTime){// This algorithm can't optimize by searching from both ends since we\n// don't have backpointers on fibers. I'm trying to see how far we can get\n// with that model. If it ends up not being worth the tradeoffs, we can\n// add it later.\n// Even with a two ended optimization, we'd want to optimize for the case\n// where there are few changes and brute force the comparison instead of\n// going for the Map. It'd like to explore hitting that path first in\n// forward-only mode and only go for the Map once we notice that we need\n// lots of look ahead. This doesn't handle reversal as well as two ended\n// search but that's unusual. Besides, for the two ended optimization to\n// work on Iterables, we'd need to copy the whole set.\n// In this first iteration, we'll just live with hitting the bad case\n// (adding everything to a Map) in for every insert/move.\n// If you change this code, also update reconcileChildrenIterator() which\n// uses the same algorithm.\n{// First, validate keys.\nvar knownKeys=null;for(var i=0;i<newChildren.length;i++){var child=newChildren[i];knownKeys=warnOnInvalidKey(child,knownKeys);}}var resultingFirstChild=null;var previousNewFiber=null;var oldFiber=currentFirstChild;var lastPlacedIndex=0;var newIdx=0;var nextOldFiber=null;for(;oldFiber!==null&&newIdx<newChildren.length;newIdx++){if(oldFiber.index>newIdx){nextOldFiber=oldFiber;oldFiber=null;}else{nextOldFiber=oldFiber.sibling;}var newFiber=updateSlot(returnFiber,oldFiber,newChildren[newIdx],expirationTime);if(newFiber===null){// TODO: This breaks on empty slots like null children. That's\n// unfortunate because it triggers the slow path all the time. We need\n// a better way to communicate whether this was a miss or null,\n// boolean, undefined, etc.\nif(oldFiber===null){oldFiber=nextOldFiber;}break;}if(shouldTrackSideEffects){if(oldFiber&&newFiber.alternate===null){// We matched the slot, but we didn't reuse the existing fiber, so we\n// need to delete the existing child.\ndeleteChild(returnFiber,oldFiber);}}lastPlacedIndex=placeChild(newFiber,lastPlacedIndex,newIdx);if(previousNewFiber===null){// TODO: Move out of the loop. This only happens for the first run.\nresultingFirstChild=newFiber;}else{// TODO: Defer siblings if we're not at the right index for this slot.\n// I.e. if we had null values before, then we want to defer this\n// for each null value. However, we also don't want to call updateSlot\n// with the previous one.\npreviousNewFiber.sibling=newFiber;}previousNewFiber=newFiber;oldFiber=nextOldFiber;}if(newIdx===newChildren.length){// We've reached the end of the new children. We can delete the rest.\ndeleteRemainingChildren(returnFiber,oldFiber);return resultingFirstChild;}if(oldFiber===null){// If we don't have any more existing children we can choose a fast path\n// since the rest will all be insertions.\nfor(;newIdx<newChildren.length;newIdx++){var _newFiber=createChild(returnFiber,newChildren[newIdx],expirationTime);if(_newFiber===null){continue;}lastPlacedIndex=placeChild(_newFiber,lastPlacedIndex,newIdx);if(previousNewFiber===null){// TODO: Move out of the loop. This only happens for the first run.\nresultingFirstChild=_newFiber;}else{previousNewFiber.sibling=_newFiber;}previousNewFiber=_newFiber;}return resultingFirstChild;}// Add all children to a key map for quick lookups.\nvar existingChildren=mapRemainingChildren(returnFiber,oldFiber);// Keep scanning and use the map to restore deleted items as moves.\nfor(;newIdx<newChildren.length;newIdx++){var _newFiber2=updateFromMap(existingChildren,returnFiber,newIdx,newChildren[newIdx],expirationTime);if(_newFiber2!==null){if(shouldTrackSideEffects){if(_newFiber2.alternate!==null){// The new fiber is a work in progress, but if there exists a\n// current, that means that we reused the fiber. We need to delete\n// it from the child list so that we don't add it to the deletion\n// list.\nexistingChildren.delete(_newFiber2.key===null?newIdx:_newFiber2.key);}}lastPlacedIndex=placeChild(_newFiber2,lastPlacedIndex,newIdx);if(previousNewFiber===null){resultingFirstChild=_newFiber2;}else{previousNewFiber.sibling=_newFiber2;}previousNewFiber=_newFiber2;}}if(shouldTrackSideEffects){// Any existing children that weren't consumed above were deleted. We need\n// to add them to the deletion list.\nexistingChildren.forEach(function(child){return deleteChild(returnFiber,child);});}return resultingFirstChild;}function reconcileChildrenIterator(returnFiber,currentFirstChild,newChildrenIterable,expirationTime){// This is the same implementation as reconcileChildrenArray(),\n// but using the iterator instead.\nvar iteratorFn=getIteratorFn(newChildrenIterable);if(!(typeof iteratorFn==='function')){{throw Error(\"An object is not an iterable. This error is likely caused by a bug in React. Please file an issue.\");}}{// We don't support rendering Generators because it's a mutation.\n// See https://github.com/facebook/react/issues/12995\nif(typeof Symbol==='function'&&// $FlowFixMe Flow doesn't know about toStringTag\nnewChildrenIterable[Symbol.toStringTag]==='Generator'){if(!didWarnAboutGenerators){error('Using Generators as children is unsupported and will likely yield '+'unexpected results because enumerating a generator mutates it. '+'You may convert it to an array with `Array.from()` or the '+'`[...spread]` operator before rendering. Keep in mind '+'you might need to polyfill these features for older browsers.');}didWarnAboutGenerators=true;}// Warn about using Maps as children\nif(newChildrenIterable.entries===iteratorFn){if(!didWarnAboutMaps){error('Using Maps as children is unsupported and will likely yield '+'unexpected results. Convert it to a sequence/iterable of keyed '+'ReactElements instead.');}didWarnAboutMaps=true;}// First, validate keys.\n// We'll get a different iterator later for the main pass.\nvar _newChildren=iteratorFn.call(newChildrenIterable);if(_newChildren){var knownKeys=null;var _step=_newChildren.next();for(;!_step.done;_step=_newChildren.next()){var child=_step.value;knownKeys=warnOnInvalidKey(child,knownKeys);}}}var newChildren=iteratorFn.call(newChildrenIterable);if(!(newChildren!=null)){{throw Error(\"An iterable object provided no iterator.\");}}var resultingFirstChild=null;var previousNewFiber=null;var oldFiber=currentFirstChild;var lastPlacedIndex=0;var newIdx=0;var nextOldFiber=null;var step=newChildren.next();for(;oldFiber!==null&&!step.done;newIdx++,step=newChildren.next()){if(oldFiber.index>newIdx){nextOldFiber=oldFiber;oldFiber=null;}else{nextOldFiber=oldFiber.sibling;}var newFiber=updateSlot(returnFiber,oldFiber,step.value,expirationTime);if(newFiber===null){// TODO: This breaks on empty slots like null children. That's\n// unfortunate because it triggers the slow path all the time. We need\n// a better way to communicate whether this was a miss or null,\n// boolean, undefined, etc.\nif(oldFiber===null){oldFiber=nextOldFiber;}break;}if(shouldTrackSideEffects){if(oldFiber&&newFiber.alternate===null){// We matched the slot, but we didn't reuse the existing fiber, so we\n// need to delete the existing child.\ndeleteChild(returnFiber,oldFiber);}}lastPlacedIndex=placeChild(newFiber,lastPlacedIndex,newIdx);if(previousNewFiber===null){// TODO: Move out of the loop. This only happens for the first run.\nresultingFirstChild=newFiber;}else{// TODO: Defer siblings if we're not at the right index for this slot.\n// I.e. if we had null values before, then we want to defer this\n// for each null value. However, we also don't want to call updateSlot\n// with the previous one.\npreviousNewFiber.sibling=newFiber;}previousNewFiber=newFiber;oldFiber=nextOldFiber;}if(step.done){// We've reached the end of the new children. We can delete the rest.\ndeleteRemainingChildren(returnFiber,oldFiber);return resultingFirstChild;}if(oldFiber===null){// If we don't have any more existing children we can choose a fast path\n// since the rest will all be insertions.\nfor(;!step.done;newIdx++,step=newChildren.next()){var _newFiber3=createChild(returnFiber,step.value,expirationTime);if(_newFiber3===null){continue;}lastPlacedIndex=placeChild(_newFiber3,lastPlacedIndex,newIdx);if(previousNewFiber===null){// TODO: Move out of the loop. This only happens for the first run.\nresultingFirstChild=_newFiber3;}else{previousNewFiber.sibling=_newFiber3;}previousNewFiber=_newFiber3;}return resultingFirstChild;}// Add all children to a key map for quick lookups.\nvar existingChildren=mapRemainingChildren(returnFiber,oldFiber);// Keep scanning and use the map to restore deleted items as moves.\nfor(;!step.done;newIdx++,step=newChildren.next()){var _newFiber4=updateFromMap(existingChildren,returnFiber,newIdx,step.value,expirationTime);if(_newFiber4!==null){if(shouldTrackSideEffects){if(_newFiber4.alternate!==null){// The new fiber is a work in progress, but if there exists a\n// current, that means that we reused the fiber. We need to delete\n// it from the child list so that we don't add it to the deletion\n// list.\nexistingChildren.delete(_newFiber4.key===null?newIdx:_newFiber4.key);}}lastPlacedIndex=placeChild(_newFiber4,lastPlacedIndex,newIdx);if(previousNewFiber===null){resultingFirstChild=_newFiber4;}else{previousNewFiber.sibling=_newFiber4;}previousNewFiber=_newFiber4;}}if(shouldTrackSideEffects){// Any existing children that weren't consumed above were deleted. We need\n// to add them to the deletion list.\nexistingChildren.forEach(function(child){return deleteChild(returnFiber,child);});}return resultingFirstChild;}function reconcileSingleTextNode(returnFiber,currentFirstChild,textContent,expirationTime){// There's no need to check for keys on text nodes since we don't have a\n// way to define them.\nif(currentFirstChild!==null&&currentFirstChild.tag===HostText){// We already have an existing node so let's just update it and delete\n// the rest.\ndeleteRemainingChildren(returnFiber,currentFirstChild.sibling);var existing=useFiber(currentFirstChild,textContent);existing.return=returnFiber;return existing;}// The existing first child is not a text node so we need to create one\n// and delete the existing ones.\ndeleteRemainingChildren(returnFiber,currentFirstChild);var created=createFiberFromText(textContent,returnFiber.mode,expirationTime);created.return=returnFiber;return created;}function reconcileSingleElement(returnFiber,currentFirstChild,element,expirationTime){var key=element.key;var child=currentFirstChild;while(child!==null){// TODO: If key === null and child.key === null, then this only applies to\n// the first item in the list.\nif(child.key===key){switch(child.tag){case Fragment:{if(element.type===REACT_FRAGMENT_TYPE){deleteRemainingChildren(returnFiber,child.sibling);var existing=useFiber(child,element.props.children);existing.return=returnFiber;{existing._debugSource=element._source;existing._debugOwner=element._owner;}return existing;}break;}case Block:// We intentionally fallthrough here if enableBlocksAPI is not on.\n// eslint-disable-next-lined no-fallthrough\ndefault:{if(child.elementType===element.type||// Keep this check inline so it only runs on the false path:\nisCompatibleFamilyForHotReloading(child,element)){deleteRemainingChildren(returnFiber,child.sibling);var _existing3=useFiber(child,element.props);_existing3.ref=coerceRef(returnFiber,child,element);_existing3.return=returnFiber;{_existing3._debugSource=element._source;_existing3._debugOwner=element._owner;}return _existing3;}break;}}// Didn't match.\ndeleteRemainingChildren(returnFiber,child);break;}else{deleteChild(returnFiber,child);}child=child.sibling;}if(element.type===REACT_FRAGMENT_TYPE){var created=createFiberFromFragment(element.props.children,returnFiber.mode,expirationTime,element.key);created.return=returnFiber;return created;}else{var _created4=createFiberFromElement(element,returnFiber.mode,expirationTime);_created4.ref=coerceRef(returnFiber,currentFirstChild,element);_created4.return=returnFiber;return _created4;}}function reconcileSinglePortal(returnFiber,currentFirstChild,portal,expirationTime){var key=portal.key;var child=currentFirstChild;while(child!==null){// TODO: If key === null and child.key === null, then this only applies to\n// the first item in the list.\nif(child.key===key){if(child.tag===HostPortal&&child.stateNode.containerInfo===portal.containerInfo&&child.stateNode.implementation===portal.implementation){deleteRemainingChildren(returnFiber,child.sibling);var existing=useFiber(child,portal.children||[]);existing.return=returnFiber;return existing;}else{deleteRemainingChildren(returnFiber,child);break;}}else{deleteChild(returnFiber,child);}child=child.sibling;}var created=createFiberFromPortal(portal,returnFiber.mode,expirationTime);created.return=returnFiber;return created;}// This API will tag the children with the side-effect of the reconciliation\n// itself. They will be added to the side-effect list as we pass through the\n// children and the parent.\nfunction reconcileChildFibers(returnFiber,currentFirstChild,newChild,expirationTime){// This function is not recursive.\n// If the top level item is an array, we treat it as a set of children,\n// not as a fragment. Nested arrays on the other hand will be treated as\n// fragment nodes. Recursion happens at the normal flow.\n// Handle top level unkeyed fragments as if they were arrays.\n// This leads to an ambiguity between <>{[...]}</> and <>...</>.\n// We treat the ambiguous cases above the same.\nvar isUnkeyedTopLevelFragment=typeof newChild==='object'&&newChild!==null&&newChild.type===REACT_FRAGMENT_TYPE&&newChild.key===null;if(isUnkeyedTopLevelFragment){newChild=newChild.props.children;}// Handle object types\nvar isObject=typeof newChild==='object'&&newChild!==null;if(isObject){switch(newChild.$$typeof){case REACT_ELEMENT_TYPE:return placeSingleChild(reconcileSingleElement(returnFiber,currentFirstChild,newChild,expirationTime));case REACT_PORTAL_TYPE:return placeSingleChild(reconcileSinglePortal(returnFiber,currentFirstChild,newChild,expirationTime));}}if(typeof newChild==='string'||typeof newChild==='number'){return placeSingleChild(reconcileSingleTextNode(returnFiber,currentFirstChild,''+newChild,expirationTime));}if(isArray$1(newChild)){return reconcileChildrenArray(returnFiber,currentFirstChild,newChild,expirationTime);}if(getIteratorFn(newChild)){return reconcileChildrenIterator(returnFiber,currentFirstChild,newChild,expirationTime);}if(isObject){throwOnInvalidObjectType(returnFiber,newChild);}{if(typeof newChild==='function'){warnOnFunctionType();}}if(typeof newChild==='undefined'&&!isUnkeyedTopLevelFragment){// If the new child is undefined, and the return fiber is a composite\n// component, throw an error. If Fiber return types are disabled,\n// we already threw above.\nswitch(returnFiber.tag){case ClassComponent:{{var instance=returnFiber.stateNode;if(instance.render._isMockFunction){// We allow auto-mocks to proceed as if they're returning null.\nbreak;}}}// Intentionally fall through to the next case, which handles both\n// functions and classes\n// eslint-disable-next-lined no-fallthrough\ncase FunctionComponent:{var Component=returnFiber.type;{{throw Error((Component.displayName||Component.name||'Component')+\"(...): Nothing was returned from render. This usually means a return statement is missing. Or, to render nothing, return null.\");}}}}}// Remaining cases are all treated as empty.\nreturn deleteRemainingChildren(returnFiber,currentFirstChild);}return reconcileChildFibers;}", "renderInsidePatch() {\n\t\tif (this.component_.wasRendered && !this.shouldUpdate(this.changes_)) {\n\t\t\tthis.skipRerender_();\n\t\t\treturn;\n\t\t}\n\t\tthis.renderInsidePatchDontSkip_();\n\t}", "function thunkify() {\n return function (_ref) {\n var dispatch = _ref.dispatch,\n getState = _ref.getState,\n withArgs = _ref.withArgs;\n return function (next) {\n return function (action) {\n if (typeof action === 'function') return action.apply(void 0, [dispatch, getState].concat(_toConsumableArray(withArgs)));\n return next(action);\n };\n };\n };\n}", "static compatibleMonkeyPatch(what, methodName, options) {\n const { before, instead, after, once = false, silent = false } = options;\n const cancelPatch = () => patch.cancel();\n\n const compatible_function = _function => data => {\n const compatible_data = {\n thisObject: data.this,\n methodArguments: data.arguments,\n returnValue: data.return,\n cancelPatch,\n originalMethod: data.originalMethod,\n callOriginalMethod: () => data.callOriginalMethod()\n };\n try {\n _function(compatible_data);\n data.arguments = compatible_data.methodArguments;\n data.return = compatible_data.returnValue;\n } catch (err) {\n data.arguments = compatible_data.methodArguments;\n data.return = compatible_data.returnValue;\n throw err;\n }\n };\n\n const patch = this.monkeyPatch(what, methodName, {\n before: before ? compatible_function(before) : undefined,\n instead: instead ? compatible_function(instead) : undefined,\n after: after ? compatible_function(after) : undefined,\n once\n });\n\n return cancelPatch;\n }", "function _patchImages(patch, callback) {\n if (!patch || patch.length === 0) {\n displaySelectionInfos();\n return callback();\n }\n // Split patch into smaller patches of maximum 100 items (Issue #24)\n var smallPatch = patch.splice(0, 100);\n return ajax({\n type: 'PATCH',\n url: '/photos/images/',\n data: {patch: smallPatch},\n dataType: 'json',\n success: function(fingerprints) {\n if (fingerprints) {\n for (var i=0; i<fingerprints.length; i++) {\n var fingerprint = fingerprints[i];\n fpCache.update(fingerprint);\n } \n }\n return _patchImages(patch, callback);\n },\n error: function(jqxhr, textStatus, error) {\n flashError(\"Failed to patch image(s)\", jqxhr.status);\n return callback(error);\n }\n }); \n}", "function patchImpress(){\n\t if(impressPatched) return;\n\t \n\t if(typeof window.impress !== 'function'){\n\t root.addEventListener(\"impress:init\", patchImpress);\n\t return;\n\t }\n\n\t root.removeEventListener(\"impress:init\", patchImpress);\n\n\t debug(\"impress patched\")\n\t var impressOrig = impress;\n\n\t window.impress = function(rootId){\n\t rootId = rootId || \"impress\";\n\n\t // if given root is already patched just return the API\n\t if (roots[\"impress-root-\" + rootId]) {\n\t return roots[\"impress-root-\" + rootId];\n\t }\n\n\t var api = impressOrig(rootId);\n\t api.prevOrig = api.prev;\n\t api.nextOrig = api.next;\n\t api.gotoOrig = api.goto;\n\t api.prev = prev;\n\t api.next = next;\n\t api.goto = goto;\n\n\t return roots[\"impress-root-\" + rootId] = api;\n\t }\n\n\t impressPatched = true;\n\n\t // START after patch had taken place\n\t // by selecting step defined in url or first step of the presentation\n\t goto(getElementFromHash() || steps[0], 0);\n\t }", "function unhook ( vNode, patch, index ) {\n if ( isVNode( vNode ) ) {\n if ( vNode.hooks ) {\n patch[ index ] = appendPatch(\n patch[ index ],\n new VPatch(\n VPatch.PROPS,\n vNode,\n undefinedKeys( vNode.hooks )\n )\n )\n }\n\n if ( vNode.descendantHooks || vNode.hasThunks ) {\n var children = vNode.children\n var len = children.length\n for ( var i = 0; i < len; i++ ) {\n var child = children[ i ]\n index += 1\n\n unhook( child, patch, index )\n\n if ( isVNode( child ) && child.count ) {\n index += child.count\n }\n }\n }\n } else if ( isThunk( vNode ) ) {\n thunks( vNode, null, patch, index )\n }\n }", "static get patches() {return [];}", "_back_patch() {\n // Initialize stack base and limit\n this._current_program.initialize_stack();\n // Back patch all identifiers using the static area\n this.verbose[this.verbose.length - 1].push(new NightingaleCompiler.OutputConsoleMessage(CODE_GENERATION, INFO, `Back patching identifiers...`) // OutputConsoleMessage\n ); // this.verbose[this.output.length - 1].push\n for (let identifier_metadata of this._current_static_table.values()) {\n // Convert the logical stack address to a physical address in memory\n let physical_address = (this._current_program.get_stack_base() + identifier_metadata.logical_stack_address).toString(16).toUpperCase().padStart(4, \"0\");\n let leading_hex_byte = physical_address.substring(0, 2);\n let trailing_hex_byte = physical_address.substring(2, 4);\n this.verbose[this.verbose.length - 1].push(new NightingaleCompiler.OutputConsoleMessage(CODE_GENERATION, INFO, `Identifier [${identifier_metadata.temp_address_leading_hex} ${identifier_metadata.temp_address_trailing_hex}] patched with [${physical_address}].`) // OutputConsoleMessage\n ); // this.verbose[this.output.length - 1].push\n // Search for occurences of the temp address in the code area to backpatch\n for (let logical_address = 0; logical_address < this._current_program.get_code_area_size(); ++logical_address) {\n // Found temp variable\n if (this._current_program.read_code_area(logical_address) === identifier_metadata.temp_address_leading_hex) {\n if (logical_address !== 0) {\n if (this._current_program.read_code_area(logical_address - 1) === identifier_metadata.temp_address_trailing_hex) {\n // Back patch the leading byte...\n //\n // Since we are using 256 bytes, we only need to worry about\n // 1 byte addresses, so the leading byte in this case should always be: \"00\"\n this._current_program.write_to_code(leading_hex_byte, logical_address);\n // Back patch trailing byte\n //\n // Remember the ordering is reversed in memory, as it was an \n // optimization for direct addressing with no offset for the 6502a...\n this._current_program.write_to_code(trailing_hex_byte, logical_address - 1);\n } // if\n } // if\n } // if\n } // for\n // Replace static table entry's current temp address with the real static area address\n identifier_metadata.temp_address_leading_hex = leading_hex_byte;\n identifier_metadata.temp_address_trailing_hex = trailing_hex_byte;\n } // for\n // Back patch anonymous address\n this.verbose[this.verbose.length - 1].push(new NightingaleCompiler.OutputConsoleMessage(CODE_GENERATION, INFO, `Backpatching anonynmous addresses...`) // OutputConsoleMessage\n ); // this.verbose[this.output.length - 1].push\n for (let temp_anonymous_address of this._current_static_table.get_anonymous_addresses()) {\n // Convert the logical stack address to a physical address in memory\n let physical_address = (this._current_program.get_stack_base() + temp_anonymous_address.logical_stack_address).toString(16).toUpperCase().padStart(4, \"0\");\n let leading_hex_byte = physical_address.substring(0, 2);\n let trailing_hex_byte = physical_address.substring(2, 4);\n this.verbose[this.verbose.length - 1].push(new NightingaleCompiler.OutputConsoleMessage(CODE_GENERATION, INFO, `Anonymous address [${temp_anonymous_address.temp_address_leading_hex} ${temp_anonymous_address.temp_address_trailing_hex}] patched with [${physical_address}].`) // OutputConsoleMessage\n ); // this.verbose[this.output.length - 1].push\n // Search for occurences of the temp address in the code area to backpatch\n for (let logical_address = 0; logical_address < this._current_program.get_code_area_size(); ++logical_address) {\n // Found temp variable\n if (this._current_program.read_code_area(logical_address) === temp_anonymous_address.temp_address_leading_hex) {\n if (logical_address !== 0) {\n if (this._current_program.read_code_area(logical_address - 1) === temp_anonymous_address.temp_address_trailing_hex) {\n // Back patch the leading byte...\n //\n // Since we are using 256 bytes, we only need to worry about\n // 1 byte addresses, so the leading byte in this case should always be: \"00\"\n this._current_program.write_to_code(leading_hex_byte, logical_address);\n // Back patch trailing byte\n //\n // Remember the ordering is reversed in memory, as it was an \n // optimization for direct addressing with no offset for the 6502a...\n this._current_program.write_to_code(trailing_hex_byte, logical_address - 1);\n } // if\n } // if\n } // if\n } // for\n // Replace static table entry's current temp address with the real static area address\n temp_anonymous_address.temp_address_leading_hex = leading_hex_byte;\n temp_anonymous_address.temp_address_trailing_hex = trailing_hex_byte;\n } // for\n // Iterate through executable image and backpatch jumps\n this.verbose[this.verbose.length - 1].push(new NightingaleCompiler.OutputConsoleMessage(CODE_GENERATION, INFO, `Backpatching jumps...`) // OutputConsoleMessage\n ); // this.verbose[this.output.length - 1].push\n for (let logical_address = 0; logical_address < this._current_program.get_code_area_size(); ++logical_address) {\n let curr_hex_byte = this._current_program.read_code_area(logical_address);\n let curr_jump = this._current_static_table.get_jump(curr_hex_byte);\n // Found a jump to back patch\n if (curr_jump !== null) {\n // Back patch jumps\n this.verbose[this.verbose.length - 1].push(new NightingaleCompiler.OutputConsoleMessage(CODE_GENERATION, INFO, `Jump [${curr_hex_byte}] patched with [${curr_jump.distance.toString(16).toUpperCase().padStart(2, \"0\")}].`) // OutputConsoleMessage\n ); // this.verbose[this.output.length - 1].push\n this._current_program.write_to_code(curr_jump.distance.toString(16).toUpperCase().padStart(2, \"0\"), logical_address);\n } // if\n } // for\n }", "function patch(lastVNode, nextVNode, parentDom, lifecycle, context, isSVG, isRecycling) {\n if (lastVNode !== nextVNode) {\n const lastFlags = lastVNode.flags;\n const nextFlags = nextVNode.flags;\n if (nextFlags & 28 /* Component */) {\n if (lastFlags & 28 /* Component */) {\n patchComponent(lastVNode, nextVNode, parentDom, lifecycle, context, isSVG, nextFlags & 4 /* ComponentClass */, isRecycling);\n }\n else {\n __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_6__utils__[\"b\" /* replaceVNode */])(parentDom, __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_5__mounting__[\"b\" /* mountComponent */])(nextVNode, null, lifecycle, context, isSVG, nextFlags & 4 /* ComponentClass */), lastVNode, lifecycle, isRecycling);\n }\n }\n else if (nextFlags & 3970 /* Element */) {\n if (lastFlags & 3970 /* Element */) {\n patchElement(lastVNode, nextVNode, parentDom, lifecycle, context, isSVG, isRecycling);\n }\n else {\n __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_6__utils__[\"b\" /* replaceVNode */])(parentDom, __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_5__mounting__[\"c\" /* mountElement */])(nextVNode, null, lifecycle, context, isSVG), lastVNode, lifecycle, isRecycling);\n }\n }\n else if (nextFlags & 1 /* Text */) {\n if (lastFlags & 1 /* Text */) {\n patchText(lastVNode, nextVNode);\n }\n else {\n __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_6__utils__[\"b\" /* replaceVNode */])(parentDom, __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_5__mounting__[\"d\" /* mountText */])(nextVNode, null), lastVNode, lifecycle, isRecycling);\n }\n }\n else if (nextFlags & 4096 /* Void */) {\n if (lastFlags & 4096 /* Void */) {\n patchVoid(lastVNode, nextVNode);\n }\n else {\n __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_6__utils__[\"b\" /* replaceVNode */])(parentDom, __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_5__mounting__[\"e\" /* mountVoid */])(nextVNode, null), lastVNode, lifecycle, isRecycling);\n }\n }\n else {\n // Error case: mount new one replacing old one\n __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_6__utils__[\"c\" /* replaceLastChildAndUnmount */])(lastVNode, nextVNode, parentDom, lifecycle, context, isSVG, isRecycling);\n }\n }\n}", "applyPatch(content, patch) {\n let folder = tempAssets([content, patch]);\n let result = applyPatch(folder);\n rmTempAssets(folder);\n return result;\n }", "_patchDeleteApply(patchInfo) {\n let info = Object.assign({}, patchInfo, {value: \"\"});\n this._patchReplaceApply(info);\n /*istanbul ignore else*/\n if (patchInfo.reparse) this._parseInvoke();\n }", "function unhook(vNode, patch, index) {\n if (isVNode(vNode)) {\n if (vNode.hooks) {\n patch[index] = appendPatch(\n patch[index],\n new VPatch(\n VPatch.PROPS,\n vNode,\n undefinedKeys(vNode.hooks)\n )\n )\n }\n\n if (vNode.descendantHooks || vNode.hasThunks) {\n var children = vNode.children\n var len = children.length\n for (var i = 0; i < len; i++) {\n var child = children[i]\n index += 1\n\n unhook(child, patch, index)\n\n if (isVNode(child) && child.count) {\n index += child.count\n }\n }\n }\n } else if (isThunk(vNode)) {\n thunks(vNode, null, patch, index)\n }\n }", "function splitPatch(patch) {\n if (_.isString(patch)) patch = JsDiff.parsePatch(patch)[0];\n\n return _.chain(patch.hunks)\n .map(splitHunk)\n .value();\n}", "function patch(target, funcName) {\n\t var base = target[funcName];\n\t var mixinFunc = reactiveMixin_1.default[funcName];\n\t if (!base) {\n\t target[funcName] = mixinFunc;\n\t }\n\t else {\n\t target[funcName] = function () {\n\t base.apply(this, arguments);\n\t if (mixinFunc) {\n\t mixinFunc.apply(this, arguments);\n\t }\n\t };\n\t }\n\t}", "function unhook(vNode, patch, index) {\n\t if (isVNode(vNode)) {\n\t if (vNode.hooks) {\n\t patch[index] = appendPatch(\n\t patch[index],\n\t new VPatch(\n\t VPatch.PROPS,\n\t vNode,\n\t undefinedKeys(vNode.hooks)\n\t )\n\t )\n\t }\n\t\n\t if (vNode.descendantHooks || vNode.hasThunks) {\n\t var children = vNode.children\n\t var len = children.length\n\t for (var i = 0; i < len; i++) {\n\t var child = children[i]\n\t index += 1\n\t\n\t unhook(child, patch, index)\n\t\n\t if (isVNode(child) && child.count) {\n\t index += child.count\n\t }\n\t }\n\t }\n\t } else if (isThunk(vNode)) {\n\t thunks(vNode, null, patch, index)\n\t }\n\t}", "function thunk(f) {\n\t// return a function taking an array of arguments to appy to `f` when the thunk\n\t// is executed, and a value for the `this` argument to be used for `f`. If no argument\n\t// is given, `undefined` is used.\n\tvar theThunk = function(args, thisArg) {\n\t\treturn f.apply(thisArg, [].concat(args));\n\t}\n\t// set metadata on the thunk function to identify it as a thunk\n\ttheThunk.__IS_THUNK__ = true;\n\treturn theThunk;\n}", "patch (url, data) {\n }", "patch({diff, uuid}, skipCommits){\r\n let prev_started = this._started;\r\n this.commit(true);\r\n this.begin(true, uuid);\r\n this.immutable = this._patch(this.immutable, diff);\r\n this.commit(true, skipCommits);\r\n if(prev_started)\r\n this.begin();\r\n }", "function patch(target, funcName, runMixinFirst = false) {\n\tconst base = target[funcName];\n\tconst mixinFunc = reactiveMixin[funcName];\n\tconst f = !base\n\t\t? mixinFunc\n\t\t: runMixinFirst === true\n\t\t\t? function() {\n\t\t\t\tmixinFunc.apply(this, arguments);\n\t\t\t\tbase.apply(this, arguments);\n\t\t\t}\n\t\t\t: function() {\n\t\t\t\tbase.apply(this, arguments);\n\t\t\t\tmixinFunc.apply(this, arguments);\n\t\t\t};\n\ttarget[funcName] = f;\n}", "function patch(proto) {\n /**\n * Invoked whether or not the promise was resolved or rejected.\n *\n * Note: it is possible for f to override the value of the promise if it\n * throws an exception.\n */\n proto.finally = function(f) {\n return this.then(\n function(value) { f(); return value },\n function(error) { f(); throw error });\n };\n\n proto.lift = function() {\n return this.then(\n function(value) { return { resolved: value } },\n function(error) { return { rejected: error } });\n };\n}", "function unhook(vNode, patch, index) {\n\t if (isVNode(vNode)) {\n\t if (vNode.hooks) {\n\t patch[index] = appendPatch(\n\t patch[index],\n\t new VPatch(\n\t VPatch.PROPS,\n\t vNode,\n\t undefinedKeys(vNode.hooks)\n\t )\n\t )\n\t }\n\n\t if (vNode.descendantHooks || vNode.hasThunks) {\n\t var children = vNode.children\n\t var len = children.length\n\t for (var i = 0; i < len; i++) {\n\t var child = children[i]\n\t index += 1\n\n\t unhook(child, patch, index)\n\n\t if (isVNode(child) && child.count) {\n\t index += child.count\n\t }\n\t }\n\t }\n\t } else if (isThunk(vNode)) {\n\t thunks(vNode, null, patch, index)\n\t }\n\t}", "function unhook(vNode, patch, index) {\n\t if (isVNode(vNode)) {\n\t if (vNode.hooks) {\n\t patch[index] = appendPatch(\n\t patch[index],\n\t new VPatch(\n\t VPatch.PROPS,\n\t vNode,\n\t undefinedKeys(vNode.hooks)\n\t )\n\t )\n\t }\n\n\t if (vNode.descendantHooks || vNode.hasThunks) {\n\t var children = vNode.children\n\t var len = children.length\n\t for (var i = 0; i < len; i++) {\n\t var child = children[i]\n\t index += 1\n\n\t unhook(child, patch, index)\n\n\t if (isVNode(child) && child.count) {\n\t index += child.count\n\t }\n\t }\n\t }\n\t } else if (isThunk(vNode)) {\n\t thunks(vNode, null, patch, index)\n\t }\n\t}", "patchAsExpression() {\n this.body.patch();\n }", "function patch (diff) {\n return patchResource(serviceResource, ['remove'])(diff)\n .chain(() => {\n return Future.parallel(2, [\n patchResource(networkResource, ['create', 'update', 'remove'])(diff),\n patchResource(volumeResource, ['create', 'update', 'remove'])(diff)\n ])\n })\n .chain(() => {\n return patchResource(serviceResource, ['create', 'update'])(diff)\n })\n }", "function unhook(vNode, patch, index) {\n if (isVNode(vNode)) {\n if (vNode.hooks) {\n patch[index] = appendPatch(\n patch[index],\n new VPatch(\n VPatch.PROPS,\n vNode,\n undefinedKeys(vNode.hooks)\n )\n )\n }\n\n if (vNode.descendantHooks || vNode.hasThunks) {\n var children = vNode.children\n var len = children.length\n for (var i = 0; i < len; i++) {\n var child = children[i]\n index += 1\n\n unhook(child, patch, index)\n\n if (isVNode(child) && child.count) {\n index += child.count\n }\n }\n }\n } else if (isThunk(vNode)) {\n thunks(vNode, null, patch, index)\n }\n}", "function unhook(vNode, patch, index) {\n if (isVNode(vNode)) {\n if (vNode.hooks) {\n patch[index] = appendPatch(\n patch[index],\n new VPatch(\n VPatch.PROPS,\n vNode,\n undefinedKeys(vNode.hooks)\n )\n )\n }\n\n if (vNode.descendantHooks || vNode.hasThunks) {\n var children = vNode.children\n var len = children.length\n for (var i = 0; i < len; i++) {\n var child = children[i]\n index += 1\n\n unhook(child, patch, index)\n\n if (isVNode(child) && child.count) {\n index += child.count\n }\n }\n }\n } else if (isThunk(vNode)) {\n thunks(vNode, null, patch, index)\n }\n}", "function unhook(vNode, patch, index) {\n if (isVNode(vNode)) {\n if (vNode.hooks) {\n patch[index] = appendPatch(\n patch[index],\n new VPatch(\n VPatch.PROPS,\n vNode,\n undefinedKeys(vNode.hooks)\n )\n )\n }\n\n if (vNode.descendantHooks || vNode.hasThunks) {\n var children = vNode.children\n var len = children.length\n for (var i = 0; i < len; i++) {\n var child = children[i]\n index += 1\n\n unhook(child, patch, index)\n\n if (isVNode(child) && child.count) {\n index += child.count\n }\n }\n }\n } else if (isThunk(vNode)) {\n thunks(vNode, null, patch, index)\n }\n}", "function unhook(vNode, patch, index) {\n if (isVNode(vNode)) {\n if (vNode.hooks) {\n patch[index] = appendPatch(\n patch[index],\n new VPatch(\n VPatch.PROPS,\n vNode,\n undefinedKeys(vNode.hooks)\n )\n )\n }\n\n if (vNode.descendantHooks || vNode.hasThunks) {\n var children = vNode.children\n var len = children.length\n for (var i = 0; i < len; i++) {\n var child = children[i]\n index += 1\n\n unhook(child, patch, index)\n\n if (isVNode(child) && child.count) {\n index += child.count\n }\n }\n }\n } else if (isThunk(vNode)) {\n thunks(vNode, null, patch, index)\n }\n}", "function unhook(vNode, patch, index) {\n if (isVNode(vNode)) {\n if (vNode.hooks) {\n patch[index] = appendPatch(\n patch[index],\n new VPatch(\n VPatch.PROPS,\n vNode,\n undefinedKeys(vNode.hooks)\n )\n )\n }\n\n if (vNode.descendantHooks || vNode.hasThunks) {\n var children = vNode.children\n var len = children.length\n for (var i = 0; i < len; i++) {\n var child = children[i]\n index += 1\n\n unhook(child, patch, index)\n\n if (isVNode(child) && child.count) {\n index += child.count\n }\n }\n }\n } else if (isThunk(vNode)) {\n thunks(vNode, null, patch, index)\n }\n}", "function unhook(vNode, patch, index) {\n if (isVNode(vNode)) {\n if (vNode.hooks) {\n patch[index] = appendPatch(\n patch[index],\n new VPatch(\n VPatch.PROPS,\n vNode,\n undefinedKeys(vNode.hooks)\n )\n )\n }\n\n if (vNode.descendantHooks || vNode.hasThunks) {\n var children = vNode.children\n var len = children.length\n for (var i = 0; i < len; i++) {\n var child = children[i]\n index += 1\n\n unhook(child, patch, index)\n\n if (isVNode(child) && child.count) {\n index += child.count\n }\n }\n }\n } else if (isThunk(vNode)) {\n thunks(vNode, null, patch, index)\n }\n}", "function unhook(vNode, patch, index) {\n if (isVNode(vNode)) {\n if (vNode.hooks) {\n patch[index] = appendPatch(\n patch[index],\n new VPatch(\n VPatch.PROPS,\n vNode,\n undefinedKeys(vNode.hooks)\n )\n )\n }\n\n if (vNode.descendantHooks || vNode.hasThunks) {\n var children = vNode.children\n var len = children.length\n for (var i = 0; i < len; i++) {\n var child = children[i]\n index += 1\n\n unhook(child, patch, index)\n\n if (isVNode(child) && child.count) {\n index += child.count\n }\n }\n }\n } else if (isThunk(vNode)) {\n thunks(vNode, null, patch, index)\n }\n}", "function unhook(vNode, patch, index) {\n if (isVNode(vNode)) {\n if (vNode.hooks) {\n patch[index] = appendPatch(\n patch[index],\n new VPatch(\n VPatch.PROPS,\n vNode,\n undefinedKeys(vNode.hooks)\n )\n )\n }\n\n if (vNode.descendantHooks || vNode.hasThunks) {\n var children = vNode.children\n var len = children.length\n for (var i = 0; i < len; i++) {\n var child = children[i]\n index += 1\n\n unhook(child, patch, index)\n\n if (isVNode(child) && child.count) {\n index += child.count\n }\n }\n }\n } else if (isThunk(vNode)) {\n thunks(vNode, null, patch, index)\n }\n}", "function unhook(vNode, patch, index) {\n if (isVNode(vNode)) {\n if (vNode.hooks) {\n patch[index] = appendPatch(\n patch[index],\n new VPatch(\n VPatch.PROPS,\n vNode,\n undefinedKeys(vNode.hooks)\n )\n )\n }\n\n if (vNode.descendantHooks || vNode.hasThunks) {\n var children = vNode.children\n var len = children.length\n for (var i = 0; i < len; i++) {\n var child = children[i]\n index += 1\n\n unhook(child, patch, index)\n\n if (isVNode(child) && child.count) {\n index += child.count\n }\n }\n }\n } else if (isThunk(vNode)) {\n thunks(vNode, null, patch, index)\n }\n}", "function unhook(vNode, patch, index) {\n if (isVNode(vNode)) {\n if (vNode.hooks) {\n patch[index] = appendPatch(\n patch[index],\n new VPatch(\n VPatch.PROPS,\n vNode,\n undefinedKeys(vNode.hooks)\n )\n )\n }\n\n if (vNode.descendantHooks || vNode.hasThunks) {\n var children = vNode.children\n var len = children.length\n for (var i = 0; i < len; i++) {\n var child = children[i]\n index += 1\n\n unhook(child, patch, index)\n\n if (isVNode(child) && child.count) {\n index += child.count\n }\n }\n }\n } else if (isThunk(vNode)) {\n thunks(vNode, null, patch, index)\n }\n}", "function unhook(vNode, patch, index) {\n if (isVNode(vNode)) {\n if (vNode.hooks) {\n patch[index] = appendPatch(\n patch[index],\n new VPatch(\n VPatch.PROPS,\n vNode,\n undefinedKeys(vNode.hooks)\n )\n )\n }\n\n if (vNode.descendantHooks || vNode.hasThunks) {\n var children = vNode.children\n var len = children.length\n for (var i = 0; i < len; i++) {\n var child = children[i]\n index += 1\n\n unhook(child, patch, index)\n\n if (isVNode(child) && child.count) {\n index += child.count\n }\n }\n }\n } else if (isThunk(vNode)) {\n thunks(vNode, null, patch, index)\n }\n}", "function unhook(vNode, patch, index) {\n if (isVNode(vNode)) {\n if (vNode.hooks) {\n patch[index] = appendPatch(\n patch[index],\n new VPatch(\n VPatch.PROPS,\n vNode,\n undefinedKeys(vNode.hooks)\n )\n )\n }\n\n if (vNode.descendantHooks || vNode.hasThunks) {\n var children = vNode.children\n var len = children.length\n for (var i = 0; i < len; i++) {\n var child = children[i]\n index += 1\n\n unhook(child, patch, index)\n\n if (isVNode(child) && child.count) {\n index += child.count\n }\n }\n }\n } else if (isThunk(vNode)) {\n thunks(vNode, null, patch, index)\n }\n}", "function handleToMovePatchNode(lastVnode, patch) {\n patch.push(createPatchNode(lastVnode, {}, __WEBPACK_IMPORTED_MODULE_3__constant__[\"PATCH_ACTION_TO_MOVE\"]));\n}", "create(patcher, path, root, readonly, immediateFlush = false) {\n let patcherRef = patcher.get(path);\n\n if (!patcherRef || !isObject(patcherRef)) {\n throw new Error(`no object at path ${path}`);\n }\n\n let proxy;\n\n const handlers = {\n get: (target, name) => {\n return this.handleGet(proxy, target, name, readonly);\n },\n has: (target, name) => {\n return Boolean(this.handleGet(proxy, target, name));\n },\n ownKeys: (target) => {\n return this.handleOwnKeys(proxy, target);\n },\n enumerate: () => {\n return proxy[Symbol.iterator];\n }\n };\n\n\n if (readonly) {\n handlers.set = (target, name) => {\n throw new Error(`trying to set a value for property \"${name}\" on a read only object`)\n };\n\n handlers.deleteProperty = (target, name) => {\n throw new Error(`trying to delete property \"${name}\" on a read only object `)\n };\n\n } else {\n handlers.set = (target, name, newval) => {\n return this.handleSet(proxy, target, name, newval);\n };\n\n handlers.deleteProperty = (target, name) => {\n return this.handleDelete(proxy, target, name);\n };\n }\n\n\n proxy = new Proxy(patcherRef, handlers);\n\n let properties = {\n immediateFlush,\n patcher,\n path,\n isArray: Array.isArray(patcherRef),\n arrayMethods: {}\n };\n\n if (root) {\n properties.root = root;\n } else {\n properties.changes = {};\n properties.overrides = {};\n properties.dirty = false;\n properties.pullChanges = function pullChanges() {\n let changes = this.changes;\n let overrides = this.overrides;\n this.changes = {};\n this.overrides = {};\n this.dirty = false;\n return [changes, overrides];\n };\n }\n\n this.proxies.set(patcherRef, proxy);\n this.proxyProperties.set(proxy, properties);\n\n return proxy;\n }", "function monkeyPatch() {\n var script = function() {\n window.__karma__ = true;\n (function patch() {\n if (typeof window.__bs === 'undefined') {\n window.setTimeout(patch, 500);\n } else {\n var oldCanSync = window.__bs.prototype.canSync;\n window.__bs.prototype.canSync = function(data, optPath) {\n var index = window.location.pathname.indexOf('/www');\n if (index!==-1) {\n data.url = window.location.pathname.substr(0, index) + data.url.substr(data.url.indexOf('/www'));\n }\n return oldCanSync.apply(this, [data, optPath]);\n };\n }\n }());\n };\n return '<script>(' + script.toString() + '());</script>';\n}", "function attachPatchData(target,data){target[MONKEY_PATCH_KEY_NAME]=data;}", "create(patcher, path, root) {\n let patcherRef = patcher.get(path);\n\n if (!patcherRef || typeof patcherRef !== 'object') {\n throw new Error('no object at path', path);\n }\n\n let proxy = new Proxy(patcherRef, {\n get: (target, name) => {\n return this.handleGet(proxy, target, name);\n },\n set: (target, name, newval) => {\n return this.handleSet(proxy, target, name, newval);\n },\n has: (target, name) => {\n return Boolean(this.handleSet(proxy, target, name));\n },\n deleteProperty: (target, name) => {\n return this.handleDelete(proxy, target, name);\n }\n });\n\n let properties = {\n patcher,\n path,\n childs: {}\n };\n\n if (root) {\n properties.root = root;\n } else {\n properties.changes = {};\n properties.overrides = {};\n properties.pullChanges = function pullChanges() {\n let changes = this.changes;\n let overrides = this.overrides;\n this.changes = {};\n this.overrides = {};\n\n return [changes, overrides];\n };\n }\n\n this.proxyProperties.set(proxy, properties);\n\n return proxy;\n }", "function thunkify (cb) {\n return function (params) {\n return function (arg1, arg2, arg3, arg4, arg5) {\n return cb(params, arg1, arg2, arg3, arg4, arg5)\n }\n }\n}", "function thunkify1(fn) {\n\treturn function () {\n\t\tvar args = [].slice.call(arguments);\n\t\tvar results;\n\t\tvar called;\n\t\tvar cb;\n\n\t\targs.splice(1, 0, function () {\n\t\t\tresults = arguments;\n\n\t\t\tif (cb && !called) {\n\t\t\t\tcalled = true;\n\t\t\t\tcb.apply(this, results);\n\t\t\t}\n\t\t});\n\n\t\tfn.apply(this, args);\n\n\t\treturn function (fn) {\n\t\t\tcb = fn;\n\n\t\t\tif (results && !called) {\n\t\t\t\tcalled = true;\n\t\t\t\tfn.apply(this, results);\n\t\t\t}\n\t\t}\n\t}\n}", "function patchClass(className){var OriginalClass=_global[className];if(!OriginalClass)return;// keep original class in global\n_global[zoneSymbol(className)]=OriginalClass;_global[className]=function(){var a=bindArguments(arguments,className);switch(a.length){case 0:this[originalInstanceKey]=new OriginalClass;break;case 1:this[originalInstanceKey]=new OriginalClass(a[0]);break;case 2:this[originalInstanceKey]=new OriginalClass(a[0],a[1]);break;case 3:this[originalInstanceKey]=new OriginalClass(a[0],a[1],a[2]);break;case 4:this[originalInstanceKey]=new OriginalClass(a[0],a[1],a[2],a[3]);break;default:throw new Error(\"Arg list too long.\");}};// attach original delegate to patched function\nattachOriginToPatched(_global[className],OriginalClass);var instance=new OriginalClass(function(){});var prop;for(prop in instance){// https://bugs.webkit.org/show_bug.cgi?id=44721\nif(className===\"XMLHttpRequest\"&&prop===\"responseBlob\")continue;(function(prop){if(typeof instance[prop]===\"function\"){_global[className].prototype[prop]=function(){return this[originalInstanceKey][prop].apply(this[originalInstanceKey],arguments)}}else{ObjectDefineProperty(_global[className].prototype,prop,{set:function set(fn){if(typeof fn===\"function\"){this[originalInstanceKey][prop]=wrapWithCurrentZone(fn,className+\".\"+prop);// keep callback in wrapped function so we can\n// use it in Function.prototype.toString to return\n// the native one.\nattachOriginToPatched(this[originalInstanceKey][prop],fn)}else{this[originalInstanceKey][prop]=fn}},get:function get(){return this[originalInstanceKey][prop]}})}})(prop)}for(prop in OriginalClass){if(prop!==\"prototype\"&&OriginalClass.hasOwnProperty(prop)){_global[className][prop]=OriginalClass[prop]}}}", "function $trampoline(origThunk)\n{\n var handlerStack = null; // The handler stack for this thread\n var ret = new Object;\n\tret.done = false;\n\tret.thunk = origThunk;\n\n function popHandler(expected)\n {\n var top = handlerStack;\n\n // TEST\n if(expected && (!top || top.k != expected))\n alert(\"assertion failure: expected handler \" + expected + \", got \" + top);\n\n if(top)\n {\n handlerStack = top.next;\n return top.k;\n }\n \n return null;\n }\n \n while(!ret.done)\n\t{\n // Perform handler management\n if(ret.addHandler)\n handlerStack = new HandlerStackEntry(ret.addHandler, handlerStack);\n else if(ret.removeHandler)\n popHandler(ret.removeHandler);\n else if(ret.replaceHandlers)\n handlerStack = ret.replaceHandlers;\n \n // Do the work\n try\n {\n ret = ret.thunk(handlerStack);\n }\n catch(e)\n {\n var handler = popHandler();\n if(handler)\n ret = {done: false, thunk: function() { return handler(e); } };\n else\n throw e;\n }\n }\n\treturn ret.result;\n}", "function ChildReconciler(shouldTrackSideEffects){function deleteChild(returnFiber,childToDelete){if(!shouldTrackSideEffects){// Noop.\n\treturn;}// Deletions are added in reversed order so we add it to the front.\n\t// At this point, the return fiber's effect list is empty except for\n\t// deletions, so we can just append the deletion to the list. The remaining\n\t// effects aren't added until the complete phase. Once we implement\n\t// resuming, this may not be true.\n\tvar last=returnFiber.lastEffect;if(last!==null){last.nextEffect=childToDelete;returnFiber.lastEffect=childToDelete;}else{returnFiber.firstEffect=returnFiber.lastEffect=childToDelete;}childToDelete.nextEffect=null;childToDelete.effectTag=Deletion;}function deleteRemainingChildren(returnFiber,currentFirstChild){if(!shouldTrackSideEffects){// Noop.\n\treturn null;}// TODO: For the shouldClone case, this could be micro-optimized a bit by\n\t// assuming that after the first child we've already added everything.\n\tvar childToDelete=currentFirstChild;while(childToDelete!==null){deleteChild(returnFiber,childToDelete);childToDelete=childToDelete.sibling;}return null;}function mapRemainingChildren(returnFiber,currentFirstChild){// Add the remaining children to a temporary map so that we can find them by\n\t// keys quickly. Implicit (null) keys get added to this set with their index\n\tvar existingChildren=new Map();var existingChild=currentFirstChild;while(existingChild!==null){if(existingChild.key!==null){existingChildren.set(existingChild.key,existingChild);}else{existingChildren.set(existingChild.index,existingChild);}existingChild=existingChild.sibling;}return existingChildren;}function useFiber(fiber,pendingProps,expirationTime){// We currently set sibling to null and index to 0 here because it is easy\n\t// to forget to do before returning it. E.g. for the single child case.\n\tvar clone=createWorkInProgress(fiber,pendingProps,expirationTime);clone.index=0;clone.sibling=null;return clone;}function placeChild(newFiber,lastPlacedIndex,newIndex){newFiber.index=newIndex;if(!shouldTrackSideEffects){// Noop.\n\treturn lastPlacedIndex;}var current=newFiber.alternate;if(current!==null){var oldIndex=current.index;if(oldIndex<lastPlacedIndex){// This is a move.\n\tnewFiber.effectTag=Placement;return lastPlacedIndex;}else{// This item can stay in place.\n\treturn oldIndex;}}else{// This is an insertion.\n\tnewFiber.effectTag=Placement;return lastPlacedIndex;}}function placeSingleChild(newFiber){// This is simpler for the single child case. We only need to do a\n\t// placement for inserting new children.\n\tif(shouldTrackSideEffects&&newFiber.alternate===null){newFiber.effectTag=Placement;}return newFiber;}function updateTextNode(returnFiber,current,textContent,expirationTime){if(current===null||current.tag!==HostText){// Insert\n\tvar created=createFiberFromText(textContent,returnFiber.internalContextTag,expirationTime);created['return']=returnFiber;return created;}else{// Update\n\tvar existing=useFiber(current,textContent,expirationTime);existing['return']=returnFiber;return existing;}}function updateElement(returnFiber,current,element,expirationTime){if(current!==null&&current.type===element.type){// Move based on index\n\tvar existing=useFiber(current,element.props,expirationTime);existing.ref=coerceRef(current,element);existing['return']=returnFiber;{existing._debugSource=element._source;existing._debugOwner=element._owner;}return existing;}else{// Insert\n\tvar created=createFiberFromElement(element,returnFiber.internalContextTag,expirationTime);created.ref=coerceRef(current,element);created['return']=returnFiber;return created;}}function updateCall(returnFiber,current,call,expirationTime){// TODO: Should this also compare handler to determine whether to reuse?\n\tif(current===null||current.tag!==CallComponent){// Insert\n\tvar created=createFiberFromCall(call,returnFiber.internalContextTag,expirationTime);created['return']=returnFiber;return created;}else{// Move based on index\n\tvar existing=useFiber(current,call,expirationTime);existing['return']=returnFiber;return existing;}}function updateReturn(returnFiber,current,returnNode,expirationTime){if(current===null||current.tag!==ReturnComponent){// Insert\n\tvar created=createFiberFromReturn(returnNode,returnFiber.internalContextTag,expirationTime);created.type=returnNode.value;created['return']=returnFiber;return created;}else{// Move based on index\n\tvar existing=useFiber(current,null,expirationTime);existing.type=returnNode.value;existing['return']=returnFiber;return existing;}}function updatePortal(returnFiber,current,portal,expirationTime){if(current===null||current.tag!==HostPortal||current.stateNode.containerInfo!==portal.containerInfo||current.stateNode.implementation!==portal.implementation){// Insert\n\tvar created=createFiberFromPortal(portal,returnFiber.internalContextTag,expirationTime);created['return']=returnFiber;return created;}else{// Update\n\tvar existing=useFiber(current,portal.children||[],expirationTime);existing['return']=returnFiber;return existing;}}function updateFragment(returnFiber,current,fragment,expirationTime,key){if(current===null||current.tag!==Fragment){// Insert\n\tvar created=createFiberFromFragment(fragment,returnFiber.internalContextTag,expirationTime,key);created['return']=returnFiber;return created;}else{// Update\n\tvar existing=useFiber(current,fragment,expirationTime);existing['return']=returnFiber;return existing;}}function createChild(returnFiber,newChild,expirationTime){if(typeof newChild==='string'||typeof newChild==='number'){// Text nodes don't have keys. If the previous node is implicitly keyed\n\t// we can continue to replace it without aborting even if it is not a text\n\t// node.\n\tvar created=createFiberFromText(''+newChild,returnFiber.internalContextTag,expirationTime);created['return']=returnFiber;return created;}if((typeof newChild==='undefined'?'undefined':_typeof(newChild))==='object'&&newChild!==null){switch(newChild.$$typeof){case REACT_ELEMENT_TYPE:{if(newChild.type===REACT_FRAGMENT_TYPE){var _created=createFiberFromFragment(newChild.props.children,returnFiber.internalContextTag,expirationTime,newChild.key);_created['return']=returnFiber;return _created;}else{var _created2=createFiberFromElement(newChild,returnFiber.internalContextTag,expirationTime);_created2.ref=coerceRef(null,newChild);_created2['return']=returnFiber;return _created2;}}case REACT_CALL_TYPE:{var _created3=createFiberFromCall(newChild,returnFiber.internalContextTag,expirationTime);_created3['return']=returnFiber;return _created3;}case REACT_RETURN_TYPE:{var _created4=createFiberFromReturn(newChild,returnFiber.internalContextTag,expirationTime);_created4.type=newChild.value;_created4['return']=returnFiber;return _created4;}case REACT_PORTAL_TYPE:{var _created5=createFiberFromPortal(newChild,returnFiber.internalContextTag,expirationTime);_created5['return']=returnFiber;return _created5;}}if(isArray$1(newChild)||getIteratorFn(newChild)){var _created6=createFiberFromFragment(newChild,returnFiber.internalContextTag,expirationTime,null);_created6['return']=returnFiber;return _created6;}throwOnInvalidObjectType(returnFiber,newChild);}{if(typeof newChild==='function'){warnOnFunctionType();}}return null;}function updateSlot(returnFiber,oldFiber,newChild,expirationTime){// Update the fiber if the keys match, otherwise return null.\n\tvar key=oldFiber!==null?oldFiber.key:null;if(typeof newChild==='string'||typeof newChild==='number'){// Text nodes don't have keys. If the previous node is implicitly keyed\n\t// we can continue to replace it without aborting even if it is not a text\n\t// node.\n\tif(key!==null){return null;}return updateTextNode(returnFiber,oldFiber,''+newChild,expirationTime);}if((typeof newChild==='undefined'?'undefined':_typeof(newChild))==='object'&&newChild!==null){switch(newChild.$$typeof){case REACT_ELEMENT_TYPE:{if(newChild.key===key){if(newChild.type===REACT_FRAGMENT_TYPE){return updateFragment(returnFiber,oldFiber,newChild.props.children,expirationTime,key);}return updateElement(returnFiber,oldFiber,newChild,expirationTime);}else{return null;}}case REACT_CALL_TYPE:{if(newChild.key===key){return updateCall(returnFiber,oldFiber,newChild,expirationTime);}else{return null;}}case REACT_RETURN_TYPE:{// Returns don't have keys. If the previous node is implicitly keyed\n\t// we can continue to replace it without aborting even if it is not a\n\t// yield.\n\tif(key===null){return updateReturn(returnFiber,oldFiber,newChild,expirationTime);}else{return null;}}case REACT_PORTAL_TYPE:{if(newChild.key===key){return updatePortal(returnFiber,oldFiber,newChild,expirationTime);}else{return null;}}}if(isArray$1(newChild)||getIteratorFn(newChild)){if(key!==null){return null;}return updateFragment(returnFiber,oldFiber,newChild,expirationTime,null);}throwOnInvalidObjectType(returnFiber,newChild);}{if(typeof newChild==='function'){warnOnFunctionType();}}return null;}function updateFromMap(existingChildren,returnFiber,newIdx,newChild,expirationTime){if(typeof newChild==='string'||typeof newChild==='number'){// Text nodes don't have keys, so we neither have to check the old nor\n\t// new node for the key. If both are text nodes, they match.\n\tvar matchedFiber=existingChildren.get(newIdx)||null;return updateTextNode(returnFiber,matchedFiber,''+newChild,expirationTime);}if((typeof newChild==='undefined'?'undefined':_typeof(newChild))==='object'&&newChild!==null){switch(newChild.$$typeof){case REACT_ELEMENT_TYPE:{var _matchedFiber=existingChildren.get(newChild.key===null?newIdx:newChild.key)||null;if(newChild.type===REACT_FRAGMENT_TYPE){return updateFragment(returnFiber,_matchedFiber,newChild.props.children,expirationTime,newChild.key);}return updateElement(returnFiber,_matchedFiber,newChild,expirationTime);}case REACT_CALL_TYPE:{var _matchedFiber2=existingChildren.get(newChild.key===null?newIdx:newChild.key)||null;return updateCall(returnFiber,_matchedFiber2,newChild,expirationTime);}case REACT_RETURN_TYPE:{// Returns don't have keys, so we neither have to check the old nor\n\t// new node for the key. If both are returns, they match.\n\tvar _matchedFiber3=existingChildren.get(newIdx)||null;return updateReturn(returnFiber,_matchedFiber3,newChild,expirationTime);}case REACT_PORTAL_TYPE:{var _matchedFiber4=existingChildren.get(newChild.key===null?newIdx:newChild.key)||null;return updatePortal(returnFiber,_matchedFiber4,newChild,expirationTime);}}if(isArray$1(newChild)||getIteratorFn(newChild)){var _matchedFiber5=existingChildren.get(newIdx)||null;return updateFragment(returnFiber,_matchedFiber5,newChild,expirationTime,null);}throwOnInvalidObjectType(returnFiber,newChild);}{if(typeof newChild==='function'){warnOnFunctionType();}}return null;}/**\n\t * Warns if there is a duplicate or missing key\n\t */function warnOnInvalidKey(child,knownKeys){{if((typeof child==='undefined'?'undefined':_typeof(child))!=='object'||child===null){return knownKeys;}switch(child.$$typeof){case REACT_ELEMENT_TYPE:case REACT_CALL_TYPE:case REACT_PORTAL_TYPE:warnForMissingKey(child);var key=child.key;if(typeof key!=='string'){break;}if(knownKeys===null){knownKeys=new Set();knownKeys.add(key);break;}if(!knownKeys.has(key)){knownKeys.add(key);break;}warning(false,'Encountered two children with the same key, `%s`. '+'Keys should be unique so that components maintain their identity '+'across updates. Non-unique keys may cause children to be '+'duplicated and/or omitted — the behavior is unsupported and '+'could change in a future version.%s',key,getCurrentFiberStackAddendum$1());break;default:break;}}return knownKeys;}function reconcileChildrenArray(returnFiber,currentFirstChild,newChildren,expirationTime){// This algorithm can't optimize by searching from boths ends since we\n\t// don't have backpointers on fibers. I'm trying to see how far we can get\n\t// with that model. If it ends up not being worth the tradeoffs, we can\n\t// add it later.\n\t// Even with a two ended optimization, we'd want to optimize for the case\n\t// where there are few changes and brute force the comparison instead of\n\t// going for the Map. It'd like to explore hitting that path first in\n\t// forward-only mode and only go for the Map once we notice that we need\n\t// lots of look ahead. This doesn't handle reversal as well as two ended\n\t// search but that's unusual. Besides, for the two ended optimization to\n\t// work on Iterables, we'd need to copy the whole set.\n\t// In this first iteration, we'll just live with hitting the bad case\n\t// (adding everything to a Map) in for every insert/move.\n\t// If you change this code, also update reconcileChildrenIterator() which\n\t// uses the same algorithm.\n\t{// First, validate keys.\n\tvar knownKeys=null;for(var i=0;i<newChildren.length;i++){var child=newChildren[i];knownKeys=warnOnInvalidKey(child,knownKeys);}}var resultingFirstChild=null;var previousNewFiber=null;var oldFiber=currentFirstChild;var lastPlacedIndex=0;var newIdx=0;var nextOldFiber=null;for(;oldFiber!==null&&newIdx<newChildren.length;newIdx++){if(oldFiber.index>newIdx){nextOldFiber=oldFiber;oldFiber=null;}else{nextOldFiber=oldFiber.sibling;}var newFiber=updateSlot(returnFiber,oldFiber,newChildren[newIdx],expirationTime);if(newFiber===null){// TODO: This breaks on empty slots like null children. That's\n\t// unfortunate because it triggers the slow path all the time. We need\n\t// a better way to communicate whether this was a miss or null,\n\t// boolean, undefined, etc.\n\tif(oldFiber===null){oldFiber=nextOldFiber;}break;}if(shouldTrackSideEffects){if(oldFiber&&newFiber.alternate===null){// We matched the slot, but we didn't reuse the existing fiber, so we\n\t// need to delete the existing child.\n\tdeleteChild(returnFiber,oldFiber);}}lastPlacedIndex=placeChild(newFiber,lastPlacedIndex,newIdx);if(previousNewFiber===null){// TODO: Move out of the loop. This only happens for the first run.\n\tresultingFirstChild=newFiber;}else{// TODO: Defer siblings if we're not at the right index for this slot.\n\t// I.e. if we had null values before, then we want to defer this\n\t// for each null value. However, we also don't want to call updateSlot\n\t// with the previous one.\n\tpreviousNewFiber.sibling=newFiber;}previousNewFiber=newFiber;oldFiber=nextOldFiber;}if(newIdx===newChildren.length){// We've reached the end of the new children. We can delete the rest.\n\tdeleteRemainingChildren(returnFiber,oldFiber);return resultingFirstChild;}if(oldFiber===null){// If we don't have any more existing children we can choose a fast path\n\t// since the rest will all be insertions.\n\tfor(;newIdx<newChildren.length;newIdx++){var _newFiber=createChild(returnFiber,newChildren[newIdx],expirationTime);if(!_newFiber){continue;}lastPlacedIndex=placeChild(_newFiber,lastPlacedIndex,newIdx);if(previousNewFiber===null){// TODO: Move out of the loop. This only happens for the first run.\n\tresultingFirstChild=_newFiber;}else{previousNewFiber.sibling=_newFiber;}previousNewFiber=_newFiber;}return resultingFirstChild;}// Add all children to a key map for quick lookups.\n\tvar existingChildren=mapRemainingChildren(returnFiber,oldFiber);// Keep scanning and use the map to restore deleted items as moves.\n\tfor(;newIdx<newChildren.length;newIdx++){var _newFiber2=updateFromMap(existingChildren,returnFiber,newIdx,newChildren[newIdx],expirationTime);if(_newFiber2){if(shouldTrackSideEffects){if(_newFiber2.alternate!==null){// The new fiber is a work in progress, but if there exists a\n\t// current, that means that we reused the fiber. We need to delete\n\t// it from the child list so that we don't add it to the deletion\n\t// list.\n\texistingChildren['delete'](_newFiber2.key===null?newIdx:_newFiber2.key);}}lastPlacedIndex=placeChild(_newFiber2,lastPlacedIndex,newIdx);if(previousNewFiber===null){resultingFirstChild=_newFiber2;}else{previousNewFiber.sibling=_newFiber2;}previousNewFiber=_newFiber2;}}if(shouldTrackSideEffects){// Any existing children that weren't consumed above were deleted. We need\n\t// to add them to the deletion list.\n\texistingChildren.forEach(function(child){return deleteChild(returnFiber,child);});}return resultingFirstChild;}function reconcileChildrenIterator(returnFiber,currentFirstChild,newChildrenIterable,expirationTime){// This is the same implementation as reconcileChildrenArray(),\n\t// but using the iterator instead.\n\tvar iteratorFn=getIteratorFn(newChildrenIterable);!(typeof iteratorFn==='function')?invariant(false,'An object is not an iterable. This error is likely caused by a bug in React. Please file an issue.'):void 0;{// Warn about using Maps as children\n\tif(typeof newChildrenIterable.entries==='function'){var possibleMap=newChildrenIterable;if(possibleMap.entries===iteratorFn){warning(didWarnAboutMaps,'Using Maps as children is unsupported and will likely yield '+'unexpected results. Convert it to a sequence/iterable of keyed '+'ReactElements instead.%s',getCurrentFiberStackAddendum$1());didWarnAboutMaps=true;}}// First, validate keys.\n\t// We'll get a different iterator later for the main pass.\n\tvar _newChildren=iteratorFn.call(newChildrenIterable);if(_newChildren){var knownKeys=null;var _step=_newChildren.next();for(;!_step.done;_step=_newChildren.next()){var child=_step.value;knownKeys=warnOnInvalidKey(child,knownKeys);}}}var newChildren=iteratorFn.call(newChildrenIterable);!(newChildren!=null)?invariant(false,'An iterable object provided no iterator.'):void 0;var resultingFirstChild=null;var previousNewFiber=null;var oldFiber=currentFirstChild;var lastPlacedIndex=0;var newIdx=0;var nextOldFiber=null;var step=newChildren.next();for(;oldFiber!==null&&!step.done;newIdx++,step=newChildren.next()){if(oldFiber.index>newIdx){nextOldFiber=oldFiber;oldFiber=null;}else{nextOldFiber=oldFiber.sibling;}var newFiber=updateSlot(returnFiber,oldFiber,step.value,expirationTime);if(newFiber===null){// TODO: This breaks on empty slots like null children. That's\n\t// unfortunate because it triggers the slow path all the time. We need\n\t// a better way to communicate whether this was a miss or null,\n\t// boolean, undefined, etc.\n\tif(!oldFiber){oldFiber=nextOldFiber;}break;}if(shouldTrackSideEffects){if(oldFiber&&newFiber.alternate===null){// We matched the slot, but we didn't reuse the existing fiber, so we\n\t// need to delete the existing child.\n\tdeleteChild(returnFiber,oldFiber);}}lastPlacedIndex=placeChild(newFiber,lastPlacedIndex,newIdx);if(previousNewFiber===null){// TODO: Move out of the loop. This only happens for the first run.\n\tresultingFirstChild=newFiber;}else{// TODO: Defer siblings if we're not at the right index for this slot.\n\t// I.e. if we had null values before, then we want to defer this\n\t// for each null value. However, we also don't want to call updateSlot\n\t// with the previous one.\n\tpreviousNewFiber.sibling=newFiber;}previousNewFiber=newFiber;oldFiber=nextOldFiber;}if(step.done){// We've reached the end of the new children. We can delete the rest.\n\tdeleteRemainingChildren(returnFiber,oldFiber);return resultingFirstChild;}if(oldFiber===null){// If we don't have any more existing children we can choose a fast path\n\t// since the rest will all be insertions.\n\tfor(;!step.done;newIdx++,step=newChildren.next()){var _newFiber3=createChild(returnFiber,step.value,expirationTime);if(_newFiber3===null){continue;}lastPlacedIndex=placeChild(_newFiber3,lastPlacedIndex,newIdx);if(previousNewFiber===null){// TODO: Move out of the loop. This only happens for the first run.\n\tresultingFirstChild=_newFiber3;}else{previousNewFiber.sibling=_newFiber3;}previousNewFiber=_newFiber3;}return resultingFirstChild;}// Add all children to a key map for quick lookups.\n\tvar existingChildren=mapRemainingChildren(returnFiber,oldFiber);// Keep scanning and use the map to restore deleted items as moves.\n\tfor(;!step.done;newIdx++,step=newChildren.next()){var _newFiber4=updateFromMap(existingChildren,returnFiber,newIdx,step.value,expirationTime);if(_newFiber4!==null){if(shouldTrackSideEffects){if(_newFiber4.alternate!==null){// The new fiber is a work in progress, but if there exists a\n\t// current, that means that we reused the fiber. We need to delete\n\t// it from the child list so that we don't add it to the deletion\n\t// list.\n\texistingChildren['delete'](_newFiber4.key===null?newIdx:_newFiber4.key);}}lastPlacedIndex=placeChild(_newFiber4,lastPlacedIndex,newIdx);if(previousNewFiber===null){resultingFirstChild=_newFiber4;}else{previousNewFiber.sibling=_newFiber4;}previousNewFiber=_newFiber4;}}if(shouldTrackSideEffects){// Any existing children that weren't consumed above were deleted. We need\n\t// to add them to the deletion list.\n\texistingChildren.forEach(function(child){return deleteChild(returnFiber,child);});}return resultingFirstChild;}function reconcileSingleTextNode(returnFiber,currentFirstChild,textContent,expirationTime){// There's no need to check for keys on text nodes since we don't have a\n\t// way to define them.\n\tif(currentFirstChild!==null&&currentFirstChild.tag===HostText){// We already have an existing node so let's just update it and delete\n\t// the rest.\n\tdeleteRemainingChildren(returnFiber,currentFirstChild.sibling);var existing=useFiber(currentFirstChild,textContent,expirationTime);existing['return']=returnFiber;return existing;}// The existing first child is not a text node so we need to create one\n\t// and delete the existing ones.\n\tdeleteRemainingChildren(returnFiber,currentFirstChild);var created=createFiberFromText(textContent,returnFiber.internalContextTag,expirationTime);created['return']=returnFiber;return created;}function reconcileSingleElement(returnFiber,currentFirstChild,element,expirationTime){var key=element.key;var child=currentFirstChild;while(child!==null){// TODO: If key === null and child.key === null, then this only applies to\n\t// the first item in the list.\n\tif(child.key===key){if(child.tag===Fragment?element.type===REACT_FRAGMENT_TYPE:child.type===element.type){deleteRemainingChildren(returnFiber,child.sibling);var existing=useFiber(child,element.type===REACT_FRAGMENT_TYPE?element.props.children:element.props,expirationTime);existing.ref=coerceRef(child,element);existing['return']=returnFiber;{existing._debugSource=element._source;existing._debugOwner=element._owner;}return existing;}else{deleteRemainingChildren(returnFiber,child);break;}}else{deleteChild(returnFiber,child);}child=child.sibling;}if(element.type===REACT_FRAGMENT_TYPE){var created=createFiberFromFragment(element.props.children,returnFiber.internalContextTag,expirationTime,element.key);created['return']=returnFiber;return created;}else{var _created7=createFiberFromElement(element,returnFiber.internalContextTag,expirationTime);_created7.ref=coerceRef(currentFirstChild,element);_created7['return']=returnFiber;return _created7;}}function reconcileSingleCall(returnFiber,currentFirstChild,call,expirationTime){var key=call.key;var child=currentFirstChild;while(child!==null){// TODO: If key === null and child.key === null, then this only applies to\n\t// the first item in the list.\n\tif(child.key===key){if(child.tag===CallComponent){deleteRemainingChildren(returnFiber,child.sibling);var existing=useFiber(child,call,expirationTime);existing['return']=returnFiber;return existing;}else{deleteRemainingChildren(returnFiber,child);break;}}else{deleteChild(returnFiber,child);}child=child.sibling;}var created=createFiberFromCall(call,returnFiber.internalContextTag,expirationTime);created['return']=returnFiber;return created;}function reconcileSingleReturn(returnFiber,currentFirstChild,returnNode,expirationTime){// There's no need to check for keys on yields since they're stateless.\n\tvar child=currentFirstChild;if(child!==null){if(child.tag===ReturnComponent){deleteRemainingChildren(returnFiber,child.sibling);var existing=useFiber(child,null,expirationTime);existing.type=returnNode.value;existing['return']=returnFiber;return existing;}else{deleteRemainingChildren(returnFiber,child);}}var created=createFiberFromReturn(returnNode,returnFiber.internalContextTag,expirationTime);created.type=returnNode.value;created['return']=returnFiber;return created;}function reconcileSinglePortal(returnFiber,currentFirstChild,portal,expirationTime){var key=portal.key;var child=currentFirstChild;while(child!==null){// TODO: If key === null and child.key === null, then this only applies to\n\t// the first item in the list.\n\tif(child.key===key){if(child.tag===HostPortal&&child.stateNode.containerInfo===portal.containerInfo&&child.stateNode.implementation===portal.implementation){deleteRemainingChildren(returnFiber,child.sibling);var existing=useFiber(child,portal.children||[],expirationTime);existing['return']=returnFiber;return existing;}else{deleteRemainingChildren(returnFiber,child);break;}}else{deleteChild(returnFiber,child);}child=child.sibling;}var created=createFiberFromPortal(portal,returnFiber.internalContextTag,expirationTime);created['return']=returnFiber;return created;}// This API will tag the children with the side-effect of the reconciliation\n\t// itself. They will be added to the side-effect list as we pass through the\n\t// children and the parent.\n\tfunction reconcileChildFibers(returnFiber,currentFirstChild,newChild,expirationTime){// This function is not recursive.\n\t// If the top level item is an array, we treat it as a set of children,\n\t// not as a fragment. Nested arrays on the other hand will be treated as\n\t// fragment nodes. Recursion happens at the normal flow.\n\t// Handle top level unkeyed fragments as if they were arrays.\n\t// This leads to an ambiguity between <>{[...]}</> and <>...</>.\n\t// We treat the ambiguous cases above the same.\n\tif((typeof newChild==='undefined'?'undefined':_typeof(newChild))==='object'&&newChild!==null&&newChild.type===REACT_FRAGMENT_TYPE&&newChild.key===null){newChild=newChild.props.children;}// Handle object types\n\tvar isObject=(typeof newChild==='undefined'?'undefined':_typeof(newChild))==='object'&&newChild!==null;if(isObject){switch(newChild.$$typeof){case REACT_ELEMENT_TYPE:return placeSingleChild(reconcileSingleElement(returnFiber,currentFirstChild,newChild,expirationTime));case REACT_CALL_TYPE:return placeSingleChild(reconcileSingleCall(returnFiber,currentFirstChild,newChild,expirationTime));case REACT_RETURN_TYPE:return placeSingleChild(reconcileSingleReturn(returnFiber,currentFirstChild,newChild,expirationTime));case REACT_PORTAL_TYPE:return placeSingleChild(reconcileSinglePortal(returnFiber,currentFirstChild,newChild,expirationTime));}}if(typeof newChild==='string'||typeof newChild==='number'){return placeSingleChild(reconcileSingleTextNode(returnFiber,currentFirstChild,''+newChild,expirationTime));}if(isArray$1(newChild)){return reconcileChildrenArray(returnFiber,currentFirstChild,newChild,expirationTime);}if(getIteratorFn(newChild)){return reconcileChildrenIterator(returnFiber,currentFirstChild,newChild,expirationTime);}if(isObject){throwOnInvalidObjectType(returnFiber,newChild);}{if(typeof newChild==='function'){warnOnFunctionType();}}if(typeof newChild==='undefined'){// If the new child is undefined, and the return fiber is a composite\n\t// component, throw an error. If Fiber return types are disabled,\n\t// we already threw above.\n\tswitch(returnFiber.tag){case ClassComponent:{{var instance=returnFiber.stateNode;if(instance.render._isMockFunction){// We allow auto-mocks to proceed as if they're returning null.\n\tbreak;}}}// Intentionally fall through to the next case, which handles both\n\t// functions and classes\n\t// eslint-disable-next-lined no-fallthrough\n\tcase FunctionalComponent:{var Component=returnFiber.type;invariant(false,'%s(...): Nothing was returned from render. This usually means a return statement is missing. Or, to render nothing, return null.',Component.displayName||Component.name||'Component');}}}// Remaining cases are all treated as empty.\n\treturn deleteRemainingChildren(returnFiber,currentFirstChild);}return reconcileChildFibers;}", "unpatch() {\n if (this._patch) {\n Math.random = this._patch;\n delete this._patch;\n }\n }", "unpatch() {\n if (this._patch) {\n Math.random = this._patch;\n delete this._patch;\n }\n }", "handlePatch(patch) {\n if (patch.Id != this.id)\n throw \"This patch does not belong to this device\"\n \n this.log.debug(\"Patching data: \", this.data)\n this.log.debug(\"Applying patch: \", patch)\n\n if (!this.data) this.data = {} \n \n dataPatch(this.data, patch)\n\n this.log.debug(\"Patched data: \", this.data)\n\n this.notify()\n }", "addPatchRoute(route, ...handlers) {\n this.addRoute('patch', route, ...handlers);\n }" ]
[ "0.72868633", "0.72016394", "0.7121984", "0.7121984", "0.7121984", "0.7121984", "0.7121984", "0.7121984", "0.7121984", "0.7121984", "0.7121984", "0.7121984", "0.71188897", "0.71188897", "0.71188897", "0.71188897", "0.71188897", "0.71188897", "0.6899918", "0.61617285", "0.6118812", "0.60673136", "0.5716845", "0.57162935", "0.5642373", "0.5623871", "0.55915916", "0.5570136", "0.5506257", "0.5484147", "0.54820126", "0.5471923", "0.54638875", "0.54615074", "0.5459", "0.5415124", "0.5415124", "0.5403032", "0.5402522", "0.53965485", "0.53965485", "0.53965485", "0.53965485", "0.53564286", "0.5354506", "0.5345857", "0.5345857", "0.5345857", "0.5302206", "0.5301802", "0.5281078", "0.5274719", "0.5272282", "0.5262701", "0.52570426", "0.5254462", "0.5236524", "0.52147853", "0.52087915", "0.5201582", "0.5200652", "0.5184329", "0.517735", "0.5161987", "0.5151354", "0.5142601", "0.51425874", "0.51260185", "0.5121543", "0.5121543", "0.5095382", "0.5095105", "0.50697494", "0.50697494", "0.50697494", "0.50697494", "0.50697494", "0.50697494", "0.50697494", "0.50697494", "0.50697494", "0.50697494", "0.50697494", "0.50697494", "0.50649273", "0.50610167", "0.50563216", "0.50562173", "0.5049736", "0.50352776", "0.5031697", "0.5031288", "0.50201255", "0.5015368", "0.50089663", "0.50089663", "0.50075847", "0.49916804" ]
0.725413
3
Execute hooks when two nodes are identical
function unhook(vNode, patch, index) { if (isVNode(vNode)) { if (vNode.hooks) { patch[index] = appendPatch( patch[index], new VPatch( VPatch.PROPS, vNode, undefinedKeys(vNode.hooks) ) ) } if (vNode.descendantHooks || vNode.hasThunks) { var children = vNode.children var len = children.length for (var i = 0; i < len; i++) { var child = children[i] index += 1 unhook(child, patch, index) if (isVNode(child) && child.count) { index += child.count } } } } else if (isThunk(vNode)) { thunks(vNode, null, patch, index) } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function nodesEqualOnto(node1,node2){\n node1.each(function(d){\n node2.each(function(d1){\n return d.index==d1.index;\n });\n });\n}", "isSameNode(otherNode) {\n return this.unique === otherNode.unique;\n }", "function ancestoryTest(node1, node2) {\n var tmp = node1;\n while (tmp) {\n if (tmp === node2) return true;\n tmp = tmp.parent;\n }\n tmp = node2;\n while (tmp) {\n if (tmp === node1) return true;\n tmp = tmp.parent;\n }\n return false;\n }", "function areEqualNodes(node1, node2) {\n return node1.row === node2.row && node1.column === node2.column;\n}", "function bubbleCompareNodes(){\n addStep(\"Compare current Node \" + (bubbleIndex + 1) + \" next Node \" + (bubbleIndex + 2) + \".\");\n if(bubbleIndex > 0){\n setClass(nodes[bubbleIndex - 1], 2, \"Default\"); \n }\n setClass(nodes[bubbleIndex], 2, \"Current\"); \n setClass(nodes[bubbleIndex + 1], 2, \"Special\");\n if(orderArray[bubbleIndex] > orderArray[bubbleIndex + 1]){\n bubbleSwap = true;\n return;\n }\n bubbleIndex++;\n}", "_changedNode(){\n\n if (this.root.autoMerklify)\n this._refreshHash(true);\n }", "areNodesEqual(nodeA, nodeB) {\n if (!nodeA && !nodeB) return true;\n if ((!nodeA && nodeB) || (nodeA && !nodeB)) return false;\n return (\n nodeA.key === nodeB.key &&\n nodeA.value === nodeB.value &&\n nodeA.isActive === nodeB.isActive\n );\n }", "function hotSwap(from, to)\n\t\t{\n\t\t\tfunction similar(nodeOld,nodeNew)\n\t\t\t{\n\t\t\t\tif (nodeOld.id !== nodeNew.id)\n\t\t\t\t{\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t\tif (nodeOld.isOutput)\n\t\t\t\t{\n\t\t\t\t\treturn nodeNew.isOutput;\n\t\t\t\t}\n\t\t\t\treturn nodeOld.kids.length === nodeNew.kids.length;\n\t\t\t}\n\t\t\tfunction swap(nodeOld,nodeNew)\n\t\t\t{\n\t\t\t\tnodeNew.value = nodeOld.value;\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\tvar canSwap = depthFirstTraversals(similar, from.inputs, to.inputs);\n\t\t\tif (canSwap)\n\t\t\t{\n\t\t\t\tdepthFirstTraversals(swap, from.inputs, to.inputs);\n\t\t\t}\n\t\t\tfrom.node.parentNode.replaceChild(to.node, from.node);\n\n\t\t\treturn canSwap;\n\t\t}", "function hotSwap(from, to)\n\t\t{\n\t\t\tfunction similar(nodeOld, nodeNew)\n\t\t\t{\n\t\t\t\tif (nodeOld.id !== nodeNew.id)\n\t\t\t\t{\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t\tif (nodeOld.isOutput)\n\t\t\t\t{\n\t\t\t\t\treturn nodeNew.isOutput;\n\t\t\t\t}\n\t\t\t\treturn nodeOld.kids.length === nodeNew.kids.length;\n\t\t\t}\n\t\t\tfunction swap(nodeOld, nodeNew)\n\t\t\t{\n\t\t\t\tnodeNew.value = nodeOld.value;\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\tvar canSwap = depthFirstTraversals(similar, from.inputs, to.inputs);\n\t\t\tif (canSwap)\n\t\t\t{\n\t\t\t\tdepthFirstTraversals(swap, from.inputs, to.inputs);\n\t\t\t}\n\t\t\tfrom.node.parentNode.replaceChild(to.node, from.node);\n\n\t\t\treturn canSwap;\n\t\t}", "mergeNodes(node1, node2) {\n const mergedProps = merge(cloneDeep(node1.props), node2.props);\n const mergedChildren = this.mergeChildren(node1.props.children, node2.props.children);\n return this.setId(React.cloneElement(node1, mergedProps, mergedChildren));\n }", "function isReallyEqual(a, b) {\n if (a && a.isEqualNode) {\n return a.isEqualNode(b)\n }\n return isEqual(a, b)\n}", "function isSameNode(a, b) {\n // If isSameNode isn't present, we assume that the browser\n // is new enough to support === with equivalent semantics.\n // If the browser is older than isSameNode, nothing will work\n // anyway.\n if (typeof a.isSameNode !== 'undefined') {\n return a.isSameNode(b);\n }\n\n return a === b;\n }", "function assertEquivalentNodes(previousNodes, nodes) {\n if (previousNodes.length !== nodes.length) {\n throw new Error('The number of i18n message children changed between first and second pass.');\n }\n if (previousNodes.some((node, i) => nodes[i].constructor !== node.constructor)) {\n throw new Error('The types of the i18n message children changed between first and second pass.');\n }\n}", "function assertEquivalentNodes(previousNodes, nodes) {\n if (previousNodes.length !== nodes.length) {\n throw new Error('The number of i18n message children changed between first and second pass.');\n }\n if (previousNodes.some((node, i) => nodes[i].constructor !== node.constructor)) {\n throw new Error('The types of the i18n message children changed between first and second pass.');\n }\n}", "function assertEquivalentNodes(previousNodes, nodes) {\n if (previousNodes.length !== nodes.length) {\n throw new Error('The number of i18n message children changed between first and second pass.');\n }\n\n if (previousNodes.some(function (node, i) {\n return nodes[i].constructor !== node.constructor;\n })) {\n throw new Error('The types of the i18n message children changed between first and second pass.');\n }\n}", "areCousins(node1, node2) {}", "areCousins(node1, node2) {\n\n }", "areCousins(node1, node2) {\n\n }", "function mayWorkFor(node1, node2) {\n if (!(node1 instanceof go.Node)) return false; // must be a Node\n if (node1 === node2) return false; // cannot work for yourself\n if (node2.isInTreeOf(node1)) return false; // cannot work for someone who works for you\n return true;\n }", "oppositeNode(node) {\n if (this.inputNode === node) {\n return this.outputNode;\n } else if (this.outputNode === node) {\n return this.inputNode;\n }\n\n return;\n }", "function maintainCommonNodes(context, diffs, desired, nodeList, tenantId, uncheckedDiff) {\n function processNode(path) {\n const address = ipUtil.splitAddress(path.split('/').pop())[0];\n const commonNode = nodeList.find((n) => n.key === address);\n if (commonNode && typeof desired[commonNode.fullPath] === 'undefined') {\n updateNodes(nodeList, commonNode.fullPath, diffs, desired);\n }\n }\n\n function addNodesFromDesiredConfigToUncheckedDiff() {\n if (context.tasks[context.currentIndex].unchecked && tenantId === 'Common' && context.tasks[context.currentIndex].firstPassNoDelete) {\n Object.keys(desired).forEach((key) => {\n if (desired[key].command === 'ltm node' && key.startsWith('/Common/')) {\n uncheckedDiff[key] = util.simpleCopy(desired[key]);\n }\n });\n }\n }\n\n for (let i = 0; i < diffs.length; i += 1) {\n // handle incrementing the ref count\n if (diffs[i].kind === 'N'\n && isConfigForCommonNode(diffs[i].rhs.command, diffs[i].path[0], diffs[i].rhs.properties)) {\n diffs[i].rhs.properties.metadata.references.value += 1;\n\n // if more than one tenant is referencing it, we need to change\n // the new to an edit.\n if (diffs[i].rhs.properties.metadata.references.value > 1) {\n // have to completely replace the diff because the fields are read only\n const replacementDiff = {\n kind: 'E',\n path: diffs[i].path,\n rhs: diffs[i].rhs,\n lhsCommand: 'ltm node'\n };\n\n diffs[i] = replacementDiff;\n }\n // update the node list in case another tenant we are processing also uses this node\n for (let j = 0; j < nodeList.length; j += 1) {\n if (nodeList[j].fullPath === diffs[i].path[0]) {\n nodeList[j].metadata.forEach((data) => {\n if (data.name === 'references') {\n data.value = parseInt(data.value, 10) + 1;\n } else if (typeof data.value === 'undefined') {\n data.value = 'none';\n }\n });\n break;\n }\n }\n // Handle decrementing ref counts. Wait until second pass of Common when decrementing\n } else if (diffs[i].kind === 'D' && context.tasks[context.currentIndex].firstPassNoDelete !== true) {\n // handle deleting entire pools\n if (diffs[i].lhs && diffs[i].lhs.command === 'ltm pool' && diffs[i].lhs.properties\n && diffs[i].lhs.properties.members) {\n Object.keys(diffs[i].lhs.properties.members).forEach((member) => {\n processNode(member);\n });\n // handle deleting a single pool member or data group\n } else if (diffs[i].path && diffs[i].path.length === 4) {\n processNode(diffs[i].path[3].replace(/\"/g, ''));\n }\n }\n }\n\n addNodesFromDesiredConfigToUncheckedDiff();\n}", "compareTwoGeometries() {\n this.sendAction('clear');\n this.sendAction('compareTwoGeometries', 'open');\n }", "function switchColors(node1, node2){\n let tempColor = node1.classList[2];\n setClass(node1, 2, node2.classList[2]);\n setClass(node2, 2, tempColor);\n}", "function diffNode (path, entityId, prev, next, el) {\n // Type changed. This could be from element->text, text->ComponentA,\n // ComponentA->ComponentB etc. But NOT div->span. These are the same type\n // (ElementNode) but different tag name.\n if (prev.type !== next.type) return replaceElement(entityId, path, el, next)\n\n switch (next.type) {\n case 'text': return diffText(prev, next, el)\n case 'element': return diffElement(path, entityId, prev, next, el)\n case 'component': return diffComponent(path, entityId, prev, next, el)\n }\n }", "function sameDisease(e, object) {\n var key = object.part.data.key;\n var node = findNode(key, globalLogicData);\n node.hasSameDisease = !node.hasSameDisease;\n node.containGen = false;\n reRender(key);\n}", "_onNodesChanged() {\n\t\tif (!this.mainNodeDevice || this.mainNodeDevice.isDeleted) {\n\t\t\tconst mainNodeId = Object.keys(this._manager._nodes)[0]; //this.getData().token;\n\t\t\tthis.mainNodeDevice = this.getDriver().getDevices().find(device =>\n\t\t\t\tdevice.getData().token === mainNodeId\n\t\t\t)\n\t\t\tif (mainNodeId == this.getData().token) this.log('mainNodeID registered as', mainNodeId)\n\t\t}\n\t}", "function replaceDuplicates() {\n //Create a node -> node id mapping\n node_by_id = {};\n nodes.forEach(function (d) {\n node_by_id[d.id] = d;\n });\n var duplicates = edges.filter(function (d) {\n return d.predicate === 'exactMatch';\n });\n duplicates.forEach(function (d) {\n var source_node = node_by_id[d.source];\n var target_node = node_by_id[d.target];\n\n if (source_node && target_node) {\n var n_stay, n_replace;\n\n if (source_node.group === 'unesco') {\n n_stay = source_node;\n n_replace = target_node;\n } else if (target_node.group === 'unesco') {\n n_stay = target_node;\n n_replace = source_node;\n } else if (source_node.group === 'main') {\n n_stay = source_node;\n n_replace = target_node;\n } else if (target_node.group === 'main') {\n n_stay = target_node;\n n_replace = source_node;\n } else {\n console.log('strange exactMatch going on ', source_node, target_node);\n return;\n } //Replace all edges of the replaced node by the staying node\n\n\n edges.filter(function (l) {\n return l.source === n_replace.id || l.target === n_replace.id;\n }).forEach(function (l) {\n if (l.source === n_replace.id) l.source = n_stay.id;else l.target = n_stay.id;\n }); //forEach\n } //if\n\n }); //forEach\n //Remove all exactMatch edges\n\n edges = edges.filter(function (d) {\n return d.predicate !== 'exactMatch';\n });\n } //function replaceDuplicates", "renameNode(oldId, newId) {\n this.checkTransactionStart();\n\n let node = this.getNode(oldId);\n if (!node) { return; }\n node.id = newId;\n\n for (let i = 0; i < this.edges.length; i++) {\n let edge = this.edges[i];\n if (!edge) { continue; }\n if (edge.from.node === oldId) {\n edge.from.node = newId;\n }\n if (edge.to.node === oldId) {\n edge.to.node = newId;\n }\n }\n\n for (let j = 0; j < this.initializers.length; j++) {\n let iip = this.initializers[j];\n if (!iip) { continue; }\n if (iip.to.node === oldId) {\n iip.to.node = newId;\n }\n }\n\n for (var pub in this.inports) {\n var priv = this.inports[pub];\n if (priv.process === oldId) {\n priv.process = newId;\n }\n }\n for (pub in this.outports) {\n var priv = this.outports[pub];\n if (priv.process === oldId) {\n priv.process = newId;\n }\n }\n for (let k = 0; k < this.exports.length; k++) {\n let exported = this.exports[k];\n if (exported.process === oldId) {\n exported.process = newId;\n }\n }\n\n for (let i1 = 0; i1 < this.groups.length; i1++) {\n let group = this.groups[i1];\n if (!group) { continue; }\n let index = group.nodes.indexOf(oldId);\n if (index === -1) { continue; }\n group.nodes[index] = newId;\n }\n\n this.emit('renameNode', oldId, newId);\n return this.checkTransactionEnd();\n }", "function replaceDuplicates() {\n //Create a node -> node id mapping\n node_by_id = {};\n nodes.forEach(function (d) {\n node_by_id[d.id] = d;\n });\n var duplicates = edges.filter(function (d) {\n return d.predicate === 'exactMatch';\n });\n duplicates.forEach(function (d) {\n var source_node = node_by_id[d.source];\n var target_node = node_by_id[d.target];\n\n if (source_node && target_node) {\n var n_stay, n_replace;\n\n if (source_node.group === 'nature') {\n n_stay = source_node;\n n_replace = target_node;\n } else if (target_node.group === 'nature') {\n n_stay = target_node;\n n_replace = source_node;\n } else if (source_node.group === 'biome') {\n n_stay = source_node;\n n_replace = target_node;\n } else if (target_node.group === 'biome') {\n n_stay = target_node;\n n_replace = source_node;\n } else {\n console.log('strange exactMatch going on ', source_node, target_node);\n return;\n } //Replace all edges of the replaced node by the staying node\n\n\n edges.filter(function (l) {\n return l.source === n_replace.id || l.target === n_replace.id;\n }).forEach(function (l) {\n if (l.source === n_replace.id) l.source = n_stay.id;else l.target = n_stay.id;\n }); //forEach\n } //if\n\n }); //forEach\n //Remove all exactMatch edges\n\n edges = edges.filter(function (d) {\n return d.predicate !== 'exactMatch';\n });\n } //function replaceDuplicates", "function connect(node1, node2){\n let [r1, c1] = node1.id.split('-').map((i)=>parseInt(i));\n let [r2, c2] = node2.id.split('-').map((i)=>parseInt(i));\n let cur = this.nodes[`${(r1+r2)/2}-${(c1+c2)/2}`];\n if(this.specialTypes.includes(cur.type)) return;\n cur.type = 'unvisited';\n this.nodesToAnimate.push(cur);\n // document.getElementById(cur.id).className = 'unvisited';\n }", "function diffNode (path, entityId, prev, next, el) {\n\t var leftType = nodeType(prev)\n\t var rightType = nodeType(next)\n\n\t // Type changed. This could be from element->text, text->ComponentA,\n\t // ComponentA->ComponentB etc. But NOT div->span. These are the same type\n\t // (ElementNode) but different tag name.\n\t if (leftType !== rightType) return replaceElement(entityId, path, el, next)\n\n\t switch (rightType) {\n\t case 'text': return diffText(prev, next, el)\n\t case 'empty': return el\n\t case 'element': return diffElement(path, entityId, prev, next, el)\n\t case 'component': return diffComponent(path, entityId, prev, next, el)\n\t }\n\t }", "function merge_nodes(source_node_id, target_node_id, consequences) {\n if (consequences.status != null && consequences.status == 'ok') {\n merge_node(source_node_id, target_node_id);\n if (consequences.checkalign != null) {\n // Remove all prior checkmerge button groups\n $('[id*=\"nomerge\"]').parent().remove();\n // Remove all leftover temp relations\n $('.checkalign').remove();\n $.each(consequences.checkalign, function(index, node_ids) {\n var ids_text = node_ids[0] + '-' + node_ids[1];\n var merge_id = 'merge-' + ids_text;\n // Make a checkmerge button if there isn't one already, for this pair\n if ($('#' + merge_id).length == 0) {\n var temp_relation = draw_relation(node_ids[0], node_ids[1], {\n color: \"#89a02c\",\n class: \"checkalign\"\n });\n var sy = parseInt(temp_relation.children('path').attr('d').split('C')[0].split(',')[1]);\n var ey = parseInt(temp_relation.children('path').attr('d').split(' ')[2].split(',')[1]);\n var yC = ey + ((sy - ey) / 2);\n // TODO: compute xC to be always the same distance to the amplitude of the curve\n var xC = parseInt(temp_relation.children('path').attr('d').split(' ')[1].split(',')[0]);\n var svg = $('#svgenlargement').children('svg').svg('get');\n parent_g = svg.group($('#svgenlargement svg g'));\n var yes = svg.image(parent_g, xC, (yC - 8), 16, 16, merge_button_yes, {\n id: merge_id\n });\n var no = svg.image(parent_g, (xC + 20), (yC - 8), 16, 16, merge_button_no, {\n id: 'no' + merge_id\n });\n $(yes).hover(function() {\n $(this).addClass('draggable')\n // Indicate which nodes are active\n get_ellipse(node_ids[0]).attr('fill', '#9999ff');\n get_ellipse(node_ids[1]).attr('fill', '#9999ff');\n }, function() {\n $(this).removeClass('draggable');\n var colorme = $('#update_workspace_button').data('locked') ? color_active : color_inactive;\n colorme(get_ellipse(node_ids[0]));\n colorme(get_ellipse(node_ids[1]));\n });\n $(no).hover(function() {\n $(this).addClass('draggable')\n }, function() {\n $(this).removeClass('draggable')\n });\n $(yes).click(function(evt) {\n // node_ids[0] is the one that goes away\n merge_node(rid2node[node_ids[0]], rid2node[node_ids[1]]);\n temp_relation.remove();\n $(evt.target).parent().remove();\n // remove any suggestions that involve the removed node\n $('[id*=\"-' + node_ids[0] + '\"]').parent().remove();\n $('.checkalign[id*=\"' + rid2node[node_ids[0]] + '\"]').remove();\n //notify backend\n var ncpath = getTextURL('merge');\n var form_values = \"source=\" + node_ids[0] + \"&target=\" + node_ids[1] + \"&single=true\";\n $.post(ncpath, form_values);\n });\n $(no).click(function(evt) {\n temp_relation.remove();\n $(evt.target).parent().remove();\n });\n }\n });\n }\n }\n}", "connect(nodeA, nodeB) {\n if (!this.data.get(nodeA).includes(nodeB))\n this.data.get(nodeA).push(nodeB)\n\n if (this.type == \"undirected\") {\n if (!this.data.get(nodeB).includes(nodeA))\n this.data.get(nodeB).push(nodeA)\n }\n }", "function switchNodes(nodeOne, nodeTwo){\n let tempSize = nodeOne.classList[1];\n setClass(nodeOne, 1, nodeTwo.classList[1]); //set this's size to the already selected one\n setClass(nodeTwo, 1, tempSize); //set the Selected Node to this's size\n}", "static performSync(sourceElement, targetElement) {\n // Syncing identical elements is a no-op\n if (sourceElement.outerHTML !== targetElement.outerHTML) {\n DH$1.syncAttributes(sourceElement, targetElement);\n DH$1.syncContent(sourceElement, targetElement);\n DH$1.syncChildren(sourceElement, targetElement);\n return true;\n }\n\n return false;\n }", "function linkNodes(node1, node2) {\n\tnode1.next = node2;\n\tnode2.prev = node1; \n}", "_onPostEqualized(e) {\n if(e.target !== this.$element[0]){ this._reflow(); }\n }", "function merge_left(source_node_id, target_node_id) {\n $.each(edges_of(get_ellipse(source_node_id)), function(index, edge) {\n if (edge.is_incoming == true) {\n edge.attach_endpoint(target_node_id);\n }\n });\n $(jq(source_node_id)).remove();\n}", "connected(n1, n2) {\n console.log(\"Testing connection between \" + n1 + ' and ' + n2);\n return (this.root(n1) == this.root(n2));\n }", "swapNodes(idx1, idx2) {\n const VALS = this.values;\n\n const temp = VALS[idx1];\n VALS[idx1] = VALS[idx2];\n VALS[idx2] = temp;\n }", "function checkConnectionBetweenProps(target1, target2, excludedNodes) {\n var _Object = Object(_getsubnodes__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(target1, excludedNodes.subNodes),\n subNodes1 = _Object.subNodes,\n prevNodeMap1 = _Object.prevNodeMap;\n\n var _Object2 = Object(_getsubnodes__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(target2, excludedNodes.subNodes),\n subNodes2 = _Object2.subNodes,\n prevNodeMap2 = _Object2.prevNodeMap;\n\n var _iterator471 = _createForOfIteratorHelper(subNodes1),\n _step471;\n\n try {\n for (_iterator471.s(); !(_step471 = _iterator471.n()).done;) {\n var sharedNode = _step471.value;\n\n if (subNodes2.has(sharedNode)) {\n var connection = [];\n connection.push(sharedNode);\n var node = prevNodeMap1.get(sharedNode);\n\n while (node && node !== target1) {\n connection.push(node);\n node = prevNodeMap1.get(node);\n }\n\n node = prevNodeMap2.get(sharedNode);\n\n while (node && node !== target2) {\n connection.unshift(node);\n node = prevNodeMap2.get(node);\n }\n\n console.log('--------');\n console.log({\n target1: target1\n });\n console.log({\n sharedNode: sharedNode\n });\n console.log({\n target2: target2\n });\n console.log({\n connection: connection\n });\n return true;\n }\n }\n } catch (err) {\n _iterator471.e(err);\n } finally {\n _iterator471.f();\n }\n\n return false;\n }", "function changeNodeData() {\n var nodeId = graphData.network.getSelection().nodes[0];\n var newIp = $(\"#change-node-ip-input\")[0].value;\n var newMac = $(\"#change-node-mac-input\")[0].value;\n var changedNode = { id: nodeId };\n if(newIp) {\n changedNode['ip'] = newIp;\n }\n if(newMac) {\n changedNode['mac'] = newMac;\n }\n graphData.nodes.update(changedNode);\n hideChangeForm();\n }", "function notEqual() {\n // 1. TO DO: add animation UI for wrong match\n wrong(cardOneElement);\n wrong(cardTwoElement);\n // 2. flip the card back down\n setTimeout(function () {\n removeWrong(cardOneElement);\n flipDown(cardOneElement);\n }, 250);\n setTimeout(function () {\n removeWrong(cardTwoElement);\n flipDown(cardTwoElement);\n }, 250);\n // 3. reset element pointers\n setTimeout(resetElementPointer, 300);\n}", "fillNode(other) {\n //Incomplete state with 'this' is dangerous, we change these functions to static\n //then fill in the data for a node based upon a metaobject from the server\n this.posX = other.pX;\n this.posY = other.pY;\n this.id = other.id;\n\n this.setName(other.nodeName);\n this.funcDefId = other.funDefId;\n this.nodeDescription = other.nodeDescription;\n this.element.classList.add(style.flowchart_square);\n this.offsetX = other.offsetX;\n this.offsetY = other.offsetY;\n if(this.getMetaType() == \"flowchart_node\"){\n this.functionNameView = InlineView(\n `<p id='${this.id}_function'>${\n this.functionDefinitionInstance ? this.functionDefinitionInstance.name : \"Has no function definition.\" }\\n</p>`,\n );\n } else if (this.getMetaType() == \"parallell_node\") {\n this.functionNameView = InlineView(\n `<p id='${this.id}_function'> Parallell node </p>`);\n } else if (this.getMetaType() == \"conditional_node\") {\n this.functionNameView = InlineView(\n `<p id='${this.id}_function'> Conditional node </p>`);\n }\n this.functionDescription = other.funDefId;\n }", "function sameBranch(p1, p2) {\n if (p1.type == p2.type\n && (p1.parameter == p2.parameter)\n && (p1.location && p2.location)\n && (p1.location == p2.location)\n && (p1.modelName && p2.modelName)\n && (p1.modelName == p2.modelName)\n && (p1.modelSource && p2.modelSource)\n && (p1.modelSource == p2.modelSource)\n && (p1.level && p2.level)\n && (p1.level == p2.level)) {\n return true;\n }\n else {\n return false;\n }\n }", "function mergeTwoNodes(node1, node2) {\n node1.innerHTML = node1.innerHTML + node2.innerHTML\n return node1\n}", "renderNodeChanges(data, dataDiffer = this.dataDiffer, viewContainer = this.nodeOutlet.viewContainer, parentData) {\n const changes = dataDiffer.diff(data);\n if (!changes) {\n return;\n }\n changes.forEachOperation((item, adjustedPreviousIndex, currentIndex) => {\n if (item.previousIndex == null) {\n this.insertNode(data[currentIndex], currentIndex, viewContainer, parentData);\n }\n else if (currentIndex == null) {\n viewContainer.remove(adjustedPreviousIndex);\n this.levels.delete(item.item);\n }\n else {\n const view = viewContainer.get(adjustedPreviousIndex);\n viewContainer.move(view, currentIndex);\n }\n });\n this.changeDetectorRef.detectChanges();\n }", "function updateChildren (newNode, oldNode) {\n // if (DEBUG) {\n // console.log(\n // 'updateChildren\\nold\\n %s\\nnew\\n %s',\n // oldNode && oldNode.outerHTML,\n // newNode && newNode.outerHTML\n // )\n // }\n var oldChild, newChild, morphed, oldMatch\n\n // The offset is only ever increased, and used for [i - offset] in the loop\n var offset = 0\n\n for (var i = 0; ; i++) {\n oldChild = oldNode.childNodes[i]\n newChild = newNode.childNodes[i - offset]\n // if (DEBUG) {\n // console.log(\n // '===\\n- old\\n %s\\n- new\\n %s',\n // oldChild && oldChild.outerHTML,\n // newChild && newChild.outerHTML\n // )\n // }\n // Both nodes are empty, do nothing\n if (!oldChild && !newChild) {\n break\n\n // There is no new child, remove old\n } else if (!newChild) {\n oldNode.removeChild(oldChild)\n i--\n\n // There is no old child, add new\n } else if (!oldChild) {\n oldNode.appendChild(newChild)\n offset++\n\n // Both nodes are the same, morph\n } else if (same(newChild, oldChild)) {\n morphed = walk(newChild, oldChild)\n if (morphed !== oldChild) {\n oldNode.replaceChild(morphed, oldChild)\n offset++\n }\n\n // Both nodes do not share an ID or a placeholder, try reorder\n } else {\n oldMatch = null\n\n // Try and find a similar node somewhere in the tree\n for (var j = i; j < oldNode.childNodes.length; j++) {\n if (same(oldNode.childNodes[j], newChild)) {\n oldMatch = oldNode.childNodes[j]\n break\n }\n }\n\n // If there was a node with the same ID or placeholder in the old list\n if (oldMatch) {\n morphed = walk(newChild, oldMatch)\n if (morphed !== oldMatch) offset++\n oldNode.insertBefore(morphed, oldChild)\n\n // It's safe to morph two nodes in-place if neither has an ID\n } else if (!newChild.id && !oldChild.id) {\n morphed = walk(newChild, oldChild)\n if (morphed !== oldChild) {\n oldNode.replaceChild(morphed, oldChild)\n offset++\n }\n\n // Insert the node at the index if we couldn't morph or find a matching node\n } else {\n oldNode.insertBefore(newChild, oldChild)\n offset++\n }\n }\n }\n}", "function checkConnectionBetweenProps( target1, target2, excludedNodes ) {\n\tconst { subNodes: subNodes1, prevNodeMap: prevNodeMap1 } = Object(_getsubnodes__WEBPACK_IMPORTED_MODULE_0__[\"default\"])( target1, excludedNodes.subNodes );\n\tconst { subNodes: subNodes2, prevNodeMap: prevNodeMap2 } = Object(_getsubnodes__WEBPACK_IMPORTED_MODULE_0__[\"default\"])( target2, excludedNodes.subNodes );\n\n\tfor ( const sharedNode of subNodes1 ) {\n\t\tif ( subNodes2.has( sharedNode ) ) {\n\t\t\tconst connection = [];\n\n\t\t\tconnection.push( sharedNode );\n\n\t\t\tlet node = prevNodeMap1.get( sharedNode );\n\n\t\t\twhile ( node && node !== target1 ) {\n\t\t\t\tconnection.push( node );\n\t\t\t\tnode = prevNodeMap1.get( node );\n\t\t\t}\n\n\t\t\tnode = prevNodeMap2.get( sharedNode );\n\n\t\t\twhile ( node && node !== target2 ) {\n\t\t\t\tconnection.unshift( node );\n\t\t\t\tnode = prevNodeMap2.get( node );\n\t\t\t}\n\n\t\t\tconsole.log( '--------' );\n\t\t\tconsole.log( { target1 } );\n\t\t\tconsole.log( { sharedNode } );\n\t\t\tconsole.log( { target2 } );\n\t\t\tconsole.log( { connection } );\n\n\t\t\treturn true;\n\t\t}\n\t}\n\n\treturn false;\n}", "reconcileState() {\n this.addBlocker('RENDER');\n const newNode = createElement(this.render());\n this.removeBlocker();\n\n replaceNode(this.node, newNode);\n\n this.node = newNode;\n }", "function connectNodes() {\n\n for (var key in workflowNodes) {\n $('#' + workflowNodes[key].id).append('<div class=\"deleteNode\" data-placement=\"bottom\" data-container=\"body\"></div>');\n $('#' + workflowNodes[key].id + ' .deleteNode').append('<span class=\"glyphicon glyphicon-remove\" aria-hidden=\"true\"></span>');\n }\n\n $('body').on('click', '.item', function (e) {\n if (e.target !== this)\n return;\n\n if (srcClick == \"\") {\n srcClick = $(this).attr(\"id\");\n firstNode = $(this);\n firstNode.addClass('borderHighlight');\n console.log(\"set src: \" + $(this).attr(\"id\"));\n } else if (srcClick == $(this).attr(\"id\")) {\n srcClick = \"\";\n firstNode.removeClass('borderHighlight');\n console.log(\"make src empty: \" + $(this).attr(\"id\"));\n } else if (trgClick == \"\") {\n trgClick = $(this).attr(\"id\");\n for (var key in arrConnect) {\n if (srcClick == arrConnect[key].sourceId && trgClick == arrConnect[key].targetId) {\n console.log(\"FOUND\");\n found = true;\n }\n }\n if (found == true) {\n console.log(\"already set!\");\n // $(\"#connectionExistsAlert\").alert('open');\n $(\"#connectionExistsAlert\").show();\n $(\"#connectionExistsAlert\").fadeTo(2000, 500).slideUp(500, function () {\n $(\"#connectionExistsAlert\").hide();\n });\n srcClick = \"\";\n trgClick = \"\";\n console.log(\"make both empty\");\n found = false;\n firstNode.removeClass('borderHighlight');\n\n } else { // create the arrow\n var label = \"\";\n\n createArrow(srcClick, trgClick);\n\n // create an arrow between 2 nodes\n arrConnect.push(jsPlumb.connect({\n type: \"edit\",\n source: srcClick,\n target: trgClick,\n detachable: false\n }, common));\n\n srcClick = \"\";\n trgClick = \"\";\n console.log(\"make both empty\");\n firstNode.removeClass('borderHighlight');\n }\n }\n });\n\n var arrowIdTemp;\n var cSourceId;\n var cTargetId;\n var cObject;\n // click on arrow to get the arrowId\n jsPlumb.bind(\"click\", function (c) {\n console.log(c.sourceId + \" \" + c.targetId);\n cObject = c;\n cSourceId = c.sourceId;\n cTargetId = c.targetId;\n // look for the right node in local array\n var found;\n for (var key in workflowNodes) {\n // console.log(\"iterate workflow: \" + workflowNodes[key].id + workflowNodes[key].arrows);\n if (workflowNodes[key].id == c.sourceId) {\n // console.log(\"found: \" + workflowNodes[key].id);\n found = key;\n }\n }\n // look for the arrow that has been clicked\n for (var key in workflowNodes[found].arrows) {\n //console.log(\"iterate arrow: \" + workflowNodes[found].arrows[key].id);\n if (c.sourceId == workflowNodes[found].arrows[key].sourceNode && c.targetId == workflowNodes[found].arrows[key].targetNode) {\n // console.log(\"THIS ARROW ID: \" + workflowNodes[found].arrows[key].id);\n arrowIdTemp = workflowNodes[found].arrows[key].id;\n }\n }\n // TODO Maybe if no arrow is set -> warning\n });\n //////////////////////////////////////////////////Update Arrow//////////////////////////////////////////////////////\n // clicklistener on arrow to show option to add a label or delete the arrow\n $('path').off().on('click', function (e) {\n var offset = $(this).offset();\n var left = e.pageX;\n var top = e.pageY;\n var theHeight = $('.popoverArrow').height();\n $('.popoverArrow').show();\n $('.popoverArrow').css('left', (left + 10) + 'px');\n $('.popoverArrow').css('top', (top - (theHeight / 2) - 10) + 'px');\n });\n\n\n $('.btnSaveLabel').off().on('click', function () {\n var inputLabelVal = $(\".inputLabel\").val();\n var arrconnLabel;\n updateArrow(arrowIdTemp, cSourceId, cTargetId, inputLabelVal);\n\n for (var key in arrConnect) {\n if (cSourceId == arrConnect[key].sourceId && cTargetId == arrConnect[key].targetId) {\n arrconnLabel = arrConnect[key].getOverlay(\"label\");\n }\n }\n arrconnLabel.setLabel(inputLabelVal);\n\n $('.popoverArrow').hide();\n });\n // delete arrow\n $('.btnDeleteArrow').off().on('click', function (c) {\n console.log(arrowIdTemp + \" | \" + cSourceId + \" | \" + cTargetId);\n deleteArrow(arrowIdTemp);\n for (var key in arrConnect) {\n if (cSourceId == arrConnect[key].sourceId && cTargetId == arrConnect[key].targetId) {\n delete arrConnect[key];\n }\n }\n // delete arrow in UI\n jsPlumb.detach(cObject);\n $('.popoverArrow').hide();\n });\n\n $('.btnCloseLabel').off().on('click', function () {\n $('.popoverArrow').hide();\n });\n } // content()", "function checkConnectionBetweenProps(target1, target2, excludedNodes) {\n var _Object = Object(_getsubnodes__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(target1, excludedNodes.subNodes),\n subNodes1 = _Object.subNodes,\n prevNodeMap1 = _Object.prevNodeMap;\n\n var _Object2 = Object(_getsubnodes__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(target2, excludedNodes.subNodes),\n subNodes2 = _Object2.subNodes,\n prevNodeMap2 = _Object2.prevNodeMap;\n\n var _iterator504 = _createForOfIteratorHelper(subNodes1),\n _step504;\n\n try {\n for (_iterator504.s(); !(_step504 = _iterator504.n()).done;) {\n var sharedNode = _step504.value;\n\n if (subNodes2.has(sharedNode)) {\n var connection = [];\n connection.push(sharedNode);\n var node = prevNodeMap1.get(sharedNode);\n\n while (node && node !== target1) {\n connection.push(node);\n node = prevNodeMap1.get(node);\n }\n\n node = prevNodeMap2.get(sharedNode);\n\n while (node && node !== target2) {\n connection.unshift(node);\n node = prevNodeMap2.get(node);\n }\n\n console.log('--------');\n console.log({\n target1: target1\n });\n console.log({\n sharedNode: sharedNode\n });\n console.log({\n target2: target2\n });\n console.log({\n connection: connection\n });\n return true;\n }\n }\n } catch (err) {\n _iterator504.e(err);\n } finally {\n _iterator504.f();\n }\n\n return false;\n }", "function tribeUniqueAliasTest(t, node1, node2, node3) {\n return __awaiter(this, void 0, void 0, function* () {\n //NODE1 creates a tribe\n let tribe = yield (0, save_1.createTribe)(t, node1);\n t.truthy(tribe, 'tribe should have been created by node1');\n //Set the alias of NODE2 to be the same as NODE1\n let old_alias = node2.alias;\n let newAlias = { alias: node1.alias };\n const change = yield (0, save_1.updateProfile)(t, node2, newAlias);\n t.true(change, 'node2 should have updated its profile');\n const newNode2 = yield (0, get_1.getSelf)(t, node2);\n t.true(newNode2.alias !== old_alias, 'node2 alias should not be equal to old alias');\n t.true(newNode2.alias === node1.alias, 'node2 alias should be equal node1 alias');\n //NODE2 JOINS TRIBE CREATED BY NODE1\n if (node1.routeHint)\n tribe.owner_route_hint = node1.routeHint;\n let join = yield (0, save_1.joinTribe)(t, node2, tribe);\n t.true(join, 'node2 should join tribe');\n //NODE3 JOINS TRIBE\n if (node1.routeHint)\n tribe.owner_route_hint = node1.routeHint;\n let join2 = yield (0, save_1.joinTribe)(t, node3, tribe);\n t.true(join2, 'node3 should join tribe');\n //First node1 sends a message in tribe\n let text = (0, helpers_1.randomText)();\n let tribeMessage = yield (0, msg_1.sendTribeMessageAndCheckDecryption)(t, node1, node3, text, tribe);\n t.true(!!tribeMessage, 'node1 should send message to tribe');\n //Then node2 sends a message in tribe\n let text2 = (0, helpers_1.randomText)();\n let tribeMessage2 = yield (0, msg_1.sendTribeMessageAndCheckDecryption)(t, node2, node3, text2, tribe);\n t.true(!!tribeMessage2, 'node2 should send message to tribe');\n let message1 = yield (0, get_1.getCheckNewMsgs)(t, node3, tribeMessage.uuid);\n let message2 = yield (0, get_1.getCheckNewMsgs)(t, node3, tribeMessage2.uuid);\n t.true(message1.sender_alias !== message2.sender_alias, 'The sender alias in both messages should be different');\n //Check that our logic for assigning an alternate alias is working\n t.true(message2.sender_alias === `${node1.alias}_2`, 'The sender alias should be modified according to our unique alias logic');\n //NODE3 LEAVES THE TRIBE\n let left1 = yield (0, del_1.leaveTribe)(t, node3, tribe);\n t.true(left1, 'node3 should leave tribe');\n //NODE2 LEAVES THE TRIBE\n let left2 = yield (0, del_1.leaveTribe)(t, node2, tribe);\n t.true(left2, 'node2 should leave tribe');\n //NODE1 LEAVES THE TRIBE\n let delTribe = yield (0, del_1.deleteTribe)(t, node1, tribe);\n t.true(delTribe, 'node1 should delete tribe');\n });\n}", "function NodeUtils() {\n var self = this;\n // Performs deep copy of the given node.\n this.deepCopy = function(node) {\n return JSON.parse(JSON.stringify(node));\n };\n\n // Deletes a node from the body.\n this.deleteNode = function(parentBody, nodeToDel) {\n var deleteIndex = parentBody.indexOf(nodeToDel);\n parentBody.splice(deleteIndex, 1);\n };\n\n // Replaces source node with the target node and returns a reference to the new node.\n this.replaceNode = function(source, target, context) {\n var sourceCopy = self.deepCopy(source);\n\n Object.keys(source).forEach(function(key) {\n delete source[key];\n });\n Object.keys(target).forEach(function(key) {\n source[key] = target[key];\n });\n\n // Using this check temporarily.\n // if (!self.hasLocNode(sourceCopy)) {\n // \treturn source;\n // }\n\n // Attach the loc nodes based on the context.\n switch (context) {\n // Mapping of loc nodes for N1qlQuery happens during the substitution of variables in the N1QL query string.\n /*\n \tBefore:\n \tvar res1 = new N1qlQuery(`select * from :bucket LIMIT 10;`);\n \tAfter:\n \tvar res1 = new N1qlQuery('select * from ' + bucket + ' LIMIT 10;');\n */\n case Context.N1qlQuery:\n source.loc = self.deepCopy(sourceCopy.loc);\n source.callee.loc = self.deepCopy(sourceCopy.callee.loc);\n source.arguments[0].loc = self.deepCopy(sourceCopy.arguments[\n 0].quasis[0].loc);\n break;\n\n // Mapping of if-else block to for-of loop.\n /*\n \tBefore:\n \tfor (var r of res1){...}\n \tAfter:\n \tif (res1.isInstance) {\n \t\tres1.iter(function (r) {...}\n \t} else {...}\n */\n case Context.IterTypeCheck:\n source.loc = self.deepCopy(sourceCopy.loc);\n source.consequent.loc = self.deepCopy(sourceCopy.body.loc);\n source.test.loc = self.deepCopy(sourceCopy.right.loc);\n source.test.object.loc = self.deepCopy(sourceCopy.right\n .loc);\n source.test.property.loc = self.deepCopy(sourceCopy.right\n .loc);\n\n // TODO: Currently, after breaking out from labeled break statement, it goes to the beginning of the for-of loop.\n //\t\tIdeally, it should go to the end of the labeled block. This looks quite ideal to show the iteration behaviour -\n //\t\tIt stops at the enclosing for-of loops (iterators) before coming out and thus, demonstrating the stopping\n //\t\tof iteration. Need to ask whether this is ok or if the default behaviour is needed.\n if (source.consequent.body.length > 1 &&\n /SwitchStatement/.test(source.consequent.body[1].type)\n ) {\n self.forceSetLocForAllNodes(sourceCopy.loc, source.consequent\n .body[1]);\n }\n break;\n\n // The following case handles two-way mapping of loc nodes between continue and return statements.\n case Context.ContinueStatement:\n source.loc = self.deepCopy(sourceCopy.loc);\n switch (source.type) {\n // Return to continue statement mapping - source: return, target: continue\n case 'ContinueStatement':\n if (source.label) {\n source.label.loc = self.deepCopy(sourceCopy\n .loc);\n }\n break;\n\n // Continue to return statement mapping - source: continue, target: return\n case 'ReturnStatement':\n if (source.argument && sourceCopy.label.loc) {\n source.argument = self.setLocForAllNodes(\n sourceCopy.label.loc, source.argument\n );\n }\n break;\n\n default:\n throw 'Not yet handled for ' + source.type;\n }\n break;\n\n // The following case handles two-way mapping of loc nodes between break and return statements.\n case Context.BreakStatement:\n source.loc = self.deepCopy(sourceCopy.loc);\n switch (source.type) {\n // Return to break statement mapping - source: return, target: break\n case 'BreakStatement':\n source.label.loc = self.deepCopy(sourceCopy.argument\n .loc);\n break;\n\n // Break to return statement mapping - source: break, target: return\n case 'ReturnStatement':\n source.argument = self.setLocForAllNodes(\n sourceCopy.loc, source.argument);\n break;\n\n default:\n throw 'Not yet handled for ' + source.type;\n }\n break;\n\n // The following case handles mapping of loc nodes between two different 'stopIter' calls.\n /*\n \tBefore:\n \treturn res2.stopIter({\n \t\t'code': 'labeled_break',\n \t\t'args': 'x'\n \t});\n \tAfter:\n \treturn res1.stopIter({\n \t\t'code': 'labeled_break',\n \t\t'args': 'x'\n \t});\n */\n case Context.BreakAltInterrupt:\n self.setLocMatchingNodes(sourceCopy, source);\n break;\n\n // The following case handles the mapping of loc nodes between stopIter and\n // return statement or between two stopIter statements as the above case.\n /*\n \tBefore:\n \treturn res2.stopIter({\n \t\t\t'code': 'labeled_continue',\n \t\t\t'args': 'x'\n \t\t});\n \tAfter:\n \treturn;\n */\n case Context.ContinueAltInterrupt:\n if (source.argument) {\n self.setLocMatchingNodes(sourceCopy, source);\n } else {\n source.loc = sourceCopy.loc;\n }\n break;\n }\n\n return source;\n };\n\n // Checks if atleast one loc node is present in the AST.\n this.hasLocNode = function(ast) {\n var hasLoc = false;\n estraverse.traverse(ast, {\n enter: function(node) {\n if (hasLoc) {\n return;\n }\n\n hasLoc = node.loc;\n }\n });\n\n return hasLoc;\n };\n\n // Adds loc node for all the nodes in the AST.\n // Thus, all the nodes of AST might end up having unnecessary loc nodes.\n // Though this method wouldn't modify the parsing behaviour, it must be used as a last resort.\n this.forceSetLocForAllNodes = function(loc, ast) {\n estraverse.traverse(ast, {\n enter: function(node) {\n if (!node.loc) {\n node.loc = self.deepCopy(loc);\n }\n }\n });\n };\n\n // This is a safe method for adding loc nodes for a given AST.\n // The disadvantage is that it can not be used with all the AST.\n this.setLocForAllNodes = function(loc, ast) {\n // Generate the code snippet for the given AST.\n var codeSnippet = escodegen.generate(ast);\n // Parse with loc enabled to determine the nodes to which we can attach loc node.\n var astWithLoc = esprima.parse(codeSnippet, {\n loc: true\n });\n\n // We new traverse astWithLoc and replace all the loc nodes.\n estraverse.traverse(astWithLoc, {\n enter: function(node) {\n node.loc = node.loc ? nodeUtils.deepCopy(\n loc) : null;\n }\n });\n\n return astWithLoc.body[0].expression;\n };\n\n // This is a safe method for performing a one-to-one copy of the loc nodes from AST1 to AST2.\n // The two ASTs must have the same structure.\n this.setLocMatchingNodes = function(source, target) {\n var sourceNodeStack = new Stack(),\n targetNodeStack = new Stack();\n\n // Linearizes the given AST into a stack.\n function convertTreeToStack(ast, stack) {\n estraverse.traverse(ast, {\n enter: function(node) {\n stack.push(node);\n }\n });\n }\n\n convertTreeToStack(source, sourceNodeStack);\n convertTreeToStack(target, targetNodeStack);\n\n // Pop all nodes from the sourceNodeStack and if an element contains loc node,\n // copy it to the corresponding element in the targetNodeStack.\n while (!sourceNodeStack.isEmpty()) {\n var sourceNode = sourceNodeStack.pop();\n var targetNode = targetNodeStack.pop();\n if (sourceNode.loc) {\n targetNode.loc = self.deepCopy(sourceNode.loc);\n }\n }\n };\n\n // Inserts the given node to the given parentBody at the specified index.\n this.insertNode = function(parentBody, refNode, nodeToInsert,\n insertAfter) {\n var insertIndex = insertAfter ? parentBody.indexOf(refNode) + 1 :\n parentBody.indexOf(refNode);\n parentBody.splice(insertIndex, 0, nodeToInsert);\n };\n\n // A N1QL node is a statement of the form new N1qlQuery('...');\n this.isN1qlNode = function(node) {\n return /NewExpression/.test(node.type) && /N1qlQuery/.test(node\n .callee.name);\n };\n\n this.convertToBlockStmt = function(node) {\n switch (node.type) {\n case 'ForOfStatement':\n // Transform the previous single-line statement into a block.\n node.body.body = [nodeUtils.deepCopy(node.body)];\n node.body.type = 'BlockStatement';\n break;\n case 'IfStatement':\n node.consequent.body = [nodeUtils.deepCopy(node.consequent)];\n node.consequent.type = 'BlockStatement';\n // If the 'else' part exists, convert it to a block statement.\n if (node.alternate) {\n node.alternate.body = [nodeUtils.deepCopy(node.alternate)];\n node.alternate.type = 'BlockStatement';\n }\n break;\n default:\n throw 'unhandled case for: ' + node.type;\n }\n };\n\n // Inserts an array of AST nodes into parentBody at the specified index.\n this.insertNodeArray = function(parentBody, insAfterNode, arrayToInsert) {\n var insertIndex = parentBody.indexOf(insAfterNode) + 1;\n parentBody.splice.apply(parentBody, [insertIndex, 0].concat(\n arrayToInsert));\n };\n\n // Build an ast node for N1QL function call from the query.\n this.getQueryAst = function(query) {\n // Identifier regex.\n var re = /:([a-zA-Z_$][a-zA-Z_$0-9]*)/g;\n\n // Replace the :<var> with proper substitution.\n query = query.replace(re, '\" + $1 + \"');\n query = 'new N1qlQuery(\"' + query + '\");';\n\n return esprima.parse(query).body[0].expression;\n };\n\n // Checks if the global scope contains only function declarations.\n this.checkGlobals = function(ast) {\n for (var node of ast.body) {\n if (!/FunctionDeclaration/.test(node.type)) {\n throw 'Only function declaration are allowed in global scope';\n }\n }\n }\n }", "function everyNodeTheSame(nodes) {\n // This could potentially be made more performant by mapping every term\n // to their value and using native JS comparisons, assuming every node is\n // either a Blank or a Named Node.\n return nodes.every(otherNode => nodes.every(anotherNode => otherNode.equals(anotherNode)));\n }", "function same (a, b) {\n\t return a === b || a !== a && b !== b\n\t}", "function nodeChanged(node) {\n that.resetTags();\n const clicks = _mlyClicks;\n const index = clicks.indexOf(node.key);\n that.setActiveImage(node);\n that.setStyles(context, null, true);\n\n if (index > -1) { // `nodechanged` initiated from clicking on a marker..\n clicks.splice(index, 1); // remove the click\n } else { // `nodechanged` initiated from the Mapillary viewer controls..\n const loc = node.computedLatLon ? [node.computedLatLon.lon, node.computedLatLon.lat] : [node.latLon.lon, node.latLon.lat];\n context.map().centerEase(loc);\n that.selectImage(context, node.key, true);\n }\n dispatch.call('nodeChanged');\n }", "function nodeCompare(n1, n2) {\n return n1.distance < n2.distance ? -1 : n1.distance > n2.distance ? 1 : 0;\n}", "function checkAndDeleteSecondNode(player, node){\n if(nodeToDelete != null && node.key != 'null'){\n var key = min(nodeToDelete.right);\n if(node.key == key){\n\n if (nodeToDelete.right.left.key == 'null') { // when nodeToDelete's right child IS min (move min and its right subtree up)\n\n // DISABLE KEYBOARD\n this.input.keyboard.enabled = false;\n\n // hide links:\n if (nodeToDelete.parent != null) {\n this.add.tween({\n targets: [nodeToDelete.link],\n ease: 'Sine.easeOut',\n duration: 1000,\n alpha: '-=1'\n });\n }\n\n this.add.tween({\n targets: [nodeToDelete.left.link, nodeToDelete.right.link, node.left.link],\n ease: 'Sine.easeOut',\n duration: 1000,\n alpha: '-=1'\n });\n\n // nodes and their components:\n this.add.tween({\n targets: [nodeToDelete.nodeGraphics, nodeToDelete.curtain, nodeToDelete.keyString, node.left.nullGraphics, node.left.keyString],\n delay: 1000,\n ease: 'Sine.easeOut',\n duration: 1000,\n alpha: '-=1'\n });\n\n // destroy left child(null) of 15 and update some stuff\n this.time.addEvent({\n delay: 2100,\n callback: function(nodeToDelete,node) {\n node.left.destroyNode(); // destroy null left child of 15\n node.left = null;\n node.parent = nodeToDelete.parent; // set 15s parent as what 10 had (null) || set 25s parent to 15\n node.dpth = nodeToDelete.dpth;\n },\n args: [nodeToDelete,node]\n });\n\n // abs(10 x - 15 x) + node x\n this.time.addEvent({\n delay: 2500,\n callback: function(nodeToDelete,node,scene) {\n var distanceX = Math.abs(nodeToDelete.posX-node.posX);\n // Version 2\n updateBranch(node,distanceX);\n },\n args: [nodeToDelete,node,this]\n });\n\n // Version 2\n this.time.addEvent({\n delay: 3000,\n callback: function(nodeToDelete,node,scene) {\n var distanceX = Math.abs(nodeToDelete.posX-node.posX);\n\n if (nodeToDelete == tree.root) { // if deleted node is root\n tree.root = node;\n node.left = nodeToDelete.left; // move 10's left branch to 15\n node.left.parent = node; // change left branch's parent to 15\n } else if (nodeToDelete == nodeToDelete.parent.right){ // if deleted node is right child\n node.left = nodeToDelete.left; // set 25s left to 16 (move 20's left branch to 25)\n node.left.parent = node; // set 16s parent to 25 (change left branch's parent to 25)\n node.parent.right = node; // set 15's right child to 25\n } else if (nodeToDelete == nodeToDelete.parent.left) { // if deleted node is left child\n node.left = nodeToDelete.left;\n node.left.parent = node;\n node.parent.left = node; \n }\n node.distanceFromParent = nodeToDelete.distanceFromParent;\n tree.updateNodeDepths(tree.root);\n // nodeToDelete.destroyNode();\n\n tree.traverseAndCheckCollisions(scene);\n tree.traverseAndCheckCrossings(scene);\n\n scene.add.tween({\n targets: player,\n x: node.posX, // if 15 is on left branch then we should do +\n y: node.posY - BUFFER, // 10 is Buffer\n ease: 'Power2',\n duration: 1500,\n });\n\n actuallyMoveBranch(node,distanceX,scene);\n\n // TODO: ROTATE node.right.link and after it is rotated then redraw to extend:\n // node.right.link.setAlpha(0);\n // move node link, rotate it and extend it\n if (node.right.link != null) {\n\n var N = node.right.distanceFromParent;\n \n var O = null;\n if (node.right.distanceFromParent < 0) {\n O = (node.right.link.x - node.right.link.width) - node.right.link.x;\n } else {\n O = (node.right.link.x + node.right.link.width) - node.right.link.x;\n }\n \n var oldAngle = calcAngle(tree.z,O);\n var newAngle = calcAngle(tree.z,N);\n var difference = oldAngle - newAngle;\n \n scene.add.tween({\n targets: node.right.link,\n x: node.right.posX, \n y: node.right.posY,\n ease: 'Power2',\n duration: 1500\n });\n \n if (difference != 0) {\n // ROTATION TWEEN:\n scene.add.tween({\n targets: node.right.link,\n angle: -difference,\n ease: 'Sine.easeInOut',\n duration: 1500,\n onComplete: drawLink,\n onCompleteParams: [node.right,scene]\n });\n \n function drawLink(tween,targets,node,scene) {\n node.drawLinkToParent(scene);\n }\n }\n }\n // appearLinks(node,scene);\n },\n args: [nodeToDelete,node,this]\n });\n\n // need to appear movedNodes's link to parent and left link\n\n this.time.addEvent({\n delay: 4500,\n callback: function(node,scene) {\n node.drawLinkToParent(scene);\n node.link.setAlpha(0);\n node.left.drawLinkToParent(scene);\n node.left.link.setAlpha(0);\n scene.add.tween({\n targets: [node.link, node.left.link],\n ease: 'Sine.easeIn',\n duration: 1000,\n alpha: '+=1'\n });\n \n },\n args: [node,this]\n });\n // end of Version 2\n\n this.time.addEvent({\n delay: 5800,\n callback: function(node,scene) {\n nodeToDelete.destroyNode();\n nodeToDelete = null;\n tree.updateNodeDepths(node);\n // Version 2\n // A way to move the branch together with already expanded branch:\n // in moveBranch only update the posX - line 643\n // then check for collisions - line \n // then actually move the branch nodes (change x to updated posX) - line\n // redraw\n tree.traverseAndCheckCollisions(scene);\n tree.traverseAndCheckCrossings(scene);\n tree.redraw(scene);\n },\n args: [node,this]\n });\n\n this.time.addEvent({\n delay: 7500,\n callback: function(scene) {\n taskSucceededActions(scene);\n displayTask(scene);\n // ENABLE KEYBOARD\n scene.input.keyboard.enabled = true;\n },\n args: [this]\n });\n \n \n } else if (nodeToDelete.right.left.key != 'null') { // when nodeToDelete's right child's left exists (it means there will be a min somewhere on the left from right child)\n\n var nodeToUseForAppear = node.parent;\n\n // DISABLE KEYBOARD\n this.input.keyboard.enabled = false;\n\n // hide links:\n if (nodeToDelete.parent != null) {\n this.add.tween({\n targets: [nodeToDelete.link],\n ease: 'Sine.easeOut',\n duration: 1000,\n alpha: '-=1'\n });\n }\n\n this.add.tween({\n targets: [nodeToDelete.left.link, nodeToDelete.right.link, node.left.link, node.right.link, node.link],\n ease: 'Sine.easeOut',\n duration: 1000,\n alpha: '-=1'\n });\n\n // when min doesn't have children on the right\n if (node.right.key == 'null') {\n\n // hide nodes and their components:\n this.add.tween({\n targets: [nodeToDelete.nodeGraphics, nodeToDelete.curtain, nodeToDelete.keyString, node.left.nullGraphics, node.left.keyString, node.right.nullGraphics, node.right.keyString],\n delay: 1000,\n ease: 'Sine.easeOut',\n duration: 1000,\n alpha: '-=1'\n });\n \n // create null for 20 and destroy 16's both null children and update some stuff\n this.time.addEvent({\n delay: 2100,\n callback: function(nodeToDelete,node,scene) {\n // make null for 20\n var childL = new NodeBST(scene, singleTon.deleteMinColor, node.parent.posX-tree.w, node.parent.posY+tree.z, 'null',node.parent.dpth+1,node.parent);\n childL.distanceFromParent = -tree.w;\n node.parent.left = childL;\n childL.nullGraphics.setAlpha(0);\n childL.keyString.setAlpha(0);\n childL.link.setAlpha(0);\n\n tree.checkCollisions(childL);\n\n // teleporting + curtains\n childL.setPhysicsNode(cursors,player,scene);\n\n // physics\n scene.physics.add.overlap(player, childL, deleteNode, backspaceIsPressed, scene);\n scene.physics.add.overlap(player, childL, checkAndDeleteSecondNode, mIsPressed, scene);\n scene.physics.add.collider(player, childL);\n \n node.left.destroyNode(); // destroy null left child of 16\n node.right.destroyNode(); // destroy null right child of 16\n node.left = null;\n node.right = null;\n node.parent = nodeToDelete.parent; // set 16s parent as what 15 had (null)\n node.dpth = nodeToDelete.dpth;\n },\n args: [nodeToDelete,node,this]\n });\n\n // move 16 to the place of 15\n this.time.addEvent({\n delay: 2500,\n callback: function(nodeToDelete,node,scene) {\n \n // player moves up\n scene.add.tween({\n targets: player,\n x: nodeToDelete.x,\n y: nodeToDelete.y - BUFFER,\n ease: 'Power2',\n duration: 1500,\n });\n \n // 16 shape and curtain moves up\n scene.add.tween({\n targets: [node, node.nodeGraphics, node.curtain],\n x: nodeToDelete.x,\n y: nodeToDelete.y, \n ease: 'Power2',\n duration: 1500,\n });\n \n var distanceX = Math.abs(node.keyString.x-node.posX);\n \n // 16s keystring moves up\n scene.add.tween({\n targets: node.keyString,\n x: nodeToDelete.x - distanceX,\n y: nodeToDelete.keyString.y, // - (tree.z*(node.dpth-nodeToDelete.dpth))\n ease: 'Power2',\n duration: 1500,\n });\n\n // draw 16s link to parent, update physics bodies\n scene.time.addEvent({\n delay: 1500,\n callback: function(node,scene) {\n node.drawLinkToParent(scene);\n node.link.setAlpha(0);\n node.body.updateFromGameObject();\n node.curtain.body.updateFromGameObject();\n },\n args: [node,scene]\n });\n\n // update 16s x and y\n node.posX = nodeToDelete.posX;\n node.posY = nodeToDelete.posY;\n\n },\n args: [nodeToDelete,node,this]\n });\n\n this.time.addEvent({\n delay: 4500,\n callback: function(nodeToUseForAppear,nodeToDelete,node,scene) {\n if (nodeToDelete == tree.root) { // if deleted node is root\n tree.root = node;\n node.left = nodeToDelete.left;\n node.left.parent = node;\n node.right = nodeToDelete.right;\n node.right.parent = node;\n } else if (nodeToDelete == nodeToDelete.parent.right){ // if deleted node is right child\n node.left = nodeToDelete.left;\n node.left.parent = node;\n node.right = nodeToDelete.right;\n node.right.parent = node;\n node.parent.right = node;\n } else if (nodeToDelete == nodeToDelete.parent.left) { // if deleted node is left child\n node.left = nodeToDelete.left;\n node.left.parent = node;\n node.right = nodeToDelete.right;\n node.right.parent = node;\n node.parent.left = node; \n }\n\n // put/appear null on the left of 20\n scene.add.tween({\n targets: [nodeToUseForAppear.left.nullGraphics, nodeToUseForAppear.left.nodeGraphics, nodeToUseForAppear.left.keyString],\n ease: 'Sine.easeIn',\n duration: 1000,\n alpha: '+=1'\n });\n\n node.distanceFromParent = nodeToDelete.distanceFromParent;\n \n if (node.parent != null) {\n scene.add.tween({\n targets: [node.link],\n delay: 1000,\n ease: 'Sine.easeOut',\n duration: 1000,\n alpha: '+=1'\n });\n }\n\n scene.add.tween({\n targets: [node.left.link, node.right.link, nodeToUseForAppear.left.link], //node.right.left.link\n delay: 1000,\n ease: 'Sine.easeOut',\n duration: 1000,\n alpha: '+=1'\n });\n\n tree.updateNodeDepths(tree.root);\n nodeToDelete.destroyNode();\n },\n args: [nodeToUseForAppear,nodeToDelete,node,this]\n });\n\n this.time.addEvent({\n delay: 8000,\n callback: function(node,scene) {\n nodeToDelete = null;\n tree.updateNodeDepths(node);\n tree.traverseAndCheckCollisions(scene);\n tree.traverseAndCheckCrossings(scene);\n tree.redraw(scene); \n },\n args: [node,this]\n });\n\n } else if (node.right.key != 'null') { // when min has children on the right (need to move the right branch up)\n \n // hide nodes and their components:\n this.add.tween({\n targets: [nodeToDelete, nodeToDelete.nodeGraphics, nodeToDelete.curtain, nodeToDelete.keyString, node.left, node.left.nullGraphics, node.left.keyString],\n delay: 1000,\n ease: 'Sine.easeOut',\n duration: 1000,\n alpha: '-=1'\n });\n\n this.time.addEvent({\n delay: 2100,\n callback: function(nodeToDelete,node,scene) {\n node.left.destroyNode(); // node is min. we destroy its left child because it wont be needed anymore/it will be replaced\n node.left = null;\n node.parent = nodeToDelete.parent;\n node.dpth = nodeToDelete.dpth;\n },\n args: [nodeToDelete,node,this]\n });\n\n this.time.addEvent({\n delay: 2500,\n callback: function(nodeToDelete,node,scene) {\n \n // player moves up\n scene.add.tween({\n targets: player,\n x: nodeToDelete.x,\n y: nodeToDelete.y - BUFFER,\n ease: 'Power2',\n duration: 1500,\n });\n \n // 11 shape and curtain moves up\n scene.add.tween({\n targets: [node, node.nodeGraphics, node.curtain],\n x: nodeToDelete.x,\n y: nodeToDelete.y, \n ease: 'Power2',\n duration: 1500,\n });\n \n var distanceX = Math.abs(node.keyString.x-node.posX);\n \n // 11s keystring moves up\n scene.add.tween({\n targets: node.keyString,\n x: nodeToDelete.x - distanceX,\n y: nodeToDelete.keyString.y, // - (tree.z*(node.dpth-nodeToDelete.dpth))\n ease: 'Power2',\n duration: 1500,\n });\n\n // draw 11s link to parent, update physics bodies\n scene.time.addEvent({\n delay: 1500,\n callback: function(node,scene) {\n // node.drawLinkToParent(scene);\n // node.link.setAlpha(0);\n node.body.updateFromGameObject();\n node.curtain.body.updateFromGameObject();\n },\n args: [node,scene]\n });\n\n },\n args: [nodeToDelete,node,this]\n });\n\n this.time.addEvent({\n delay: 4500,\n callback: function(nodeToUseForAppear,nodeToDelete,node,scene) {\n\n var distanceX = Math.abs(node.posX-node.right.posX);\n \n updateBranch(node.right,distanceX); //v2\n\n // update 11s x and y - just to be sure it doesn't get updated before moveBranch \n node.posX = nodeToDelete.posX;\n node.posY = nodeToDelete.posY;\n\n // draw 11s links - have to have it here after we update 11s posX and posY\n node.drawLinkToParent(scene);\n node.link.setAlpha(0);\n \n // update 12s distance from parent\n node.right.distanceFromParent = node.distanceFromParent; // <-- 11s.distancefromparent // nodeToUseForAppear.left.distanceFromParent; <-- 13s.left\n nodeToUseForAppear.left = node.right; // here nodeToUseForAppear is the parent of node(min)\n node.right.parent = nodeToUseForAppear;\n\n if (nodeToDelete == tree.root) { // if deleted node is root\n tree.root = node;\n node.left = nodeToDelete.left;\n node.left.parent = node;\n node.right = nodeToDelete.right;\n node.right.parent = node;\n } else if (nodeToDelete == nodeToDelete.parent.right){ // if deleted node is right child\n node.left = nodeToDelete.left;\n node.left.parent = node;\n node.right = nodeToDelete.right;\n node.right.parent = node;\n node.parent.right = node;\n } else if (nodeToDelete == nodeToDelete.parent.left) { // if deleted node is left child\n node.left = nodeToDelete.left;\n node.left.parent = node;\n node.right = nodeToDelete.right;\n node.right.parent = node;\n node.parent.left = node; \n }\n\n // update distancefromparent for 11\n node.distanceFromParent = nodeToDelete.distanceFromParent;\n\n\n // tree.updateNodeDepths(node.right);\n tree.updateNodeDepths(tree.root);\n\n tree.traverseAndCheckCollisions(scene); //v2\n tree.traverseAndCheckCrossings(scene); //v2\n\n actuallyMoveBranch(nodeToUseForAppear.left,distanceX,scene); //v2\n\n // appearLinks(node.right, scene);\n\n node.drawLinkToParent(scene);\n node.link.setAlpha(0);\n nodeToUseForAppear.left.drawLinkToParent(scene);\n nodeToUseForAppear.left.link.setAlpha(0);\n \n if (node.parent != null) {\n scene.add.tween({\n targets: [node.link],\n delay: 1500,\n ease: 'Sine.easeOut',\n duration: 1000,\n alpha: '+=1'\n });\n }\n\n scene.add.tween({\n targets: [node.left.link, node.right.link, nodeToUseForAppear.left.link], //node.right.left.link\n delay: 1500,\n ease: 'Sine.easeOut',\n duration: 1000,\n alpha: '+=1'\n });\n\n // tree.updateNodeDepths(tree.root);\n nodeToDelete.destroyNode();\n },\n args: [nodeToUseForAppear,nodeToDelete,node,this]\n });\n\n this.time.addEvent({\n delay: 7000,\n callback: function(nodeToUseForAppear,node,scene) {\n nodeToDelete = null;\n tree.updateNodeDepths(node);\n tree.traverseAndCheckCollisions(scene);\n tree.traverseAndCheckCrossings(scene);\n tree.redraw(scene); \n },\n args: [nodeToUseForAppear,node,this]\n });\n\n } //end of else if\n\n this.time.addEvent({\n delay: 8000,\n callback: function(scene) {\n taskSucceededActions(scene);\n displayTask(scene);\n // ENABLE KEYBOARD\n scene.input.keyboard.enabled = true;\n },\n args: [this]\n });\n\n\n } //end of else if\n\n } else {\n panel.redFeedback();\n player.setPosition(nodeToDelete.x,nodeToDelete.y-BUFFER);\n tree.closeCurtains()\n }\n }\n }", "syncNode(node, key) {\n node.textContent = this.state[key];\n this.observe(key, () => (node.textContent = this.state[key]));\n }", "eql(a, b) {\n\t\tthis.registers[a] = this.get(a) === this.get(b) ? 1 : 0;\n\t}", "function checkConnectionBetweenProps(target1, target2, excludedNodes) {\n var _ref84 = (0, _getsubnodes__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(target1, excludedNodes.subNodes),\n subNodes1 = _ref84.subNodes,\n prevNodeMap1 = _ref84.prevNodeMap;\n\n var _ref85 = (0, _getsubnodes__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(target2, excludedNodes.subNodes),\n subNodes2 = _ref85.subNodes,\n prevNodeMap2 = _ref85.prevNodeMap;\n\n var _iterator471 = _createForOfIteratorHelper(subNodes1),\n _step471;\n\n try {\n for (_iterator471.s(); !(_step471 = _iterator471.n()).done;) {\n var sharedNode = _step471.value;\n\n if (subNodes2.has(sharedNode)) {\n var connection = [];\n connection.push(sharedNode);\n var node = prevNodeMap1.get(sharedNode);\n\n while (node && node !== target1) {\n connection.push(node);\n node = prevNodeMap1.get(node);\n }\n\n node = prevNodeMap2.get(sharedNode);\n\n while (node && node !== target2) {\n connection.unshift(node);\n node = prevNodeMap2.get(node);\n }\n\n console.log('--------');\n console.log({\n target1: target1\n });\n console.log({\n sharedNode: sharedNode\n });\n console.log({\n target2: target2\n });\n console.log({\n connection: connection\n });\n return true;\n }\n }\n } catch (err) {\n _iterator471.e(err);\n } finally {\n _iterator471.f();\n }\n\n return false;\n }", "function checkConflicts() {\r\n // checks if a conflict exists\r\n var conflict = false;\r\n for (var i = 0; i < tempNodes.length; i++) {\r\n var tempNode = tempNodes[i];\r\n if (tempNode.checkIncomingLinks() === true) {\r\n conflict = true;\r\n }\r\n }\r\n if (conflict === true) {\r\n // todo conflict alert\r\n // actually conflicts are allowed to show problems\r\n confirmChanges(true);\r\n } else {\r\n confirmChanges(true);\r\n }\r\n }", "function syncTree(oldTree, newTree, patches, parentTree, specialCase) {\n if (!oldTree) oldTree = empty;\n if (!newTree) newTree = empty;\n\n var oldNodeName = oldTree.nodeName;\n var isFragment = newTree.nodeType === 11;\n var isEmpty = oldTree === empty;\n var keysLookup = { old: new Map(), new: new Map() };\n\n if (process$1.env.NODE_ENV !== 'production') {\n if (newTree === empty) {\n throw new Error('Missing new Virtual Tree to sync changes from');\n }\n\n // FIXME: Causes issues w/ React, we need to normalize at a higher level.\n if (!isEmpty && oldNodeName !== newTree.nodeName && !isFragment) {\n throw new Error('Sync failure, cannot compare ' + newTree.nodeName + ' with ' + oldNodeName);\n }\n }\n\n // Reduce duplicate logic by condensing old and new operations in a loop.\n for (var i = 0; i < keyNames.length; i++) {\n var keyName = keyNames[i];\n var map = keysLookup[keyName];\n var vTree = arguments[i];\n var nodes = vTree && vTree.childNodes;\n\n if (nodes && nodes.length) {\n for (var _i = 0; _i < nodes.length; _i++) {\n var _vTree = nodes[_i];\n\n if (_vTree.key) {\n if (process$1.env.NODE_ENV !== 'production') {\n if (map.has(_vTree.key)) {\n throw new Error('Key: ' + _vTree.key + ' cannot be duplicated');\n }\n }\n\n map.set(_vTree.key, _vTree);\n }\n }\n }\n }\n\n var shortCircuit = false;\n\n // Create new arrays for patches or use existing from a recursive call.\n patches = patches || {\n SET_ATTRIBUTE: [],\n REMOVE_ATTRIBUTE: [],\n TREE_OPS: [],\n NODE_VALUE: []\n };\n\n var _patches = patches,\n SET_ATTRIBUTE = _patches.SET_ATTRIBUTE,\n REMOVE_ATTRIBUTE = _patches.REMOVE_ATTRIBUTE,\n TREE_OPS = _patches.TREE_OPS,\n NODE_VALUE = _patches.NODE_VALUE;\n\n var newNodeName = newTree.nodeName;\n\n // Build up a patchset object to use for tree operations.\n var patchset = {\n INSERT_BEFORE: [],\n REMOVE_CHILD: [],\n REPLACE_CHILD: []\n };\n\n // Invoke any middleware hooks, allow the middleware to replace the\n // `newTree`. Pass along the `keysLookup` object so that middleware can make\n // smart decisions when dealing with keys.\n SyncTreeHookCache.forEach(function (fn) {\n oldTree = specialCase || oldTree;\n\n // Call the user provided middleware function for a single root node. Allow\n // the consumer to specify a return value of a different VTree (useful for\n // components).\n var retVal = fn(oldTree, newTree, keysLookup, parentTree);\n\n // If the consumer returned a value and it doesn't equal the existing tree,\n // then splice it into the parent (if it exists) and run a sync.\n if (retVal && retVal !== newTree) {\n // Synchronize this new tree.\n newTree = retVal;\n } else if (retVal && retVal === oldTree) {\n shortCircuit = true;\n }\n });\n\n if (shortCircuit) {\n return patches;\n }\n\n // USED: INSERT_BEFORE: 3x, REMOVE_CHILD: 1x, REPLACE_CHILD: 3x.\n var INSERT_BEFORE = patchset.INSERT_BEFORE,\n REMOVE_CHILD = patchset.REMOVE_CHILD,\n REPLACE_CHILD = patchset.REPLACE_CHILD;\n\n var isElement = newTree.nodeType === 1;\n\n // Text nodes are low level and frequently change, so this path is accounted\n // for first.\n if (newTree.nodeName === '#text') {\n // If there was no previous element to compare to, simply set the value\n // on the new node.\n if (oldTree.nodeName !== '#text') {\n NODE_VALUE.push(newTree, newTree.nodeValue, null);\n }\n // If both VTrees are text nodes and the values are different, change the\n // `Element#nodeValue`.\n else if (!isEmpty && oldTree.nodeValue !== newTree.nodeValue) {\n NODE_VALUE.push(oldTree, newTree.nodeValue, oldTree.nodeValue);\n oldTree.nodeValue = newTree.nodeValue;\n }\n\n return patches;\n }\n\n // Seek out attribute changes first, but only from element Nodes.\n if (isElement) {\n var oldAttributes = isEmpty ? empty : oldTree.attributes;\n var newAttributes = newTree.attributes;\n\n // Search for sets and changes.\n for (var key in newAttributes) {\n var value = newAttributes[key];\n\n if (key in oldAttributes && oldAttributes[key] === newAttributes[key]) {\n continue;\n }\n\n if (!isEmpty) {\n oldAttributes[key] = value;\n }\n\n SET_ATTRIBUTE.push(isEmpty ? newTree : oldTree, key, value);\n }\n\n // Search for removals.\n if (!isEmpty) {\n for (var _key in oldAttributes) {\n if (_key in newAttributes) {\n continue;\n }\n REMOVE_ATTRIBUTE.push(oldTree, _key);\n delete oldAttributes[_key];\n }\n }\n }\n\n // If we somehow end up comparing two totally different kinds of elements,\n // we'll want to raise an error to let the user know something is wrong.\n // FIXME\n if (process$1.env.NODE_ENV !== 'production') {\n if (!isEmpty && oldNodeName !== newNodeName && !isFragment) {\n throw new Error('Sync failure, cannot compare ' + newNodeName + ' with ' + oldNodeName);\n }\n }\n\n var newChildNodes = newTree.childNodes;\n\n // Scan all childNodes for attribute changes.\n if (isEmpty) {\n // Do a single pass over the new child nodes.\n for (var _i2 = 0; _i2 < newChildNodes.length; _i2++) {\n syncTree(null, newChildNodes[_i2], patches, newTree);\n }\n\n return patches;\n }\n\n var oldChildNodes = oldTree.childNodes;\n\n // If we are working with keys, we can follow an optimized path.\n if (keysLookup.old.size || keysLookup.new.size) {\n var values = keysLookup.old.values();\n\n // Do a single pass over the new child nodes.\n for (var _i3 = 0; _i3 < newChildNodes.length; _i3++) {\n var oldChildNode = oldChildNodes[_i3];\n var newChildNode = newChildNodes[_i3];\n var newKey = newChildNode.key;\n\n // If there is no old element to compare to, this is a simple addition.\n if (!oldChildNode) {\n INSERT_BEFORE.push(oldTree, newChildNode, null);\n oldChildNodes.push(newChildNode);\n\n syncTree(null, newChildNode, patches, newTree);\n\n continue;\n }\n\n var oldKey = oldChildNode.key;\n var oldInNew = keysLookup.new.has(oldKey);\n var newInOld = keysLookup.old.has(newKey);\n\n // Remove the old Node and insert the new node (aka replace).\n if (!oldInNew && !newInOld) {\n REPLACE_CHILD.push(newChildNode, oldChildNode);\n oldChildNodes.splice(oldChildNodes.indexOf(oldChildNode), 1, newChildNode);\n\n syncTree(null, newChildNode, patches, newTree);\n\n continue;\n }\n // Remove the old node instead of replacing.\n else if (!oldInNew) {\n REMOVE_CHILD.push(oldChildNode);\n oldChildNodes.splice(oldChildNodes.indexOf(oldChildNode), 1);\n _i3 = _i3 - 1;\n continue;\n }\n\n // If there is a key set for this new element, use that to figure out\n // which element to use.\n if (newKey !== oldKey) {\n var optimalNewNode = newChildNode;\n\n // Prefer existing to new and remove from old position.\n if (newKey && newInOld) {\n optimalNewNode = keysLookup.old.get(newKey);\n oldChildNodes.splice(oldChildNodes.indexOf(optimalNewNode), 1);\n } else if (newKey) {\n optimalNewNode = newChildNode;\n\n // Find attribute changes for this Node.\n syncTree(null, newChildNode, patches, newTree);\n }\n\n INSERT_BEFORE.push(oldTree, optimalNewNode, oldChildNode);\n oldChildNodes.splice(_i3, 0, optimalNewNode);\n continue;\n }\n\n // If the element we're replacing is totally different from the previous\n // replace the entire element, don't bother investigating children.\n if (oldChildNode.nodeName !== newChildNode.nodeName) {\n REPLACE_CHILD.push(newChildNode, oldChildNode);\n oldTree.childNodes[_i3] = newChildNode;\n\n syncTree(null, newChildNode, patches, newTree);\n\n continue;\n }\n\n syncTree(oldChildNode, newChildNode, patches, newTree);\n }\n }\n\n // No keys used on this level, so we will do easier transformations.\n else {\n // Do a single pass over the new child nodes.\n for (var _i4 = 0; _i4 < newChildNodes.length; _i4++) {\n var _oldChildNode = oldChildNodes && oldChildNodes[_i4];\n var _newChildNode = newChildNodes[_i4];\n\n // If there is no old element to compare to, this is a simple addition.\n if (!_oldChildNode) {\n INSERT_BEFORE.push(oldTree, _newChildNode, null);\n\n if (oldChildNodes) {\n oldChildNodes.push(_newChildNode);\n }\n\n syncTree(_oldChildNode, _newChildNode, patches, oldTree);\n\n continue;\n }\n\n // If the element we're replacing is totally different from the previous\n // replace the entire element, don't bother investigating children.\n if (_oldChildNode.nodeName !== _newChildNode.nodeName) {\n REPLACE_CHILD.push(_newChildNode, _oldChildNode);\n // FIXME Calling this out specifically as a special case since we\n // have conflicting requirements between synchronization and how\n // components handle reconcilation. We basically don't want to dig\n // deeper into the component at the diffHTML level, but want to let\n // the middleware have access to the old child.\n //\n // This avoids sync semantics of oldTree/newTree while still providing\n // the oldTree to middleware.\n oldTree.childNodes[_i4] = _newChildNode;\n\n syncTree(null, _newChildNode, patches, oldTree, oldTree.childNodes[_i4]);\n\n continue;\n }\n\n syncTree(_oldChildNode, _newChildNode, patches, oldTree);\n }\n }\n\n // We've reconciled new changes, so we can remove any old nodes and adjust\n // lengths to be equal.\n if (oldChildNodes.length !== newChildNodes.length) {\n for (var _i5 = newChildNodes.length; _i5 < oldChildNodes.length; _i5++) {\n REMOVE_CHILD.push(oldChildNodes[_i5]);\n }\n\n oldChildNodes.length = newChildNodes.length;\n }\n\n // We want to look if anything has changed, if nothing has we won't add it to\n // the patchset.\n if (INSERT_BEFORE.length || REMOVE_CHILD.length || REPLACE_CHILD.length) {\n // Null out the empty arrays.\n if (!INSERT_BEFORE.length) {\n patchset.INSERT_BEFORE = null;\n }\n if (!REMOVE_CHILD.length) {\n patchset.REMOVE_CHILD = null;\n }\n if (!REPLACE_CHILD.length) {\n patchset.REPLACE_CHILD = null;\n }\n\n TREE_OPS.push(patchset);\n }\n\n return patches;\n}", "function makeAChange(){\n contentPanel.SC.run(function(){\n contentPanel.MySystem.store.createRecord(contentPanel.MySystem.Node, { 'title': 'Test node ' + newNodeIndex, 'image': '/lightbulb_tn.png' });\n });\n newNodeIndex += 1;\n }", "_sameType(firstVersion, secondRevision) {\n return firstVersion && secondRevision && firstVersion.entityId === secondRevision.entityId;\n }", "function swap(x1, y1, x2, y2) {\n var typeswap = level.tiles[x1][y1].type;\n level.tiles[x1][y1].type = level.tiles[x2][y2].type;\n level.tiles[x2][y2].type = typeswap;\n var newswap = level.tiles[x1][y1].isNew;\n level.tiles[x1][y1].isNew = level.tiles[x2][y2].isNew;\n level.tiles[x2][y2].isNew = newswap;\n }", "function noNewNodes() {preventNewNode = true;}", "function checkForMatchingNodes() {\n if(!inMotion){\n \n\n if(intersect !== undefined && isNearNode(intersect.object)) {\n rotationCount = 0;\n activeNode = intersect.object;\n originalRotY = activeNode.rotation.y;\n activeNode.updateMatrixWorld();\n THREE.SceneUtils.attach(bridge, scene, activeNode);\n inMotion = true;\n }\n }\n}", "constructor (node1,node2,options) {\n if (! options) options = {};\n this._payload = options.payload;\n this._node1 = node1;\n this._node2 = node2;\n this._id = new uuid4();\n }", "function emitOnDiff(oldData) {\n if (oldData !== data) {\n changeEmitter.emit('change', data);\n }\n }", "function deepEqual(obj1, obj2) {\n // Your code here\n}", "function same(el1, el2) {\n if (el1 && el2) {\n let first = el1.getBoundingClientRect();\n let second = el2.getBoundingClientRect();\n let state = first.top === second.top && first.left === second.left;\n return state;\n }\n return true;\n}", "addEdge(node1, node2) {\n\t\tnode1.edges.add(node2);\n\t\tnode2.edges.add(node1);\n\t\t// Update server\n\t\tserver.send('add-edge', {id1: node1.id, id2: node2.id})\n\t}", "function swapNodes(list, data1, data2) {\n console.log(`Swapping ${data1} and ${data2}:`);\n\n let node1Prev = null;\n let node2Prev = null;\n let node1 = list.head;\n let node2 = list.head;\n\n if (data1 === data2) {\n console.log(\"Elements are the same - no swap to be made\");\n return;\n }\n\n while (node1 !== null) {\n if (node1.data === data1) {\n break;\n }\n node1Prev = node1;\n node1 = node1.getNextNode();\n }\n\n while (node2 !== null) {\n if (node2.data === data2) {\n break;\n }\n node2Prev = node2;\n node2 = node2.getNextNode();\n }\n\n if (node1 === null || node2 === null) {\n console.log(\"Swap not possible - one or more element is not in the list\");\n return;\n }\n\n if (node1Prev === null) {\n list.head = node2;\n } else {\n node1Prev.setNextNode(node2);\n }\n\n if (node2Prev === null) {\n list.head = node1;\n } else {\n node2Prev.setNextNode(node1);\n }\n\n let temp = node1.getNextNode();\n node1.setNextNode(node2.getNextNode());\n node2.setNextNode(temp);\n}", "function compareLink(link1, link2) {\n return (((link1.target == link2.target && link1.source == link2.source) || (link1.target == link2.source && link2.target == link1.source)) ? true : false);\n }", "function updatePost(ne, oe) {\n var coe = oe.childNodes\n , cne = ne.childNodes\n , changed = false\n\n verb(\"cne #\" + cne.length + \", coe #\" + coe.length)\n\n try {\n\n // Add or change nodes\n for (var i = 0; i < cne.length; i++) {\n verb( \"cne.nodeType: \" + cne[i].nodeType + \"; coe.nodeType: \"\n + (coe[i] ? coe[i].nodeType : undefined)\n )\n verb(\"cne #\" + ne.childNodes.length + \", coe #\" + oe.childNodes.length)\n\n if (! coe[i]) {\n verb(\"updatePost: Append \" + i + \" / \" + cne.length)\n\n oe.appendChild(ne.childNodes[i].cloneNode(true))\n\n } else if ( cne[i].nodeType === 3\n && coe[i].nodeType === 3) {\n verb(\"updatePost: Text\")\n\n if (coe[i].textContent !== cne[i].textContent) {\n coe[i].textContent = cne[i].textContent\n\n changed = true\n }\n\n } else if ( cne[i].nodeType === 1\n && coe[i].nodeType === 1\n && cne[i].tagName === coe[i].tagName) {\n verb(\"updatePost: Element\")\n\n if (cne[i].tagName === \"OBJECT\") {\n if (cne[i].data !== coe[i].data) {\n coe[i].data = cne[i].data\n\n changed = true\n\n } else if ( cne[i].width !== coe[i].width\n || cne[i].height !== coe[i].height) {\n coe[i].width = cne[i].width\n coe[i].height = cne[i].height\n\n changed = true\n }\n\n } else if (cne[i].tagName === \"IMG\") {\n if (cne[i].src !== coe[i].src) {\n coe[i].src = cne[i].src\n\n changed = true\n }\n\n } else if (cne[i].tagName === \"DIV\") {\n // Recursion for deeper elements!\n var dc = updatePost(cne[i], coe[i])\n\n if (dc) changed = true\n }\n\n } else if ( cne[i].nodeType === 1\n && coe[i].nodeType === 1\n && cne[i].tagName === \"A\") {\n verb(\"updatePost: Octave\")\n\n var nm = cne[i].href.match(RegExp(embed[k].u, 'g'))\n , nsrc = cne[i].href\n for (var k in embeds)\n nsrc = nsrc.replace(RegExp(embeds[k].u, 'g'), embeds[k].s)\n\n if (coe[i].tagName === \"IFRAME\") {\n if (coe[i].src !== nsrc) {\n oe.replaceChild(ne.childNodes[i], oe.childNodes[i])\n\n changed = true\n }\n\n } else if (coe[i].tagName === \"VIDEO\"\n || coe[i].tagName === \"AUDIO\") {\n\n if (coe[i].src !== cne[i].href && nm) {\n coe[i].src = cne[i].href\n\n changed = true\n\n } else if (nm) {\n oe.replaceChild(ne.childNodes[i], oe.childNodes[i])\n\n changed = true\n\n }\n }\n\n } else {\n verb(\"updatePost: simple replace\")\n oe.replaceChild(ne.childNodes[i].cloneNode(true), oe.childNodes[i])\n\n changed = true\n }\n }\n\n verb(\"cne #\" + ne.childNodes.length + \", coe #\" + oe.childNodes.length)\n\n // FIXME deletes appended nodes ???\n // Remove deleted nodes\n if (coe.length > cne.length) {\n // coe.length changes\n var len = coe.length\n\n // remove excessive nodes\n for (var i = cne.length; i < len; i++) {\n debu(\"updatePost: Removing node \" + i + \" / \" + len)\n\n oe.removeChild(coe[cne.length])\n }\n }\n\n verb(\"updatePost: changed? \" + changed)\n if (changed) time = 10000\n\n } catch(e) { debu(e.toString()) }\n\n return changed\n}", "function traceSources(node, original) {\n\t\t\tvar i,\n\t\t\t\tsource,\n\t\t\t\tnodeSources;\n\n\t\t\tif (!(node instanceof EffectNode) && !(node instanceof TransformNode)) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\tif (node === original) {\n\t\t\t\treturn true;\n\t\t\t}\n\n\t\t\tnodeSources = node.sources;\n\n\t\t\tfor (i in nodeSources) {\n\t\t\t\tif (nodeSources.hasOwnProperty(i)) {\n\t\t\t\t\tsource = nodeSources[i];\n\n\t\t\t\t\tif (source === original || traceSources(source, original)) {\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn false;\n\t\t}", "function update(data_node = nodeData, data_link = linkData) {\n node = node.data(data_node, function (d) {\n return d.name;\n });\n node.exit().remove();\n var newNode = node.enter().append('circle').attr('class', 'node')\n .attr('r', function (d) {\n return radiusScale(parseInt(d['InNode']) + parseInt(d['OutNode']));\n })\n .attr('fill', function (d) {\n return giveColorOnName(d.name)\n }).call(d3.drag()\n .on(\"start\", drag_start)\n .on(\"drag\", drag_drag)\n .on(\"end\", drag_end)\n );\n\n node = node.merge(newNode);\n link = link.data(data_link, function (d, i) {\n return i;\n });\n link.exit().remove();\n newLink = link.enter().append(\"path\")\n .attr(\"class\", \"link\");\n link = link.merge(newLink);\n node.on('mouseover', function (d) {\n\n svg.selectAll('text').remove();\n var array = [d];\n d.s = new Set();\n\n var mapping = replicaMapping[d.name];\n link.style('stroke-width', function (l) {\n if (mapping.indexOf(l['replicaId']) != -1) {\n if (l.source !== d) {\n if (array.indexOf(l.source) === -1) {\n l.source.s = new Set();\n l.source.s.add(l['replicaId']);\n array.push(l.source);\n } else {\n var index = array.indexOf(l.source);\n array[index].s.add(l['replicaId']);\n }\n }\n if (l.target !== d) {\n if (array.indexOf(l.target) === -1) {\n l.target.s = new Set();\n l.target.s.add(l['replicaId']);\n array.push(l.target);\n } else {\n var index = array.indexOf(l.target);\n array[index].s.add(l['replicaId']);\n }\n }\n return 4;\n }\n else {\n return 1;\n }\n });\n node.style('opacity', function (l) {\n if (array.indexOf(l) !== -1) {\n var tooltip = svg.append('g').attr('class', 'tooltip').style('opacity', 1);\n tooltip\n .append('path')\n .attr(\"d\", d3.symbol().size([80]).type(d3.symbolTriangle))\n .attr(\"transform\", function () {\n var radius = (radiusScale(l['InNode'] + l['OutNode']) + 10);\n\n return \"translate(\" + l['x'] + \", \" + (l['y'] - radius) + \")rotate(180)\"\n })\n .style(\"fill\", function () {\n return 'black'\n }).attr('opacity', 0.7);\n var width = 250;\n var widthCenter = width / 2;\n var rectHeight = 30;\n var string = '';\n // var texts = [];\n // if (l.s) {\n // i = 0;\n // l.s.forEach(function (value) {\n // console.log(value);\n // if (i == 0) {\n // rectHeight += 15;\n // if (string) {\n // texts.push(string)\n // }\n // string = value\n // } else {\n // string += ',' + value\n // }\n // i = (i + 1) % 4;\n // });\n // if (string) {\n // texts.push(string);\n // }\n // }\n tooltip.append('rect')\n .attr('x', l['x'] - widthCenter)\n .attr('y', l['y'] - rectHeight - (radiusScale(l['InNode'] + l['OutNode']) + 10 + 3))\n .attr('height', rectHeight + '')\n .attr('width', width + '')\n .attr('fill', 'black');\n tooltip.append('text')\n .attr('x', l['x'] - widthCenter + 15)\n .attr('y', l['y'] - rectHeight - (radiusScale(l['InNode'] + l['OutNode']) + 10) + 15)\n .text(mappingName(l['name']));\n return 1\n } else {\n return 0.1\n }\n });\n });\n node.on('mouseout', function () {\n svg.selectAll('text').remove();\n svg.selectAll(\".n\").remove();\n $(\".tooltip\").remove();\n link.style('stroke-width', 4);\n node.style('opacity', function (l) {\n return 1;\n });\n });\n // node.on('click', function (d) {\n // var array = [];\n // var map = {};\n // for (l in linkData) {\n // if (d.replicas.indexOf(linkData[l]['replicaId']) != -1) {\n // if (!map[linkData[l].source.name]) {\n // map[linkData[l].source.name] = {};\n // array.push(linkData[l].source.name)\n // }\n // if (!map[linkData[l].source.name][linkData[l].target.name]) {\n // map[linkData[l].source.name][linkData[l].target.name] = 0;\n // array.push(linkData[l].target.name)\n // }\n // map[linkData[l].source.name][linkData[l].target.name]++;\n // }\n // }\n // console.log(map);\n // var matrix = [];\n // for (i in array) {\n // matrix.push(new Array(array.length));\n // for (var j = 0; j <= i; j++) {\n // if (map[array[i]] && map[array[i]][array[j]]) {\n // matrix[i][j] = map[array[i]][array[j]]\n // } else {\n // matrix[i][j] = 1;\n // }\n // }\n // }\n // chord_setup(matrix);\n // $('#chordModal').modal('toggle');\n // });\n simulation\n .nodes(nodeData)\n .on(\"tick\", ticked);\n simulation.force(\"link\")\n .links(linkData);\n simulation.alpha(1).alphaTarget(0).restart();\n }", "function nodeRepulsion(node1, node2) {\n // we do this twice because we want to repel from both corners, not just the\n // upper left corner.\n var x1 = node1.x + node1.group.x + ITEM_WIDTH * node1.nodeDegree / 2;\n var x2 = node2.x + node2.group.x + ITEM_WIDTH * node2.nodeDegree / 2;\n\n\n var r = x1 - x2;\n\n var force = 0;\n\n force = KE * Math.pow(node1.nodeDegree - 2, 1.5)\n * Math.pow(Q_CONST, 2) / Math.pow(r,2);\n\n if (r < 0) {\n force = -force;\n }\n //console.log(\"repulsive force: \" + force);\n return force\n}", "function Diff() {}", "function Diff() {}", "function Diff() {}", "function Diff() {}", "function Diff() {}", "function Diff() {}", "function computeNodeLinks() {\r\n var nodeHash = {};\r\n var linkHash = {};\r\n // remove duplicated node\r\n nodes = nodes.filter(function (node) {\r\n if (typeof nodeHash[node.id] !== 'undefined') {\r\n $.extend(nodeHash[node.id], node);\r\n return false;\r\n }\r\n nodeHash[node.id] = node;\r\n return true;\r\n });\r\n // remove duplicated link\r\n links = links.filter(function (link) {\r\n var id1 = typeof link.source === 'string' ? link.source : link.source.id;\r\n var id2 = typeof link.target === 'string' ? link.target : link.target.id;\r\n if (typeof nodeHash[id1] === 'undefined' || typeof nodeHash[id2] === 'undefined') {\r\n return false;\r\n }\r\n var key = id1 + '_' + id2;\r\n if (typeof linkHash[key] !== 'undefined') {\r\n //$.extend(linkHash[key], link);\r\n return false;\r\n }\r\n linkHash[key] = link;\r\n return true;\r\n });\r\n\r\n nodes.forEach(function(node) {\r\n //nodeHash[node.id] = node;\r\n node.sourceLinks = [];\r\n node.targetLinks = [];\r\n });\r\n links.forEach(function(link) {\r\n var source = link.source,\r\n target = link.target;\r\n \r\n if (typeof source === \"string\") source = link.source = nodeHash[link.source];\r\n if (typeof target === \"string\") target = link.target = nodeHash[link.target];\r\n \r\n source.sourceLinks.push(link);\r\n target.targetLinks.push(link);\r\n });\r\n }", "function updateDocumentState() {\n\n // Get the Iframe content not in xml \n let JqueryIframe = $(`<div>${tinymce.activeEditor.getContent()}</div>`)\n let JquerySavedContent = $(`#raje_root`)\n\n // True if they're different, False is they're equal\n ipcRenderer.send('updateDocumentState', JqueryIframe.html() != JquerySavedContent.html())\n }", "function processNodes( nodesToModify ) {\n nodesToModify.forEach(( node ) => {\n // Hardcode hack this node's position for demo.\n if ( window.DEMO_MODE ) {\n if ( node.name === 'Mumbai Node' ) {\n node.coords.lat = '12.576009912063801';\n node.coords.lng = '75.322265625';\n }\n }\n\n // convert to number\n node.coords.lat = ( typeof node.coords.lat === 'string'\n ? parseFloat(node.coords.lat)\n : node.coords.lat\n );\n node.coords.lng = ( typeof node.coords.lng === 'string'\n ? parseFloat(node.coords.lng)\n : node.coords.lng\n );\n // Add latlng as string to connect it to region\n node.lat_lng_id = createLatLngId( node.coords.lat, node.coords.lng );\n\n });\n }", "_checkSameRev(firstRev, secondRev) {\n const normalizeRev = (rev) => {\n const result = {};\n Object.keys(rev).forEach((key) => {\n const value = rev[key];\n // Ignore the tid attribute\n // Ignore all falsy values, as well as an empty array\n if (key === 'tid' || !value || (Array.isArray(value) && !value.length)) {\n return;\n }\n\n if (key === 'timestamp') {\n // 'timestamp' fields need to be parsed because Cassandra\n // returns a ISO8601 ts which includes milliseconds, while\n // the ts returned by MW API does not\n result[key] = Date.parse(value);\n } else {\n result[key] = value;\n }\n });\n return result;\n };\n return stringify(normalizeRev(firstRev)) === stringify(normalizeRev(secondRev));\n }", "function selectionCompareNodes(){\n //adding the step to the step display\n addStep(\"Compare index Node \" + (selectionIndex + 1) + \" to smallest Node \" + (selectionSmallest + 1) +\".\");\n \n setClass(nodes[selectionIndex], 2, \"Index\"); //set the index node to the index color\n\n //if index is smaller than smallest\n if(orderArray[selectionIndex] < orderArray[selectionSmallest]){ \n foundNewSorted = true;\n return;\n }\n selectionIndex++;\n\n}", "function equal(itemOne, itemTwo) {\n // 1. add them to the array of flipped classes\n cardsCollected.push(itemOne, itemTwo);\n // 2. TO DO: add animation UI for correct result\n correct(cardOneElement);\n correct(cardTwoElement);\n // remove class from element\n setTimeout(function () {\n removeCorrect(cardOneElement)\n }, 350);\n setTimeout(function () {\n removeCorrect(cardTwoElement)\n }, 350);\n // 3. disable the element from being clicked\n disableClick(cardOneElement);\n disableClick(cardTwoElement);\n // 4. reset element pointers\n setTimeout(resetElementPointer, 300);\n}", "function changeTaskInMultitask(nd1, nd2) {\n if (!isType(CourseMeta.actCourseRoot, 2 /* multiTask */))\n return false;\n var p1 = nd1.findParent(function (nd) {\n return _.any(CourseMeta.actCourseRoot.items, function (it) {\n return it == nd;\n });\n });\n var p2 = nd2.findParent(function (nd) {\n return _.any(CourseMeta.actCourseRoot.items, function (it) {\n return it == nd;\n });\n });\n return p1 && p2 && p1 != p2;\n }", "anchoredNodeRemoved(node) {}", "function merge_node(source_node_id, target_node_id, compressing) {\n $.each(edges_of(get_ellipse(source_node_id)), function(index, edge) {\n if (edge.is_incoming == true) {\n edge.attach_endpoint(target_node_id);\n } else {\n edge.attach_startpoint(target_node_id, compressing);\n }\n });\n if (!compressing) {\n // Add source node witnesses to target node\n // TODO see if we can get this info from the server\n // NOTE: this may need to be more complex to account for witness layers\n $.each(readingdata[source_node_id].witnesses, function(i, d) {\n readingdata[target_node_id].witnesses.push(d)\n });\n }\n delete_reading(source_node_id);\n // Remove any relation paths that belonged to this node\n var relselector = 'g.relation[id*=\"' + source_node_id + '\"]';\n $(relselector).remove();\n // Remove the SVG node itself\n $(jq(source_node_id)).remove();\n}", "swap(editor, path1, path2) {\n if (path1 && SelectionTransforms.isComponentElementPath(editor, path1) && path2 && SelectionTransforms.isComponentElementPath(editor, path2)) {\n if (Path.equals(path1, path2)) {\n return;\n }\n\n const [, containerPath1] = ContainerTransforms.getContainer(editor, path1);\n const [, containerPath2] = ContainerTransforms.getContainer(editor, path2);\n\n if (!containerPath1 || !containerPath2) {\n return;\n }\n\n const withinSameContainer = Path.equals(containerPath1, containerPath2);\n if (withinSameContainer) {\n\n // Moving within the same container, so we start by sorting the two paths, to ensure we always move \"down\":\n // const sorted = path1[1] < path2[1];\n const sorted = Path.isBefore(path1, path2);\n const p1 = sorted ? path1 : path2;\n const p2 = sorted ? path2 : path1;\n\n // After moving p1 to p2 DOWN* (we guarantee that, above), the node at p2 will be shifted one element UP,\n // which we need to account for.\n const newP2 = [...p2];\n newP2[newP2.length - 1]--; // compat: p2[p2.length - 1] > 0\n Editor.withoutNormalizing(editor, () => {\n Transforms.moveNodes(editor, { at: p1, to: p2, mode: \"all\", voids: true });\n Transforms.moveNodes(editor, { at: newP2, to: p1, mode: \"all\", voids: true });\n });\n\n } else {\n\n // If we are moving elements between containers, we don't have to worry about relative\n // positioning and direction of the swap. The element that was originally at path2\n // will be shifted down one position, as we've added a new element to the container.\n const newPath2 = [...path2];\n newPath2[newPath2.length - 1]++; // down by one element\n\n Editor.withoutNormalizing(editor, () => {\n Transforms.moveNodes(editor, { at: path1, to: path2, mode: \"all\", voids: true });\n Transforms.moveNodes(editor, { at: newPath2, to: path1, mode: \"all\", voids: true });\n });\n }\n }\n }", "function cloneNodes(sourceNode, targetNode) {\n var newNode = sourceNode.cloneNode(false);\n targetNode.appendChild(newNode);\n\n if (!sourceNode.tagName) return; // skip inner text\n\n // compare computed styles at this node and apply the differences directly\n applyStyles(sourceNode, newNode);\n\n [].forEach.call(sourceNode.childNodes, function (childNode) {\n // clone each child node and apply styles\n cloneNodes(childNode, newNode);\n });\n }", "function areEqual(a, b) {\n\t var aStack = aStackPool.length ? aStackPool.pop() : [];\n\t var bStack = bStackPool.length ? bStackPool.pop() : [];\n\t var result = eq(a, b, aStack, bStack);\n\t aStack.length = 0;\n\t bStack.length = 0;\n\t aStackPool.push(aStack);\n\t bStackPool.push(bStack);\n\t return result;\n\t}", "function areEqual(a, b) {\n\t var aStack = aStackPool.length ? aStackPool.pop() : [];\n\t var bStack = bStackPool.length ? bStackPool.pop() : [];\n\t var result = eq(a, b, aStack, bStack);\n\t aStack.length = 0;\n\t bStack.length = 0;\n\t aStackPool.push(aStack);\n\t bStackPool.push(bStack);\n\t return result;\n\t}", "function areEqual(a, b) {\n\t var aStack = aStackPool.length ? aStackPool.pop() : [];\n\t var bStack = bStackPool.length ? bStackPool.pop() : [];\n\t var result = eq(a, b, aStack, bStack);\n\t aStack.length = 0;\n\t bStack.length = 0;\n\t aStackPool.push(aStack);\n\t bStackPool.push(bStack);\n\t return result;\n\t}", "function noChange(oldProps, newProps){\n let hoverDelta = oldProps.node.hovering !== newProps.node.hovering\n let draggingDelta = oldProps.node.dragging !== newProps.node.dragging\n let openDelta = oldProps.node.open !== newProps.node.open\n return(hoverDelta || draggingDelta || openDelta)\n}" ]
[ "0.65819186", "0.643466", "0.62595165", "0.6197642", "0.61951375", "0.612043", "0.6062609", "0.5994512", "0.5971914", "0.576292", "0.5684749", "0.56583536", "0.5656101", "0.5656101", "0.56445336", "0.5625504", "0.560722", "0.560722", "0.5548998", "0.55414796", "0.55400175", "0.5481619", "0.54564625", "0.54542285", "0.54291815", "0.54259664", "0.54256296", "0.5386453", "0.53737", "0.5337575", "0.5333821", "0.53117496", "0.5306442", "0.52938503", "0.5288747", "0.5260931", "0.5259881", "0.52468956", "0.5244067", "0.5210358", "0.5178313", "0.51707333", "0.5169933", "0.51645434", "0.51620156", "0.5155368", "0.51493645", "0.51397866", "0.513456", "0.5109275", "0.5101253", "0.5100382", "0.51002973", "0.5089673", "0.5080911", "0.50616854", "0.50511295", "0.50505406", "0.50503886", "0.50494987", "0.5048215", "0.50407416", "0.5036759", "0.5035454", "0.5023719", "0.50011384", "0.50006294", "0.49801362", "0.49680918", "0.49649706", "0.49597502", "0.49592417", "0.49512938", "0.4950322", "0.49465528", "0.49386537", "0.49256733", "0.49002197", "0.48991233", "0.48852262", "0.4883267", "0.4883267", "0.4883267", "0.4883267", "0.4883267", "0.4883267", "0.4876723", "0.4871541", "0.48699895", "0.4862329", "0.48615503", "0.4859729", "0.48537335", "0.4851534", "0.48436958", "0.48361373", "0.48226622", "0.48223135", "0.48223135", "0.48223135", "0.48194927" ]
0.0
-1
List diff, naive left to right reordering
function reorder(aChildren, bChildren) { // O(M) time, O(M) memory var bChildIndex = keyIndex(bChildren) var bKeys = bChildIndex.keys var bFree = bChildIndex.free if (bFree.length === bChildren.length) { return { children: bChildren, moves: null } } // O(N) time, O(N) memory var aChildIndex = keyIndex(aChildren) var aKeys = aChildIndex.keys var aFree = aChildIndex.free if (aFree.length === aChildren.length) { return { children: bChildren, moves: null } } // O(MAX(N, M)) memory var newChildren = [] var freeIndex = 0 var freeCount = bFree.length var deletedItems = 0 // Iterate through a and match a node in b // O(N) time, for (var i = 0 ; i < aChildren.length; i++) { var aItem = aChildren[i] var itemIndex if (aItem.key) { if (bKeys.hasOwnProperty(aItem.key)) { // Match up the old keys itemIndex = bKeys[aItem.key] newChildren.push(bChildren[itemIndex]) } else { // Remove old keyed items itemIndex = i - deletedItems++ newChildren.push(null) } } else { // Match the item in a with the next free item in b if (freeIndex < freeCount) { itemIndex = bFree[freeIndex++] newChildren.push(bChildren[itemIndex]) } else { // There are no free items in b to match with // the free items in a, so the extra free nodes // are deleted. itemIndex = i - deletedItems++ newChildren.push(null) } } } var lastFreeIndex = freeIndex >= bFree.length ? bChildren.length : bFree[freeIndex] // Iterate through b and append any new keys // O(M) time for (var j = 0; j < bChildren.length; j++) { var newItem = bChildren[j] if (newItem.key) { if (!aKeys.hasOwnProperty(newItem.key)) { // Add any new keyed items // We are adding new items to the end and then sorting them // in place. In future we should insert new items in place. newChildren.push(newItem) } } else if (j >= lastFreeIndex) { // Add any leftover non-keyed items newChildren.push(newItem) } } var simulate = newChildren.slice() var simulateIndex = 0 var removes = [] var inserts = [] var simulateItem for (var k = 0; k < bChildren.length;) { var wantedItem = bChildren[k] simulateItem = simulate[simulateIndex] // remove items while (simulateItem === null && simulate.length) { removes.push(remove(simulate, simulateIndex, null)) simulateItem = simulate[simulateIndex] } if (!simulateItem || simulateItem.key !== wantedItem.key) { // if we need a key in this position... if (wantedItem.key) { if (simulateItem && simulateItem.key) { // if an insert doesn't put this key in place, it needs to move if (bKeys[simulateItem.key] !== k + 1) { removes.push(remove(simulate, simulateIndex, simulateItem.key)) simulateItem = simulate[simulateIndex] // if the remove didn't put the wanted item in place, we need to insert it if (!simulateItem || simulateItem.key !== wantedItem.key) { inserts.push({key: wantedItem.key, to: k}) } // items are matching, so skip ahead else { simulateIndex++ } } else { inserts.push({key: wantedItem.key, to: k}) } } else { inserts.push({key: wantedItem.key, to: k}) } k++ } // a key in simulate has no matching wanted key, remove it else if (simulateItem && simulateItem.key) { removes.push(remove(simulate, simulateIndex, simulateItem.key)) } } else { simulateIndex++ k++ } } // remove all the remaining nodes from simulate while(simulateIndex < simulate.length) { simulateItem = simulate[simulateIndex] removes.push(remove(simulate, simulateIndex, simulateItem && simulateItem.key)) } // If the only moves we have are deletes then we can just // let the delete patch remove these items. if (removes.length === deletedItems && !inserts.length) { return { children: newChildren, moves: null } } return { children: newChildren, moves: { removes: removes, inserts: inserts } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "_orderSort(l, r) {\n return l.order - r.order;\n }", "function orderedDiff(A, B, comparison) {\n var patches = [];\n var i, j, k;\n\n count = 0;\n for (i = 0, j = 0, k = 0; i < A.length && j < B.length; ++k) {\n var res = comparison(A[i], B[j]);\n\n if (res == null) {\n // replacement, remove and add without changing the insertion index\n patches.push(new ListPatches.Remove(k, A[i]));\n patches.push(new ListPatches.Add(k, B[j]));\n ++i;\n ++j;\n } else if (res == 0) {\n // not changed\n ++i;\n ++j;\n } else if (res < 0) {\n // A[i] < B[j]\n // means that we need to nuke stuff from A until we catch up, keep B\n // at the same place\n patches.push(new ListPatches.Remove(k, A[i]));\n ++i;\n --k;\n } else {\n // A[i] > B[j]\n // means that we added stuff to B that's less than where we are in A,\n // emit Add ops and catch B up\n patches.push(new ListPatches.Add(k, B[j]));\n ++j;\n }\n }\n\n if (i == A.length && j != B.length) {\n // everything at the end of B is adds\n while (j < B.length) {\n patches.push(new ListPatches.Add(k, B[j]));\n ++j;\n ++k;\n }\n } else if (i != A.length && j == B.length) {\n // everything at the end of A is removes\n while (i < A.length) {\n patches.push(new ListPatches.Remove(k, A[i]));\n ++i;\n }\n }\n\n return new ListPatches.Sequence(patches);\n}", "function lexicalListOrder( l1, l2 ){\n \"use strict\";\n var c1, c2;\n c1 = l1.clone();\n c2 = l2.clone();\n c1.reverse();\n c2.reverse();\n return lexicalListOrderD( c1, c2 );\n}", "function switchRightToLeft(listLeft) {\n let tempList = new Array();\n for (var i=0; i < 4; i++){\n tempList[i] = new Array();\n for (var j = 0; j < 4; j++){\n tempList[i][j] = 0;\n }\n }\n for (var i=0;i<4;i++){\n var counter = 0;\n for (var j=0;j<4;j++){\n if (! checkNotZero(listLeft[i][j])){\n counter++;\n }\n }\n //update by index of not zero\n for (var j=0;j<4;j++){\n if (j+counter<4){\n tempList[i][j+counter]=listLeft[i][j];\n }\n }\n }\n return tempList;\n }", "function sortedDiff(before, after, compare) {\n var result = [];\n\n function pushSplice(start, deleteCount, toInsert) {\n if (deleteCount === 0 && toInsert.length === 0) {\n return;\n }\n\n var latest = result[result.length - 1];\n\n if (latest && latest.start + latest.deleteCount === start) {\n var _latest$toInsert;\n\n latest.deleteCount += deleteCount;\n\n (_latest$toInsert = latest.toInsert).push.apply(_latest$toInsert, _babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_2___default()(toInsert));\n } else {\n result.push({\n start: start,\n deleteCount: deleteCount,\n toInsert: toInsert\n });\n }\n }\n\n var beforeIdx = 0;\n var afterIdx = 0;\n\n while (true) {\n if (beforeIdx === before.length) {\n pushSplice(beforeIdx, 0, after.slice(afterIdx));\n break;\n }\n\n if (afterIdx === after.length) {\n pushSplice(beforeIdx, before.length - beforeIdx, []);\n break;\n }\n\n var beforeElement = before[beforeIdx];\n var afterElement = after[afterIdx];\n var n = compare(beforeElement, afterElement);\n\n if (n === 0) {\n // equal\n beforeIdx += 1;\n afterIdx += 1;\n } else if (n < 0) {\n // beforeElement is smaller -> before element removed\n pushSplice(beforeIdx, 1, []);\n beforeIdx += 1;\n } else if (n > 0) {\n // beforeElement is greater -> after element added\n pushSplice(beforeIdx, 0, [afterElement]);\n afterIdx += 1;\n }\n }\n\n return result;\n}", "function invertir(list) {\n if(longitud(list)==0){\n return [];\n } else {\n return cons(last(list),invertir(pop(list)));\n }\n}", "function sortedDiff(before, after, compare) {\n var result = [];\n function pushSplice(start, deleteCount, toInsert) {\n var _a;\n if (deleteCount === 0 && toInsert.length === 0) {\n return;\n }\n var latest = result[result.length - 1];\n if (latest && latest.start + latest.deleteCount === start) {\n latest.deleteCount += deleteCount;\n (_a = latest.toInsert).push.apply(_a, __spread(toInsert));\n }\n else {\n result.push({ start: start, deleteCount: deleteCount, toInsert: toInsert });\n }\n }\n var beforeIdx = 0;\n var afterIdx = 0;\n while (true) {\n if (beforeIdx === before.length) {\n pushSplice(beforeIdx, 0, after.slice(afterIdx));\n break;\n }\n if (afterIdx === after.length) {\n pushSplice(beforeIdx, before.length - beforeIdx, []);\n break;\n }\n var beforeElement = before[beforeIdx];\n var afterElement = after[afterIdx];\n var n = compare(beforeElement, afterElement);\n if (n === 0) {\n // equal\n beforeIdx += 1;\n afterIdx += 1;\n }\n else if (n < 0) {\n // beforeElement is smaller -> before element removed\n pushSplice(beforeIdx, 1, []);\n beforeIdx += 1;\n }\n else if (n > 0) {\n // beforeElement is greater -> after element added\n pushSplice(beforeIdx, 0, [afterElement]);\n afterIdx += 1;\n }\n }\n return result;\n}", "function diffOfListsSameNameElementsSensitive(oldList, newList, outs, ins) {\n var i = 0, j = 0, result;\n\n while (i < oldList.length && j < newList.length) {\n // we have to use the same compare function which is used in sorting...\n result = meOnTopComparator(oldList[i], newList[j]);\n if (result === 0) {\n i++;\n j++;\n } else if (result > 0) {\n ins.push(newList[j].displayName);\n j++;\n } else { // (result < 0) \n outs.push(oldList[i].displayName);\n i++;\n }\n }\n\n // If there are remaining elements in oldList they are out elements.\n while (i < oldList.length) {\n outs.push(oldList[i].displayName);\n i++;\n }\n\n // Or, if there are remaining elements in newList they are in elements.\n while (j < newList.length) {\n ins.push(newList[j].displayName);\n j++;\n }\n }", "function switchDownToLeft(listLeft) {\n let tempList = new Array();\n for (var i=0; i < 4; i++){\n tempList[i] = new Array();\n for (var j = 0; j < 4; j++){\n tempList[i][j] = 0;\n }\n }\n for (var j=0;j<4;j++){\n var counter = 0;\n for (var i=0;i<4;i++){\n if (! checkNotZero(listLeft[i][j])){\n counter++;\n }\n }\n //update by index of not zero\n for (var i=0;i<4;i++){\n if (i+counter<4){\n tempList[i+counter][j]=listLeft[i][j];\n }\n }\n }\n return tempList;\n }", "function sort_li(a, b) {\n return ($(b).data('seq')) < ($(a).data('seq')) ? 1 : -1;\n }", "function sumListsForwardOrder(list1, list2){ //FORWARD ORDER IMPLEMENTATION\n\n}", "function switchUpToLeft(listleft) {\n let tempList = new Array();\n for (var i=0; i < 4; i++){\n tempList[i] = new Array();\n for (var j = 0; j < 4; j++){\n tempList[i][j] = 0;\n }\n }\n //transpose of the matrix\n for (var i=0;i<4;i++){\n for (var j=0;j<4;j++){\n tempList[j][i] = listleft[i][j];\n }\n }\n return tempList;\n }", "function lexicalListOrderD( l1, l2 ){\n \"use strict\";\n var h1, h2, sub;\n if ( l1.length === 0 ){\n\treturn true;\n }\n if ( l2.length === 0 ){\n\treturn \"equal\";\n }\n h1 = l1.pop();\n h2 = l2.pop();\n if ( typeof( h1 ) === \"number\" && typeof( h2 ) === \"number\" ){\n\tif ( h1 < h2 ) {\n\t return true;\n\t} else if ( h1 > h2 ) {\n\t return false;\n\t} else{\n\t return lexicalListOrderD( l1, l2 );\n\t}\n } else {\n\th1.reverse();\n\th2.reverse();\n\tsub = lexicalListOrderD( h1, h2 );\n\tif ( sub !== \"equal\" ){\n\t return sub;\n\t} else {\n\t return lexicalListOrderD( l1, l2 );\n\t}\n }\n}", "function skipSwap(array) {\n var skipTarget_L = 0\n var skipTarget_R = array.length-1\n for (var i = 0; i < array.length/2; i+=2){\n // if (array[skipTarget_L] < array[skipTarget_R]){\n temp = array[skipTarget_L]\n array[skipTarget_L] = array[skipTarget_R]\n array[skipTarget_R] = temp\n skipTarget_L +=2\n skipTarget_R = (array.length -1) - skipTarget_L\n // }\n }\n console.log(array);\n}", "function patch(old, diff) {\n\tvar out = [];\n\tvar i = 0;\n\twhile (i < diff.length) {\n\t\tif (diff[i]) { // matching\n\t\t\tArray.prototype.push.apply(out, old.slice(out.length, out.length + diff[i]));\n\t\t}\n\t\ti++;\n\t\tif (i < diff.length && diff[i]) { // mismatching\n\t\t\tArray.prototype.push.apply(out, diff.slice(i + 1, i + 1 + diff[i]));\n\t\t\ti += diff[i];\n\t\t}\n\t\ti++;\n\t}\n\treturn out;\n}", "function patch(old, diff) {\n\tvar out = [];\n\tvar i = 0;\n\twhile (i < diff.length) {\n\t\tif (diff[i]) { // matching\n\t\t\tArray.prototype.push.apply(out, old.slice(out.length, out.length + diff[i]));\n\t\t}\n\t\ti++;\n\t\tif (i < diff.length && diff[i]) { // mismatching\n\t\t\tArray.prototype.push.apply(out, diff.slice(i + 1, i + 1 + diff[i]));\n\t\t\ti += diff[i];\n\t\t}\n\t\ti++;\n\t}\n\treturn out;\n}", "function sortList( list ) {\n let switched = true;\n while( switched ) {\n switched = false;\n if ( list.childElementCount ) {\n // for ( let i = 0; i < list.childElementCount - 1; i++ ) {\n for ( let i = 0; i < list.childElementCount; i++ ) {\n let item = list.children[i];\n let idNumber = item.id.match( /\\d+/ )[0];\n let nextItem = list.children[i+1];\n let nextIdNumber = nextItem ? nextItem.id.match( /\\d+/ )[0] : null;\n if ( nextIdNumber && idNumber > nextIdNumber ) {\n // console.log('idNumber:', idNumber, 'nextIdNumber:', nextIdNumber);\n list.insertBefore( nextItem, item );\n switched = true;\n }\n }\n }\n }\n }", "function orderChanged(changed, fixed) {\n // It is roughly in the order of these examples.\n // 4, 6, 0, 2, 1, 3, 5, 7\n var fromLinks = []; // 0, 1, 2, 3, 4, 5, 6, 7\n\n var toLinks = [];\n changed.forEach(function (_a) {\n var from = _a[0],\n to = _a[1];\n var link = new Link();\n fromLinks[from] = link;\n toLinks[to] = link;\n }); // `fromLinks` are connected to each other by double linked list.\n\n fromLinks.forEach(function (link, i) {\n link.connect(fromLinks[i - 1]);\n });\n return changed.filter(function (_, i) {\n return !fixed[i];\n }).map(function (_a, i) {\n var from = _a[0],\n to = _a[1];\n\n if (from === to) {\n return [0, 0];\n }\n\n var fromLink = fromLinks[from];\n var toLink = toLinks[to - 1];\n var fromIndex = fromLink.getIndex(); // Disconnect the link connected to `fromLink`.\n\n fromLink.disconnect(); // Connect `fromLink` to the right of `toLink`.\n\n if (!toLink) {\n fromLink.connect(undefined, fromLinks[0]);\n } else {\n fromLink.connect(toLink, toLink.next);\n }\n\n var toIndex = fromLink.getIndex();\n return [fromIndex, toIndex];\n });\n }", "function stitch(list1, list2) {\n const result = []\n\n while (list1.length && list2.length) {\n if (list1[0] <= list2[0]) { result.push(list1.shift()) } else { result.push(list2.shift()) }\n }\n\n return result.concat(list1, list2)\n}", "function reorder(leftChildren, rightChildren) {\n var leftChildIndex = keyIndex(leftChildren)\n var leftKeys = leftChildIndex.key\n var leftIndex = leftChildIndex.index\n var rightChildIndex = keyIndex(rightChildren)\n var rightKeys = rightChildIndex.key\n var rightIndex = rightChildIndex.index\n var leftLength = leftChildren.length\n var rightLength = rightChildren.length\n var leftOffset = 0\n var rightOffset = 0\n var rightMoved = []\n var leftMoved = []\n var removes = []\n var inserts = []\n var next = []\n var index = -1\n var leftKey\n var rightKey\n\n while (++index < leftLength) {\n leftKey = leftIndex[index]\n\n if (leftKey in rightKeys) {\n next.push(rightChildren[rightKeys[leftKey]])\n } else {\n next.push(null)\n }\n }\n\n index = -1\n\n while (++index < rightLength) {\n if (!(rightIndex[index] in leftKeys)) {\n next.push(rightChildren[index])\n }\n }\n\n leftChildren = next\n leftChildIndex = keyIndex(leftChildren)\n leftKeys = leftChildIndex.key\n leftIndex = leftChildIndex.index\n leftLength = leftChildren.length\n rightKey = rightIndex[rightOffset]\n leftKey = leftIndex[leftOffset]\n\n while (leftOffset < leftLength || rightOffset < rightLength) {\n /* The left node moved already. */\n if (leftMoved.indexOf(leftOffset) !== -1) {\n removes.push({left: leftChildren[leftOffset], right: leftOffset})\n leftKey = leftIndex[++leftOffset]\n /* The right node moved already. */\n } else if (rightMoved.indexOf(rightOffset) !== -1) {\n removes.push({\n left: rightChildren[rightOffset],\n right: leftKeys[rightKey]\n })\n rightKey = rightIndex[++rightOffset]\n } else if (!rightKey) {\n leftKey = leftIndex[++leftOffset]\n } else if (!leftKey) {\n rightKey = rightIndex[++rightOffset]\n } else if (rightKey === leftKey) {\n leftKey = leftIndex[++leftOffset]\n rightKey = rightIndex[++rightOffset]\n } else if (\n leftKeys[rightKey] - leftOffset >=\n rightKeys[leftKey] - rightOffset\n ) {\n inserts.push({left: rightChildren[rightOffset], right: rightOffset})\n leftMoved.push(leftKeys[rightKey])\n rightKey = rightIndex[++rightOffset]\n } else {\n inserts.push({left: leftChildren[leftOffset], right: rightKeys[leftKey]})\n rightMoved.push(rightKeys[leftKey])\n leftKey = leftIndex[++leftOffset]\n }\n }\n\n if (removes.length === 0 && inserts.length === 0) {\n return {children: leftChildren, moves: null}\n }\n\n return {\n children: leftChildren,\n moves: {removes: removes, inserts: inserts}\n }\n}", "function diff(left, right) {\n const result = [];\n _.each(left, (leftObject) => {\n const rightObject = _.find(right, (rightObject) => _.isEqual(rightObject[exports.options.uniqueKey], leftObject[exports.options.uniqueKey]));\n if (!rightObject) {\n return;\n }\n const ret = {\n missingKeys: { inLeftButNotRight: [], inRightButNotLeft: [] },\n differentValues: [],\n inLeftButNotRight: [],\n inRightButNotLeft: [],\n left: {},\n right: {}\n };\n const missingKeys = checkMissingKeys(leftObject, rightObject);\n if (!_.isEmpty(missingKeys.inLeftButNotRight) ||\n !_.isEmpty(missingKeys.inRightButNotLeft)) {\n ret.missingKeys = missingKeys;\n }\n const differentValues = checkDifferentValues(leftObject, rightObject);\n if (!_.isEmpty(differentValues)) {\n ret.differentValues = differentValues;\n }\n if (!_.isEmpty(ret)) {\n result.push(_.extend(ret, { left: leftObject, right: rightObject }));\n }\n });\n return result;\n}", "function reverser(arr){\n var x = 0;\n for(var e=0; e<arr.length/2; e++){\n x = arr[e];\n arr[e] = arr[arr.length-1-e];\n arr[arr.length-1-e] = x;\n }\n return arr;\n}", "function formal_dynamiclist_swap_entries(list_cssid, upper_node, lower_node) {\n if (upper_node == null && lower_node == null) {\n return;\n }\n \n var lst = document.getElementById(list_cssid);\n check_valid_ref(lst);\n\n // if indices same, nop\n if (upper_node == lower_node) {\n return;\n }\n\n var cont = __formal_dynamiclist_locate_list_contents(lst);\n var before = lower_node.nextSibling;\n\n // remove upper and lower nodes.\n cont.removeChild(upper_node);\n cont.removeChild(lower_node);\n\n // insert initial lower node first (-> becomes upper)\n if (before == null) { // IE workaround\n cont.appendChild(lower_node);\n } else {\n cont.insertBefore(lower_node, before);\n }\n\n // insert initial upper node.\n if (before == null) { // IE workaround\n cont.appendChild(upper_node);\n } else {\n cont.insertBefore(upper_node, before);\n }\n\n}", "function reverse(list) {\n var t=0;\n j=list.length-1;\n for (let i = 0; i < list.length-1; i++) {\n t = list[j];\n list[j]=list[i];\n list[i]=t;\n j=j-1;\n }\n return list;\n}", "function mirrorMe() {\n\tfor (i = 0; i < oldArray.length; i++) {\n\t\tnewArray.push(oldArray[(oldArray.length - 1) - i]);\n\t}\n}", "function patch(old, diff) {\n var out = [];\n var i = 0;\n while (i < diff.length) {\n if (diff[i]) {\n // matching\n Array.prototype.push.apply(\n out,\n old.slice(out.length, out.length + diff[i])\n );\n }\n i++;\n if (i < diff.length && diff[i]) {\n // mismatching\n Array.prototype.push.apply(out, diff.slice(i + 1, i + 1 + diff[i]));\n i += diff[i];\n }\n i++;\n }\n return out;\n}", "function qsortBy(cmp, l){\r\n return foldr(function(a, b){ return insertBy(cmp, a, b) }, emptyListOf(l), l);\r\n}", "function reorderList(head) {\n if (head == null) return;\n // find the middle of linked list [Problem 876]\n // in 1->2->3->4->5->6 find 4 \n let slow = head, fast = head;\n while (fast != null && fast.next != null) {\n slow = slow.next;\n fast = fast.next.next;\n }\n // reverse the second part of the list [Problem 206]\n // convert 1->2->3->4->5->6 into 1->2->3->4 and 6->5->4\n // reverse the second half in-place\n let prev = null, curr = slow, tmp;\n while (curr != null) {\n tmp = curr.next;\n curr.next = prev;\n prev = curr;\n curr = tmp;\n }\n // merge two sorted linked lists [Problem 21]\n // merge 1->2->3->4 and 6->5->4 into 1->6->2->5->3->4\n let first = head, second = prev;\n while (second.next != null) {\n tmp = first.next;\n first.next = second;\n first = tmp;\n\n tmp = second.next;\n second.next = first;\n second = tmp;\n }\n}", "function compareListItems(a,b) \r\n{\r\n if (a.count < b.count)\r\n return -1;\r\n if (a.count > b.count)\r\n return 1;\r\n return 0;\r\n}", "function difference(xs, ys){\r\n return foldl(flip(delete_), xs, ys)\r\n}", "function reorderResults(){\n ids=[];\n $('.resultholder .starblock').each(function(){\n ids.push($(this).prop('id'));\n });\n ids.sort();\n $rh = $('.resultholder');\n ids.forEach(function(id){\n $('#'+id).appendTo($rh);\n });\n }", "function mirror(ary) {\r\n \r\n var len = ary.length\r\n var revAry = [];\r\n var mirror = [];\r\n\r\n\r\n for (var i = len - 1; i >= 0; i--) {\r\n revAry.push(ary[i]);\r\n }\r\n \r\n console.log(ary.concat(revAry)); \r\n\r\n}", "function diff(A) {\n return A.slice(1).map(function(n, i) { return n - A[i]; });\n }", "function Diff() {}", "function Diff() {}", "function Diff() {}", "function Diff() {}", "function Diff() {}", "function Diff() {}", "function sort(list, compareFn){\n for(var i=0; i<list.length-1; i++)\n for(var j=i+1; j<list.length; j++){\n var left = list[i],\n right = list[j];\n if (compareFn(left, right) > 0){\n list[i] = list[j];\n list[j] = left;\n }\n }\n }", "function invertir(lista) {\n\tif (isEmpty(lista)) return lista\n\treturn appendMC(invertir(rest(lista)), first(lista))\n}", "function arrayPreviousLess(items) {\n const lessThanList = [];\n for (let i = items.length; i >= 0; i--) {\n for (let j = i; j >= 0; j--) {\n if (items[i] > items[j]) {\n lessThanList.unshift(items[j]);\n break;\n } else if (j === 0) {\n lessThanList.unshift(-1);\n }\n }\n }\n return lessThanList;\n}", "function lastModifiedComparer(a, b) {\n //a, the current item is more recent, dont swap\n if (a.attributes.LastModified < b.attributes.LastModified) {\n return 1;\n }\n //the item we are comparing with, b, is more recent, swap the order\n if (a.attributes.LastModified > b.attributes.LastModified) {\n return -1;\n }\n return 0;\n }", "function bubbleSort(items) {\n var length = items.length;\n for (var i = (length - 1); i >= 0; i--) {\n //Number of passes\n for (var j = (length - i); j > 0; j--) {\n //Compare the adjacent positions\n if (items[j] < items[j - 1]) {\n //Swap the numbers\n var tmp = items[j];\n items[j] = items[j - 1];\n items[j - 1] = tmp;\n }\n }\n }\n return items;\n }", "function diff(fromArr, to) {\n // take the lame way out and return a \"patch\" that literally just removes\n // everything and then adds the entire contents of the \"to\" array using a\n // single splice.\n //\n // TODO: rewrite this!\n\n var i;\n var patches = [];\n\n // remove everything in \"from\"\n for (i = fromArr.length - 1; i >= 0; --i) {\n patches.push(new ListPatches.Remove(i, fromArr[i]));\n }\n\n // add all of \"to\"\n for (i = 0; i < to.length; ++i) {\n patches.push(new ListPatches.Add(i, to[i]));\n }\n\n return new ListPatches.Sequence(patches);\n}", "function invert(list) {\r\n if(length(list)==0) {\r\n return [];\r\n } else {\r\n return cons(last(list),invert(pop(list)));\r\n }\r\n}", "function reverseDoubleLinkList(head) {\n\n}", "function diffArray(_a, _b) {\n const state = {\n distance: 0,\n adds: {},\n dels: {},\n const: {},\n linear: []\n };\n if (_a === _b) {\n return state;\n }\n const reverse = _a.length >= _b.length;\n const adds = state[reverse ? \"dels\" : \"adds\"];\n const dels = state[reverse ? \"adds\" : \"dels\"];\n const aID = reverse ? -1 : 1;\n const dID = reverse ? 1 : -1;\n let a, b, na, nb;\n if (reverse) {\n a = _b;\n b = _a;\n }\n else {\n a = _a;\n b = _b;\n }\n na = a.length;\n nb = b.length;\n const offset = na + 1;\n const delta = nb - na;\n const doff = delta + offset;\n const size = na + nb + 3;\n const path = new Array(size).fill(-1);\n const fp = new Array(size).fill(-1);\n const epc = [];\n const pathPos = [];\n function snake(k, p, pp) {\n const koff = k + offset;\n const r = path[koff + ((p > pp) ? -1 : 1)];\n let y = p > pp ? p : pp;\n let x = y - k;\n while (x < na && y < nb && equiv_1.equiv(a[x], b[y])) {\n x++;\n y++;\n }\n path[koff] = pathPos.length;\n pathPos.push([x, y, r]);\n return y;\n }\n let p = -1, pp;\n do {\n p++;\n for (let k = -p, ko = k + offset; k < delta; k++, ko++) {\n fp[ko] = snake(k, fp[ko - 1] + 1, fp[ko + 1]);\n }\n for (let k = delta + p, ko = k + offset; k > delta; k--, ko--) {\n fp[ko] = snake(k, fp[ko - 1] + 1, fp[ko + 1]);\n }\n fp[doff] = snake(delta, fp[doff - 1] + 1, fp[doff + 1]);\n } while (fp[doff] !== nb);\n state.distance = delta + 2 * p;\n let r = path[doff];\n while (r !== -1) {\n epc.push(pp = pathPos[r]);\n r = pp[2];\n }\n for (let i = epc.length - 1, px = 0, py = 0; i >= 0; i--) {\n const e = epc[i];\n let v;\n while (px < e[0] || py < e[1]) {\n const d = e[1] - e[0];\n if (d > py - px) {\n adds[py] = v = b[py];\n state.linear.push([aID, [py, v]]);\n py++;\n }\n else if (d < py - px) {\n dels[px] = v = a[px];\n state.linear.push([dID, [px, v]]);\n px++;\n }\n else {\n state.const[px] = v = a[px];\n state.linear.push([0, [px, v]]);\n px++;\n py++;\n }\n }\n }\n return state;\n}", "function invert(list) {\n if(length(list)==0) {\n return [];\n } else {\n return cons(last(list),invert(pop(list)));\n }\n}", "function diffArray(arr2, arr1, diff, diffFn) {\n\t if(!diff) return simpleDiff(arr2, arr1);\n\t var matrix = ld(arr1, arr2, diffFn)\n\t var n = arr1.length;\n\t var i = n;\n\t var m = arr2.length;\n\t var j = m;\n\t var edits = [];\n\t var current = matrix[i][j];\n\t while(i>0 || j>0){\n\t // the last line\n\t if (i === 0) {\n\t edits.unshift(3);\n\t j--;\n\t continue;\n\t }\n\t // the last col\n\t if (j === 0) {\n\t edits.unshift(2);\n\t i--;\n\t continue;\n\t }\n\t var northWest = matrix[i - 1][j - 1];\n\t var west = matrix[i - 1][j];\n\t var north = matrix[i][j - 1];\n\n\t var min = Math.min(north, west, northWest);\n\n\t if (min === west) {\n\t edits.unshift(2); //delete\n\t i--;\n\t current = west;\n\t } else if (min === northWest ) {\n\t if (northWest === current) {\n\t edits.unshift(0); //no change\n\t } else {\n\t edits.unshift(1); //update\n\t current = northWest;\n\t }\n\t i--;\n\t j--;\n\t } else {\n\t edits.unshift(3); //add\n\t j--;\n\t current = north;\n\t }\n\t }\n\t var LEAVE = 0;\n\t var ADD = 3;\n\t var DELELE = 2;\n\t var UPDATE = 1;\n\t var n = 0;m=0;\n\t var steps = [];\n\t var step = {index: null, add:0, removed:[]};\n\n\t for(var i=0;i<edits.length;i++){\n\t if(edits[i] > 0 ){ // NOT LEAVE\n\t if(step.index === null){\n\t step.index = m;\n\t }\n\t } else { //LEAVE\n\t if(step.index != null){\n\t steps.push(step)\n\t step = {index: null, add:0, removed:[]};\n\t }\n\t }\n\t switch(edits[i]){\n\t case LEAVE:\n\t n++;\n\t m++;\n\t break;\n\t case ADD:\n\t step.add++;\n\t m++;\n\t break;\n\t case DELELE:\n\t step.removed.push(arr1[n])\n\t n++;\n\t break;\n\t case UPDATE:\n\t step.add++;\n\t step.removed.push(arr1[n])\n\t n++;\n\t m++;\n\t break;\n\t }\n\t }\n\t if(step.index != null){\n\t steps.push(step)\n\t }\n\t return steps\n\t}", "function reorderList()\n{\n var rxWTB = /wtb/i;\n var rxFSOT = /fsot|wtt|to trade/i;\n var aFS = document.createElement(\"a\");\n aFS.setAttribute(\"name\", \"fs\");\n aFS.setAttribute(\"id\", \"fs\");\n var aFSOT = document.createElement(\"a\");\n aFSOT.setAttribute(\"name\", \"fsot\");\n aFSOT.setAttribute(\"id\", \"fsot\");\n var aWTB = document.createElement(\"a\");\n aWTB.setAttribute(\"name\", \"wtb\");\n aWTB.setAttribute(\"id\", \"wtb\");\n var hr = document.createElement(\"hr\");\n var arrFS = [hr, document.createTextNode(\"FOR SALE!\"), aFS, hr];\n var arrFSOT = [hr, document.createTextNode(\"TRADES!\"), aFSOT, hr];\n var arrWTB = [hr, document.createTextNode(\"WANTED TO BUY!\"), aWTB, hr];\n var aSubj = getElementsByClass(\"mA\", null, \"a\");\n var ulNode = null;\n for (var i = 0; i < aSubj.length; i++) \n {\n var liNode = aSubj[i].parentNode;\n if (null == ulNode)\n ulNode = liNode.parentNode;\n\n// BUG - Note this does not handle threaded conversations properly- replies are\n// not child nodes, so they do not get removed and replaced when the original\n// <li> node is moved. Replies are <ul>s that are sibling to the higher-level\n// <li>s.\n if (ulNode != liNode.parentNode)\n {\n GM_log(aSubj[i] + \" appears to be more deeply buried, skipping\");\n continue;\n }\n\n var fc = aSubj[i].firstChild.wrappedJSObject || aSubj[i].firstChild;\n if (fc)\n {\n if (rxWTB.test(fc.textContent))\n arrWTB[arrWTB.length] = liNode;\n else if (rxFSOT.test(fc.textContent))\n arrFSOT[arrFSOT.length] = liNode;\n else\n arrFS[arrFS.length] = liNode;\n\n unhookMe(liNode);\n }\n else\n GM_log(\" no first child or value aSubj[i]=\" + aSubj[i] + \" fc=\" + fc);\n }\n\n // reorder, FS first, FSOT next, WTB last\n if (ulNode)\n {\n for (var i = 0; i < arrFS.length; i++)\n ulNode.appendChild(arrFS[i]);\n\n for (var i = 0; i < arrFSOT.length; i++)\n ulNode.appendChild(arrFSOT[i]);\n\n for (var i = 0; i < arrWTB.length; i++)\n ulNode.appendChild(arrWTB[i]);\n }\n else\n GM_log(\" no ulNode!\");\n}", "function reArrange2(arr) {\n let leftMostPosEl = 0,\n temp;\n for ( var i = 0; i < arr.length; i++ ) {\n if (arr[i] < 0 ) {\n if (i != leftMostPosEl) {\n temp = arr[i];\n arr[i] = arr[leftMostPosEl];\n arr[leftMostPosEl] = temp;\n }\n leftMostPosEl += 1\n }\n }\n return arr; \n}", "function initDiff() {\n let zigzag = [];\n let ops = [];\n return function diff(remotes, locals) {\n let rtype = getType(remotes);\n let ltype = getType(locals);\n let keys = null;\n if (rtype === ltype) {\n switch (rtype) {\n case 'Object':\n if (remotes.id === locals.id) {\n keys = Object.keys(remotes);\n keys.splice(keys.indexOf('id'), 1);\n keys.forEach(k => {\n zigzag.push(k);\n diff(remotes[k], locals[k]);\n zigzag.pop();\n });\n } else {\n ops.push({\n path: Object.assign([], zigzag).join('.'),\n action: '$push',\n value: remotes\n });\n }\n\n break;\n case 'Array':\n remotes.forEach(ritem => {\n let litem =\n locals.find(ll => ll.id === ritem.id) || null;\n if (null === litem) {\n ops.push({\n path: Object.assign([], zigzag).join('.'),\n action: '$push',\n value: ritem\n });\n } else {\n diff(ritem, litem);\n }\n });\n break;\n default:\n if (remotes !== locals) {\n ops.push({\n path: Object.assign([], zigzag).join('.'),\n action: '$set',\n value: remotes\n });\n }\n }\n } else {\n ops.push({\n path: Object.assign([], zigzag).join('.'),\n action: '$set',\n value: remotes\n });\n }\n return ops;\n };\n}", "function remberStar(a, list) {\n\tif (isEmpty(list)) return EMPTY;\n\telse if (isAtom(car(list))) {\n\t\tif (equal(a, car(list))) return remberStar(a, cdr(list))\n\t\telse return cons(car(list), remberStar(a, cdr(list)))\n\t}\n\telse return cons(remberStar(a, car(list)), remberStar(a, cdr(list)))\n}", "function diffArray(arr2, arr1, diff, diffFn) {\n if(!diff) return _.simpleDiff(arr2, arr1);\n var matrix = ld(arr1, arr2, diffFn)\n var n = arr1.length;\n var i = n;\n var m = arr2.length;\n var j = m;\n var edits = [];\n var current = matrix[i][j];\n while(i>0 || j>0){\n // the last line\n if (i === 0) {\n edits.unshift(3);\n j--;\n continue;\n }\n // the last col\n if (j === 0) {\n edits.unshift(2);\n i--;\n continue;\n }\n var northWest = matrix[i - 1][j - 1];\n var west = matrix[i - 1][j];\n var north = matrix[i][j - 1];\n\n var min = Math.min(north, west, northWest);\n\n if (min === west) {\n edits.unshift(2); //delete\n i--;\n current = west;\n } else if (min === northWest ) {\n if (northWest === current) {\n edits.unshift(0); //no change\n } else {\n edits.unshift(1); //update\n current = northWest;\n }\n i--;\n j--;\n } else {\n edits.unshift(3); //add\n j--;\n current = north;\n }\n }\n var LEAVE = 0;\n var ADD = 3;\n var DELELE = 2;\n var UPDATE = 1;\n var n = 0;m=0;\n var steps = [];\n var step = { index: null, add:0, removed:[] };\n\n for(var i=0;i<edits.length;i++){\n if(edits[i] > 0 ){ // NOT LEAVE\n if(step.index === null){\n step.index = m;\n }\n } else { //LEAVE\n if(step.index != null){\n steps.push(step)\n step = {index: null, add:0, removed:[]};\n }\n }\n switch(edits[i]){\n case LEAVE:\n n++;\n m++;\n break;\n case ADD:\n step.add++;\n m++;\n break;\n case DELELE:\n step.removed.push(arr1[n])\n n++;\n break;\n case UPDATE:\n step.add++;\n step.removed.push(arr1[n])\n n++;\n m++;\n break;\n }\n }\n if(step.index != null){\n steps.push(step)\n }\n return steps\n}", "function rendez(array) {\n for (var j = array.length - 1; j > 0; j--) {\n for (var i = array.length - 1 - j; i >= 0; i--) {\n if (array[i] > array[i + 1]) {\n var newelement = array[i];\n array[i] = array[i + 1];\n array[i + 1] = newelement;\n }\n }\n }\n}", "reverse(length) {\n for (let i = 0; i < length / 2; i += 1) {\n const p1 = (this.position + i) % this.list.length;\n const p2 = (this.position - i + length - 1) % this.list.length;\n [this.list[p1], this.list[p2]] = [this.list[p2], this.list[p1]];\n }\n }", "function restoreDiff(arr) {\n for (let i = 1; i < arr.length; i++) {\n arr[i][0] += arr[i - 1][0] + 1;\n }\n return arr;\n}", "__reorderChips() {\n const { selectedElements } = this;\n if (this.__prevSelectedEls) {\n const addedEls = selectedElements.filter(e => !this.__prevSelectedEls.includes(e));\n const deletedEls = this.__prevSelectedEls.filter(e => !selectedElements.includes(e));\n if (addedEls.length) {\n this.selectedElements = [...this.__prevSelectedEls, ...addedEls];\n } else if (deletedEls.length) {\n deletedEls.forEach(delEl => {\n this.__prevSelectedEls.splice(this.__prevSelectedEls.indexOf(delEl), 1);\n });\n this.selectedElements = this.__prevSelectedEls;\n }\n }\n this.__prevSelectedEls = this.selectedElements;\n }", "function sortLeaders(a, b) {\n return a.data[0][0] - b.data[0][0];\n }", "sortedItems(){\n return this.myList.slice(0).reverse();\n }", "function swap (arr){\n //for (var i=0;i<arr.length;i++){\n [arr[0], arr[arr.length-1]] = [arr[arr.length-1], arr[0]];\n \n \n\n //}\n\n return arr;\n}", "function mySort(list) {\n var listLength = list.length, currentlyCompared, indUnsort, indSort;\n\tfor(indUnsort = 1; indUnsort < listLength; indUnsort++) { // O(n)\n\t\tcurrentlyCompared = list[indUnsort]; // save current value as it can be shift later\n\t\tindSort = indUnsort - 1;\n\t // Whenever the value in the sorted section is greater than the value\n\t // in the unsorted section, shift all items in the sorted section over\n\t // by one. This creates space in which to insert the value.\n\t\twhile (indSort >= 0 && list[indSort] > currentlyCompared) { // O(n)\n\t\t\tlist[indSort + 1] = list[indSort];\n\t\t\tindSort--;\n\t\t}\n\t\tlist[indSort + 1] = currentlyCompared;\n\t}\n\treturn list;\n}", "function diff( a, b ) {\n var result = a.slice();\n\tfor ( var i = 0; i < result.length; i++ ) {\n\t\tfor ( var j = 0; j < b.length; j++ ) {\n\t\t\tif ( result[i] === b[j] ) {\n\t\t\t\tresult.splice(i, 1);\n\t\t\t\ti--;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\treturn result;\n}", "compareArrays (previous, current, options) {\n if (!Array.isArray(previous) || !Array.isArray(current)) {\n return [];\n }\n const ret = [];\n const prev = angular.copy(previous).sort(options.sort);\n const curr = angular.copy(current).sort(options.sort);\n let p = 0;\n let c = 0;\n\n while (p < prev.length && c < curr.length) {\n const sort = options.sort(prev[p], curr[c]);\n if (sort < 0) {\n ret.push('<li>Removed ' + options.write(prev[p]) + '</li>');\n p++;\n } else if (sort > 0) {\n ret.push('<li>Added ' + options.write(curr[c]) + '</li>');\n c++;\n } else if (sort === 0) {\n if (typeof options.compare === 'function' && options.compare(prev[p], curr[c])) {\n ret.push('<li>' + options.change(prev[p], curr[c]) + '</li>');\n }\n p++;\n c++;\n } else {\n this.$log.debug('Invalid sort', prev[p], curr[c], sort);\n p++;\n c++;\n }\n }\n while (c < curr.length) {\n ret.push('<li>Added ' + options.write(curr[c]) + '</li>');\n c++;\n }\n while (p < prev.length) {\n ret.push('<li>Removed ' + options.write(prev[p]) + '</li>');\n p++;\n }\n\n return ret;\n }", "reverseList() {\n if (this.head === null) {\n console.log('Empty list');\n return;\n }\n let previous = null;\n let current = this.head;\n while (current !== null) {\n const changer = current.next;\n current.next = previous;\n previous = current;\n current = changer;\n }\n this.head = previous;\n }", "function e(t,i){for(;i+1<t.length;i++)t[i]=t[i+1];t.pop()}", "function mergeTwoCorrect(list1, list2) {\n const result = [];\n for (let i = 0, j = 0, k = 0; k < (list1.length + list2.length); k++) {\n\n let isArr1Depleted = i >= list1.length;\n let isArr2Depleted = j >= list2.length;\n\n if (!isArr1Depleted && (isArr2Depleted || list1[i] < list2[j])) {\n result[k] = list1[i];\n i++;\n } else {\n result[k] = list2[j];\n j++\n }\n }\n return result;\n}", "function r(t,e){for(;e+1<t.length;e++)t[e]=t[e+1];t.pop()}", "function r(t,e){for(;e+1<t.length;e++)t[e]=t[e+1];t.pop()}", "function r(t,e){for(;e+1<t.length;e++)t[e]=t[e+1];t.pop()}", "function r(t,e){for(;e+1<t.length;e++)t[e]=t[e+1];t.pop()}", "function r(t,e){for(;e+1<t.length;e++)t[e]=t[e+1];t.pop()}", "function reverseList(ll) {\n //need to create a variable to hold the previous\n let currNode = ll.head;\n let previous = null;\n //loop throuhg the arr\n while (currNode) {\n //create a variable to hold the next node \n let saveNode = currNode.next;\n //set node.next to previous\n currNode.next = previous;\n //set previous to node\n previous = currNode;\n //set node to save\n currNode = saveNode;\n }\n ll.head = previous;\n return ll;\n}", "function r(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}", "function r(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}", "function r(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}", "function r(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}", "function sortListDomOrder(toBeProcessed) {\n toBeProcessed.sort((a, b) => (a.compareDocumentPosition(b) & 2));\n}", "reverse() {\n var originalCompareFn = this.compare;\n this.compare = function(a, b) {\n return originalCompareFn(b, a);\n };\n }", "swapListElementKeys(listPath, index1, index2) {\n const listSchema = this.jsonSchemaService.forPathArray(listPath);\n if (listSchema.componentType !== 'complex-list') {\n return;\n }\n const listPathString = this.pathUtilService.toPathString(listPath);\n const ps1 = `${listPathString}${this.pathUtilService.separator}${index1}`;\n const ps2 = `${listPathString}${this.pathUtilService.separator}${index2}`;\n const keys1 = this.keysMap[ps1];\n this.setKeys(ps1, this.keysMap[ps2]);\n this.setKeys(ps2, keys1);\n // swap children as well\n const ps1ChildPrefix = ps1 + this.pathUtilService.separator;\n const ps2ChildPrefix = ps2 + this.pathUtilService.separator;\n const childrenSwaps = [];\n Object.keys(this.keysMap)\n .forEach(path => {\n if (path.startsWith(ps1ChildPrefix)) {\n const toPath = path.replace(ps1ChildPrefix, ps2ChildPrefix);\n childrenSwaps.push({ from: path, to: toPath, keys: this.keysMap[path] });\n }\n else if (path.startsWith(ps2ChildPrefix)) {\n const toPath = path.replace(ps2ChildPrefix, ps1ChildPrefix);\n childrenSwaps.push({ from: path, to: toPath, keys: this.keysMap[path] });\n }\n });\n childrenSwaps\n .forEach(swap => {\n this.setKeys(swap.to, swap.keys);\n this.onKeysChange.next({ path: swap.to, keys: this.keysMap[swap.to] });\n });\n childrenSwaps\n .filter(swap => !childrenSwaps.some(otherSwap => swap.from === otherSwap.to))\n .forEach(swap => {\n delete this.keysMap[swap.from];\n delete this.keys$Map[swap.from];\n });\n }", "getUpdatedList(item, add = true) {\n\t\tconst list = this.state.list.filter(u => u.id !== item.id)\n\t\tif (add) list.unshift(item)\n\t\treturn list\n\t}", "reverse(){\n let original = this.iterator();\n let curr = this.head;\n let out = new LinkedList(); //empty\n\n while(curr != null){ //non empty\n out.addFront(new ListItem(curr.getData()));\n curr = curr.getNext();\n }\n\n return out;\n }", "function getDifferenceListTest() {\n return this.getDifferenceList(20, 5);\n}", "function sortList(startNode, endNode) {\n if(startNode === null) return;\n if(startNode === endNode) return;\n \n\tlet dummyNode = new Node(null); \n dummyNode.next = startNode;\n let holdsDummy = null;\n let currNode = startNode.next;\n let head = dummyNode;\n let lastCorrectPlace = null; \n \n while(currNode && currNode !== endNode) {\n let next = currNode.next;\n if(starNode.val > currNode.val) {\n if(!holdsDummy) holdsDummy = currNode;\n if(lastCorrectPlace) {\n lastCorrectPlace.next = next;\n } else {\n startNode.next = next;\n }\n \n \tcurrNode.next = head; \n head = currNode;\n } else {\n lastCorrectPlace = currNode;\n }\n currNode = next;\n }\n \n let a = sortList(head, dummyNode);\n let b = sortList(dummyNode.next, endNode);\n if(holdsDummy) holdsDummy.next = dummyNode.next;\n a.next = b;\n return a;\n}", "function reverseList(arr) {\n var length = Math.ceil(arr.length / 2);\n var temp;\n for (var i = 0; i < length; i++) {\n temp = arr[i];\n arr[i] = arr[arr.length - 1 - i];\n arr[arr.length - 1 - i] = temp;\n }\n return arr;\n}", "function reverserArr(arr){\n var newArr = []\n for(var i = arr.length-1; i >=0 ;i--){\n newArr.push(arr[i])\n }\n return newArr\n}", "static compare(left, right) {\n if (left instanceof Position) {\n left = left.pos\n }\n if (right instanceof Position) {\n right = right.pos\n }\n return left - right\n for (let i = 0; i < Math.min(left.atoms.length, right.atoms.length); i++) {\n const diff = compareAtoms(left.atoms[i], right.atoms[i]);\n if (diff !== 0) {\n return diff;\n }\n }\n return left.atoms.length - right.atoms.length;\n }", "undoTransaction() {\n // this.list.items = this.oldList.items;\n let i = 0;\n for (i = 0; i < this.list.items.length; i++) {\n this.list.items[i] = this.oldList[i];\n }\n // load the old list\n // console.log(this.list.items);\n }", "function sortdisheshightolow(o) {\r\n\tvar swapped=true;\r\n\twhile (swapped==true){\r\n\t\tswapped=false;\r\n\t\tfor (var i= 0; i<o.length-1; i++){\r\n\t\t\tif (o[i].price<o[i+1].price){\r\n\t\t\t\tvar temp = o[i];\r\n\t\t\t\to[i]=o[i+1];\r\n\t\t\t\to[i+1]=temp;\r\n\t\t\t\tswapped=true;\r\n\t\t\t}\r\n\t\t\r\n\t\t}\r\n\t}\r\n\r\n return o;\r\n}", "findDeltaReverse(e) {\n let tList = this.props.tabElementList;\n let revList = [].concat(tList).reverse();\n const selectionStart = e.target.selectionStart;\n let diff = 0;\n for (let i = 0; i < revList.length; i++) {\n if (selectionStart > revList[i]) {\n diff = selectionStart - revList[i];\n break;\n }\n }\n return diff;\n }", "function compareByIdThenRev(a, b) {\n\t var idCompare = compare(a._id, b._id);\n\t if (idCompare !== 0) {\n\t return idCompare;\n\t }\n\t var aStart = a._revisions ? a._revisions.start : 0;\n\t var bStart = b._revisions ? b._revisions.start : 0;\n\t return compare(aStart, bStart);\n\t}", "function compareByIdThenRev(a, b) {\n\t var idCompare = compare(a._id, b._id);\n\t if (idCompare !== 0) {\n\t return idCompare;\n\t }\n\t var aStart = a._revisions ? a._revisions.start : 0;\n\t var bStart = b._revisions ? b._revisions.start : 0;\n\t return compare(aStart, bStart);\n\t}", "function compare(list_id1, list_id2, isSame)\r\n{\r\n\tvar tmp_id = null;\r\n\tvar isnotexist;\r\n\tif(isSame==true) // si on doit retourner les caracteres en commun Sinon on met les caractere différents\r\n\t{\r\n\t\tfor(var i = 1; i<list_id1.length;i++) // parcours de la premiere liste \r\n\t\t{\r\n\t\t\tfor(var j = 1; j<list_id2.length;j++) // parcours de la seconde liste en comparant un élèment de l'autre liste\r\n\t\t\t{\r\n\t\t\t\tif (list_id1[i] == \tlist_id2[j]) \r\n\t\t\t\t{\r\n\t\t\t\t\tif (tmp_id == null) {tmp_id = \",\"+list_id1[i]}\r\n\t\t\t\t\telse \r\n\t\t\t\t\t{\r\n\t\t\t\t\t\ttmp_id = tmp_id + \",\"+ list_id1[i];\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\telse // si on doit retourner les caracteres en commun Sinon on met les caractere différents\r\n\t{\r\n\t\tfor(var i = 1; i<list_id1.length;i++)\r\n\t\t{\r\n\t\t\tisnotexist = false;\r\n\t\t\tfor(var j = 1; j<list_id2.length;j++)\r\n\t\t\t{\r\n\t\t\t\tif (list_id1[i] == \tlist_id2[j])\r\n\t\t\t\t{\r\n\t\t\t\t\tisnotexist = true;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif(isnotexist == false)\r\n\t\t\t{\r\n\t\t\t\tif (tmp_id == null) {tmp_id = \",\"+list_id1[i]}\r\n\t\t\t\telse \r\n\t\t\t\t{\r\n\t\t\t\t\ttmp_id = tmp_id+\",\"+ list_id1[i];\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\t\r\n\treturn tmp_id;\r\n}", "function reposition() {\n\tfor (let i = 0; i < tempArr.length; i++) {\n\t\tidList[left + i] = tempArr[i];\n\t}\n\tposition++;\n\tif (!finishedSorting()) {\n\t\tinitializeValues();\n\t}\n}", "function mov(ori, des) { \n des.push(ori.pop()); \n}", "function dif(ar) {\n var dar = []\n for(var i=0;i<ar.length-1;i++){\n dar.push(ar[i+1]-ar[i])\n }\n return dar\n}", "reverseList() {\n let index = this.head;\n prevHolder = null;\n while (index != null) {\n prevHolder = index.prev;\n index.prev = index.next;\n index.next = prevHolder;\n index = index.prev;\n }\n\n return this;\n }", "function moveLAndTRight(array) {\n removeLead(array[1])\n removeTail(array[0])\n for (let i = 0; i < array.length; i++) {\n array[i] += 1\n }\n addLead(array[1])\n addTail(array[0])\n}", "function mirroredArray(arr) {\n return arr.concat([].concat(arr).reverse());\n}", "function compareElements(item0, item1) {\n\t return ordering[item0.type] - ordering[item1.type];\n\t}" ]
[ "0.6203785", "0.6110284", "0.6065372", "0.594887", "0.587665", "0.5820915", "0.58104193", "0.5788856", "0.5758827", "0.57091606", "0.5691924", "0.5647623", "0.56313956", "0.56079423", "0.5594357", "0.5594357", "0.5582751", "0.5579342", "0.5556359", "0.5541042", "0.5534815", "0.5521724", "0.5502207", "0.550075", "0.5492255", "0.54866874", "0.5478906", "0.54664415", "0.54645514", "0.54453665", "0.5442531", "0.54236746", "0.54224855", "0.54060733", "0.54060733", "0.54060733", "0.54060733", "0.54060733", "0.54060733", "0.5399887", "0.5396934", "0.5378594", "0.5377257", "0.5365438", "0.53611326", "0.53536314", "0.53309005", "0.5329166", "0.5315132", "0.53106725", "0.5303455", "0.52967197", "0.5294816", "0.52863604", "0.52608293", "0.5253377", "0.52521884", "0.52477837", "0.5243654", "0.5242653", "0.5226227", "0.52232546", "0.5221728", "0.5211592", "0.52110994", "0.5209928", "0.52089113", "0.5206107", "0.52020913", "0.52020913", "0.52020913", "0.52020913", "0.52020913", "0.5199731", "0.5197974", "0.5197974", "0.5197974", "0.5197974", "0.519581", "0.5195542", "0.51940805", "0.5180298", "0.51741874", "0.5172999", "0.51718014", "0.5170792", "0.5170717", "0.5168487", "0.5168161", "0.5163256", "0.5161324", "0.51613104", "0.51613104", "0.51572585", "0.5155297", "0.5152567", "0.5145742", "0.514205", "0.51390886", "0.5138708", "0.5137758" ]
0.0
-1
NOTE: These type checking functions intentionally don't use `instanceof` because it is fragile and can be easily faked with `Object.create()`.
function isArray(ar) { return Array.isArray(ar); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function isOfType(obj, type) {\n obj = Object(obj)\n return typeof type === \"string\"\n ? obj.constructor.name === type\n : obj instanceof type\n}", "function isType(obj, type) {\n return obj instanceof type\n}", "function isObj$1(something) {\n return typeDetect(something) === 'Object';\n}", "function assert_event_type (obj, type, inheritsp) {\n if (typeof obj === 'object') {\n var type_str = \"[object \" + type + \"]\";\n inheritsp = (typeof inheritsp === 'boolean') ? inheritsp : false;\n while (obj) {\n if (obj.toString() === type_str || (obj.constructor && obj.constructor.name === type)) {\n return true;\n } else {\n obj = inheritsp ? Object.getPrototypeOf(obj) : null;\n }\n }\n }\n throw new TypeError();\n }", "function detecteInstanceOf (obj, origin) {\n return obj instanceof origin\n // return Object.getPrototypeOf(obj) === origin.prototype\n // return obj.__proto__ === origin.prototype\n}", "function assertType(value, type) {\n var valid = void 0;\n var expectedType = void 0;\n if (type === String) {\n expectedType = 'string';\n valid = typeof value === expectedType;\n } else if (type === Number) {\n expectedType = 'number';\n valid = typeof value === expectedType;\n } else if (type === Boolean) {\n expectedType = 'boolean';\n valid = typeof value === expectedType;\n } else if (type === Function) {\n expectedType = 'function';\n valid = typeof value === expectedType;\n } else if (type === Object) {\n expectedType = 'Object';\n valid = isPlainObject(value);\n } else if (type === Array) {\n expectedType = 'Array';\n valid = Array.isArray(value);\n } else {\n expectedType = type.name || type.toString();\n valid = value instanceof type;\n }\n return {\n valid: valid,\n expectedType: expectedType\n };\n}", "function checkObjType(objInput, objInputConstructor, blnAllowSubclasses) {\n\ttry {\n\t\t//call confirmObjType\n\t\tconfirmObjType(objInput, objInputConstructor, blnAllowSubclasses);\n\n\t\t//if we didn't get an error in that last call, return true\n\t\treturn true;\n\t} //end try\n\tcatch(e) {\n\t\t//if we got an error, it means confirmObjType failed (wasn't really an obj of that type), so\n\t\treturn false;\n\t} //end catch\n} //end function checkObjType", "function assertType(value, type) {\n\t\t var valid = void 0;\n\t\t var expectedType = void 0;\n\t\t if (type === String) {\n\t\t expectedType = 'string';\n\t\t valid = typeof value === expectedType;\n\t\t } else if (type === Number) {\n\t\t expectedType = 'number';\n\t\t valid = typeof value === expectedType;\n\t\t } else if (type === Boolean) {\n\t\t expectedType = 'boolean';\n\t\t valid = typeof value === expectedType;\n\t\t } else if (type === Function) {\n\t\t expectedType = 'function';\n\t\t valid = typeof value === expectedType;\n\t\t } else if (type === Object) {\n\t\t expectedType = 'Object';\n\t\t valid = isPlainObject(value);\n\t\t } else if (type === Array) {\n\t\t expectedType = 'Array';\n\t\t valid = Array.isArray(value);\n\t\t } else {\n\t\t expectedType = type.name || type.toString();\n\t\t valid = value instanceof type;\n\t\t }\n\t\t return {\n\t\t valid: valid,\n\t\t expectedType: expectedType\n\t\t };\n\t\t}", "function is(v, t) { return typeof v === t; }", "function assertType(value,type){var valid;var expectedType=getType(type);if(expectedType==='String'){valid=(typeof value==='undefined'?'undefined':_typeof(value))===(expectedType='string');}else if(expectedType==='Number'){valid=(typeof value==='undefined'?'undefined':_typeof(value))===(expectedType='number');}else if(expectedType==='Boolean'){valid=(typeof value==='undefined'?'undefined':_typeof(value))===(expectedType='boolean');}else if(expectedType==='Function'){valid=(typeof value==='undefined'?'undefined':_typeof(value))===(expectedType='function');}else if(expectedType==='Object'){valid=isPlainObject(value);}else if(expectedType==='Array'){valid=Array.isArray(value);}else{valid=value instanceof type;}return{valid:valid,expectedType:expectedType};}", "function is( obj, type ) {\n return typeof obj === type;\n }", "function isPlainObject(input){return typeof input==='object'&&input!==null&&(Object.getPrototypeOf(input)===Object.prototype||Object.getPrototypeOf(input)===null);}", "function typeChecker(type) {\n var typeString = \"[object \" + type + \"]\";\n return function(value) {\n return Object.prototype.toString.call(value) === typeString;\n };\n}", "function isOfType(obj, type) {\n obj = Object(obj)\n return typeof type === \"string\"\n ? obj.constructor.name === type\n : obj.constructor.name === type.name\n}", "function is_a(thing, obj) {\n if (('string' === typeof (obj)) && obj.toLowerCase() !== 'string') {\n return (thing instanceof eval(obj));\n } else {\n return (thing instanceof obj);\n }\n}", "function ofTypeOrThrow(obj, type, error) {\n if (typeof obj == type || false) {\n return obj;\n } else {\n throw error || 'Invalid type: must be a ' + type;\n }\n }", "function isInstanceOf(victim, constructor) {\n return victim instanceof constructor;\n}", "function isObject(input) {\n return typeof input === 'object';\n}", "function proxyInstanceof(args) {\n var obj = deserialize(args[0]);\n var type = deserialize(args[1]);\n return obj instanceof type;\n }", "isPlainObject(obj) {\n return _toString.call(obj) === '[object Object]'\n }", "function isOfType(T, maybeSomething){\n return maybeSomething && maybeSomething.constructor === T;\n}", "function isOfType(T, maybeSomething){\n return maybeSomething && maybeSomething.constructor === T;\n}", "function isOfType(T, maybeSomething){\n return maybeSomething && maybeSomething.constructor === T;\n}", "function isOfType(T, maybeSomething){\n return maybeSomething && maybeSomething.constructor === T;\n}", "function isOfType(T, maybeSomething){\n return maybeSomething && maybeSomething.constructor === T;\n}", "function isOfType(T, maybeSomething){\n return maybeSomething && maybeSomething.constructor === T;\n}", "function isOfType(T, maybeSomething){\n return maybeSomething && maybeSomething.constructor === T;\n}", "function isOfType(T, maybeSomething){\n return maybeSomething && maybeSomething.constructor === T;\n}", "function isOfType(T, maybeSomething){\n return maybeSomething && maybeSomething.constructor === T;\n}", "function isOfType(T, maybeSomething){\n return maybeSomething && maybeSomething.constructor === T;\n}", "function isOfType(T, maybeSomething){\n return maybeSomething && maybeSomething.constructor === T;\n}", "function isOfType(T, maybeSomething){\n return maybeSomething && maybeSomething.constructor === T;\n}", "function isOfType(T, maybeSomething){\n return maybeSomething && maybeSomething.constructor === T;\n}", "function isType(type) {\n return function(obj) {\n return {}.toString.call(obj) == \"[object \" + type + \"]\"\n }\n}", "function is(obj, type) {\n return typeof obj === type;\n }", "function is(obj, type) {\n return typeof obj === type;\n }", "function assertType (value, type) {\n\t var valid\n\t var expectedType = getType(type)\n\t if (expectedType === 'String') {\n\t valid = typeof value === (expectedType = 'string')\n\t } else if (expectedType === 'Number') {\n\t valid = typeof value === (expectedType = 'number')\n\t } else if (expectedType === 'Boolean') {\n\t valid = typeof value === (expectedType = 'boolean')\n\t } else if (expectedType === 'Function') {\n\t valid = typeof value === (expectedType = 'function')\n\t } else if (expectedType === 'Object') {\n\t valid = isPlainObject(value)\n\t } else if (expectedType === 'Array') {\n\t valid = Array.isArray(value)\n\t } else {\n\t valid = value instanceof type\n\t }\n\t return {\n\t valid: valid,\n\t expectedType: expectedType\n\t }\n\t}", "function isOfType(obj, type) {\n obj = Object(obj)\n return typeof type === \"string\"\n ? obj.constructor.name === type\n : obj.constructor.name === type.name\n}", "function is( obj, type ) {\n return typeof obj === type;\n }", "function is( obj, type ) {\n return typeof obj === type;\n }", "function is( obj, type ) {\n return typeof obj === type;\n }", "function is( obj, type ) {\n return typeof obj === type;\n }", "function is( obj, type ) {\n return typeof obj === type;\n }", "function is( obj, type ) {\n return typeof obj === type;\n }", "function is( obj, type ) {\n return typeof obj === type;\n }", "function is( obj, type ) {\n return typeof obj === type;\n }", "function is( obj, type ) {\n return typeof obj === type;\n }", "function is( obj, type ) {\n return typeof obj === type;\n }", "function is( obj, type ) {\n return typeof obj === type;\n }", "function is( obj, type ) {\n return typeof obj === type;\n }", "function is( obj, type ) {\n return typeof obj === type;\n }", "function is( obj, type ) {\n return typeof obj === type;\n }", "function is( obj, type ) {\n return typeof obj === type;\n }", "function is( obj, type ) {\n return typeof obj === type;\n }", "function is( obj, type ) {\n return typeof obj === type;\n }", "function is( obj, type ) {\n return typeof obj === type;\n }", "function is( obj, type ) {\n return typeof obj === type;\n }", "function isInstance(obj,type){return obj instanceof type||obj!=null&&obj.constructor!=null&&obj.constructor.name!=null&&obj.constructor.name===type.name;}", "function isInstance(obj,type){return obj instanceof type||obj!=null&&obj.constructor!=null&&obj.constructor.name!=null&&obj.constructor.name===type.name;}", "function isInstance(obj,type){return obj instanceof type||obj!=null&&obj.constructor!=null&&obj.constructor.name!=null&&obj.constructor.name===type.name;}", "function isInstanceOf(mixed, ctor) {\n return ((mixed instanceof ctor) &&\n (try_get_bigint_factory_function_1.isBigIntNativelySupported() ||\n !is_bigint_1.isBigInt(mixed)));\n}", "function isTypeInstanceOf(source, target) {\n return source === target || isTypeSubtypeOf(source, target) && !isTypeIdenticalTo(source, target);\n }", "function builtinprototypesarenotinstances() {\n try {\n Boolean.prototype.valueOf(); return false;\n } catch(e) {}\n try {\n Number.prototype.valueOf(); return false;\n } catch(e) {}\n try {\n String.prototype.toString(); return false;\n } catch(e) {}\n try {\n RegExp.prototype.source; return false;\n } catch(e) {}\n try {\n Date.prototype.valueOf(); return false;\n } catch(e) {}\n return true;\n}", "function isType(type) {\n\treturn function(obj) {\n\t\treturn Object.prototype.toString.call(obj) === \"[object \" + type + \"]\";\n\t};\n}", "function assertType (value, type) {\n\t var valid;\n\t var expectedType = getType(type);\n\t if (expectedType === 'String') {\n\t valid = typeof value === (expectedType = 'string');\n\t } else if (expectedType === 'Number') {\n\t valid = typeof value === (expectedType = 'number');\n\t } else if (expectedType === 'Boolean') {\n\t valid = typeof value === (expectedType = 'boolean');\n\t } else if (expectedType === 'Function') {\n\t valid = typeof value === (expectedType = 'function');\n\t } else if (expectedType === 'Object') {\n\t valid = isPlainObject(value);\n\t } else if (expectedType === 'Array') {\n\t valid = Array.isArray(value);\n\t } else {\n\t valid = value instanceof type;\n\t }\n\t return {\n\t valid: valid,\n\t expectedType: expectedType\n\t }\n\t}", "function assertType (value, type) {\n\t var valid;\n\t var expectedType = getType(type);\n\t if (expectedType === 'String') {\n\t valid = typeof value === (expectedType = 'string');\n\t } else if (expectedType === 'Number') {\n\t valid = typeof value === (expectedType = 'number');\n\t } else if (expectedType === 'Boolean') {\n\t valid = typeof value === (expectedType = 'boolean');\n\t } else if (expectedType === 'Function') {\n\t valid = typeof value === (expectedType = 'function');\n\t } else if (expectedType === 'Object') {\n\t valid = isPlainObject(value);\n\t } else if (expectedType === 'Array') {\n\t valid = Array.isArray(value);\n\t } else {\n\t valid = value instanceof type;\n\t }\n\t return {\n\t valid: valid,\n\t expectedType: expectedType\n\t }\n\t}", "function assertType (value, type) {\n\t var valid;\n\t var expectedType = getType(type);\n\t if (expectedType === 'String') {\n\t valid = typeof value === (expectedType = 'string');\n\t } else if (expectedType === 'Number') {\n\t valid = typeof value === (expectedType = 'number');\n\t } else if (expectedType === 'Boolean') {\n\t valid = typeof value === (expectedType = 'boolean');\n\t } else if (expectedType === 'Function') {\n\t valid = typeof value === (expectedType = 'function');\n\t } else if (expectedType === 'Object') {\n\t valid = isPlainObject(value);\n\t } else if (expectedType === 'Array') {\n\t valid = Array.isArray(value);\n\t } else {\n\t valid = value instanceof type;\n\t }\n\t return {\n\t valid: valid,\n\t expectedType: expectedType\n\t }\n\t}", "function assertType (value, type) {\n\t var valid;\n\t var expectedType = getType(type);\n\t if (expectedType === 'String') {\n\t valid = typeof value === (expectedType = 'string');\n\t } else if (expectedType === 'Number') {\n\t valid = typeof value === (expectedType = 'number');\n\t } else if (expectedType === 'Boolean') {\n\t valid = typeof value === (expectedType = 'boolean');\n\t } else if (expectedType === 'Function') {\n\t valid = typeof value === (expectedType = 'function');\n\t } else if (expectedType === 'Object') {\n\t valid = isPlainObject(value);\n\t } else if (expectedType === 'Array') {\n\t valid = Array.isArray(value);\n\t } else {\n\t valid = value instanceof type;\n\t }\n\t return {\n\t valid: valid,\n\t expectedType: expectedType\n\t }\n\t}", "function assertType (value, type) {\n\t var valid;\n\t var expectedType = getType(type);\n\t if (expectedType === 'String') {\n\t valid = typeof value === (expectedType = 'string');\n\t } else if (expectedType === 'Number') {\n\t valid = typeof value === (expectedType = 'number');\n\t } else if (expectedType === 'Boolean') {\n\t valid = typeof value === (expectedType = 'boolean');\n\t } else if (expectedType === 'Function') {\n\t valid = typeof value === (expectedType = 'function');\n\t } else if (expectedType === 'Object') {\n\t valid = isPlainObject(value);\n\t } else if (expectedType === 'Array') {\n\t valid = Array.isArray(value);\n\t } else {\n\t valid = value instanceof type;\n\t }\n\t return {\n\t valid: valid,\n\t expectedType: expectedType\n\t }\n\t}", "function assertType (value, type) {\n\t var valid;\n\t var expectedType = getType(type);\n\t if (expectedType === 'String') {\n\t valid = typeof value === (expectedType = 'string');\n\t } else if (expectedType === 'Number') {\n\t valid = typeof value === (expectedType = 'number');\n\t } else if (expectedType === 'Boolean') {\n\t valid = typeof value === (expectedType = 'boolean');\n\t } else if (expectedType === 'Function') {\n\t valid = typeof value === (expectedType = 'function');\n\t } else if (expectedType === 'Object') {\n\t valid = isPlainObject(value);\n\t } else if (expectedType === 'Array') {\n\t valid = Array.isArray(value);\n\t } else {\n\t valid = value instanceof type;\n\t }\n\t return {\n\t valid: valid,\n\t expectedType: expectedType\n\t }\n\t}", "function isType(value, type) {\n var str = {}.toString.call(value);\n return str.indexOf('[object') === 0 && str.indexOf(type + \"]\") > -1;\n}", "function is(el, obj){\n return el instanceof obj\n}", "function isType(type) {\n\t return function(obj) {\n\t return Object.prototype.toString.call(obj) === \"[object \" + type + \"]\"\n\t }\n\t}", "function assertType(value, type) {\n\t var valid;\n\t var expectedType = getType(type);\n\t if (expectedType === 'String') {\n\t valid = (typeof value === 'undefined' ? 'undefined' : _typeof(value)) === (expectedType = 'string');\n\t } else if (expectedType === 'Number') {\n\t valid = (typeof value === 'undefined' ? 'undefined' : _typeof(value)) === (expectedType = 'number');\n\t } else if (expectedType === 'Boolean') {\n\t valid = (typeof value === 'undefined' ? 'undefined' : _typeof(value)) === (expectedType = 'boolean');\n\t } else if (expectedType === 'Function') {\n\t valid = (typeof value === 'undefined' ? 'undefined' : _typeof(value)) === (expectedType = 'function');\n\t } else if (expectedType === 'Object') {\n\t valid = isPlainObject(value);\n\t } else if (expectedType === 'Array') {\n\t valid = Array.isArray(value);\n\t } else {\n\t valid = value instanceof type;\n\t }\n\t return {\n\t valid: valid,\n\t expectedType: expectedType\n\t };\n\t}", "function IsObject(v) {\n return v !== null &&\n v !== undefined &&\n typeof v !== \"boolean\" &&\n typeof v !== \"number\" &&\n typeof v !== \"string\" &&\n typeof v !== \"symbol\";\n}", "function isObject$1(obj){\nreturn kindOf(obj)==='object'||kindOf(obj)==='function';\n}", "function assertType (value, type) {\n var valid;\n var expectedType = getType(type);\n if (expectedType === 'String') {\n valid = typeof value === (expectedType = 'string');\n } else if (expectedType === 'Number') {\n valid = typeof value === (expectedType = 'number');\n } else if (expectedType === 'Boolean') {\n valid = typeof value === (expectedType = 'boolean');\n } else if (expectedType === 'Function') {\n valid = typeof value === (expectedType = 'function');\n } else if (expectedType === 'Object') {\n valid = isPlainObject(value);\n } else if (expectedType === 'Array') {\n valid = Array.isArray(value);\n } else {\n valid = value instanceof type;\n }\n return {\n valid: valid,\n expectedType: expectedType\n }\n}", "function assertType (value, type) {\n var valid;\n var expectedType = getType(type);\n if (expectedType === 'String') {\n valid = typeof value === (expectedType = 'string');\n } else if (expectedType === 'Number') {\n valid = typeof value === (expectedType = 'number');\n } else if (expectedType === 'Boolean') {\n valid = typeof value === (expectedType = 'boolean');\n } else if (expectedType === 'Function') {\n valid = typeof value === (expectedType = 'function');\n } else if (expectedType === 'Object') {\n valid = isPlainObject(value);\n } else if (expectedType === 'Array') {\n valid = Array.isArray(value);\n } else {\n valid = value instanceof type;\n }\n return {\n valid: valid,\n expectedType: expectedType\n }\n}", "function assertType (value, type) {\n var valid;\n var expectedType = getType(type);\n if (expectedType === 'String') {\n valid = typeof value === (expectedType = 'string');\n } else if (expectedType === 'Number') {\n valid = typeof value === (expectedType = 'number');\n } else if (expectedType === 'Boolean') {\n valid = typeof value === (expectedType = 'boolean');\n } else if (expectedType === 'Function') {\n valid = typeof value === (expectedType = 'function');\n } else if (expectedType === 'Object') {\n valid = isPlainObject(value);\n } else if (expectedType === 'Array') {\n valid = Array.isArray(value);\n } else {\n valid = value instanceof type;\n }\n return {\n valid: valid,\n expectedType: expectedType\n }\n}", "function assertType (value, type) {\n var valid;\n var expectedType = getType(type);\n if (expectedType === 'String') {\n valid = typeof value === (expectedType = 'string');\n } else if (expectedType === 'Number') {\n valid = typeof value === (expectedType = 'number');\n } else if (expectedType === 'Boolean') {\n valid = typeof value === (expectedType = 'boolean');\n } else if (expectedType === 'Function') {\n valid = typeof value === (expectedType = 'function');\n } else if (expectedType === 'Object') {\n valid = isPlainObject(value);\n } else if (expectedType === 'Array') {\n valid = Array.isArray(value);\n } else {\n valid = value instanceof type;\n }\n return {\n valid: valid,\n expectedType: expectedType\n }\n}", "function assertType (value, type) {\n var valid;\n var expectedType = getType(type);\n if (expectedType === 'String') {\n valid = typeof value === (expectedType = 'string');\n } else if (expectedType === 'Number') {\n valid = typeof value === (expectedType = 'number');\n } else if (expectedType === 'Boolean') {\n valid = typeof value === (expectedType = 'boolean');\n } else if (expectedType === 'Function') {\n valid = typeof value === (expectedType = 'function');\n } else if (expectedType === 'Object') {\n valid = isPlainObject(value);\n } else if (expectedType === 'Array') {\n valid = Array.isArray(value);\n } else {\n valid = value instanceof type;\n }\n return {\n valid: valid,\n expectedType: expectedType\n }\n}", "function assertType (value, type) {\n var valid;\n var expectedType = getType(type);\n if (expectedType === 'String') {\n valid = typeof value === (expectedType = 'string');\n } else if (expectedType === 'Number') {\n valid = typeof value === (expectedType = 'number');\n } else if (expectedType === 'Boolean') {\n valid = typeof value === (expectedType = 'boolean');\n } else if (expectedType === 'Function') {\n valid = typeof value === (expectedType = 'function');\n } else if (expectedType === 'Object') {\n valid = isPlainObject(value);\n } else if (expectedType === 'Array') {\n valid = Array.isArray(value);\n } else {\n valid = value instanceof type;\n }\n return {\n valid: valid,\n expectedType: expectedType\n }\n}", "function assertType (value, type) {\n var valid;\n var expectedType = getType(type);\n if (expectedType === 'String') {\n valid = typeof value === (expectedType = 'string');\n } else if (expectedType === 'Number') {\n valid = typeof value === (expectedType = 'number');\n } else if (expectedType === 'Boolean') {\n valid = typeof value === (expectedType = 'boolean');\n } else if (expectedType === 'Function') {\n valid = typeof value === (expectedType = 'function');\n } else if (expectedType === 'Object') {\n valid = isPlainObject(value);\n } else if (expectedType === 'Array') {\n valid = Array.isArray(value);\n } else {\n valid = value instanceof type;\n }\n return {\n valid: valid,\n expectedType: expectedType\n }\n}", "function assertType (value, type) {\n var valid;\n var expectedType = getType(type);\n if (expectedType === 'String') {\n valid = typeof value === (expectedType = 'string');\n } else if (expectedType === 'Number') {\n valid = typeof value === (expectedType = 'number');\n } else if (expectedType === 'Boolean') {\n valid = typeof value === (expectedType = 'boolean');\n } else if (expectedType === 'Function') {\n valid = typeof value === (expectedType = 'function');\n } else if (expectedType === 'Object') {\n valid = isPlainObject(value);\n } else if (expectedType === 'Array') {\n valid = Array.isArray(value);\n } else {\n valid = value instanceof type;\n }\n return {\n valid: valid,\n expectedType: expectedType\n }\n}", "function _isObject(v) {\n return (Object.prototype.toString.call(v) === '[object Object]');\n}", "function _isObject(v) {\n return (Object.prototype.toString.call(v) === '[object Object]');\n}", "function _isObject(v) {\n return (Object.prototype.toString.call(v) === '[object Object]');\n}", "function _isObject(v) {\n return (Object.prototype.toString.call(v) === '[object Object]');\n}", "function _isObject(v) {\n return (Object.prototype.toString.call(v) === '[object Object]');\n}", "function confirmObjType(objInput, objInputConstructor, blnAllowSubclasses) {\n\t//if we didn't get a value for blnAllowSubclasses, make it true\n\tif (blnAllowSubclasses == undefined) {blnAllowSubclasses = true;}\n\n\t//checking input object to make sure it is a objInputConstructor\n\tif (!isInstanceOf(objInput, objInputConstructor)) {\n\t\t//it isn't an instance of the constructor.\n\t\t//This switch statement PURPOSELY allows fallthrough: it only breaks out if\n\t\t//we are allowing subclasses AND this object is a subclass of the constructor.\n\t\t//Otherwise, it falls through to give the \"not correct object type\" error.\n\t\tswitch(blnAllowSubclasses) {\n\t\t\tcase true:\n\t\t\t\t//if it is a subclass of the constructor\n\t\t\t\tif (objInputConstructor.prototype.isPrototypeOf(objInput)) {break;}\n\t\t\t\t//This switch statement PURPOSELY allows fallthrough\n\t\t\tcase false:\n\t\t\t\tthrow new Error(\"input is not of correct object type\");\n\t\t} //end switch\n\t} //end if input object is not one of constructor\n\n\t//return input object unchanged\n\treturn objInput;\n} //end function confirmObjType", "function isOfType (T, maybeSomething) {\n return maybeSomething && maybeSomething.constructor === T\n}", "function of(value) {\n switch (typeof value) {\n case 'object':\n if (value === null) {\n return NULL;\n } else if (Array.isArray(value)) {\n return ARRAY;\n }\n return OBJECT;\n case 'string':\n return STRING;\n case 'boolean':\n return BOOLEAN;\n case 'number':\n return isFinite(value) ? NUMBER : MISSING;\n }\n // Covers undefined, function, etc\n return MISSING;\n}", "function _instanceof(left, right) { if (right != null && typeof Symbol !== \"undefined\" && right[Symbol.hasInstance]) { return right[Symbol.hasInstance](left); } else { return left instanceof right; } }", "function is(el, obj){\r\n return el instanceof obj\r\n}", "function is(type, obj) {\n \treturn objectType(obj) === type;\n }", "function an(t) {\n return \"object\" == typeof t && null !== t && (Object.getPrototypeOf(t) === Object.prototype || null === Object.getPrototypeOf(t));\n}", "is(value) {\n throw new Error(\"Datatype.is() is abstract\");\n }", "function _type(o) {\n var t = typeof o;\n return _allowable[t] || // number, string, boolean, undefined\n _allowable[_toStr.call(o)] || // Number, String, Boolean, Date\n (t === OBJECT ?\n (o ? OBJECT : NULL) : // object, array, null, misc natives\n UNDEFINED); // function, unknown\n}", "function _type(o) {\n var t = typeof o;\n return _allowable[t] || // number, string, boolean, undefined\n _allowable[_toStr.call(o)] || // Number, String, Boolean, Date\n (t === OBJECT ?\n (o ? OBJECT : NULL) : // object, array, null, misc natives\n UNDEFINED); // function, unknown\n}", "function isType(type, obj) {\n return toString.call(obj) === `[object ${name}]`;\n}", "function fe(t) {\n return \"object\" == typeof t && null !== t && (Object.getPrototypeOf(t) === Object.prototype || null === Object.getPrototypeOf(t));\n}" ]
[ "0.63976204", "0.6387518", "0.63595504", "0.63429916", "0.63172144", "0.6297442", "0.6275125", "0.6271146", "0.6231667", "0.62197995", "0.6203875", "0.6203303", "0.6197005", "0.6160248", "0.6111649", "0.60518664", "0.60385704", "0.6038193", "0.6022243", "0.6018168", "0.6017175", "0.6017175", "0.6017175", "0.6017175", "0.6017175", "0.6017175", "0.6017175", "0.6017175", "0.6017175", "0.6017175", "0.6017175", "0.6017175", "0.6017175", "0.6007162", "0.6006656", "0.6006656", "0.59959054", "0.5993866", "0.5992272", "0.5992272", "0.5992272", "0.5992272", "0.5992272", "0.5992272", "0.5992272", "0.5992272", "0.5992272", "0.5992272", "0.5992272", "0.5992272", "0.5992272", "0.5992272", "0.5992272", "0.5992272", "0.5992272", "0.5992272", "0.5992272", "0.59895235", "0.59895235", "0.59895235", "0.5984574", "0.5979004", "0.5973067", "0.59646857", "0.5960303", "0.5960303", "0.5960303", "0.5960303", "0.5960303", "0.5960303", "0.594282", "0.59329206", "0.5917546", "0.5897946", "0.5893608", "0.58853525", "0.588436", "0.588436", "0.588436", "0.588436", "0.588436", "0.588436", "0.588436", "0.588436", "0.58693534", "0.58693534", "0.58693534", "0.58693534", "0.58693534", "0.5867544", "0.5857599", "0.5853656", "0.58391964", "0.58350885", "0.5823072", "0.5820652", "0.58035535", "0.5800731", "0.5800731", "0.5781819", "0.57657677" ]
0.0
-1
v8 likes predictible objects
function Item(fun, array) { this.fun = fun; this.array = array; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function compareLike(a,b){\n var al = a.idLikesProp.length;\n var bl = b.idLikesProp.length;\n if(al > bl) return -1;\n if(bl > al) return 1;\n return 0;\n}", "function lookAround() {\n var objectDescription = \"\"\n tj.see().then(function(objects) {\n objects.forEach(function(each) {\n if (each.score >= 0.4) {\n objectDescription = objectDescription + \", \" + each.class\n }\n })\n tj.speak(\"The objects I see are: \" + objectDescription)\n });\n}", "function recommendNewPosts() {\n model.loadModel();\n getNewPosts(function (err, posts) {\n var label\n ;\n posts.forEach(function (post) {\n label = model.classifyPost(post);\n if (label == 'like') {\n console.log(post);\n }\n });\n });\n }", "function BOT_onLike() {\r\n\tBOT_traceString += \"GOTO command judge\" + \"\\n\"; // change performative\r\n\tBOT_theReqJudgement = \"likeable\";\r\n\tBOT_onJudge(); \t\r\n\tif(BOT_reqSuccess) {\r\n\t\tvar ta = [BOT_theReqTopic,BOT_theReqAttribute]; \r\n\t\tBOT_del(BOT_theUserTopicId,\"distaste\",\"VAL\",ta);\r\n\t\tBOT_add(BOT_theUserTopicId,\"preference\",\"VAL\",ta);\r\n\t}\r\n}", "function like (data, archetype) {\n var name;\n\n for (name in archetype) {\n if (archetype.hasOwnProperty(name)) {\n if (data.hasOwnProperty(name) === false || typeof data[name] !== typeof archetype[name]) {\n return false;\n }\n\n if (object(data[name]) && like(data[name], archetype[name]) === false) {\n return false;\n }\n }\n }\n\n return true;\n }", "function LanguageUnderstandingModel() {\n }", "function guess() {\n classifier.predict(video.elt, 5, gotResult);\n}", "function theBigBang() {\n\t\tinitLibs();\n\t\tinitFuncs();\n\t\tObject.setPrototypeOf(Universe.prototype, universe.kjsclasses._primitive_prototype);\n\t\tObject.setPrototypeOf(Object.prototype, universe); // [0]\n\t}", "function readOwn(obj, name, pumpkin) {\n if (typeof obj !== 'object' || !obj) {\n if (typeOf(obj) !== 'object') {\n return pumpkin;\n }\n }\n if (typeof name === 'number' && name >= 0) {\n if (myOriginalHOP.call(obj, name)) { return obj[name]; }\n return pumpkin;\n }\n name = String(name);\n if (obj[name + '_canRead___'] === obj) { return obj[name]; }\n if (!myOriginalHOP.call(obj, name)) { return pumpkin; }\n // inline remaining relevant cases from canReadPub\n if (endsWith__.test(name)) { return pumpkin; }\n if (name === 'toString') { return pumpkin; }\n if (!isJSONContainer(obj)) { return pumpkin; }\n fastpathRead(obj, name);\n return obj[name];\n }", "function a(e,t,n){(n?Reflect.getOwnMetadataKeys(t,n):Reflect.getOwnMetadataKeys(t)).forEach(function(r){var i=n?Reflect.getOwnMetadata(r,t,n):Reflect.getOwnMetadata(r,t);n?Reflect.defineMetadata(r,i,e,n):Reflect.defineMetadata(r,i,e)})}", "function NXObject() {}", "function isPrimative(val) { return (typeof val !== 'object') }", "function like (data, duck) {\n var name;\n\n assert.object(data);\n assert.object(duck);\n\n for (name in duck) {\n if (duck.hasOwnProperty(name)) {\n if (data.hasOwnProperty(name) === false || typeof data[name] !== typeof duck[name]) {\n return false;\n }\n\n if (object(data[name]) && like(data[name], duck[name]) === false) {\n return false;\n }\n }\n }\n\n return true;\n }", "static get observedAttributes() {\n return ['rainbow', 'lang'];\n }", "function a(e,t,n){(n?Reflect.getOwnMetadataKeys(t,n):Reflect.getOwnMetadataKeys(t)).forEach((function(r){var i=n?Reflect.getOwnMetadata(r,t,n):Reflect.getOwnMetadata(r,t);n?Reflect.defineMetadata(r,i,e,n):Reflect.defineMetadata(r,i,e)}))}", "function testSimpleHole_prototype() {\n var theHole = Object.create({ x: \"in proto\" });\n var theReplacement = \"yay\";\n var serialized = bidar.serialize(theHole, holeFilter);\n var parsed = bidar.parse(serialized, holeFiller);\n\n assert.equal(parsed, theReplacement);\n\n function holeFilter(x) {\n assert.equal(x, theHole);\n return { data: \"blort\" };\n }\n\n function holeFiller(x) {\n assert.equal(x, \"blort\");\n return theReplacement;\n }\n}", "function test() {\n\t// \"ex nihilo\" object creation using the literal\n\t// object notation {}.\n\tvar foo = {\n\t\tname : \"foo\",\n\t\tone : 1,\n\t\ttwo : 2\n\t};\n\n\t// Another \"ex nihilo\" object.\n\tvar bar = {\n\t\ttwo : \"two\",\n\t\tthree : 3\n\t};\n\n\t// Gecko and Webkit JavaScript engines can directly\n\t// manipulate the internal prototype link.\n\t// For the sake of simplicity, let us pretend\n\t// that the following line works regardless of the\n\t// engine used:\n\tbar.__proto__ = foo; // foo is now the prototype of bar.\n\n\t// If we try to access foo's properties from bar\n\t// from now on, we'll succeed.\n\tlog(bar.one) // Resolves to 1.\n\n\t// The child object's properties are also accessible.\n\tlog(bar.three) // Resolves to 3.\n\n\t// Own properties shadow prototype properties\n\tlog(bar.two); // Resolves to \"two\"\n\tlog(foo.name); // unaffected, resolves to \"foo\"\n\tlog(bar.name); // Resolves to \"foo\"\n log(foo.__proto__);\n}", "function wrappedPrimitivePreviewer(className, classObj, objectActor, grip) {\r\n let {_obj} = objectActor;\r\n\r\n if (!_obj.proto || _obj.proto.class != className) {\r\n return false;\r\n }\r\n\r\n let raw = _obj.unsafeDereference();\r\n let v = null;\r\n try {\r\n v = classObj.prototype.valueOf.call(raw);\r\n } catch (ex) {\r\n // valueOf() can throw if the raw JS object is \"misbehaved\".\r\n return false;\r\n }\r\n\r\n if (v === null) {\r\n return false;\r\n }\r\n\r\n let canHandle = GenericObject(objectActor, grip, className === \"String\");\r\n if (!canHandle) {\r\n return false;\r\n }\r\n\r\n grip.preview.wrappedValue = objectActor.getGrip(makeDebuggeeValueIfNeeded(_obj, v));\r\n return true;\r\n}", "function DartObject(o) {\n this.o = o;\n}", "function i(t,e,n){(n?Reflect.getOwnMetadataKeys(e,n):Reflect.getOwnMetadataKeys(e)).forEach(function(r){var o=n?Reflect.getOwnMetadata(r,e,n):Reflect.getOwnMetadata(r,e);n?Reflect.defineMetadata(r,o,t,n):Reflect.defineMetadata(r,o,t)})}", "function i(t,e,n){(n?Reflect.getOwnMetadataKeys(e,n):Reflect.getOwnMetadataKeys(e)).forEach(function(r){var o=n?Reflect.getOwnMetadata(r,e,n):Reflect.getOwnMetadata(r,e);n?Reflect.defineMetadata(r,o,t,n):Reflect.defineMetadata(r,o,t)})}", "function likeVsLikes(toyLikeCount){\n\t\tif (toyLikeCount == 1){\n\t\t\treturn 'Like';\n\t\t} else {\n\t\t\treturn 'Likes';\n\t\t}\n\t}", "wordClass(word) {\r\n return {\r\n der: word.artikel == \"der\",\r\n die: word.artikel == \"die\",\r\n das: word.artikel == \"das\",\r\n marked: word.marker\r\n }\r\n }", "constructor(spec) {\n this.cached = /* @__PURE__ */ Object.create(null);\n let instanceSpec = this.spec = {};\n for (let prop in spec)\n instanceSpec[prop] = spec[prop];\n instanceSpec.nodes = OrderedMap.from(spec.nodes), instanceSpec.marks = OrderedMap.from(spec.marks || {}), this.nodes = NodeType$1.compile(this.spec.nodes, this);\n this.marks = MarkType.compile(this.spec.marks, this);\n let contentExprCache = /* @__PURE__ */ Object.create(null);\n for (let prop in this.nodes) {\n if (prop in this.marks)\n throw new RangeError(prop + \" can not be both a node and a mark\");\n let type = this.nodes[prop], contentExpr = type.spec.content || \"\", markExpr = type.spec.marks;\n type.contentMatch = contentExprCache[contentExpr] || (contentExprCache[contentExpr] = ContentMatch.parse(contentExpr, this.nodes));\n type.inlineContent = type.contentMatch.inlineContent;\n type.markSet = markExpr == \"_\" ? null : markExpr ? gatherMarks(this, markExpr.split(\" \")) : markExpr == \"\" || !type.inlineContent ? [] : null;\n }\n for (let prop in this.marks) {\n let type = this.marks[prop], excl = type.spec.excludes;\n type.excluded = excl == null ? [type] : excl == \"\" ? [] : gatherMarks(this, excl.split(\" \"));\n }\n this.nodeFromJSON = this.nodeFromJSON.bind(this);\n this.markFromJSON = this.markFromJSON.bind(this);\n this.topNodeType = this.nodes[this.spec.topNode || \"doc\"];\n this.cached.wrappings = /* @__PURE__ */ Object.create(null);\n }", "function dummyObjects(name, age){\n this.name = name\n this.age = age\n}", "function handleLikes() {\n // Get a random number\n let randomNumber = Math.random();\n // To make it unpredictable, only change the likes if =>\n if (randomNumber < REVEAL_PROBABILITY) {\n defineLikes();\n }\n}", "constructor() { \n \n Like.initialize(this);\n }", "like() {\r\n return this.clone(Comment, \"Like\").postCore();\r\n }", "like() {\r\n return this.getItem().then(i => {\r\n return i.like();\r\n });\r\n }", "added(vrobject){}", "classify(phrase) { return this.clf.classify(phrase) }", "function badIdea(){\n this.idea = \"bad\";\n}", "static get observedAttributes(){this.finalize();const e=[];// Use forEach so this works even if for/of loops are compiled to for loops\n// expecting arrays\nreturn this._classProperties.forEach((t,n)=>{const r=this._attributeNameForProperty(n,t);void 0!==r&&(this._attributeToPropertyMap.set(r,n),e.push(r))}),e}", "shouldSerialize(prop, dataKey) {\n const contains = (str, re) => (str.match(re) || []).length > 0;\n const a = contains(dataKey, /\\./g);\n const b = contains(dataKey, /\\[/g);\n return !!prop.object && !(a || b);\n }", "function oldAndLoud(object){\n\tobject.age++;\n\tobject.name = object.name.toUpperCase();\n}", "function classifyPose() {\n if (pose && working) {\n inputs = [];\n for (let i = 0; i < pose.landmarks.length; i++) {\n inputs.push(pose.landmarks[i][0]);\n inputs.push(pose.landmarks[i][1]);\n inputs.push(pose.landmarks[i][2]);\n }\n brain.classify(inputs, gotResult)\n }\n }", "function PropertyDetection() {}", "constructor()\n {\n this.likes = [];\n }", "like() {\r\n return this.clone(Item, \"like\").postCore();\r\n }", "function classifyVideo() {\n classifier.predict(gotResult);\n}", "function classifyVideo() {\n classifier.predict(gotResult);\n}", "function classifyVideo() {\n classifier.predict(gotResult);\n}", "async TestLikeDoctorPost(){\n var response = await entity.Likes(6,28,true,true);\n //console.log(response)\n if(response != null){\n console.log(\"\\x1b[32m%s\\x1b[0m\",\"TestDOctorRating Passed\");\n }else{\n console.log(\"\\x1b[31m%s\\x1b[0m\",\"TestDOctorRating Failed\");\n }\n\n }", "function showLikes(likes) {\n\tconsole.log(`THINGS I LIKE:\\n`);\n\tfor(let like of likes) {\n\t\tconsole.log(like);\n\t}\n}", "function protoAugment(target,src,keys){/* eslint-disable no-proto */target.__proto__=src;/* eslint-enable no-proto */}", "function protoAugment(target,src,keys){/* eslint-disable no-proto */target.__proto__=src;/* eslint-enable no-proto */}", "function Nevis() {}", "function Nevis() {}", "function Nevis() {}", "test_primitivesExtended() {\n let translator = new Translator();\n translator.registerPackage(PackageFile);\n let text = JSON.stringify(this.json.primitivesExtended);\n let object = translator.decode(text).getRoot();\n Assert.equals(\"ca.frar.jjjrmi.translator.testclasses.PrimitivesExtended\", object.constructor.__getClass());\n Assert.equals(\"alpha16\", object.string);\n }", "function buildObjectsObj(gCloudV, azureCV, minScore = 0.0){\n let objects = [];\n\n if(gCloudV) {// gcloud vision results are available\n let gCloudObjects = gCloudV['localizedObjectAnnotations'];\n\n //apply standard bounding box to all the detected objects\n if(azureCV)// azure computer vision results are available\n gCloudVObjsToCogniBoundingBox(gCloudObjects, azureCV['metadata']['width'], azureCV['metadata']['height']);\n\n else//need to retrieve image sizes from gcloud (already done and put in the metadata tag of gcloudv with appropriate calls)\n gCloudVObjsToCogniBoundingBox(gCloudObjects, gCloudV['metadata']['width'], gCloudV['metadata']['height']);\n\n for (let gCloudObj of gCloudObjects) {\n if (gCloudObj['score'] > minScore) { //filter out unwanted tags\n objects.push({\n name: gCloudObj['name'],\n mid: (gCloudObj['mid'] && gCloudObj['mid']!= '')? gCloudObj['mid']: undefined,\n confidence: gCloudObj['score'],\n boundingBox: gCloudObj['boundingBox']\n });\n }\n }\n }\n\n if(azureCV){// azure computer vision results are available\n let azureObjects = azureCV['objects'];\n //apply standard bounding box to all the detected objects\n azureCVObjsToCogniBoundingBox(azureObjects, azureCV['metadata']['width'], azureCV['metadata']['height']);\n for(let aObj of azureObjects){\n if(aObj['confidence'] > minScore) { //filter out unwanted tags\n objects.push({\n name: aObj['object'],\n confidence: aObj['confidence'],\n boundingBox: aObj['boundingBox']\n });\n }\n }\n }\n\n objects = combineObjectsArray(objects);// build an array where labels regarding the same exact object are combined with averaged confidence\n\n objects.sort((a, b) => {\n if(a['confidence']>b['confidence'])\n return -1;\n else if(a['confidence']==b['confidence'])\n return 0;\n else\n return 1;\n });\n\n return objects;\n}", "function V(e){if(null===e||\"[object Object]\"!==function(e){return Object.prototype.toString.call(e)}(e))return!1;var t=Object.getPrototypeOf(e);return null===t||t===Object.prototype}", "function classifyVideo() {\r\n classifier.classify(vid, gotResult);\r\n\r\n}", "function test_nountag_does_not_think_it_has_watch_tag_when_it_does_not() {\n Assert.equal(TagNoun.fromJSON(\"watch\"), undefined);\n}", "function markRaw(obj) {\r\n if (!(isPlainObject(obj) || isArray(obj)) || !Object.isExtensible(obj)) {\r\n return obj;\r\n }\r\n // set the vue observable flag at obj\r\n var ob = createObserver();\r\n ob.__raw__ = true;\r\n def(obj, '__ob__', ob);\r\n // mark as Raw\r\n rawSet.set(obj, true);\r\n return obj;\r\n}", "function markRaw(obj) {\r\n if (!(isPlainObject(obj) || isArray(obj)) || !Object.isExtensible(obj)) {\r\n return obj;\r\n }\r\n // set the vue observable flag at obj\r\n var ob = createObserver();\r\n ob.__raw__ = true;\r\n def(obj, '__ob__', ob);\r\n // mark as Raw\r\n rawSet.set(obj, true);\r\n return obj;\r\n}", "function v11(v12,v13) {\n const v15 = v11(Object,Function);\n // v15 = .unknown\n const v16 = Object(v13,v8,0,v6);\n // v16 = .object()\n const v17 = 0;\n // v17 = .integer\n const v18 = 1;\n // v18 = .integer\n const v19 = 512;\n // v19 = .integer\n const v20 = \"-1024\";\n // v20 = .string + .object(ofGroup: String, withProperties: [\"constructor\", \"__proto__\", \"length\"], withMethods: [\"padEnd\", \"split\", \"charAt\", \"match\", \"lastIndexOf\", \"charCodeAt\", \"trim\", \"startsWith\", \"includes\", \"repeat\", \"search\", \"slice\", \"endsWith\", \"matchAll\", \"indexOf\", \"concat\", \"replace\", \"padStart\", \"substring\", \"codePointAt\"])\n const v21 = isFinite;\n // v21 = .function([.anything] => .boolean)\n const v23 = [1337];\n // v23 = .object(ofGroup: Array, withProperties: [\"length\", \"__proto__\", \"constructor\"], withMethods: [\"concat\", \"fill\", \"indexOf\", \"entries\", \"forEach\", \"find\", \"reverse\", \"slice\", \"flat\", \"reduce\", \"join\", \"findIndex\", \"reduceRight\", \"some\", \"copyWithin\", \"toString\", \"pop\", \"filter\", \"map\", \"splice\", \"keys\", \"unshift\", \"sort\", \"includes\", \"flatMap\", \"shift\", \"values\", \"every\", \"toLocaleString\", \"push\", \"lastIndexOf\"])\n const v24 = {};\n // v24 = .object(ofGroup: Object, withProperties: [\"__proto__\"])\n let v25 = v23;\n const v26 = -29897853;\n // v26 = .integer\n const v27 = \"replace\";\n // v27 = .string + .object(ofGroup: String, withProperties: [\"constructor\", \"__proto__\", \"length\"], withMethods: [\"padEnd\", \"split\", \"charAt\", \"match\", \"lastIndexOf\", \"charCodeAt\", \"trim\", \"startsWith\", \"includes\", \"repeat\", \"search\", \"slice\", \"endsWith\", \"matchAll\", \"indexOf\", \"concat\", \"replace\", \"padStart\", \"substring\", \"codePointAt\"])\n const v28 = Boolean;\n // v28 = .object(ofGroup: BooleanConstructor, withProperties: [\"prototype\"]) + .function([.anything] => .boolean) + .constructor([.anything] => .boolean)\n const v30 = [13.37,13.37];\n // v30 = .object(ofGroup: Array, withProperties: [\"length\", \"__proto__\", \"constructor\"], withMethods: [\"concat\", \"fill\", \"indexOf\", \"entries\", \"forEach\", \"find\", \"reverse\", \"slice\", \"flat\", \"reduce\", \"join\", \"findIndex\", \"reduceRight\", \"some\", \"copyWithin\", \"toString\", \"pop\", \"filter\", \"map\", \"splice\", \"keys\", \"unshift\", \"sort\", \"includes\", \"flatMap\", \"shift\", \"values\", \"every\", \"toLocaleString\", \"push\", \"lastIndexOf\"])\n const v31 = 1337;\n // v31 = .integer\n let v32 = 13.37;\n const v36 = [13.37,13.37,13.37];\n // v36 = .object(ofGroup: Array, withProperties: [\"length\", \"__proto__\", \"constructor\"], withMethods: [\"concat\", \"fill\", \"indexOf\", \"entries\", \"forEach\", \"find\", \"reverse\", \"slice\", \"flat\", \"reduce\", \"join\", \"findIndex\", \"reduceRight\", \"some\", \"copyWithin\", \"toString\", \"pop\", \"filter\", \"map\", \"splice\", \"keys\", \"unshift\", \"sort\", \"includes\", \"flatMap\", \"shift\", \"values\", \"every\", \"toLocaleString\", \"push\", \"lastIndexOf\"])\n const v38 = [1337,1337];\n // v38 = .object(ofGroup: Array, withProperties: [\"length\", \"__proto__\", \"constructor\"], withMethods: [\"concat\", \"fill\", \"indexOf\", \"entries\", \"forEach\", \"find\", \"reverse\", \"slice\", \"flat\", \"reduce\", \"join\", \"findIndex\", \"reduceRight\", \"some\", \"copyWithin\", \"toString\", \"pop\", \"filter\", \"map\", \"splice\", \"keys\", \"unshift\", \"sort\", \"includes\", \"flatMap\", \"shift\", \"values\", \"every\", \"toLocaleString\", \"push\", \"lastIndexOf\"])\n const v39 = [13.37,1337,v38,1337,\"-128\",13.37,\"-128\",\"-128\",2147483647,1337];\n // v39 = .object(ofGroup: Array, withProperties: [\"length\", \"__proto__\", \"constructor\"], withMethods: [\"concat\", \"fill\", \"indexOf\", \"entries\", \"forEach\", \"find\", \"reverse\", \"slice\", \"flat\", \"reduce\", \"join\", \"findIndex\", \"reduceRight\", \"some\", \"copyWithin\", \"toString\", \"pop\", \"filter\", \"map\", \"splice\", \"keys\", \"unshift\", \"sort\", \"includes\", \"flatMap\", \"shift\", \"values\", \"every\", \"toLocaleString\", \"push\", \"lastIndexOf\"])\n const v40 = {__proto__:v36,length:v39};\n // v40 = .object(ofGroup: Object, withProperties: [\"__proto__\", \"length\"])\n const v41 = \"0\";\n // v41 = .string + .object(ofGroup: String, withProperties: [\"constructor\", \"__proto__\", \"length\"], withMethods: [\"padEnd\", \"split\", \"charAt\", \"match\", \"lastIndexOf\", \"charCodeAt\", \"trim\", \"startsWith\", \"includes\", \"repeat\", \"search\", \"slice\", \"endsWith\", \"matchAll\", \"indexOf\", \"concat\", \"replace\", \"padStart\", \"substring\", \"codePointAt\"])\n const v42 = -4130093409;\n // v42 = .integer\n const v44 = {b:2147483647,e:v38,valueOf:v36};\n // v44 = .object(ofGroup: Object, withProperties: [\"__proto__\", \"b\", \"valueOf\", \"e\"])\n const v45 = \"k**baeaDif\";\n // v45 = .string + .object(ofGroup: String, withProperties: [\"constructor\", \"__proto__\", \"length\"], withMethods: [\"padEnd\", \"split\", \"charAt\", \"match\", \"lastIndexOf\", \"charCodeAt\", \"trim\", \"startsWith\", \"includes\", \"repeat\", \"search\", \"slice\", \"endsWith\", \"matchAll\", \"indexOf\", \"concat\", \"replace\", \"padStart\", \"substring\", \"codePointAt\"])\n const v46 = 65536;\n // v46 = .integer\n const v47 = \"k**baeaDif\";\n // v47 = .string + .object(ofGroup: String, withProperties: [\"constructor\", \"__proto__\", \"length\"], withMethods: [\"padEnd\", \"split\", \"charAt\", \"match\", \"lastIndexOf\", \"charCodeAt\", \"trim\", \"startsWith\", \"includes\", \"repeat\", \"search\", \"slice\", \"endsWith\", \"matchAll\", \"indexOf\", \"concat\", \"replace\", \"padStart\", \"substring\", \"codePointAt\"])\n const v48 = 13.37;\n // v48 = .float\n const v50 = [13.37,13.37];\n // v50 = .object(ofGroup: Array, withProperties: [\"length\", \"__proto__\", \"constructor\"], withMethods: [\"concat\", \"fill\", \"indexOf\", \"entries\", \"forEach\", \"find\", \"reverse\", \"slice\", \"flat\", \"reduce\", \"join\", \"findIndex\", \"reduceRight\", \"some\", \"copyWithin\", \"toString\", \"pop\", \"filter\", \"map\", \"splice\", \"keys\", \"unshift\", \"sort\", \"includes\", \"flatMap\", \"shift\", \"values\", \"every\", \"toLocaleString\", \"push\", \"lastIndexOf\"])\n const v51 = ~v50;\n // v51 = .boolean\n const v53 = [13.37];\n // v53 = .object(ofGroup: Array, withProperties: [\"length\", \"__proto__\", \"constructor\"], withMethods: [\"concat\", \"fill\", \"indexOf\", \"entries\", \"forEach\", \"find\", \"reverse\", \"slice\", \"flat\", \"reduce\", \"join\", \"findIndex\", \"reduceRight\", \"some\", \"copyWithin\", \"toString\", \"pop\", \"filter\", \"map\", \"splice\", \"keys\", \"unshift\", \"sort\", \"includes\", \"flatMap\", \"shift\", \"values\", \"every\", \"toLocaleString\", \"push\", \"lastIndexOf\"])\n let v54 = v53;\n const v55 = gc;\n // v55 = .function([] => .undefined)\n const v58 = [13.37,13.37,13.37,13.37];\n // v58 = .object(ofGroup: Array, withProperties: [\"length\", \"__proto__\", \"constructor\"], withMethods: [\"concat\", \"fill\", \"indexOf\", \"entries\", \"forEach\", \"find\", \"reverse\", \"slice\", \"flat\", \"reduce\", \"join\", \"findIndex\", \"reduceRight\", \"some\", \"copyWithin\", \"toString\", \"pop\", \"filter\", \"map\", \"splice\", \"keys\", \"unshift\", \"sort\", \"includes\", \"flatMap\", \"shift\", \"values\", \"every\", \"toLocaleString\", \"push\", \"lastIndexOf\"])\n const v60 = [1337,1337,1337,1337];\n // v60 = .object(ofGroup: Array, withProperties: [\"length\", \"__proto__\", \"constructor\"], withMethods: [\"concat\", \"fill\", \"indexOf\", \"entries\", \"forEach\", \"find\", \"reverse\", \"slice\", \"flat\", \"reduce\", \"join\", \"findIndex\", \"reduceRight\", \"some\", \"copyWithin\", \"toString\", \"pop\", \"filter\", \"map\", \"splice\", \"keys\", \"unshift\", \"sort\", \"includes\", \"flatMap\", \"shift\", \"values\", \"every\", \"toLocaleString\", \"push\", \"lastIndexOf\"])\n const v61 = [3697200800,v58,v60];\n // v61 = .object(ofGroup: Array, withProperties: [\"length\", \"__proto__\", \"constructor\"], withMethods: [\"concat\", \"fill\", \"indexOf\", \"entries\", \"forEach\", \"find\", \"reverse\", \"slice\", \"flat\", \"reduce\", \"join\", \"findIndex\", \"reduceRight\", \"some\", \"copyWithin\", \"toString\", \"pop\", \"filter\", \"map\", \"splice\", \"keys\", \"unshift\", \"sort\", \"includes\", \"flatMap\", \"shift\", \"values\", \"every\", \"toLocaleString\", \"push\", \"lastIndexOf\"])\n const v62 = {__proto__:3697200800,constructor:1337,e:3697200800,length:13.37,toString:3697200800,valueOf:v61};\n // v62 = .object(ofGroup: Object, withProperties: [\"e\", \"__proto__\", \"length\", \"constructor\", \"toString\", \"valueOf\"])\n const v65 = [13.37,13.37,13.37,13.37];\n // v65 = .object(ofGroup: Array, withProperties: [\"length\", \"__proto__\", \"constructor\"], withMethods: [\"concat\", \"fill\", \"indexOf\", \"entries\", \"forEach\", \"find\", \"reverse\", \"slice\", \"flat\", \"reduce\", \"join\", \"findIndex\", \"reduceRight\", \"some\", \"copyWithin\", \"toString\", \"pop\", \"filter\", \"map\", \"splice\", \"keys\", \"unshift\", \"sort\", \"includes\", \"flatMap\", \"shift\", \"values\", \"every\", \"toLocaleString\", \"push\", \"lastIndexOf\"])\n const v67 = [1337,1337,1337,1337];\n // v67 = .object(ofGroup: Array, withProperties: [\"length\", \"__proto__\", \"constructor\"], withMethods: [\"concat\", \"fill\", \"indexOf\", \"entries\", \"forEach\", \"find\", \"reverse\", \"slice\", \"flat\", \"reduce\", \"join\", \"findIndex\", \"reduceRight\", \"some\", \"copyWithin\", \"toString\", \"pop\", \"filter\", \"map\", \"splice\", \"keys\", \"unshift\", \"sort\", \"includes\", \"flatMap\", \"shift\", \"values\", \"every\", \"toLocaleString\", \"push\", \"lastIndexOf\"])\n const v68 = [3697200800,v65,v67];\n // v68 = .object(ofGroup: Array, withProperties: [\"length\", \"__proto__\", \"constructor\"], withMethods: [\"concat\", \"fill\", \"indexOf\", \"entries\", \"forEach\", \"find\", \"reverse\", \"slice\", \"flat\", \"reduce\", \"join\", \"findIndex\", \"reduceRight\", \"some\", \"copyWithin\", \"toString\", \"pop\", \"filter\", \"map\", \"splice\", \"keys\", \"unshift\", \"sort\", \"includes\", \"flatMap\", \"shift\", \"values\", \"every\", \"toLocaleString\", \"push\", \"lastIndexOf\"])\n const v69 = {__proto__:3697200800,constructor:1337,e:3697200800,length:13.37,toString:3697200800,valueOf:v68};\n // v69 = .object(ofGroup: Object, withProperties: [\"e\", \"constructor\", \"__proto__\", \"length\", \"toString\", \"valueOf\"])\n const v70 = Object;\n // v70 = .object(ofGroup: ObjectConstructor, withProperties: [\"prototype\"], withMethods: [\"setPrototypeOf\", \"assign\", \"fromEntries\", \"seal\", \"getOwnPropertyNames\", \"freeze\", \"defineProperty\", \"create\", \"getPrototypeOf\", \"getOwnPropertySymbols\", \"keys\", \"values\", \"isExtensible\", \"entries\", \"is\", \"getOwnPropertyDescriptor\", \"preventExtensions\", \"defineProperties\", \"getOwnPropertyDescriptors\", \"isSealed\", \"isFrozen\"]) + .function([.anything...] => .object()) + .constructor([.anything...] => .object())\n function v71(v72) {\n }\n const v74 = [13.37];\n // v74 = .object(ofGroup: Array, withProperties: [\"length\", \"__proto__\", \"constructor\"], withMethods: [\"concat\", \"fill\", \"indexOf\", \"entries\", \"forEach\", \"find\", \"reverse\", \"slice\", \"flat\", \"reduce\", \"join\", \"findIndex\", \"reduceRight\", \"some\", \"copyWithin\", \"toString\", \"pop\", \"filter\", \"map\", \"splice\", \"keys\", \"unshift\", \"sort\", \"includes\", \"flatMap\", \"shift\", \"values\", \"every\", \"toLocaleString\", \"push\", \"lastIndexOf\"])\n const v75 = 1337;\n // v75 = .integer\n const v76 = v44 ** 13.37;\n // v76 = .integer | .float | .bigint\n function v77(v78,v79,v80,v81,v82) {\n }\n let v83 = v74;\n const v84 = \"2\";\n // v84 = .string + .object(ofGroup: String, withProperties: [\"constructor\", \"__proto__\", \"length\"], withMethods: [\"padEnd\", \"split\", \"charAt\", \"match\", \"lastIndexOf\", \"charCodeAt\", \"trim\", \"startsWith\", \"includes\", \"repeat\", \"search\", \"slice\", \"endsWith\", \"matchAll\", \"indexOf\", \"concat\", \"replace\", \"padStart\", \"substring\", \"codePointAt\"])\n const v85 = \"2\";\n // v85 = .string + .object(ofGroup: String, withProperties: [\"constructor\", \"__proto__\", \"length\"], withMethods: [\"padEnd\", \"split\", \"charAt\", \"match\", \"lastIndexOf\", \"charCodeAt\", \"trim\", \"startsWith\", \"includes\", \"repeat\", \"search\", \"slice\", \"endsWith\", \"matchAll\", \"indexOf\", \"concat\", \"replace\", \"padStart\", \"substring\", \"codePointAt\"])\n const v88 = [13.37,13.37,1337,13.37];\n // v88 = .object(ofGroup: Array, withProperties: [\"length\", \"__proto__\", \"constructor\"], withMethods: [\"concat\", \"fill\", \"indexOf\", \"entries\", \"forEach\", \"find\", \"reverse\", \"slice\", \"flat\", \"reduce\", \"join\", \"findIndex\", \"reduceRight\", \"some\", \"copyWithin\", \"toString\", \"pop\", \"filter\", \"map\", \"splice\", \"keys\", \"unshift\", \"sort\", \"includes\", \"flatMap\", \"shift\", \"values\", \"every\", \"toLocaleString\", \"push\", \"lastIndexOf\"])\n function v89(v90,v91,v92) {\n }\n const v94 = [1337,1337,1337,1337];\n // v94 = .object(ofGroup: Array, withProperties: [\"length\", \"__proto__\", \"constructor\"], withMethods: [\"concat\", \"fill\", \"indexOf\", \"entries\", \"forEach\", \"find\", \"reverse\", \"slice\", \"flat\", \"reduce\", \"join\", \"findIndex\", \"reduceRight\", \"some\", \"copyWithin\", \"toString\", \"pop\", \"filter\", \"map\", \"splice\", \"keys\", \"unshift\", \"sort\", \"includes\", \"flatMap\", \"shift\", \"values\", \"every\", \"toLocaleString\", \"push\", \"lastIndexOf\"])\n const v95 = [3697200800,v88,v94];\n // v95 = .object(ofGroup: Array, withProperties: [\"length\", \"__proto__\", \"constructor\"], withMethods: [\"concat\", \"fill\", \"indexOf\", \"entries\", \"forEach\", \"find\", \"reverse\", \"slice\", \"flat\", \"reduce\", \"join\", \"findIndex\", \"reduceRight\", \"some\", \"copyWithin\", \"toString\", \"pop\", \"filter\", \"map\", \"splice\", \"keys\", \"unshift\", \"sort\", \"includes\", \"flatMap\", \"shift\", \"values\", \"every\", \"toLocaleString\", \"push\", \"lastIndexOf\"])\n function v96(v97,v98) {\n }\n const v99 = {__proto__:3697200800,constructor:1337,e:3697200800,length:13.37,toString:3697200800,d:v95};\n // v99 = .object(ofGroup: Object, withProperties: [\"toString\", \"length\", \"constructor\", \"__proto__\", \"e\", \"d\"])\n let v100 = 13.37;\n const v101 = typeof v74;\n // v101 = .string\n const v102 = \"symbol\";\n // v102 = .string + .object(ofGroup: String, withProperties: [\"constructor\", \"__proto__\", \"length\"], withMethods: [\"padEnd\", \"split\", \"charAt\", \"match\", \"lastIndexOf\", \"charCodeAt\", \"trim\", \"startsWith\", \"includes\", \"repeat\", \"search\", \"slice\", \"endsWith\", \"matchAll\", \"indexOf\", \"concat\", \"replace\", \"padStart\", \"substring\", \"codePointAt\"])\n const v103 = 3697200800;\n // v103 = .integer\n const v104 = \"2\";\n // v104 = .string + .object(ofGroup: String, withProperties: [\"constructor\", \"__proto__\", \"length\"], withMethods: [\"padEnd\", \"split\", \"charAt\", \"match\", \"lastIndexOf\", \"charCodeAt\", \"trim\", \"startsWith\", \"includes\", \"repeat\", \"search\", \"slice\", \"endsWith\", \"matchAll\", \"indexOf\", \"concat\", \"replace\", \"padStart\", \"substring\", \"codePointAt\"])\n const v105 = Boolean;\n // v105 = .object(ofGroup: BooleanConstructor, withProperties: [\"prototype\"]) + .function([.anything] => .boolean) + .constructor([.anything] => .boolean)\n const v106 = Function;\n // v106 = .constructor([.string] => .object(ofGroup: Function, withProperties: [\"constructor\", \"arguments\", \"__proto__\", \"name\", \"caller\", \"prototype\", \"length\"], withMethods: [\"call\", \"bind\", \"apply\"]) + .function([.anything...] => .unknown) + .constructor([.anything...] => .unknown))\n const v107 = 13.37;\n // v107 = .float\n const v108 = 1337;\n // v108 = .integer\n const v109 = \"2\";\n // v109 = .string + .object(ofGroup: String, withProperties: [\"constructor\", \"__proto__\", \"length\"], withMethods: [\"padEnd\", \"split\", \"charAt\", \"match\", \"lastIndexOf\", \"charCodeAt\", \"trim\", \"startsWith\", \"includes\", \"repeat\", \"search\", \"slice\", \"endsWith\", \"matchAll\", \"indexOf\", \"concat\", \"replace\", \"padStart\", \"substring\", \"codePointAt\"])\n const v110 = Function;\n // v110 = .constructor([.string] => .object(ofGroup: Function, withProperties: [\"constructor\", \"arguments\", \"__proto__\", \"name\", \"caller\", \"prototype\", \"length\"], withMethods: [\"call\", \"bind\", \"apply\"]) + .function([.anything...] => .unknown) + .constructor([.anything...] => .unknown))\n const v112 = [13.37,13.37,13.37,13.37];\n // v112 = .object(ofGroup: Array, withProperties: [\"length\", \"__proto__\", \"constructor\"], withMethods: [\"concat\", \"fill\", \"indexOf\", \"entries\", \"forEach\", \"find\", \"reverse\", \"slice\", \"flat\", \"reduce\", \"join\", \"findIndex\", \"reduceRight\", \"some\", \"copyWithin\", \"toString\", \"pop\", \"filter\", \"map\", \"splice\", \"keys\", \"unshift\", \"sort\", \"includes\", \"flatMap\", \"shift\", \"values\", \"every\", \"toLocaleString\", \"push\", \"lastIndexOf\"])\n const v113 = 1337;\n // v113 = .integer\n let v114 = 13.37;\n const v116 = {...3697200800,...3697200800};\n // v116 = .object(ofGroup: Object, withProperties: [\"__proto__\"])\n const v117 = Object;\n // v117 = .object(ofGroup: ObjectConstructor, withProperties: [\"prototype\"], withMethods: [\"setPrototypeOf\", \"assign\", \"fromEntries\", \"seal\", \"getOwnPropertyNames\", \"freeze\", \"defineProperty\", \"create\", \"getPrototypeOf\", \"getOwnPropertySymbols\", \"keys\", \"values\", \"isExtensible\", \"entries\", \"is\", \"getOwnPropertyDescriptor\", \"preventExtensions\", \"defineProperties\", \"getOwnPropertyDescriptors\", \"isSealed\", \"isFrozen\"]) + .function([.anything...] => .object()) + .constructor([.anything...] => .object())\n const v118 = Function;\n // v118 = .constructor([.string] => .object(ofGroup: Function, withProperties: [\"constructor\", \"arguments\", \"__proto__\", \"name\", \"caller\", \"prototype\", \"length\"], withMethods: [\"call\", \"bind\", \"apply\"]) + .function([.anything...] => .unknown) + .constructor([.anything...] => .unknown))\n const v119 = {};\n // v119 = .object(ofGroup: Object, withProperties: [\"__proto__\"])\n let v120 = v119;\n const v121 = (3697200800).constructor;\n // v121 = .unknown\n function v122(v123,v124) {\n }\n const v125 = Promise;\n // v125 = .object(ofGroup: PromiseConstructor, withProperties: [\"prototype\"], withMethods: [\"race\", \"allSettled\", \"reject\", \"all\", \"resolve\"]) + .constructor([.function()] => .object(ofGroup: Promise, withProperties: [\"__proto__\"], withMethods: [\"finally\", \"then\", \"catch\"]))\n const v128 = 4;\n // v128 = .integer\n let v129 = 0;\n const v131 = [13.37,13.37,13.37,13.37];\n // v131 = .object(ofGroup: Array, withProperties: [\"length\", \"__proto__\", \"constructor\"], withMethods: [\"concat\", \"fill\", \"indexOf\", \"entries\", \"forEach\", \"find\", \"reverse\", \"slice\", \"flat\", \"reduce\", \"join\", \"findIndex\", \"reduceRight\", \"some\", \"copyWithin\", \"toString\", \"pop\", \"filter\", \"map\", \"splice\", \"keys\", \"unshift\", \"sort\", \"includes\", \"flatMap\", \"shift\", \"values\", \"every\", \"toLocaleString\", \"push\", \"lastIndexOf\"])\n const v133 = [1337,1337,1337,1337];\n // v133 = .object(ofGroup: Array, withProperties: [\"length\", \"__proto__\", \"constructor\"], withMethods: [\"concat\", \"fill\", \"indexOf\", \"entries\", \"forEach\", \"find\", \"reverse\", \"slice\", \"flat\", \"reduce\", \"join\", \"findIndex\", \"reduceRight\", \"some\", \"copyWithin\", \"toString\", \"pop\", \"filter\", \"map\", \"splice\", \"keys\", \"unshift\", \"sort\", \"includes\", \"flatMap\", \"shift\", \"values\", \"every\", \"toLocaleString\", \"push\", \"lastIndexOf\"])\n const v134 = [3697200800,v131,v133];\n // v134 = .object(ofGroup: Array, withProperties: [\"length\", \"__proto__\", \"constructor\"], withMethods: [\"concat\", \"fill\", \"indexOf\", \"entries\", \"forEach\", \"find\", \"reverse\", \"slice\", \"flat\", \"reduce\", \"join\", \"findIndex\", \"reduceRight\", \"some\", \"copyWithin\", \"toString\", \"pop\", \"filter\", \"map\", \"splice\", \"keys\", \"unshift\", \"sort\", \"includes\", \"flatMap\", \"shift\", \"values\", \"every\", \"toLocaleString\", \"push\", \"lastIndexOf\"])\n const v135 = Object;\n // v135 = .object(ofGroup: ObjectConstructor, withProperties: [\"prototype\"], withMethods: [\"setPrototypeOf\", \"assign\", \"fromEntries\", \"seal\", \"getOwnPropertyNames\", \"freeze\", \"defineProperty\", \"create\", \"getPrototypeOf\", \"getOwnPropertySymbols\", \"keys\", \"values\", \"isExtensible\", \"entries\", \"is\", \"getOwnPropertyDescriptor\", \"preventExtensions\", \"defineProperties\", \"getOwnPropertyDescriptors\", \"isSealed\", \"isFrozen\"]) + .function([.anything...] => .object()) + .constructor([.anything...] => .object())\n const v136 = -944747134;\n // v136 = .integer\n const v139 = [13.37,13.37,13.37,13.37];\n // v139 = .object(ofGroup: Array, withProperties: [\"length\", \"__proto__\", \"constructor\"], withMethods: [\"concat\", \"fill\", \"indexOf\", \"entries\", \"forEach\", \"find\", \"reverse\", \"slice\", \"flat\", \"reduce\", \"join\", \"findIndex\", \"reduceRight\", \"some\", \"copyWithin\", \"toString\", \"pop\", \"filter\", \"map\", \"splice\", \"keys\", \"unshift\", \"sort\", \"includes\", \"flatMap\", \"shift\", \"values\", \"every\", \"toLocaleString\", \"push\", \"lastIndexOf\"])\n const v141 = [1337,1337,1337,1337];\n // v141 = .object(ofGroup: Array, withProperties: [\"length\", \"__proto__\", \"constructor\"], withMethods: [\"concat\", \"fill\", \"indexOf\", \"entries\", \"forEach\", \"find\", \"reverse\", \"slice\", \"flat\", \"reduce\", \"join\", \"findIndex\", \"reduceRight\", \"some\", \"copyWithin\", \"toString\", \"pop\", \"filter\", \"map\", \"splice\", \"keys\", \"unshift\", \"sort\", \"includes\", \"flatMap\", \"shift\", \"values\", \"every\", \"toLocaleString\", \"push\", \"lastIndexOf\"])\n const v142 = [3697200800,v139,v141];\n // v142 = .object(ofGroup: Array, withProperties: [\"length\", \"__proto__\", \"constructor\"], withMethods: [\"concat\", \"fill\", \"indexOf\", \"entries\", \"forEach\", \"find\", \"reverse\", \"slice\", \"flat\", \"reduce\", \"join\", \"findIndex\", \"reduceRight\", \"some\", \"copyWithin\", \"toString\", \"pop\", \"filter\", \"map\", \"splice\", \"keys\", \"unshift\", \"sort\", \"includes\", \"flatMap\", \"shift\", \"values\", \"every\", \"toLocaleString\", \"push\", \"lastIndexOf\"])\n const v143 = {__proto__:3697200800,constructor:1337,e:3697200800,length:13.37,toString:3697200800,valueOf:v142};\n // v143 = .object(ofGroup: Object, withProperties: [\"toString\", \"constructor\", \"e\", \"__proto__\", \"valueOf\", \"length\"])\n let v144 = v143;\n const v145 = gc;\n // v145 = .function([] => .undefined)\n let v146 = 13.37;\n const v150 = [13.37,13.37,13.37,Function];\n // v150 = .object(ofGroup: Array, withProperties: [\"length\", \"__proto__\", \"constructor\"], withMethods: [\"concat\", \"fill\", \"indexOf\", \"entries\", \"forEach\", \"find\", \"reverse\", \"slice\", \"flat\", \"reduce\", \"join\", \"findIndex\", \"reduceRight\", \"some\", \"copyWithin\", \"toString\", \"pop\", \"filter\", \"map\", \"splice\", \"keys\", \"unshift\", \"sort\", \"includes\", \"flatMap\", \"shift\", \"values\", \"every\", \"toLocaleString\", \"push\", \"lastIndexOf\"])\n const v152 = [1337,1337,1337,1337];\n // v152 = .object(ofGroup: Array, withProperties: [\"length\", \"__proto__\", \"constructor\"], withMethods: [\"concat\", \"fill\", \"indexOf\", \"entries\", \"forEach\", \"find\", \"reverse\", \"slice\", \"flat\", \"reduce\", \"join\", \"findIndex\", \"reduceRight\", \"some\", \"copyWithin\", \"toString\", \"pop\", \"filter\", \"map\", \"splice\", \"keys\", \"unshift\", \"sort\", \"includes\", \"flatMap\", \"shift\", \"values\", \"every\", \"toLocaleString\", \"push\", \"lastIndexOf\"])\n const v153 = [3697200800,v150,v152];\n // v153 = .object(ofGroup: Array, withProperties: [\"length\", \"__proto__\", \"constructor\"], withMethods: [\"concat\", \"fill\", \"indexOf\", \"entries\", \"forEach\", \"find\", \"reverse\", \"slice\", \"flat\", \"reduce\", \"join\", \"findIndex\", \"reduceRight\", \"some\", \"copyWithin\", \"toString\", \"pop\", \"filter\", \"map\", \"splice\", \"keys\", \"unshift\", \"sort\", \"includes\", \"flatMap\", \"shift\", \"values\", \"every\", \"toLocaleString\", \"push\", \"lastIndexOf\"])\n const v154 = v153 + 1;\n // v154 = .primitive\n let v155 = 0;\n const v156 = v155 + 1;\n // v156 = .primitive\n const v158 = \"2\";\n // v158 = .string + .object(ofGroup: String, withProperties: [\"constructor\", \"__proto__\", \"length\"], withMethods: [\"padEnd\", \"split\", \"charAt\", \"match\", \"lastIndexOf\", \"charCodeAt\", \"trim\", \"startsWith\", \"includes\", \"repeat\", \"search\", \"slice\", \"endsWith\", \"matchAll\", \"indexOf\", \"concat\", \"replace\", \"padStart\", \"substring\", \"codePointAt\"])\n const v160 = [13.37,13.37,13.37,13.37];\n // v160 = .object(ofGroup: Array, withProperties: [\"length\", \"__proto__\", \"constructor\"], withMethods: [\"concat\", \"fill\", \"indexOf\", \"entries\", \"forEach\", \"find\", \"reverse\", \"slice\", \"flat\", \"reduce\", \"join\", \"findIndex\", \"reduceRight\", \"some\", \"copyWithin\", \"toString\", \"pop\", \"filter\", \"map\", \"splice\", \"keys\", \"unshift\", \"sort\", \"includes\", \"flatMap\", \"shift\", \"values\", \"every\", \"toLocaleString\", \"push\", \"lastIndexOf\"])\n const v162 = 0;\n // v162 = .integer\n const v163 = [1337,1337,1337,1337];\n // v163 = .object(ofGroup: Array, withProperties: [\"length\", \"__proto__\", \"constructor\"], withMethods: [\"concat\", \"fill\", \"indexOf\", \"entries\", \"forEach\", \"find\", \"reverse\", \"slice\", \"flat\", \"reduce\", \"join\", \"findIndex\", \"reduceRight\", \"some\", \"copyWithin\", \"toString\", \"pop\", \"filter\", \"map\", \"splice\", \"keys\", \"unshift\", \"sort\", \"includes\", \"flatMap\", \"shift\", \"values\", \"every\", \"toLocaleString\", \"push\", \"lastIndexOf\"])\n const v164 = [3697200800,1337,v163];\n // v164 = .object(ofGroup: Array, withProperties: [\"length\", \"__proto__\", \"constructor\"], withMethods: [\"concat\", \"fill\", \"indexOf\", \"entries\", \"forEach\", \"find\", \"reverse\", \"slice\", \"flat\", \"reduce\", \"join\", \"findIndex\", \"reduceRight\", \"some\", \"copyWithin\", \"toString\", \"pop\", \"filter\", \"map\", \"splice\", \"keys\", \"unshift\", \"sort\", \"includes\", \"flatMap\", \"shift\", \"values\", \"every\", \"toLocaleString\", \"push\", \"lastIndexOf\"])\n const v166 = 1337;\n // v166 = .integer\n let v167 = 2594067260;\n const v169 = 4;\n // v169 = .integer\n let v170 = 0;\n const v171 = v167 + 1;\n // v171 = .primitive\n const v172 = {__proto__:3697200800,constructor:v163,e:3697200800,length:13.37,toString:3697200800,valueOf:v164};\n // v172 = .object(ofGroup: Object, withProperties: [\"e\", \"__proto__\", \"constructor\", \"valueOf\", \"length\", \"toString\"])\n const v173 = 0;\n // v173 = .integer\n const v174 = 5;\n // v174 = .integer\n const v175 = 2937513072;\n // v175 = .integer\n const v176 = Object;\n // v176 = .object(ofGroup: ObjectConstructor, withProperties: [\"prototype\"], withMethods: [\"setPrototypeOf\", \"assign\", \"fromEntries\", \"seal\", \"getOwnPropertyNames\", \"freeze\", \"defineProperty\", \"create\", \"getPrototypeOf\", \"getOwnPropertySymbols\", \"keys\", \"values\", \"isExtensible\", \"entries\", \"is\", \"getOwnPropertyDescriptor\", \"preventExtensions\", \"defineProperties\", \"getOwnPropertyDescriptors\", \"isSealed\", \"isFrozen\"]) + .function([.anything...] => .object()) + .constructor([.anything...] => .object())\n const v177 = v172.constructor;\n // v177 = .unknown\n const v178 = 0;\n // v178 = .integer\n const v179 = 1;\n // v179 = .integer\n try {\n } catch(v180) {\n const v182 = [13.37,13.37,13.37,13.37];\n // v182 = .object(ofGroup: Array, withProperties: [\"length\", \"__proto__\", \"constructor\"], withMethods: [\"concat\", \"fill\", \"indexOf\", \"entries\", \"forEach\", \"find\", \"reverse\", \"slice\", \"flat\", \"reduce\", \"join\", \"findIndex\", \"reduceRight\", \"some\", \"copyWithin\", \"toString\", \"pop\", \"filter\", \"map\", \"splice\", \"keys\", \"unshift\", \"sort\", \"includes\", \"flatMap\", \"shift\", \"values\", \"every\", \"toLocaleString\", \"push\", \"lastIndexOf\"])\n const v183 = v182.__proto__;\n // v183 = .object()\n function v185(v186) {\n }\n const v187 = Object >>> v183;\n // v187 = .integer | .bigint\n }\n function v188(v189,v190,v191,v192,...v193) {\n }\n}", "transient private internal function m185() {}", "test_doNotRetainAnno(){\n let translator = new Translator();\n translator.registerPackage(PackageFile);\n let text = JSON.stringify(this.json.doNotRetainAnno);\n let object1 = translator.decode(text).getRoot();\n let object2 = translator.decode(text).getRoot();\n\n Assert.equals(\"ca.frar.jjjrmi.translator.testclasses.DoNotRetainAnno\", object1.constructor.__getClass());\n Assert.equals(\"ca.frar.jjjrmi.translator.testclasses.DoNotRetainAnno\", object2.constructor.__getClass());\n Assert.notEquals(object1, object2);\n }", "function rekognizeLabels(bucket, key) {\n let params = {\n Image: {\n S3Object: {\n Bucket: bucket,\n Name: key\n }\n },\n MaxLabels: 3,\n MinConfidence: 80\n };\n\n return rekognition.detectLabels(params).promise()\n}", "function OOPExample(who) {\n this.me = who;\n}", "function LK_likeIt(elem) {\n var likeGroup = elem.getAttribute(LK_LIKEGROUP);\n var likeValue = elem.getAttribute(LK_LIKEVALUE);\n localStorage[likeGroup] = likeValue;\n\n // Change the style of the liker nodes\n var siblings = elem.parentNode.childNodes;\n for (var i = 0; i < siblings.length; i++) {\n if (siblings[i].style) { \n LK_applyNormalStyle(siblings[i]);\n }\n }\n LK_applySelectedStyle(elem, likeValue);\n\n // Change the value of any mini likers\n var allSpans = document.getElementsByTagName('span');\n for (var i = 0; i < allSpans.length; i++) {\n var span = allSpans[i];\n if (span.getAttribute(LK_LIKEGROUP) == likeGroup) {\n if (span.getAttribute(LK_LIKETYPE) == 'mini') {\n span.innerHTML = LK_MAPPINGS[likeValue].label;\n LK_applySelectedStyle(allSpans[i], likeValue);\n }\n }\n }\n}", "function _isAlternativeRecognitionResult(obj) {\r\n return obj && typeof obj === 'object';\r\n}", "getLikes(state, data) {\n state.likes = data\n }", "function LiteralObject() {\r\n}", "function addLikes() {\n if (propLike?.includes(user.username)) {\n let index = propLike.indexOf(user.username);\n let removeLike = [\n ...propLike.slice(0, index),\n ...propLike.slice(index + 1),\n ];\n setLikeGet(removeLike);\n setPropLike(removeLike);\n setRedLike(\"\");\n\n addToLike(eventid, removeLike);\n } else {\n let likesArr = [...propLike, `${user.username}`];\n\n setLikeGet(likesArr);\n setPropLike(likesArr);\n setRedLike(\"red\");\n addToLike(eventid, likesArr);\n }\n }", "function Komunalne() {}", "function Bevy() {}", "function Prediction() {\n this.score = {};\n}", "function Object() {}", "function Object() {}", "function canEnumPub(obj, name) {\n if (obj === null) { return false; }\n if (obj === void 0) { return false; }\n name = String(name);\n if (obj[name + '_canEnum___']) { return true; }\n if (endsWith__.test(name)) { return false; }\n if (!isJSONContainer(obj)) { return false; }\n if (!myOriginalHOP.call(obj, name)) { return false; }\n fastpathEnum(obj, name);\n if (name === 'toString') { return true; }\n fastpathRead(obj, name);\n return true;\n }", "function Obj(){ return Literal.apply(this,arguments) }", "test_primitives() {\n let translator = new Translator();\n translator.registerPackage(PackageFile);\n let text = JSON.stringify(this.json.primitives);\n let object = translator.decode(text).getRoot();\n Assert.equals(\"ca.frar.jjjrmi.translator.testclasses.Primitives\", object.constructor.__getClass());\n Assert.equals(\"alpha9\", object.string);\n }", "function hello()\n{\n /* ATTRIBUTES */\n this.coolbeans = 'class';\n this.something = 'hello-class';\n\n}", "function test_cluster_tagged_crosshair_op_vsphere65() {}", "function classifyVideo() {\n classifier.classify(gotResult);\n}", "function classifyVideo() {\n classifier.classify(gotResult);\n}", "function v8(v9,v10) {\n const v16 = [1337,1337];\n // v16 = .object(ofGroup: Array, withProperties: [\"length\", \"__proto__\", \"constructor\"], withMethods: [\"concat\", \"fill\", \"indexOf\", \"entries\", \"forEach\", \"find\", \"reverse\", \"slice\", \"flat\", \"reduce\", \"join\", \"findIndex\", \"reduceRight\", \"some\", \"copyWithin\", \"toString\", \"pop\", \"filter\", \"map\", \"splice\", \"keys\", \"unshift\", \"sort\", \"includes\", \"flatMap\", \"shift\", \"values\", \"every\", \"toLocaleString\", \"push\", \"lastIndexOf\"])\n const v17 = [\"536870912\",-3848843708,v16,-3848843708,1337,13.37,13.37,WeakMap,-3848843708];\n // v17 = .object(ofGroup: Array, withProperties: [\"length\", \"__proto__\", \"constructor\"], withMethods: [\"concat\", \"fill\", \"indexOf\", \"entries\", \"forEach\", \"find\", \"reverse\", \"slice\", \"flat\", \"reduce\", \"join\", \"findIndex\", \"reduceRight\", \"some\", \"copyWithin\", \"toString\", \"pop\", \"filter\", \"map\", \"splice\", \"keys\", \"unshift\", \"sort\", \"includes\", \"flatMap\", \"shift\", \"values\", \"every\", \"toLocaleString\", \"push\", \"lastIndexOf\"])\n const v18 = {constructor:13.37,e:v16};\n // v18 = .object(ofGroup: Object, withProperties: [\"constructor\", \"e\", \"__proto__\"])\n const v19 = {__proto__:-3848843708,a:v18,b:-3848843708,constructor:1337,d:v18,e:v17,length:WeakMap};\n // v19 = .object(ofGroup: Object, withProperties: [\"d\", \"b\", \"a\", \"__proto__\", \"e\", \"constructor\", \"length\"])\n const v21 = new Float64Array(v19);\n // v21 = .object(ofGroup: Float64Array, withProperties: [\"byteOffset\", \"constructor\", \"buffer\", \"__proto__\", \"byteLength\", \"length\"], withMethods: [\"map\", \"values\", \"subarray\", \"find\", \"fill\", \"set\", \"findIndex\", \"some\", \"reduceRight\", \"reverse\", \"join\", \"includes\", \"entries\", \"reduce\", \"every\", \"copyWithin\", \"sort\", \"forEach\", \"lastIndexOf\", \"indexOf\", \"filter\", \"slice\", \"keys\"])\n v6[6] = v7;\n v7.toString = v9;\n }", "constructor(papa,mummy,sivlings,belongs,loving_bro,favs_bro){\n super(papa,mummy,sivlings,belongs)\n this.loving_bro=loving_bro\n this.favs_bro=favs_bro\n }", "function defineInspect(classObject) {\n var fn = classObject.prototype.toJSON;\n typeof fn === 'function' || invariant(0);\n classObject.prototype.inspect = fn; // istanbul ignore else (See: 'https://github.com/graphql/graphql-js/issues/2317')\n\n if (nodejsCustomInspectSymbol[\"a\" /* default */]) {\n classObject.prototype[nodejsCustomInspectSymbol[\"a\" /* default */]] = fn;\n }\n}", "annotate(message: string, data: Object) {\n this.message = message;\n this.data = assign(this.data, data);\n }", "function encodeObject(o) {\n if (_.isNumber(o)) {\n if (_.isNaN(o)) {\n return ['SPECIAL_FLOAT', 'NaN'];\n } else if (o === Infinity) {\n return ['SPECIAL_FLOAT', 'Infinity'];\n } else if (o === -Infinity) {\n return ['SPECIAL_FLOAT', '-Infinity'];\n } else {\n return o;\n }\n } else if (_.isString(o)) {\n return o;\n } else if (_.isBoolean(o) || _.isNull(o) || _.isUndefined(o)) {\n return ['JS_SPECIAL_VAL', String(o)];\n } else if (typeof o === 'symbol') {\n // ES6 symbol\n return ['JS_SPECIAL_VAL', String(o)];\n } else {\n // render these as heap objects\n\n // very important to use _.has since we don't want to\n // grab the property in your prototype, only in YOURSELF ... SUBTLE!\n if (!_.has(o, 'smallObjId_hidden_')) {\n // make this non-enumerable so that it doesn't show up in\n // console.log() or other inspector functions\n Object.defineProperty(o, 'smallObjId_hidden_', { value: smallObjId,\n enumerable: false });\n smallObjId++;\n }\n assert(o.smallObjId_hidden_ > 0);\n\n var ret = ['REF', o.smallObjId_hidden_];\n\n if (encodedHeapObjects[String(o.smallObjId_hidden_)] !== undefined) {\n return ret;\n }\n else {\n assert(_.isObject(o));\n\n var newEncodedObj = [];\n encodedHeapObjects[String(o.smallObjId_hidden_)] = newEncodedObj;\n\n var i;\n\n if (_.isFunction(o)) {\n var funcProperties = []; // each element is a pair of [name, encoded value]\n\n var encodedProto = null;\n if (_.isObject(o.prototype)) {\n // TRICKY TRICKY! for inheritance to be displayed properly, we\n // want to find the prototype of o.prototype and see if it's\n // non-empty. if that's true, then even if o.prototype is\n // empty (i.e., has no properties of its own), then we should\n // still encode it since its 'prototype' \"uber-hidden\n // property\" is non-empty\n var prototypeOfPrototype = Object.getPrototypeOf(o.prototype);\n if (!_.isEmpty(o.prototype) ||\n (_.isObject(prototypeOfPrototype) && !_.isEmpty(prototypeOfPrototype))) {\n encodedProto = encodeObject(o.prototype);\n }\n }\n\n if (encodedProto) {\n funcProperties.push(['prototype', encodedProto]);\n }\n\n // now get all of the normal properties out of this function\n // object (it's unusual to put properties in a function object,\n // but it's still legal!)\n var funcPropPairs = _.pairs(o);\n for (i = 0; i < funcPropPairs.length; i++) {\n funcProperties.push([funcPropPairs[i][0], encodeObject(funcPropPairs[i][1])]);\n }\n\n var funcCodeString = o.toString();\n\n /*\n\n #craftsmanship -- make nested functions look better by indenting\n the first line of a nested function definition by however much\n the LAST line is indented, ONLY if the last line is simply a\n single ending '}'. otherwise it will look ugly since the\n function definition doesn't start out indented, like so:\n\nfunction bar(x) {\n globalZ += 100;\n return x + y + globalZ;\n }\n\n */\n var codeLines = funcCodeString.split('\\n');\n if (codeLines.length > 1) {\n var lastLine = _.last(codeLines);\n if (lastLine.trim() === '}') {\n var lastLinePrefix = lastLine.slice(0, lastLine.indexOf('}'));\n funcCodeString = lastLinePrefix + funcCodeString; // prepend!\n }\n }\n\n newEncodedObj.push('JS_FUNCTION',\n o.name,\n funcCodeString, /* code string*/\n funcProperties.length ? funcProperties : null, /* OPTIONAL */\n null /* parent frame */);\n } else if (_.isArray(o)) {\n newEncodedObj.push('LIST');\n for (i = 0; i < o.length; i++) {\n newEncodedObj.push(encodeObject(o[i]));\n }\n } else if (o.__proto__.toString() === canonicalSet.__proto__.toString()) { // dunno why 'instanceof' doesn't work :(\n newEncodedObj.push('SET');\n // ES6 Set (TODO: add WeakSet)\n for (let item of o) {\n newEncodedObj.push(encodeObject(item));\n }\n } else if (o.__proto__.toString() === canonicalMap.__proto__.toString()) { // dunno why 'instanceof' doesn't work :(\n // ES6 Map (TODO: add WeakMap)\n newEncodedObj.push('DICT'); // use the Python 'DICT' type since it's close enough; adjust display in frontend\n for (let [key, value] of o) {\n newEncodedObj.push([encodeObject(key), encodeObject(value)]);\n }\n } else {\n // a true object\n\n // if there's a custom toString() function (note that a truly\n // prototypeless object won't have toString method, so check first to\n // see if toString is *anywhere* up the prototype chain)\n var s = (o.toString !== undefined) ? o.toString() : '';\n if (s !== '' && s !== '[object Object]') {\n newEncodedObj.push('INSTANCE_PPRINT', 'object', s);\n } else {\n newEncodedObj.push('INSTANCE', '');\n var pairs = _.pairs(o);\n for (i = 0; i < pairs.length; i++) {\n var e = pairs[i];\n newEncodedObj.push([encodeObject(e[0]), encodeObject(e[1])]);\n }\n\n var proto = Object.getPrototypeOf(o);\n if (_.isObject(proto) && !_.isEmpty(proto)) {\n //log('obj.prototype', proto, proto.smallObjId_hidden_);\n // I think __proto__ is the official term for this field,\n // *not* 'prototype'\n newEncodedObj.push(['__proto__', encodeObject(proto)]);\n }\n }\n }\n\n return ret;\n }\n\n }\n assert(false);\n}", "function dist_index_esm_contains(obj,key){return Object.prototype.hasOwnProperty.call(obj,key);}", "function isRawPostcodeObject(o, additionalAttr, blackListedAttr) {\n\tif (!additionalAttr) additionalAttr = [];\n\tif (!blackListedAttr) blackListedAttr = [];\n\tisSomeObject(o, rawPostcodeAttributes, additionalAttr, blackListedAttr);\n}", "function _meta_(v,m){var ms=v['__meta__']||{};for(var k in m){ms[k]=m[k]};v['__meta__']=ms;return v}", "function Animal() {\n this.kind = \"Dog\"\n}", "function Kitten(name, photo, interests, isGoodWithKids, isGoodWithDogs, isGoodWithCats) {\n this.name = name;\n this.photo = photo;\n this.interests = interests;\n this.isGoodWithKids = isGoodWithKids;\n this.isGoodWithCats = isGoodWithCats;\n this.isGoodWithDogs = isGoodWithDogs;\n}", "getMeta () {\n }", "function np(e){return\"[object Object]\"===Object.prototype.toString.call(e)}", "function Obj() {}", "function test_fail_hole_prototype() {\n var obj = Object.create({ stuff: \"in prototype\" });\n obj.foo = \"bar\";\n\n function f1() {\n bidar.serialize(obj);\n }\n assert.throws(f1, /Hole-ful graph, but no hole filter/);\n}", "function Person(saying) {\n this.saying = saying;\n /*\n return {\n dumbObject: true\n }\n */\n}", "function isFriend(name, object) {\n//use hasWord function to check object names array\n// console.log(object);\n// console.log(name);\n//conditional to check for property\nif (object['friends'] !== undefined) {\nreturn hasWord(object.friends.join(' '), name);\n}\nelse {return false};\n \n}", "transient private protected internal function m182() {}", "function kotlin(hljs) {\n const KEYWORDS = {\n keyword:\n 'abstract as val var vararg get set class object open private protected public noinline ' +\n 'crossinline dynamic final enum if else do while for when throw try catch finally ' +\n 'import package is in fun override companion reified inline lateinit init ' +\n 'interface annotation data sealed internal infix operator out by constructor super ' +\n 'tailrec where const inner suspend typealias external expect actual',\n built_in:\n 'Byte Short Char Int Long Boolean Float Double Void Unit Nothing',\n literal:\n 'true false null'\n };\n const KEYWORDS_WITH_LABEL = {\n className: 'keyword',\n begin: /\\b(break|continue|return|this)\\b/,\n starts: {\n contains: [\n {\n className: 'symbol',\n begin: /@\\w+/\n }\n ]\n }\n };\n const LABEL = {\n className: 'symbol',\n begin: hljs.UNDERSCORE_IDENT_RE + '@'\n };\n\n // for string templates\n const SUBST = {\n className: 'subst',\n begin: /\\$\\{/,\n end: /\\}/,\n contains: [ hljs.C_NUMBER_MODE ]\n };\n const VARIABLE = {\n className: 'variable',\n begin: '\\\\$' + hljs.UNDERSCORE_IDENT_RE\n };\n const STRING = {\n className: 'string',\n variants: [\n {\n begin: '\"\"\"',\n end: '\"\"\"(?=[^\"])',\n contains: [\n VARIABLE,\n SUBST\n ]\n },\n // Can't use built-in modes easily, as we want to use STRING in the meta\n // context as 'meta-string' and there's no syntax to remove explicitly set\n // classNames in built-in modes.\n {\n begin: '\\'',\n end: '\\'',\n illegal: /\\n/,\n contains: [ hljs.BACKSLASH_ESCAPE ]\n },\n {\n begin: '\"',\n end: '\"',\n illegal: /\\n/,\n contains: [\n hljs.BACKSLASH_ESCAPE,\n VARIABLE,\n SUBST\n ]\n }\n ]\n };\n SUBST.contains.push(STRING);\n\n const ANNOTATION_USE_SITE = {\n className: 'meta',\n begin: '@(?:file|property|field|get|set|receiver|param|setparam|delegate)\\\\s*:(?:\\\\s*' + hljs.UNDERSCORE_IDENT_RE + ')?'\n };\n const ANNOTATION = {\n className: 'meta',\n begin: '@' + hljs.UNDERSCORE_IDENT_RE,\n contains: [\n {\n begin: /\\(/,\n end: /\\)/,\n contains: [\n hljs.inherit(STRING, {\n className: 'meta-string'\n })\n ]\n }\n ]\n };\n\n // https://kotlinlang.org/docs/reference/whatsnew11.html#underscores-in-numeric-literals\n // According to the doc above, the number mode of kotlin is the same as java 8,\n // so the code below is copied from java.js\n const KOTLIN_NUMBER_MODE = NUMERIC;\n const KOTLIN_NESTED_COMMENT = hljs.COMMENT(\n '/\\\\*', '\\\\*/',\n {\n contains: [ hljs.C_BLOCK_COMMENT_MODE ]\n }\n );\n const KOTLIN_PAREN_TYPE = {\n variants: [\n {\n className: 'type',\n begin: hljs.UNDERSCORE_IDENT_RE\n },\n {\n begin: /\\(/,\n end: /\\)/,\n contains: [] // defined later\n }\n ]\n };\n const KOTLIN_PAREN_TYPE2 = KOTLIN_PAREN_TYPE;\n KOTLIN_PAREN_TYPE2.variants[1].contains = [ KOTLIN_PAREN_TYPE ];\n KOTLIN_PAREN_TYPE.variants[1].contains = [ KOTLIN_PAREN_TYPE2 ];\n\n return {\n name: 'Kotlin',\n aliases: [ 'kt' ],\n keywords: KEYWORDS,\n contains: [\n hljs.COMMENT(\n '/\\\\*\\\\*',\n '\\\\*/',\n {\n relevance: 0,\n contains: [\n {\n className: 'doctag',\n begin: '@[A-Za-z]+'\n }\n ]\n }\n ),\n hljs.C_LINE_COMMENT_MODE,\n KOTLIN_NESTED_COMMENT,\n KEYWORDS_WITH_LABEL,\n LABEL,\n ANNOTATION_USE_SITE,\n ANNOTATION,\n {\n className: 'function',\n beginKeywords: 'fun',\n end: '[(]|$',\n returnBegin: true,\n excludeEnd: true,\n keywords: KEYWORDS,\n relevance: 5,\n contains: [\n {\n begin: hljs.UNDERSCORE_IDENT_RE + '\\\\s*\\\\(',\n returnBegin: true,\n relevance: 0,\n contains: [ hljs.UNDERSCORE_TITLE_MODE ]\n },\n {\n className: 'type',\n begin: /</,\n end: />/,\n keywords: 'reified',\n relevance: 0\n },\n {\n className: 'params',\n begin: /\\(/,\n end: /\\)/,\n endsParent: true,\n keywords: KEYWORDS,\n relevance: 0,\n contains: [\n {\n begin: /:/,\n end: /[=,\\/]/,\n endsWithParent: true,\n contains: [\n KOTLIN_PAREN_TYPE,\n hljs.C_LINE_COMMENT_MODE,\n KOTLIN_NESTED_COMMENT\n ],\n relevance: 0\n },\n hljs.C_LINE_COMMENT_MODE,\n KOTLIN_NESTED_COMMENT,\n ANNOTATION_USE_SITE,\n ANNOTATION,\n STRING,\n hljs.C_NUMBER_MODE\n ]\n },\n KOTLIN_NESTED_COMMENT\n ]\n },\n {\n className: 'class',\n beginKeywords: 'class interface trait', // remove 'trait' when removed from KEYWORDS\n end: /[:\\{(]|$/,\n excludeEnd: true,\n illegal: 'extends implements',\n contains: [\n {\n beginKeywords: 'public protected internal private constructor'\n },\n hljs.UNDERSCORE_TITLE_MODE,\n {\n className: 'type',\n begin: /</,\n end: />/,\n excludeBegin: true,\n excludeEnd: true,\n relevance: 0\n },\n {\n className: 'type',\n begin: /[,:]\\s*/,\n end: /[<\\(,]|$/,\n excludeBegin: true,\n returnEnd: true\n },\n ANNOTATION_USE_SITE,\n ANNOTATION\n ]\n },\n STRING,\n {\n className: 'meta',\n begin: \"^#!/usr/bin/env\",\n end: '$',\n illegal: '\\n'\n },\n KOTLIN_NUMBER_MODE\n ]\n };\n}", "function kotlin(hljs) {\n const KEYWORDS = {\n keyword:\n 'abstract as val var vararg get set class object open private protected public noinline ' +\n 'crossinline dynamic final enum if else do while for when throw try catch finally ' +\n 'import package is in fun override companion reified inline lateinit init ' +\n 'interface annotation data sealed internal infix operator out by constructor super ' +\n 'tailrec where const inner suspend typealias external expect actual',\n built_in:\n 'Byte Short Char Int Long Boolean Float Double Void Unit Nothing',\n literal:\n 'true false null'\n };\n const KEYWORDS_WITH_LABEL = {\n className: 'keyword',\n begin: /\\b(break|continue|return|this)\\b/,\n starts: {\n contains: [\n {\n className: 'symbol',\n begin: /@\\w+/\n }\n ]\n }\n };\n const LABEL = {\n className: 'symbol',\n begin: hljs.UNDERSCORE_IDENT_RE + '@'\n };\n\n // for string templates\n const SUBST = {\n className: 'subst',\n begin: /\\$\\{/,\n end: /\\}/,\n contains: [ hljs.C_NUMBER_MODE ]\n };\n const VARIABLE = {\n className: 'variable',\n begin: '\\\\$' + hljs.UNDERSCORE_IDENT_RE\n };\n const STRING = {\n className: 'string',\n variants: [\n {\n begin: '\"\"\"',\n end: '\"\"\"(?=[^\"])',\n contains: [\n VARIABLE,\n SUBST\n ]\n },\n // Can't use built-in modes easily, as we want to use STRING in the meta\n // context as 'meta-string' and there's no syntax to remove explicitly set\n // classNames in built-in modes.\n {\n begin: '\\'',\n end: '\\'',\n illegal: /\\n/,\n contains: [ hljs.BACKSLASH_ESCAPE ]\n },\n {\n begin: '\"',\n end: '\"',\n illegal: /\\n/,\n contains: [\n hljs.BACKSLASH_ESCAPE,\n VARIABLE,\n SUBST\n ]\n }\n ]\n };\n SUBST.contains.push(STRING);\n\n const ANNOTATION_USE_SITE = {\n className: 'meta',\n begin: '@(?:file|property|field|get|set|receiver|param|setparam|delegate)\\\\s*:(?:\\\\s*' + hljs.UNDERSCORE_IDENT_RE + ')?'\n };\n const ANNOTATION = {\n className: 'meta',\n begin: '@' + hljs.UNDERSCORE_IDENT_RE,\n contains: [\n {\n begin: /\\(/,\n end: /\\)/,\n contains: [\n hljs.inherit(STRING, {\n className: 'meta-string'\n })\n ]\n }\n ]\n };\n\n // https://kotlinlang.org/docs/reference/whatsnew11.html#underscores-in-numeric-literals\n // According to the doc above, the number mode of kotlin is the same as java 8,\n // so the code below is copied from java.js\n const KOTLIN_NUMBER_MODE = NUMERIC;\n const KOTLIN_NESTED_COMMENT = hljs.COMMENT(\n '/\\\\*', '\\\\*/',\n {\n contains: [ hljs.C_BLOCK_COMMENT_MODE ]\n }\n );\n const KOTLIN_PAREN_TYPE = {\n variants: [\n {\n className: 'type',\n begin: hljs.UNDERSCORE_IDENT_RE\n },\n {\n begin: /\\(/,\n end: /\\)/,\n contains: [] // defined later\n }\n ]\n };\n const KOTLIN_PAREN_TYPE2 = KOTLIN_PAREN_TYPE;\n KOTLIN_PAREN_TYPE2.variants[1].contains = [ KOTLIN_PAREN_TYPE ];\n KOTLIN_PAREN_TYPE.variants[1].contains = [ KOTLIN_PAREN_TYPE2 ];\n\n return {\n name: 'Kotlin',\n aliases: [ 'kt' ],\n keywords: KEYWORDS,\n contains: [\n hljs.COMMENT(\n '/\\\\*\\\\*',\n '\\\\*/',\n {\n relevance: 0,\n contains: [\n {\n className: 'doctag',\n begin: '@[A-Za-z]+'\n }\n ]\n }\n ),\n hljs.C_LINE_COMMENT_MODE,\n KOTLIN_NESTED_COMMENT,\n KEYWORDS_WITH_LABEL,\n LABEL,\n ANNOTATION_USE_SITE,\n ANNOTATION,\n {\n className: 'function',\n beginKeywords: 'fun',\n end: '[(]|$',\n returnBegin: true,\n excludeEnd: true,\n keywords: KEYWORDS,\n relevance: 5,\n contains: [\n {\n begin: hljs.UNDERSCORE_IDENT_RE + '\\\\s*\\\\(',\n returnBegin: true,\n relevance: 0,\n contains: [ hljs.UNDERSCORE_TITLE_MODE ]\n },\n {\n className: 'type',\n begin: /</,\n end: />/,\n keywords: 'reified',\n relevance: 0\n },\n {\n className: 'params',\n begin: /\\(/,\n end: /\\)/,\n endsParent: true,\n keywords: KEYWORDS,\n relevance: 0,\n contains: [\n {\n begin: /:/,\n end: /[=,\\/]/,\n endsWithParent: true,\n contains: [\n KOTLIN_PAREN_TYPE,\n hljs.C_LINE_COMMENT_MODE,\n KOTLIN_NESTED_COMMENT\n ],\n relevance: 0\n },\n hljs.C_LINE_COMMENT_MODE,\n KOTLIN_NESTED_COMMENT,\n ANNOTATION_USE_SITE,\n ANNOTATION,\n STRING,\n hljs.C_NUMBER_MODE\n ]\n },\n KOTLIN_NESTED_COMMENT\n ]\n },\n {\n className: 'class',\n beginKeywords: 'class interface trait', // remove 'trait' when removed from KEYWORDS\n end: /[:\\{(]|$/,\n excludeEnd: true,\n illegal: 'extends implements',\n contains: [\n {\n beginKeywords: 'public protected internal private constructor'\n },\n hljs.UNDERSCORE_TITLE_MODE,\n {\n className: 'type',\n begin: /</,\n end: />/,\n excludeBegin: true,\n excludeEnd: true,\n relevance: 0\n },\n {\n className: 'type',\n begin: /[,:]\\s*/,\n end: /[<\\(,]|$/,\n excludeBegin: true,\n returnEnd: true\n },\n ANNOTATION_USE_SITE,\n ANNOTATION\n ]\n },\n STRING,\n {\n className: 'meta',\n begin: \"^#!/usr/bin/env\",\n end: '$',\n illegal: '\\n'\n },\n KOTLIN_NUMBER_MODE\n ]\n };\n}", "static serialize(obj, allowPrimitives, fallbackToJson, requireJsonType = false) {\n if (allowPrimitives) {\n if (typeof obj === \"string\") {\n return this.serializePrimitive(obj, \"string\");\n } else if (typeof obj === \"number\") {\n return this.serializePrimitive(obj, \"double\");\n } else if (Buffer.isBuffer(obj)) {\n return this.serializePrimitive(obj, \"bytes\");\n } else if (typeof obj === \"boolean\") {\n return this.serializePrimitive(obj, \"bool\");\n } else if (Long.isLong(obj)) {\n return this.serializePrimitive(obj, \"int64\");\n }\n }\n if (obj.constructor && typeof obj.constructor.encode === \"function\" && obj.constructor.$type) {\n return Any.create({\n // I have *no* idea why it's type_url and not typeUrl, but it is.\n type_url: \"type.googleapis.com/\" + AnySupport.fullNameOf(obj.constructor.$type),\n value: obj.constructor.encode(obj).finish()\n });\n } else if (fallbackToJson && typeof obj === \"object\") {\n let type = obj.type;\n if (type === undefined) {\n if (requireJsonType) {\n throw new Error(util.format(\"Fallback to JSON serialization supported, but object does not define a type property: %o\", obj));\n } else {\n type = \"object\";\n }\n }\n return Any.create({\n type_url: CloudStateJson + type,\n value: this.serializePrimitiveValue(stableJsonStringify(obj), \"string\")\n });\n } else {\n throw new Error(util.format(\"Object %o is not a protobuf object, and hence can't be dynamically \" +\n \"serialized. Try passing the object to the protobuf classes create function.\", obj));\n }\n }", "function Surrogate(){}", "function Surrogate(){}", "function Surrogate(){}" ]
[ "0.52765024", "0.5259989", "0.5191908", "0.5185475", "0.5126739", "0.5045062", "0.4894077", "0.4859557", "0.4840031", "0.48308602", "0.48213598", "0.48129985", "0.48068723", "0.47867215", "0.4783404", "0.47590926", "0.4750297", "0.47395125", "0.47262868", "0.47044972", "0.47044972", "0.46951544", "0.46903944", "0.469036", "0.46882057", "0.46685544", "0.46643713", "0.46479693", "0.4631229", "0.4607393", "0.45995632", "0.45931837", "0.45899883", "0.45893827", "0.45862082", "0.45850316", "0.45849803", "0.45817357", "0.45812583", "0.457647", "0.457647", "0.457647", "0.45739856", "0.4568857", "0.45661232", "0.45661232", "0.4558207", "0.4558207", "0.4558207", "0.45506155", "0.453823", "0.45350957", "0.45337877", "0.45323858", "0.45237136", "0.45237136", "0.45232755", "0.45175558", "0.45116183", "0.45084187", "0.45059195", "0.4502858", "0.45010653", "0.45004973", "0.44982514", "0.44969717", "0.4486188", "0.4478461", "0.4475107", "0.44722384", "0.44722384", "0.44699332", "0.4461626", "0.4456836", "0.44552526", "0.44519946", "0.4446745", "0.4446745", "0.4444956", "0.444456", "0.44430515", "0.44382852", "0.4437338", "0.4429806", "0.44288862", "0.44287312", "0.44265378", "0.44205824", "0.4414446", "0.44129986", "0.4408074", "0.44023204", "0.4400793", "0.440048", "0.43962485", "0.4383952", "0.4383952", "0.43839452", "0.43831858", "0.43831858", "0.43831858" ]
0.0
-1
Copyright Joyent, Inc. and other Node contributors. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
function EventEmitter() { this._events = this._events || {}; this._maxListeners = this._maxListeners || undefined; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function me(e,t,a,s){var n,i=arguments.length,r=i<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,a):s;if(\"object\"==typeof Reflect&&\"function\"==typeof Reflect.decorate)r=Reflect.decorate(e,t,a,s);else for(var d=e.length-1;d>=0;d--)(n=e[d])&&(r=(i<3?n(r):i>3?n(t,a,r):n(t,a))||r);return i>3&&r&&Object.defineProperty(t,a,r),r\n/**\n * @license\n * Copyright 2016 Google Inc.\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */}", "function n(r){return!!r.constructor&&typeof r.constructor.isBuffer==\"function\"&&r.constructor.isBuffer(r)}", "function Generator() {} // 80", "function r() {}", "function r() {}", "function r() {}", "function i(e){var t=function(e){function t(){return(0,l.default)(this,t),(0,p.default)(this,(t.__proto__||(0,u.default)(t)).apply(this,arguments))}return(0,h.default)(t,e),t}(e),n=function(e){function t(){return(0,l.default)(this,t),(0,p.default)(this,(t.__proto__||(0,u.default)(t)).apply(this,arguments))}return(0,h.default)(t,e),t}(e),r=function(e){function t(){return(0,l.default)(this,t),(0,p.default)(this,(t.__proto__||(0,u.default)(t)).apply(this,arguments))}return(0,h.default)(t,e),t}(n),i=function(e){function t(){return(0,l.default)(this,t),(0,p.default)(this,(t.__proto__||(0,u.default)(t)).apply(this,arguments))}return(0,h.default)(t,e),t}(n),a=function(e){function t(){return(0,l.default)(this,t),(0,p.default)(this,(t.__proto__||(0,u.default)(t)).apply(this,arguments))}return(0,h.default)(t,e),t}(n),s=function(e){function t(){return(0,l.default)(this,t),(0,p.default)(this,(t.__proto__||(0,u.default)(t)).apply(this,arguments))}return(0,h.default)(t,e),t}(n),c=function(e){function t(){return(0,l.default)(this,t),(0,p.default)(this,(t.__proto__||(0,u.default)(t)).apply(this,arguments))}return(0,h.default)(t,e),t}(n),d=function(e){function t(){return(0,l.default)(this,t),(0,p.default)(this,(t.__proto__||(0,u.default)(t)).apply(this,arguments))}return(0,h.default)(t,e),t}(n),f=function(e){function t(){return(0,l.default)(this,t),(0,p.default)(this,(t.__proto__||(0,u.default)(t)).apply(this,arguments))}return(0,h.default)(t,e),t}(n),m=function(e){function t(){return(0,l.default)(this,t),(0,p.default)(this,(t.__proto__||(0,u.default)(t)).apply(this,arguments))}return(0,h.default)(t,e),t}(n),v=function(e){function t(){return(0,l.default)(this,t),(0,p.default)(this,(t.__proto__||(0,u.default)(t)).apply(this,arguments))}return(0,h.default)(t,e),t}(n),y=function(e){function t(){return(0,l.default)(this,t),(0,p.default)(this,(t.__proto__||(0,u.default)(t)).apply(this,arguments))}return(0,h.default)(t,e),t}(n),g=function(e){function t(){return(0,l.default)(this,t),(0,p.default)(this,(t.__proto__||(0,u.default)(t)).apply(this,arguments))}return(0,h.default)(t,e),t}(n),_=function(e){function t(){return(0,l.default)(this,t),(0,p.default)(this,(t.__proto__||(0,u.default)(t)).apply(this,arguments))}return(0,h.default)(t,e),t}(n),b=function(e){function t(){return(0,l.default)(this,t),(0,p.default)(this,(t.__proto__||(0,u.default)(t)).apply(this,arguments))}return(0,h.default)(t,e),t}(n),w=function(e){function t(){return(0,l.default)(this,t),(0,p.default)(this,(t.__proto__||(0,u.default)(t)).apply(this,arguments))}return(0,h.default)(t,e),t}(n),T=function(e){function t(){return(0,l.default)(this,t),(0,p.default)(this,(t.__proto__||(0,u.default)(t)).apply(this,arguments))}return(0,h.default)(t,e),t}(n),E=function(e){function t(){return(0,l.default)(this,t),(0,p.default)(this,(t.__proto__||(0,u.default)(t)).apply(this,arguments))}return(0,h.default)(t,e),t}(n),S=function(e){function t(){return(0,l.default)(this,t),(0,p.default)(this,(t.__proto__||(0,u.default)(t)).apply(this,arguments))}return(0,h.default)(t,e),t}(n),x=function(e){function t(){return(0,l.default)(this,t),(0,p.default)(this,(t.__proto__||(0,u.default)(t)).apply(this,arguments))}return(0,h.default)(t,e),t}(e),k=function(e){function t(){return(0,l.default)(this,t),(0,p.default)(this,(t.__proto__||(0,u.default)(t)).apply(this,arguments))}return(0,h.default)(t,e),t}(x),C=function(e){function t(){return(0,l.default)(this,t),(0,p.default)(this,(t.__proto__||(0,u.default)(t)).apply(this,arguments))}return(0,h.default)(t,e),t}(x),A=function(e){function t(){return(0,l.default)(this,t),(0,p.default)(this,(t.__proto__||(0,u.default)(t)).apply(this,arguments))}return(0,h.default)(t,e),t}(x),N=function(e){function t(){return(0,l.default)(this,t),(0,p.default)(this,(t.__proto__||(0,u.default)(t)).apply(this,arguments))}return(0,h.default)(t,e),t}(x),I=function(e){function t(){return(0,l.default)(this,t),(0,p.default)(this,(t.__proto__||(0,u.default)(t)).apply(this,arguments))}return(0,h.default)(t,e),t}(x);(0,o.default)(e,{0:t,NetworkOrCORSError:t,400:n,BadRequest:n,401:r,Unauthorized:r,402:i,PaymentRequired:i,403:a,Forbidden:a,404:s,NotFound:s,405:c,MethodNotAllowed:c,406:d,NotAcceptable:d,407:f,ProxyAuthenticationRequired:f,408:m,RequestTimeout:m,409:v,Conflict:v,410:y,Gone:y,411:g,LengthRequired:g,412:_,PreconditionFailed:_,413:b,RequestEntityTooLarge:b,414:w,RequestUriTooLong:w,415:T,UnsupportedMediaType:T,416:E,RequestRangeNotSatisfiable:E,417:S,ExpectationFailed:S,500:x,InternalServerError:x,501:k,NotImplemented:k,502:C,BadGateway:C,503:A,ServiceUnavailable:A,504:N,GatewayTimeout:N,505:I,HttpVersionNotSupported:I,select:function(t){if(void 0===t||null===t)return e;t=t.statusCode||t;var n=e[t];return n||(t=t.toString().split(\"\").shift()+\"00\",t=parseInt(t,10),e[t]||e)}})}", "function t(n){return!!n.constructor&&typeof n.constructor.isBuffer==\"function\"&&n.constructor.isBuffer(n)}", "function t(n){return!!n.constructor&&typeof n.constructor.isBuffer==\"function\"&&n.constructor.isBuffer(n)}", "function t(n){return!!n.constructor&&typeof n.constructor.isBuffer==\"function\"&&n.constructor.isBuffer(n)}", "function y(e){let t=R,n=D,r=j,s=v,i=M,o=B,a=_,u=new Uint8Array(x.slice(0,R)),d=E,c=E.slice(0,E.length),g=F,l=Y,p=e();return R=t,D=n,j=r,v=s,M=i,B=o,_=a,x=u,Y=l,E=d,E.splice(0,E.length,...c),F=g,P=new DataView(x.buffer,x.byteOffset,x.byteLength),p}", "function Generator() {} // 84", "function require() { return {}; }", "function r(){}", "function r(){}", "function r(){}", "function r(){}", "function r(){}", "function r(){}", "function r(){}", "function r(){}", "function r(){}", "function r(){}", "function r(){}", "function r(){}", "function r(){}", "function r(e){return!!e.constructor&&\"function\"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}", "function r(e){return!!e.constructor&&\"function\"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}", "function r(e){return!!e.constructor&&\"function\"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}", "function r(e){return!!e.constructor&&\"function\"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}", "function r(e){return!!e.constructor&&\"function\"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}", "function r(e){return!!e.constructor&&\"function\"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}", "function r(e){return!!e.constructor&&\"function\"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}", "function r(e){return!!e.constructor&&\"function\"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}", "function r(e){return!!e.constructor&&\"function\"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}", "function Util() {}", "function n(e){return!!e.constructor&&\"function\"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}", "function lt(t,i){return t(i={exports:{}},i.exports),i.exports}", "function c(e,t,n){Array.isArray(e)?(n=t,t=e,e=void 0):\"string\"!=typeof e&&(n=e,e=t=void 0),t&&!Array.isArray(t)&&(n=t,t=void 0),t||(t=[\"require\",\"exports\",\"module\"]),\n//Set up properties for this module. If an ID, then use\n//internal cache. If no ID, then use the external variables\n//for this node module.\ne?\n//Put the module in deep freeze until there is a\n//require call for it.\nd[e]=[e,t,n]:l(e,t,n)}", "private public function m246() {}", "function t(e){return!!e.constructor&&'function'==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}", "function universalModule() {\n\t\t var $Object = Object;\n\n\t\tfunction createClass(ctor, methods, staticMethods, superClass) {\n\t\t var proto;\n\t\t if (superClass) {\n\t\t var superProto = superClass.prototype;\n\t\t proto = $Object.create(superProto);\n\t\t } else {\n\t\t proto = ctor.prototype;\n\t\t }\n\t\t $Object.keys(methods).forEach(function (key) {\n\t\t proto[key] = methods[key];\n\t\t });\n\t\t $Object.keys(staticMethods).forEach(function (key) {\n\t\t ctor[key] = staticMethods[key];\n\t\t });\n\t\t proto.constructor = ctor;\n\t\t ctor.prototype = proto;\n\t\t return ctor;\n\t\t}\n\n\t\tfunction superCall(self, proto, name, args) {\n\t\t return $Object.getPrototypeOf(proto)[name].apply(self, args);\n\t\t}\n\n\t\tfunction defaultSuperCall(self, proto, args) {\n\t\t superCall(self, proto, 'constructor', args);\n\t\t}\n\n\t\tvar $traceurRuntime = {};\n\t\t$traceurRuntime.createClass = createClass;\n\t\t$traceurRuntime.superCall = superCall;\n\t\t$traceurRuntime.defaultSuperCall = defaultSuperCall;\n\t\t\"use strict\";\n\t\tfunction is(valueA, valueB) {\n\t\t if (valueA === valueB || (valueA !== valueA && valueB !== valueB)) {\n\t\t return true;\n\t\t }\n\t\t if (!valueA || !valueB) {\n\t\t return false;\n\t\t }\n\t\t if (typeof valueA.valueOf === 'function' && typeof valueB.valueOf === 'function') {\n\t\t valueA = valueA.valueOf();\n\t\t valueB = valueB.valueOf();\n\t\t }\n\t\t return typeof valueA.equals === 'function' && typeof valueB.equals === 'function' ? valueA.equals(valueB) : valueA === valueB || (valueA !== valueA && valueB !== valueB);\n\t\t}\n\t\tfunction invariant(condition, error) {\n\t\t if (!condition)\n\t\t throw new Error(error);\n\t\t}\n\t\tvar DELETE = 'delete';\n\t\tvar SHIFT = 5;\n\t\tvar SIZE = 1 << SHIFT;\n\t\tvar MASK = SIZE - 1;\n\t\tvar NOT_SET = {};\n\t\tvar CHANGE_LENGTH = {value: false};\n\t\tvar DID_ALTER = {value: false};\n\t\tfunction MakeRef(ref) {\n\t\t ref.value = false;\n\t\t return ref;\n\t\t}\n\t\tfunction SetRef(ref) {\n\t\t ref && (ref.value = true);\n\t\t}\n\t\tfunction OwnerID() {}\n\t\tfunction arrCopy(arr, offset) {\n\t\t offset = offset || 0;\n\t\t var len = Math.max(0, arr.length - offset);\n\t\t var newArr = new Array(len);\n\t\t for (var ii = 0; ii < len; ii++) {\n\t\t newArr[ii] = arr[ii + offset];\n\t\t }\n\t\t return newArr;\n\t\t}\n\t\tfunction assertNotInfinite(size) {\n\t\t invariant(size !== Infinity, 'Cannot perform this action with an infinite size.');\n\t\t}\n\t\tfunction ensureSize(iter) {\n\t\t if (iter.size === undefined) {\n\t\t iter.size = iter.__iterate(returnTrue);\n\t\t }\n\t\t return iter.size;\n\t\t}\n\t\tfunction wrapIndex(iter, index) {\n\t\t return index >= 0 ? (+index) : ensureSize(iter) + (+index);\n\t\t}\n\t\tfunction returnTrue() {\n\t\t return true;\n\t\t}\n\t\tfunction wholeSlice(begin, end, size) {\n\t\t return (begin === 0 || (size !== undefined && begin <= -size)) && (end === undefined || (size !== undefined && end >= size));\n\t\t}\n\t\tfunction resolveBegin(begin, size) {\n\t\t return resolveIndex(begin, size, 0);\n\t\t}\n\t\tfunction resolveEnd(end, size) {\n\t\t return resolveIndex(end, size, size);\n\t\t}\n\t\tfunction resolveIndex(index, size, defaultIndex) {\n\t\t return index === undefined ? defaultIndex : index < 0 ? Math.max(0, size + index) : size === undefined ? index : Math.min(size, index);\n\t\t}\n\t\tvar imul = typeof Math.imul === 'function' && Math.imul(0xffffffff, 2) === -2 ? Math.imul : function imul(a, b) {\n\t\t a = a | 0;\n\t\t b = b | 0;\n\t\t var c = a & 0xffff;\n\t\t var d = b & 0xffff;\n\t\t return (c * d) + ((((a >>> 16) * d + c * (b >>> 16)) << 16) >>> 0) | 0;\n\t\t};\n\t\tfunction smi(i32) {\n\t\t return ((i32 >>> 1) & 0x40000000) | (i32 & 0xBFFFFFFF);\n\t\t}\n\t\tfunction hash(o) {\n\t\t if (o === false || o === null || o === undefined) {\n\t\t return 0;\n\t\t }\n\t\t if (typeof o.valueOf === 'function') {\n\t\t o = o.valueOf();\n\t\t if (o === false || o === null || o === undefined) {\n\t\t return 0;\n\t\t }\n\t\t }\n\t\t if (o === true) {\n\t\t return 1;\n\t\t }\n\t\t var type = typeof o;\n\t\t if (type === 'number') {\n\t\t var h = o | 0;\n\t\t while (o > 0xFFFFFFFF) {\n\t\t o /= 0xFFFFFFFF;\n\t\t h ^= o;\n\t\t }\n\t\t return smi(h);\n\t\t }\n\t\t if (type === 'string') {\n\t\t return o.length > STRING_HASH_CACHE_MIN_STRLEN ? cachedHashString(o) : hashString(o);\n\t\t }\n\t\t if (typeof o.hashCode === 'function') {\n\t\t return o.hashCode();\n\t\t }\n\t\t return hashJSObj(o);\n\t\t}\n\t\tfunction cachedHashString(string) {\n\t\t var hash = stringHashCache[string];\n\t\t if (hash === undefined) {\n\t\t hash = hashString(string);\n\t\t if (STRING_HASH_CACHE_SIZE === STRING_HASH_CACHE_MAX_SIZE) {\n\t\t STRING_HASH_CACHE_SIZE = 0;\n\t\t stringHashCache = {};\n\t\t }\n\t\t STRING_HASH_CACHE_SIZE++;\n\t\t stringHashCache[string] = hash;\n\t\t }\n\t\t return hash;\n\t\t}\n\t\tfunction hashString(string) {\n\t\t var hash = 0;\n\t\t for (var ii = 0; ii < string.length; ii++) {\n\t\t hash = 31 * hash + string.charCodeAt(ii) | 0;\n\t\t }\n\t\t return smi(hash);\n\t\t}\n\t\tfunction hashJSObj(obj) {\n\t\t var hash = weakMap && weakMap.get(obj);\n\t\t if (hash)\n\t\t return hash;\n\t\t hash = obj[UID_HASH_KEY];\n\t\t if (hash)\n\t\t return hash;\n\t\t if (!canDefineProperty) {\n\t\t hash = obj.propertyIsEnumerable && obj.propertyIsEnumerable[UID_HASH_KEY];\n\t\t if (hash)\n\t\t return hash;\n\t\t hash = getIENodeHash(obj);\n\t\t if (hash)\n\t\t return hash;\n\t\t }\n\t\t if (Object.isExtensible && !Object.isExtensible(obj)) {\n\t\t throw new Error('Non-extensible objects are not allowed as keys.');\n\t\t }\n\t\t hash = ++objHashUID;\n\t\t if (objHashUID & 0x40000000) {\n\t\t objHashUID = 0;\n\t\t }\n\t\t if (weakMap) {\n\t\t weakMap.set(obj, hash);\n\t\t } else if (canDefineProperty) {\n\t\t Object.defineProperty(obj, UID_HASH_KEY, {\n\t\t 'enumerable': false,\n\t\t 'configurable': false,\n\t\t 'writable': false,\n\t\t 'value': hash\n\t\t });\n\t\t } else if (obj.propertyIsEnumerable && obj.propertyIsEnumerable === obj.constructor.prototype.propertyIsEnumerable) {\n\t\t obj.propertyIsEnumerable = function() {\n\t\t return this.constructor.prototype.propertyIsEnumerable.apply(this, arguments);\n\t\t };\n\t\t obj.propertyIsEnumerable[UID_HASH_KEY] = hash;\n\t\t } else if (obj.nodeType) {\n\t\t obj[UID_HASH_KEY] = hash;\n\t\t } else {\n\t\t throw new Error('Unable to set a non-enumerable property on object.');\n\t\t }\n\t\t return hash;\n\t\t}\n\t\tvar canDefineProperty = (function() {\n\t\t try {\n\t\t Object.defineProperty({}, 'x', {});\n\t\t return true;\n\t\t } catch (e) {\n\t\t return false;\n\t\t }\n\t\t}());\n\t\tfunction getIENodeHash(node) {\n\t\t if (node && node.nodeType > 0) {\n\t\t switch (node.nodeType) {\n\t\t case 1:\n\t\t return node.uniqueID;\n\t\t case 9:\n\t\t return node.documentElement && node.documentElement.uniqueID;\n\t\t }\n\t\t }\n\t\t}\n\t\tvar weakMap = typeof WeakMap === 'function' && new WeakMap();\n\t\tvar objHashUID = 0;\n\t\tvar UID_HASH_KEY = '__immutablehash__';\n\t\tif (typeof Symbol === 'function') {\n\t\t UID_HASH_KEY = Symbol(UID_HASH_KEY);\n\t\t}\n\t\tvar STRING_HASH_CACHE_MIN_STRLEN = 16;\n\t\tvar STRING_HASH_CACHE_MAX_SIZE = 255;\n\t\tvar STRING_HASH_CACHE_SIZE = 0;\n\t\tvar stringHashCache = {};\n\t\tvar ITERATE_KEYS = 0;\n\t\tvar ITERATE_VALUES = 1;\n\t\tvar ITERATE_ENTRIES = 2;\n\t\tvar FAUX_ITERATOR_SYMBOL = '@@iterator';\n\t\tvar REAL_ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator;\n\t\tvar ITERATOR_SYMBOL = REAL_ITERATOR_SYMBOL || FAUX_ITERATOR_SYMBOL;\n\t\tvar Iterator = function Iterator(next) {\n\t\t this.next = next;\n\t\t};\n\t\t($traceurRuntime.createClass)(Iterator, {toString: function() {\n\t\t return '[Iterator]';\n\t\t }}, {});\n\t\tIterator.KEYS = ITERATE_KEYS;\n\t\tIterator.VALUES = ITERATE_VALUES;\n\t\tIterator.ENTRIES = ITERATE_ENTRIES;\n\t\tvar IteratorPrototype = Iterator.prototype;\n\t\tIteratorPrototype.inspect = IteratorPrototype.toSource = function() {\n\t\t return this.toString();\n\t\t};\n\t\tIteratorPrototype[ITERATOR_SYMBOL] = function() {\n\t\t return this;\n\t\t};\n\t\tfunction iteratorValue(type, k, v, iteratorResult) {\n\t\t var value = type === 0 ? k : type === 1 ? v : [k, v];\n\t\t iteratorResult ? (iteratorResult.value = value) : (iteratorResult = {\n\t\t value: value,\n\t\t done: false\n\t\t });\n\t\t return iteratorResult;\n\t\t}\n\t\tfunction iteratorDone() {\n\t\t return {\n\t\t value: undefined,\n\t\t done: true\n\t\t };\n\t\t}\n\t\tfunction hasIterator(maybeIterable) {\n\t\t return !!_iteratorFn(maybeIterable);\n\t\t}\n\t\tfunction isIterator(maybeIterator) {\n\t\t return maybeIterator && typeof maybeIterator.next === 'function';\n\t\t}\n\t\tfunction getIterator(iterable) {\n\t\t var iteratorFn = _iteratorFn(iterable);\n\t\t return iteratorFn && iteratorFn.call(iterable);\n\t\t}\n\t\tfunction _iteratorFn(iterable) {\n\t\t var iteratorFn = iterable && ((REAL_ITERATOR_SYMBOL && iterable[REAL_ITERATOR_SYMBOL]) || iterable[FAUX_ITERATOR_SYMBOL]);\n\t\t if (typeof iteratorFn === 'function') {\n\t\t return iteratorFn;\n\t\t }\n\t\t}\n\t\tvar Iterable = function Iterable(value) {\n\t\t return isIterable(value) ? value : Seq(value);\n\t\t};\n\t\tvar $Iterable = Iterable;\n\t\t($traceurRuntime.createClass)(Iterable, {\n\t\t toArray: function() {\n\t\t assertNotInfinite(this.size);\n\t\t var array = new Array(this.size || 0);\n\t\t this.valueSeq().__iterate((function(v, i) {\n\t\t array[i] = v;\n\t\t }));\n\t\t return array;\n\t\t },\n\t\t toIndexedSeq: function() {\n\t\t return new ToIndexedSequence(this);\n\t\t },\n\t\t toJS: function() {\n\t\t return this.toSeq().map((function(value) {\n\t\t return value && typeof value.toJS === 'function' ? value.toJS() : value;\n\t\t })).__toJS();\n\t\t },\n\t\t toKeyedSeq: function() {\n\t\t return new ToKeyedSequence(this, true);\n\t\t },\n\t\t toMap: function() {\n\t\t return Map(this.toKeyedSeq());\n\t\t },\n\t\t toObject: function() {\n\t\t assertNotInfinite(this.size);\n\t\t var object = {};\n\t\t this.__iterate((function(v, k) {\n\t\t object[k] = v;\n\t\t }));\n\t\t return object;\n\t\t },\n\t\t toOrderedMap: function() {\n\t\t return OrderedMap(this.toKeyedSeq());\n\t\t },\n\t\t toOrderedSet: function() {\n\t\t return OrderedSet(isKeyed(this) ? this.valueSeq() : this);\n\t\t },\n\t\t toSet: function() {\n\t\t return Set(isKeyed(this) ? this.valueSeq() : this);\n\t\t },\n\t\t toSetSeq: function() {\n\t\t return new ToSetSequence(this);\n\t\t },\n\t\t toSeq: function() {\n\t\t return isIndexed(this) ? this.toIndexedSeq() : isKeyed(this) ? this.toKeyedSeq() : this.toSetSeq();\n\t\t },\n\t\t toStack: function() {\n\t\t return Stack(isKeyed(this) ? this.valueSeq() : this);\n\t\t },\n\t\t toList: function() {\n\t\t return List(isKeyed(this) ? this.valueSeq() : this);\n\t\t },\n\t\t toString: function() {\n\t\t return '[Iterable]';\n\t\t },\n\t\t __toString: function(head, tail) {\n\t\t if (this.size === 0) {\n\t\t return head + tail;\n\t\t }\n\t\t return head + ' ' + this.toSeq().map(this.__toStringMapper).join(', ') + ' ' + tail;\n\t\t },\n\t\t concat: function() {\n\t\t for (var values = [],\n\t\t $__2 = 0; $__2 < arguments.length; $__2++)\n\t\t values[$__2] = arguments[$__2];\n\t\t return reify(this, concatFactory(this, values));\n\t\t },\n\t\t contains: function(searchValue) {\n\t\t return this.some((function(value) {\n\t\t return is(value, searchValue);\n\t\t }));\n\t\t },\n\t\t entries: function() {\n\t\t return this.__iterator(ITERATE_ENTRIES);\n\t\t },\n\t\t every: function(predicate, context) {\n\t\t assertNotInfinite(this.size);\n\t\t var returnValue = true;\n\t\t this.__iterate((function(v, k, c) {\n\t\t if (!predicate.call(context, v, k, c)) {\n\t\t returnValue = false;\n\t\t return false;\n\t\t }\n\t\t }));\n\t\t return returnValue;\n\t\t },\n\t\t filter: function(predicate, context) {\n\t\t return reify(this, filterFactory(this, predicate, context, true));\n\t\t },\n\t\t find: function(predicate, context, notSetValue) {\n\t\t var foundValue = notSetValue;\n\t\t this.__iterate((function(v, k, c) {\n\t\t if (predicate.call(context, v, k, c)) {\n\t\t foundValue = v;\n\t\t return false;\n\t\t }\n\t\t }));\n\t\t return foundValue;\n\t\t },\n\t\t forEach: function(sideEffect, context) {\n\t\t assertNotInfinite(this.size);\n\t\t return this.__iterate(context ? sideEffect.bind(context) : sideEffect);\n\t\t },\n\t\t join: function(separator) {\n\t\t assertNotInfinite(this.size);\n\t\t separator = separator !== undefined ? '' + separator : ',';\n\t\t var joined = '';\n\t\t var isFirst = true;\n\t\t this.__iterate((function(v) {\n\t\t isFirst ? (isFirst = false) : (joined += separator);\n\t\t joined += v !== null && v !== undefined ? v : '';\n\t\t }));\n\t\t return joined;\n\t\t },\n\t\t keys: function() {\n\t\t return this.__iterator(ITERATE_KEYS);\n\t\t },\n\t\t map: function(mapper, context) {\n\t\t return reify(this, mapFactory(this, mapper, context));\n\t\t },\n\t\t reduce: function(reducer, initialReduction, context) {\n\t\t assertNotInfinite(this.size);\n\t\t var reduction;\n\t\t var useFirst;\n\t\t if (arguments.length < 2) {\n\t\t useFirst = true;\n\t\t } else {\n\t\t reduction = initialReduction;\n\t\t }\n\t\t this.__iterate((function(v, k, c) {\n\t\t if (useFirst) {\n\t\t useFirst = false;\n\t\t reduction = v;\n\t\t } else {\n\t\t reduction = reducer.call(context, reduction, v, k, c);\n\t\t }\n\t\t }));\n\t\t return reduction;\n\t\t },\n\t\t reduceRight: function(reducer, initialReduction, context) {\n\t\t var reversed = this.toKeyedSeq().reverse();\n\t\t return reversed.reduce.apply(reversed, arguments);\n\t\t },\n\t\t reverse: function() {\n\t\t return reify(this, reverseFactory(this, true));\n\t\t },\n\t\t slice: function(begin, end) {\n\t\t if (wholeSlice(begin, end, this.size)) {\n\t\t return this;\n\t\t }\n\t\t var resolvedBegin = resolveBegin(begin, this.size);\n\t\t var resolvedEnd = resolveEnd(end, this.size);\n\t\t if (resolvedBegin !== resolvedBegin || resolvedEnd !== resolvedEnd) {\n\t\t return this.toSeq().cacheResult().slice(begin, end);\n\t\t }\n\t\t var skipped = resolvedBegin === 0 ? this : this.skip(resolvedBegin);\n\t\t return reify(this, resolvedEnd === undefined || resolvedEnd === this.size ? skipped : skipped.take(resolvedEnd - resolvedBegin));\n\t\t },\n\t\t some: function(predicate, context) {\n\t\t return !this.every(not(predicate), context);\n\t\t },\n\t\t sort: function(comparator) {\n\t\t return reify(this, sortFactory(this, comparator));\n\t\t },\n\t\t values: function() {\n\t\t return this.__iterator(ITERATE_VALUES);\n\t\t },\n\t\t butLast: function() {\n\t\t return this.slice(0, -1);\n\t\t },\n\t\t count: function(predicate, context) {\n\t\t return ensureSize(predicate ? this.toSeq().filter(predicate, context) : this);\n\t\t },\n\t\t countBy: function(grouper, context) {\n\t\t return countByFactory(this, grouper, context);\n\t\t },\n\t\t equals: function(other) {\n\t\t return deepEqual(this, other);\n\t\t },\n\t\t entrySeq: function() {\n\t\t var iterable = this;\n\t\t if (iterable._cache) {\n\t\t return new ArraySeq(iterable._cache);\n\t\t }\n\t\t var entriesSequence = iterable.toSeq().map(entryMapper).toIndexedSeq();\n\t\t entriesSequence.fromEntrySeq = (function() {\n\t\t return iterable.toSeq();\n\t\t });\n\t\t return entriesSequence;\n\t\t },\n\t\t filterNot: function(predicate, context) {\n\t\t return this.filter(not(predicate), context);\n\t\t },\n\t\t findLast: function(predicate, context, notSetValue) {\n\t\t return this.toKeyedSeq().reverse().find(predicate, context, notSetValue);\n\t\t },\n\t\t first: function() {\n\t\t return this.find(returnTrue);\n\t\t },\n\t\t flatMap: function(mapper, context) {\n\t\t return reify(this, flatMapFactory(this, mapper, context));\n\t\t },\n\t\t flatten: function(depth) {\n\t\t return reify(this, flattenFactory(this, depth, true));\n\t\t },\n\t\t fromEntrySeq: function() {\n\t\t return new FromEntriesSequence(this);\n\t\t },\n\t\t get: function(searchKey, notSetValue) {\n\t\t return this.find((function(_, key) {\n\t\t return is(key, searchKey);\n\t\t }), undefined, notSetValue);\n\t\t },\n\t\t getIn: function(searchKeyPath, notSetValue) {\n\t\t var nested = this;\n\t\t if (searchKeyPath) {\n\t\t var iter = getIterator(searchKeyPath) || getIterator($Iterable(searchKeyPath));\n\t\t var step;\n\t\t while (!(step = iter.next()).done) {\n\t\t var key = step.value;\n\t\t nested = nested && nested.get ? nested.get(key, NOT_SET) : NOT_SET;\n\t\t if (nested === NOT_SET) {\n\t\t return notSetValue;\n\t\t }\n\t\t }\n\t\t }\n\t\t return nested;\n\t\t },\n\t\t groupBy: function(grouper, context) {\n\t\t return groupByFactory(this, grouper, context);\n\t\t },\n\t\t has: function(searchKey) {\n\t\t return this.get(searchKey, NOT_SET) !== NOT_SET;\n\t\t },\n\t\t hasIn: function(searchKeyPath) {\n\t\t return this.getIn(searchKeyPath, NOT_SET) !== NOT_SET;\n\t\t },\n\t\t isSubset: function(iter) {\n\t\t iter = typeof iter.contains === 'function' ? iter : $Iterable(iter);\n\t\t return this.every((function(value) {\n\t\t return iter.contains(value);\n\t\t }));\n\t\t },\n\t\t isSuperset: function(iter) {\n\t\t return iter.isSubset(this);\n\t\t },\n\t\t keySeq: function() {\n\t\t return this.toSeq().map(keyMapper).toIndexedSeq();\n\t\t },\n\t\t last: function() {\n\t\t return this.toSeq().reverse().first();\n\t\t },\n\t\t max: function(comparator) {\n\t\t return maxFactory(this, comparator);\n\t\t },\n\t\t maxBy: function(mapper, comparator) {\n\t\t return maxFactory(this, comparator, mapper);\n\t\t },\n\t\t min: function(comparator) {\n\t\t return maxFactory(this, comparator ? neg(comparator) : defaultNegComparator);\n\t\t },\n\t\t minBy: function(mapper, comparator) {\n\t\t return maxFactory(this, comparator ? neg(comparator) : defaultNegComparator, mapper);\n\t\t },\n\t\t rest: function() {\n\t\t return this.slice(1);\n\t\t },\n\t\t skip: function(amount) {\n\t\t return reify(this, skipFactory(this, amount, true));\n\t\t },\n\t\t skipLast: function(amount) {\n\t\t return reify(this, this.toSeq().reverse().skip(amount).reverse());\n\t\t },\n\t\t skipWhile: function(predicate, context) {\n\t\t return reify(this, skipWhileFactory(this, predicate, context, true));\n\t\t },\n\t\t skipUntil: function(predicate, context) {\n\t\t return this.skipWhile(not(predicate), context);\n\t\t },\n\t\t sortBy: function(mapper, comparator) {\n\t\t return reify(this, sortFactory(this, comparator, mapper));\n\t\t },\n\t\t take: function(amount) {\n\t\t return reify(this, takeFactory(this, amount));\n\t\t },\n\t\t takeLast: function(amount) {\n\t\t return reify(this, this.toSeq().reverse().take(amount).reverse());\n\t\t },\n\t\t takeWhile: function(predicate, context) {\n\t\t return reify(this, takeWhileFactory(this, predicate, context));\n\t\t },\n\t\t takeUntil: function(predicate, context) {\n\t\t return this.takeWhile(not(predicate), context);\n\t\t },\n\t\t valueSeq: function() {\n\t\t return this.toIndexedSeq();\n\t\t },\n\t\t hashCode: function() {\n\t\t return this.__hash || (this.__hash = hashIterable(this));\n\t\t }\n\t\t}, {});\n\t\tvar IS_ITERABLE_SENTINEL = '@@__IMMUTABLE_ITERABLE__@@';\n\t\tvar IS_KEYED_SENTINEL = '@@__IMMUTABLE_KEYED__@@';\n\t\tvar IS_INDEXED_SENTINEL = '@@__IMMUTABLE_INDEXED__@@';\n\t\tvar IS_ORDERED_SENTINEL = '@@__IMMUTABLE_ORDERED__@@';\n\t\tvar IterablePrototype = Iterable.prototype;\n\t\tIterablePrototype[IS_ITERABLE_SENTINEL] = true;\n\t\tIterablePrototype[ITERATOR_SYMBOL] = IterablePrototype.values;\n\t\tIterablePrototype.toJSON = IterablePrototype.toJS;\n\t\tIterablePrototype.__toJS = IterablePrototype.toArray;\n\t\tIterablePrototype.__toStringMapper = quoteString;\n\t\tIterablePrototype.inspect = IterablePrototype.toSource = function() {\n\t\t return this.toString();\n\t\t};\n\t\tIterablePrototype.chain = IterablePrototype.flatMap;\n\t\t(function() {\n\t\t try {\n\t\t Object.defineProperty(IterablePrototype, 'length', {get: function() {\n\t\t if (!Iterable.noLengthWarning) {\n\t\t var stack;\n\t\t try {\n\t\t throw new Error();\n\t\t } catch (error) {\n\t\t stack = error.stack;\n\t\t }\n\t\t if (stack.indexOf('_wrapObject') === -1) {\n\t\t console && console.warn && console.warn('iterable.length has been deprecated, ' + 'use iterable.size or iterable.count(). ' + 'This warning will become a silent error in a future version. ' + stack);\n\t\t return this.size;\n\t\t }\n\t\t }\n\t\t }});\n\t\t } catch (e) {}\n\t\t})();\n\t\tvar KeyedIterable = function KeyedIterable(value) {\n\t\t return isKeyed(value) ? value : KeyedSeq(value);\n\t\t};\n\t\t($traceurRuntime.createClass)(KeyedIterable, {\n\t\t flip: function() {\n\t\t return reify(this, flipFactory(this));\n\t\t },\n\t\t findKey: function(predicate, context) {\n\t\t var foundKey;\n\t\t this.__iterate((function(v, k, c) {\n\t\t if (predicate.call(context, v, k, c)) {\n\t\t foundKey = k;\n\t\t return false;\n\t\t }\n\t\t }));\n\t\t return foundKey;\n\t\t },\n\t\t findLastKey: function(predicate, context) {\n\t\t return this.toSeq().reverse().findKey(predicate, context);\n\t\t },\n\t\t keyOf: function(searchValue) {\n\t\t return this.findKey((function(value) {\n\t\t return is(value, searchValue);\n\t\t }));\n\t\t },\n\t\t lastKeyOf: function(searchValue) {\n\t\t return this.toSeq().reverse().keyOf(searchValue);\n\t\t },\n\t\t mapEntries: function(mapper, context) {\n\t\t var $__0 = this;\n\t\t var iterations = 0;\n\t\t return reify(this, this.toSeq().map((function(v, k) {\n\t\t return mapper.call(context, [k, v], iterations++, $__0);\n\t\t })).fromEntrySeq());\n\t\t },\n\t\t mapKeys: function(mapper, context) {\n\t\t var $__0 = this;\n\t\t return reify(this, this.toSeq().flip().map((function(k, v) {\n\t\t return mapper.call(context, k, v, $__0);\n\t\t })).flip());\n\t\t }\n\t\t}, {}, Iterable);\n\t\tvar KeyedIterablePrototype = KeyedIterable.prototype;\n\t\tKeyedIterablePrototype[IS_KEYED_SENTINEL] = true;\n\t\tKeyedIterablePrototype[ITERATOR_SYMBOL] = IterablePrototype.entries;\n\t\tKeyedIterablePrototype.__toJS = IterablePrototype.toObject;\n\t\tKeyedIterablePrototype.__toStringMapper = (function(v, k) {\n\t\t return k + ': ' + quoteString(v);\n\t\t});\n\t\tvar IndexedIterable = function IndexedIterable(value) {\n\t\t return isIndexed(value) ? value : IndexedSeq(value);\n\t\t};\n\t\t($traceurRuntime.createClass)(IndexedIterable, {\n\t\t toKeyedSeq: function() {\n\t\t return new ToKeyedSequence(this, false);\n\t\t },\n\t\t filter: function(predicate, context) {\n\t\t return reify(this, filterFactory(this, predicate, context, false));\n\t\t },\n\t\t findIndex: function(predicate, context) {\n\t\t var key = this.toKeyedSeq().findKey(predicate, context);\n\t\t return key === undefined ? -1 : key;\n\t\t },\n\t\t indexOf: function(searchValue) {\n\t\t var key = this.toKeyedSeq().keyOf(searchValue);\n\t\t return key === undefined ? -1 : key;\n\t\t },\n\t\t lastIndexOf: function(searchValue) {\n\t\t var key = this.toKeyedSeq().lastKeyOf(searchValue);\n\t\t return key === undefined ? -1 : key;\n\t\t },\n\t\t reverse: function() {\n\t\t return reify(this, reverseFactory(this, false));\n\t\t },\n\t\t splice: function(index, removeNum) {\n\t\t var numArgs = arguments.length;\n\t\t removeNum = Math.max(removeNum | 0, 0);\n\t\t if (numArgs === 0 || (numArgs === 2 && !removeNum)) {\n\t\t return this;\n\t\t }\n\t\t index = resolveBegin(index, this.size);\n\t\t var spliced = this.slice(0, index);\n\t\t return reify(this, numArgs === 1 ? spliced : spliced.concat(arrCopy(arguments, 2), this.slice(index + removeNum)));\n\t\t },\n\t\t findLastIndex: function(predicate, context) {\n\t\t var key = this.toKeyedSeq().findLastKey(predicate, context);\n\t\t return key === undefined ? -1 : key;\n\t\t },\n\t\t first: function() {\n\t\t return this.get(0);\n\t\t },\n\t\t flatten: function(depth) {\n\t\t return reify(this, flattenFactory(this, depth, false));\n\t\t },\n\t\t get: function(index, notSetValue) {\n\t\t index = wrapIndex(this, index);\n\t\t return (index < 0 || (this.size === Infinity || (this.size !== undefined && index > this.size))) ? notSetValue : this.find((function(_, key) {\n\t\t return key === index;\n\t\t }), undefined, notSetValue);\n\t\t },\n\t\t has: function(index) {\n\t\t index = wrapIndex(this, index);\n\t\t return index >= 0 && (this.size !== undefined ? this.size === Infinity || index < this.size : this.indexOf(index) !== -1);\n\t\t },\n\t\t interpose: function(separator) {\n\t\t return reify(this, interposeFactory(this, separator));\n\t\t },\n\t\t last: function() {\n\t\t return this.get(-1);\n\t\t },\n\t\t skip: function(amount) {\n\t\t var iter = this;\n\t\t var skipSeq = skipFactory(iter, amount, false);\n\t\t if (isSeq(iter) && skipSeq !== iter) {\n\t\t skipSeq.get = function(index, notSetValue) {\n\t\t index = wrapIndex(this, index);\n\t\t return index >= 0 ? iter.get(index + amount, notSetValue) : notSetValue;\n\t\t };\n\t\t }\n\t\t return reify(this, skipSeq);\n\t\t },\n\t\t skipWhile: function(predicate, context) {\n\t\t return reify(this, skipWhileFactory(this, predicate, context, false));\n\t\t },\n\t\t take: function(amount) {\n\t\t var iter = this;\n\t\t var takeSeq = takeFactory(iter, amount);\n\t\t if (isSeq(iter) && takeSeq !== iter) {\n\t\t takeSeq.get = function(index, notSetValue) {\n\t\t index = wrapIndex(this, index);\n\t\t return index >= 0 && index < amount ? iter.get(index, notSetValue) : notSetValue;\n\t\t };\n\t\t }\n\t\t return reify(this, takeSeq);\n\t\t }\n\t\t}, {}, Iterable);\n\t\tIndexedIterable.prototype[IS_INDEXED_SENTINEL] = true;\n\t\tIndexedIterable.prototype[IS_ORDERED_SENTINEL] = true;\n\t\tvar SetIterable = function SetIterable(value) {\n\t\t return isIterable(value) && !isAssociative(value) ? value : SetSeq(value);\n\t\t};\n\t\t($traceurRuntime.createClass)(SetIterable, {\n\t\t get: function(value, notSetValue) {\n\t\t return this.has(value) ? value : notSetValue;\n\t\t },\n\t\t contains: function(value) {\n\t\t return this.has(value);\n\t\t },\n\t\t keySeq: function() {\n\t\t return this.valueSeq();\n\t\t }\n\t\t}, {}, Iterable);\n\t\tSetIterable.prototype.has = IterablePrototype.contains;\n\t\tfunction isIterable(maybeIterable) {\n\t\t return !!(maybeIterable && maybeIterable[IS_ITERABLE_SENTINEL]);\n\t\t}\n\t\tfunction isKeyed(maybeKeyed) {\n\t\t return !!(maybeKeyed && maybeKeyed[IS_KEYED_SENTINEL]);\n\t\t}\n\t\tfunction isIndexed(maybeIndexed) {\n\t\t return !!(maybeIndexed && maybeIndexed[IS_INDEXED_SENTINEL]);\n\t\t}\n\t\tfunction isAssociative(maybeAssociative) {\n\t\t return isKeyed(maybeAssociative) || isIndexed(maybeAssociative);\n\t\t}\n\t\tfunction isOrdered(maybeOrdered) {\n\t\t return !!(maybeOrdered && maybeOrdered[IS_ORDERED_SENTINEL]);\n\t\t}\n\t\tIterable.isIterable = isIterable;\n\t\tIterable.isKeyed = isKeyed;\n\t\tIterable.isIndexed = isIndexed;\n\t\tIterable.isAssociative = isAssociative;\n\t\tIterable.isOrdered = isOrdered;\n\t\tIterable.Keyed = KeyedIterable;\n\t\tIterable.Indexed = IndexedIterable;\n\t\tIterable.Set = SetIterable;\n\t\tIterable.Iterator = Iterator;\n\t\tfunction keyMapper(v, k) {\n\t\t return k;\n\t\t}\n\t\tfunction entryMapper(v, k) {\n\t\t return [k, v];\n\t\t}\n\t\tfunction not(predicate) {\n\t\t return function() {\n\t\t return !predicate.apply(this, arguments);\n\t\t };\n\t\t}\n\t\tfunction neg(predicate) {\n\t\t return function() {\n\t\t return -predicate.apply(this, arguments);\n\t\t };\n\t\t}\n\t\tfunction quoteString(value) {\n\t\t return typeof value === 'string' ? JSON.stringify(value) : value;\n\t\t}\n\t\tfunction defaultNegComparator(a, b) {\n\t\t return a < b ? 1 : a > b ? -1 : 0;\n\t\t}\n\t\tfunction deepEqual(a, b) {\n\t\t if (a === b) {\n\t\t return true;\n\t\t }\n\t\t if (!isIterable(b) || a.size !== undefined && b.size !== undefined && a.size !== b.size || a.__hash !== undefined && b.__hash !== undefined && a.__hash !== b.__hash || isKeyed(a) !== isKeyed(b) || isIndexed(a) !== isIndexed(b) || isOrdered(a) !== isOrdered(b)) {\n\t\t return false;\n\t\t }\n\t\t if (a.size === 0 && b.size === 0) {\n\t\t return true;\n\t\t }\n\t\t var notAssociative = !isAssociative(a);\n\t\t if (isOrdered(a)) {\n\t\t var entries = a.entries();\n\t\t return b.every((function(v, k) {\n\t\t var entry = entries.next().value;\n\t\t return entry && is(entry[1], v) && (notAssociative || is(entry[0], k));\n\t\t })) && entries.next().done;\n\t\t }\n\t\t var flipped = false;\n\t\t if (a.size === undefined) {\n\t\t if (b.size === undefined) {\n\t\t a.cacheResult();\n\t\t } else {\n\t\t flipped = true;\n\t\t var _ = a;\n\t\t a = b;\n\t\t b = _;\n\t\t }\n\t\t }\n\t\t var allEqual = true;\n\t\t var bSize = b.__iterate((function(v, k) {\n\t\t if (notAssociative ? !a.has(v) : flipped ? !is(v, a.get(k, NOT_SET)) : !is(a.get(k, NOT_SET), v)) {\n\t\t allEqual = false;\n\t\t return false;\n\t\t }\n\t\t }));\n\t\t return allEqual && a.size === bSize;\n\t\t}\n\t\tfunction hashIterable(iterable) {\n\t\t if (iterable.size === Infinity) {\n\t\t return 0;\n\t\t }\n\t\t var ordered = isOrdered(iterable);\n\t\t var keyed = isKeyed(iterable);\n\t\t var h = ordered ? 1 : 0;\n\t\t var size = iterable.__iterate(keyed ? ordered ? (function(v, k) {\n\t\t h = 31 * h + hashMerge(hash(v), hash(k)) | 0;\n\t\t }) : (function(v, k) {\n\t\t h = h + hashMerge(hash(v), hash(k)) | 0;\n\t\t }) : ordered ? (function(v) {\n\t\t h = 31 * h + hash(v) | 0;\n\t\t }) : (function(v) {\n\t\t h = h + hash(v) | 0;\n\t\t }));\n\t\t return murmurHashOfSize(size, h);\n\t\t}\n\t\tfunction murmurHashOfSize(size, h) {\n\t\t h = imul(h, 0xCC9E2D51);\n\t\t h = imul(h << 15 | h >>> -15, 0x1B873593);\n\t\t h = imul(h << 13 | h >>> -13, 5);\n\t\t h = (h + 0xE6546B64 | 0) ^ size;\n\t\t h = imul(h ^ h >>> 16, 0x85EBCA6B);\n\t\t h = imul(h ^ h >>> 13, 0xC2B2AE35);\n\t\t h = smi(h ^ h >>> 16);\n\t\t return h;\n\t\t}\n\t\tfunction hashMerge(a, b) {\n\t\t return a ^ b + 0x9E3779B9 + (a << 6) + (a >> 2) | 0;\n\t\t}\n\t\tfunction mixin(ctor, methods) {\n\t\t var proto = ctor.prototype;\n\t\t var keyCopier = (function(key) {\n\t\t proto[key] = methods[key];\n\t\t });\n\t\t Object.keys(methods).forEach(keyCopier);\n\t\t Object.getOwnPropertySymbols && Object.getOwnPropertySymbols(methods).forEach(keyCopier);\n\t\t return ctor;\n\t\t}\n\t\tvar Seq = function Seq(value) {\n\t\t return value === null || value === undefined ? emptySequence() : isIterable(value) ? value.toSeq() : seqFromValue(value);\n\t\t};\n\t\tvar $Seq = Seq;\n\t\t($traceurRuntime.createClass)(Seq, {\n\t\t toSeq: function() {\n\t\t return this;\n\t\t },\n\t\t toString: function() {\n\t\t return this.__toString('Seq {', '}');\n\t\t },\n\t\t cacheResult: function() {\n\t\t if (!this._cache && this.__iterateUncached) {\n\t\t this._cache = this.entrySeq().toArray();\n\t\t this.size = this._cache.length;\n\t\t }\n\t\t return this;\n\t\t },\n\t\t __iterate: function(fn, reverse) {\n\t\t return seqIterate(this, fn, reverse, true);\n\t\t },\n\t\t __iterator: function(type, reverse) {\n\t\t return seqIterator(this, type, reverse, true);\n\t\t }\n\t\t}, {of: function() {\n\t\t return $Seq(arguments);\n\t\t }}, Iterable);\n\t\tvar KeyedSeq = function KeyedSeq(value) {\n\t\t return value === null || value === undefined ? emptySequence().toKeyedSeq() : isIterable(value) ? (isKeyed(value) ? value.toSeq() : value.fromEntrySeq()) : keyedSeqFromValue(value);\n\t\t};\n\t\tvar $KeyedSeq = KeyedSeq;\n\t\t($traceurRuntime.createClass)(KeyedSeq, {\n\t\t toKeyedSeq: function() {\n\t\t return this;\n\t\t },\n\t\t toSeq: function() {\n\t\t return this;\n\t\t }\n\t\t}, {of: function() {\n\t\t return $KeyedSeq(arguments);\n\t\t }}, Seq);\n\t\tmixin(KeyedSeq, KeyedIterable.prototype);\n\t\tvar IndexedSeq = function IndexedSeq(value) {\n\t\t return value === null || value === undefined ? emptySequence() : !isIterable(value) ? indexedSeqFromValue(value) : isKeyed(value) ? value.entrySeq() : value.toIndexedSeq();\n\t\t};\n\t\tvar $IndexedSeq = IndexedSeq;\n\t\t($traceurRuntime.createClass)(IndexedSeq, {\n\t\t toIndexedSeq: function() {\n\t\t return this;\n\t\t },\n\t\t toString: function() {\n\t\t return this.__toString('Seq [', ']');\n\t\t },\n\t\t __iterate: function(fn, reverse) {\n\t\t return seqIterate(this, fn, reverse, false);\n\t\t },\n\t\t __iterator: function(type, reverse) {\n\t\t return seqIterator(this, type, reverse, false);\n\t\t }\n\t\t}, {of: function() {\n\t\t return $IndexedSeq(arguments);\n\t\t }}, Seq);\n\t\tmixin(IndexedSeq, IndexedIterable.prototype);\n\t\tvar SetSeq = function SetSeq(value) {\n\t\t return (value === null || value === undefined ? emptySequence() : !isIterable(value) ? indexedSeqFromValue(value) : isKeyed(value) ? value.entrySeq() : value).toSetSeq();\n\t\t};\n\t\tvar $SetSeq = SetSeq;\n\t\t($traceurRuntime.createClass)(SetSeq, {toSetSeq: function() {\n\t\t return this;\n\t\t }}, {of: function() {\n\t\t return $SetSeq(arguments);\n\t\t }}, Seq);\n\t\tmixin(SetSeq, SetIterable.prototype);\n\t\tSeq.isSeq = isSeq;\n\t\tSeq.Keyed = KeyedSeq;\n\t\tSeq.Set = SetSeq;\n\t\tSeq.Indexed = IndexedSeq;\n\t\tvar IS_SEQ_SENTINEL = '@@__IMMUTABLE_SEQ__@@';\n\t\tSeq.prototype[IS_SEQ_SENTINEL] = true;\n\t\tvar ArraySeq = function ArraySeq(array) {\n\t\t this._array = array;\n\t\t this.size = array.length;\n\t\t};\n\t\t($traceurRuntime.createClass)(ArraySeq, {\n\t\t get: function(index, notSetValue) {\n\t\t return this.has(index) ? this._array[wrapIndex(this, index)] : notSetValue;\n\t\t },\n\t\t __iterate: function(fn, reverse) {\n\t\t var array = this._array;\n\t\t var maxIndex = array.length - 1;\n\t\t for (var ii = 0; ii <= maxIndex; ii++) {\n\t\t if (fn(array[reverse ? maxIndex - ii : ii], ii, this) === false) {\n\t\t return ii + 1;\n\t\t }\n\t\t }\n\t\t return ii;\n\t\t },\n\t\t __iterator: function(type, reverse) {\n\t\t var array = this._array;\n\t\t var maxIndex = array.length - 1;\n\t\t var ii = 0;\n\t\t return new Iterator((function() {\n\t\t return ii > maxIndex ? iteratorDone() : iteratorValue(type, ii, array[reverse ? maxIndex - ii++ : ii++]);\n\t\t }));\n\t\t }\n\t\t}, {}, IndexedSeq);\n\t\tvar ObjectSeq = function ObjectSeq(object) {\n\t\t var keys = Object.keys(object);\n\t\t this._object = object;\n\t\t this._keys = keys;\n\t\t this.size = keys.length;\n\t\t};\n\t\t($traceurRuntime.createClass)(ObjectSeq, {\n\t\t get: function(key, notSetValue) {\n\t\t if (notSetValue !== undefined && !this.has(key)) {\n\t\t return notSetValue;\n\t\t }\n\t\t return this._object[key];\n\t\t },\n\t\t has: function(key) {\n\t\t return this._object.hasOwnProperty(key);\n\t\t },\n\t\t __iterate: function(fn, reverse) {\n\t\t var object = this._object;\n\t\t var keys = this._keys;\n\t\t var maxIndex = keys.length - 1;\n\t\t for (var ii = 0; ii <= maxIndex; ii++) {\n\t\t var key = keys[reverse ? maxIndex - ii : ii];\n\t\t if (fn(object[key], key, this) === false) {\n\t\t return ii + 1;\n\t\t }\n\t\t }\n\t\t return ii;\n\t\t },\n\t\t __iterator: function(type, reverse) {\n\t\t var object = this._object;\n\t\t var keys = this._keys;\n\t\t var maxIndex = keys.length - 1;\n\t\t var ii = 0;\n\t\t return new Iterator((function() {\n\t\t var key = keys[reverse ? maxIndex - ii : ii];\n\t\t return ii++ > maxIndex ? iteratorDone() : iteratorValue(type, key, object[key]);\n\t\t }));\n\t\t }\n\t\t}, {}, KeyedSeq);\n\t\tObjectSeq.prototype[IS_ORDERED_SENTINEL] = true;\n\t\tvar IterableSeq = function IterableSeq(iterable) {\n\t\t this._iterable = iterable;\n\t\t this.size = iterable.length || iterable.size;\n\t\t};\n\t\t($traceurRuntime.createClass)(IterableSeq, {\n\t\t __iterateUncached: function(fn, reverse) {\n\t\t if (reverse) {\n\t\t return this.cacheResult().__iterate(fn, reverse);\n\t\t }\n\t\t var iterable = this._iterable;\n\t\t var iterator = getIterator(iterable);\n\t\t var iterations = 0;\n\t\t if (isIterator(iterator)) {\n\t\t var step;\n\t\t while (!(step = iterator.next()).done) {\n\t\t if (fn(step.value, iterations++, this) === false) {\n\t\t break;\n\t\t }\n\t\t }\n\t\t }\n\t\t return iterations;\n\t\t },\n\t\t __iteratorUncached: function(type, reverse) {\n\t\t if (reverse) {\n\t\t return this.cacheResult().__iterator(type, reverse);\n\t\t }\n\t\t var iterable = this._iterable;\n\t\t var iterator = getIterator(iterable);\n\t\t if (!isIterator(iterator)) {\n\t\t return new Iterator(iteratorDone);\n\t\t }\n\t\t var iterations = 0;\n\t\t return new Iterator((function() {\n\t\t var step = iterator.next();\n\t\t return step.done ? step : iteratorValue(type, iterations++, step.value);\n\t\t }));\n\t\t }\n\t\t}, {}, IndexedSeq);\n\t\tvar IteratorSeq = function IteratorSeq(iterator) {\n\t\t this._iterator = iterator;\n\t\t this._iteratorCache = [];\n\t\t};\n\t\t($traceurRuntime.createClass)(IteratorSeq, {\n\t\t __iterateUncached: function(fn, reverse) {\n\t\t if (reverse) {\n\t\t return this.cacheResult().__iterate(fn, reverse);\n\t\t }\n\t\t var iterator = this._iterator;\n\t\t var cache = this._iteratorCache;\n\t\t var iterations = 0;\n\t\t while (iterations < cache.length) {\n\t\t if (fn(cache[iterations], iterations++, this) === false) {\n\t\t return iterations;\n\t\t }\n\t\t }\n\t\t var step;\n\t\t while (!(step = iterator.next()).done) {\n\t\t var val = step.value;\n\t\t cache[iterations] = val;\n\t\t if (fn(val, iterations++, this) === false) {\n\t\t break;\n\t\t }\n\t\t }\n\t\t return iterations;\n\t\t },\n\t\t __iteratorUncached: function(type, reverse) {\n\t\t if (reverse) {\n\t\t return this.cacheResult().__iterator(type, reverse);\n\t\t }\n\t\t var iterator = this._iterator;\n\t\t var cache = this._iteratorCache;\n\t\t var iterations = 0;\n\t\t return new Iterator((function() {\n\t\t if (iterations >= cache.length) {\n\t\t var step = iterator.next();\n\t\t if (step.done) {\n\t\t return step;\n\t\t }\n\t\t cache[iterations] = step.value;\n\t\t }\n\t\t return iteratorValue(type, iterations, cache[iterations++]);\n\t\t }));\n\t\t }\n\t\t}, {}, IndexedSeq);\n\t\tfunction isSeq(maybeSeq) {\n\t\t return !!(maybeSeq && maybeSeq[IS_SEQ_SENTINEL]);\n\t\t}\n\t\tvar EMPTY_SEQ;\n\t\tfunction emptySequence() {\n\t\t return EMPTY_SEQ || (EMPTY_SEQ = new ArraySeq([]));\n\t\t}\n\t\tfunction keyedSeqFromValue(value) {\n\t\t var seq = Array.isArray(value) ? new ArraySeq(value).fromEntrySeq() : isIterator(value) ? new IteratorSeq(value).fromEntrySeq() : hasIterator(value) ? new IterableSeq(value).fromEntrySeq() : typeof value === 'object' ? new ObjectSeq(value) : undefined;\n\t\t if (!seq) {\n\t\t throw new TypeError('Expected Array or iterable object of [k, v] entries, ' + 'or keyed object: ' + value);\n\t\t }\n\t\t return seq;\n\t\t}\n\t\tfunction indexedSeqFromValue(value) {\n\t\t var seq = maybeIndexedSeqFromValue(value);\n\t\t if (!seq) {\n\t\t throw new TypeError('Expected Array or iterable object of values: ' + value);\n\t\t }\n\t\t return seq;\n\t\t}\n\t\tfunction seqFromValue(value) {\n\t\t var seq = maybeIndexedSeqFromValue(value) || (typeof value === 'object' && new ObjectSeq(value));\n\t\t if (!seq) {\n\t\t throw new TypeError('Expected Array or iterable object of values, or keyed object: ' + value);\n\t\t }\n\t\t return seq;\n\t\t}\n\t\tfunction maybeIndexedSeqFromValue(value) {\n\t\t return (isArrayLike(value) ? new ArraySeq(value) : isIterator(value) ? new IteratorSeq(value) : hasIterator(value) ? new IterableSeq(value) : undefined);\n\t\t}\n\t\tfunction isArrayLike(value) {\n\t\t return value && typeof value.length === 'number';\n\t\t}\n\t\tfunction seqIterate(seq, fn, reverse, useKeys) {\n\t\t var cache = seq._cache;\n\t\t if (cache) {\n\t\t var maxIndex = cache.length - 1;\n\t\t for (var ii = 0; ii <= maxIndex; ii++) {\n\t\t var entry = cache[reverse ? maxIndex - ii : ii];\n\t\t if (fn(entry[1], useKeys ? entry[0] : ii, seq) === false) {\n\t\t return ii + 1;\n\t\t }\n\t\t }\n\t\t return ii;\n\t\t }\n\t\t return seq.__iterateUncached(fn, reverse);\n\t\t}\n\t\tfunction seqIterator(seq, type, reverse, useKeys) {\n\t\t var cache = seq._cache;\n\t\t if (cache) {\n\t\t var maxIndex = cache.length - 1;\n\t\t var ii = 0;\n\t\t return new Iterator((function() {\n\t\t var entry = cache[reverse ? maxIndex - ii : ii];\n\t\t return ii++ > maxIndex ? iteratorDone() : iteratorValue(type, useKeys ? entry[0] : ii - 1, entry[1]);\n\t\t }));\n\t\t }\n\t\t return seq.__iteratorUncached(type, reverse);\n\t\t}\n\t\tfunction fromJS(json, converter) {\n\t\t return converter ? _fromJSWith(converter, json, '', {'': json}) : _fromJSDefault(json);\n\t\t}\n\t\tfunction _fromJSWith(converter, json, key, parentJSON) {\n\t\t if (Array.isArray(json)) {\n\t\t return converter.call(parentJSON, key, IndexedSeq(json).map((function(v, k) {\n\t\t return _fromJSWith(converter, v, k, json);\n\t\t })));\n\t\t }\n\t\t if (isPlainObj(json)) {\n\t\t return converter.call(parentJSON, key, KeyedSeq(json).map((function(v, k) {\n\t\t return _fromJSWith(converter, v, k, json);\n\t\t })));\n\t\t }\n\t\t return json;\n\t\t}\n\t\tfunction _fromJSDefault(json) {\n\t\t if (Array.isArray(json)) {\n\t\t return IndexedSeq(json).map(_fromJSDefault).toList();\n\t\t }\n\t\t if (isPlainObj(json)) {\n\t\t return KeyedSeq(json).map(_fromJSDefault).toMap();\n\t\t }\n\t\t return json;\n\t\t}\n\t\tfunction isPlainObj(value) {\n\t\t return value && value.constructor === Object;\n\t\t}\n\t\tvar Collection = function Collection() {\n\t\t throw TypeError('Abstract');\n\t\t};\n\t\t($traceurRuntime.createClass)(Collection, {}, {}, Iterable);\n\t\tvar KeyedCollection = function KeyedCollection() {\n\t\t $traceurRuntime.defaultSuperCall(this, $KeyedCollection.prototype, arguments);\n\t\t};\n\t\tvar $KeyedCollection = KeyedCollection;\n\t\t($traceurRuntime.createClass)(KeyedCollection, {}, {}, Collection);\n\t\tmixin(KeyedCollection, KeyedIterable.prototype);\n\t\tvar IndexedCollection = function IndexedCollection() {\n\t\t $traceurRuntime.defaultSuperCall(this, $IndexedCollection.prototype, arguments);\n\t\t};\n\t\tvar $IndexedCollection = IndexedCollection;\n\t\t($traceurRuntime.createClass)(IndexedCollection, {}, {}, Collection);\n\t\tmixin(IndexedCollection, IndexedIterable.prototype);\n\t\tvar SetCollection = function SetCollection() {\n\t\t $traceurRuntime.defaultSuperCall(this, $SetCollection.prototype, arguments);\n\t\t};\n\t\tvar $SetCollection = SetCollection;\n\t\t($traceurRuntime.createClass)(SetCollection, {}, {}, Collection);\n\t\tmixin(SetCollection, SetIterable.prototype);\n\t\tCollection.Keyed = KeyedCollection;\n\t\tCollection.Indexed = IndexedCollection;\n\t\tCollection.Set = SetCollection;\n\t\tvar Map = function Map(value) {\n\t\t return value === null || value === undefined ? emptyMap() : isMap(value) ? value : emptyMap().withMutations((function(map) {\n\t\t var iter = KeyedIterable(value);\n\t\t assertNotInfinite(iter.size);\n\t\t iter.forEach((function(v, k) {\n\t\t return map.set(k, v);\n\t\t }));\n\t\t }));\n\t\t};\n\t\t($traceurRuntime.createClass)(Map, {\n\t\t toString: function() {\n\t\t return this.__toString('Map {', '}');\n\t\t },\n\t\t get: function(k, notSetValue) {\n\t\t return this._root ? this._root.get(0, undefined, k, notSetValue) : notSetValue;\n\t\t },\n\t\t set: function(k, v) {\n\t\t return updateMap(this, k, v);\n\t\t },\n\t\t setIn: function(keyPath, v) {\n\t\t return this.updateIn(keyPath, NOT_SET, (function() {\n\t\t return v;\n\t\t }));\n\t\t },\n\t\t remove: function(k) {\n\t\t return updateMap(this, k, NOT_SET);\n\t\t },\n\t\t deleteIn: function(keyPath) {\n\t\t return this.updateIn(keyPath, (function() {\n\t\t return NOT_SET;\n\t\t }));\n\t\t },\n\t\t update: function(k, notSetValue, updater) {\n\t\t return arguments.length === 1 ? k(this) : this.updateIn([k], notSetValue, updater);\n\t\t },\n\t\t updateIn: function(keyPath, notSetValue, updater) {\n\t\t if (!updater) {\n\t\t updater = notSetValue;\n\t\t notSetValue = undefined;\n\t\t }\n\t\t var updatedValue = updateInDeepMap(this, getIterator(keyPath) || getIterator(Iterable(keyPath)), notSetValue, updater);\n\t\t return updatedValue === NOT_SET ? undefined : updatedValue;\n\t\t },\n\t\t clear: function() {\n\t\t if (this.size === 0) {\n\t\t return this;\n\t\t }\n\t\t if (this.__ownerID) {\n\t\t this.size = 0;\n\t\t this._root = null;\n\t\t this.__hash = undefined;\n\t\t this.__altered = true;\n\t\t return this;\n\t\t }\n\t\t return emptyMap();\n\t\t },\n\t\t merge: function() {\n\t\t return mergeIntoMapWith(this, undefined, arguments);\n\t\t },\n\t\t mergeWith: function(merger) {\n\t\t for (var iters = [],\n\t\t $__3 = 1; $__3 < arguments.length; $__3++)\n\t\t iters[$__3 - 1] = arguments[$__3];\n\t\t return mergeIntoMapWith(this, merger, iters);\n\t\t },\n\t\t mergeIn: function(keyPath) {\n\t\t for (var iters = [],\n\t\t $__4 = 1; $__4 < arguments.length; $__4++)\n\t\t iters[$__4 - 1] = arguments[$__4];\n\t\t return this.updateIn(keyPath, emptyMap(), (function(m) {\n\t\t return m.merge.apply(m, iters);\n\t\t }));\n\t\t },\n\t\t mergeDeep: function() {\n\t\t return mergeIntoMapWith(this, deepMerger(undefined), arguments);\n\t\t },\n\t\t mergeDeepWith: function(merger) {\n\t\t for (var iters = [],\n\t\t $__5 = 1; $__5 < arguments.length; $__5++)\n\t\t iters[$__5 - 1] = arguments[$__5];\n\t\t return mergeIntoMapWith(this, deepMerger(merger), iters);\n\t\t },\n\t\t mergeDeepIn: function(keyPath) {\n\t\t for (var iters = [],\n\t\t $__6 = 1; $__6 < arguments.length; $__6++)\n\t\t iters[$__6 - 1] = arguments[$__6];\n\t\t return this.updateIn(keyPath, emptyMap(), (function(m) {\n\t\t return m.mergeDeep.apply(m, iters);\n\t\t }));\n\t\t },\n\t\t sort: function(comparator) {\n\t\t return OrderedMap(sortFactory(this, comparator));\n\t\t },\n\t\t sortBy: function(mapper, comparator) {\n\t\t return OrderedMap(sortFactory(this, comparator, mapper));\n\t\t },\n\t\t withMutations: function(fn) {\n\t\t var mutable = this.asMutable();\n\t\t fn(mutable);\n\t\t return mutable.wasAltered() ? mutable.__ensureOwner(this.__ownerID) : this;\n\t\t },\n\t\t asMutable: function() {\n\t\t return this.__ownerID ? this : this.__ensureOwner(new OwnerID());\n\t\t },\n\t\t asImmutable: function() {\n\t\t return this.__ensureOwner();\n\t\t },\n\t\t wasAltered: function() {\n\t\t return this.__altered;\n\t\t },\n\t\t __iterator: function(type, reverse) {\n\t\t return new MapIterator(this, type, reverse);\n\t\t },\n\t\t __iterate: function(fn, reverse) {\n\t\t var $__0 = this;\n\t\t var iterations = 0;\n\t\t this._root && this._root.iterate((function(entry) {\n\t\t iterations++;\n\t\t return fn(entry[1], entry[0], $__0);\n\t\t }), reverse);\n\t\t return iterations;\n\t\t },\n\t\t __ensureOwner: function(ownerID) {\n\t\t if (ownerID === this.__ownerID) {\n\t\t return this;\n\t\t }\n\t\t if (!ownerID) {\n\t\t this.__ownerID = ownerID;\n\t\t this.__altered = false;\n\t\t return this;\n\t\t }\n\t\t return makeMap(this.size, this._root, ownerID, this.__hash);\n\t\t }\n\t\t}, {}, KeyedCollection);\n\t\tfunction isMap(maybeMap) {\n\t\t return !!(maybeMap && maybeMap[IS_MAP_SENTINEL]);\n\t\t}\n\t\tMap.isMap = isMap;\n\t\tvar IS_MAP_SENTINEL = '@@__IMMUTABLE_MAP__@@';\n\t\tvar MapPrototype = Map.prototype;\n\t\tMapPrototype[IS_MAP_SENTINEL] = true;\n\t\tMapPrototype[DELETE] = MapPrototype.remove;\n\t\tMapPrototype.removeIn = MapPrototype.deleteIn;\n\t\tvar ArrayMapNode = function ArrayMapNode(ownerID, entries) {\n\t\t this.ownerID = ownerID;\n\t\t this.entries = entries;\n\t\t};\n\t\tvar $ArrayMapNode = ArrayMapNode;\n\t\t($traceurRuntime.createClass)(ArrayMapNode, {\n\t\t get: function(shift, keyHash, key, notSetValue) {\n\t\t var entries = this.entries;\n\t\t for (var ii = 0,\n\t\t len = entries.length; ii < len; ii++) {\n\t\t if (is(key, entries[ii][0])) {\n\t\t return entries[ii][1];\n\t\t }\n\t\t }\n\t\t return notSetValue;\n\t\t },\n\t\t update: function(ownerID, shift, keyHash, key, value, didChangeSize, didAlter) {\n\t\t var removed = value === NOT_SET;\n\t\t var entries = this.entries;\n\t\t var idx = 0;\n\t\t for (var len = entries.length; idx < len; idx++) {\n\t\t if (is(key, entries[idx][0])) {\n\t\t break;\n\t\t }\n\t\t }\n\t\t var exists = idx < len;\n\t\t if (exists ? entries[idx][1] === value : removed) {\n\t\t return this;\n\t\t }\n\t\t SetRef(didAlter);\n\t\t (removed || !exists) && SetRef(didChangeSize);\n\t\t if (removed && entries.length === 1) {\n\t\t return;\n\t\t }\n\t\t if (!exists && !removed && entries.length >= MAX_ARRAY_MAP_SIZE) {\n\t\t return createNodes(ownerID, entries, key, value);\n\t\t }\n\t\t var isEditable = ownerID && ownerID === this.ownerID;\n\t\t var newEntries = isEditable ? entries : arrCopy(entries);\n\t\t if (exists) {\n\t\t if (removed) {\n\t\t idx === len - 1 ? newEntries.pop() : (newEntries[idx] = newEntries.pop());\n\t\t } else {\n\t\t newEntries[idx] = [key, value];\n\t\t }\n\t\t } else {\n\t\t newEntries.push([key, value]);\n\t\t }\n\t\t if (isEditable) {\n\t\t this.entries = newEntries;\n\t\t return this;\n\t\t }\n\t\t return new $ArrayMapNode(ownerID, newEntries);\n\t\t }\n\t\t}, {});\n\t\tvar BitmapIndexedNode = function BitmapIndexedNode(ownerID, bitmap, nodes) {\n\t\t this.ownerID = ownerID;\n\t\t this.bitmap = bitmap;\n\t\t this.nodes = nodes;\n\t\t};\n\t\tvar $BitmapIndexedNode = BitmapIndexedNode;\n\t\t($traceurRuntime.createClass)(BitmapIndexedNode, {\n\t\t get: function(shift, keyHash, key, notSetValue) {\n\t\t if (keyHash === undefined) {\n\t\t keyHash = hash(key);\n\t\t }\n\t\t var bit = (1 << ((shift === 0 ? keyHash : keyHash >>> shift) & MASK));\n\t\t var bitmap = this.bitmap;\n\t\t return (bitmap & bit) === 0 ? notSetValue : this.nodes[popCount(bitmap & (bit - 1))].get(shift + SHIFT, keyHash, key, notSetValue);\n\t\t },\n\t\t update: function(ownerID, shift, keyHash, key, value, didChangeSize, didAlter) {\n\t\t if (keyHash === undefined) {\n\t\t keyHash = hash(key);\n\t\t }\n\t\t var keyHashFrag = (shift === 0 ? keyHash : keyHash >>> shift) & MASK;\n\t\t var bit = 1 << keyHashFrag;\n\t\t var bitmap = this.bitmap;\n\t\t var exists = (bitmap & bit) !== 0;\n\t\t if (!exists && value === NOT_SET) {\n\t\t return this;\n\t\t }\n\t\t var idx = popCount(bitmap & (bit - 1));\n\t\t var nodes = this.nodes;\n\t\t var node = exists ? nodes[idx] : undefined;\n\t\t var newNode = updateNode(node, ownerID, shift + SHIFT, keyHash, key, value, didChangeSize, didAlter);\n\t\t if (newNode === node) {\n\t\t return this;\n\t\t }\n\t\t if (!exists && newNode && nodes.length >= MAX_BITMAP_INDEXED_SIZE) {\n\t\t return expandNodes(ownerID, nodes, bitmap, keyHashFrag, newNode);\n\t\t }\n\t\t if (exists && !newNode && nodes.length === 2 && isLeafNode(nodes[idx ^ 1])) {\n\t\t return nodes[idx ^ 1];\n\t\t }\n\t\t if (exists && newNode && nodes.length === 1 && isLeafNode(newNode)) {\n\t\t return newNode;\n\t\t }\n\t\t var isEditable = ownerID && ownerID === this.ownerID;\n\t\t var newBitmap = exists ? newNode ? bitmap : bitmap ^ bit : bitmap | bit;\n\t\t var newNodes = exists ? newNode ? setIn(nodes, idx, newNode, isEditable) : spliceOut(nodes, idx, isEditable) : spliceIn(nodes, idx, newNode, isEditable);\n\t\t if (isEditable) {\n\t\t this.bitmap = newBitmap;\n\t\t this.nodes = newNodes;\n\t\t return this;\n\t\t }\n\t\t return new $BitmapIndexedNode(ownerID, newBitmap, newNodes);\n\t\t }\n\t\t}, {});\n\t\tvar HashArrayMapNode = function HashArrayMapNode(ownerID, count, nodes) {\n\t\t this.ownerID = ownerID;\n\t\t this.count = count;\n\t\t this.nodes = nodes;\n\t\t};\n\t\tvar $HashArrayMapNode = HashArrayMapNode;\n\t\t($traceurRuntime.createClass)(HashArrayMapNode, {\n\t\t get: function(shift, keyHash, key, notSetValue) {\n\t\t if (keyHash === undefined) {\n\t\t keyHash = hash(key);\n\t\t }\n\t\t var idx = (shift === 0 ? keyHash : keyHash >>> shift) & MASK;\n\t\t var node = this.nodes[idx];\n\t\t return node ? node.get(shift + SHIFT, keyHash, key, notSetValue) : notSetValue;\n\t\t },\n\t\t update: function(ownerID, shift, keyHash, key, value, didChangeSize, didAlter) {\n\t\t if (keyHash === undefined) {\n\t\t keyHash = hash(key);\n\t\t }\n\t\t var idx = (shift === 0 ? keyHash : keyHash >>> shift) & MASK;\n\t\t var removed = value === NOT_SET;\n\t\t var nodes = this.nodes;\n\t\t var node = nodes[idx];\n\t\t if (removed && !node) {\n\t\t return this;\n\t\t }\n\t\t var newNode = updateNode(node, ownerID, shift + SHIFT, keyHash, key, value, didChangeSize, didAlter);\n\t\t if (newNode === node) {\n\t\t return this;\n\t\t }\n\t\t var newCount = this.count;\n\t\t if (!node) {\n\t\t newCount++;\n\t\t } else if (!newNode) {\n\t\t newCount--;\n\t\t if (newCount < MIN_HASH_ARRAY_MAP_SIZE) {\n\t\t return packNodes(ownerID, nodes, newCount, idx);\n\t\t }\n\t\t }\n\t\t var isEditable = ownerID && ownerID === this.ownerID;\n\t\t var newNodes = setIn(nodes, idx, newNode, isEditable);\n\t\t if (isEditable) {\n\t\t this.count = newCount;\n\t\t this.nodes = newNodes;\n\t\t return this;\n\t\t }\n\t\t return new $HashArrayMapNode(ownerID, newCount, newNodes);\n\t\t }\n\t\t}, {});\n\t\tvar HashCollisionNode = function HashCollisionNode(ownerID, keyHash, entries) {\n\t\t this.ownerID = ownerID;\n\t\t this.keyHash = keyHash;\n\t\t this.entries = entries;\n\t\t};\n\t\tvar $HashCollisionNode = HashCollisionNode;\n\t\t($traceurRuntime.createClass)(HashCollisionNode, {\n\t\t get: function(shift, keyHash, key, notSetValue) {\n\t\t var entries = this.entries;\n\t\t for (var ii = 0,\n\t\t len = entries.length; ii < len; ii++) {\n\t\t if (is(key, entries[ii][0])) {\n\t\t return entries[ii][1];\n\t\t }\n\t\t }\n\t\t return notSetValue;\n\t\t },\n\t\t update: function(ownerID, shift, keyHash, key, value, didChangeSize, didAlter) {\n\t\t if (keyHash === undefined) {\n\t\t keyHash = hash(key);\n\t\t }\n\t\t var removed = value === NOT_SET;\n\t\t if (keyHash !== this.keyHash) {\n\t\t if (removed) {\n\t\t return this;\n\t\t }\n\t\t SetRef(didAlter);\n\t\t SetRef(didChangeSize);\n\t\t return mergeIntoNode(this, ownerID, shift, keyHash, [key, value]);\n\t\t }\n\t\t var entries = this.entries;\n\t\t var idx = 0;\n\t\t for (var len = entries.length; idx < len; idx++) {\n\t\t if (is(key, entries[idx][0])) {\n\t\t break;\n\t\t }\n\t\t }\n\t\t var exists = idx < len;\n\t\t if (exists ? entries[idx][1] === value : removed) {\n\t\t return this;\n\t\t }\n\t\t SetRef(didAlter);\n\t\t (removed || !exists) && SetRef(didChangeSize);\n\t\t if (removed && len === 2) {\n\t\t return new ValueNode(ownerID, this.keyHash, entries[idx ^ 1]);\n\t\t }\n\t\t var isEditable = ownerID && ownerID === this.ownerID;\n\t\t var newEntries = isEditable ? entries : arrCopy(entries);\n\t\t if (exists) {\n\t\t if (removed) {\n\t\t idx === len - 1 ? newEntries.pop() : (newEntries[idx] = newEntries.pop());\n\t\t } else {\n\t\t newEntries[idx] = [key, value];\n\t\t }\n\t\t } else {\n\t\t newEntries.push([key, value]);\n\t\t }\n\t\t if (isEditable) {\n\t\t this.entries = newEntries;\n\t\t return this;\n\t\t }\n\t\t return new $HashCollisionNode(ownerID, this.keyHash, newEntries);\n\t\t }\n\t\t}, {});\n\t\tvar ValueNode = function ValueNode(ownerID, keyHash, entry) {\n\t\t this.ownerID = ownerID;\n\t\t this.keyHash = keyHash;\n\t\t this.entry = entry;\n\t\t};\n\t\tvar $ValueNode = ValueNode;\n\t\t($traceurRuntime.createClass)(ValueNode, {\n\t\t get: function(shift, keyHash, key, notSetValue) {\n\t\t return is(key, this.entry[0]) ? this.entry[1] : notSetValue;\n\t\t },\n\t\t update: function(ownerID, shift, keyHash, key, value, didChangeSize, didAlter) {\n\t\t var removed = value === NOT_SET;\n\t\t var keyMatch = is(key, this.entry[0]);\n\t\t if (keyMatch ? value === this.entry[1] : removed) {\n\t\t return this;\n\t\t }\n\t\t SetRef(didAlter);\n\t\t if (removed) {\n\t\t SetRef(didChangeSize);\n\t\t return;\n\t\t }\n\t\t if (keyMatch) {\n\t\t if (ownerID && ownerID === this.ownerID) {\n\t\t this.entry[1] = value;\n\t\t return this;\n\t\t }\n\t\t return new $ValueNode(ownerID, this.keyHash, [key, value]);\n\t\t }\n\t\t SetRef(didChangeSize);\n\t\t return mergeIntoNode(this, ownerID, shift, hash(key), [key, value]);\n\t\t }\n\t\t}, {});\n\t\tArrayMapNode.prototype.iterate = HashCollisionNode.prototype.iterate = function(fn, reverse) {\n\t\t var entries = this.entries;\n\t\t for (var ii = 0,\n\t\t maxIndex = entries.length - 1; ii <= maxIndex; ii++) {\n\t\t if (fn(entries[reverse ? maxIndex - ii : ii]) === false) {\n\t\t return false;\n\t\t }\n\t\t }\n\t\t};\n\t\tBitmapIndexedNode.prototype.iterate = HashArrayMapNode.prototype.iterate = function(fn, reverse) {\n\t\t var nodes = this.nodes;\n\t\t for (var ii = 0,\n\t\t maxIndex = nodes.length - 1; ii <= maxIndex; ii++) {\n\t\t var node = nodes[reverse ? maxIndex - ii : ii];\n\t\t if (node && node.iterate(fn, reverse) === false) {\n\t\t return false;\n\t\t }\n\t\t }\n\t\t};\n\t\tValueNode.prototype.iterate = function(fn, reverse) {\n\t\t return fn(this.entry);\n\t\t};\n\t\tvar MapIterator = function MapIterator(map, type, reverse) {\n\t\t this._type = type;\n\t\t this._reverse = reverse;\n\t\t this._stack = map._root && mapIteratorFrame(map._root);\n\t\t};\n\t\t($traceurRuntime.createClass)(MapIterator, {next: function() {\n\t\t var type = this._type;\n\t\t var stack = this._stack;\n\t\t while (stack) {\n\t\t var node = stack.node;\n\t\t var index = stack.index++;\n\t\t var maxIndex;\n\t\t if (node.entry) {\n\t\t if (index === 0) {\n\t\t return mapIteratorValue(type, node.entry);\n\t\t }\n\t\t } else if (node.entries) {\n\t\t maxIndex = node.entries.length - 1;\n\t\t if (index <= maxIndex) {\n\t\t return mapIteratorValue(type, node.entries[this._reverse ? maxIndex - index : index]);\n\t\t }\n\t\t } else {\n\t\t maxIndex = node.nodes.length - 1;\n\t\t if (index <= maxIndex) {\n\t\t var subNode = node.nodes[this._reverse ? maxIndex - index : index];\n\t\t if (subNode) {\n\t\t if (subNode.entry) {\n\t\t return mapIteratorValue(type, subNode.entry);\n\t\t }\n\t\t stack = this._stack = mapIteratorFrame(subNode, stack);\n\t\t }\n\t\t continue;\n\t\t }\n\t\t }\n\t\t stack = this._stack = this._stack.__prev;\n\t\t }\n\t\t return iteratorDone();\n\t\t }}, {}, Iterator);\n\t\tfunction mapIteratorValue(type, entry) {\n\t\t return iteratorValue(type, entry[0], entry[1]);\n\t\t}\n\t\tfunction mapIteratorFrame(node, prev) {\n\t\t return {\n\t\t node: node,\n\t\t index: 0,\n\t\t __prev: prev\n\t\t };\n\t\t}\n\t\tfunction makeMap(size, root, ownerID, hash) {\n\t\t var map = Object.create(MapPrototype);\n\t\t map.size = size;\n\t\t map._root = root;\n\t\t map.__ownerID = ownerID;\n\t\t map.__hash = hash;\n\t\t map.__altered = false;\n\t\t return map;\n\t\t}\n\t\tvar EMPTY_MAP;\n\t\tfunction emptyMap() {\n\t\t return EMPTY_MAP || (EMPTY_MAP = makeMap(0));\n\t\t}\n\t\tfunction updateMap(map, k, v) {\n\t\t var newRoot;\n\t\t var newSize;\n\t\t if (!map._root) {\n\t\t if (v === NOT_SET) {\n\t\t return map;\n\t\t }\n\t\t newSize = 1;\n\t\t newRoot = new ArrayMapNode(map.__ownerID, [[k, v]]);\n\t\t } else {\n\t\t var didChangeSize = MakeRef(CHANGE_LENGTH);\n\t\t var didAlter = MakeRef(DID_ALTER);\n\t\t newRoot = updateNode(map._root, map.__ownerID, 0, undefined, k, v, didChangeSize, didAlter);\n\t\t if (!didAlter.value) {\n\t\t return map;\n\t\t }\n\t\t newSize = map.size + (didChangeSize.value ? v === NOT_SET ? -1 : 1 : 0);\n\t\t }\n\t\t if (map.__ownerID) {\n\t\t map.size = newSize;\n\t\t map._root = newRoot;\n\t\t map.__hash = undefined;\n\t\t map.__altered = true;\n\t\t return map;\n\t\t }\n\t\t return newRoot ? makeMap(newSize, newRoot) : emptyMap();\n\t\t}\n\t\tfunction updateNode(node, ownerID, shift, keyHash, key, value, didChangeSize, didAlter) {\n\t\t if (!node) {\n\t\t if (value === NOT_SET) {\n\t\t return node;\n\t\t }\n\t\t SetRef(didAlter);\n\t\t SetRef(didChangeSize);\n\t\t return new ValueNode(ownerID, keyHash, [key, value]);\n\t\t }\n\t\t return node.update(ownerID, shift, keyHash, key, value, didChangeSize, didAlter);\n\t\t}\n\t\tfunction isLeafNode(node) {\n\t\t return node.constructor === ValueNode || node.constructor === HashCollisionNode;\n\t\t}\n\t\tfunction mergeIntoNode(node, ownerID, shift, keyHash, entry) {\n\t\t if (node.keyHash === keyHash) {\n\t\t return new HashCollisionNode(ownerID, keyHash, [node.entry, entry]);\n\t\t }\n\t\t var idx1 = (shift === 0 ? node.keyHash : node.keyHash >>> shift) & MASK;\n\t\t var idx2 = (shift === 0 ? keyHash : keyHash >>> shift) & MASK;\n\t\t var newNode;\n\t\t var nodes = idx1 === idx2 ? [mergeIntoNode(node, ownerID, shift + SHIFT, keyHash, entry)] : ((newNode = new ValueNode(ownerID, keyHash, entry)), idx1 < idx2 ? [node, newNode] : [newNode, node]);\n\t\t return new BitmapIndexedNode(ownerID, (1 << idx1) | (1 << idx2), nodes);\n\t\t}\n\t\tfunction createNodes(ownerID, entries, key, value) {\n\t\t if (!ownerID) {\n\t\t ownerID = new OwnerID();\n\t\t }\n\t\t var node = new ValueNode(ownerID, hash(key), [key, value]);\n\t\t for (var ii = 0; ii < entries.length; ii++) {\n\t\t var entry = entries[ii];\n\t\t node = node.update(ownerID, 0, undefined, entry[0], entry[1]);\n\t\t }\n\t\t return node;\n\t\t}\n\t\tfunction packNodes(ownerID, nodes, count, excluding) {\n\t\t var bitmap = 0;\n\t\t var packedII = 0;\n\t\t var packedNodes = new Array(count);\n\t\t for (var ii = 0,\n\t\t bit = 1,\n\t\t len = nodes.length; ii < len; ii++, bit <<= 1) {\n\t\t var node = nodes[ii];\n\t\t if (node !== undefined && ii !== excluding) {\n\t\t bitmap |= bit;\n\t\t packedNodes[packedII++] = node;\n\t\t }\n\t\t }\n\t\t return new BitmapIndexedNode(ownerID, bitmap, packedNodes);\n\t\t}\n\t\tfunction expandNodes(ownerID, nodes, bitmap, including, node) {\n\t\t var count = 0;\n\t\t var expandedNodes = new Array(SIZE);\n\t\t for (var ii = 0; bitmap !== 0; ii++, bitmap >>>= 1) {\n\t\t expandedNodes[ii] = bitmap & 1 ? nodes[count++] : undefined;\n\t\t }\n\t\t expandedNodes[including] = node;\n\t\t return new HashArrayMapNode(ownerID, count + 1, expandedNodes);\n\t\t}\n\t\tfunction mergeIntoMapWith(map, merger, iterables) {\n\t\t var iters = [];\n\t\t for (var ii = 0; ii < iterables.length; ii++) {\n\t\t var value = iterables[ii];\n\t\t var iter = KeyedIterable(value);\n\t\t if (!isIterable(value)) {\n\t\t iter = iter.map((function(v) {\n\t\t return fromJS(v);\n\t\t }));\n\t\t }\n\t\t iters.push(iter);\n\t\t }\n\t\t return mergeIntoCollectionWith(map, merger, iters);\n\t\t}\n\t\tfunction deepMerger(merger) {\n\t\t return (function(existing, value) {\n\t\t return existing && existing.mergeDeepWith && isIterable(value) ? existing.mergeDeepWith(merger, value) : merger ? merger(existing, value) : value;\n\t\t });\n\t\t}\n\t\tfunction mergeIntoCollectionWith(collection, merger, iters) {\n\t\t iters = iters.filter((function(x) {\n\t\t return x.size !== 0;\n\t\t }));\n\t\t if (iters.length === 0) {\n\t\t return collection;\n\t\t }\n\t\t if (collection.size === 0 && iters.length === 1) {\n\t\t return collection.constructor(iters[0]);\n\t\t }\n\t\t return collection.withMutations((function(collection) {\n\t\t var mergeIntoMap = merger ? (function(value, key) {\n\t\t collection.update(key, NOT_SET, (function(existing) {\n\t\t return existing === NOT_SET ? value : merger(existing, value);\n\t\t }));\n\t\t }) : (function(value, key) {\n\t\t collection.set(key, value);\n\t\t });\n\t\t for (var ii = 0; ii < iters.length; ii++) {\n\t\t iters[ii].forEach(mergeIntoMap);\n\t\t }\n\t\t }));\n\t\t}\n\t\tfunction updateInDeepMap(existing, keyPathIter, notSetValue, updater) {\n\t\t var isNotSet = existing === NOT_SET;\n\t\t var step = keyPathIter.next();\n\t\t if (step.done) {\n\t\t var existingValue = isNotSet ? notSetValue : existing;\n\t\t var newValue = updater(existingValue);\n\t\t return newValue === existingValue ? existing : newValue;\n\t\t }\n\t\t invariant(isNotSet || (existing && existing.set), 'invalid keyPath');\n\t\t var key = step.value;\n\t\t var nextExisting = isNotSet ? NOT_SET : existing.get(key, NOT_SET);\n\t\t var nextUpdated = updateInDeepMap(nextExisting, keyPathIter, notSetValue, updater);\n\t\t return nextUpdated === nextExisting ? existing : nextUpdated === NOT_SET ? existing.remove(key) : (isNotSet ? emptyMap() : existing).set(key, nextUpdated);\n\t\t}\n\t\tfunction popCount(x) {\n\t\t x = x - ((x >> 1) & 0x55555555);\n\t\t x = (x & 0x33333333) + ((x >> 2) & 0x33333333);\n\t\t x = (x + (x >> 4)) & 0x0f0f0f0f;\n\t\t x = x + (x >> 8);\n\t\t x = x + (x >> 16);\n\t\t return x & 0x7f;\n\t\t}\n\t\tfunction setIn(array, idx, val, canEdit) {\n\t\t var newArray = canEdit ? array : arrCopy(array);\n\t\t newArray[idx] = val;\n\t\t return newArray;\n\t\t}\n\t\tfunction spliceIn(array, idx, val, canEdit) {\n\t\t var newLen = array.length + 1;\n\t\t if (canEdit && idx + 1 === newLen) {\n\t\t array[idx] = val;\n\t\t return array;\n\t\t }\n\t\t var newArray = new Array(newLen);\n\t\t var after = 0;\n\t\t for (var ii = 0; ii < newLen; ii++) {\n\t\t if (ii === idx) {\n\t\t newArray[ii] = val;\n\t\t after = -1;\n\t\t } else {\n\t\t newArray[ii] = array[ii + after];\n\t\t }\n\t\t }\n\t\t return newArray;\n\t\t}\n\t\tfunction spliceOut(array, idx, canEdit) {\n\t\t var newLen = array.length - 1;\n\t\t if (canEdit && idx === newLen) {\n\t\t array.pop();\n\t\t return array;\n\t\t }\n\t\t var newArray = new Array(newLen);\n\t\t var after = 0;\n\t\t for (var ii = 0; ii < newLen; ii++) {\n\t\t if (ii === idx) {\n\t\t after = 1;\n\t\t }\n\t\t newArray[ii] = array[ii + after];\n\t\t }\n\t\t return newArray;\n\t\t}\n\t\tvar MAX_ARRAY_MAP_SIZE = SIZE / 4;\n\t\tvar MAX_BITMAP_INDEXED_SIZE = SIZE / 2;\n\t\tvar MIN_HASH_ARRAY_MAP_SIZE = SIZE / 4;\n\t\tvar ToKeyedSequence = function ToKeyedSequence(indexed, useKeys) {\n\t\t this._iter = indexed;\n\t\t this._useKeys = useKeys;\n\t\t this.size = indexed.size;\n\t\t};\n\t\t($traceurRuntime.createClass)(ToKeyedSequence, {\n\t\t get: function(key, notSetValue) {\n\t\t return this._iter.get(key, notSetValue);\n\t\t },\n\t\t has: function(key) {\n\t\t return this._iter.has(key);\n\t\t },\n\t\t valueSeq: function() {\n\t\t return this._iter.valueSeq();\n\t\t },\n\t\t reverse: function() {\n\t\t var $__0 = this;\n\t\t var reversedSequence = reverseFactory(this, true);\n\t\t if (!this._useKeys) {\n\t\t reversedSequence.valueSeq = (function() {\n\t\t return $__0._iter.toSeq().reverse();\n\t\t });\n\t\t }\n\t\t return reversedSequence;\n\t\t },\n\t\t map: function(mapper, context) {\n\t\t var $__0 = this;\n\t\t var mappedSequence = mapFactory(this, mapper, context);\n\t\t if (!this._useKeys) {\n\t\t mappedSequence.valueSeq = (function() {\n\t\t return $__0._iter.toSeq().map(mapper, context);\n\t\t });\n\t\t }\n\t\t return mappedSequence;\n\t\t },\n\t\t __iterate: function(fn, reverse) {\n\t\t var $__0 = this;\n\t\t var ii;\n\t\t return this._iter.__iterate(this._useKeys ? (function(v, k) {\n\t\t return fn(v, k, $__0);\n\t\t }) : ((ii = reverse ? resolveSize(this) : 0), (function(v) {\n\t\t return fn(v, reverse ? --ii : ii++, $__0);\n\t\t })), reverse);\n\t\t },\n\t\t __iterator: function(type, reverse) {\n\t\t if (this._useKeys) {\n\t\t return this._iter.__iterator(type, reverse);\n\t\t }\n\t\t var iterator = this._iter.__iterator(ITERATE_VALUES, reverse);\n\t\t var ii = reverse ? resolveSize(this) : 0;\n\t\t return new Iterator((function() {\n\t\t var step = iterator.next();\n\t\t return step.done ? step : iteratorValue(type, reverse ? --ii : ii++, step.value, step);\n\t\t }));\n\t\t }\n\t\t}, {}, KeyedSeq);\n\t\tToKeyedSequence.prototype[IS_ORDERED_SENTINEL] = true;\n\t\tvar ToIndexedSequence = function ToIndexedSequence(iter) {\n\t\t this._iter = iter;\n\t\t this.size = iter.size;\n\t\t};\n\t\t($traceurRuntime.createClass)(ToIndexedSequence, {\n\t\t contains: function(value) {\n\t\t return this._iter.contains(value);\n\t\t },\n\t\t __iterate: function(fn, reverse) {\n\t\t var $__0 = this;\n\t\t var iterations = 0;\n\t\t return this._iter.__iterate((function(v) {\n\t\t return fn(v, iterations++, $__0);\n\t\t }), reverse);\n\t\t },\n\t\t __iterator: function(type, reverse) {\n\t\t var iterator = this._iter.__iterator(ITERATE_VALUES, reverse);\n\t\t var iterations = 0;\n\t\t return new Iterator((function() {\n\t\t var step = iterator.next();\n\t\t return step.done ? step : iteratorValue(type, iterations++, step.value, step);\n\t\t }));\n\t\t }\n\t\t}, {}, IndexedSeq);\n\t\tvar ToSetSequence = function ToSetSequence(iter) {\n\t\t this._iter = iter;\n\t\t this.size = iter.size;\n\t\t};\n\t\t($traceurRuntime.createClass)(ToSetSequence, {\n\t\t has: function(key) {\n\t\t return this._iter.contains(key);\n\t\t },\n\t\t __iterate: function(fn, reverse) {\n\t\t var $__0 = this;\n\t\t return this._iter.__iterate((function(v) {\n\t\t return fn(v, v, $__0);\n\t\t }), reverse);\n\t\t },\n\t\t __iterator: function(type, reverse) {\n\t\t var iterator = this._iter.__iterator(ITERATE_VALUES, reverse);\n\t\t return new Iterator((function() {\n\t\t var step = iterator.next();\n\t\t return step.done ? step : iteratorValue(type, step.value, step.value, step);\n\t\t }));\n\t\t }\n\t\t}, {}, SetSeq);\n\t\tvar FromEntriesSequence = function FromEntriesSequence(entries) {\n\t\t this._iter = entries;\n\t\t this.size = entries.size;\n\t\t};\n\t\t($traceurRuntime.createClass)(FromEntriesSequence, {\n\t\t entrySeq: function() {\n\t\t return this._iter.toSeq();\n\t\t },\n\t\t __iterate: function(fn, reverse) {\n\t\t var $__0 = this;\n\t\t return this._iter.__iterate((function(entry) {\n\t\t if (entry) {\n\t\t validateEntry(entry);\n\t\t return fn(entry[1], entry[0], $__0);\n\t\t }\n\t\t }), reverse);\n\t\t },\n\t\t __iterator: function(type, reverse) {\n\t\t var iterator = this._iter.__iterator(ITERATE_VALUES, reverse);\n\t\t return new Iterator((function() {\n\t\t while (true) {\n\t\t var step = iterator.next();\n\t\t if (step.done) {\n\t\t return step;\n\t\t }\n\t\t var entry = step.value;\n\t\t if (entry) {\n\t\t validateEntry(entry);\n\t\t return type === ITERATE_ENTRIES ? step : iteratorValue(type, entry[0], entry[1], step);\n\t\t }\n\t\t }\n\t\t }));\n\t\t }\n\t\t}, {}, KeyedSeq);\n\t\tToIndexedSequence.prototype.cacheResult = ToKeyedSequence.prototype.cacheResult = ToSetSequence.prototype.cacheResult = FromEntriesSequence.prototype.cacheResult = cacheResultThrough;\n\t\tfunction flipFactory(iterable) {\n\t\t var flipSequence = makeSequence(iterable);\n\t\t flipSequence._iter = iterable;\n\t\t flipSequence.size = iterable.size;\n\t\t flipSequence.flip = (function() {\n\t\t return iterable;\n\t\t });\n\t\t flipSequence.reverse = function() {\n\t\t var reversedSequence = iterable.reverse.apply(this);\n\t\t reversedSequence.flip = (function() {\n\t\t return iterable.reverse();\n\t\t });\n\t\t return reversedSequence;\n\t\t };\n\t\t flipSequence.has = (function(key) {\n\t\t return iterable.contains(key);\n\t\t });\n\t\t flipSequence.contains = (function(key) {\n\t\t return iterable.has(key);\n\t\t });\n\t\t flipSequence.cacheResult = cacheResultThrough;\n\t\t flipSequence.__iterateUncached = function(fn, reverse) {\n\t\t var $__0 = this;\n\t\t return iterable.__iterate((function(v, k) {\n\t\t return fn(k, v, $__0) !== false;\n\t\t }), reverse);\n\t\t };\n\t\t flipSequence.__iteratorUncached = function(type, reverse) {\n\t\t if (type === ITERATE_ENTRIES) {\n\t\t var iterator = iterable.__iterator(type, reverse);\n\t\t return new Iterator((function() {\n\t\t var step = iterator.next();\n\t\t if (!step.done) {\n\t\t var k = step.value[0];\n\t\t step.value[0] = step.value[1];\n\t\t step.value[1] = k;\n\t\t }\n\t\t return step;\n\t\t }));\n\t\t }\n\t\t return iterable.__iterator(type === ITERATE_VALUES ? ITERATE_KEYS : ITERATE_VALUES, reverse);\n\t\t };\n\t\t return flipSequence;\n\t\t}\n\t\tfunction mapFactory(iterable, mapper, context) {\n\t\t var mappedSequence = makeSequence(iterable);\n\t\t mappedSequence.size = iterable.size;\n\t\t mappedSequence.has = (function(key) {\n\t\t return iterable.has(key);\n\t\t });\n\t\t mappedSequence.get = (function(key, notSetValue) {\n\t\t var v = iterable.get(key, NOT_SET);\n\t\t return v === NOT_SET ? notSetValue : mapper.call(context, v, key, iterable);\n\t\t });\n\t\t mappedSequence.__iterateUncached = function(fn, reverse) {\n\t\t var $__0 = this;\n\t\t return iterable.__iterate((function(v, k, c) {\n\t\t return fn(mapper.call(context, v, k, c), k, $__0) !== false;\n\t\t }), reverse);\n\t\t };\n\t\t mappedSequence.__iteratorUncached = function(type, reverse) {\n\t\t var iterator = iterable.__iterator(ITERATE_ENTRIES, reverse);\n\t\t return new Iterator((function() {\n\t\t var step = iterator.next();\n\t\t if (step.done) {\n\t\t return step;\n\t\t }\n\t\t var entry = step.value;\n\t\t var key = entry[0];\n\t\t return iteratorValue(type, key, mapper.call(context, entry[1], key, iterable), step);\n\t\t }));\n\t\t };\n\t\t return mappedSequence;\n\t\t}\n\t\tfunction reverseFactory(iterable, useKeys) {\n\t\t var reversedSequence = makeSequence(iterable);\n\t\t reversedSequence._iter = iterable;\n\t\t reversedSequence.size = iterable.size;\n\t\t reversedSequence.reverse = (function() {\n\t\t return iterable;\n\t\t });\n\t\t if (iterable.flip) {\n\t\t reversedSequence.flip = function() {\n\t\t var flipSequence = flipFactory(iterable);\n\t\t flipSequence.reverse = (function() {\n\t\t return iterable.flip();\n\t\t });\n\t\t return flipSequence;\n\t\t };\n\t\t }\n\t\t reversedSequence.get = (function(key, notSetValue) {\n\t\t return iterable.get(useKeys ? key : -1 - key, notSetValue);\n\t\t });\n\t\t reversedSequence.has = (function(key) {\n\t\t return iterable.has(useKeys ? key : -1 - key);\n\t\t });\n\t\t reversedSequence.contains = (function(value) {\n\t\t return iterable.contains(value);\n\t\t });\n\t\t reversedSequence.cacheResult = cacheResultThrough;\n\t\t reversedSequence.__iterate = function(fn, reverse) {\n\t\t var $__0 = this;\n\t\t return iterable.__iterate((function(v, k) {\n\t\t return fn(v, k, $__0);\n\t\t }), !reverse);\n\t\t };\n\t\t reversedSequence.__iterator = (function(type, reverse) {\n\t\t return iterable.__iterator(type, !reverse);\n\t\t });\n\t\t return reversedSequence;\n\t\t}\n\t\tfunction filterFactory(iterable, predicate, context, useKeys) {\n\t\t var filterSequence = makeSequence(iterable);\n\t\t if (useKeys) {\n\t\t filterSequence.has = (function(key) {\n\t\t var v = iterable.get(key, NOT_SET);\n\t\t return v !== NOT_SET && !!predicate.call(context, v, key, iterable);\n\t\t });\n\t\t filterSequence.get = (function(key, notSetValue) {\n\t\t var v = iterable.get(key, NOT_SET);\n\t\t return v !== NOT_SET && predicate.call(context, v, key, iterable) ? v : notSetValue;\n\t\t });\n\t\t }\n\t\t filterSequence.__iterateUncached = function(fn, reverse) {\n\t\t var $__0 = this;\n\t\t var iterations = 0;\n\t\t iterable.__iterate((function(v, k, c) {\n\t\t if (predicate.call(context, v, k, c)) {\n\t\t iterations++;\n\t\t return fn(v, useKeys ? k : iterations - 1, $__0);\n\t\t }\n\t\t }), reverse);\n\t\t return iterations;\n\t\t };\n\t\t filterSequence.__iteratorUncached = function(type, reverse) {\n\t\t var iterator = iterable.__iterator(ITERATE_ENTRIES, reverse);\n\t\t var iterations = 0;\n\t\t return new Iterator((function() {\n\t\t while (true) {\n\t\t var step = iterator.next();\n\t\t if (step.done) {\n\t\t return step;\n\t\t }\n\t\t var entry = step.value;\n\t\t var key = entry[0];\n\t\t var value = entry[1];\n\t\t if (predicate.call(context, value, key, iterable)) {\n\t\t return iteratorValue(type, useKeys ? key : iterations++, value, step);\n\t\t }\n\t\t }\n\t\t }));\n\t\t };\n\t\t return filterSequence;\n\t\t}\n\t\tfunction countByFactory(iterable, grouper, context) {\n\t\t var groups = Map().asMutable();\n\t\t iterable.__iterate((function(v, k) {\n\t\t groups.update(grouper.call(context, v, k, iterable), 0, (function(a) {\n\t\t return a + 1;\n\t\t }));\n\t\t }));\n\t\t return groups.asImmutable();\n\t\t}\n\t\tfunction groupByFactory(iterable, grouper, context) {\n\t\t var isKeyedIter = isKeyed(iterable);\n\t\t var groups = Map().asMutable();\n\t\t iterable.__iterate((function(v, k) {\n\t\t groups.update(grouper.call(context, v, k, iterable), (function(a) {\n\t\t return (a = a || [], a.push(isKeyedIter ? [k, v] : v), a);\n\t\t }));\n\t\t }));\n\t\t var coerce = iterableClass(iterable);\n\t\t return groups.map((function(arr) {\n\t\t return reify(iterable, coerce(arr));\n\t\t }));\n\t\t}\n\t\tfunction takeFactory(iterable, amount) {\n\t\t if (amount > iterable.size) {\n\t\t return iterable;\n\t\t }\n\t\t if (amount < 0) {\n\t\t amount = 0;\n\t\t }\n\t\t var takeSequence = makeSequence(iterable);\n\t\t takeSequence.size = iterable.size && Math.min(iterable.size, amount);\n\t\t takeSequence.__iterateUncached = function(fn, reverse) {\n\t\t var $__0 = this;\n\t\t if (amount === 0) {\n\t\t return 0;\n\t\t }\n\t\t if (reverse) {\n\t\t return this.cacheResult().__iterate(fn, reverse);\n\t\t }\n\t\t var iterations = 0;\n\t\t iterable.__iterate((function(v, k) {\n\t\t return ++iterations && fn(v, k, $__0) !== false && iterations < amount;\n\t\t }));\n\t\t return iterations;\n\t\t };\n\t\t takeSequence.__iteratorUncached = function(type, reverse) {\n\t\t if (reverse) {\n\t\t return this.cacheResult().__iterator(type, reverse);\n\t\t }\n\t\t var iterator = amount && iterable.__iterator(type, reverse);\n\t\t var iterations = 0;\n\t\t return new Iterator((function() {\n\t\t if (iterations++ > amount) {\n\t\t return iteratorDone();\n\t\t }\n\t\t return iterator.next();\n\t\t }));\n\t\t };\n\t\t return takeSequence;\n\t\t}\n\t\tfunction takeWhileFactory(iterable, predicate, context) {\n\t\t var takeSequence = makeSequence(iterable);\n\t\t takeSequence.__iterateUncached = function(fn, reverse) {\n\t\t var $__0 = this;\n\t\t if (reverse) {\n\t\t return this.cacheResult().__iterate(fn, reverse);\n\t\t }\n\t\t var iterations = 0;\n\t\t iterable.__iterate((function(v, k, c) {\n\t\t return predicate.call(context, v, k, c) && ++iterations && fn(v, k, $__0);\n\t\t }));\n\t\t return iterations;\n\t\t };\n\t\t takeSequence.__iteratorUncached = function(type, reverse) {\n\t\t var $__0 = this;\n\t\t if (reverse) {\n\t\t return this.cacheResult().__iterator(type, reverse);\n\t\t }\n\t\t var iterator = iterable.__iterator(ITERATE_ENTRIES, reverse);\n\t\t var iterating = true;\n\t\t return new Iterator((function() {\n\t\t if (!iterating) {\n\t\t return iteratorDone();\n\t\t }\n\t\t var step = iterator.next();\n\t\t if (step.done) {\n\t\t return step;\n\t\t }\n\t\t var entry = step.value;\n\t\t var k = entry[0];\n\t\t var v = entry[1];\n\t\t if (!predicate.call(context, v, k, $__0)) {\n\t\t iterating = false;\n\t\t return iteratorDone();\n\t\t }\n\t\t return type === ITERATE_ENTRIES ? step : iteratorValue(type, k, v, step);\n\t\t }));\n\t\t };\n\t\t return takeSequence;\n\t\t}\n\t\tfunction skipFactory(iterable, amount, useKeys) {\n\t\t if (amount <= 0) {\n\t\t return iterable;\n\t\t }\n\t\t var skipSequence = makeSequence(iterable);\n\t\t skipSequence.size = iterable.size && Math.max(0, iterable.size - amount);\n\t\t skipSequence.__iterateUncached = function(fn, reverse) {\n\t\t var $__0 = this;\n\t\t if (reverse) {\n\t\t return this.cacheResult().__iterate(fn, reverse);\n\t\t }\n\t\t var skipped = 0;\n\t\t var isSkipping = true;\n\t\t var iterations = 0;\n\t\t iterable.__iterate((function(v, k) {\n\t\t if (!(isSkipping && (isSkipping = skipped++ < amount))) {\n\t\t iterations++;\n\t\t return fn(v, useKeys ? k : iterations - 1, $__0);\n\t\t }\n\t\t }));\n\t\t return iterations;\n\t\t };\n\t\t skipSequence.__iteratorUncached = function(type, reverse) {\n\t\t if (reverse) {\n\t\t return this.cacheResult().__iterator(type, reverse);\n\t\t }\n\t\t var iterator = amount && iterable.__iterator(type, reverse);\n\t\t var skipped = 0;\n\t\t var iterations = 0;\n\t\t return new Iterator((function() {\n\t\t while (skipped < amount) {\n\t\t skipped++;\n\t\t iterator.next();\n\t\t }\n\t\t var step = iterator.next();\n\t\t if (useKeys || type === ITERATE_VALUES) {\n\t\t return step;\n\t\t } else if (type === ITERATE_KEYS) {\n\t\t return iteratorValue(type, iterations++, undefined, step);\n\t\t } else {\n\t\t return iteratorValue(type, iterations++, step.value[1], step);\n\t\t }\n\t\t }));\n\t\t };\n\t\t return skipSequence;\n\t\t}\n\t\tfunction skipWhileFactory(iterable, predicate, context, useKeys) {\n\t\t var skipSequence = makeSequence(iterable);\n\t\t skipSequence.__iterateUncached = function(fn, reverse) {\n\t\t var $__0 = this;\n\t\t if (reverse) {\n\t\t return this.cacheResult().__iterate(fn, reverse);\n\t\t }\n\t\t var isSkipping = true;\n\t\t var iterations = 0;\n\t\t iterable.__iterate((function(v, k, c) {\n\t\t if (!(isSkipping && (isSkipping = predicate.call(context, v, k, c)))) {\n\t\t iterations++;\n\t\t return fn(v, useKeys ? k : iterations - 1, $__0);\n\t\t }\n\t\t }));\n\t\t return iterations;\n\t\t };\n\t\t skipSequence.__iteratorUncached = function(type, reverse) {\n\t\t var $__0 = this;\n\t\t if (reverse) {\n\t\t return this.cacheResult().__iterator(type, reverse);\n\t\t }\n\t\t var iterator = iterable.__iterator(ITERATE_ENTRIES, reverse);\n\t\t var skipping = true;\n\t\t var iterations = 0;\n\t\t return new Iterator((function() {\n\t\t var step,\n\t\t k,\n\t\t v;\n\t\t do {\n\t\t step = iterator.next();\n\t\t if (step.done) {\n\t\t if (useKeys || type === ITERATE_VALUES) {\n\t\t return step;\n\t\t } else if (type === ITERATE_KEYS) {\n\t\t return iteratorValue(type, iterations++, undefined, step);\n\t\t } else {\n\t\t return iteratorValue(type, iterations++, step.value[1], step);\n\t\t }\n\t\t }\n\t\t var entry = step.value;\n\t\t k = entry[0];\n\t\t v = entry[1];\n\t\t skipping && (skipping = predicate.call(context, v, k, $__0));\n\t\t } while (skipping);\n\t\t return type === ITERATE_ENTRIES ? step : iteratorValue(type, k, v, step);\n\t\t }));\n\t\t };\n\t\t return skipSequence;\n\t\t}\n\t\tfunction concatFactory(iterable, values) {\n\t\t var isKeyedIterable = isKeyed(iterable);\n\t\t var iters = [iterable].concat(values).map((function(v) {\n\t\t if (!isIterable(v)) {\n\t\t v = isKeyedIterable ? keyedSeqFromValue(v) : indexedSeqFromValue(Array.isArray(v) ? v : [v]);\n\t\t } else if (isKeyedIterable) {\n\t\t v = KeyedIterable(v);\n\t\t }\n\t\t return v;\n\t\t })).filter((function(v) {\n\t\t return v.size !== 0;\n\t\t }));\n\t\t if (iters.length === 0) {\n\t\t return iterable;\n\t\t }\n\t\t if (iters.length === 1) {\n\t\t var singleton = iters[0];\n\t\t if (singleton === iterable || isKeyedIterable && isKeyed(singleton) || isIndexed(iterable) && isIndexed(singleton)) {\n\t\t return singleton;\n\t\t }\n\t\t }\n\t\t var concatSeq = new ArraySeq(iters);\n\t\t if (isKeyedIterable) {\n\t\t concatSeq = concatSeq.toKeyedSeq();\n\t\t } else if (!isIndexed(iterable)) {\n\t\t concatSeq = concatSeq.toSetSeq();\n\t\t }\n\t\t concatSeq = concatSeq.flatten(true);\n\t\t concatSeq.size = iters.reduce((function(sum, seq) {\n\t\t if (sum !== undefined) {\n\t\t var size = seq.size;\n\t\t if (size !== undefined) {\n\t\t return sum + size;\n\t\t }\n\t\t }\n\t\t }), 0);\n\t\t return concatSeq;\n\t\t}\n\t\tfunction flattenFactory(iterable, depth, useKeys) {\n\t\t var flatSequence = makeSequence(iterable);\n\t\t flatSequence.__iterateUncached = function(fn, reverse) {\n\t\t var iterations = 0;\n\t\t var stopped = false;\n\t\t function flatDeep(iter, currentDepth) {\n\t\t var $__0 = this;\n\t\t iter.__iterate((function(v, k) {\n\t\t if ((!depth || currentDepth < depth) && isIterable(v)) {\n\t\t flatDeep(v, currentDepth + 1);\n\t\t } else if (fn(v, useKeys ? k : iterations++, $__0) === false) {\n\t\t stopped = true;\n\t\t }\n\t\t return !stopped;\n\t\t }), reverse);\n\t\t }\n\t\t flatDeep(iterable, 0);\n\t\t return iterations;\n\t\t };\n\t\t flatSequence.__iteratorUncached = function(type, reverse) {\n\t\t var iterator = iterable.__iterator(type, reverse);\n\t\t var stack = [];\n\t\t var iterations = 0;\n\t\t return new Iterator((function() {\n\t\t while (iterator) {\n\t\t var step = iterator.next();\n\t\t if (step.done !== false) {\n\t\t iterator = stack.pop();\n\t\t continue;\n\t\t }\n\t\t var v = step.value;\n\t\t if (type === ITERATE_ENTRIES) {\n\t\t v = v[1];\n\t\t }\n\t\t if ((!depth || stack.length < depth) && isIterable(v)) {\n\t\t stack.push(iterator);\n\t\t iterator = v.__iterator(type, reverse);\n\t\t } else {\n\t\t return useKeys ? step : iteratorValue(type, iterations++, v, step);\n\t\t }\n\t\t }\n\t\t return iteratorDone();\n\t\t }));\n\t\t };\n\t\t return flatSequence;\n\t\t}\n\t\tfunction flatMapFactory(iterable, mapper, context) {\n\t\t var coerce = iterableClass(iterable);\n\t\t return iterable.toSeq().map((function(v, k) {\n\t\t return coerce(mapper.call(context, v, k, iterable));\n\t\t })).flatten(true);\n\t\t}\n\t\tfunction interposeFactory(iterable, separator) {\n\t\t var interposedSequence = makeSequence(iterable);\n\t\t interposedSequence.size = iterable.size && iterable.size * 2 - 1;\n\t\t interposedSequence.__iterateUncached = function(fn, reverse) {\n\t\t var $__0 = this;\n\t\t var iterations = 0;\n\t\t iterable.__iterate((function(v, k) {\n\t\t return (!iterations || fn(separator, iterations++, $__0) !== false) && fn(v, iterations++, $__0) !== false;\n\t\t }), reverse);\n\t\t return iterations;\n\t\t };\n\t\t interposedSequence.__iteratorUncached = function(type, reverse) {\n\t\t var iterator = iterable.__iterator(ITERATE_VALUES, reverse);\n\t\t var iterations = 0;\n\t\t var step;\n\t\t return new Iterator((function() {\n\t\t if (!step || iterations % 2) {\n\t\t step = iterator.next();\n\t\t if (step.done) {\n\t\t return step;\n\t\t }\n\t\t }\n\t\t return iterations % 2 ? iteratorValue(type, iterations++, separator) : iteratorValue(type, iterations++, step.value, step);\n\t\t }));\n\t\t };\n\t\t return interposedSequence;\n\t\t}\n\t\tfunction sortFactory(iterable, comparator, mapper) {\n\t\t if (!comparator) {\n\t\t comparator = defaultComparator;\n\t\t }\n\t\t var isKeyedIterable = isKeyed(iterable);\n\t\t var index = 0;\n\t\t var entries = iterable.toSeq().map((function(v, k) {\n\t\t return [k, v, index++, mapper ? mapper(v, k, iterable) : v];\n\t\t })).toArray();\n\t\t entries.sort((function(a, b) {\n\t\t return comparator(a[3], b[3]) || a[2] - b[2];\n\t\t })).forEach(isKeyedIterable ? (function(v, i) {\n\t\t entries[i].length = 2;\n\t\t }) : (function(v, i) {\n\t\t entries[i] = v[1];\n\t\t }));\n\t\t return isKeyedIterable ? KeyedSeq(entries) : isIndexed(iterable) ? IndexedSeq(entries) : SetSeq(entries);\n\t\t}\n\t\tfunction maxFactory(iterable, comparator, mapper) {\n\t\t if (!comparator) {\n\t\t comparator = defaultComparator;\n\t\t }\n\t\t if (mapper) {\n\t\t var entry = iterable.toSeq().map((function(v, k) {\n\t\t return [v, mapper(v, k, iterable)];\n\t\t })).reduce((function(a, b) {\n\t\t return _maxCompare(comparator, a[1], b[1]) ? b : a;\n\t\t }));\n\t\t return entry && entry[0];\n\t\t } else {\n\t\t return iterable.reduce((function(a, b) {\n\t\t return _maxCompare(comparator, a, b) ? b : a;\n\t\t }));\n\t\t }\n\t\t}\n\t\tfunction _maxCompare(comparator, a, b) {\n\t\t var comp = comparator(b, a);\n\t\t return (comp === 0 && b !== a && (b === undefined || b === null || b !== b)) || comp > 0;\n\t\t}\n\t\tfunction reify(iter, seq) {\n\t\t return isSeq(iter) ? seq : iter.constructor(seq);\n\t\t}\n\t\tfunction validateEntry(entry) {\n\t\t if (entry !== Object(entry)) {\n\t\t throw new TypeError('Expected [K, V] tuple: ' + entry);\n\t\t }\n\t\t}\n\t\tfunction resolveSize(iter) {\n\t\t assertNotInfinite(iter.size);\n\t\t return ensureSize(iter);\n\t\t}\n\t\tfunction iterableClass(iterable) {\n\t\t return isKeyed(iterable) ? KeyedIterable : isIndexed(iterable) ? IndexedIterable : SetIterable;\n\t\t}\n\t\tfunction makeSequence(iterable) {\n\t\t return Object.create((isKeyed(iterable) ? KeyedSeq : isIndexed(iterable) ? IndexedSeq : SetSeq).prototype);\n\t\t}\n\t\tfunction cacheResultThrough() {\n\t\t if (this._iter.cacheResult) {\n\t\t this._iter.cacheResult();\n\t\t this.size = this._iter.size;\n\t\t return this;\n\t\t } else {\n\t\t return Seq.prototype.cacheResult.call(this);\n\t\t }\n\t\t}\n\t\tfunction defaultComparator(a, b) {\n\t\t return a > b ? 1 : a < b ? -1 : 0;\n\t\t}\n\t\tvar List = function List(value) {\n\t\t var empty = emptyList();\n\t\t if (value === null || value === undefined) {\n\t\t return empty;\n\t\t }\n\t\t if (isList(value)) {\n\t\t return value;\n\t\t }\n\t\t var iter = IndexedIterable(value);\n\t\t var size = iter.size;\n\t\t if (size === 0) {\n\t\t return empty;\n\t\t }\n\t\t assertNotInfinite(size);\n\t\t if (size > 0 && size < SIZE) {\n\t\t return makeList(0, size, SHIFT, null, new VNode(iter.toArray()));\n\t\t }\n\t\t return empty.withMutations((function(list) {\n\t\t list.setSize(size);\n\t\t iter.forEach((function(v, i) {\n\t\t return list.set(i, v);\n\t\t }));\n\t\t }));\n\t\t};\n\t\t($traceurRuntime.createClass)(List, {\n\t\t toString: function() {\n\t\t return this.__toString('List [', ']');\n\t\t },\n\t\t get: function(index, notSetValue) {\n\t\t index = wrapIndex(this, index);\n\t\t if (index < 0 || index >= this.size) {\n\t\t return notSetValue;\n\t\t }\n\t\t index += this._origin;\n\t\t var node = listNodeFor(this, index);\n\t\t return node && node.array[index & MASK];\n\t\t },\n\t\t set: function(index, value) {\n\t\t return updateList(this, index, value);\n\t\t },\n\t\t remove: function(index) {\n\t\t return !this.has(index) ? this : index === 0 ? this.shift() : index === this.size - 1 ? this.pop() : this.splice(index, 1);\n\t\t },\n\t\t clear: function() {\n\t\t if (this.size === 0) {\n\t\t return this;\n\t\t }\n\t\t if (this.__ownerID) {\n\t\t this.size = this._origin = this._capacity = 0;\n\t\t this._level = SHIFT;\n\t\t this._root = this._tail = null;\n\t\t this.__hash = undefined;\n\t\t this.__altered = true;\n\t\t return this;\n\t\t }\n\t\t return emptyList();\n\t\t },\n\t\t push: function() {\n\t\t var values = arguments;\n\t\t var oldSize = this.size;\n\t\t return this.withMutations((function(list) {\n\t\t setListBounds(list, 0, oldSize + values.length);\n\t\t for (var ii = 0; ii < values.length; ii++) {\n\t\t list.set(oldSize + ii, values[ii]);\n\t\t }\n\t\t }));\n\t\t },\n\t\t pop: function() {\n\t\t return setListBounds(this, 0, -1);\n\t\t },\n\t\t unshift: function() {\n\t\t var values = arguments;\n\t\t return this.withMutations((function(list) {\n\t\t setListBounds(list, -values.length);\n\t\t for (var ii = 0; ii < values.length; ii++) {\n\t\t list.set(ii, values[ii]);\n\t\t }\n\t\t }));\n\t\t },\n\t\t shift: function() {\n\t\t return setListBounds(this, 1);\n\t\t },\n\t\t merge: function() {\n\t\t return mergeIntoListWith(this, undefined, arguments);\n\t\t },\n\t\t mergeWith: function(merger) {\n\t\t for (var iters = [],\n\t\t $__7 = 1; $__7 < arguments.length; $__7++)\n\t\t iters[$__7 - 1] = arguments[$__7];\n\t\t return mergeIntoListWith(this, merger, iters);\n\t\t },\n\t\t mergeDeep: function() {\n\t\t return mergeIntoListWith(this, deepMerger(undefined), arguments);\n\t\t },\n\t\t mergeDeepWith: function(merger) {\n\t\t for (var iters = [],\n\t\t $__8 = 1; $__8 < arguments.length; $__8++)\n\t\t iters[$__8 - 1] = arguments[$__8];\n\t\t return mergeIntoListWith(this, deepMerger(merger), iters);\n\t\t },\n\t\t setSize: function(size) {\n\t\t return setListBounds(this, 0, size);\n\t\t },\n\t\t slice: function(begin, end) {\n\t\t var size = this.size;\n\t\t if (wholeSlice(begin, end, size)) {\n\t\t return this;\n\t\t }\n\t\t return setListBounds(this, resolveBegin(begin, size), resolveEnd(end, size));\n\t\t },\n\t\t __iterator: function(type, reverse) {\n\t\t var index = 0;\n\t\t var values = iterateList(this, reverse);\n\t\t return new Iterator((function() {\n\t\t var value = values();\n\t\t return value === DONE ? iteratorDone() : iteratorValue(type, index++, value);\n\t\t }));\n\t\t },\n\t\t __iterate: function(fn, reverse) {\n\t\t var index = 0;\n\t\t var values = iterateList(this, reverse);\n\t\t var value;\n\t\t while ((value = values()) !== DONE) {\n\t\t if (fn(value, index++, this) === false) {\n\t\t break;\n\t\t }\n\t\t }\n\t\t return index;\n\t\t },\n\t\t __ensureOwner: function(ownerID) {\n\t\t if (ownerID === this.__ownerID) {\n\t\t return this;\n\t\t }\n\t\t if (!ownerID) {\n\t\t this.__ownerID = ownerID;\n\t\t return this;\n\t\t }\n\t\t return makeList(this._origin, this._capacity, this._level, this._root, this._tail, ownerID, this.__hash);\n\t\t }\n\t\t}, {of: function() {\n\t\t return this(arguments);\n\t\t }}, IndexedCollection);\n\t\tfunction isList(maybeList) {\n\t\t return !!(maybeList && maybeList[IS_LIST_SENTINEL]);\n\t\t}\n\t\tList.isList = isList;\n\t\tvar IS_LIST_SENTINEL = '@@__IMMUTABLE_LIST__@@';\n\t\tvar ListPrototype = List.prototype;\n\t\tListPrototype[IS_LIST_SENTINEL] = true;\n\t\tListPrototype[DELETE] = ListPrototype.remove;\n\t\tListPrototype.setIn = MapPrototype.setIn;\n\t\tListPrototype.deleteIn = ListPrototype.removeIn = MapPrototype.removeIn;\n\t\tListPrototype.update = MapPrototype.update;\n\t\tListPrototype.updateIn = MapPrototype.updateIn;\n\t\tListPrototype.mergeIn = MapPrototype.mergeIn;\n\t\tListPrototype.mergeDeepIn = MapPrototype.mergeDeepIn;\n\t\tListPrototype.withMutations = MapPrototype.withMutations;\n\t\tListPrototype.asMutable = MapPrototype.asMutable;\n\t\tListPrototype.asImmutable = MapPrototype.asImmutable;\n\t\tListPrototype.wasAltered = MapPrototype.wasAltered;\n\t\tvar VNode = function VNode(array, ownerID) {\n\t\t this.array = array;\n\t\t this.ownerID = ownerID;\n\t\t};\n\t\tvar $VNode = VNode;\n\t\t($traceurRuntime.createClass)(VNode, {\n\t\t removeBefore: function(ownerID, level, index) {\n\t\t if (index === level ? 1 << level : 0 || this.array.length === 0) {\n\t\t return this;\n\t\t }\n\t\t var originIndex = (index >>> level) & MASK;\n\t\t if (originIndex >= this.array.length) {\n\t\t return new $VNode([], ownerID);\n\t\t }\n\t\t var removingFirst = originIndex === 0;\n\t\t var newChild;\n\t\t if (level > 0) {\n\t\t var oldChild = this.array[originIndex];\n\t\t newChild = oldChild && oldChild.removeBefore(ownerID, level - SHIFT, index);\n\t\t if (newChild === oldChild && removingFirst) {\n\t\t return this;\n\t\t }\n\t\t }\n\t\t if (removingFirst && !newChild) {\n\t\t return this;\n\t\t }\n\t\t var editable = editableVNode(this, ownerID);\n\t\t if (!removingFirst) {\n\t\t for (var ii = 0; ii < originIndex; ii++) {\n\t\t editable.array[ii] = undefined;\n\t\t }\n\t\t }\n\t\t if (newChild) {\n\t\t editable.array[originIndex] = newChild;\n\t\t }\n\t\t return editable;\n\t\t },\n\t\t removeAfter: function(ownerID, level, index) {\n\t\t if (index === level ? 1 << level : 0 || this.array.length === 0) {\n\t\t return this;\n\t\t }\n\t\t var sizeIndex = ((index - 1) >>> level) & MASK;\n\t\t if (sizeIndex >= this.array.length) {\n\t\t return this;\n\t\t }\n\t\t var removingLast = sizeIndex === this.array.length - 1;\n\t\t var newChild;\n\t\t if (level > 0) {\n\t\t var oldChild = this.array[sizeIndex];\n\t\t newChild = oldChild && oldChild.removeAfter(ownerID, level - SHIFT, index);\n\t\t if (newChild === oldChild && removingLast) {\n\t\t return this;\n\t\t }\n\t\t }\n\t\t if (removingLast && !newChild) {\n\t\t return this;\n\t\t }\n\t\t var editable = editableVNode(this, ownerID);\n\t\t if (!removingLast) {\n\t\t editable.array.pop();\n\t\t }\n\t\t if (newChild) {\n\t\t editable.array[sizeIndex] = newChild;\n\t\t }\n\t\t return editable;\n\t\t }\n\t\t}, {});\n\t\tvar DONE = {};\n\t\tfunction iterateList(list, reverse) {\n\t\t var left = list._origin;\n\t\t var right = list._capacity;\n\t\t var tailPos = getTailOffset(right);\n\t\t var tail = list._tail;\n\t\t return iterateNodeOrLeaf(list._root, list._level, 0);\n\t\t function iterateNodeOrLeaf(node, level, offset) {\n\t\t return level === 0 ? iterateLeaf(node, offset) : iterateNode(node, level, offset);\n\t\t }\n\t\t function iterateLeaf(node, offset) {\n\t\t var array = offset === tailPos ? tail && tail.array : node && node.array;\n\t\t var from = offset > left ? 0 : left - offset;\n\t\t var to = right - offset;\n\t\t if (to > SIZE) {\n\t\t to = SIZE;\n\t\t }\n\t\t return (function() {\n\t\t if (from === to) {\n\t\t return DONE;\n\t\t }\n\t\t var idx = reverse ? --to : from++;\n\t\t return array && array[idx];\n\t\t });\n\t\t }\n\t\t function iterateNode(node, level, offset) {\n\t\t var values;\n\t\t var array = node && node.array;\n\t\t var from = offset > left ? 0 : (left - offset) >> level;\n\t\t var to = ((right - offset) >> level) + 1;\n\t\t if (to > SIZE) {\n\t\t to = SIZE;\n\t\t }\n\t\t return (function() {\n\t\t do {\n\t\t if (values) {\n\t\t var value = values();\n\t\t if (value !== DONE) {\n\t\t return value;\n\t\t }\n\t\t values = null;\n\t\t }\n\t\t if (from === to) {\n\t\t return DONE;\n\t\t }\n\t\t var idx = reverse ? --to : from++;\n\t\t values = iterateNodeOrLeaf(array && array[idx], level - SHIFT, offset + (idx << level));\n\t\t } while (true);\n\t\t });\n\t\t }\n\t\t}\n\t\tfunction makeList(origin, capacity, level, root, tail, ownerID, hash) {\n\t\t var list = Object.create(ListPrototype);\n\t\t list.size = capacity - origin;\n\t\t list._origin = origin;\n\t\t list._capacity = capacity;\n\t\t list._level = level;\n\t\t list._root = root;\n\t\t list._tail = tail;\n\t\t list.__ownerID = ownerID;\n\t\t list.__hash = hash;\n\t\t list.__altered = false;\n\t\t return list;\n\t\t}\n\t\tvar EMPTY_LIST;\n\t\tfunction emptyList() {\n\t\t return EMPTY_LIST || (EMPTY_LIST = makeList(0, 0, SHIFT));\n\t\t}\n\t\tfunction updateList(list, index, value) {\n\t\t index = wrapIndex(list, index);\n\t\t if (index >= list.size || index < 0) {\n\t\t return list.withMutations((function(list) {\n\t\t index < 0 ? setListBounds(list, index).set(0, value) : setListBounds(list, 0, index + 1).set(index, value);\n\t\t }));\n\t\t }\n\t\t index += list._origin;\n\t\t var newTail = list._tail;\n\t\t var newRoot = list._root;\n\t\t var didAlter = MakeRef(DID_ALTER);\n\t\t if (index >= getTailOffset(list._capacity)) {\n\t\t newTail = updateVNode(newTail, list.__ownerID, 0, index, value, didAlter);\n\t\t } else {\n\t\t newRoot = updateVNode(newRoot, list.__ownerID, list._level, index, value, didAlter);\n\t\t }\n\t\t if (!didAlter.value) {\n\t\t return list;\n\t\t }\n\t\t if (list.__ownerID) {\n\t\t list._root = newRoot;\n\t\t list._tail = newTail;\n\t\t list.__hash = undefined;\n\t\t list.__altered = true;\n\t\t return list;\n\t\t }\n\t\t return makeList(list._origin, list._capacity, list._level, newRoot, newTail);\n\t\t}\n\t\tfunction updateVNode(node, ownerID, level, index, value, didAlter) {\n\t\t var idx = (index >>> level) & MASK;\n\t\t var nodeHas = node && idx < node.array.length;\n\t\t if (!nodeHas && value === undefined) {\n\t\t return node;\n\t\t }\n\t\t var newNode;\n\t\t if (level > 0) {\n\t\t var lowerNode = node && node.array[idx];\n\t\t var newLowerNode = updateVNode(lowerNode, ownerID, level - SHIFT, index, value, didAlter);\n\t\t if (newLowerNode === lowerNode) {\n\t\t return node;\n\t\t }\n\t\t newNode = editableVNode(node, ownerID);\n\t\t newNode.array[idx] = newLowerNode;\n\t\t return newNode;\n\t\t }\n\t\t if (nodeHas && node.array[idx] === value) {\n\t\t return node;\n\t\t }\n\t\t SetRef(didAlter);\n\t\t newNode = editableVNode(node, ownerID);\n\t\t if (value === undefined && idx === newNode.array.length - 1) {\n\t\t newNode.array.pop();\n\t\t } else {\n\t\t newNode.array[idx] = value;\n\t\t }\n\t\t return newNode;\n\t\t}\n\t\tfunction editableVNode(node, ownerID) {\n\t\t if (ownerID && node && ownerID === node.ownerID) {\n\t\t return node;\n\t\t }\n\t\t return new VNode(node ? node.array.slice() : [], ownerID);\n\t\t}\n\t\tfunction listNodeFor(list, rawIndex) {\n\t\t if (rawIndex >= getTailOffset(list._capacity)) {\n\t\t return list._tail;\n\t\t }\n\t\t if (rawIndex < 1 << (list._level + SHIFT)) {\n\t\t var node = list._root;\n\t\t var level = list._level;\n\t\t while (node && level > 0) {\n\t\t node = node.array[(rawIndex >>> level) & MASK];\n\t\t level -= SHIFT;\n\t\t }\n\t\t return node;\n\t\t }\n\t\t}\n\t\tfunction setListBounds(list, begin, end) {\n\t\t var owner = list.__ownerID || new OwnerID();\n\t\t var oldOrigin = list._origin;\n\t\t var oldCapacity = list._capacity;\n\t\t var newOrigin = oldOrigin + begin;\n\t\t var newCapacity = end === undefined ? oldCapacity : end < 0 ? oldCapacity + end : oldOrigin + end;\n\t\t if (newOrigin === oldOrigin && newCapacity === oldCapacity) {\n\t\t return list;\n\t\t }\n\t\t if (newOrigin >= newCapacity) {\n\t\t return list.clear();\n\t\t }\n\t\t var newLevel = list._level;\n\t\t var newRoot = list._root;\n\t\t var offsetShift = 0;\n\t\t while (newOrigin + offsetShift < 0) {\n\t\t newRoot = new VNode(newRoot && newRoot.array.length ? [undefined, newRoot] : [], owner);\n\t\t newLevel += SHIFT;\n\t\t offsetShift += 1 << newLevel;\n\t\t }\n\t\t if (offsetShift) {\n\t\t newOrigin += offsetShift;\n\t\t oldOrigin += offsetShift;\n\t\t newCapacity += offsetShift;\n\t\t oldCapacity += offsetShift;\n\t\t }\n\t\t var oldTailOffset = getTailOffset(oldCapacity);\n\t\t var newTailOffset = getTailOffset(newCapacity);\n\t\t while (newTailOffset >= 1 << (newLevel + SHIFT)) {\n\t\t newRoot = new VNode(newRoot && newRoot.array.length ? [newRoot] : [], owner);\n\t\t newLevel += SHIFT;\n\t\t }\n\t\t var oldTail = list._tail;\n\t\t var newTail = newTailOffset < oldTailOffset ? listNodeFor(list, newCapacity - 1) : newTailOffset > oldTailOffset ? new VNode([], owner) : oldTail;\n\t\t if (oldTail && newTailOffset > oldTailOffset && newOrigin < oldCapacity && oldTail.array.length) {\n\t\t newRoot = editableVNode(newRoot, owner);\n\t\t var node = newRoot;\n\t\t for (var level = newLevel; level > SHIFT; level -= SHIFT) {\n\t\t var idx = (oldTailOffset >>> level) & MASK;\n\t\t node = node.array[idx] = editableVNode(node.array[idx], owner);\n\t\t }\n\t\t node.array[(oldTailOffset >>> SHIFT) & MASK] = oldTail;\n\t\t }\n\t\t if (newCapacity < oldCapacity) {\n\t\t newTail = newTail && newTail.removeAfter(owner, 0, newCapacity);\n\t\t }\n\t\t if (newOrigin >= newTailOffset) {\n\t\t newOrigin -= newTailOffset;\n\t\t newCapacity -= newTailOffset;\n\t\t newLevel = SHIFT;\n\t\t newRoot = null;\n\t\t newTail = newTail && newTail.removeBefore(owner, 0, newOrigin);\n\t\t } else if (newOrigin > oldOrigin || newTailOffset < oldTailOffset) {\n\t\t offsetShift = 0;\n\t\t while (newRoot) {\n\t\t var beginIndex = (newOrigin >>> newLevel) & MASK;\n\t\t if (beginIndex !== (newTailOffset >>> newLevel) & MASK) {\n\t\t break;\n\t\t }\n\t\t if (beginIndex) {\n\t\t offsetShift += (1 << newLevel) * beginIndex;\n\t\t }\n\t\t newLevel -= SHIFT;\n\t\t newRoot = newRoot.array[beginIndex];\n\t\t }\n\t\t if (newRoot && newOrigin > oldOrigin) {\n\t\t newRoot = newRoot.removeBefore(owner, newLevel, newOrigin - offsetShift);\n\t\t }\n\t\t if (newRoot && newTailOffset < oldTailOffset) {\n\t\t newRoot = newRoot.removeAfter(owner, newLevel, newTailOffset - offsetShift);\n\t\t }\n\t\t if (offsetShift) {\n\t\t newOrigin -= offsetShift;\n\t\t newCapacity -= offsetShift;\n\t\t }\n\t\t }\n\t\t if (list.__ownerID) {\n\t\t list.size = newCapacity - newOrigin;\n\t\t list._origin = newOrigin;\n\t\t list._capacity = newCapacity;\n\t\t list._level = newLevel;\n\t\t list._root = newRoot;\n\t\t list._tail = newTail;\n\t\t list.__hash = undefined;\n\t\t list.__altered = true;\n\t\t return list;\n\t\t }\n\t\t return makeList(newOrigin, newCapacity, newLevel, newRoot, newTail);\n\t\t}\n\t\tfunction mergeIntoListWith(list, merger, iterables) {\n\t\t var iters = [];\n\t\t var maxSize = 0;\n\t\t for (var ii = 0; ii < iterables.length; ii++) {\n\t\t var value = iterables[ii];\n\t\t var iter = IndexedIterable(value);\n\t\t if (iter.size > maxSize) {\n\t\t maxSize = iter.size;\n\t\t }\n\t\t if (!isIterable(value)) {\n\t\t iter = iter.map((function(v) {\n\t\t return fromJS(v);\n\t\t }));\n\t\t }\n\t\t iters.push(iter);\n\t\t }\n\t\t if (maxSize > list.size) {\n\t\t list = list.setSize(maxSize);\n\t\t }\n\t\t return mergeIntoCollectionWith(list, merger, iters);\n\t\t}\n\t\tfunction getTailOffset(size) {\n\t\t return size < SIZE ? 0 : (((size - 1) >>> SHIFT) << SHIFT);\n\t\t}\n\t\tvar OrderedMap = function OrderedMap(value) {\n\t\t return value === null || value === undefined ? emptyOrderedMap() : isOrderedMap(value) ? value : emptyOrderedMap().withMutations((function(map) {\n\t\t var iter = KeyedIterable(value);\n\t\t assertNotInfinite(iter.size);\n\t\t iter.forEach((function(v, k) {\n\t\t return map.set(k, v);\n\t\t }));\n\t\t }));\n\t\t};\n\t\t($traceurRuntime.createClass)(OrderedMap, {\n\t\t toString: function() {\n\t\t return this.__toString('OrderedMap {', '}');\n\t\t },\n\t\t get: function(k, notSetValue) {\n\t\t var index = this._map.get(k);\n\t\t return index !== undefined ? this._list.get(index)[1] : notSetValue;\n\t\t },\n\t\t clear: function() {\n\t\t if (this.size === 0) {\n\t\t return this;\n\t\t }\n\t\t if (this.__ownerID) {\n\t\t this.size = 0;\n\t\t this._map.clear();\n\t\t this._list.clear();\n\t\t return this;\n\t\t }\n\t\t return emptyOrderedMap();\n\t\t },\n\t\t set: function(k, v) {\n\t\t return updateOrderedMap(this, k, v);\n\t\t },\n\t\t remove: function(k) {\n\t\t return updateOrderedMap(this, k, NOT_SET);\n\t\t },\n\t\t wasAltered: function() {\n\t\t return this._map.wasAltered() || this._list.wasAltered();\n\t\t },\n\t\t __iterate: function(fn, reverse) {\n\t\t var $__0 = this;\n\t\t return this._list.__iterate((function(entry) {\n\t\t return entry && fn(entry[1], entry[0], $__0);\n\t\t }), reverse);\n\t\t },\n\t\t __iterator: function(type, reverse) {\n\t\t return this._list.fromEntrySeq().__iterator(type, reverse);\n\t\t },\n\t\t __ensureOwner: function(ownerID) {\n\t\t if (ownerID === this.__ownerID) {\n\t\t return this;\n\t\t }\n\t\t var newMap = this._map.__ensureOwner(ownerID);\n\t\t var newList = this._list.__ensureOwner(ownerID);\n\t\t if (!ownerID) {\n\t\t this.__ownerID = ownerID;\n\t\t this._map = newMap;\n\t\t this._list = newList;\n\t\t return this;\n\t\t }\n\t\t return makeOrderedMap(newMap, newList, ownerID, this.__hash);\n\t\t }\n\t\t}, {of: function() {\n\t\t return this(arguments);\n\t\t }}, Map);\n\t\tfunction isOrderedMap(maybeOrderedMap) {\n\t\t return isMap(maybeOrderedMap) && isOrdered(maybeOrderedMap);\n\t\t}\n\t\tOrderedMap.isOrderedMap = isOrderedMap;\n\t\tOrderedMap.prototype[IS_ORDERED_SENTINEL] = true;\n\t\tOrderedMap.prototype[DELETE] = OrderedMap.prototype.remove;\n\t\tfunction makeOrderedMap(map, list, ownerID, hash) {\n\t\t var omap = Object.create(OrderedMap.prototype);\n\t\t omap.size = map ? map.size : 0;\n\t\t omap._map = map;\n\t\t omap._list = list;\n\t\t omap.__ownerID = ownerID;\n\t\t omap.__hash = hash;\n\t\t return omap;\n\t\t}\n\t\tvar EMPTY_ORDERED_MAP;\n\t\tfunction emptyOrderedMap() {\n\t\t return EMPTY_ORDERED_MAP || (EMPTY_ORDERED_MAP = makeOrderedMap(emptyMap(), emptyList()));\n\t\t}\n\t\tfunction updateOrderedMap(omap, k, v) {\n\t\t var map = omap._map;\n\t\t var list = omap._list;\n\t\t var i = map.get(k);\n\t\t var has = i !== undefined;\n\t\t var newMap;\n\t\t var newList;\n\t\t if (v === NOT_SET) {\n\t\t if (!has) {\n\t\t return omap;\n\t\t }\n\t\t if (list.size >= SIZE && list.size >= map.size * 2) {\n\t\t newList = list.filter((function(entry, idx) {\n\t\t return entry !== undefined && i !== idx;\n\t\t }));\n\t\t newMap = newList.toKeyedSeq().map((function(entry) {\n\t\t return entry[0];\n\t\t })).flip().toMap();\n\t\t if (omap.__ownerID) {\n\t\t newMap.__ownerID = newList.__ownerID = omap.__ownerID;\n\t\t }\n\t\t } else {\n\t\t newMap = map.remove(k);\n\t\t newList = i === list.size - 1 ? list.pop() : list.set(i, undefined);\n\t\t }\n\t\t } else {\n\t\t if (has) {\n\t\t if (v === list.get(i)[1]) {\n\t\t return omap;\n\t\t }\n\t\t newMap = map;\n\t\t newList = list.set(i, [k, v]);\n\t\t } else {\n\t\t newMap = map.set(k, list.size);\n\t\t newList = list.set(list.size, [k, v]);\n\t\t }\n\t\t }\n\t\t if (omap.__ownerID) {\n\t\t omap.size = newMap.size;\n\t\t omap._map = newMap;\n\t\t omap._list = newList;\n\t\t omap.__hash = undefined;\n\t\t return omap;\n\t\t }\n\t\t return makeOrderedMap(newMap, newList);\n\t\t}\n\t\tvar Stack = function Stack(value) {\n\t\t return value === null || value === undefined ? emptyStack() : isStack(value) ? value : emptyStack().unshiftAll(value);\n\t\t};\n\t\tvar $Stack = Stack;\n\t\t($traceurRuntime.createClass)(Stack, {\n\t\t toString: function() {\n\t\t return this.__toString('Stack [', ']');\n\t\t },\n\t\t get: function(index, notSetValue) {\n\t\t var head = this._head;\n\t\t while (head && index--) {\n\t\t head = head.next;\n\t\t }\n\t\t return head ? head.value : notSetValue;\n\t\t },\n\t\t peek: function() {\n\t\t return this._head && this._head.value;\n\t\t },\n\t\t push: function() {\n\t\t if (arguments.length === 0) {\n\t\t return this;\n\t\t }\n\t\t var newSize = this.size + arguments.length;\n\t\t var head = this._head;\n\t\t for (var ii = arguments.length - 1; ii >= 0; ii--) {\n\t\t head = {\n\t\t value: arguments[ii],\n\t\t next: head\n\t\t };\n\t\t }\n\t\t if (this.__ownerID) {\n\t\t this.size = newSize;\n\t\t this._head = head;\n\t\t this.__hash = undefined;\n\t\t this.__altered = true;\n\t\t return this;\n\t\t }\n\t\t return makeStack(newSize, head);\n\t\t },\n\t\t pushAll: function(iter) {\n\t\t iter = IndexedIterable(iter);\n\t\t if (iter.size === 0) {\n\t\t return this;\n\t\t }\n\t\t assertNotInfinite(iter.size);\n\t\t var newSize = this.size;\n\t\t var head = this._head;\n\t\t iter.reverse().forEach((function(value) {\n\t\t newSize++;\n\t\t head = {\n\t\t value: value,\n\t\t next: head\n\t\t };\n\t\t }));\n\t\t if (this.__ownerID) {\n\t\t this.size = newSize;\n\t\t this._head = head;\n\t\t this.__hash = undefined;\n\t\t this.__altered = true;\n\t\t return this;\n\t\t }\n\t\t return makeStack(newSize, head);\n\t\t },\n\t\t pop: function() {\n\t\t return this.slice(1);\n\t\t },\n\t\t unshift: function() {\n\t\t return this.push.apply(this, arguments);\n\t\t },\n\t\t unshiftAll: function(iter) {\n\t\t return this.pushAll(iter);\n\t\t },\n\t\t shift: function() {\n\t\t return this.pop.apply(this, arguments);\n\t\t },\n\t\t clear: function() {\n\t\t if (this.size === 0) {\n\t\t return this;\n\t\t }\n\t\t if (this.__ownerID) {\n\t\t this.size = 0;\n\t\t this._head = undefined;\n\t\t this.__hash = undefined;\n\t\t this.__altered = true;\n\t\t return this;\n\t\t }\n\t\t return emptyStack();\n\t\t },\n\t\t slice: function(begin, end) {\n\t\t if (wholeSlice(begin, end, this.size)) {\n\t\t return this;\n\t\t }\n\t\t var resolvedBegin = resolveBegin(begin, this.size);\n\t\t var resolvedEnd = resolveEnd(end, this.size);\n\t\t if (resolvedEnd !== this.size) {\n\t\t return $traceurRuntime.superCall(this, $Stack.prototype, \"slice\", [begin, end]);\n\t\t }\n\t\t var newSize = this.size - resolvedBegin;\n\t\t var head = this._head;\n\t\t while (resolvedBegin--) {\n\t\t head = head.next;\n\t\t }\n\t\t if (this.__ownerID) {\n\t\t this.size = newSize;\n\t\t this._head = head;\n\t\t this.__hash = undefined;\n\t\t this.__altered = true;\n\t\t return this;\n\t\t }\n\t\t return makeStack(newSize, head);\n\t\t },\n\t\t __ensureOwner: function(ownerID) {\n\t\t if (ownerID === this.__ownerID) {\n\t\t return this;\n\t\t }\n\t\t if (!ownerID) {\n\t\t this.__ownerID = ownerID;\n\t\t this.__altered = false;\n\t\t return this;\n\t\t }\n\t\t return makeStack(this.size, this._head, ownerID, this.__hash);\n\t\t },\n\t\t __iterate: function(fn, reverse) {\n\t\t if (reverse) {\n\t\t return this.toSeq().cacheResult.__iterate(fn, reverse);\n\t\t }\n\t\t var iterations = 0;\n\t\t var node = this._head;\n\t\t while (node) {\n\t\t if (fn(node.value, iterations++, this) === false) {\n\t\t break;\n\t\t }\n\t\t node = node.next;\n\t\t }\n\t\t return iterations;\n\t\t },\n\t\t __iterator: function(type, reverse) {\n\t\t if (reverse) {\n\t\t return this.toSeq().cacheResult().__iterator(type, reverse);\n\t\t }\n\t\t var iterations = 0;\n\t\t var node = this._head;\n\t\t return new Iterator((function() {\n\t\t if (node) {\n\t\t var value = node.value;\n\t\t node = node.next;\n\t\t return iteratorValue(type, iterations++, value);\n\t\t }\n\t\t return iteratorDone();\n\t\t }));\n\t\t }\n\t\t}, {of: function() {\n\t\t return this(arguments);\n\t\t }}, IndexedCollection);\n\t\tfunction isStack(maybeStack) {\n\t\t return !!(maybeStack && maybeStack[IS_STACK_SENTINEL]);\n\t\t}\n\t\tStack.isStack = isStack;\n\t\tvar IS_STACK_SENTINEL = '@@__IMMUTABLE_STACK__@@';\n\t\tvar StackPrototype = Stack.prototype;\n\t\tStackPrototype[IS_STACK_SENTINEL] = true;\n\t\tStackPrototype.withMutations = MapPrototype.withMutations;\n\t\tStackPrototype.asMutable = MapPrototype.asMutable;\n\t\tStackPrototype.asImmutable = MapPrototype.asImmutable;\n\t\tStackPrototype.wasAltered = MapPrototype.wasAltered;\n\t\tfunction makeStack(size, head, ownerID, hash) {\n\t\t var map = Object.create(StackPrototype);\n\t\t map.size = size;\n\t\t map._head = head;\n\t\t map.__ownerID = ownerID;\n\t\t map.__hash = hash;\n\t\t map.__altered = false;\n\t\t return map;\n\t\t}\n\t\tvar EMPTY_STACK;\n\t\tfunction emptyStack() {\n\t\t return EMPTY_STACK || (EMPTY_STACK = makeStack(0));\n\t\t}\n\t\tvar Set = function Set(value) {\n\t\t return value === null || value === undefined ? emptySet() : isSet(value) ? value : emptySet().withMutations((function(set) {\n\t\t var iter = SetIterable(value);\n\t\t assertNotInfinite(iter.size);\n\t\t iter.forEach((function(v) {\n\t\t return set.add(v);\n\t\t }));\n\t\t }));\n\t\t};\n\t\t($traceurRuntime.createClass)(Set, {\n\t\t toString: function() {\n\t\t return this.__toString('Set {', '}');\n\t\t },\n\t\t has: function(value) {\n\t\t return this._map.has(value);\n\t\t },\n\t\t add: function(value) {\n\t\t return updateSet(this, this._map.set(value, true));\n\t\t },\n\t\t remove: function(value) {\n\t\t return updateSet(this, this._map.remove(value));\n\t\t },\n\t\t clear: function() {\n\t\t return updateSet(this, this._map.clear());\n\t\t },\n\t\t union: function() {\n\t\t for (var iters = [],\n\t\t $__9 = 0; $__9 < arguments.length; $__9++)\n\t\t iters[$__9] = arguments[$__9];\n\t\t iters = iters.filter((function(x) {\n\t\t return x.size !== 0;\n\t\t }));\n\t\t if (iters.length === 0) {\n\t\t return this;\n\t\t }\n\t\t if (this.size === 0 && iters.length === 1) {\n\t\t return this.constructor(iters[0]);\n\t\t }\n\t\t return this.withMutations((function(set) {\n\t\t for (var ii = 0; ii < iters.length; ii++) {\n\t\t SetIterable(iters[ii]).forEach((function(value) {\n\t\t return set.add(value);\n\t\t }));\n\t\t }\n\t\t }));\n\t\t },\n\t\t intersect: function() {\n\t\t for (var iters = [],\n\t\t $__10 = 0; $__10 < arguments.length; $__10++)\n\t\t iters[$__10] = arguments[$__10];\n\t\t if (iters.length === 0) {\n\t\t return this;\n\t\t }\n\t\t iters = iters.map((function(iter) {\n\t\t return SetIterable(iter);\n\t\t }));\n\t\t var originalSet = this;\n\t\t return this.withMutations((function(set) {\n\t\t originalSet.forEach((function(value) {\n\t\t if (!iters.every((function(iter) {\n\t\t return iter.contains(value);\n\t\t }))) {\n\t\t set.remove(value);\n\t\t }\n\t\t }));\n\t\t }));\n\t\t },\n\t\t subtract: function() {\n\t\t for (var iters = [],\n\t\t $__11 = 0; $__11 < arguments.length; $__11++)\n\t\t iters[$__11] = arguments[$__11];\n\t\t if (iters.length === 0) {\n\t\t return this;\n\t\t }\n\t\t iters = iters.map((function(iter) {\n\t\t return SetIterable(iter);\n\t\t }));\n\t\t var originalSet = this;\n\t\t return this.withMutations((function(set) {\n\t\t originalSet.forEach((function(value) {\n\t\t if (iters.some((function(iter) {\n\t\t return iter.contains(value);\n\t\t }))) {\n\t\t set.remove(value);\n\t\t }\n\t\t }));\n\t\t }));\n\t\t },\n\t\t merge: function() {\n\t\t return this.union.apply(this, arguments);\n\t\t },\n\t\t mergeWith: function(merger) {\n\t\t for (var iters = [],\n\t\t $__12 = 1; $__12 < arguments.length; $__12++)\n\t\t iters[$__12 - 1] = arguments[$__12];\n\t\t return this.union.apply(this, iters);\n\t\t },\n\t\t sort: function(comparator) {\n\t\t return OrderedSet(sortFactory(this, comparator));\n\t\t },\n\t\t sortBy: function(mapper, comparator) {\n\t\t return OrderedSet(sortFactory(this, comparator, mapper));\n\t\t },\n\t\t wasAltered: function() {\n\t\t return this._map.wasAltered();\n\t\t },\n\t\t __iterate: function(fn, reverse) {\n\t\t var $__0 = this;\n\t\t return this._map.__iterate((function(_, k) {\n\t\t return fn(k, k, $__0);\n\t\t }), reverse);\n\t\t },\n\t\t __iterator: function(type, reverse) {\n\t\t return this._map.map((function(_, k) {\n\t\t return k;\n\t\t })).__iterator(type, reverse);\n\t\t },\n\t\t __ensureOwner: function(ownerID) {\n\t\t if (ownerID === this.__ownerID) {\n\t\t return this;\n\t\t }\n\t\t var newMap = this._map.__ensureOwner(ownerID);\n\t\t if (!ownerID) {\n\t\t this.__ownerID = ownerID;\n\t\t this._map = newMap;\n\t\t return this;\n\t\t }\n\t\t return this.__make(newMap, ownerID);\n\t\t }\n\t\t}, {\n\t\t of: function() {\n\t\t return this(arguments);\n\t\t },\n\t\t fromKeys: function(value) {\n\t\t return this(KeyedIterable(value).keySeq());\n\t\t }\n\t\t}, SetCollection);\n\t\tfunction isSet(maybeSet) {\n\t\t return !!(maybeSet && maybeSet[IS_SET_SENTINEL]);\n\t\t}\n\t\tSet.isSet = isSet;\n\t\tvar IS_SET_SENTINEL = '@@__IMMUTABLE_SET__@@';\n\t\tvar SetPrototype = Set.prototype;\n\t\tSetPrototype[IS_SET_SENTINEL] = true;\n\t\tSetPrototype[DELETE] = SetPrototype.remove;\n\t\tSetPrototype.mergeDeep = SetPrototype.merge;\n\t\tSetPrototype.mergeDeepWith = SetPrototype.mergeWith;\n\t\tSetPrototype.withMutations = MapPrototype.withMutations;\n\t\tSetPrototype.asMutable = MapPrototype.asMutable;\n\t\tSetPrototype.asImmutable = MapPrototype.asImmutable;\n\t\tSetPrototype.__empty = emptySet;\n\t\tSetPrototype.__make = makeSet;\n\t\tfunction updateSet(set, newMap) {\n\t\t if (set.__ownerID) {\n\t\t set.size = newMap.size;\n\t\t set._map = newMap;\n\t\t return set;\n\t\t }\n\t\t return newMap === set._map ? set : newMap.size === 0 ? set.__empty() : set.__make(newMap);\n\t\t}\n\t\tfunction makeSet(map, ownerID) {\n\t\t var set = Object.create(SetPrototype);\n\t\t set.size = map ? map.size : 0;\n\t\t set._map = map;\n\t\t set.__ownerID = ownerID;\n\t\t return set;\n\t\t}\n\t\tvar EMPTY_SET;\n\t\tfunction emptySet() {\n\t\t return EMPTY_SET || (EMPTY_SET = makeSet(emptyMap()));\n\t\t}\n\t\tvar OrderedSet = function OrderedSet(value) {\n\t\t return value === null || value === undefined ? emptyOrderedSet() : isOrderedSet(value) ? value : emptyOrderedSet().withMutations((function(set) {\n\t\t var iter = SetIterable(value);\n\t\t assertNotInfinite(iter.size);\n\t\t iter.forEach((function(v) {\n\t\t return set.add(v);\n\t\t }));\n\t\t }));\n\t\t};\n\t\t($traceurRuntime.createClass)(OrderedSet, {toString: function() {\n\t\t return this.__toString('OrderedSet {', '}');\n\t\t }}, {\n\t\t of: function() {\n\t\t return this(arguments);\n\t\t },\n\t\t fromKeys: function(value) {\n\t\t return this(KeyedIterable(value).keySeq());\n\t\t }\n\t\t}, Set);\n\t\tfunction isOrderedSet(maybeOrderedSet) {\n\t\t return isSet(maybeOrderedSet) && isOrdered(maybeOrderedSet);\n\t\t}\n\t\tOrderedSet.isOrderedSet = isOrderedSet;\n\t\tvar OrderedSetPrototype = OrderedSet.prototype;\n\t\tOrderedSetPrototype[IS_ORDERED_SENTINEL] = true;\n\t\tOrderedSetPrototype.__empty = emptyOrderedSet;\n\t\tOrderedSetPrototype.__make = makeOrderedSet;\n\t\tfunction makeOrderedSet(map, ownerID) {\n\t\t var set = Object.create(OrderedSetPrototype);\n\t\t set.size = map ? map.size : 0;\n\t\t set._map = map;\n\t\t set.__ownerID = ownerID;\n\t\t return set;\n\t\t}\n\t\tvar EMPTY_ORDERED_SET;\n\t\tfunction emptyOrderedSet() {\n\t\t return EMPTY_ORDERED_SET || (EMPTY_ORDERED_SET = makeOrderedSet(emptyOrderedMap()));\n\t\t}\n\t\tvar Record = function Record(defaultValues, name) {\n\t\t var RecordType = function Record(values) {\n\t\t if (!(this instanceof RecordType)) {\n\t\t return new RecordType(values);\n\t\t }\n\t\t this._map = Map(values);\n\t\t };\n\t\t var keys = Object.keys(defaultValues);\n\t\t var RecordTypePrototype = RecordType.prototype = Object.create(RecordPrototype);\n\t\t RecordTypePrototype.constructor = RecordType;\n\t\t name && (RecordTypePrototype._name = name);\n\t\t RecordTypePrototype._defaultValues = defaultValues;\n\t\t RecordTypePrototype._keys = keys;\n\t\t RecordTypePrototype.size = keys.length;\n\t\t try {\n\t\t keys.forEach((function(key) {\n\t\t Object.defineProperty(RecordType.prototype, key, {\n\t\t get: function() {\n\t\t return this.get(key);\n\t\t },\n\t\t set: function(value) {\n\t\t invariant(this.__ownerID, 'Cannot set on an immutable record.');\n\t\t this.set(key, value);\n\t\t }\n\t\t });\n\t\t }));\n\t\t } catch (error) {}\n\t\t return RecordType;\n\t\t};\n\t\t($traceurRuntime.createClass)(Record, {\n\t\t toString: function() {\n\t\t return this.__toString(recordName(this) + ' {', '}');\n\t\t },\n\t\t has: function(k) {\n\t\t return this._defaultValues.hasOwnProperty(k);\n\t\t },\n\t\t get: function(k, notSetValue) {\n\t\t if (!this.has(k)) {\n\t\t return notSetValue;\n\t\t }\n\t\t var defaultVal = this._defaultValues[k];\n\t\t return this._map ? this._map.get(k, defaultVal) : defaultVal;\n\t\t },\n\t\t clear: function() {\n\t\t if (this.__ownerID) {\n\t\t this._map && this._map.clear();\n\t\t return this;\n\t\t }\n\t\t var SuperRecord = Object.getPrototypeOf(this).constructor;\n\t\t return SuperRecord._empty || (SuperRecord._empty = makeRecord(this, emptyMap()));\n\t\t },\n\t\t set: function(k, v) {\n\t\t if (!this.has(k)) {\n\t\t throw new Error('Cannot set unknown key \"' + k + '\" on ' + recordName(this));\n\t\t }\n\t\t var newMap = this._map && this._map.set(k, v);\n\t\t if (this.__ownerID || newMap === this._map) {\n\t\t return this;\n\t\t }\n\t\t return makeRecord(this, newMap);\n\t\t },\n\t\t remove: function(k) {\n\t\t if (!this.has(k)) {\n\t\t return this;\n\t\t }\n\t\t var newMap = this._map && this._map.remove(k);\n\t\t if (this.__ownerID || newMap === this._map) {\n\t\t return this;\n\t\t }\n\t\t return makeRecord(this, newMap);\n\t\t },\n\t\t wasAltered: function() {\n\t\t return this._map.wasAltered();\n\t\t },\n\t\t __iterator: function(type, reverse) {\n\t\t var $__0 = this;\n\t\t return KeyedIterable(this._defaultValues).map((function(_, k) {\n\t\t return $__0.get(k);\n\t\t })).__iterator(type, reverse);\n\t\t },\n\t\t __iterate: function(fn, reverse) {\n\t\t var $__0 = this;\n\t\t return KeyedIterable(this._defaultValues).map((function(_, k) {\n\t\t return $__0.get(k);\n\t\t })).__iterate(fn, reverse);\n\t\t },\n\t\t __ensureOwner: function(ownerID) {\n\t\t if (ownerID === this.__ownerID) {\n\t\t return this;\n\t\t }\n\t\t var newMap = this._map && this._map.__ensureOwner(ownerID);\n\t\t if (!ownerID) {\n\t\t this.__ownerID = ownerID;\n\t\t this._map = newMap;\n\t\t return this;\n\t\t }\n\t\t return makeRecord(this, newMap, ownerID);\n\t\t }\n\t\t}, {}, KeyedCollection);\n\t\tvar RecordPrototype = Record.prototype;\n\t\tRecordPrototype[DELETE] = RecordPrototype.remove;\n\t\tRecordPrototype.deleteIn = RecordPrototype.removeIn = MapPrototype.removeIn;\n\t\tRecordPrototype.merge = MapPrototype.merge;\n\t\tRecordPrototype.mergeWith = MapPrototype.mergeWith;\n\t\tRecordPrototype.mergeIn = MapPrototype.mergeIn;\n\t\tRecordPrototype.mergeDeep = MapPrototype.mergeDeep;\n\t\tRecordPrototype.mergeDeepWith = MapPrototype.mergeDeepWith;\n\t\tRecordPrototype.mergeDeepIn = MapPrototype.mergeDeepIn;\n\t\tRecordPrototype.setIn = MapPrototype.setIn;\n\t\tRecordPrototype.update = MapPrototype.update;\n\t\tRecordPrototype.updateIn = MapPrototype.updateIn;\n\t\tRecordPrototype.withMutations = MapPrototype.withMutations;\n\t\tRecordPrototype.asMutable = MapPrototype.asMutable;\n\t\tRecordPrototype.asImmutable = MapPrototype.asImmutable;\n\t\tfunction makeRecord(likeRecord, map, ownerID) {\n\t\t var record = Object.create(Object.getPrototypeOf(likeRecord));\n\t\t record._map = map;\n\t\t record.__ownerID = ownerID;\n\t\t return record;\n\t\t}\n\t\tfunction recordName(record) {\n\t\t return record._name || record.constructor.name;\n\t\t}\n\t\tvar Range = function Range(start, end, step) {\n\t\t if (!(this instanceof $Range)) {\n\t\t return new $Range(start, end, step);\n\t\t }\n\t\t invariant(step !== 0, 'Cannot step a Range by 0');\n\t\t start = start || 0;\n\t\t if (end === undefined) {\n\t\t end = Infinity;\n\t\t }\n\t\t if (start === end && __EMPTY_RANGE) {\n\t\t return __EMPTY_RANGE;\n\t\t }\n\t\t step = step === undefined ? 1 : Math.abs(step);\n\t\t if (end < start) {\n\t\t step = -step;\n\t\t }\n\t\t this._start = start;\n\t\t this._end = end;\n\t\t this._step = step;\n\t\t this.size = Math.max(0, Math.ceil((end - start) / step - 1) + 1);\n\t\t};\n\t\tvar $Range = Range;\n\t\t($traceurRuntime.createClass)(Range, {\n\t\t toString: function() {\n\t\t if (this.size === 0) {\n\t\t return 'Range []';\n\t\t }\n\t\t return 'Range [ ' + this._start + '...' + this._end + (this._step > 1 ? ' by ' + this._step : '') + ' ]';\n\t\t },\n\t\t get: function(index, notSetValue) {\n\t\t return this.has(index) ? this._start + wrapIndex(this, index) * this._step : notSetValue;\n\t\t },\n\t\t contains: function(searchValue) {\n\t\t var possibleIndex = (searchValue - this._start) / this._step;\n\t\t return possibleIndex >= 0 && possibleIndex < this.size && possibleIndex === Math.floor(possibleIndex);\n\t\t },\n\t\t slice: function(begin, end) {\n\t\t if (wholeSlice(begin, end, this.size)) {\n\t\t return this;\n\t\t }\n\t\t begin = resolveBegin(begin, this.size);\n\t\t end = resolveEnd(end, this.size);\n\t\t if (end <= begin) {\n\t\t return __EMPTY_RANGE;\n\t\t }\n\t\t return new $Range(this.get(begin, this._end), this.get(end, this._end), this._step);\n\t\t },\n\t\t indexOf: function(searchValue) {\n\t\t var offsetValue = searchValue - this._start;\n\t\t if (offsetValue % this._step === 0) {\n\t\t var index = offsetValue / this._step;\n\t\t if (index >= 0 && index < this.size) {\n\t\t return index;\n\t\t }\n\t\t }\n\t\t return -1;\n\t\t },\n\t\t lastIndexOf: function(searchValue) {\n\t\t return this.indexOf(searchValue);\n\t\t },\n\t\t take: function(amount) {\n\t\t return this.slice(0, Math.max(0, amount));\n\t\t },\n\t\t skip: function(amount) {\n\t\t return this.slice(Math.max(0, amount));\n\t\t },\n\t\t __iterate: function(fn, reverse) {\n\t\t var maxIndex = this.size - 1;\n\t\t var step = this._step;\n\t\t var value = reverse ? this._start + maxIndex * step : this._start;\n\t\t for (var ii = 0; ii <= maxIndex; ii++) {\n\t\t if (fn(value, ii, this) === false) {\n\t\t return ii + 1;\n\t\t }\n\t\t value += reverse ? -step : step;\n\t\t }\n\t\t return ii;\n\t\t },\n\t\t __iterator: function(type, reverse) {\n\t\t var maxIndex = this.size - 1;\n\t\t var step = this._step;\n\t\t var value = reverse ? this._start + maxIndex * step : this._start;\n\t\t var ii = 0;\n\t\t return new Iterator((function() {\n\t\t var v = value;\n\t\t value += reverse ? -step : step;\n\t\t return ii > maxIndex ? iteratorDone() : iteratorValue(type, ii++, v);\n\t\t }));\n\t\t },\n\t\t equals: function(other) {\n\t\t return other instanceof $Range ? this._start === other._start && this._end === other._end && this._step === other._step : deepEqual(this, other);\n\t\t }\n\t\t}, {}, IndexedSeq);\n\t\tvar RangePrototype = Range.prototype;\n\t\tRangePrototype.__toJS = RangePrototype.toArray;\n\t\tRangePrototype.first = ListPrototype.first;\n\t\tRangePrototype.last = ListPrototype.last;\n\t\tvar __EMPTY_RANGE = Range(0, 0);\n\t\tvar Repeat = function Repeat(value, times) {\n\t\t if (times <= 0 && EMPTY_REPEAT) {\n\t\t return EMPTY_REPEAT;\n\t\t }\n\t\t if (!(this instanceof $Repeat)) {\n\t\t return new $Repeat(value, times);\n\t\t }\n\t\t this._value = value;\n\t\t this.size = times === undefined ? Infinity : Math.max(0, times);\n\t\t if (this.size === 0) {\n\t\t EMPTY_REPEAT = this;\n\t\t }\n\t\t};\n\t\tvar $Repeat = Repeat;\n\t\t($traceurRuntime.createClass)(Repeat, {\n\t\t toString: function() {\n\t\t if (this.size === 0) {\n\t\t return 'Repeat []';\n\t\t }\n\t\t return 'Repeat [ ' + this._value + ' ' + this.size + ' times ]';\n\t\t },\n\t\t get: function(index, notSetValue) {\n\t\t return this.has(index) ? this._value : notSetValue;\n\t\t },\n\t\t contains: function(searchValue) {\n\t\t return is(this._value, searchValue);\n\t\t },\n\t\t slice: function(begin, end) {\n\t\t var size = this.size;\n\t\t return wholeSlice(begin, end, size) ? this : new $Repeat(this._value, resolveEnd(end, size) - resolveBegin(begin, size));\n\t\t },\n\t\t reverse: function() {\n\t\t return this;\n\t\t },\n\t\t indexOf: function(searchValue) {\n\t\t if (is(this._value, searchValue)) {\n\t\t return 0;\n\t\t }\n\t\t return -1;\n\t\t },\n\t\t lastIndexOf: function(searchValue) {\n\t\t if (is(this._value, searchValue)) {\n\t\t return this.size;\n\t\t }\n\t\t return -1;\n\t\t },\n\t\t __iterate: function(fn, reverse) {\n\t\t for (var ii = 0; ii < this.size; ii++) {\n\t\t if (fn(this._value, ii, this) === false) {\n\t\t return ii + 1;\n\t\t }\n\t\t }\n\t\t return ii;\n\t\t },\n\t\t __iterator: function(type, reverse) {\n\t\t var $__0 = this;\n\t\t var ii = 0;\n\t\t return new Iterator((function() {\n\t\t return ii < $__0.size ? iteratorValue(type, ii++, $__0._value) : iteratorDone();\n\t\t }));\n\t\t },\n\t\t equals: function(other) {\n\t\t return other instanceof $Repeat ? is(this._value, other._value) : deepEqual(other);\n\t\t }\n\t\t}, {}, IndexedSeq);\n\t\tvar RepeatPrototype = Repeat.prototype;\n\t\tRepeatPrototype.last = RepeatPrototype.first;\n\t\tRepeatPrototype.has = RangePrototype.has;\n\t\tRepeatPrototype.take = RangePrototype.take;\n\t\tRepeatPrototype.skip = RangePrototype.skip;\n\t\tRepeatPrototype.__toJS = RangePrototype.__toJS;\n\t\tvar EMPTY_REPEAT;\n\t\tvar Immutable = {\n\t\t Iterable: Iterable,\n\t\t Seq: Seq,\n\t\t Collection: Collection,\n\t\t Map: Map,\n\t\t OrderedMap: OrderedMap,\n\t\t List: List,\n\t\t Stack: Stack,\n\t\t Set: Set,\n\t\t OrderedSet: OrderedSet,\n\t\t Record: Record,\n\t\t Range: Range,\n\t\t Repeat: Repeat,\n\t\t is: is,\n\t\t fromJS: fromJS\n\t\t};\n\n\t\t return Immutable;\n\t\t}", "function Module(stdlib, imports, buffer) {\n \"use asm\";\n\n function f() {\n return 281474976710655 * 1048575 | 0;\n }\n\n return {\n f: f\n };\n}", "function v7(v8,v9) {\n const v10 = gc;\n // v10 = .function([] => .undefined)\n let v13 = 0;\n const v16 = [13.37,13.37,13.37,13.37];\n // v16 = .object(ofGroup: Array, withProperties: [\"length\", \"__proto__\", \"constructor\"], withMethods: [\"concat\", \"fill\", \"indexOf\", \"entries\", \"forEach\", \"find\", \"reverse\", \"slice\", \"flat\", \"reduce\", \"join\", \"findIndex\", \"reduceRight\", \"some\", \"copyWithin\", \"toString\", \"pop\", \"filter\", \"map\", \"splice\", \"keys\", \"unshift\", \"sort\", \"includes\", \"flatMap\", \"shift\", \"values\", \"every\", \"toLocaleString\", \"push\", \"lastIndexOf\"])\n const v18 = [1337,1337,1337,1337];\n // v18 = .object(ofGroup: Array, withProperties: [\"length\", \"__proto__\", \"constructor\"], withMethods: [\"concat\", \"fill\", \"indexOf\", \"entries\", \"forEach\", \"find\", \"reverse\", \"slice\", \"flat\", \"reduce\", \"join\", \"findIndex\", \"reduceRight\", \"some\", \"copyWithin\", \"toString\", \"pop\", \"filter\", \"map\", \"splice\", \"keys\", \"unshift\", \"sort\", \"includes\", \"flatMap\", \"shift\", \"values\", \"every\", \"toLocaleString\", \"push\", \"lastIndexOf\"])\n const v19 = [3697200800,v16,v18];\n // v19 = .object(ofGroup: Array, withProperties: [\"length\", \"__proto__\", \"constructor\"], withMethods: [\"concat\", \"fill\", \"indexOf\", \"entries\", \"forEach\", \"find\", \"reverse\", \"slice\", \"flat\", \"reduce\", \"join\", \"findIndex\", \"reduceRight\", \"some\", \"copyWithin\", \"toString\", \"pop\", \"filter\", \"map\", \"splice\", \"keys\", \"unshift\", \"sort\", \"includes\", \"flatMap\", \"shift\", \"values\", \"every\", \"toLocaleString\", \"push\", \"lastIndexOf\"])\n const v20 = v6[0];\n // v20 = .unknown\n const v21 = Symbol;\n // v21 = .object(ofGroup: SymbolConstructor, withProperties: [\"match\", \"asyncIterator\", \"search\", \"iterator\", \"replace\", \"isConcatSpreadable\", \"toStringTag\", \"split\", \"toPrimitive\", \"matchAll\", \"hasInstance\", \"unscopable\", \"species\"], withMethods: [\"for\", \"keyFor\"]) + .function([.string] => .object(ofGroup: Symbol, withProperties: [\"__proto__\", \"description\"]))\n for (let v25 = 0; v25 < 4; v25 = v25 + 1) {\n }\n function v27(v28,v29) {\n }\n do {\n const v31 = [13.37,13.37,13.37,13.37];\n // v31 = .object(ofGroup: Array, withProperties: [\"length\", \"__proto__\", \"constructor\"], withMethods: [\"concat\", \"fill\", \"indexOf\", \"entries\", \"forEach\", \"find\", \"reverse\", \"slice\", \"flat\", \"reduce\", \"join\", \"findIndex\", \"reduceRight\", \"some\", \"copyWithin\", \"toString\", \"pop\", \"filter\", \"map\", \"splice\", \"keys\", \"unshift\", \"sort\", \"includes\", \"flatMap\", \"shift\", \"values\", \"every\", \"toLocaleString\", \"push\", \"lastIndexOf\"])\n const v34 = [1337,1337,Function,1337];\n // v34 = .object(ofGroup: Array, withProperties: [\"length\", \"__proto__\", \"constructor\"], withMethods: [\"concat\", \"fill\", \"indexOf\", \"entries\", \"forEach\", \"find\", \"reverse\", \"slice\", \"flat\", \"reduce\", \"join\", \"findIndex\", \"reduceRight\", \"some\", \"copyWithin\", \"toString\", \"pop\", \"filter\", \"map\", \"splice\", \"keys\", \"unshift\", \"sort\", \"includes\", \"flatMap\", \"shift\", \"values\", \"every\", \"toLocaleString\", \"push\", \"lastIndexOf\"])\n const v35 = {__proto__:v34,a:v31,c:1337,d:Function,e:v34,toString:Function};\n // v35 = .object(ofGroup: Object, withProperties: [\"a\", \"__proto__\", \"toString\", \"d\", \"c\", \"e\"])\n let v39 = 0;\n while (v39 < 1337) {\n const v40 = v39 + 1;\n // v40 = .primitive\n v39 = v40;\n }\n const v41 = [13.37,13.37,13.37,13.37];\n // v41 = .object(ofGroup: Array, withProperties: [\"length\", \"__proto__\", \"constructor\"], withMethods: [\"concat\", \"fill\", \"indexOf\", \"entries\", \"forEach\", \"find\", \"reverse\", \"slice\", \"flat\", \"reduce\", \"join\", \"findIndex\", \"reduceRight\", \"some\", \"copyWithin\", \"toString\", \"pop\", \"filter\", \"map\", \"splice\", \"keys\", \"unshift\", \"sort\", \"includes\", \"flatMap\", \"shift\", \"values\", \"every\", \"toLocaleString\", \"push\", \"lastIndexOf\"])\n const v43 = [1337,1337,1337,1337];\n // v43 = .object(ofGroup: Array, withProperties: [\"length\", \"__proto__\", \"constructor\"], withMethods: [\"concat\", \"fill\", \"indexOf\", \"entries\", \"forEach\", \"find\", \"reverse\", \"slice\", \"flat\", \"reduce\", \"join\", \"findIndex\", \"reduceRight\", \"some\", \"copyWithin\", \"toString\", \"pop\", \"filter\", \"map\", \"splice\", \"keys\", \"unshift\", \"sort\", \"includes\", \"flatMap\", \"shift\", \"values\", \"every\", \"toLocaleString\", \"push\", \"lastIndexOf\"])\n const v44 = [3697200800,v41,v43];\n // v44 = .object(ofGroup: Array, withProperties: [\"length\", \"__proto__\", \"constructor\"], withMethods: [\"concat\", \"fill\", \"indexOf\", \"entries\", \"forEach\", \"find\", \"reverse\", \"slice\", \"flat\", \"reduce\", \"join\", \"findIndex\", \"reduceRight\", \"some\", \"copyWithin\", \"toString\", \"pop\", \"filter\", \"map\", \"splice\", \"keys\", \"unshift\", \"sort\", \"includes\", \"flatMap\", \"shift\", \"values\", \"every\", \"toLocaleString\", \"push\", \"lastIndexOf\"])\n const v45 = v13 + 1;\n // v45 = .primitive\n function v48(v49,v50) {\n return v44;\n }\n const v51 = [1337,1337,1337,1337];\n // v51 = .object(ofGroup: Array, withProperties: [\"length\", \"__proto__\", \"constructor\"], withMethods: [\"concat\", \"fill\", \"indexOf\", \"entries\", \"forEach\", \"find\", \"reverse\", \"slice\", \"flat\", \"reduce\", \"join\", \"findIndex\", \"reduceRight\", \"some\", \"copyWithin\", \"toString\", \"pop\", \"filter\", \"map\", \"splice\", \"keys\", \"unshift\", \"sort\", \"includes\", \"flatMap\", \"shift\", \"values\", \"every\", \"toLocaleString\", \"push\", \"lastIndexOf\"])\n for (let v54 = 0; v54 < 100; v54 = v54 + 100) {\n }\n const v55 = {__proto__:v51,a:1337,c:1337,d:Function,e:v51,toString:Function};\n // v55 = .object(ofGroup: Object, withProperties: [\"e\", \"c\", \"__proto__\", \"toString\", \"d\", \"a\"])\n const v56 = v48(1337,v41,...v55);\n // v56 = .unknown\n v13 = v45;\n } while (v13 < 7);\n return v3;\n}", "function e(t){return!!t.constructor&&\"function\"==typeof t.constructor.isBuffer&&t.constructor.isBuffer(t)}", "function universalModule() {\n\t var $Object = Object;\n\n\tfunction createClass(ctor, methods, staticMethods, superClass) {\n\t var proto;\n\t if (superClass) {\n\t var superProto = superClass.prototype;\n\t proto = $Object.create(superProto);\n\t } else {\n\t proto = ctor.prototype;\n\t }\n\t $Object.keys(methods).forEach(function (key) {\n\t proto[key] = methods[key];\n\t });\n\t $Object.keys(staticMethods).forEach(function (key) {\n\t ctor[key] = staticMethods[key];\n\t });\n\t proto.constructor = ctor;\n\t ctor.prototype = proto;\n\t return ctor;\n\t}\n\n\tfunction superCall(self, proto, name, args) {\n\t return $Object.getPrototypeOf(proto)[name].apply(self, args);\n\t}\n\n\tfunction defaultSuperCall(self, proto, args) {\n\t superCall(self, proto, 'constructor', args);\n\t}\n\n\tvar $traceurRuntime = {};\n\t$traceurRuntime.createClass = createClass;\n\t$traceurRuntime.superCall = superCall;\n\t$traceurRuntime.defaultSuperCall = defaultSuperCall;\n\t\"use strict\";\n\tfunction is(first, second) {\n\t if (first === second) {\n\t return first !== 0 || second !== 0 || 1 / first === 1 / second;\n\t }\n\t if (first !== first) {\n\t return second !== second;\n\t }\n\t if (first && typeof first.equals === 'function') {\n\t return first.equals(second);\n\t }\n\t return false;\n\t}\n\tfunction invariant(condition, error) {\n\t if (!condition)\n\t throw new Error(error);\n\t}\n\tvar DELETE = 'delete';\n\tvar SHIFT = 5;\n\tvar SIZE = 1 << SHIFT;\n\tvar MASK = SIZE - 1;\n\tvar NOT_SET = {};\n\tvar CHANGE_LENGTH = {value: false};\n\tvar DID_ALTER = {value: false};\n\tfunction MakeRef(ref) {\n\t ref.value = false;\n\t return ref;\n\t}\n\tfunction SetRef(ref) {\n\t ref && (ref.value = true);\n\t}\n\tfunction OwnerID() {}\n\tfunction arrCopy(arr, offset) {\n\t offset = offset || 0;\n\t var len = Math.max(0, arr.length - offset);\n\t var newArr = new Array(len);\n\t for (var ii = 0; ii < len; ii++) {\n\t newArr[ii] = arr[ii + offset];\n\t }\n\t return newArr;\n\t}\n\tfunction assertNotInfinite(size) {\n\t invariant(size !== Infinity, 'Cannot perform this action with an infinite size.');\n\t}\n\tfunction ensureSize(iter) {\n\t if (iter.size === undefined) {\n\t iter.size = iter.__iterate(returnTrue);\n\t }\n\t return iter.size;\n\t}\n\tfunction wrapIndex(iter, index) {\n\t return index >= 0 ? index : ensureSize(iter) + index;\n\t}\n\tfunction returnTrue() {\n\t return true;\n\t}\n\tfunction wholeSlice(begin, end, size) {\n\t return (begin === 0 || (size !== undefined && begin <= -size)) && (end === undefined || (size !== undefined && end >= size));\n\t}\n\tfunction resolveBegin(begin, size) {\n\t return resolveIndex(begin, size, 0);\n\t}\n\tfunction resolveEnd(end, size) {\n\t return resolveIndex(end, size, size);\n\t}\n\tfunction resolveIndex(index, size, defaultIndex) {\n\t return index === undefined ? defaultIndex : index < 0 ? Math.max(0, size + index) : size === undefined ? index : Math.min(size, index);\n\t}\n\tfunction hash(o) {\n\t if (!o) {\n\t return 0;\n\t }\n\t if (o === true) {\n\t return 1;\n\t }\n\t var type = typeof o;\n\t if (type === 'number') {\n\t if ((o | 0) === o) {\n\t return o & HASH_MAX_VAL;\n\t }\n\t o = '' + o;\n\t type = 'string';\n\t }\n\t if (type === 'string') {\n\t return o.length > STRING_HASH_CACHE_MIN_STRLEN ? cachedHashString(o) : hashString(o);\n\t }\n\t if (o.hashCode) {\n\t return hash(typeof o.hashCode === 'function' ? o.hashCode() : o.hashCode);\n\t }\n\t return hashJSObj(o);\n\t}\n\tfunction cachedHashString(string) {\n\t var hash = stringHashCache[string];\n\t if (hash === undefined) {\n\t hash = hashString(string);\n\t if (STRING_HASH_CACHE_SIZE === STRING_HASH_CACHE_MAX_SIZE) {\n\t STRING_HASH_CACHE_SIZE = 0;\n\t stringHashCache = {};\n\t }\n\t STRING_HASH_CACHE_SIZE++;\n\t stringHashCache[string] = hash;\n\t }\n\t return hash;\n\t}\n\tfunction hashString(string) {\n\t var hash = 0;\n\t for (var ii = 0; ii < string.length; ii++) {\n\t hash = (31 * hash + string.charCodeAt(ii)) & HASH_MAX_VAL;\n\t }\n\t return hash;\n\t}\n\tfunction hashJSObj(obj) {\n\t var hash = weakMap && weakMap.get(obj);\n\t if (hash)\n\t return hash;\n\t hash = obj[UID_HASH_KEY];\n\t if (hash)\n\t return hash;\n\t if (!canDefineProperty) {\n\t hash = obj.propertyIsEnumerable && obj.propertyIsEnumerable[UID_HASH_KEY];\n\t if (hash)\n\t return hash;\n\t hash = getIENodeHash(obj);\n\t if (hash)\n\t return hash;\n\t }\n\t if (Object.isExtensible && !Object.isExtensible(obj)) {\n\t throw new Error('Non-extensible objects are not allowed as keys.');\n\t }\n\t hash = ++objHashUID & HASH_MAX_VAL;\n\t if (weakMap) {\n\t weakMap.set(obj, hash);\n\t } else if (canDefineProperty) {\n\t Object.defineProperty(obj, UID_HASH_KEY, {\n\t 'enumerable': false,\n\t 'configurable': false,\n\t 'writable': false,\n\t 'value': hash\n\t });\n\t } else if (obj.propertyIsEnumerable && obj.propertyIsEnumerable === obj.constructor.prototype.propertyIsEnumerable) {\n\t obj.propertyIsEnumerable = function() {\n\t return this.constructor.prototype.propertyIsEnumerable.apply(this, arguments);\n\t };\n\t obj.propertyIsEnumerable[UID_HASH_KEY] = hash;\n\t } else if (obj.nodeType) {\n\t obj[UID_HASH_KEY] = hash;\n\t } else {\n\t throw new Error('Unable to set a non-enumerable property on object.');\n\t }\n\t return hash;\n\t}\n\tvar canDefineProperty = (function() {\n\t try {\n\t Object.defineProperty({}, 'x', {});\n\t return true;\n\t } catch (e) {\n\t return false;\n\t }\n\t}());\n\tfunction getIENodeHash(node) {\n\t if (node && node.nodeType > 0) {\n\t switch (node.nodeType) {\n\t case 1:\n\t return node.uniqueID;\n\t case 9:\n\t return node.documentElement && node.documentElement.uniqueID;\n\t }\n\t }\n\t}\n\tvar weakMap = typeof WeakMap === 'function' && new WeakMap();\n\tvar HASH_MAX_VAL = 0x7FFFFFFF;\n\tvar objHashUID = 0;\n\tvar UID_HASH_KEY = '__immutablehash__';\n\tif (typeof Symbol === 'function') {\n\t UID_HASH_KEY = Symbol(UID_HASH_KEY);\n\t}\n\tvar STRING_HASH_CACHE_MIN_STRLEN = 16;\n\tvar STRING_HASH_CACHE_MAX_SIZE = 255;\n\tvar STRING_HASH_CACHE_SIZE = 0;\n\tvar stringHashCache = {};\n\tvar ITERATE_KEYS = 0;\n\tvar ITERATE_VALUES = 1;\n\tvar ITERATE_ENTRIES = 2;\n\tvar FAUX_ITERATOR_SYMBOL = '@@iterator';\n\tvar REAL_ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator;\n\tvar ITERATOR_SYMBOL = REAL_ITERATOR_SYMBOL || FAUX_ITERATOR_SYMBOL;\n\tvar Iterator = function Iterator(next) {\n\t this.next = next;\n\t};\n\t($traceurRuntime.createClass)(Iterator, {toString: function() {\n\t return '[Iterator]';\n\t }}, {});\n\tIterator.KEYS = ITERATE_KEYS;\n\tIterator.VALUES = ITERATE_VALUES;\n\tIterator.ENTRIES = ITERATE_ENTRIES;\n\tvar IteratorPrototype = Iterator.prototype;\n\tIteratorPrototype.inspect = IteratorPrototype.toSource = function() {\n\t return this.toString();\n\t};\n\tIteratorPrototype[ITERATOR_SYMBOL] = function() {\n\t return this;\n\t};\n\tfunction iteratorValue(type, k, v, iteratorResult) {\n\t var value = type === 0 ? k : type === 1 ? v : [k, v];\n\t iteratorResult ? (iteratorResult.value = value) : (iteratorResult = {\n\t value: value,\n\t done: false\n\t });\n\t return iteratorResult;\n\t}\n\tfunction iteratorDone() {\n\t return {\n\t value: undefined,\n\t done: true\n\t };\n\t}\n\tfunction hasIterator(maybeIterable) {\n\t return !!_iteratorFn(maybeIterable);\n\t}\n\tfunction isIterator(maybeIterator) {\n\t return maybeIterator && typeof maybeIterator.next === 'function';\n\t}\n\tfunction getIterator(iterable) {\n\t var iteratorFn = _iteratorFn(iterable);\n\t return iteratorFn && iteratorFn.call(iterable);\n\t}\n\tfunction _iteratorFn(iterable) {\n\t var iteratorFn = iterable && ((REAL_ITERATOR_SYMBOL && iterable[REAL_ITERATOR_SYMBOL]) || iterable[FAUX_ITERATOR_SYMBOL]);\n\t if (typeof iteratorFn === 'function') {\n\t return iteratorFn;\n\t }\n\t}\n\tvar Iterable = function Iterable(value) {\n\t return isIterable(value) ? value : Seq(value);\n\t};\n\tvar $Iterable = Iterable;\n\t($traceurRuntime.createClass)(Iterable, {\n\t toArray: function() {\n\t assertNotInfinite(this.size);\n\t var array = new Array(this.size || 0);\n\t this.valueSeq().__iterate((function(v, i) {\n\t array[i] = v;\n\t }));\n\t return array;\n\t },\n\t toIndexedSeq: function() {\n\t return new ToIndexedSequence(this);\n\t },\n\t toJS: function() {\n\t return this.toSeq().map((function(value) {\n\t return value && typeof value.toJS === 'function' ? value.toJS() : value;\n\t })).__toJS();\n\t },\n\t toKeyedSeq: function() {\n\t return new ToKeyedSequence(this, true);\n\t },\n\t toMap: function() {\n\t assertNotInfinite(this.size);\n\t return Map(this.toKeyedSeq());\n\t },\n\t toObject: function() {\n\t assertNotInfinite(this.size);\n\t var object = {};\n\t this.__iterate((function(v, k) {\n\t object[k] = v;\n\t }));\n\t return object;\n\t },\n\t toOrderedMap: function() {\n\t assertNotInfinite(this.size);\n\t return OrderedMap(this.toKeyedSeq());\n\t },\n\t toSet: function() {\n\t assertNotInfinite(this.size);\n\t return Set(isKeyed(this) ? this.valueSeq() : this);\n\t },\n\t toSetSeq: function() {\n\t return new ToSetSequence(this);\n\t },\n\t toSeq: function() {\n\t return isIndexed(this) ? this.toIndexedSeq() : isKeyed(this) ? this.toKeyedSeq() : this.toSetSeq();\n\t },\n\t toStack: function() {\n\t assertNotInfinite(this.size);\n\t return Stack(isKeyed(this) ? this.valueSeq() : this);\n\t },\n\t toList: function() {\n\t assertNotInfinite(this.size);\n\t return List(isKeyed(this) ? this.valueSeq() : this);\n\t },\n\t toString: function() {\n\t return '[Iterable]';\n\t },\n\t __toString: function(head, tail) {\n\t if (this.size === 0) {\n\t return head + tail;\n\t }\n\t return head + ' ' + this.toSeq().map(this.__toStringMapper).join(', ') + ' ' + tail;\n\t },\n\t concat: function() {\n\t for (var values = [],\n\t $__2 = 0; $__2 < arguments.length; $__2++)\n\t values[$__2] = arguments[$__2];\n\t return reify(this, concatFactory(this, values));\n\t },\n\t contains: function(searchValue) {\n\t return this.some((function(value) {\n\t return is(value, searchValue);\n\t }));\n\t },\n\t entries: function() {\n\t return this.__iterator(ITERATE_ENTRIES);\n\t },\n\t every: function(predicate, context) {\n\t var returnValue = true;\n\t this.__iterate((function(v, k, c) {\n\t if (!predicate.call(context, v, k, c)) {\n\t returnValue = false;\n\t return false;\n\t }\n\t }));\n\t return returnValue;\n\t },\n\t filter: function(predicate, context) {\n\t return reify(this, filterFactory(this, predicate, context, true));\n\t },\n\t find: function(predicate, context, notSetValue) {\n\t var foundValue = notSetValue;\n\t this.__iterate((function(v, k, c) {\n\t if (predicate.call(context, v, k, c)) {\n\t foundValue = v;\n\t return false;\n\t }\n\t }));\n\t return foundValue;\n\t },\n\t forEach: function(sideEffect, context) {\n\t return this.__iterate(context ? sideEffect.bind(context) : sideEffect);\n\t },\n\t join: function(separator) {\n\t separator = separator !== undefined ? '' + separator : ',';\n\t var joined = '';\n\t var isFirst = true;\n\t this.__iterate((function(v) {\n\t isFirst ? (isFirst = false) : (joined += separator);\n\t joined += v !== null && v !== undefined ? v : '';\n\t }));\n\t return joined;\n\t },\n\t keys: function() {\n\t return this.__iterator(ITERATE_KEYS);\n\t },\n\t map: function(mapper, context) {\n\t return reify(this, mapFactory(this, mapper, context));\n\t },\n\t reduce: function(reducer, initialReduction, context) {\n\t var reduction;\n\t var useFirst;\n\t if (arguments.length < 2) {\n\t useFirst = true;\n\t } else {\n\t reduction = initialReduction;\n\t }\n\t this.__iterate((function(v, k, c) {\n\t if (useFirst) {\n\t useFirst = false;\n\t reduction = v;\n\t } else {\n\t reduction = reducer.call(context, reduction, v, k, c);\n\t }\n\t }));\n\t return reduction;\n\t },\n\t reduceRight: function(reducer, initialReduction, context) {\n\t var reversed = this.toKeyedSeq().reverse();\n\t return reversed.reduce.apply(reversed, arguments);\n\t },\n\t reverse: function() {\n\t return reify(this, reverseFactory(this, true));\n\t },\n\t slice: function(begin, end) {\n\t if (wholeSlice(begin, end, this.size)) {\n\t return this;\n\t }\n\t var resolvedBegin = resolveBegin(begin, this.size);\n\t var resolvedEnd = resolveEnd(end, this.size);\n\t if (resolvedBegin !== resolvedBegin || resolvedEnd !== resolvedEnd) {\n\t return this.toSeq().cacheResult().slice(begin, end);\n\t }\n\t var skipped = resolvedBegin === 0 ? this : this.skip(resolvedBegin);\n\t return reify(this, resolvedEnd === undefined || resolvedEnd === this.size ? skipped : skipped.take(resolvedEnd - resolvedBegin));\n\t },\n\t some: function(predicate, context) {\n\t return !this.every(not(predicate), context);\n\t },\n\t sort: function(comparator) {\n\t return this.sortBy(valueMapper, comparator);\n\t },\n\t values: function() {\n\t return this.__iterator(ITERATE_VALUES);\n\t },\n\t butLast: function() {\n\t return this.slice(0, -1);\n\t },\n\t count: function(predicate, context) {\n\t return ensureSize(predicate ? this.toSeq().filter(predicate, context) : this);\n\t },\n\t countBy: function(grouper, context) {\n\t return countByFactory(this, grouper, context);\n\t },\n\t equals: function(other) {\n\t if (this === other) {\n\t return true;\n\t }\n\t if (!other || typeof other.equals !== 'function') {\n\t return false;\n\t }\n\t if (this.size !== undefined && other.size !== undefined) {\n\t if (this.size !== other.size) {\n\t return false;\n\t }\n\t if (this.size === 0 && other.size === 0) {\n\t return true;\n\t }\n\t }\n\t if (this.__hash !== undefined && other.__hash !== undefined && this.__hash !== other.__hash) {\n\t return false;\n\t }\n\t return this.__deepEquals(other);\n\t },\n\t __deepEquals: function(other) {\n\t var entries = this.entries();\n\t return typeof other.every === 'function' && other.every((function(v, k) {\n\t var entry = entries.next().value;\n\t return entry && is(entry[0], k) && is(entry[1], v);\n\t })) && entries.next().done;\n\t },\n\t entrySeq: function() {\n\t var iterable = this;\n\t if (iterable._cache) {\n\t return new ArraySeq(iterable._cache);\n\t }\n\t var entriesSequence = iterable.toSeq().map(entryMapper).toIndexedSeq();\n\t entriesSequence.fromEntrySeq = (function() {\n\t return iterable.toSeq();\n\t });\n\t return entriesSequence;\n\t },\n\t filterNot: function(predicate, context) {\n\t return this.filter(not(predicate), context);\n\t },\n\t findLast: function(predicate, context, notSetValue) {\n\t return this.toKeyedSeq().reverse().find(predicate, context, notSetValue);\n\t },\n\t first: function() {\n\t return this.find(returnTrue);\n\t },\n\t flatMap: function(mapper, context) {\n\t return reify(this, flatMapFactory(this, mapper, context));\n\t },\n\t flatten: function(depth) {\n\t return reify(this, flattenFactory(this, depth, true));\n\t },\n\t fromEntrySeq: function() {\n\t return new FromEntriesSequence(this);\n\t },\n\t get: function(searchKey, notSetValue) {\n\t return this.find((function(_, key) {\n\t return is(key, searchKey);\n\t }), undefined, notSetValue);\n\t },\n\t getIn: function(searchKeyPath, notSetValue) {\n\t var nested = this;\n\t if (searchKeyPath) {\n\t for (var ii = 0; ii < searchKeyPath.length; ii++) {\n\t nested = nested && nested.get ? nested.get(searchKeyPath[ii], NOT_SET) : NOT_SET;\n\t if (nested === NOT_SET) {\n\t return notSetValue;\n\t }\n\t }\n\t }\n\t return nested;\n\t },\n\t groupBy: function(grouper, context) {\n\t return groupByFactory(this, grouper, context);\n\t },\n\t has: function(searchKey) {\n\t return this.get(searchKey, NOT_SET) !== NOT_SET;\n\t },\n\t isSubset: function(iter) {\n\t iter = typeof iter.contains === 'function' ? iter : $Iterable(iter);\n\t return this.every((function(value) {\n\t return iter.contains(value);\n\t }));\n\t },\n\t isSuperset: function(iter) {\n\t return iter.isSubset(this);\n\t },\n\t keySeq: function() {\n\t return this.toSeq().map(keyMapper).toIndexedSeq();\n\t },\n\t last: function() {\n\t return this.toSeq().reverse().first();\n\t },\n\t max: function(comparator) {\n\t return this.maxBy(valueMapper, comparator);\n\t },\n\t maxBy: function(mapper, comparator) {\n\t var $__0 = this;\n\t comparator = comparator || defaultComparator;\n\t var maxEntry = this.entrySeq().reduce((function(max, next) {\n\t return comparator(mapper(next[1], next[0], $__0), mapper(max[1], max[0], $__0)) > 0 ? next : max;\n\t }));\n\t return maxEntry && maxEntry[1];\n\t },\n\t min: function(comparator) {\n\t return this.minBy(valueMapper, comparator);\n\t },\n\t minBy: function(mapper, comparator) {\n\t var $__0 = this;\n\t comparator = comparator || defaultComparator;\n\t var minEntry = this.entrySeq().reduce((function(min, next) {\n\t return comparator(mapper(next[1], next[0], $__0), mapper(min[1], min[0], $__0)) < 0 ? next : min;\n\t }));\n\t return minEntry && minEntry[1];\n\t },\n\t rest: function() {\n\t return this.slice(1);\n\t },\n\t skip: function(amount) {\n\t return reify(this, skipFactory(this, amount, true));\n\t },\n\t skipLast: function(amount) {\n\t return reify(this, this.toSeq().reverse().skip(amount).reverse());\n\t },\n\t skipWhile: function(predicate, context) {\n\t return reify(this, skipWhileFactory(this, predicate, context, true));\n\t },\n\t skipUntil: function(predicate, context) {\n\t return this.skipWhile(not(predicate), context);\n\t },\n\t sortBy: function(mapper, comparator) {\n\t var $__0 = this;\n\t comparator = comparator || defaultComparator;\n\t return reify(this, new ArraySeq(this.entrySeq().entrySeq().toArray().sort((function(a, b) {\n\t return comparator(mapper(a[1][1], a[1][0], $__0), mapper(b[1][1], b[1][0], $__0)) || a[0] - b[0];\n\t }))).fromEntrySeq().valueSeq().fromEntrySeq());\n\t },\n\t take: function(amount) {\n\t return reify(this, takeFactory(this, amount));\n\t },\n\t takeLast: function(amount) {\n\t return reify(this, this.toSeq().reverse().take(amount).reverse());\n\t },\n\t takeWhile: function(predicate, context) {\n\t return reify(this, takeWhileFactory(this, predicate, context));\n\t },\n\t takeUntil: function(predicate, context) {\n\t return this.takeWhile(not(predicate), context);\n\t },\n\t valueSeq: function() {\n\t return this.toIndexedSeq();\n\t },\n\t hashCode: function() {\n\t return this.__hash || (this.__hash = this.size === Infinity ? 0 : this.reduce((function(h, v, k) {\n\t return (h + (hash(v) ^ (v === k ? 0 : hash(k)))) & HASH_MAX_VAL;\n\t }), 0));\n\t }\n\t}, {});\n\tvar IS_ITERABLE_SENTINEL = '@@__IMMUTABLE_ITERABLE__@@';\n\tvar IS_KEYED_SENTINEL = '@@__IMMUTABLE_KEYED__@@';\n\tvar IS_INDEXED_SENTINEL = '@@__IMMUTABLE_INDEXED__@@';\n\tvar IterablePrototype = Iterable.prototype;\n\tIterablePrototype[IS_ITERABLE_SENTINEL] = true;\n\tIterablePrototype[ITERATOR_SYMBOL] = IterablePrototype.values;\n\tIterablePrototype.toJSON = IterablePrototype.toJS;\n\tIterablePrototype.__toJS = IterablePrototype.toArray;\n\tIterablePrototype.__toStringMapper = quoteString;\n\tIterablePrototype.inspect = IterablePrototype.toSource = function() {\n\t return this.toString();\n\t};\n\tIterablePrototype.chain = IterablePrototype.flatMap;\n\t(function() {\n\t try {\n\t Object.defineProperty(IterablePrototype, 'length', {get: function() {\n\t if (!Iterable.noLengthWarning) {\n\t var stack;\n\t try {\n\t throw new Error();\n\t } catch (error) {\n\t stack = error.stack;\n\t }\n\t if (stack.indexOf('_wrapObject') === -1) {\n\t console && console.warn && console.warn('iterable.length has been deprecated, ' + 'use iterable.size or iterable.count(). ' + 'This warning will become a silent error in a future version. ' + stack);\n\t return this.size;\n\t }\n\t }\n\t }});\n\t } catch (e) {}\n\t})();\n\tvar KeyedIterable = function KeyedIterable(value) {\n\t return isKeyed(value) ? value : KeyedSeq(value);\n\t};\n\t($traceurRuntime.createClass)(KeyedIterable, {\n\t flip: function() {\n\t return reify(this, flipFactory(this));\n\t },\n\t findKey: function(predicate, context) {\n\t var foundKey;\n\t this.__iterate((function(v, k, c) {\n\t if (predicate.call(context, v, k, c)) {\n\t foundKey = k;\n\t return false;\n\t }\n\t }));\n\t return foundKey;\n\t },\n\t findLastKey: function(predicate, context) {\n\t return this.toSeq().reverse().findKey(predicate, context);\n\t },\n\t keyOf: function(searchValue) {\n\t return this.findKey((function(value) {\n\t return is(value, searchValue);\n\t }));\n\t },\n\t lastKeyOf: function(searchValue) {\n\t return this.toSeq().reverse().keyOf(searchValue);\n\t },\n\t mapEntries: function(mapper, context) {\n\t var $__0 = this;\n\t var iterations = 0;\n\t return reify(this, this.toSeq().map((function(v, k) {\n\t return mapper.call(context, [k, v], iterations++, $__0);\n\t })).fromEntrySeq());\n\t },\n\t mapKeys: function(mapper, context) {\n\t var $__0 = this;\n\t return reify(this, this.toSeq().flip().map((function(k, v) {\n\t return mapper.call(context, k, v, $__0);\n\t })).flip());\n\t }\n\t}, {}, Iterable);\n\tvar KeyedIterablePrototype = KeyedIterable.prototype;\n\tKeyedIterablePrototype[IS_KEYED_SENTINEL] = true;\n\tKeyedIterablePrototype[ITERATOR_SYMBOL] = IterablePrototype.entries;\n\tKeyedIterablePrototype.__toJS = IterablePrototype.toObject;\n\tKeyedIterablePrototype.__toStringMapper = (function(v, k) {\n\t return k + ': ' + quoteString(v);\n\t});\n\tvar IndexedIterable = function IndexedIterable(value) {\n\t return isIndexed(value) ? value : IndexedSeq(value);\n\t};\n\t($traceurRuntime.createClass)(IndexedIterable, {\n\t toKeyedSeq: function() {\n\t return new ToKeyedSequence(this, false);\n\t },\n\t filter: function(predicate, context) {\n\t return reify(this, filterFactory(this, predicate, context, false));\n\t },\n\t findIndex: function(predicate, context) {\n\t var key = this.toKeyedSeq().findKey(predicate, context);\n\t return key === undefined ? -1 : key;\n\t },\n\t indexOf: function(searchValue) {\n\t var key = this.toKeyedSeq().keyOf(searchValue);\n\t return key === undefined ? -1 : key;\n\t },\n\t lastIndexOf: function(searchValue) {\n\t var key = this.toKeyedSeq().lastKeyOf(searchValue);\n\t return key === undefined ? -1 : key;\n\t },\n\t reverse: function() {\n\t return reify(this, reverseFactory(this, false));\n\t },\n\t splice: function(index, removeNum) {\n\t var numArgs = arguments.length;\n\t removeNum = Math.max(removeNum | 0, 0);\n\t if (numArgs === 0 || (numArgs === 2 && !removeNum)) {\n\t return this;\n\t }\n\t index = resolveBegin(index, this.size);\n\t var spliced = this.slice(0, index);\n\t return reify(this, numArgs === 1 ? spliced : spliced.concat(arrCopy(arguments, 2), this.slice(index + removeNum)));\n\t },\n\t findLastIndex: function(predicate, context) {\n\t var key = this.toKeyedSeq().findLastKey(predicate, context);\n\t return key === undefined ? -1 : key;\n\t },\n\t first: function() {\n\t return this.get(0);\n\t },\n\t flatten: function(depth) {\n\t return reify(this, flattenFactory(this, depth, false));\n\t },\n\t get: function(index, notSetValue) {\n\t index = wrapIndex(this, index);\n\t return (index < 0 || (this.size === Infinity || (this.size !== undefined && index > this.size))) ? notSetValue : this.find((function(_, key) {\n\t return key === index;\n\t }), undefined, notSetValue);\n\t },\n\t has: function(index) {\n\t index = wrapIndex(this, index);\n\t return index >= 0 && (this.size !== undefined ? this.size === Infinity || index < this.size : this.indexOf(index) !== -1);\n\t },\n\t interpose: function(separator) {\n\t return reify(this, interposeFactory(this, separator));\n\t },\n\t last: function() {\n\t return this.get(-1);\n\t },\n\t skip: function(amount) {\n\t var iter = this;\n\t var skipSeq = skipFactory(iter, amount, false);\n\t if (isSeq(iter) && skipSeq !== iter) {\n\t skipSeq.get = function(index, notSetValue) {\n\t index = wrapIndex(this, index);\n\t return index >= 0 ? iter.get(index + amount, notSetValue) : notSetValue;\n\t };\n\t }\n\t return reify(this, skipSeq);\n\t },\n\t skipWhile: function(predicate, context) {\n\t return reify(this, skipWhileFactory(this, predicate, context, false));\n\t },\n\t sortBy: function(mapper, comparator) {\n\t var $__0 = this;\n\t comparator = comparator || defaultComparator;\n\t return reify(this, new ArraySeq(this.entrySeq().toArray().sort((function(a, b) {\n\t return comparator(mapper(a[1], a[0], $__0), mapper(b[1], b[0], $__0)) || a[0] - b[0];\n\t }))).fromEntrySeq().valueSeq());\n\t },\n\t take: function(amount) {\n\t var iter = this;\n\t var takeSeq = takeFactory(iter, amount);\n\t if (isSeq(iter) && takeSeq !== iter) {\n\t takeSeq.get = function(index, notSetValue) {\n\t index = wrapIndex(this, index);\n\t return index >= 0 && index < amount ? iter.get(index, notSetValue) : notSetValue;\n\t };\n\t }\n\t return reify(this, takeSeq);\n\t }\n\t}, {}, Iterable);\n\tIndexedIterable.prototype[IS_INDEXED_SENTINEL] = true;\n\tvar SetIterable = function SetIterable(value) {\n\t return isIterable(value) && !isAssociative(value) ? value : SetSeq(value);\n\t};\n\t($traceurRuntime.createClass)(SetIterable, {\n\t get: function(value, notSetValue) {\n\t return this.has(value) ? value : notSetValue;\n\t },\n\t contains: function(value) {\n\t return this.has(value);\n\t },\n\t keySeq: function() {\n\t return this.valueSeq();\n\t }\n\t}, {}, Iterable);\n\tSetIterable.prototype.has = IterablePrototype.contains;\n\tfunction isIterable(maybeIterable) {\n\t return !!(maybeIterable && maybeIterable[IS_ITERABLE_SENTINEL]);\n\t}\n\tfunction isKeyed(maybeKeyed) {\n\t return !!(maybeKeyed && maybeKeyed[IS_KEYED_SENTINEL]);\n\t}\n\tfunction isIndexed(maybeIndexed) {\n\t return !!(maybeIndexed && maybeIndexed[IS_INDEXED_SENTINEL]);\n\t}\n\tfunction isAssociative(maybeAssociative) {\n\t return isKeyed(maybeAssociative) || isIndexed(maybeAssociative);\n\t}\n\tIterable.isIterable = isIterable;\n\tIterable.isKeyed = isKeyed;\n\tIterable.isIndexed = isIndexed;\n\tIterable.isAssociative = isAssociative;\n\tIterable.Keyed = KeyedIterable;\n\tIterable.Indexed = IndexedIterable;\n\tIterable.Set = SetIterable;\n\tIterable.Iterator = Iterator;\n\tfunction valueMapper(v) {\n\t return v;\n\t}\n\tfunction keyMapper(v, k) {\n\t return k;\n\t}\n\tfunction entryMapper(v, k) {\n\t return [k, v];\n\t}\n\tfunction not(predicate) {\n\t return function() {\n\t return !predicate.apply(this, arguments);\n\t };\n\t}\n\tfunction quoteString(value) {\n\t return typeof value === 'string' ? JSON.stringify(value) : value;\n\t}\n\tfunction defaultComparator(a, b) {\n\t return a > b ? 1 : a < b ? -1 : 0;\n\t}\n\tfunction mixin(ctor, methods) {\n\t var proto = ctor.prototype;\n\t var keyCopier = (function(key) {\n\t proto[key] = methods[key];\n\t });\n\t Object.keys(methods).forEach(keyCopier);\n\t Object.getOwnPropertySymbols && Object.getOwnPropertySymbols(methods).forEach(keyCopier);\n\t return ctor;\n\t}\n\tvar Seq = function Seq(value) {\n\t return value === null || value === undefined ? emptySequence() : isIterable(value) ? value.toSeq() : seqFromValue(value);\n\t};\n\tvar $Seq = Seq;\n\t($traceurRuntime.createClass)(Seq, {\n\t toSeq: function() {\n\t return this;\n\t },\n\t toString: function() {\n\t return this.__toString('Seq {', '}');\n\t },\n\t cacheResult: function() {\n\t if (!this._cache && this.__iterateUncached) {\n\t this._cache = this.entrySeq().toArray();\n\t this.size = this._cache.length;\n\t }\n\t return this;\n\t },\n\t __iterate: function(fn, reverse) {\n\t return seqIterate(this, fn, reverse, true);\n\t },\n\t __iterator: function(type, reverse) {\n\t return seqIterator(this, type, reverse, true);\n\t }\n\t}, {of: function() {\n\t return $Seq(arguments);\n\t }}, Iterable);\n\tvar KeyedSeq = function KeyedSeq(value) {\n\t return value === null || value === undefined ? emptySequence().toKeyedSeq() : isIterable(value) ? (isKeyed(value) ? value.toSeq() : value.fromEntrySeq()) : keyedSeqFromValue(value);\n\t};\n\tvar $KeyedSeq = KeyedSeq;\n\t($traceurRuntime.createClass)(KeyedSeq, {\n\t toKeyedSeq: function() {\n\t return this;\n\t },\n\t toSeq: function() {\n\t return this;\n\t }\n\t}, {of: function() {\n\t return $KeyedSeq(arguments);\n\t }}, Seq);\n\tmixin(KeyedSeq, KeyedIterable.prototype);\n\tvar IndexedSeq = function IndexedSeq(value) {\n\t return value === null || value === undefined ? emptySequence() : !isIterable(value) ? indexedSeqFromValue(value) : isKeyed(value) ? value.entrySeq() : value.toIndexedSeq();\n\t};\n\tvar $IndexedSeq = IndexedSeq;\n\t($traceurRuntime.createClass)(IndexedSeq, {\n\t toIndexedSeq: function() {\n\t return this;\n\t },\n\t toString: function() {\n\t return this.__toString('Seq [', ']');\n\t },\n\t __iterate: function(fn, reverse) {\n\t return seqIterate(this, fn, reverse, false);\n\t },\n\t __iterator: function(type, reverse) {\n\t return seqIterator(this, type, reverse, false);\n\t }\n\t}, {of: function() {\n\t return $IndexedSeq(arguments);\n\t }}, Seq);\n\tmixin(IndexedSeq, IndexedIterable.prototype);\n\tvar SetSeq = function SetSeq(value) {\n\t return (value === null || value === undefined ? emptySequence() : !isIterable(value) ? indexedSeqFromValue(value) : isKeyed(value) ? value.entrySeq() : value).toSetSeq();\n\t};\n\tvar $SetSeq = SetSeq;\n\t($traceurRuntime.createClass)(SetSeq, {toSetSeq: function() {\n\t return this;\n\t }}, {of: function() {\n\t return $SetSeq(arguments);\n\t }}, Seq);\n\tmixin(SetSeq, SetIterable.prototype);\n\tSeq.isSeq = isSeq;\n\tSeq.Keyed = KeyedSeq;\n\tSeq.Set = SetSeq;\n\tSeq.Indexed = IndexedSeq;\n\tvar IS_SEQ_SENTINEL = '@@__IMMUTABLE_SEQ__@@';\n\tSeq.prototype[IS_SEQ_SENTINEL] = true;\n\tvar ArraySeq = function ArraySeq(array) {\n\t this._array = array;\n\t this.size = array.length;\n\t};\n\t($traceurRuntime.createClass)(ArraySeq, {\n\t get: function(index, notSetValue) {\n\t return this.has(index) ? this._array[wrapIndex(this, index)] : notSetValue;\n\t },\n\t __iterate: function(fn, reverse) {\n\t var array = this._array;\n\t var maxIndex = array.length - 1;\n\t for (var ii = 0; ii <= maxIndex; ii++) {\n\t if (fn(array[reverse ? maxIndex - ii : ii], ii, this) === false) {\n\t return ii + 1;\n\t }\n\t }\n\t return ii;\n\t },\n\t __iterator: function(type, reverse) {\n\t var array = this._array;\n\t var maxIndex = array.length - 1;\n\t var ii = 0;\n\t return new Iterator((function() {\n\t return ii > maxIndex ? iteratorDone() : iteratorValue(type, ii, array[reverse ? maxIndex - ii++ : ii++]);\n\t }));\n\t }\n\t}, {}, IndexedSeq);\n\tvar ObjectSeq = function ObjectSeq(object) {\n\t var keys = Object.keys(object);\n\t this._object = object;\n\t this._keys = keys;\n\t this.size = keys.length;\n\t};\n\t($traceurRuntime.createClass)(ObjectSeq, {\n\t get: function(key, notSetValue) {\n\t if (notSetValue !== undefined && !this.has(key)) {\n\t return notSetValue;\n\t }\n\t return this._object[key];\n\t },\n\t has: function(key) {\n\t return this._object.hasOwnProperty(key);\n\t },\n\t __iterate: function(fn, reverse) {\n\t var object = this._object;\n\t var keys = this._keys;\n\t var maxIndex = keys.length - 1;\n\t for (var ii = 0; ii <= maxIndex; ii++) {\n\t var key = keys[reverse ? maxIndex - ii : ii];\n\t if (fn(object[key], key, this) === false) {\n\t return ii + 1;\n\t }\n\t }\n\t return ii;\n\t },\n\t __iterator: function(type, reverse) {\n\t var object = this._object;\n\t var keys = this._keys;\n\t var maxIndex = keys.length - 1;\n\t var ii = 0;\n\t return new Iterator((function() {\n\t var key = keys[reverse ? maxIndex - ii : ii];\n\t return ii++ > maxIndex ? iteratorDone() : iteratorValue(type, key, object[key]);\n\t }));\n\t }\n\t}, {}, KeyedSeq);\n\tvar IterableSeq = function IterableSeq(iterable) {\n\t this._iterable = iterable;\n\t this.size = iterable.length || iterable.size;\n\t};\n\t($traceurRuntime.createClass)(IterableSeq, {\n\t __iterateUncached: function(fn, reverse) {\n\t if (reverse) {\n\t return this.cacheResult().__iterate(fn, reverse);\n\t }\n\t var iterable = this._iterable;\n\t var iterator = getIterator(iterable);\n\t var iterations = 0;\n\t if (isIterator(iterator)) {\n\t var step;\n\t while (!(step = iterator.next()).done) {\n\t if (fn(step.value, iterations++, this) === false) {\n\t break;\n\t }\n\t }\n\t }\n\t return iterations;\n\t },\n\t __iteratorUncached: function(type, reverse) {\n\t if (reverse) {\n\t return this.cacheResult().__iterator(type, reverse);\n\t }\n\t var iterable = this._iterable;\n\t var iterator = getIterator(iterable);\n\t if (!isIterator(iterator)) {\n\t return new Iterator(iteratorDone);\n\t }\n\t var iterations = 0;\n\t return new Iterator((function() {\n\t var step = iterator.next();\n\t return step.done ? step : iteratorValue(type, iterations++, step.value);\n\t }));\n\t }\n\t}, {}, IndexedSeq);\n\tvar IteratorSeq = function IteratorSeq(iterator) {\n\t this._iterator = iterator;\n\t this._iteratorCache = [];\n\t};\n\t($traceurRuntime.createClass)(IteratorSeq, {\n\t __iterateUncached: function(fn, reverse) {\n\t if (reverse) {\n\t return this.cacheResult().__iterate(fn, reverse);\n\t }\n\t var iterator = this._iterator;\n\t var cache = this._iteratorCache;\n\t var iterations = 0;\n\t while (iterations < cache.length) {\n\t if (fn(cache[iterations], iterations++, this) === false) {\n\t return iterations;\n\t }\n\t }\n\t var step;\n\t while (!(step = iterator.next()).done) {\n\t var val = step.value;\n\t cache[iterations] = val;\n\t if (fn(val, iterations++, this) === false) {\n\t break;\n\t }\n\t }\n\t return iterations;\n\t },\n\t __iteratorUncached: function(type, reverse) {\n\t if (reverse) {\n\t return this.cacheResult().__iterator(type, reverse);\n\t }\n\t var iterator = this._iterator;\n\t var cache = this._iteratorCache;\n\t var iterations = 0;\n\t return new Iterator((function() {\n\t if (iterations >= cache.length) {\n\t var step = iterator.next();\n\t if (step.done) {\n\t return step;\n\t }\n\t cache[iterations] = step.value;\n\t }\n\t return iteratorValue(type, iterations, cache[iterations++]);\n\t }));\n\t }\n\t}, {}, IndexedSeq);\n\tfunction isSeq(maybeSeq) {\n\t return !!(maybeSeq && maybeSeq[IS_SEQ_SENTINEL]);\n\t}\n\tvar EMPTY_SEQ;\n\tfunction emptySequence() {\n\t return EMPTY_SEQ || (EMPTY_SEQ = new ArraySeq([]));\n\t}\n\tfunction keyedSeqFromValue(value) {\n\t var seq = Array.isArray(value) ? new ArraySeq(value).fromEntrySeq() : isIterator(value) ? new IteratorSeq(value).fromEntrySeq() : hasIterator(value) ? new IterableSeq(value).fromEntrySeq() : typeof value === 'object' ? new ObjectSeq(value) : undefined;\n\t if (!seq) {\n\t throw new TypeError('Expected Array or iterable object of [k, v] entries, ' + 'or keyed object: ' + value);\n\t }\n\t return seq;\n\t}\n\tfunction indexedSeqFromValue(value) {\n\t var seq = maybeIndexedSeqFromValue(value);\n\t if (!seq) {\n\t throw new TypeError('Expected Array or iterable object of values: ' + value);\n\t }\n\t return seq;\n\t}\n\tfunction seqFromValue(value) {\n\t var seq = maybeIndexedSeqFromValue(value) || (typeof value === 'object' && new ObjectSeq(value));\n\t if (!seq) {\n\t throw new TypeError('Expected Array or iterable object of values, or keyed object: ' + value);\n\t }\n\t return seq;\n\t}\n\tfunction maybeIndexedSeqFromValue(value) {\n\t return (isArrayLike(value) ? new ArraySeq(value) : isIterator(value) ? new IteratorSeq(value) : hasIterator(value) ? new IterableSeq(value) : undefined);\n\t}\n\tfunction isArrayLike(value) {\n\t return value && typeof value.length === 'number';\n\t}\n\tfunction seqIterate(seq, fn, reverse, useKeys) {\n\t assertNotInfinite(seq.size);\n\t var cache = seq._cache;\n\t if (cache) {\n\t var maxIndex = cache.length - 1;\n\t for (var ii = 0; ii <= maxIndex; ii++) {\n\t var entry = cache[reverse ? maxIndex - ii : ii];\n\t if (fn(entry[1], useKeys ? entry[0] : ii, seq) === false) {\n\t return ii + 1;\n\t }\n\t }\n\t return ii;\n\t }\n\t return seq.__iterateUncached(fn, reverse);\n\t}\n\tfunction seqIterator(seq, type, reverse, useKeys) {\n\t var cache = seq._cache;\n\t if (cache) {\n\t var maxIndex = cache.length - 1;\n\t var ii = 0;\n\t return new Iterator((function() {\n\t var entry = cache[reverse ? maxIndex - ii : ii];\n\t return ii++ > maxIndex ? iteratorDone() : iteratorValue(type, useKeys ? entry[0] : ii - 1, entry[1]);\n\t }));\n\t }\n\t return seq.__iteratorUncached(type, reverse);\n\t}\n\tfunction fromJS(json, converter) {\n\t return converter ? _fromJSWith(converter, json, '', {'': json}) : _fromJSDefault(json);\n\t}\n\tfunction _fromJSWith(converter, json, key, parentJSON) {\n\t if (Array.isArray(json)) {\n\t return converter.call(parentJSON, key, IndexedSeq(json).map((function(v, k) {\n\t return _fromJSWith(converter, v, k, json);\n\t })));\n\t }\n\t if (isPlainObj(json)) {\n\t return converter.call(parentJSON, key, KeyedSeq(json).map((function(v, k) {\n\t return _fromJSWith(converter, v, k, json);\n\t })));\n\t }\n\t return json;\n\t}\n\tfunction _fromJSDefault(json) {\n\t if (Array.isArray(json)) {\n\t return IndexedSeq(json).map(_fromJSDefault).toList();\n\t }\n\t if (isPlainObj(json)) {\n\t return KeyedSeq(json).map(_fromJSDefault).toMap();\n\t }\n\t return json;\n\t}\n\tfunction isPlainObj(value) {\n\t return value && value.constructor === Object;\n\t}\n\tvar Collection = function Collection() {\n\t throw TypeError('Abstract');\n\t};\n\t($traceurRuntime.createClass)(Collection, {}, {}, Iterable);\n\tvar KeyedCollection = function KeyedCollection() {\n\t $traceurRuntime.defaultSuperCall(this, $KeyedCollection.prototype, arguments);\n\t};\n\tvar $KeyedCollection = KeyedCollection;\n\t($traceurRuntime.createClass)(KeyedCollection, {}, {}, Collection);\n\tmixin(KeyedCollection, KeyedIterable.prototype);\n\tvar IndexedCollection = function IndexedCollection() {\n\t $traceurRuntime.defaultSuperCall(this, $IndexedCollection.prototype, arguments);\n\t};\n\tvar $IndexedCollection = IndexedCollection;\n\t($traceurRuntime.createClass)(IndexedCollection, {}, {}, Collection);\n\tmixin(IndexedCollection, IndexedIterable.prototype);\n\tvar SetCollection = function SetCollection() {\n\t $traceurRuntime.defaultSuperCall(this, $SetCollection.prototype, arguments);\n\t};\n\tvar $SetCollection = SetCollection;\n\t($traceurRuntime.createClass)(SetCollection, {}, {}, Collection);\n\tmixin(SetCollection, SetIterable.prototype);\n\tCollection.Keyed = KeyedCollection;\n\tCollection.Indexed = IndexedCollection;\n\tCollection.Set = SetCollection;\n\tvar Map = function Map(value) {\n\t return value === null || value === undefined ? emptyMap() : isMap(value) ? value : emptyMap().merge(KeyedIterable(value));\n\t};\n\t($traceurRuntime.createClass)(Map, {\n\t toString: function() {\n\t return this.__toString('Map {', '}');\n\t },\n\t get: function(k, notSetValue) {\n\t return this._root ? this._root.get(0, hash(k), k, notSetValue) : notSetValue;\n\t },\n\t set: function(k, v) {\n\t return updateMap(this, k, v);\n\t },\n\t setIn: function(keyPath, v) {\n\t invariant(keyPath.length > 0, 'Requires non-empty key path.');\n\t return this.updateIn(keyPath, (function() {\n\t return v;\n\t }));\n\t },\n\t remove: function(k) {\n\t return updateMap(this, k, NOT_SET);\n\t },\n\t removeIn: function(keyPath) {\n\t invariant(keyPath.length > 0, 'Requires non-empty key path.');\n\t return this.updateIn(keyPath, (function() {\n\t return NOT_SET;\n\t }));\n\t },\n\t update: function(k, notSetValue, updater) {\n\t return arguments.length === 1 ? k(this) : this.updateIn([k], notSetValue, updater);\n\t },\n\t updateIn: function(keyPath, notSetValue, updater) {\n\t if (!updater) {\n\t updater = notSetValue;\n\t notSetValue = undefined;\n\t }\n\t return keyPath.length === 0 ? updater(this) : updateInDeepMap(this, keyPath, notSetValue, updater, 0);\n\t },\n\t clear: function() {\n\t if (this.size === 0) {\n\t return this;\n\t }\n\t if (this.__ownerID) {\n\t this.size = 0;\n\t this._root = null;\n\t this.__hash = undefined;\n\t this.__altered = true;\n\t return this;\n\t }\n\t return emptyMap();\n\t },\n\t merge: function() {\n\t return mergeIntoMapWith(this, undefined, arguments);\n\t },\n\t mergeWith: function(merger) {\n\t for (var iters = [],\n\t $__3 = 1; $__3 < arguments.length; $__3++)\n\t iters[$__3 - 1] = arguments[$__3];\n\t return mergeIntoMapWith(this, merger, iters);\n\t },\n\t mergeDeep: function() {\n\t return mergeIntoMapWith(this, deepMerger(undefined), arguments);\n\t },\n\t mergeDeepWith: function(merger) {\n\t for (var iters = [],\n\t $__4 = 1; $__4 < arguments.length; $__4++)\n\t iters[$__4 - 1] = arguments[$__4];\n\t return mergeIntoMapWith(this, deepMerger(merger), iters);\n\t },\n\t withMutations: function(fn) {\n\t var mutable = this.asMutable();\n\t fn(mutable);\n\t return mutable.wasAltered() ? mutable.__ensureOwner(this.__ownerID) : this;\n\t },\n\t asMutable: function() {\n\t return this.__ownerID ? this : this.__ensureOwner(new OwnerID());\n\t },\n\t asImmutable: function() {\n\t return this.__ensureOwner();\n\t },\n\t wasAltered: function() {\n\t return this.__altered;\n\t },\n\t __iterator: function(type, reverse) {\n\t return new MapIterator(this, type, reverse);\n\t },\n\t __iterate: function(fn, reverse) {\n\t var $__0 = this;\n\t var iterations = 0;\n\t this._root && this._root.iterate((function(entry) {\n\t iterations++;\n\t return fn(entry[1], entry[0], $__0);\n\t }), reverse);\n\t return iterations;\n\t },\n\t __ensureOwner: function(ownerID) {\n\t if (ownerID === this.__ownerID) {\n\t return this;\n\t }\n\t if (!ownerID) {\n\t this.__ownerID = ownerID;\n\t this.__altered = false;\n\t return this;\n\t }\n\t return makeMap(this.size, this._root, ownerID, this.__hash);\n\t }\n\t}, {}, KeyedCollection);\n\tfunction isMap(maybeMap) {\n\t return !!(maybeMap && maybeMap[IS_MAP_SENTINEL]);\n\t}\n\tMap.isMap = isMap;\n\tvar IS_MAP_SENTINEL = '@@__IMMUTABLE_MAP__@@';\n\tvar MapPrototype = Map.prototype;\n\tMapPrototype[IS_MAP_SENTINEL] = true;\n\tMapPrototype[DELETE] = MapPrototype.remove;\n\tvar BitmapIndexedNode = function BitmapIndexedNode(ownerID, bitmap, nodes) {\n\t this.ownerID = ownerID;\n\t this.bitmap = bitmap;\n\t this.nodes = nodes;\n\t};\n\tvar $BitmapIndexedNode = BitmapIndexedNode;\n\t($traceurRuntime.createClass)(BitmapIndexedNode, {\n\t get: function(shift, hash, key, notSetValue) {\n\t var bit = (1 << ((shift === 0 ? hash : hash >>> shift) & MASK));\n\t var bitmap = this.bitmap;\n\t return (bitmap & bit) === 0 ? notSetValue : this.nodes[popCount(bitmap & (bit - 1))].get(shift + SHIFT, hash, key, notSetValue);\n\t },\n\t update: function(ownerID, shift, hash, key, value, didChangeSize, didAlter) {\n\t var hashFrag = (shift === 0 ? hash : hash >>> shift) & MASK;\n\t var bit = 1 << hashFrag;\n\t var bitmap = this.bitmap;\n\t var exists = (bitmap & bit) !== 0;\n\t if (!exists && value === NOT_SET) {\n\t return this;\n\t }\n\t var idx = popCount(bitmap & (bit - 1));\n\t var nodes = this.nodes;\n\t var node = exists ? nodes[idx] : undefined;\n\t var newNode = updateNode(node, ownerID, shift + SHIFT, hash, key, value, didChangeSize, didAlter);\n\t if (newNode === node) {\n\t return this;\n\t }\n\t if (!exists && newNode && nodes.length >= MAX_BITMAP_SIZE) {\n\t return expandNodes(ownerID, nodes, bitmap, hashFrag, newNode);\n\t }\n\t if (exists && !newNode && nodes.length === 2 && isLeafNode(nodes[idx ^ 1])) {\n\t return nodes[idx ^ 1];\n\t }\n\t if (exists && newNode && nodes.length === 1 && isLeafNode(newNode)) {\n\t return newNode;\n\t }\n\t var isEditable = ownerID && ownerID === this.ownerID;\n\t var newBitmap = exists ? newNode ? bitmap : bitmap ^ bit : bitmap | bit;\n\t var newNodes = exists ? newNode ? setIn(nodes, idx, newNode, isEditable) : spliceOut(nodes, idx, isEditable) : spliceIn(nodes, idx, newNode, isEditable);\n\t if (isEditable) {\n\t this.bitmap = newBitmap;\n\t this.nodes = newNodes;\n\t return this;\n\t }\n\t return new $BitmapIndexedNode(ownerID, newBitmap, newNodes);\n\t },\n\t iterate: function(fn, reverse) {\n\t var nodes = this.nodes;\n\t for (var ii = 0,\n\t maxIndex = nodes.length - 1; ii <= maxIndex; ii++) {\n\t if (nodes[reverse ? maxIndex - ii : ii].iterate(fn, reverse) === false) {\n\t return false;\n\t }\n\t }\n\t }\n\t}, {});\n\tvar ArrayNode = function ArrayNode(ownerID, count, nodes) {\n\t this.ownerID = ownerID;\n\t this.count = count;\n\t this.nodes = nodes;\n\t};\n\tvar $ArrayNode = ArrayNode;\n\t($traceurRuntime.createClass)(ArrayNode, {\n\t get: function(shift, hash, key, notSetValue) {\n\t var idx = (shift === 0 ? hash : hash >>> shift) & MASK;\n\t var node = this.nodes[idx];\n\t return node ? node.get(shift + SHIFT, hash, key, notSetValue) : notSetValue;\n\t },\n\t update: function(ownerID, shift, hash, key, value, didChangeSize, didAlter) {\n\t var idx = (shift === 0 ? hash : hash >>> shift) & MASK;\n\t var removed = value === NOT_SET;\n\t var nodes = this.nodes;\n\t var node = nodes[idx];\n\t if (removed && !node) {\n\t return this;\n\t }\n\t var newNode = updateNode(node, ownerID, shift + SHIFT, hash, key, value, didChangeSize, didAlter);\n\t if (newNode === node) {\n\t return this;\n\t }\n\t var newCount = this.count;\n\t if (!node) {\n\t newCount++;\n\t } else if (!newNode) {\n\t newCount--;\n\t if (newCount < MIN_ARRAY_SIZE) {\n\t return packNodes(ownerID, nodes, newCount, idx);\n\t }\n\t }\n\t var isEditable = ownerID && ownerID === this.ownerID;\n\t var newNodes = setIn(nodes, idx, newNode, isEditable);\n\t if (isEditable) {\n\t this.count = newCount;\n\t this.nodes = newNodes;\n\t return this;\n\t }\n\t return new $ArrayNode(ownerID, newCount, newNodes);\n\t },\n\t iterate: function(fn, reverse) {\n\t var nodes = this.nodes;\n\t for (var ii = 0,\n\t maxIndex = nodes.length - 1; ii <= maxIndex; ii++) {\n\t var node = nodes[reverse ? maxIndex - ii : ii];\n\t if (node && node.iterate(fn, reverse) === false) {\n\t return false;\n\t }\n\t }\n\t }\n\t}, {});\n\tvar HashCollisionNode = function HashCollisionNode(ownerID, hash, entries) {\n\t this.ownerID = ownerID;\n\t this.hash = hash;\n\t this.entries = entries;\n\t};\n\tvar $HashCollisionNode = HashCollisionNode;\n\t($traceurRuntime.createClass)(HashCollisionNode, {\n\t get: function(shift, hash, key, notSetValue) {\n\t var entries = this.entries;\n\t for (var ii = 0,\n\t len = entries.length; ii < len; ii++) {\n\t if (is(key, entries[ii][0])) {\n\t return entries[ii][1];\n\t }\n\t }\n\t return notSetValue;\n\t },\n\t update: function(ownerID, shift, hash, key, value, didChangeSize, didAlter) {\n\t var removed = value === NOT_SET;\n\t if (hash !== this.hash) {\n\t if (removed) {\n\t return this;\n\t }\n\t SetRef(didAlter);\n\t SetRef(didChangeSize);\n\t return mergeIntoNode(this, ownerID, shift, hash, [key, value]);\n\t }\n\t var entries = this.entries;\n\t var idx = 0;\n\t for (var len = entries.length; idx < len; idx++) {\n\t if (is(key, entries[idx][0])) {\n\t break;\n\t }\n\t }\n\t var exists = idx < len;\n\t if (removed && !exists) {\n\t return this;\n\t }\n\t SetRef(didAlter);\n\t (removed || !exists) && SetRef(didChangeSize);\n\t if (removed && len === 2) {\n\t return new ValueNode(ownerID, this.hash, entries[idx ^ 1]);\n\t }\n\t var isEditable = ownerID && ownerID === this.ownerID;\n\t var newEntries = isEditable ? entries : arrCopy(entries);\n\t if (exists) {\n\t if (removed) {\n\t idx === len - 1 ? newEntries.pop() : (newEntries[idx] = newEntries.pop());\n\t } else {\n\t newEntries[idx] = [key, value];\n\t }\n\t } else {\n\t newEntries.push([key, value]);\n\t }\n\t if (isEditable) {\n\t this.entries = newEntries;\n\t return this;\n\t }\n\t return new $HashCollisionNode(ownerID, this.hash, newEntries);\n\t },\n\t iterate: function(fn, reverse) {\n\t var entries = this.entries;\n\t for (var ii = 0,\n\t maxIndex = entries.length - 1; ii <= maxIndex; ii++) {\n\t if (fn(entries[reverse ? maxIndex - ii : ii]) === false) {\n\t return false;\n\t }\n\t }\n\t }\n\t}, {});\n\tvar ValueNode = function ValueNode(ownerID, hash, entry) {\n\t this.ownerID = ownerID;\n\t this.hash = hash;\n\t this.entry = entry;\n\t};\n\tvar $ValueNode = ValueNode;\n\t($traceurRuntime.createClass)(ValueNode, {\n\t get: function(shift, hash, key, notSetValue) {\n\t return is(key, this.entry[0]) ? this.entry[1] : notSetValue;\n\t },\n\t update: function(ownerID, shift, hash, key, value, didChangeSize, didAlter) {\n\t var removed = value === NOT_SET;\n\t var keyMatch = is(key, this.entry[0]);\n\t if (keyMatch ? value === this.entry[1] : removed) {\n\t return this;\n\t }\n\t SetRef(didAlter);\n\t if (removed) {\n\t SetRef(didChangeSize);\n\t return;\n\t }\n\t if (keyMatch) {\n\t if (ownerID && ownerID === this.ownerID) {\n\t this.entry[1] = value;\n\t return this;\n\t }\n\t return new $ValueNode(ownerID, hash, [key, value]);\n\t }\n\t SetRef(didChangeSize);\n\t return mergeIntoNode(this, ownerID, shift, hash, [key, value]);\n\t },\n\t iterate: function(fn) {\n\t return fn(this.entry);\n\t }\n\t}, {});\n\tvar MapIterator = function MapIterator(map, type, reverse) {\n\t this._type = type;\n\t this._reverse = reverse;\n\t this._stack = map._root && mapIteratorFrame(map._root);\n\t};\n\t($traceurRuntime.createClass)(MapIterator, {next: function() {\n\t var type = this._type;\n\t var stack = this._stack;\n\t while (stack) {\n\t var node = stack.node;\n\t var index = stack.index++;\n\t var maxIndex;\n\t if (node.entry) {\n\t if (index === 0) {\n\t return mapIteratorValue(type, node.entry);\n\t }\n\t } else if (node.entries) {\n\t maxIndex = node.entries.length - 1;\n\t if (index <= maxIndex) {\n\t return mapIteratorValue(type, node.entries[this._reverse ? maxIndex - index : index]);\n\t }\n\t } else {\n\t maxIndex = node.nodes.length - 1;\n\t if (index <= maxIndex) {\n\t var subNode = node.nodes[this._reverse ? maxIndex - index : index];\n\t if (subNode) {\n\t if (subNode.entry) {\n\t return mapIteratorValue(type, subNode.entry);\n\t }\n\t stack = this._stack = mapIteratorFrame(subNode, stack);\n\t }\n\t continue;\n\t }\n\t }\n\t stack = this._stack = this._stack.__prev;\n\t }\n\t return iteratorDone();\n\t }}, {}, Iterator);\n\tfunction mapIteratorValue(type, entry) {\n\t return iteratorValue(type, entry[0], entry[1]);\n\t}\n\tfunction mapIteratorFrame(node, prev) {\n\t return {\n\t node: node,\n\t index: 0,\n\t __prev: prev\n\t };\n\t}\n\tfunction makeMap(size, root, ownerID, hash) {\n\t var map = Object.create(MapPrototype);\n\t map.size = size;\n\t map._root = root;\n\t map.__ownerID = ownerID;\n\t map.__hash = hash;\n\t map.__altered = false;\n\t return map;\n\t}\n\tvar EMPTY_MAP;\n\tfunction emptyMap() {\n\t return EMPTY_MAP || (EMPTY_MAP = makeMap(0));\n\t}\n\tfunction updateMap(map, k, v) {\n\t var didChangeSize = MakeRef(CHANGE_LENGTH);\n\t var didAlter = MakeRef(DID_ALTER);\n\t var newRoot = updateNode(map._root, map.__ownerID, 0, hash(k), k, v, didChangeSize, didAlter);\n\t if (!didAlter.value) {\n\t return map;\n\t }\n\t var newSize = map.size + (didChangeSize.value ? v === NOT_SET ? -1 : 1 : 0);\n\t if (map.__ownerID) {\n\t map.size = newSize;\n\t map._root = newRoot;\n\t map.__hash = undefined;\n\t map.__altered = true;\n\t return map;\n\t }\n\t return newRoot ? makeMap(newSize, newRoot) : emptyMap();\n\t}\n\tfunction updateNode(node, ownerID, shift, hash, key, value, didChangeSize, didAlter) {\n\t if (!node) {\n\t if (value === NOT_SET) {\n\t return node;\n\t }\n\t SetRef(didAlter);\n\t SetRef(didChangeSize);\n\t return new ValueNode(ownerID, hash, [key, value]);\n\t }\n\t return node.update(ownerID, shift, hash, key, value, didChangeSize, didAlter);\n\t}\n\tfunction isLeafNode(node) {\n\t return node.constructor === ValueNode || node.constructor === HashCollisionNode;\n\t}\n\tfunction mergeIntoNode(node, ownerID, shift, hash, entry) {\n\t if (node.hash === hash) {\n\t return new HashCollisionNode(ownerID, hash, [node.entry, entry]);\n\t }\n\t var idx1 = (shift === 0 ? node.hash : node.hash >>> shift) & MASK;\n\t var idx2 = (shift === 0 ? hash : hash >>> shift) & MASK;\n\t var newNode;\n\t var nodes = idx1 === idx2 ? [mergeIntoNode(node, ownerID, shift + SHIFT, hash, entry)] : ((newNode = new ValueNode(ownerID, hash, entry)), idx1 < idx2 ? [node, newNode] : [newNode, node]);\n\t return new BitmapIndexedNode(ownerID, (1 << idx1) | (1 << idx2), nodes);\n\t}\n\tfunction packNodes(ownerID, nodes, count, excluding) {\n\t var bitmap = 0;\n\t var packedII = 0;\n\t var packedNodes = new Array(count);\n\t for (var ii = 0,\n\t bit = 1,\n\t len = nodes.length; ii < len; ii++, bit <<= 1) {\n\t var node = nodes[ii];\n\t if (node !== undefined && ii !== excluding) {\n\t bitmap |= bit;\n\t packedNodes[packedII++] = node;\n\t }\n\t }\n\t return new BitmapIndexedNode(ownerID, bitmap, packedNodes);\n\t}\n\tfunction expandNodes(ownerID, nodes, bitmap, including, node) {\n\t var count = 0;\n\t var expandedNodes = new Array(SIZE);\n\t for (var ii = 0; bitmap !== 0; ii++, bitmap >>>= 1) {\n\t expandedNodes[ii] = bitmap & 1 ? nodes[count++] : undefined;\n\t }\n\t expandedNodes[including] = node;\n\t return new ArrayNode(ownerID, count + 1, expandedNodes);\n\t}\n\tfunction mergeIntoMapWith(map, merger, iterables) {\n\t var iters = [];\n\t for (var ii = 0; ii < iterables.length; ii++) {\n\t var value = iterables[ii];\n\t var iter = KeyedIterable(value);\n\t if (!isIterable(value)) {\n\t iter = iter.map((function(v) {\n\t return fromJS(v);\n\t }));\n\t }\n\t iters.push(iter);\n\t }\n\t return mergeIntoCollectionWith(map, merger, iters);\n\t}\n\tfunction deepMerger(merger) {\n\t return (function(existing, value) {\n\t return existing && existing.mergeDeepWith && isIterable(value) ? existing.mergeDeepWith(merger, value) : merger ? merger(existing, value) : value;\n\t });\n\t}\n\tfunction mergeIntoCollectionWith(collection, merger, iters) {\n\t if (iters.length === 0) {\n\t return collection;\n\t }\n\t return collection.withMutations((function(collection) {\n\t var mergeIntoMap = merger ? (function(value, key) {\n\t collection.update(key, NOT_SET, (function(existing) {\n\t return existing === NOT_SET ? value : merger(existing, value);\n\t }));\n\t }) : (function(value, key) {\n\t collection.set(key, value);\n\t });\n\t for (var ii = 0; ii < iters.length; ii++) {\n\t iters[ii].forEach(mergeIntoMap);\n\t }\n\t }));\n\t}\n\tfunction updateInDeepMap(collection, keyPath, notSetValue, updater, offset) {\n\t invariant(!collection || collection.set, 'updateIn with invalid keyPath');\n\t var key = keyPath[offset];\n\t var existing = collection ? collection.get(key, NOT_SET) : NOT_SET;\n\t var existingValue = existing === NOT_SET ? undefined : existing;\n\t var value = offset === keyPath.length - 1 ? updater(existing === NOT_SET ? notSetValue : existing) : updateInDeepMap(existingValue, keyPath, notSetValue, updater, offset + 1);\n\t return value === existingValue ? collection : value === NOT_SET ? collection && collection.remove(key) : (collection || emptyMap()).set(key, value);\n\t}\n\tfunction popCount(x) {\n\t x = x - ((x >> 1) & 0x55555555);\n\t x = (x & 0x33333333) + ((x >> 2) & 0x33333333);\n\t x = (x + (x >> 4)) & 0x0f0f0f0f;\n\t x = x + (x >> 8);\n\t x = x + (x >> 16);\n\t return x & 0x7f;\n\t}\n\tfunction setIn(array, idx, val, canEdit) {\n\t var newArray = canEdit ? array : arrCopy(array);\n\t newArray[idx] = val;\n\t return newArray;\n\t}\n\tfunction spliceIn(array, idx, val, canEdit) {\n\t var newLen = array.length + 1;\n\t if (canEdit && idx + 1 === newLen) {\n\t array[idx] = val;\n\t return array;\n\t }\n\t var newArray = new Array(newLen);\n\t var after = 0;\n\t for (var ii = 0; ii < newLen; ii++) {\n\t if (ii === idx) {\n\t newArray[ii] = val;\n\t after = -1;\n\t } else {\n\t newArray[ii] = array[ii + after];\n\t }\n\t }\n\t return newArray;\n\t}\n\tfunction spliceOut(array, idx, canEdit) {\n\t var newLen = array.length - 1;\n\t if (canEdit && idx === newLen) {\n\t array.pop();\n\t return array;\n\t }\n\t var newArray = new Array(newLen);\n\t var after = 0;\n\t for (var ii = 0; ii < newLen; ii++) {\n\t if (ii === idx) {\n\t after = 1;\n\t }\n\t newArray[ii] = array[ii + after];\n\t }\n\t return newArray;\n\t}\n\tvar MAX_BITMAP_SIZE = SIZE / 2;\n\tvar MIN_ARRAY_SIZE = SIZE / 4;\n\tvar ToKeyedSequence = function ToKeyedSequence(indexed, useKeys) {\n\t this._iter = indexed;\n\t this._useKeys = useKeys;\n\t this.size = indexed.size;\n\t};\n\t($traceurRuntime.createClass)(ToKeyedSequence, {\n\t get: function(key, notSetValue) {\n\t return this._iter.get(key, notSetValue);\n\t },\n\t has: function(key) {\n\t return this._iter.has(key);\n\t },\n\t valueSeq: function() {\n\t return this._iter.valueSeq();\n\t },\n\t reverse: function() {\n\t var $__0 = this;\n\t var reversedSequence = reverseFactory(this, true);\n\t if (!this._useKeys) {\n\t reversedSequence.valueSeq = (function() {\n\t return $__0._iter.toSeq().reverse();\n\t });\n\t }\n\t return reversedSequence;\n\t },\n\t map: function(mapper, context) {\n\t var $__0 = this;\n\t var mappedSequence = mapFactory(this, mapper, context);\n\t if (!this._useKeys) {\n\t mappedSequence.valueSeq = (function() {\n\t return $__0._iter.toSeq().map(mapper, context);\n\t });\n\t }\n\t return mappedSequence;\n\t },\n\t __iterate: function(fn, reverse) {\n\t var $__0 = this;\n\t var ii;\n\t return this._iter.__iterate(this._useKeys ? (function(v, k) {\n\t return fn(v, k, $__0);\n\t }) : ((ii = reverse ? resolveSize(this) : 0), (function(v) {\n\t return fn(v, reverse ? --ii : ii++, $__0);\n\t })), reverse);\n\t },\n\t __iterator: function(type, reverse) {\n\t if (this._useKeys) {\n\t return this._iter.__iterator(type, reverse);\n\t }\n\t var iterator = this._iter.__iterator(ITERATE_VALUES, reverse);\n\t var ii = reverse ? resolveSize(this) : 0;\n\t return new Iterator((function() {\n\t var step = iterator.next();\n\t return step.done ? step : iteratorValue(type, reverse ? --ii : ii++, step.value, step);\n\t }));\n\t }\n\t}, {}, KeyedSeq);\n\tvar ToIndexedSequence = function ToIndexedSequence(iter) {\n\t this._iter = iter;\n\t this.size = iter.size;\n\t};\n\t($traceurRuntime.createClass)(ToIndexedSequence, {\n\t contains: function(value) {\n\t return this._iter.contains(value);\n\t },\n\t __iterate: function(fn, reverse) {\n\t var $__0 = this;\n\t var iterations = 0;\n\t return this._iter.__iterate((function(v) {\n\t return fn(v, iterations++, $__0);\n\t }), reverse);\n\t },\n\t __iterator: function(type, reverse) {\n\t var iterator = this._iter.__iterator(ITERATE_VALUES, reverse);\n\t var iterations = 0;\n\t return new Iterator((function() {\n\t var step = iterator.next();\n\t return step.done ? step : iteratorValue(type, iterations++, step.value, step);\n\t }));\n\t }\n\t}, {}, IndexedSeq);\n\tvar ToSetSequence = function ToSetSequence(iter) {\n\t this._iter = iter;\n\t this.size = iter.size;\n\t};\n\t($traceurRuntime.createClass)(ToSetSequence, {\n\t has: function(key) {\n\t return this._iter.contains(key);\n\t },\n\t __iterate: function(fn, reverse) {\n\t var $__0 = this;\n\t return this._iter.__iterate((function(v) {\n\t return fn(v, v, $__0);\n\t }), reverse);\n\t },\n\t __iterator: function(type, reverse) {\n\t var iterator = this._iter.__iterator(ITERATE_VALUES, reverse);\n\t return new Iterator((function() {\n\t var step = iterator.next();\n\t return step.done ? step : iteratorValue(type, step.value, step.value, step);\n\t }));\n\t }\n\t}, {}, SetSeq);\n\tvar FromEntriesSequence = function FromEntriesSequence(entries) {\n\t this._iter = entries;\n\t this.size = entries.size;\n\t};\n\t($traceurRuntime.createClass)(FromEntriesSequence, {\n\t entrySeq: function() {\n\t return this._iter.toSeq();\n\t },\n\t __iterate: function(fn, reverse) {\n\t var $__0 = this;\n\t return this._iter.__iterate((function(entry) {\n\t if (entry) {\n\t validateEntry(entry);\n\t return fn(entry[1], entry[0], $__0);\n\t }\n\t }), reverse);\n\t },\n\t __iterator: function(type, reverse) {\n\t var iterator = this._iter.__iterator(ITERATE_VALUES, reverse);\n\t return new Iterator((function() {\n\t while (true) {\n\t var step = iterator.next();\n\t if (step.done) {\n\t return step;\n\t }\n\t var entry = step.value;\n\t if (entry) {\n\t validateEntry(entry);\n\t return type === ITERATE_ENTRIES ? step : iteratorValue(type, entry[0], entry[1], step);\n\t }\n\t }\n\t }));\n\t }\n\t}, {}, KeyedSeq);\n\tToIndexedSequence.prototype.cacheResult = ToKeyedSequence.prototype.cacheResult = ToSetSequence.prototype.cacheResult = FromEntriesSequence.prototype.cacheResult = cacheResultThrough;\n\tfunction flipFactory(iterable) {\n\t var flipSequence = makeSequence(iterable);\n\t flipSequence._iter = iterable;\n\t flipSequence.size = iterable.size;\n\t flipSequence.flip = (function() {\n\t return iterable;\n\t });\n\t flipSequence.reverse = function() {\n\t var reversedSequence = iterable.reverse.apply(this);\n\t reversedSequence.flip = (function() {\n\t return iterable.reverse();\n\t });\n\t return reversedSequence;\n\t };\n\t flipSequence.has = (function(key) {\n\t return iterable.contains(key);\n\t });\n\t flipSequence.contains = (function(key) {\n\t return iterable.has(key);\n\t });\n\t flipSequence.cacheResult = cacheResultThrough;\n\t flipSequence.__iterateUncached = function(fn, reverse) {\n\t var $__0 = this;\n\t return iterable.__iterate((function(v, k) {\n\t return fn(k, v, $__0) !== false;\n\t }), reverse);\n\t };\n\t flipSequence.__iteratorUncached = function(type, reverse) {\n\t if (type === ITERATE_ENTRIES) {\n\t var iterator = iterable.__iterator(type, reverse);\n\t return new Iterator((function() {\n\t var step = iterator.next();\n\t if (!step.done) {\n\t var k = step.value[0];\n\t step.value[0] = step.value[1];\n\t step.value[1] = k;\n\t }\n\t return step;\n\t }));\n\t }\n\t return iterable.__iterator(type === ITERATE_VALUES ? ITERATE_KEYS : ITERATE_VALUES, reverse);\n\t };\n\t return flipSequence;\n\t}\n\tfunction mapFactory(iterable, mapper, context) {\n\t var mappedSequence = makeSequence(iterable);\n\t mappedSequence.size = iterable.size;\n\t mappedSequence.has = (function(key) {\n\t return iterable.has(key);\n\t });\n\t mappedSequence.get = (function(key, notSetValue) {\n\t var v = iterable.get(key, NOT_SET);\n\t return v === NOT_SET ? notSetValue : mapper.call(context, v, key, iterable);\n\t });\n\t mappedSequence.__iterateUncached = function(fn, reverse) {\n\t var $__0 = this;\n\t return iterable.__iterate((function(v, k, c) {\n\t return fn(mapper.call(context, v, k, c), k, $__0) !== false;\n\t }), reverse);\n\t };\n\t mappedSequence.__iteratorUncached = function(type, reverse) {\n\t var iterator = iterable.__iterator(ITERATE_ENTRIES, reverse);\n\t return new Iterator((function() {\n\t var step = iterator.next();\n\t if (step.done) {\n\t return step;\n\t }\n\t var entry = step.value;\n\t var key = entry[0];\n\t return iteratorValue(type, key, mapper.call(context, entry[1], key, iterable), step);\n\t }));\n\t };\n\t return mappedSequence;\n\t}\n\tfunction reverseFactory(iterable, useKeys) {\n\t var reversedSequence = makeSequence(iterable);\n\t reversedSequence._iter = iterable;\n\t reversedSequence.size = iterable.size;\n\t reversedSequence.reverse = (function() {\n\t return iterable;\n\t });\n\t if (iterable.flip) {\n\t reversedSequence.flip = function() {\n\t var flipSequence = flipFactory(iterable);\n\t flipSequence.reverse = (function() {\n\t return iterable.flip();\n\t });\n\t return flipSequence;\n\t };\n\t }\n\t reversedSequence.get = (function(key, notSetValue) {\n\t return iterable.get(useKeys ? key : -1 - key, notSetValue);\n\t });\n\t reversedSequence.has = (function(key) {\n\t return iterable.has(useKeys ? key : -1 - key);\n\t });\n\t reversedSequence.contains = (function(value) {\n\t return iterable.contains(value);\n\t });\n\t reversedSequence.cacheResult = cacheResultThrough;\n\t reversedSequence.__iterate = function(fn, reverse) {\n\t var $__0 = this;\n\t return iterable.__iterate((function(v, k) {\n\t return fn(v, k, $__0);\n\t }), !reverse);\n\t };\n\t reversedSequence.__iterator = (function(type, reverse) {\n\t return iterable.__iterator(type, !reverse);\n\t });\n\t return reversedSequence;\n\t}\n\tfunction filterFactory(iterable, predicate, context, useKeys) {\n\t var filterSequence = makeSequence(iterable);\n\t if (useKeys) {\n\t filterSequence.has = (function(key) {\n\t var v = iterable.get(key, NOT_SET);\n\t return v !== NOT_SET && !!predicate.call(context, v, key, iterable);\n\t });\n\t filterSequence.get = (function(key, notSetValue) {\n\t var v = iterable.get(key, NOT_SET);\n\t return v !== NOT_SET && predicate.call(context, v, key, iterable) ? v : notSetValue;\n\t });\n\t }\n\t filterSequence.__iterateUncached = function(fn, reverse) {\n\t var $__0 = this;\n\t var iterations = 0;\n\t iterable.__iterate((function(v, k, c) {\n\t if (predicate.call(context, v, k, c)) {\n\t iterations++;\n\t return fn(v, useKeys ? k : iterations - 1, $__0);\n\t }\n\t }), reverse);\n\t return iterations;\n\t };\n\t filterSequence.__iteratorUncached = function(type, reverse) {\n\t var iterator = iterable.__iterator(ITERATE_ENTRIES, reverse);\n\t var iterations = 0;\n\t return new Iterator((function() {\n\t while (true) {\n\t var step = iterator.next();\n\t if (step.done) {\n\t return step;\n\t }\n\t var entry = step.value;\n\t var key = entry[0];\n\t var value = entry[1];\n\t if (predicate.call(context, value, key, iterable)) {\n\t return iteratorValue(type, useKeys ? key : iterations++, value, step);\n\t }\n\t }\n\t }));\n\t };\n\t return filterSequence;\n\t}\n\tfunction countByFactory(iterable, grouper, context) {\n\t var groups = Map().asMutable();\n\t iterable.__iterate((function(v, k) {\n\t groups.update(grouper.call(context, v, k, iterable), 0, (function(a) {\n\t return a + 1;\n\t }));\n\t }));\n\t return groups.asImmutable();\n\t}\n\tfunction groupByFactory(iterable, grouper, context) {\n\t var isKeyedIter = isKeyed(iterable);\n\t var groups = Map().asMutable();\n\t iterable.__iterate((function(v, k) {\n\t groups.update(grouper.call(context, v, k, iterable), [], (function(a) {\n\t return (a.push(isKeyedIter ? [k, v] : v), a);\n\t }));\n\t }));\n\t var coerce = iterableClass(iterable);\n\t return groups.map((function(arr) {\n\t return reify(iterable, coerce(arr));\n\t }));\n\t}\n\tfunction takeFactory(iterable, amount) {\n\t if (amount > iterable.size) {\n\t return iterable;\n\t }\n\t if (amount < 0) {\n\t amount = 0;\n\t }\n\t var takeSequence = makeSequence(iterable);\n\t takeSequence.size = iterable.size && Math.min(iterable.size, amount);\n\t takeSequence.__iterateUncached = function(fn, reverse) {\n\t var $__0 = this;\n\t if (amount === 0) {\n\t return 0;\n\t }\n\t if (reverse) {\n\t return this.cacheResult().__iterate(fn, reverse);\n\t }\n\t var iterations = 0;\n\t iterable.__iterate((function(v, k) {\n\t return ++iterations && fn(v, k, $__0) !== false && iterations < amount;\n\t }));\n\t return iterations;\n\t };\n\t takeSequence.__iteratorUncached = function(type, reverse) {\n\t if (reverse) {\n\t return this.cacheResult().__iterator(type, reverse);\n\t }\n\t var iterator = amount && iterable.__iterator(type, reverse);\n\t var iterations = 0;\n\t return new Iterator((function() {\n\t if (iterations++ > amount) {\n\t return iteratorDone();\n\t }\n\t return iterator.next();\n\t }));\n\t };\n\t return takeSequence;\n\t}\n\tfunction takeWhileFactory(iterable, predicate, context) {\n\t var takeSequence = makeSequence(iterable);\n\t takeSequence.__iterateUncached = function(fn, reverse) {\n\t var $__0 = this;\n\t if (reverse) {\n\t return this.cacheResult().__iterate(fn, reverse);\n\t }\n\t var iterations = 0;\n\t iterable.__iterate((function(v, k, c) {\n\t return predicate.call(context, v, k, c) && ++iterations && fn(v, k, $__0);\n\t }));\n\t return iterations;\n\t };\n\t takeSequence.__iteratorUncached = function(type, reverse) {\n\t var $__0 = this;\n\t if (reverse) {\n\t return this.cacheResult().__iterator(type, reverse);\n\t }\n\t var iterator = iterable.__iterator(ITERATE_ENTRIES, reverse);\n\t var iterating = true;\n\t return new Iterator((function() {\n\t if (!iterating) {\n\t return iteratorDone();\n\t }\n\t var step = iterator.next();\n\t if (step.done) {\n\t return step;\n\t }\n\t var entry = step.value;\n\t var k = entry[0];\n\t var v = entry[1];\n\t if (!predicate.call(context, v, k, $__0)) {\n\t iterating = false;\n\t return iteratorDone();\n\t }\n\t return type === ITERATE_ENTRIES ? step : iteratorValue(type, k, v, step);\n\t }));\n\t };\n\t return takeSequence;\n\t}\n\tfunction skipFactory(iterable, amount, useKeys) {\n\t if (amount <= 0) {\n\t return iterable;\n\t }\n\t var skipSequence = makeSequence(iterable);\n\t skipSequence.size = iterable.size && Math.max(0, iterable.size - amount);\n\t skipSequence.__iterateUncached = function(fn, reverse) {\n\t var $__0 = this;\n\t if (reverse) {\n\t return this.cacheResult().__iterate(fn, reverse);\n\t }\n\t var skipped = 0;\n\t var isSkipping = true;\n\t var iterations = 0;\n\t iterable.__iterate((function(v, k) {\n\t if (!(isSkipping && (isSkipping = skipped++ < amount))) {\n\t iterations++;\n\t return fn(v, useKeys ? k : iterations - 1, $__0);\n\t }\n\t }));\n\t return iterations;\n\t };\n\t skipSequence.__iteratorUncached = function(type, reverse) {\n\t if (reverse) {\n\t return this.cacheResult().__iterator(type, reverse);\n\t }\n\t var iterator = amount && iterable.__iterator(type, reverse);\n\t var skipped = 0;\n\t var iterations = 0;\n\t return new Iterator((function() {\n\t while (skipped < amount) {\n\t skipped++;\n\t iterator.next();\n\t }\n\t var step = iterator.next();\n\t if (useKeys || type === ITERATE_VALUES) {\n\t return step;\n\t } else if (type === ITERATE_KEYS) {\n\t return iteratorValue(type, iterations++, undefined, step);\n\t } else {\n\t return iteratorValue(type, iterations++, step.value[1], step);\n\t }\n\t }));\n\t };\n\t return skipSequence;\n\t}\n\tfunction skipWhileFactory(iterable, predicate, context, useKeys) {\n\t var skipSequence = makeSequence(iterable);\n\t skipSequence.__iterateUncached = function(fn, reverse) {\n\t var $__0 = this;\n\t if (reverse) {\n\t return this.cacheResult().__iterate(fn, reverse);\n\t }\n\t var isSkipping = true;\n\t var iterations = 0;\n\t iterable.__iterate((function(v, k, c) {\n\t if (!(isSkipping && (isSkipping = predicate.call(context, v, k, c)))) {\n\t iterations++;\n\t return fn(v, useKeys ? k : iterations - 1, $__0);\n\t }\n\t }));\n\t return iterations;\n\t };\n\t skipSequence.__iteratorUncached = function(type, reverse) {\n\t var $__0 = this;\n\t if (reverse) {\n\t return this.cacheResult().__iterator(type, reverse);\n\t }\n\t var iterator = iterable.__iterator(ITERATE_ENTRIES, reverse);\n\t var skipping = true;\n\t var iterations = 0;\n\t return new Iterator((function() {\n\t var step,\n\t k,\n\t v;\n\t do {\n\t step = iterator.next();\n\t if (step.done) {\n\t if (useKeys || type === ITERATE_VALUES) {\n\t return step;\n\t } else if (type === ITERATE_KEYS) {\n\t return iteratorValue(type, iterations++, undefined, step);\n\t } else {\n\t return iteratorValue(type, iterations++, step.value[1], step);\n\t }\n\t }\n\t var entry = step.value;\n\t k = entry[0];\n\t v = entry[1];\n\t skipping && (skipping = predicate.call(context, v, k, $__0));\n\t } while (skipping);\n\t return type === ITERATE_ENTRIES ? step : iteratorValue(type, k, v, step);\n\t }));\n\t };\n\t return skipSequence;\n\t}\n\tfunction concatFactory(iterable, values) {\n\t var isKeyedIterable = isKeyed(iterable);\n\t var iters = new ArraySeq([iterable].concat(values)).map((function(v) {\n\t if (!isIterable(v)) {\n\t v = isKeyedIterable ? keyedSeqFromValue(v) : indexedSeqFromValue(Array.isArray(v) ? v : [v]);\n\t } else if (isKeyedIterable) {\n\t v = KeyedIterable(v);\n\t }\n\t return v;\n\t }));\n\t if (isKeyedIterable) {\n\t iters = iters.toKeyedSeq();\n\t } else if (!isIndexed(iterable)) {\n\t iters = iters.toSetSeq();\n\t }\n\t var flat = iters.flatten(true);\n\t flat.size = iters.reduce((function(sum, seq) {\n\t if (sum !== undefined) {\n\t var size = seq.size;\n\t if (size !== undefined) {\n\t return sum + size;\n\t }\n\t }\n\t }), 0);\n\t return flat;\n\t}\n\tfunction flattenFactory(iterable, depth, useKeys) {\n\t var flatSequence = makeSequence(iterable);\n\t flatSequence.__iterateUncached = function(fn, reverse) {\n\t var iterations = 0;\n\t var stopped = false;\n\t function flatDeep(iter, currentDepth) {\n\t var $__0 = this;\n\t iter.__iterate((function(v, k) {\n\t if ((!depth || currentDepth < depth) && isIterable(v)) {\n\t flatDeep(v, currentDepth + 1);\n\t } else if (fn(v, useKeys ? k : iterations++, $__0) === false) {\n\t stopped = true;\n\t }\n\t return !stopped;\n\t }), reverse);\n\t }\n\t flatDeep(iterable, 0);\n\t return iterations;\n\t };\n\t flatSequence.__iteratorUncached = function(type, reverse) {\n\t var iterator = iterable.__iterator(type, reverse);\n\t var stack = [];\n\t var iterations = 0;\n\t return new Iterator((function() {\n\t while (iterator) {\n\t var step = iterator.next();\n\t if (step.done !== false) {\n\t iterator = stack.pop();\n\t continue;\n\t }\n\t var v = step.value;\n\t if (type === ITERATE_ENTRIES) {\n\t v = v[1];\n\t }\n\t if ((!depth || stack.length < depth) && isIterable(v)) {\n\t stack.push(iterator);\n\t iterator = v.__iterator(type, reverse);\n\t } else {\n\t return useKeys ? step : iteratorValue(type, iterations++, v, step);\n\t }\n\t }\n\t return iteratorDone();\n\t }));\n\t };\n\t return flatSequence;\n\t}\n\tfunction flatMapFactory(iterable, mapper, context) {\n\t var coerce = iterableClass(iterable);\n\t return iterable.toSeq().map((function(v, k) {\n\t return coerce(mapper.call(context, v, k, iterable));\n\t })).flatten(true);\n\t}\n\tfunction interposeFactory(iterable, separator) {\n\t var interposedSequence = makeSequence(iterable);\n\t interposedSequence.size = iterable.size && iterable.size * 2 - 1;\n\t interposedSequence.__iterateUncached = function(fn, reverse) {\n\t var $__0 = this;\n\t var iterations = 0;\n\t iterable.__iterate((function(v, k) {\n\t return (!iterations || fn(separator, iterations++, $__0) !== false) && fn(v, iterations++, $__0) !== false;\n\t }), reverse);\n\t return iterations;\n\t };\n\t interposedSequence.__iteratorUncached = function(type, reverse) {\n\t var iterator = iterable.__iterator(ITERATE_VALUES, reverse);\n\t var iterations = 0;\n\t var step;\n\t return new Iterator((function() {\n\t if (!step || iterations % 2) {\n\t step = iterator.next();\n\t if (step.done) {\n\t return step;\n\t }\n\t }\n\t return iterations % 2 ? iteratorValue(type, iterations++, separator) : iteratorValue(type, iterations++, step.value, step);\n\t }));\n\t };\n\t return interposedSequence;\n\t}\n\tfunction reify(iter, seq) {\n\t return isSeq(iter) ? seq : iter.constructor(seq);\n\t}\n\tfunction validateEntry(entry) {\n\t if (entry !== Object(entry)) {\n\t throw new TypeError('Expected [K, V] tuple: ' + entry);\n\t }\n\t}\n\tfunction resolveSize(iter) {\n\t assertNotInfinite(iter.size);\n\t return ensureSize(iter);\n\t}\n\tfunction iterableClass(iterable) {\n\t return isKeyed(iterable) ? KeyedIterable : isIndexed(iterable) ? IndexedIterable : SetIterable;\n\t}\n\tfunction makeSequence(iterable) {\n\t return Object.create((isKeyed(iterable) ? KeyedSeq : isIndexed(iterable) ? IndexedSeq : SetSeq).prototype);\n\t}\n\tfunction cacheResultThrough() {\n\t if (this._iter.cacheResult) {\n\t this._iter.cacheResult();\n\t this.size = this._iter.size;\n\t return this;\n\t } else {\n\t return Seq.prototype.cacheResult.call(this);\n\t }\n\t}\n\tvar List = function List(value) {\n\t var empty = emptyList();\n\t if (value === null || value === undefined) {\n\t return empty;\n\t }\n\t if (isList(value)) {\n\t return value;\n\t }\n\t value = IndexedIterable(value);\n\t var size = value.size;\n\t if (size === 0) {\n\t return empty;\n\t }\n\t if (size > 0 && size < SIZE) {\n\t return makeList(0, size, SHIFT, null, new VNode(value.toArray()));\n\t }\n\t return empty.merge(value);\n\t};\n\t($traceurRuntime.createClass)(List, {\n\t toString: function() {\n\t return this.__toString('List [', ']');\n\t },\n\t get: function(index, notSetValue) {\n\t index = wrapIndex(this, index);\n\t if (index < 0 || index >= this.size) {\n\t return notSetValue;\n\t }\n\t index += this._origin;\n\t var node = listNodeFor(this, index);\n\t return node && node.array[index & MASK];\n\t },\n\t set: function(index, value) {\n\t return updateList(this, index, value);\n\t },\n\t remove: function(index) {\n\t return !this.has(index) ? this : index === 0 ? this.shift() : index === this.size - 1 ? this.pop() : this.splice(index, 1);\n\t },\n\t clear: function() {\n\t if (this.size === 0) {\n\t return this;\n\t }\n\t if (this.__ownerID) {\n\t this.size = this._origin = this._capacity = 0;\n\t this._level = SHIFT;\n\t this._root = this._tail = null;\n\t this.__hash = undefined;\n\t this.__altered = true;\n\t return this;\n\t }\n\t return emptyList();\n\t },\n\t push: function() {\n\t var values = arguments;\n\t var oldSize = this.size;\n\t return this.withMutations((function(list) {\n\t setListBounds(list, 0, oldSize + values.length);\n\t for (var ii = 0; ii < values.length; ii++) {\n\t list.set(oldSize + ii, values[ii]);\n\t }\n\t }));\n\t },\n\t pop: function() {\n\t return setListBounds(this, 0, -1);\n\t },\n\t unshift: function() {\n\t var values = arguments;\n\t return this.withMutations((function(list) {\n\t setListBounds(list, -values.length);\n\t for (var ii = 0; ii < values.length; ii++) {\n\t list.set(ii, values[ii]);\n\t }\n\t }));\n\t },\n\t shift: function() {\n\t return setListBounds(this, 1);\n\t },\n\t merge: function() {\n\t return mergeIntoListWith(this, undefined, arguments);\n\t },\n\t mergeWith: function(merger) {\n\t for (var iters = [],\n\t $__5 = 1; $__5 < arguments.length; $__5++)\n\t iters[$__5 - 1] = arguments[$__5];\n\t return mergeIntoListWith(this, merger, iters);\n\t },\n\t mergeDeep: function() {\n\t return mergeIntoListWith(this, deepMerger(undefined), arguments);\n\t },\n\t mergeDeepWith: function(merger) {\n\t for (var iters = [],\n\t $__6 = 1; $__6 < arguments.length; $__6++)\n\t iters[$__6 - 1] = arguments[$__6];\n\t return mergeIntoListWith(this, deepMerger(merger), iters);\n\t },\n\t setSize: function(size) {\n\t return setListBounds(this, 0, size);\n\t },\n\t slice: function(begin, end) {\n\t var size = this.size;\n\t if (wholeSlice(begin, end, size)) {\n\t return this;\n\t }\n\t return setListBounds(this, resolveBegin(begin, size), resolveEnd(end, size));\n\t },\n\t __iterator: function(type, reverse) {\n\t return new ListIterator(this, type, reverse);\n\t },\n\t __iterate: function(fn, reverse) {\n\t var $__0 = this;\n\t var iterations = 0;\n\t var eachFn = (function(v) {\n\t return fn(v, iterations++, $__0);\n\t });\n\t var tailOffset = getTailOffset(this._capacity);\n\t if (reverse) {\n\t iterateVNode(this._tail, 0, tailOffset - this._origin, this._capacity - this._origin, eachFn, reverse) && iterateVNode(this._root, this._level, -this._origin, tailOffset - this._origin, eachFn, reverse);\n\t } else {\n\t iterateVNode(this._root, this._level, -this._origin, tailOffset - this._origin, eachFn, reverse) && iterateVNode(this._tail, 0, tailOffset - this._origin, this._capacity - this._origin, eachFn, reverse);\n\t }\n\t return iterations;\n\t },\n\t __ensureOwner: function(ownerID) {\n\t if (ownerID === this.__ownerID) {\n\t return this;\n\t }\n\t if (!ownerID) {\n\t this.__ownerID = ownerID;\n\t return this;\n\t }\n\t return makeList(this._origin, this._capacity, this._level, this._root, this._tail, ownerID, this.__hash);\n\t }\n\t}, {of: function() {\n\t return this(arguments);\n\t }}, IndexedCollection);\n\tfunction isList(maybeList) {\n\t return !!(maybeList && maybeList[IS_LIST_SENTINEL]);\n\t}\n\tList.isList = isList;\n\tvar IS_LIST_SENTINEL = '@@__IMMUTABLE_LIST__@@';\n\tvar ListPrototype = List.prototype;\n\tListPrototype[IS_LIST_SENTINEL] = true;\n\tListPrototype[DELETE] = ListPrototype.remove;\n\tListPrototype.setIn = MapPrototype.setIn;\n\tListPrototype.removeIn = MapPrototype.removeIn;\n\tListPrototype.update = MapPrototype.update;\n\tListPrototype.updateIn = MapPrototype.updateIn;\n\tListPrototype.withMutations = MapPrototype.withMutations;\n\tListPrototype.asMutable = MapPrototype.asMutable;\n\tListPrototype.asImmutable = MapPrototype.asImmutable;\n\tListPrototype.wasAltered = MapPrototype.wasAltered;\n\tvar VNode = function VNode(array, ownerID) {\n\t this.array = array;\n\t this.ownerID = ownerID;\n\t};\n\tvar $VNode = VNode;\n\t($traceurRuntime.createClass)(VNode, {\n\t removeBefore: function(ownerID, level, index) {\n\t if (index === level ? 1 << level : 0 || this.array.length === 0) {\n\t return this;\n\t }\n\t var originIndex = (index >>> level) & MASK;\n\t if (originIndex >= this.array.length) {\n\t return new $VNode([], ownerID);\n\t }\n\t var removingFirst = originIndex === 0;\n\t var newChild;\n\t if (level > 0) {\n\t var oldChild = this.array[originIndex];\n\t newChild = oldChild && oldChild.removeBefore(ownerID, level - SHIFT, index);\n\t if (newChild === oldChild && removingFirst) {\n\t return this;\n\t }\n\t }\n\t if (removingFirst && !newChild) {\n\t return this;\n\t }\n\t var editable = editableVNode(this, ownerID);\n\t if (!removingFirst) {\n\t for (var ii = 0; ii < originIndex; ii++) {\n\t editable.array[ii] = undefined;\n\t }\n\t }\n\t if (newChild) {\n\t editable.array[originIndex] = newChild;\n\t }\n\t return editable;\n\t },\n\t removeAfter: function(ownerID, level, index) {\n\t if (index === level ? 1 << level : 0 || this.array.length === 0) {\n\t return this;\n\t }\n\t var sizeIndex = ((index - 1) >>> level) & MASK;\n\t if (sizeIndex >= this.array.length) {\n\t return this;\n\t }\n\t var removingLast = sizeIndex === this.array.length - 1;\n\t var newChild;\n\t if (level > 0) {\n\t var oldChild = this.array[sizeIndex];\n\t newChild = oldChild && oldChild.removeAfter(ownerID, level - SHIFT, index);\n\t if (newChild === oldChild && removingLast) {\n\t return this;\n\t }\n\t }\n\t if (removingLast && !newChild) {\n\t return this;\n\t }\n\t var editable = editableVNode(this, ownerID);\n\t if (!removingLast) {\n\t editable.array.pop();\n\t }\n\t if (newChild) {\n\t editable.array[sizeIndex] = newChild;\n\t }\n\t return editable;\n\t }\n\t}, {});\n\tfunction iterateVNode(node, level, offset, max, fn, reverse) {\n\t var ii;\n\t var array = node && node.array;\n\t if (level === 0) {\n\t var from = offset < 0 ? -offset : 0;\n\t var to = max - offset;\n\t if (to > SIZE) {\n\t to = SIZE;\n\t }\n\t for (ii = from; ii < to; ii++) {\n\t if (fn(array && array[reverse ? from + to - 1 - ii : ii]) === false) {\n\t return false;\n\t }\n\t }\n\t } else {\n\t var step = 1 << level;\n\t var newLevel = level - SHIFT;\n\t for (ii = 0; ii <= MASK; ii++) {\n\t var levelIndex = reverse ? MASK - ii : ii;\n\t var newOffset = offset + (levelIndex << level);\n\t if (newOffset < max && newOffset + step > 0) {\n\t var nextNode = array && array[levelIndex];\n\t if (!iterateVNode(nextNode, newLevel, newOffset, max, fn, reverse)) {\n\t return false;\n\t }\n\t }\n\t }\n\t }\n\t return true;\n\t}\n\tvar ListIterator = function ListIterator(list, type, reverse) {\n\t this._type = type;\n\t this._reverse = !!reverse;\n\t this._maxIndex = list.size - 1;\n\t var tailOffset = getTailOffset(list._capacity);\n\t var rootStack = listIteratorFrame(list._root && list._root.array, list._level, -list._origin, tailOffset - list._origin - 1);\n\t var tailStack = listIteratorFrame(list._tail && list._tail.array, 0, tailOffset - list._origin, list._capacity - list._origin - 1);\n\t this._stack = reverse ? tailStack : rootStack;\n\t this._stack.__prev = reverse ? rootStack : tailStack;\n\t};\n\t($traceurRuntime.createClass)(ListIterator, {next: function() {\n\t var stack = this._stack;\n\t while (stack) {\n\t var array = stack.array;\n\t var rawIndex = stack.index++;\n\t if (this._reverse) {\n\t rawIndex = MASK - rawIndex;\n\t if (rawIndex > stack.rawMax) {\n\t rawIndex = stack.rawMax;\n\t stack.index = SIZE - rawIndex;\n\t }\n\t }\n\t if (rawIndex >= 0 && rawIndex < SIZE && rawIndex <= stack.rawMax) {\n\t var value = array && array[rawIndex];\n\t if (stack.level === 0) {\n\t var type = this._type;\n\t var index;\n\t if (type !== 1) {\n\t index = stack.offset + (rawIndex << stack.level);\n\t if (this._reverse) {\n\t index = this._maxIndex - index;\n\t }\n\t }\n\t return iteratorValue(type, index, value);\n\t } else {\n\t this._stack = stack = listIteratorFrame(value && value.array, stack.level - SHIFT, stack.offset + (rawIndex << stack.level), stack.max, stack);\n\t }\n\t continue;\n\t }\n\t stack = this._stack = this._stack.__prev;\n\t }\n\t return iteratorDone();\n\t }}, {}, Iterator);\n\tfunction listIteratorFrame(array, level, offset, max, prevFrame) {\n\t return {\n\t array: array,\n\t level: level,\n\t offset: offset,\n\t max: max,\n\t rawMax: ((max - offset) >> level),\n\t index: 0,\n\t __prev: prevFrame\n\t };\n\t}\n\tfunction makeList(origin, capacity, level, root, tail, ownerID, hash) {\n\t var list = Object.create(ListPrototype);\n\t list.size = capacity - origin;\n\t list._origin = origin;\n\t list._capacity = capacity;\n\t list._level = level;\n\t list._root = root;\n\t list._tail = tail;\n\t list.__ownerID = ownerID;\n\t list.__hash = hash;\n\t list.__altered = false;\n\t return list;\n\t}\n\tvar EMPTY_LIST;\n\tfunction emptyList() {\n\t return EMPTY_LIST || (EMPTY_LIST = makeList(0, 0, SHIFT));\n\t}\n\tfunction updateList(list, index, value) {\n\t index = wrapIndex(list, index);\n\t if (index >= list.size || index < 0) {\n\t return list.withMutations((function(list) {\n\t index < 0 ? setListBounds(list, index).set(0, value) : setListBounds(list, 0, index + 1).set(index, value);\n\t }));\n\t }\n\t index += list._origin;\n\t var newTail = list._tail;\n\t var newRoot = list._root;\n\t var didAlter = MakeRef(DID_ALTER);\n\t if (index >= getTailOffset(list._capacity)) {\n\t newTail = updateVNode(newTail, list.__ownerID, 0, index, value, didAlter);\n\t } else {\n\t newRoot = updateVNode(newRoot, list.__ownerID, list._level, index, value, didAlter);\n\t }\n\t if (!didAlter.value) {\n\t return list;\n\t }\n\t if (list.__ownerID) {\n\t list._root = newRoot;\n\t list._tail = newTail;\n\t list.__hash = undefined;\n\t list.__altered = true;\n\t return list;\n\t }\n\t return makeList(list._origin, list._capacity, list._level, newRoot, newTail);\n\t}\n\tfunction updateVNode(node, ownerID, level, index, value, didAlter) {\n\t var idx = (index >>> level) & MASK;\n\t var nodeHas = node && idx < node.array.length;\n\t if (!nodeHas && value === undefined) {\n\t return node;\n\t }\n\t var newNode;\n\t if (level > 0) {\n\t var lowerNode = node && node.array[idx];\n\t var newLowerNode = updateVNode(lowerNode, ownerID, level - SHIFT, index, value, didAlter);\n\t if (newLowerNode === lowerNode) {\n\t return node;\n\t }\n\t newNode = editableVNode(node, ownerID);\n\t newNode.array[idx] = newLowerNode;\n\t return newNode;\n\t }\n\t if (nodeHas && node.array[idx] === value) {\n\t return node;\n\t }\n\t SetRef(didAlter);\n\t newNode = editableVNode(node, ownerID);\n\t if (value === undefined && idx === newNode.array.length - 1) {\n\t newNode.array.pop();\n\t } else {\n\t newNode.array[idx] = value;\n\t }\n\t return newNode;\n\t}\n\tfunction editableVNode(node, ownerID) {\n\t if (ownerID && node && ownerID === node.ownerID) {\n\t return node;\n\t }\n\t return new VNode(node ? node.array.slice() : [], ownerID);\n\t}\n\tfunction listNodeFor(list, rawIndex) {\n\t if (rawIndex >= getTailOffset(list._capacity)) {\n\t return list._tail;\n\t }\n\t if (rawIndex < 1 << (list._level + SHIFT)) {\n\t var node = list._root;\n\t var level = list._level;\n\t while (node && level > 0) {\n\t node = node.array[(rawIndex >>> level) & MASK];\n\t level -= SHIFT;\n\t }\n\t return node;\n\t }\n\t}\n\tfunction setListBounds(list, begin, end) {\n\t var owner = list.__ownerID || new OwnerID();\n\t var oldOrigin = list._origin;\n\t var oldCapacity = list._capacity;\n\t var newOrigin = oldOrigin + begin;\n\t var newCapacity = end === undefined ? oldCapacity : end < 0 ? oldCapacity + end : oldOrigin + end;\n\t if (newOrigin === oldOrigin && newCapacity === oldCapacity) {\n\t return list;\n\t }\n\t if (newOrigin >= newCapacity) {\n\t return list.clear();\n\t }\n\t var newLevel = list._level;\n\t var newRoot = list._root;\n\t var offsetShift = 0;\n\t while (newOrigin + offsetShift < 0) {\n\t newRoot = new VNode(newRoot && newRoot.array.length ? [undefined, newRoot] : [], owner);\n\t newLevel += SHIFT;\n\t offsetShift += 1 << newLevel;\n\t }\n\t if (offsetShift) {\n\t newOrigin += offsetShift;\n\t oldOrigin += offsetShift;\n\t newCapacity += offsetShift;\n\t oldCapacity += offsetShift;\n\t }\n\t var oldTailOffset = getTailOffset(oldCapacity);\n\t var newTailOffset = getTailOffset(newCapacity);\n\t while (newTailOffset >= 1 << (newLevel + SHIFT)) {\n\t newRoot = new VNode(newRoot && newRoot.array.length ? [newRoot] : [], owner);\n\t newLevel += SHIFT;\n\t }\n\t var oldTail = list._tail;\n\t var newTail = newTailOffset < oldTailOffset ? listNodeFor(list, newCapacity - 1) : newTailOffset > oldTailOffset ? new VNode([], owner) : oldTail;\n\t if (oldTail && newTailOffset > oldTailOffset && newOrigin < oldCapacity && oldTail.array.length) {\n\t newRoot = editableVNode(newRoot, owner);\n\t var node = newRoot;\n\t for (var level = newLevel; level > SHIFT; level -= SHIFT) {\n\t var idx = (oldTailOffset >>> level) & MASK;\n\t node = node.array[idx] = editableVNode(node.array[idx], owner);\n\t }\n\t node.array[(oldTailOffset >>> SHIFT) & MASK] = oldTail;\n\t }\n\t if (newCapacity < oldCapacity) {\n\t newTail = newTail && newTail.removeAfter(owner, 0, newCapacity);\n\t }\n\t if (newOrigin >= newTailOffset) {\n\t newOrigin -= newTailOffset;\n\t newCapacity -= newTailOffset;\n\t newLevel = SHIFT;\n\t newRoot = null;\n\t newTail = newTail && newTail.removeBefore(owner, 0, newOrigin);\n\t } else if (newOrigin > oldOrigin || newTailOffset < oldTailOffset) {\n\t offsetShift = 0;\n\t while (newRoot) {\n\t var beginIndex = (newOrigin >>> newLevel) & MASK;\n\t if (beginIndex !== (newTailOffset >>> newLevel) & MASK) {\n\t break;\n\t }\n\t if (beginIndex) {\n\t offsetShift += (1 << newLevel) * beginIndex;\n\t }\n\t newLevel -= SHIFT;\n\t newRoot = newRoot.array[beginIndex];\n\t }\n\t if (newRoot && newOrigin > oldOrigin) {\n\t newRoot = newRoot.removeBefore(owner, newLevel, newOrigin - offsetShift);\n\t }\n\t if (newRoot && newTailOffset < oldTailOffset) {\n\t newRoot = newRoot.removeAfter(owner, newLevel, newTailOffset - offsetShift);\n\t }\n\t if (offsetShift) {\n\t newOrigin -= offsetShift;\n\t newCapacity -= offsetShift;\n\t }\n\t }\n\t if (list.__ownerID) {\n\t list.size = newCapacity - newOrigin;\n\t list._origin = newOrigin;\n\t list._capacity = newCapacity;\n\t list._level = newLevel;\n\t list._root = newRoot;\n\t list._tail = newTail;\n\t list.__hash = undefined;\n\t list.__altered = true;\n\t return list;\n\t }\n\t return makeList(newOrigin, newCapacity, newLevel, newRoot, newTail);\n\t}\n\tfunction mergeIntoListWith(list, merger, iterables) {\n\t var iters = [];\n\t var maxSize = 0;\n\t for (var ii = 0; ii < iterables.length; ii++) {\n\t var value = iterables[ii];\n\t var iter = IndexedIterable(value);\n\t if (iter.size > maxSize) {\n\t maxSize = iter.size;\n\t }\n\t if (!isIterable(value)) {\n\t iter = iter.map((function(v) {\n\t return fromJS(v);\n\t }));\n\t }\n\t iters.push(iter);\n\t }\n\t if (maxSize > list.size) {\n\t list = list.setSize(maxSize);\n\t }\n\t return mergeIntoCollectionWith(list, merger, iters);\n\t}\n\tfunction getTailOffset(size) {\n\t return size < SIZE ? 0 : (((size - 1) >>> SHIFT) << SHIFT);\n\t}\n\tvar Stack = function Stack(value) {\n\t return value === null || value === undefined ? emptyStack() : isStack(value) ? value : emptyStack().unshiftAll(value);\n\t};\n\tvar $Stack = Stack;\n\t($traceurRuntime.createClass)(Stack, {\n\t toString: function() {\n\t return this.__toString('Stack [', ']');\n\t },\n\t get: function(index, notSetValue) {\n\t var head = this._head;\n\t while (head && index--) {\n\t head = head.next;\n\t }\n\t return head ? head.value : notSetValue;\n\t },\n\t peek: function() {\n\t return this._head && this._head.value;\n\t },\n\t push: function() {\n\t if (arguments.length === 0) {\n\t return this;\n\t }\n\t var newSize = this.size + arguments.length;\n\t var head = this._head;\n\t for (var ii = arguments.length - 1; ii >= 0; ii--) {\n\t head = {\n\t value: arguments[ii],\n\t next: head\n\t };\n\t }\n\t if (this.__ownerID) {\n\t this.size = newSize;\n\t this._head = head;\n\t this.__hash = undefined;\n\t this.__altered = true;\n\t return this;\n\t }\n\t return makeStack(newSize, head);\n\t },\n\t pushAll: function(iter) {\n\t iter = IndexedIterable(iter);\n\t if (iter.size === 0) {\n\t return this;\n\t }\n\t var newSize = this.size;\n\t var head = this._head;\n\t iter.reverse().forEach((function(value) {\n\t newSize++;\n\t head = {\n\t value: value,\n\t next: head\n\t };\n\t }));\n\t if (this.__ownerID) {\n\t this.size = newSize;\n\t this._head = head;\n\t this.__hash = undefined;\n\t this.__altered = true;\n\t return this;\n\t }\n\t return makeStack(newSize, head);\n\t },\n\t pop: function() {\n\t return this.slice(1);\n\t },\n\t unshift: function() {\n\t return this.push.apply(this, arguments);\n\t },\n\t unshiftAll: function(iter) {\n\t return this.pushAll(iter);\n\t },\n\t shift: function() {\n\t return this.pop.apply(this, arguments);\n\t },\n\t clear: function() {\n\t if (this.size === 0) {\n\t return this;\n\t }\n\t if (this.__ownerID) {\n\t this.size = 0;\n\t this._head = undefined;\n\t this.__hash = undefined;\n\t this.__altered = true;\n\t return this;\n\t }\n\t return emptyStack();\n\t },\n\t slice: function(begin, end) {\n\t if (wholeSlice(begin, end, this.size)) {\n\t return this;\n\t }\n\t var resolvedBegin = resolveBegin(begin, this.size);\n\t var resolvedEnd = resolveEnd(end, this.size);\n\t if (resolvedEnd !== this.size) {\n\t return $traceurRuntime.superCall(this, $Stack.prototype, \"slice\", [begin, end]);\n\t }\n\t var newSize = this.size - resolvedBegin;\n\t var head = this._head;\n\t while (resolvedBegin--) {\n\t head = head.next;\n\t }\n\t if (this.__ownerID) {\n\t this.size = newSize;\n\t this._head = head;\n\t this.__hash = undefined;\n\t this.__altered = true;\n\t return this;\n\t }\n\t return makeStack(newSize, head);\n\t },\n\t __ensureOwner: function(ownerID) {\n\t if (ownerID === this.__ownerID) {\n\t return this;\n\t }\n\t if (!ownerID) {\n\t this.__ownerID = ownerID;\n\t this.__altered = false;\n\t return this;\n\t }\n\t return makeStack(this.size, this._head, ownerID, this.__hash);\n\t },\n\t __iterate: function(fn, reverse) {\n\t if (reverse) {\n\t return this.toSeq().cacheResult.__iterate(fn, reverse);\n\t }\n\t var iterations = 0;\n\t var node = this._head;\n\t while (node) {\n\t if (fn(node.value, iterations++, this) === false) {\n\t break;\n\t }\n\t node = node.next;\n\t }\n\t return iterations;\n\t },\n\t __iterator: function(type, reverse) {\n\t if (reverse) {\n\t return this.toSeq().cacheResult().__iterator(type, reverse);\n\t }\n\t var iterations = 0;\n\t var node = this._head;\n\t return new Iterator((function() {\n\t if (node) {\n\t var value = node.value;\n\t node = node.next;\n\t return iteratorValue(type, iterations++, value);\n\t }\n\t return iteratorDone();\n\t }));\n\t }\n\t}, {of: function() {\n\t return this(arguments);\n\t }}, IndexedCollection);\n\tfunction isStack(maybeStack) {\n\t return !!(maybeStack && maybeStack[IS_STACK_SENTINEL]);\n\t}\n\tStack.isStack = isStack;\n\tvar IS_STACK_SENTINEL = '@@__IMMUTABLE_STACK__@@';\n\tvar StackPrototype = Stack.prototype;\n\tStackPrototype[IS_STACK_SENTINEL] = true;\n\tStackPrototype.withMutations = MapPrototype.withMutations;\n\tStackPrototype.asMutable = MapPrototype.asMutable;\n\tStackPrototype.asImmutable = MapPrototype.asImmutable;\n\tStackPrototype.wasAltered = MapPrototype.wasAltered;\n\tfunction makeStack(size, head, ownerID, hash) {\n\t var map = Object.create(StackPrototype);\n\t map.size = size;\n\t map._head = head;\n\t map.__ownerID = ownerID;\n\t map.__hash = hash;\n\t map.__altered = false;\n\t return map;\n\t}\n\tvar EMPTY_STACK;\n\tfunction emptyStack() {\n\t return EMPTY_STACK || (EMPTY_STACK = makeStack(0));\n\t}\n\tvar Set = function Set(value) {\n\t return value === null || value === undefined ? emptySet() : isSet(value) ? value : emptySet().union(value);\n\t};\n\t($traceurRuntime.createClass)(Set, {\n\t toString: function() {\n\t return this.__toString('Set {', '}');\n\t },\n\t has: function(value) {\n\t return this._map.has(value);\n\t },\n\t add: function(value) {\n\t var newMap = this._map.set(value, true);\n\t if (this.__ownerID) {\n\t this.size = newMap.size;\n\t this._map = newMap;\n\t return this;\n\t }\n\t return newMap === this._map ? this : makeSet(newMap);\n\t },\n\t remove: function(value) {\n\t var newMap = this._map.remove(value);\n\t if (this.__ownerID) {\n\t this.size = newMap.size;\n\t this._map = newMap;\n\t return this;\n\t }\n\t return newMap === this._map ? this : newMap.size === 0 ? emptySet() : makeSet(newMap);\n\t },\n\t clear: function() {\n\t if (this.size === 0) {\n\t return this;\n\t }\n\t if (this.__ownerID) {\n\t this.size = 0;\n\t this._map.clear();\n\t return this;\n\t }\n\t return emptySet();\n\t },\n\t union: function() {\n\t var iters = arguments;\n\t if (iters.length === 0) {\n\t return this;\n\t }\n\t return this.withMutations((function(set) {\n\t for (var ii = 0; ii < iters.length; ii++) {\n\t SetIterable(iters[ii]).forEach((function(value) {\n\t return set.add(value);\n\t }));\n\t }\n\t }));\n\t },\n\t intersect: function() {\n\t for (var iters = [],\n\t $__7 = 0; $__7 < arguments.length; $__7++)\n\t iters[$__7] = arguments[$__7];\n\t if (iters.length === 0) {\n\t return this;\n\t }\n\t iters = iters.map((function(iter) {\n\t return SetIterable(iter);\n\t }));\n\t var originalSet = this;\n\t return this.withMutations((function(set) {\n\t originalSet.forEach((function(value) {\n\t if (!iters.every((function(iter) {\n\t return iter.contains(value);\n\t }))) {\n\t set.remove(value);\n\t }\n\t }));\n\t }));\n\t },\n\t subtract: function() {\n\t for (var iters = [],\n\t $__8 = 0; $__8 < arguments.length; $__8++)\n\t iters[$__8] = arguments[$__8];\n\t if (iters.length === 0) {\n\t return this;\n\t }\n\t iters = iters.map((function(iter) {\n\t return SetIterable(iter);\n\t }));\n\t var originalSet = this;\n\t return this.withMutations((function(set) {\n\t originalSet.forEach((function(value) {\n\t if (iters.some((function(iter) {\n\t return iter.contains(value);\n\t }))) {\n\t set.remove(value);\n\t }\n\t }));\n\t }));\n\t },\n\t merge: function() {\n\t return this.union.apply(this, arguments);\n\t },\n\t mergeWith: function(merger) {\n\t for (var iters = [],\n\t $__9 = 1; $__9 < arguments.length; $__9++)\n\t iters[$__9 - 1] = arguments[$__9];\n\t return this.union.apply(this, iters);\n\t },\n\t wasAltered: function() {\n\t return this._map.wasAltered();\n\t },\n\t __iterate: function(fn, reverse) {\n\t var $__0 = this;\n\t return this._map.__iterate((function(_, k) {\n\t return fn(k, k, $__0);\n\t }), reverse);\n\t },\n\t __iterator: function(type, reverse) {\n\t return this._map.map((function(_, k) {\n\t return k;\n\t })).__iterator(type, reverse);\n\t },\n\t __ensureOwner: function(ownerID) {\n\t if (ownerID === this.__ownerID) {\n\t return this;\n\t }\n\t var newMap = this._map.__ensureOwner(ownerID);\n\t if (!ownerID) {\n\t this.__ownerID = ownerID;\n\t this._map = newMap;\n\t return this;\n\t }\n\t return makeSet(newMap, ownerID);\n\t }\n\t}, {\n\t of: function() {\n\t return this(arguments);\n\t },\n\t fromKeys: function(value) {\n\t return this(KeyedSeq(value).flip().valueSeq());\n\t }\n\t}, SetCollection);\n\tfunction isSet(maybeSet) {\n\t return !!(maybeSet && maybeSet[IS_SET_SENTINEL]);\n\t}\n\tSet.isSet = isSet;\n\tvar IS_SET_SENTINEL = '@@__IMMUTABLE_SET__@@';\n\tvar SetPrototype = Set.prototype;\n\tSetPrototype[IS_SET_SENTINEL] = true;\n\tSetPrototype[DELETE] = SetPrototype.remove;\n\tSetPrototype.mergeDeep = SetPrototype.merge;\n\tSetPrototype.mergeDeepWith = SetPrototype.mergeWith;\n\tSetPrototype.withMutations = MapPrototype.withMutations;\n\tSetPrototype.asMutable = MapPrototype.asMutable;\n\tSetPrototype.asImmutable = MapPrototype.asImmutable;\n\tfunction makeSet(map, ownerID) {\n\t var set = Object.create(SetPrototype);\n\t set.size = map ? map.size : 0;\n\t set._map = map;\n\t set.__ownerID = ownerID;\n\t return set;\n\t}\n\tvar EMPTY_SET;\n\tfunction emptySet() {\n\t return EMPTY_SET || (EMPTY_SET = makeSet(emptyMap()));\n\t}\n\tvar OrderedMap = function OrderedMap(value) {\n\t return value === null || value === undefined ? emptyOrderedMap() : isOrderedMap(value) ? value : emptyOrderedMap().merge(KeyedIterable(value));\n\t};\n\t($traceurRuntime.createClass)(OrderedMap, {\n\t toString: function() {\n\t return this.__toString('OrderedMap {', '}');\n\t },\n\t get: function(k, notSetValue) {\n\t var index = this._map.get(k);\n\t return index !== undefined ? this._list.get(index)[1] : notSetValue;\n\t },\n\t clear: function() {\n\t if (this.size === 0) {\n\t return this;\n\t }\n\t if (this.__ownerID) {\n\t this.size = 0;\n\t this._map.clear();\n\t this._list.clear();\n\t return this;\n\t }\n\t return emptyOrderedMap();\n\t },\n\t set: function(k, v) {\n\t return updateOrderedMap(this, k, v);\n\t },\n\t remove: function(k) {\n\t return updateOrderedMap(this, k, NOT_SET);\n\t },\n\t wasAltered: function() {\n\t return this._map.wasAltered() || this._list.wasAltered();\n\t },\n\t __iterate: function(fn, reverse) {\n\t var $__0 = this;\n\t return this._list.__iterate((function(entry) {\n\t return entry && fn(entry[1], entry[0], $__0);\n\t }), reverse);\n\t },\n\t __iterator: function(type, reverse) {\n\t return this._list.fromEntrySeq().__iterator(type, reverse);\n\t },\n\t __ensureOwner: function(ownerID) {\n\t if (ownerID === this.__ownerID) {\n\t return this;\n\t }\n\t var newMap = this._map.__ensureOwner(ownerID);\n\t var newList = this._list.__ensureOwner(ownerID);\n\t if (!ownerID) {\n\t this.__ownerID = ownerID;\n\t this._map = newMap;\n\t this._list = newList;\n\t return this;\n\t }\n\t return makeOrderedMap(newMap, newList, ownerID, this.__hash);\n\t }\n\t}, {of: function() {\n\t return this(arguments);\n\t }}, Map);\n\tfunction isOrderedMap(maybeOrderedMap) {\n\t return !!(maybeOrderedMap && maybeOrderedMap[IS_ORDERED_MAP_SENTINEL]);\n\t}\n\tOrderedMap.isOrderedMap = isOrderedMap;\n\tvar IS_ORDERED_MAP_SENTINEL = '@@__IMMUTABLE_ORDERED_MAP__@@';\n\tOrderedMap.prototype[IS_ORDERED_MAP_SENTINEL] = true;\n\tOrderedMap.prototype[DELETE] = OrderedMap.prototype.remove;\n\tfunction makeOrderedMap(map, list, ownerID, hash) {\n\t var omap = Object.create(OrderedMap.prototype);\n\t omap.size = map ? map.size : 0;\n\t omap._map = map;\n\t omap._list = list;\n\t omap.__ownerID = ownerID;\n\t omap.__hash = hash;\n\t return omap;\n\t}\n\tvar EMPTY_ORDERED_MAP;\n\tfunction emptyOrderedMap() {\n\t return EMPTY_ORDERED_MAP || (EMPTY_ORDERED_MAP = makeOrderedMap(emptyMap(), emptyList()));\n\t}\n\tfunction updateOrderedMap(omap, k, v) {\n\t var map = omap._map;\n\t var list = omap._list;\n\t var i = map.get(k);\n\t var has = i !== undefined;\n\t var removed = v === NOT_SET;\n\t if ((!has && removed) || (has && v === list.get(i)[1])) {\n\t return omap;\n\t }\n\t if (!has) {\n\t i = list.size;\n\t }\n\t var newMap = removed ? map.remove(k) : has ? map : map.set(k, i);\n\t var newList = removed ? list.set(i, undefined) : list.set(i, [k, v]);\n\t if (omap.__ownerID) {\n\t omap.size = newMap.size;\n\t omap._map = newMap;\n\t omap._list = newList;\n\t omap.__hash = undefined;\n\t return omap;\n\t }\n\t return makeOrderedMap(newMap, newList);\n\t}\n\tvar Record = function Record(defaultValues, name) {\n\t var RecordType = function Record(values) {\n\t if (!(this instanceof RecordType)) {\n\t return new RecordType(values);\n\t }\n\t this._map = Map(values);\n\t };\n\t var keys = Object.keys(defaultValues);\n\t var RecordTypePrototype = RecordType.prototype = Object.create(RecordPrototype);\n\t RecordTypePrototype.constructor = RecordType;\n\t name && (RecordTypePrototype._name = name);\n\t RecordTypePrototype._defaultValues = defaultValues;\n\t RecordTypePrototype._keys = keys;\n\t RecordTypePrototype.size = keys.length;\n\t try {\n\t keys.forEach((function(key) {\n\t Object.defineProperty(RecordType.prototype, key, {\n\t get: function() {\n\t return this.get(key);\n\t },\n\t set: function(value) {\n\t invariant(this.__ownerID, 'Cannot set on an immutable record.');\n\t this.set(key, value);\n\t }\n\t });\n\t }));\n\t } catch (error) {}\n\t return RecordType;\n\t};\n\t($traceurRuntime.createClass)(Record, {\n\t toString: function() {\n\t return this.__toString(recordName(this) + ' {', '}');\n\t },\n\t has: function(k) {\n\t return this._defaultValues.hasOwnProperty(k);\n\t },\n\t get: function(k, notSetValue) {\n\t if (notSetValue !== undefined && !this.has(k)) {\n\t return notSetValue;\n\t }\n\t var defaultVal = this._defaultValues[k];\n\t return this._map ? this._map.get(k, defaultVal) : defaultVal;\n\t },\n\t clear: function() {\n\t if (this.__ownerID) {\n\t this._map && this._map.clear();\n\t return this;\n\t }\n\t var SuperRecord = Object.getPrototypeOf(this).constructor;\n\t return SuperRecord._empty || (SuperRecord._empty = makeRecord(this, emptyMap()));\n\t },\n\t set: function(k, v) {\n\t if (!this.has(k)) {\n\t throw new Error('Cannot set unknown key \"' + k + '\" on ' + recordName(this));\n\t }\n\t var newMap = this._map && this._map.set(k, v);\n\t if (this.__ownerID || newMap === this._map) {\n\t return this;\n\t }\n\t return makeRecord(this, newMap);\n\t },\n\t remove: function(k) {\n\t if (!this.has(k)) {\n\t return this;\n\t }\n\t var newMap = this._map && this._map.remove(k);\n\t if (this.__ownerID || newMap === this._map) {\n\t return this;\n\t }\n\t return makeRecord(this, newMap);\n\t },\n\t wasAltered: function() {\n\t return this._map.wasAltered();\n\t },\n\t __iterator: function(type, reverse) {\n\t var $__0 = this;\n\t return KeyedIterable(this._defaultValues).map((function(_, k) {\n\t return $__0.get(k);\n\t })).__iterator(type, reverse);\n\t },\n\t __iterate: function(fn, reverse) {\n\t var $__0 = this;\n\t return KeyedIterable(this._defaultValues).map((function(_, k) {\n\t return $__0.get(k);\n\t })).__iterate(fn, reverse);\n\t },\n\t __ensureOwner: function(ownerID) {\n\t if (ownerID === this.__ownerID) {\n\t return this;\n\t }\n\t var newMap = this._map && this._map.__ensureOwner(ownerID);\n\t if (!ownerID) {\n\t this.__ownerID = ownerID;\n\t this._map = newMap;\n\t return this;\n\t }\n\t return makeRecord(this, newMap, ownerID);\n\t }\n\t}, {}, KeyedCollection);\n\tvar RecordPrototype = Record.prototype;\n\tRecordPrototype[DELETE] = RecordPrototype.remove;\n\tRecordPrototype.merge = MapPrototype.merge;\n\tRecordPrototype.mergeWith = MapPrototype.mergeWith;\n\tRecordPrototype.mergeDeep = MapPrototype.mergeDeep;\n\tRecordPrototype.mergeDeepWith = MapPrototype.mergeDeepWith;\n\tRecordPrototype.update = MapPrototype.update;\n\tRecordPrototype.updateIn = MapPrototype.updateIn;\n\tRecordPrototype.withMutations = MapPrototype.withMutations;\n\tRecordPrototype.asMutable = MapPrototype.asMutable;\n\tRecordPrototype.asImmutable = MapPrototype.asImmutable;\n\tfunction makeRecord(likeRecord, map, ownerID) {\n\t var record = Object.create(Object.getPrototypeOf(likeRecord));\n\t record._map = map;\n\t record.__ownerID = ownerID;\n\t return record;\n\t}\n\tfunction recordName(record) {\n\t return record._name || record.constructor.name;\n\t}\n\tvar Range = function Range(start, end, step) {\n\t if (!(this instanceof $Range)) {\n\t return new $Range(start, end, step);\n\t }\n\t invariant(step !== 0, 'Cannot step a Range by 0');\n\t start = start || 0;\n\t if (end === undefined) {\n\t end = Infinity;\n\t }\n\t if (start === end && __EMPTY_RANGE) {\n\t return __EMPTY_RANGE;\n\t }\n\t step = step === undefined ? 1 : Math.abs(step);\n\t if (end < start) {\n\t step = -step;\n\t }\n\t this._start = start;\n\t this._end = end;\n\t this._step = step;\n\t this.size = Math.max(0, Math.ceil((end - start) / step - 1) + 1);\n\t};\n\tvar $Range = Range;\n\t($traceurRuntime.createClass)(Range, {\n\t toString: function() {\n\t if (this.size === 0) {\n\t return 'Range []';\n\t }\n\t return 'Range [ ' + this._start + '...' + this._end + (this._step > 1 ? ' by ' + this._step : '') + ' ]';\n\t },\n\t get: function(index, notSetValue) {\n\t return this.has(index) ? this._start + wrapIndex(this, index) * this._step : notSetValue;\n\t },\n\t contains: function(searchValue) {\n\t var possibleIndex = (searchValue - this._start) / this._step;\n\t return possibleIndex >= 0 && possibleIndex < this.size && possibleIndex === Math.floor(possibleIndex);\n\t },\n\t slice: function(begin, end) {\n\t if (wholeSlice(begin, end, this.size)) {\n\t return this;\n\t }\n\t begin = resolveBegin(begin, this.size);\n\t end = resolveEnd(end, this.size);\n\t if (end <= begin) {\n\t return __EMPTY_RANGE;\n\t }\n\t return new $Range(this.get(begin, this._end), this.get(end, this._end), this._step);\n\t },\n\t indexOf: function(searchValue) {\n\t var offsetValue = searchValue - this._start;\n\t if (offsetValue % this._step === 0) {\n\t var index = offsetValue / this._step;\n\t if (index >= 0 && index < this.size) {\n\t return index;\n\t }\n\t }\n\t return -1;\n\t },\n\t lastIndexOf: function(searchValue) {\n\t return this.indexOf(searchValue);\n\t },\n\t take: function(amount) {\n\t return this.slice(0, Math.max(0, amount));\n\t },\n\t skip: function(amount) {\n\t return this.slice(Math.max(0, amount));\n\t },\n\t __iterate: function(fn, reverse) {\n\t var maxIndex = this.size - 1;\n\t var step = this._step;\n\t var value = reverse ? this._start + maxIndex * step : this._start;\n\t for (var ii = 0; ii <= maxIndex; ii++) {\n\t if (fn(value, ii, this) === false) {\n\t return ii + 1;\n\t }\n\t value += reverse ? -step : step;\n\t }\n\t return ii;\n\t },\n\t __iterator: function(type, reverse) {\n\t var maxIndex = this.size - 1;\n\t var step = this._step;\n\t var value = reverse ? this._start + maxIndex * step : this._start;\n\t var ii = 0;\n\t return new Iterator((function() {\n\t var v = value;\n\t value += reverse ? -step : step;\n\t return ii > maxIndex ? iteratorDone() : iteratorValue(type, ii++, v);\n\t }));\n\t },\n\t __deepEquals: function(other) {\n\t return other instanceof $Range ? this._start === other._start && this._end === other._end && this._step === other._step : $traceurRuntime.superCall(this, $Range.prototype, \"__deepEquals\", [other]);\n\t }\n\t}, {}, IndexedSeq);\n\tvar RangePrototype = Range.prototype;\n\tRangePrototype.__toJS = RangePrototype.toArray;\n\tRangePrototype.first = ListPrototype.first;\n\tRangePrototype.last = ListPrototype.last;\n\tvar __EMPTY_RANGE = Range(0, 0);\n\tvar Repeat = function Repeat(value, times) {\n\t if (times <= 0 && EMPTY_REPEAT) {\n\t return EMPTY_REPEAT;\n\t }\n\t if (!(this instanceof $Repeat)) {\n\t return new $Repeat(value, times);\n\t }\n\t this._value = value;\n\t this.size = times === undefined ? Infinity : Math.max(0, times);\n\t if (this.size === 0) {\n\t EMPTY_REPEAT = this;\n\t }\n\t};\n\tvar $Repeat = Repeat;\n\t($traceurRuntime.createClass)(Repeat, {\n\t toString: function() {\n\t if (this.size === 0) {\n\t return 'Repeat []';\n\t }\n\t return 'Repeat [ ' + this._value + ' ' + this.size + ' times ]';\n\t },\n\t get: function(index, notSetValue) {\n\t return this.has(index) ? this._value : notSetValue;\n\t },\n\t contains: function(searchValue) {\n\t return is(this._value, searchValue);\n\t },\n\t slice: function(begin, end) {\n\t var size = this.size;\n\t return wholeSlice(begin, end, size) ? this : new $Repeat(this._value, resolveEnd(end, size) - resolveBegin(begin, size));\n\t },\n\t reverse: function() {\n\t return this;\n\t },\n\t indexOf: function(searchValue) {\n\t if (is(this._value, searchValue)) {\n\t return 0;\n\t }\n\t return -1;\n\t },\n\t lastIndexOf: function(searchValue) {\n\t if (is(this._value, searchValue)) {\n\t return this.size;\n\t }\n\t return -1;\n\t },\n\t __iterate: function(fn, reverse) {\n\t for (var ii = 0; ii < this.size; ii++) {\n\t if (fn(this._value, ii, this) === false) {\n\t return ii + 1;\n\t }\n\t }\n\t return ii;\n\t },\n\t __iterator: function(type, reverse) {\n\t var $__0 = this;\n\t var ii = 0;\n\t return new Iterator((function() {\n\t return ii < $__0.size ? iteratorValue(type, ii++, $__0._value) : iteratorDone();\n\t }));\n\t },\n\t __deepEquals: function(other) {\n\t return other instanceof $Repeat ? is(this._value, other._value) : $traceurRuntime.superCall(this, $Repeat.prototype, \"__deepEquals\", [other]);\n\t }\n\t}, {}, IndexedSeq);\n\tvar RepeatPrototype = Repeat.prototype;\n\tRepeatPrototype.last = RepeatPrototype.first;\n\tRepeatPrototype.has = RangePrototype.has;\n\tRepeatPrototype.take = RangePrototype.take;\n\tRepeatPrototype.skip = RangePrototype.skip;\n\tRepeatPrototype.__toJS = RangePrototype.__toJS;\n\tvar EMPTY_REPEAT;\n\tvar Immutable = {\n\t Iterable: Iterable,\n\t Seq: Seq,\n\t Collection: Collection,\n\t Map: Map,\n\t List: List,\n\t Stack: Stack,\n\t Set: Set,\n\t OrderedMap: OrderedMap,\n\t Record: Record,\n\t Range: Range,\n\t Repeat: Repeat,\n\t is: is,\n\t fromJS: fromJS\n\t};\n\n\t return Immutable;\n\t}", "function r(t){return!!t.constructor&&\"function\"==typeof t.constructor.isBuffer&&t.constructor.isBuffer(t)}", "function r(t){return!!t.constructor&&\"function\"==typeof t.constructor.isBuffer&&t.constructor.isBuffer(t)}", "function r(t){return!!t.constructor&&\"function\"==typeof t.constructor.isBuffer&&t.constructor.isBuffer(t)}", "function FooBar() {\n // TODO: implement this module\n}", "function n(t){return!!t.constructor&&\"function\"==typeof t.constructor.isBuffer&&t.constructor.isBuffer(t)}", "function n(t){return!!t.constructor&&\"function\"==typeof t.constructor.isBuffer&&t.constructor.isBuffer(t)}", "function Module() {}", "function Module() {}", "function Module() {}", "function Module() {}", "function Module() {}", "function Module() {}", "patch() {\n }", "function v8(v9,v10) {\n const v16 = [1337,1337];\n // v16 = .object(ofGroup: Array, withProperties: [\"length\", \"__proto__\", \"constructor\"], withMethods: [\"concat\", \"fill\", \"indexOf\", \"entries\", \"forEach\", \"find\", \"reverse\", \"slice\", \"flat\", \"reduce\", \"join\", \"findIndex\", \"reduceRight\", \"some\", \"copyWithin\", \"toString\", \"pop\", \"filter\", \"map\", \"splice\", \"keys\", \"unshift\", \"sort\", \"includes\", \"flatMap\", \"shift\", \"values\", \"every\", \"toLocaleString\", \"push\", \"lastIndexOf\"])\n const v17 = [\"536870912\",-3848843708,v16,-3848843708,1337,13.37,13.37,WeakMap,-3848843708];\n // v17 = .object(ofGroup: Array, withProperties: [\"length\", \"__proto__\", \"constructor\"], withMethods: [\"concat\", \"fill\", \"indexOf\", \"entries\", \"forEach\", \"find\", \"reverse\", \"slice\", \"flat\", \"reduce\", \"join\", \"findIndex\", \"reduceRight\", \"some\", \"copyWithin\", \"toString\", \"pop\", \"filter\", \"map\", \"splice\", \"keys\", \"unshift\", \"sort\", \"includes\", \"flatMap\", \"shift\", \"values\", \"every\", \"toLocaleString\", \"push\", \"lastIndexOf\"])\n const v18 = {constructor:13.37,e:v16};\n // v18 = .object(ofGroup: Object, withProperties: [\"constructor\", \"e\", \"__proto__\"])\n const v19 = {__proto__:-3848843708,a:v18,b:-3848843708,constructor:1337,d:v18,e:v17,length:WeakMap};\n // v19 = .object(ofGroup: Object, withProperties: [\"d\", \"b\", \"a\", \"__proto__\", \"e\", \"constructor\", \"length\"])\n const v21 = new Float64Array(v19);\n // v21 = .object(ofGroup: Float64Array, withProperties: [\"byteOffset\", \"constructor\", \"buffer\", \"__proto__\", \"byteLength\", \"length\"], withMethods: [\"map\", \"values\", \"subarray\", \"find\", \"fill\", \"set\", \"findIndex\", \"some\", \"reduceRight\", \"reverse\", \"join\", \"includes\", \"entries\", \"reduce\", \"every\", \"copyWithin\", \"sort\", \"forEach\", \"lastIndexOf\", \"indexOf\", \"filter\", \"slice\", \"keys\"])\n v6[6] = v7;\n v7.toString = v9;\n }", "function Utils() {}", "function Utils() {}", "function o(e){return!!e.constructor&&\"function\"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}", "function c() {}", "constructor( ) {}", "function main() {\n}", "use(fn) {}", "function FooRule() {\n}", "initialize() {}", "initialize() {}", "initialize() {}", "initialize() {}", "initialize() {}", "initialize() {}", "function test() {\n var o35 = Object.getOwnPropertyDescriptor(Object.prototype, \"__proto__\").function(o1, o2)\n{\n var o3 = 0;\n var o4 = 0;\n try {\nfor (var o5 = 1; o5 < 10000; o5++)\n {\n try {\no3 = (o1.o3 + o1.o3 + o1.o3 + o1.o3 + o1.o3) & 0x3FFFF;\n}catch(e){}\n try {\no2.o3 = o3 + o4;\n}catch(e){}\n try {\no4 = (o1.o3 + o1.o3 + o1.o3 + o1.o3 + o1.o3) & 0xFFFF;\n}catch(e){}\n }\n}catch(e){}\n try {\nreturn o3 + o4;\n}catch(e){}\n};\n function o1() {\n }\n var o2 = ((o863 & 0x4000) >> Object.o157) | ((o863 & 0x40) >> 6);\n var o38 = o839.o906.o917(o308);\n var o6 = Array('Math.ceil((' + target + ')/');\n var o867 = this.o543[0x200 | (o768 >> 4)];\n var o8 = o1(\"willValidate\");\n try {\no21 = function () {\n try {\no337++;\n}catch(e){}\n };\n}catch(e){}\n try {\ntry { o1(\"MSGestureEvent\"); } catch(e) {}try { try {\no1(\"setImmediate\");\n}catch(e){} } catch(e) {}\n}catch(e){}\n try {\n({ o9: !o3.call(o2, o1, '!') });\n}catch(e){}\n try {\nif (o0 != 2)\n try {\nprint(\"FAIL\");\n}catch(e){}\n else\n try {\nprint(\"PASS\");\n}catch(e){}\n}catch(e){}\n}", "function Bevy() {}", "function hc(){return hc=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},hc.apply(this,arguments)}", "function u(t,e){return t(e={exports:{}},e.exports),e.exports}", "function main() {\n\n}", "constructor() {}", "constructor() {}", "constructor() {}", "constructor() {}", "constructor() {}", "constructor() {}", "constructor() {}", "constructor() {}", "constructor() {}", "constructor() {}", "constructor() {}", "constructor() {}", "constructor() {}", "constructor() {}", "constructor() {}", "constructor() {}", "constructor() {}", "constructor() {}", "constructor() {}", "constructor() {}", "constructor() {}", "constructor() {}" ]
[ "0.6149275", "0.54203457", "0.53920096", "0.53668714", "0.53668714", "0.53668714", "0.53408384", "0.5318133", "0.5318133", "0.5318133", "0.5308971", "0.52618045", "0.5255616", "0.52546173", "0.52546173", "0.52546173", "0.52546173", "0.52546173", "0.52546173", "0.52546173", "0.52546173", "0.52546173", "0.52546173", "0.52546173", "0.52546173", "0.52546173", "0.52386945", "0.52386945", "0.52386945", "0.52386945", "0.52386945", "0.52386945", "0.52386945", "0.52386945", "0.52386945", "0.5236023", "0.52302927", "0.5209219", "0.518569", "0.51775223", "0.5161208", "0.5151423", "0.51483786", "0.51154035", "0.5104374", "0.5089039", "0.5086965", "0.5086965", "0.5086965", "0.50813836", "0.50768495", "0.50768495", "0.5072789", "0.5072789", "0.5072789", "0.5072789", "0.5072789", "0.5072789", "0.507222", "0.5066842", "0.50424546", "0.50424546", "0.5039841", "0.5036415", "0.50292754", "0.5027302", "0.5018287", "0.5016567", "0.5004397", "0.5004397", "0.5004397", "0.5004397", "0.5004397", "0.5004397", "0.50028014", "0.5001212", "0.49986866", "0.4986019", "0.4979444", "0.49765006", "0.49765006", "0.49765006", "0.49765006", "0.49765006", "0.49765006", "0.49765006", "0.49765006", "0.49765006", "0.49765006", "0.49765006", "0.49765006", "0.49765006", "0.49765006", "0.49765006", "0.49765006", "0.49765006", "0.49765006", "0.49765006", "0.49765006", "0.49765006", "0.49765006" ]
0.0
-1
oldstyle streams. Note that the pipe method (the only relevant part of this class) is overridden in the Readable class.
function Stream() { EE.call(this); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function pipe(stream) {\n var cache, scope = this;\n if(stream) {\n // add to the pipeline\n this.fuse(stream);\n // ensure return values are also added to the pipeline\n cache = stream.pipe;\n stream.pipe = function(/* dest */) {\n // restore cached method when called\n this.pipe = cache;\n // proxy to the outer pipe function (recurses)\n return scope.pipe.apply(scope, arguments);\n }\n stream.pipe.cache = cache;\n }\n return stream;\n}", "function SimplePipeStream() {\n\tvar self = this;\n\tself.readable = true;\n\tself.writable = true;\n\tstream.Stream.call(this);\n}", "function HashPipeStream() {\n\tvar self = this;\n\tself.readable = true;\n\tself.writable = true;\n\tstream.Stream.call(this);\n}", "function pipeStream() {\n var args = _.toArray(arguments);\n var src = args.shift();\n\n return new Promise(function(resolve, reject) {\n var stream = src;\n var target;\n\n while ((target = args.shift()) != null) {\n stream = stream.pipe(target).on('error', reject);\n }\n\n stream.on('finish', resolve);\n stream.on('end', resolve);\n stream.on('close', resolve);\n });\n}", "function OpStream() {\n Readable.call(this, {objectMode: true});\n this.id = null;\n this.open = true;\n}", "function StreamLikeSequence() {}", "function AsyncPipeStream() {\n\tvar self = this;\n\tself.readable = true;\n\tself.writable = true;\n\tstream.Stream.call(this);\n}", "function emitReadable(stream){var state=stream._readableState;state.needReadable=false;if(!state.emittedReadable){debug('emitReadable',state.flowing);state.emittedReadable=true;if(state.sync)pna.nextTick(emitReadable_,stream);else emitReadable_(stream);}}", "getReadableStream() {\n return new BuffersStream(this.buffers, this.size);\n }", "getReadableStream() {\n return new BuffersStream(this.buffers, this.size);\n }", "function emitReadable(stream){var state=stream._readableState;debug('emitReadable',state.needReadable,state.emittedReadable);state.needReadable=false;if(!state.emittedReadable){debug('emitReadable',state.flowing);state.emittedReadable=true;process.nextTick(emitReadable_,stream);}}", "function emitReadable(stream){var state=stream._readableState;state.needReadable=false;if(!state.emittedReadable){debug(\"emitReadable\",state.flowing);state.emittedReadable=true;if(state.sync)processNextTick(emitReadable_,stream);else emitReadable_(stream)}}", "function pipe(fs) {\n return function(x) {\n return reduce (T) (x) (fs);\n };\n }", "function emitReadable(stream){var state=stream._readableState;state.needReadable=false;if(!state.emittedReadable){debug('emitReadable',state.flowing);state.emittedReadable=true;if(state.sync)processNextTick(emitReadable_,stream);else emitReadable_(stream);}}", "function emitReadable(stream){var state=stream._readableState;state.needReadable=false;if(!state.emittedReadable){debug('emitReadable',state.flowing);state.emittedReadable=true;if(state.sync)processNextTick(emitReadable_,stream);else emitReadable_(stream);}}", "function pipeNext() {\n _this.streaming = true;\n closeCurrent();\n if (_this.index + 1 < _this.sources.length) {\n // Send new stream.\n _this.index += 1;\n const stream = _this.sources[_this.index];\n stream.on(\"end\", pipeNext);\n stream.pipe(_this.target, {\"end\": false});\n _this.currentClosed = false;\n } else {\n // Nothing more to stream.\n if (_this.closeOnEnd) {\n _this.target.end();\n } else {\n }\n // Wait for next stream.\n _this.streaming = false;\n }\n }", "function StreamCombiner(stream) {\n\n // Wrapped stream.\n this.target = stream;\n\n // Input streams to combine.\n this.sources = [];\n\n // Index of currently streaming stream.\n this.index = -1;\n\n // If true then close once there are no streams.\n this.closeOnEnd = false;\n\n this.streaming = false;\n\n // If true stream on this.index ended and was closed.\n this.currentClosed = false;\n\n const _this = this;\n\n // Append given stream to the wrapped stream.\n this.append = function (stream) {\n _this.sources.push(stream);\n if (!_this.streaming) {\n pipeNext();\n }\n };\n\n this.end = function () {\n // Close after the last stream is processed.\n _this.closeOnEnd = true;\n if (!_this.streaming) {\n pipeNext();\n }\n };\n\n // Look for next stream and pipe it.\n function pipeNext() {\n _this.streaming = true;\n closeCurrent();\n if (_this.index + 1 < _this.sources.length) {\n // Send new stream.\n _this.index += 1;\n const stream = _this.sources[_this.index];\n stream.on(\"end\", pipeNext);\n stream.pipe(_this.target, {\"end\": false});\n _this.currentClosed = false;\n } else {\n // Nothing more to stream.\n if (_this.closeOnEnd) {\n _this.target.end();\n } else {\n }\n // Wait for next stream.\n _this.streaming = false;\n }\n }\n\n function closeCurrent() {\n if (_this.index > -1 && !_this.currentClosed) {\n // Close stream under this.index.\n const oldStream = _this.sources[_this.index];\n oldStream.unpipe(_this.target);\n _this.currentClosed = true;\n }\n }\n\n}", "function Stream() {\n EventEmitter.call(this);\n}", "function Stream() {\n EventEmitter.call(this);\n}", "function CollectStream() {\n stream.Transform.call(this);\n this._chunks = [];\n this._transform = (chunk, enc, cb) => { this._chunks.push(chunk); cb(); }\n this.collect = () => { return Buffer.concat(this._chunks); this._chunks = []; }\n}", "function Stream() {\n EventEmitter.call(this);\n }", "function Stream() {\n\t EventEmitter.call(this);\n\t}", "function Stream() {\n\t EventEmitter.call(this);\n\t}", "function Stream() {\n\t EventEmitter.call(this);\n\t}", "function Stream() {\n\t EventEmitter.call(this);\n\t}", "function Stream() {\n\t EventEmitter.call(this);\n\t}", "function emitReadable$2(stream) {\n\t var state = stream._readableState;\n\t state.needReadable = false;\n\t if (!state.emittedReadable) {\n\t debug$2('emitReadable', state.flowing);\n\t state.emittedReadable = true;\n\t if (state.sync) processNextickArgs.nextTick(emitReadable_$2, stream);else emitReadable_$2(stream);\n\t }\n\t}", "function through (write, end) {\n write = write || function (data) { this.emit('data', data) }\n end = end || function () { this.emit('end') }\n\n var ended = false, destroyed = false\n var stream = new Stream(), buffer = []\n stream.buffer = buffer\n stream.readable = stream.writable = true\n stream.paused = false\n stream.write = function (data) {\n write.call(this, data)\n return !stream.paused\n }\n\n function drain() {\n while(buffer.length && !stream.paused) {\n var data = buffer.shift()\n if(null === data)\n return stream.emit('end')\n else\n stream.emit('data', data)\n }\n }\n\n stream.queue = function (data) {\n buffer.push(data)\n drain()\n }\n\n //this will be registered as the first 'end' listener\n //must call destroy next tick, to make sure we're after any\n //stream piped from here.\n //this is only a problem if end is not emitted synchronously.\n //a nicer way to do this is to make sure this is the last listener for 'end'\n\n stream.on('end', function () {\n stream.readable = false\n if(!stream.writable)\n process.nextTick(function () {\n stream.destroy()\n })\n })\n\n function _end () {\n stream.writable = false\n end.call(stream)\n if(!stream.readable)\n stream.destroy()\n }\n\n stream.end = function (data) {\n if(ended) return\n ended = true\n if(arguments.length) stream.write(data)\n _end() // will emit or queue\n }\n\n stream.destroy = function () {\n if(destroyed) return\n destroyed = true\n ended = true\n buffer.length = 0\n stream.writable = stream.readable = false\n stream.emit('close')\n }\n\n stream.pause = function () {\n if(stream.paused) return\n stream.paused = true\n stream.emit('pause')\n }\n stream.resume = function () {\n if(stream.paused) {\n stream.paused = false\n }\n drain()\n //may have become paused again,\n //as drain emits 'data'.\n if(!stream.paused)\n stream.emit('drain')\n }\n return stream\n}", "function streamFromBody(body) {\n return new stream.Readable({\n read() {\n this.push(body);\n this.push(null);\n },\n });\n}", "function $SYhk$var$emitReadable(stream) {\n var state = stream._readableState;\n state.needReadable = false;\n\n if (!state.emittedReadable) {\n $SYhk$var$debug('emitReadable', state.flowing);\n state.emittedReadable = true;\n if (state.sync) $SYhk$var$pna.nextTick($SYhk$var$emitReadable_, stream);else $SYhk$var$emitReadable_(stream);\n }\n}", "function Stream() {\n EventEmitter.call(this);\n }", "function emitReadable(stream) {\n var state = stream._readableState;\n state.needReadable = false;\n if (!state.emittedReadable) {\n debug('emitReadable', state.flowing);\n state.emittedReadable = true;\n if (state.sync) processNextTick(emitReadable_, stream);\n else emitReadable_(stream);\n }\n }", "function emitReadable(stream) {\n var state = stream._readableState;\n debug('emitReadable', state.needReadable, state.emittedReadable);\n state.needReadable = false;\n\n if (!state.emittedReadable) {\n debug('emitReadable', state.flowing);\n state.emittedReadable = true;\n process.nextTick(emitReadable_, stream);\n }\n }", "function isReadableStream(val) {\n return val && (typeof val.pipe == \"function\")\n && (typeof val.on== \"function\");\n}", "_is_readable_stream(obj) {\n if (!obj || typeof obj !== 'object') return false;\n return typeof obj.pipe === 'function' && typeof obj._readableState === 'object';\n }", "function emitReadable(stream) {\n var state = stream._readableState;\n state.needReadable = false;\n if (!state.emittedReadable) {\n debug('emitReadable', state.flowing);\n state.emittedReadable = true;\n if (state.sync)\n processNextTick(emitReadable_, stream);\n else\n emitReadable_(stream);\n }\n }", "function emitReadable(stream) {\n var state = stream._readableState;\n state.needReadable = false;\n if (!state.emittedReadable) {\n debug('emitReadable', state.flowing);\n state.emittedReadable = true;\n if (state.sync) nextTick(emitReadable_, stream);else emitReadable_(stream);\n }\n }", "function through (write, end) {\n write = write || function (data) { this.queue(data) }\n end = end || function () { this.queue(null) }\n\n var ended = false, destroyed = false, buffer = []\n var stream = new Stream()\n stream.readable = stream.writable = true\n stream.paused = false\n\n stream.write = function (data) {\n write.call(this, data)\n return !stream.paused\n }\n\n function drain() {\n while(buffer.length && !stream.paused) {\n var data = buffer.shift()\n if(null === data)\n return stream.emit('end')\n else\n stream.emit('data', data)\n }\n }\n\n stream.queue = stream.push = function (data) {\n buffer.push(data)\n drain()\n return stream\n }\n\n //this will be registered as the first 'end' listener\n //must call destroy next tick, to make sure we're after any\n //stream piped from here.\n //this is only a problem if end is not emitted synchronously.\n //a nicer way to do this is to make sure this is the last listener for 'end'\n\n stream.on('end', function () {\n stream.readable = false\n if(!stream.writable)\n process.nextTick(function () {\n stream.destroy()\n })\n })\n\n function _end () {\n stream.writable = false\n end.call(stream)\n if(!stream.readable)\n stream.destroy()\n }\n\n stream.end = function (data) {\n if(ended) return\n ended = true\n if(arguments.length) stream.write(data)\n _end() // will emit or queue\n return stream\n }\n\n stream.destroy = function () {\n if(destroyed) return\n destroyed = true\n ended = true\n buffer.length = 0\n stream.writable = stream.readable = false\n stream.emit('close')\n return stream\n }\n\n stream.pause = function () {\n if(stream.paused) return\n stream.paused = true\n stream.emit('pause')\n return stream\n }\n stream.resume = function () {\n if(stream.paused) {\n stream.paused = false\n }\n drain()\n //may have become paused again,\n //as drain emits 'data'.\n if(!stream.paused)\n stream.emit('drain')\n return stream\n }\n return stream\n}", "function through (write, end) {\n write = write || function (data) { this.queue(data) }\n end = end || function () { this.queue(null) }\n\n var ended = false, destroyed = false, buffer = []\n var stream = new Stream()\n stream.readable = stream.writable = true\n stream.paused = false\n\n stream.write = function (data) {\n write.call(this, data)\n return !stream.paused\n }\n\n function drain() {\n while(buffer.length && !stream.paused) {\n var data = buffer.shift()\n if(null === data)\n return stream.emit('end')\n else\n stream.emit('data', data)\n }\n }\n\n stream.queue = stream.push = function (data) {\n buffer.push(data)\n drain()\n return stream\n }\n\n //this will be registered as the first 'end' listener\n //must call destroy next tick, to make sure we're after any\n //stream piped from here.\n //this is only a problem if end is not emitted synchronously.\n //a nicer way to do this is to make sure this is the last listener for 'end'\n\n stream.on('end', function () {\n stream.readable = false\n if(!stream.writable)\n process.nextTick(function () {\n stream.destroy()\n })\n })\n\n function _end () {\n stream.writable = false\n end.call(stream)\n if(!stream.readable)\n stream.destroy()\n }\n\n stream.end = function (data) {\n if(ended) return\n ended = true\n if(arguments.length) stream.write(data)\n _end() // will emit or queue\n return stream\n }\n\n stream.destroy = function () {\n if(destroyed) return\n destroyed = true\n ended = true\n buffer.length = 0\n stream.writable = stream.readable = false\n stream.emit('close')\n return stream\n }\n\n stream.pause = function () {\n if(stream.paused) return\n stream.paused = true\n stream.emit('pause')\n return stream\n }\n stream.resume = function () {\n if(stream.paused) {\n stream.paused = false\n }\n drain()\n //may have become paused again,\n //as drain emits 'data'.\n if(!stream.paused)\n stream.emit('drain')\n return stream\n }\n return stream\n}", "function through (write, end) {\n write = write || function (data) { this.queue(data) }\n end = end || function () { this.queue(null) }\n\n var ended = false, destroyed = false, buffer = []\n var stream = new Stream()\n stream.readable = stream.writable = true\n stream.paused = false\n\n stream.write = function (data) {\n write.call(this, data)\n return !stream.paused\n }\n\n function drain() {\n while(buffer.length && !stream.paused) {\n var data = buffer.shift()\n if(null === data)\n return stream.emit('end')\n else\n stream.emit('data', data)\n }\n }\n\n stream.queue = stream.push = function (data) {\n buffer.push(data)\n drain()\n return stream\n }\n\n //this will be registered as the first 'end' listener\n //must call destroy next tick, to make sure we're after any\n //stream piped from here.\n //this is only a problem if end is not emitted synchronously.\n //a nicer way to do this is to make sure this is the last listener for 'end'\n\n stream.on('end', function () {\n stream.readable = false\n if(!stream.writable)\n process.nextTick(function () {\n stream.destroy()\n })\n })\n\n function _end () {\n stream.writable = false\n end.call(stream)\n if(!stream.readable)\n stream.destroy()\n }\n\n stream.end = function (data) {\n if(ended) return\n ended = true\n if(arguments.length) stream.write(data)\n _end() // will emit or queue\n return stream\n }\n\n stream.destroy = function () {\n if(destroyed) return\n destroyed = true\n ended = true\n buffer.length = 0\n stream.writable = stream.readable = false\n stream.emit('close')\n return stream\n }\n\n stream.pause = function () {\n if(stream.paused) return\n stream.paused = true\n stream.emit('pause')\n return stream\n }\n stream.resume = function () {\n if(stream.paused) {\n stream.paused = false\n }\n drain()\n //may have become paused again,\n //as drain emits 'data'.\n if(!stream.paused)\n stream.emit('drain')\n return stream\n }\n return stream\n}", "function Stream() {\n this.head = new Chunk(this);\n }", "function emitReadable(stream) {\n var state = stream._readableState;\n state.needReadable = false;\n\n if (!state.emittedReadable) {\n debug('emitReadable', state.flowing);\n state.emittedReadable = true;\n process.nextTick(emitReadable_, stream);\n }\n}", "function emitReadable(stream) {\n var state = stream._readableState;\n state.needReadable = false;\n\n if (!state.emittedReadable) {\n debug('emitReadable', state.flowing);\n state.emittedReadable = true;\n process.nextTick(emitReadable_, stream);\n }\n}", "function emitReadable(stream) {\n var state = stream._readableState;\n state.needReadable = false;\n\n if (!state.emittedReadable) {\n debug('emitReadable', state.flowing);\n state.emittedReadable = true;\n process.nextTick(emitReadable_, stream);\n }\n}", "function emitReadable(stream) {\n var state = stream._readableState;\n state.needReadable = false;\n\n if (!state.emittedReadable) {\n debug('emitReadable', state.flowing);\n state.emittedReadable = true;\n process.nextTick(emitReadable_, stream);\n }\n}", "function emitReadable(stream) {\n var state = stream._readableState;\n state.needReadable = false;\n\n if (!state.emittedReadable) {\n debug('emitReadable', state.flowing);\n state.emittedReadable = true;\n process.nextTick(emitReadable_, stream);\n }\n}", "function emitReadable(stream) {\n var state = stream._readableState;\n state.needReadable = false;\n\n if (!state.emittedReadable) {\n debug('emitReadable', state.flowing);\n state.emittedReadable = true;\n process.nextTick(emitReadable_, stream);\n }\n}", "function emitReadable(stream) {\n var state = stream._readableState;\n state.needReadable = false;\n\n if (!state.emittedReadable) {\n debug('emitReadable', state.flowing);\n state.emittedReadable = true;\n process.nextTick(emitReadable_, stream);\n }\n}", "function emitReadable(stream) {\n var state = stream._readableState;\n state.needReadable = false;\n\n if (!state.emittedReadable) {\n debug('emitReadable', state.flowing);\n state.emittedReadable = true;\n process.nextTick(emitReadable_, stream);\n }\n}", "function emitReadable(stream) {\n var state = stream._readableState;\n state.needReadable = false;\n\n if (!state.emittedReadable) {\n debug('emitReadable', state.flowing);\n state.emittedReadable = true;\n process.nextTick(emitReadable_, stream);\n }\n}", "function emitReadable(stream) {\n var state = stream._readableState;\n state.needReadable = false;\n\n if (!state.emittedReadable) {\n debug('emitReadable', state.flowing);\n state.emittedReadable = true;\n process.nextTick(emitReadable_, stream);\n }\n}", "function emitReadable(stream) {\n var state = stream._readableState;\n state.needReadable = false;\n\n if (!state.emittedReadable) {\n debug('emitReadable', state.flowing);\n state.emittedReadable = true;\n process.nextTick(emitReadable_, stream);\n }\n}", "function emitReadable(stream) {\n var state = stream._readableState;\n state.needReadable = false;\n\n if (!state.emittedReadable) {\n debug('emitReadable', state.flowing);\n state.emittedReadable = true;\n process.nextTick(emitReadable_, stream);\n }\n}", "function emitReadable(stream) {\n var state = stream._readableState;\n state.needReadable = false;\n\n if (!state.emittedReadable) {\n debug('emitReadable', state.flowing);\n state.emittedReadable = true;\n process.nextTick(emitReadable_, stream);\n }\n}", "function emitReadable(stream) {\n var state = stream._readableState;\n state.needReadable = false;\n\n if (!state.emittedReadable) {\n debug('emitReadable', state.flowing);\n state.emittedReadable = true;\n process.nextTick(emitReadable_, stream);\n }\n}", "function emitReadable(stream) {\n var state = stream._readableState;\n state.needReadable = false;\n\n if (!state.emittedReadable) {\n debug('emitReadable', state.flowing);\n state.emittedReadable = true;\n process.nextTick(emitReadable_, stream);\n }\n}", "function emitReadable(stream) {\n var state = stream._readableState;\n state.needReadable = false;\n\n if (!state.emittedReadable) {\n debug('emitReadable', state.flowing);\n state.emittedReadable = true;\n process.nextTick(emitReadable_, stream);\n }\n}", "function emitReadable(stream) {\n var state = stream._readableState;\n state.needReadable = false;\n\n if (!state.emittedReadable) {\n debug('emitReadable', state.flowing);\n state.emittedReadable = true;\n process.nextTick(emitReadable_, stream);\n }\n}", "function emitReadable(stream) {\n var state = stream._readableState;\n state.needReadable = false;\n\n if (!state.emittedReadable) {\n debug('emitReadable', state.flowing);\n state.emittedReadable = true;\n process.nextTick(emitReadable_, stream);\n }\n}", "function emitReadable(stream) {\n var state = stream._readableState;\n state.needReadable = false;\n\n if (!state.emittedReadable) {\n debug('emitReadable', state.flowing);\n state.emittedReadable = true;\n process.nextTick(emitReadable_, stream);\n }\n}", "function emitReadable(stream) {\r\n var state = stream._readableState;\r\n state.needReadable = false;\r\n if (!state.emittedReadable) {\r\n debug('emitReadable', state.flowing);\r\n state.emittedReadable = true;\r\n if (state.sync)\r\n process.nextTick(emitReadable_, stream);\r\n else\r\n emitReadable_(stream);\r\n }\r\n}", "function emitReadable(stream) {\n var state = stream._readableState;\n state.needReadable = false;\n\n if (!state.emittedReadable) {\n debug('emitReadable', state.flowing);\n state.emittedReadable = true;\n if (state.sync) pna.nextTick(emitReadable_, stream);else emitReadable_(stream);\n }\n}", "function emitReadable(stream) {\n var state = stream._readableState;\n debug('emitReadable', state.needReadable, state.emittedReadable);\n state.needReadable = false;\n\n if (!state.emittedReadable) {\n debug('emitReadable', state.flowing);\n state.emittedReadable = true;\n process.nextTick(emitReadable_, stream);\n }\n}", "function emitReadable(stream) {\n var state = stream._readableState;\n debug('emitReadable', state.needReadable, state.emittedReadable);\n state.needReadable = false;\n\n if (!state.emittedReadable) {\n debug('emitReadable', state.flowing);\n state.emittedReadable = true;\n process.nextTick(emitReadable_, stream);\n }\n}", "function emitReadable(stream) {\n var state = stream._readableState;\n debug('emitReadable', state.needReadable, state.emittedReadable);\n state.needReadable = false;\n\n if (!state.emittedReadable) {\n debug('emitReadable', state.flowing);\n state.emittedReadable = true;\n process.nextTick(emitReadable_, stream);\n }\n}", "function emitReadable(stream) {\n var state = stream._readableState;\n debug('emitReadable', state.needReadable, state.emittedReadable);\n state.needReadable = false;\n\n if (!state.emittedReadable) {\n debug('emitReadable', state.flowing);\n state.emittedReadable = true;\n process.nextTick(emitReadable_, stream);\n }\n}", "function emitReadable(stream) {\n var state = stream._readableState;\n debug('emitReadable', state.needReadable, state.emittedReadable);\n state.needReadable = false;\n\n if (!state.emittedReadable) {\n debug('emitReadable', state.flowing);\n state.emittedReadable = true;\n process.nextTick(emitReadable_, stream);\n }\n}", "function emitReadable(stream) {\n var state = stream._readableState;\n debug('emitReadable', state.needReadable, state.emittedReadable);\n state.needReadable = false;\n\n if (!state.emittedReadable) {\n debug('emitReadable', state.flowing);\n state.emittedReadable = true;\n process.nextTick(emitReadable_, stream);\n }\n}", "function emitReadable(stream) {\n var state = stream._readableState;\n debug('emitReadable', state.needReadable, state.emittedReadable);\n state.needReadable = false;\n\n if (!state.emittedReadable) {\n debug('emitReadable', state.flowing);\n state.emittedReadable = true;\n process.nextTick(emitReadable_, stream);\n }\n}", "function emitReadable(stream) {\n var state = stream._readableState;\n debug('emitReadable', state.needReadable, state.emittedReadable);\n state.needReadable = false;\n\n if (!state.emittedReadable) {\n debug('emitReadable', state.flowing);\n state.emittedReadable = true;\n process.nextTick(emitReadable_, stream);\n }\n}", "function emitReadable(stream) {\n var state = stream._readableState;\n debug('emitReadable', state.needReadable, state.emittedReadable);\n state.needReadable = false;\n\n if (!state.emittedReadable) {\n debug('emitReadable', state.flowing);\n state.emittedReadable = true;\n process.nextTick(emitReadable_, stream);\n }\n}", "function emitReadable(stream) {\n var state = stream._readableState;\n debug('emitReadable', state.needReadable, state.emittedReadable);\n state.needReadable = false;\n\n if (!state.emittedReadable) {\n debug('emitReadable', state.flowing);\n state.emittedReadable = true;\n process.nextTick(emitReadable_, stream);\n }\n}", "function emitReadable(stream) {\n var state = stream._readableState;\n debug('emitReadable', state.needReadable, state.emittedReadable);\n state.needReadable = false;\n\n if (!state.emittedReadable) {\n debug('emitReadable', state.flowing);\n state.emittedReadable = true;\n process.nextTick(emitReadable_, stream);\n }\n}", "function emitReadable(stream) {\n var state = stream._readableState;\n debug('emitReadable', state.needReadable, state.emittedReadable);\n state.needReadable = false;\n\n if (!state.emittedReadable) {\n debug('emitReadable', state.flowing);\n state.emittedReadable = true;\n process.nextTick(emitReadable_, stream);\n }\n}", "function emitReadable(stream) {\n var state = stream._readableState;\n debug('emitReadable', state.needReadable, state.emittedReadable);\n state.needReadable = false;\n\n if (!state.emittedReadable) {\n debug('emitReadable', state.flowing);\n state.emittedReadable = true;\n process.nextTick(emitReadable_, stream);\n }\n}", "function emitReadable(stream) {\n var state = stream._readableState;\n debug('emitReadable', state.needReadable, state.emittedReadable);\n state.needReadable = false;\n\n if (!state.emittedReadable) {\n debug('emitReadable', state.flowing);\n state.emittedReadable = true;\n process.nextTick(emitReadable_, stream);\n }\n}", "function emitReadable(stream) {\n var state = stream._readableState;\n debug('emitReadable', state.needReadable, state.emittedReadable);\n state.needReadable = false;\n\n if (!state.emittedReadable) {\n debug('emitReadable', state.flowing);\n state.emittedReadable = true;\n process.nextTick(emitReadable_, stream);\n }\n}", "function emitReadable(stream) {\n var state = stream._readableState;\n debug('emitReadable', state.needReadable, state.emittedReadable);\n state.needReadable = false;\n\n if (!state.emittedReadable) {\n debug('emitReadable', state.flowing);\n state.emittedReadable = true;\n process.nextTick(emitReadable_, stream);\n }\n}", "function emitReadable(stream) {\n var state = stream._readableState;\n debug('emitReadable', state.needReadable, state.emittedReadable);\n state.needReadable = false;\n\n if (!state.emittedReadable) {\n debug('emitReadable', state.flowing);\n state.emittedReadable = true;\n process.nextTick(emitReadable_, stream);\n }\n}", "function emitReadable(stream) {\n var state = stream._readableState;\n debug('emitReadable', state.needReadable, state.emittedReadable);\n state.needReadable = false;\n\n if (!state.emittedReadable) {\n debug('emitReadable', state.flowing);\n state.emittedReadable = true;\n process.nextTick(emitReadable_, stream);\n }\n}", "function emitReadable(stream) {\n var state = stream._readableState;\n debug('emitReadable', state.needReadable, state.emittedReadable);\n state.needReadable = false;\n\n if (!state.emittedReadable) {\n debug('emitReadable', state.flowing);\n state.emittedReadable = true;\n process.nextTick(emitReadable_, stream);\n }\n}", "function emitReadable(stream) {\n var state = stream._readableState;\n debug('emitReadable', state.needReadable, state.emittedReadable);\n state.needReadable = false;\n\n if (!state.emittedReadable) {\n debug('emitReadable', state.flowing);\n state.emittedReadable = true;\n process.nextTick(emitReadable_, stream);\n }\n}", "function emitReadable(stream) {\n var state = stream._readableState;\n debug('emitReadable', state.needReadable, state.emittedReadable);\n state.needReadable = false;\n\n if (!state.emittedReadable) {\n debug('emitReadable', state.flowing);\n state.emittedReadable = true;\n process.nextTick(emitReadable_, stream);\n }\n}", "function emitReadable(stream) {\n var state = stream._readableState;\n debug('emitReadable', state.needReadable, state.emittedReadable);\n state.needReadable = false;\n\n if (!state.emittedReadable) {\n debug('emitReadable', state.flowing);\n state.emittedReadable = true;\n process.nextTick(emitReadable_, stream);\n }\n}", "function emitReadable(stream) {\n var state = stream._readableState;\n debug('emitReadable', state.needReadable, state.emittedReadable);\n state.needReadable = false;\n\n if (!state.emittedReadable) {\n debug('emitReadable', state.flowing);\n state.emittedReadable = true;\n process.nextTick(emitReadable_, stream);\n }\n}", "function emitReadable(stream) {\n var state = stream._readableState;\n debug('emitReadable', state.needReadable, state.emittedReadable);\n state.needReadable = false;\n\n if (!state.emittedReadable) {\n debug('emitReadable', state.flowing);\n state.emittedReadable = true;\n process.nextTick(emitReadable_, stream);\n }\n}", "function emitReadable(stream) {\n var state = stream._readableState;\n debug('emitReadable', state.needReadable, state.emittedReadable);\n state.needReadable = false;\n\n if (!state.emittedReadable) {\n debug('emitReadable', state.flowing);\n state.emittedReadable = true;\n process.nextTick(emitReadable_, stream);\n }\n}", "function emitReadable(stream) {\n var state = stream._readableState;\n debug('emitReadable', state.needReadable, state.emittedReadable);\n state.needReadable = false;\n\n if (!state.emittedReadable) {\n debug('emitReadable', state.flowing);\n state.emittedReadable = true;\n process.nextTick(emitReadable_, stream);\n }\n}", "function emitReadable(stream) {\n var state = stream._readableState;\n debug('emitReadable', state.needReadable, state.emittedReadable);\n state.needReadable = false;\n\n if (!state.emittedReadable) {\n debug('emitReadable', state.flowing);\n state.emittedReadable = true;\n process.nextTick(emitReadable_, stream);\n }\n}", "function emitReadable(stream) {\n var state = stream._readableState;\n debug('emitReadable', state.needReadable, state.emittedReadable);\n state.needReadable = false;\n\n if (!state.emittedReadable) {\n debug('emitReadable', state.flowing);\n state.emittedReadable = true;\n process.nextTick(emitReadable_, stream);\n }\n}", "function emitReadable(stream) {\n var state = stream._readableState;\n debug('emitReadable', state.needReadable, state.emittedReadable);\n state.needReadable = false;\n\n if (!state.emittedReadable) {\n debug('emitReadable', state.flowing);\n state.emittedReadable = true;\n process.nextTick(emitReadable_, stream);\n }\n}", "function emitReadable(stream) {\n var state = stream._readableState;\n debug('emitReadable', state.needReadable, state.emittedReadable);\n state.needReadable = false;\n\n if (!state.emittedReadable) {\n debug('emitReadable', state.flowing);\n state.emittedReadable = true;\n process.nextTick(emitReadable_, stream);\n }\n}", "function emitReadable(stream) {\n var state = stream._readableState;\n debug('emitReadable', state.needReadable, state.emittedReadable);\n state.needReadable = false;\n\n if (!state.emittedReadable) {\n debug('emitReadable', state.flowing);\n state.emittedReadable = true;\n process.nextTick(emitReadable_, stream);\n }\n}", "function emitReadable(stream) {\n var state = stream._readableState;\n debug('emitReadable', state.needReadable, state.emittedReadable);\n state.needReadable = false;\n\n if (!state.emittedReadable) {\n debug('emitReadable', state.flowing);\n state.emittedReadable = true;\n process.nextTick(emitReadable_, stream);\n }\n}", "function emitReadable(stream) {\n var state = stream._readableState;\n debug('emitReadable', state.needReadable, state.emittedReadable);\n state.needReadable = false;\n\n if (!state.emittedReadable) {\n debug('emitReadable', state.flowing);\n state.emittedReadable = true;\n process.nextTick(emitReadable_, stream);\n }\n}", "function emitReadable(stream) {\n var state = stream._readableState;\n debug('emitReadable', state.needReadable, state.emittedReadable);\n state.needReadable = false;\n\n if (!state.emittedReadable) {\n debug('emitReadable', state.flowing);\n state.emittedReadable = true;\n process.nextTick(emitReadable_, stream);\n }\n}", "function emitReadable(stream) {\n var state = stream._readableState;\n debug('emitReadable', state.needReadable, state.emittedReadable);\n state.needReadable = false;\n\n if (!state.emittedReadable) {\n debug('emitReadable', state.flowing);\n state.emittedReadable = true;\n process.nextTick(emitReadable_, stream);\n }\n}", "function emitReadable(stream) {\n var state = stream._readableState;\n debug('emitReadable', state.needReadable, state.emittedReadable);\n state.needReadable = false;\n\n if (!state.emittedReadable) {\n debug('emitReadable', state.flowing);\n state.emittedReadable = true;\n process.nextTick(emitReadable_, stream);\n }\n}", "function emitReadable(stream) {\n var state = stream._readableState;\n debug('emitReadable', state.needReadable, state.emittedReadable);\n state.needReadable = false;\n\n if (!state.emittedReadable) {\n debug('emitReadable', state.flowing);\n state.emittedReadable = true;\n process.nextTick(emitReadable_, stream);\n }\n}", "function emitReadable(stream) {\n\t var state = stream._readableState;\n\t state.needReadable = false;\n\t if (!state.emittedReadable) {\n\t debug('emitReadable', state.flowing);\n\t state.emittedReadable = true;\n\t if (state.sync) pna.nextTick(emitReadable_, stream);else emitReadable_(stream);\n\t }\n\t}", "function emitReadable(stream) {\n\t var state = stream._readableState;\n\t state.needReadable = false;\n\t if (!state.emittedReadable) {\n\t debug('emitReadable', state.flowing);\n\t state.emittedReadable = true;\n\t if (state.sync) pna.nextTick(emitReadable_, stream);else emitReadable_(stream);\n\t }\n\t}" ]
[ "0.7390886", "0.71938306", "0.6900835", "0.6533616", "0.6492514", "0.64115024", "0.631319", "0.6288172", "0.6283121", "0.6283121", "0.62320936", "0.62120926", "0.6195139", "0.6181338", "0.6181338", "0.61387545", "0.61259896", "0.6103953", "0.6103953", "0.6085072", "0.6047276", "0.6033482", "0.6033482", "0.6033482", "0.6033482", "0.6033482", "0.5978092", "0.59184945", "0.59183633", "0.5867766", "0.5859706", "0.5855545", "0.5854486", "0.5852215", "0.5848743", "0.583856", "0.5831919", "0.5830825", "0.5830825", "0.5830825", "0.58073515", "0.5806585", "0.5806585", "0.5806585", "0.5806585", "0.5806585", "0.5806585", "0.5806585", "0.5806585", "0.5806585", "0.5806585", "0.5806585", "0.5806585", "0.5806585", "0.5806585", "0.5806585", "0.5806585", "0.5806585", "0.5806585", "0.5806585", "0.5794333", "0.57814217", "0.57720685", "0.57720685", "0.57720685", "0.57720685", "0.57720685", "0.57720685", "0.57720685", "0.57720685", "0.57720685", "0.57720685", "0.57720685", "0.57720685", "0.57720685", "0.57720685", "0.57720685", "0.57720685", "0.57720685", "0.57720685", "0.57720685", "0.57720685", "0.57720685", "0.57720685", "0.57720685", "0.57720685", "0.57720685", "0.57720685", "0.57720685", "0.57720685", "0.57720685", "0.57720685", "0.57720685", "0.57720685", "0.57720685", "0.57720685", "0.57720685", "0.57720685", "0.57720685", "0.5769571", "0.5769571" ]
0.0
-1
don't leave dangling pipes when there are errors.
function onerror(er) { cleanup(); if (EE.listenerCount(this, 'error') === 0) { throw er; // Unhandled stream error in pipe. } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function brokenPipe() {\n throw Error('artoo.asyncStore: broken pipe.');\n }", "function onerror(error) {\n cleanup();\n if (!hasListeners(this, 'error'))\n throw error; // Unhandled stream error in pipe.\n }", "function onerror(er){debug(\"onerror\",er);unpipe();dest.removeListener(\"error\",onerror);if(EElistenerCount(dest,\"error\")===0)dest.emit(\"error\",er)}", "function onerror(er) {\n\t cleanup();\n\t if (this.listeners('error').length === 0) {\n\t throw er; // Unhandled stream error in pipe.\n\t }\n\t }", "function onerror(er) {\n\t cleanup();\n\t if (EventEmitter.listenerCount(this, 'error') === 0) {\n\t throw er; // Unhandled stream error in pipe.\n\t }\n\t }", "function onerror(er) {\n\t cleanup();\n\t if (EventEmitter.listenerCount(this, 'error') === 0) {\n\t throw er; // Unhandled stream error in pipe.\n\t }\n\t }", "function onerror(er) {\n\t cleanup();\n\t if (EventEmitter.listenerCount(this, 'error') === 0) {\n\t throw er; // Unhandled stream error in pipe.\n\t }\n\t }", "function onerror(er) {\n\t cleanup();\n\t if (EventEmitter.listenerCount(this, 'error') === 0) {\n\t throw er; // Unhandled stream error in pipe.\n\t }\n\t }", "function onerror(er) {\n\t cleanup();\n\t if (EventEmitter.listenerCount(this, 'error') === 0) {\n\t throw er; // Unhandled stream error in pipe.\n\t }\n\t }", "function onerror(er) {\n cleanup();\n if (!this.hasListeners('error')) {\n throw er; // Unhandled stream error in pipe.\n }\n }", "function onerror(er) {\n cleanup();\n if (!this.hasListeners('error')) {\n throw er; // Unhandled stream error in pipe.\n }\n }", "function onerror(er) {\n\t unpipe();\n\t dest.removeListener('error', onerror);\n\t if (EE.listenerCount(dest, 'error') === 0)\n\t dest.emit('error', er);\n\t }", "function onerror(er) {\n\t unpipe();\n\t dest.removeListener('error', onerror);\n\t if (EE.listenerCount(dest, 'error') === 0)\n\t dest.emit('error', er);\n\t }", "function onerror(er) {\n unpipe();\n dest.removeListener('error', onerror);\n if (EE.listenerCount(dest, 'error') === 0) dest.emit('error', er);\n }", "function onerror(er) {\n cleanup();\n if (EventEmitter.listenerCount(this, 'error') === 0) {\n throw er; // Unhandled stream error in pipe.\n }\n }", "function maybePipeManually() {\n var chunk\n while ((chunk = writer.read())) {\n if (!conn.write(chunk)) {\n break\n }\n }\n }", "function onerror(er) {\n cleanup();\n if (EventEmitter.listenerCount(this, 'error') === 0) {\n throw er; // Unhandled stream error in pipe.\n }\n }", "function onerror(er) {\n unpipe();\n dest.removeListener('error', onerror);\n if (EE.listenerCount(dest, 'error') === 0)\n dest.emit('error', er);\n }", "function onerror(er) {\n unpipe();\n dest.removeListener('error', onerror);\n if (EE.listenerCount(dest, 'error') === 0)\n dest.emit('error', er);\n }", "function onerror(er) {\n unpipe();\n dest.removeListener('error', onerror);\n if (EE.listenerCount(dest, 'error') === 0)\n dest.emit('error', er);\n }", "function onerror(er) {\n unpipe();\n dest.removeListener('error', onerror);\n if (EE.listenerCount(dest, 'error') === 0)\n dest.emit('error', er);\n }", "function onerror(er) {\n unpipe();\n dest.removeListener('error', onerror);\n if (EE.listenerCount(dest, 'error') === 0)\n dest.emit('error', er);\n }", "function onerror(er) {\n unpipe();\n dest.removeListener('error', onerror);\n if (EE.listenerCount(dest, 'error') === 0)\n dest.emit('error', er);\n }", "function onerror(er) {\n unpipe();\n dest.removeListener('error', onerror);\n if (EE.listenerCount(dest, 'error') === 0)\n dest.emit('error', er);\n }", "function onerror(er) {\n unpipe();\n dest.removeListener('error', onerror);\n if (EE.listenerCount(dest, 'error') === 0)\n dest.emit('error', er);\n }", "function onerror(er) {\n unpipe();\n dest.removeListener('error', onerror);\n if (EE.listenerCount(dest, 'error') === 0)\n dest.emit('error', er);\n }", "function onerror(er) {\n unpipe();\n dest.removeListener('error', onerror);\n if (EE.listenerCount(dest, 'error') === 0)\n dest.emit('error', er);\n }", "function onerror(er) {\n unpipe();\n dest.removeListener('error', onerror);\n if (EE.listenerCount(dest, 'error') === 0)\n dest.emit('error', er);\n }", "function onerror(er) {\n unpipe();\n dest.removeListener('error', onerror);\n if (EE.listenerCount(dest, 'error') === 0)\n dest.emit('error', er);\n }", "function onerror(er) {\n unpipe();\n dest.removeListener('error', onerror);\n if (EE.listenerCount(dest, 'error') === 0)\n dest.emit('error', er);\n }", "function onerror(er) {\n unpipe();\n dest.removeListener('error', onerror);\n if (EE.listenerCount(dest, 'error') === 0)\n dest.emit('error', er);\n }", "function onerror(er) {\n unpipe();\n dest.removeListener('error', onerror);\n if (EE.listenerCount(dest, 'error') === 0)\n dest.emit('error', er);\n }", "function onerror(er) {\n unpipe();\n dest.removeListener('error', onerror);\n if (EE.listenerCount(dest, 'error') === 0)\n dest.emit('error', er);\n }", "function onerror(er) {\n unpipe();\n dest.removeListener('error', onerror);\n if (EE.listenerCount(dest, 'error') === 0)\n dest.emit('error', er);\n }", "function onerror(er) {\n unpipe();\n dest.removeListener('error', onerror);\n if (EE.listenerCount(dest, 'error') === 0)\n dest.emit('error', er);\n }", "function onerror(er) {\n unpipe();\n dest.removeListener('error', onerror);\n if (EE.listenerCount(dest, 'error') === 0)\n dest.emit('error', er);\n }", "function onerror(er) {\n unpipe();\n dest.removeListener('error', onerror);\n if (EE.listenerCount(dest, 'error') === 0)\n dest.emit('error', er);\n }", "function onerror(er) {\n unpipe();\n dest.removeListener('error', onerror);\n if (EE.listenerCount(dest, 'error') === 0)\n dest.emit('error', er);\n }", "function onerror(er) {\n unpipe();\n dest.removeListener('error', onerror);\n if (EE.listenerCount(dest, 'error') === 0)\n dest.emit('error', er);\n }", "function onerror(er) {\n unpipe();\n dest.removeListener('error', onerror);\n if (EE.listenerCount(dest, 'error') === 0)\n dest.emit('error', er);\n }", "function onerror(er) {\n unpipe();\n dest.removeListener('error', onerror);\n if (EE.listenerCount(dest, 'error') === 0)\n dest.emit('error', er);\n }", "function onerror(er) {\n unpipe();\n dest.removeListener('error', onerror);\n if (EE.listenerCount(dest, 'error') === 0)\n dest.emit('error', er);\n }", "function onerror(er) {\n unpipe();\n dest.removeListener('error', onerror);\n if (EE.listenerCount(dest, 'error') === 0)\n dest.emit('error', er);\n }", "function onerror(er) {\n unpipe();\n dest.removeListener('error', onerror);\n if (EE.listenerCount(dest, 'error') === 0)\n dest.emit('error', er);\n }", "function onerror(er) {\n unpipe();\n dest.removeListener('error', onerror);\n if (EE.listenerCount(dest, 'error') === 0)\n dest.emit('error', er);\n }", "function onerror(er) {\n cleanup();\n if (EventEmitter.listenerCount(this, 'error') === 0) {\n throw er; // Unhandled stream error in pipe.\n }\n }", "function onerror(er) {\n cleanup();\n if (EventEmitter.listenerCount(this, 'error') === 0) {\n throw er; // Unhandled stream error in pipe.\n }\n }", "function onerror(er) {\n cleanup();\n if (EventEmitter.listenerCount(this, 'error') === 0) {\n throw er; // Unhandled stream error in pipe.\n }\n }", "function onerror(er) {\n cleanup();\n if (EventEmitter.listenerCount(this, 'error') === 0) {\n throw er; // Unhandled stream error in pipe.\n }\n }", "function onerror(er){debug('onerror',er);unpipe();dest.removeListener('error',onerror);if(EElistenerCount(dest,'error')===0)dest.emit('error',er);}// Make sure our error handler is attached before userland ones.", "function onerror(er){debug('onerror',er);unpipe();dest.removeListener('error',onerror);if(EElistenerCount(dest,'error')===0)dest.emit('error',er);}// Make sure our error handler is attached before userland ones.", "function onerror(er){debug('onerror',er);unpipe();dest.removeListener('error',onerror);if(EElistenerCount(dest,'error')===0)dest.emit('error',er);}// Make sure our error handler is attached before userland ones.", "function onerror(er) {\n cleanup();\n if (this.listeners('error').length === 0) {\n throw er; // Unhandled stream error in pipe.\n }\n }", "function onerror(er) {\n cleanup();\n if (this.listeners('error').length === 0) {\n throw er; // Unhandled stream error in pipe.\n }\n }", "function onerror(er) {\n cleanup();\n if (this.listeners('error').length === 0) {\n throw er; // Unhandled stream error in pipe.\n }\n }", "function onerror(er) {\n cleanup();\n if (this.listeners('error').length === 0) {\n throw er; // Unhandled stream error in pipe.\n }\n }", "function onerror(er) {\n cleanup();\n if (this.listeners('error').length === 0) {\n throw er; // Unhandled stream error in pipe.\n }\n }", "function onerror(er) {\n cleanup();\n if (this.listeners('error').length === 0) {\n throw er; // Unhandled stream error in pipe.\n }\n }", "function onerror(er) {\n cleanup();\n if (this.listeners('error').length === 0) {\n throw er; // Unhandled stream error in pipe.\n }\n }", "function onerror(er) {\n cleanup();\n if (this.listeners('error').length === 0) {\n throw er; // Unhandled stream error in pipe.\n }\n }", "function onerror(er) {\n cleanup();\n if (this.listeners('error').length === 0) {\n throw er; // Unhandled stream error in pipe.\n }\n }", "function onerror(er) {\n cleanup();\n if (EE.listenerCount(this, 'error') === 0) {\n throw er; // Unhandled stream error in pipe.\n }\n }", "function onerror(er) {\n cleanup();\n if (EE.listenerCount(this, 'error') === 0) {\n throw er; // Unhandled stream error in pipe.\n }\n }", "function onerror(er) {\n cleanup();\n if (EE.listenerCount(this, 'error') === 0) {\n throw er; // Unhandled stream error in pipe.\n }\n }", "function onerror(er) {\n cleanup();\n if (EE.listenerCount(this, 'error') === 0) {\n throw er; // Unhandled stream error in pipe.\n }\n }", "function onerror(er) {\n cleanup();\n if (EE.listenerCount(this, 'error') === 0) {\n throw er; // Unhandled stream error in pipe.\n }\n }", "function onerror(er) {\n cleanup();\n if (EE.listenerCount(this, 'error') === 0) {\n throw er; // Unhandled stream error in pipe.\n }\n }", "function onerror(er) {\n cleanup();\n if (EE.listenerCount(this, 'error') === 0) {\n throw er; // Unhandled stream error in pipe.\n }\n }", "function onerror(er) {\n cleanup();\n if (EE.listenerCount(this, 'error') === 0) {\n throw er; // Unhandled stream error in pipe.\n }\n }", "function onerror(er) {\n cleanup();\n if (EE.listenerCount(this, 'error') === 0) {\n throw er; // Unhandled stream error in pipe.\n }\n }", "function onerror(er) {\n cleanup();\n if (EE.listenerCount(this, 'error') === 0) {\n throw er; // Unhandled stream error in pipe.\n }\n }", "function onerror(er) {\n cleanup();\n if (EE.listenerCount(this, 'error') === 0) {\n throw er; // Unhandled stream error in pipe.\n }\n }", "function onerror(er) {\n cleanup();\n if (EE.listenerCount(this, 'error') === 0) {\n throw er; // Unhandled stream error in pipe.\n }\n }", "function onerror(er) {\n cleanup();\n if (EE.listenerCount(this, 'error') === 0) {\n throw er; // Unhandled stream error in pipe.\n }\n }", "function onerror(er) {\n cleanup();\n if (EE.listenerCount(this, 'error') === 0) {\n throw er; // Unhandled stream error in pipe.\n }\n }", "function onerror(er) {\n cleanup();\n if (EE.listenerCount(this, 'error') === 0) {\n throw er; // Unhandled stream error in pipe.\n }\n }" ]
[ "0.6985888", "0.6516886", "0.63997626", "0.6383677", "0.6370589", "0.6370589", "0.6370589", "0.6370589", "0.6370589", "0.6333938", "0.62931335", "0.62854844", "0.62854844", "0.62752515", "0.6234044", "0.6234014", "0.6221775", "0.62151647", "0.62151647", "0.62151647", "0.62151647", "0.62151647", "0.62151647", "0.62151647", "0.62151647", "0.62151647", "0.62151647", "0.62151647", "0.62151647", "0.62151647", "0.62151647", "0.62151647", "0.62151647", "0.62151647", "0.62151647", "0.62151647", "0.62151647", "0.62151647", "0.62151647", "0.62151647", "0.62151647", "0.62151647", "0.62151647", "0.62151647", "0.62151647", "0.621293", "0.621293", "0.621293", "0.621293", "0.62026113", "0.62026113", "0.62026113", "0.61770093", "0.61770093", "0.61770093", "0.61770093", "0.61770093", "0.61770093", "0.61770093", "0.61770093", "0.61770093", "0.6047544", "0.6019539", "0.6019539", "0.6019539", "0.6019539", "0.6019539", "0.6019539", "0.6019539", "0.6019539", "0.6019539", "0.6019539", "0.6019539", "0.6019539", "0.6019539", "0.6019539" ]
0.6196811
71
remove all the event listeners that were added.
function cleanup() { source.removeListener('data', ondata); dest.removeListener('drain', ondrain); source.removeListener('end', onend); source.removeListener('close', onclose); source.removeListener('error', onerror); dest.removeListener('error', onerror); source.removeListener('end', cleanup); source.removeListener('close', cleanup); dest.removeListener('close', cleanup); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "removeListeners() {}", "removeListeners() {}", "removeListeners() {}", "function removeEventListeners(){\n _.forEach(unlistenCallbacks, function(unlisten){\n unlisten();\n });\n unlistenCallbacks = [];\n }", "_clearListeners() {\n for (let listener of this._listeners) {\n listener.remove();\n }\n this._listeners = [];\n }", "_clearListeners() {\n for (const listener of this._listeners) {\n listener.remove();\n }\n this._listeners = [];\n }", "function clearEvents() {\n\t\t\tvar ident;\n\t\t\tfor (ident in listenersByEventId) {\n\t\t\t\tr.removeListener(ident);\n\t\t\t}\n\t\t}", "removeAllEventListeners() {\n this.eventListeners.forEach(({ target, type, boundListener }) => {\n this.log(`Removing \"${type}\" eventlistener`, target);\n target.removeEventListener(type, boundListener);\n });\n this.eventListeners.length = 0;\n }", "removeAllEventListeners() {\n this.eventListeners.forEach(({target, type, boundListener}) => {\n this.log(`Removing \"${type}\" eventlistener`, target);\n target.removeEventListener(type, boundListener);\n });\n this.eventListeners.length = 0;\n }", "removeAllListeners() {\n\t\tfor (let i = 0; i < this.eventHandles_.length; i++) {\n\t\t\tthis.eventHandles_[i].removeListener();\n\t\t}\n\n\t\tthis.eventHandles_ = [];\n\t}", "removeAllListeners() {\n const me = this,\n listeners = me.eventListeners || (me.eventListeners = {});\n\n for (let event in listeners) {\n listeners[event].forEach((cfg) => me.removeListener(event, cfg));\n }\n }", "removeAllListeners() {\n this.listeners = {};\n }", "removeAllListeners() {\n this._onOpen.removeAllListeners();\n this._onMessage.removeAllListeners();\n this._onUnpackedMessage.removeAllListeners();\n this._onResponse.removeAllListeners();\n this._onSend.removeAllListeners();\n this._onClose.removeAllListeners();\n this._onError.removeAllListeners();\n }", "removeAll() {\n this.listeners.forEach(listener => listener.destroy());\n this.listeners = [];\n }", "_removeEventListeners() {\n this.currentEventListeners.forEach(listener => {\n this.domElement.removeEventListener(listener.event, listener.callBack);\n });\n this.currentEventListeners = null;\n }", "removeAllListeners() {\n const listeners = this.eventListeners;\n let i, thisObj;\n\n for (const event in listeners) {\n const bucket = listeners[event]; // We iterate backwards since we call removeListener which will splice out of\n // this array as we go...\n\n for (i = bucket.length; i-- > 0;)\n /* empty */\n {\n const cfg = bucket[i];\n this.removeListener(event, cfg);\n thisObj = cfg.thisObj;\n\n if (thisObj && thisObj.untrackDetachers) {\n thisObj.untrackDetachers(this);\n }\n }\n }\n }", "removeEventListeners() {\n\t\twindow.removeEventListener('resize', this.bindResize);\n\t\tthis.domElement.removeEventListener('click', this.bindClick);\n\t\tTweenMax.ticker.removeEventListener('tick', this.bindRender);\n\t\tEmitter.off('LOADING_COMPLETE', this.bindEnter);\n\t\twindow.removeEventListener('mousemove', this.boundMouseMove);\n\t}", "removeListeners() {\n var descriptor = this.getDescriptor();\n if (descriptor) {\n descriptor.unlisten(DescriptorEventType.ACTIVATED, this.onActivated, false, this);\n descriptor.unlisten(DescriptorEventType.DEACTIVATED, this.onDeactivated, false, this);\n descriptor.unlisten(DescriptorEventType.DEACTIVATED, this.onActivationError, false, this);\n }\n }", "function removeListeners() {\n\t\t$(document).off(EVENT_NAME_KEYPRESS);\n\t\t$(document).off(EVENT_NAME_KEYUP);\n\t}", "_removeListeners() {\n document.removeEventListener('click', this._handleWindowClick);\n window.removeEventListener('resize', this._handleResize);\n this.el.removeEventListener('keydown', this._handleKeyDown);\n document.removeEventListener('blur', this._handleBlur, true);\n document.removeEventListener('focus', this._handleFocus, true);\n document.removeEventListener('spark.visible-children', this._handleVisibleChildren, true);\n }", "removeAllEventListeners () {\n this.eventListeners = [];\n }", "removeAllListeners() {\n this.click = [];\n this.drag = [];\n this.dragStart = [];\n this.dragEnd = [];\n }", "cleanUpEvents() {\n for (let idx in this.eventsToClean) {\n this.eventsToClean[idx].removeCleanupListeners();\n }\n }", "detachListeners () {\n if (this.listenersAttached) {\n window.removeEventListener('resize', this.handleWindowResize)\n window.removeEventListener('mouseup', this.handleMouseUp)\n window.removeEventListener('touchend', this.handleTouchEnd)\n window.removeEventListener('touchcancel', this.handleTouchEnd)\n window.removeEventListener('pointerdown', this.handlePointerEvent)\n window.removeEventListener('pointermove', this.handlePointerEvent)\n window.removeEventListener('pointerup', this.handlePointerEvent)\n window.removeEventListener('pointercancel', this.handlePointerEvent)\n this.listenersAttached = false\n }\n }", "_removeListeners() {\n try {\n WINDOW$1.document.removeEventListener('visibilitychange', this._handleVisibilityChange);\n\n WINDOW$1.removeEventListener('blur', this._handleWindowBlur);\n WINDOW$1.removeEventListener('focus', this._handleWindowFocus);\n\n restoreRecordDroppedEvent();\n\n if (this._performanceObserver) {\n this._performanceObserver.disconnect();\n this._performanceObserver = null;\n }\n } catch (err) {\n this._handleException(err);\n }\n }", "removeEventListeners() {\n this.elementListener.removeEventListener(\"mouseenter\", this.onMouseEnterBind);\n this.elementListener.removeEventListener(\"mouseleave\", this.onMouseLeaveBind);\n this.elementListener.removeEventListener(\"mousemove\", this.onMouseMoveBind);\n\n if (this.gyroscope) {\n window.removeEventListener(\"deviceorientation\", this.onDeviceOrientationBind);\n }\n\n if (this.glare || this.fullPageListening) {\n window.removeEventListener(\"resize\", this.onWindowResizeBind);\n }\n }", "function removeListeners() {\n debug(\"removeListeners\");\n cards().forEach(function(card) {\n card.removeEventListener('click', cardMagic)\n })\n }", "function removeListeners() {\n\t\t\t$element.unbind(START_EV, touchStart);\n\t\t\t$element.unbind(CANCEL_EV, touchCancel);\n\t\t\t$element.unbind(MOVE_EV, touchMove);\n\t\t\t$element.unbind(END_EV, touchEnd);\n\n\t\t\t//we only have leave events on desktop, we manually calculate leave on touch as its not supported in webkit\n\t\t\tif(LEAVE_EV) {\n\t\t\t\t$element.unbind(LEAVE_EV, touchLeave);\n\t\t\t}\n\n\t\t\tsetTouchInProgress(false);\n\t\t}", "function clearListeners(event) {\n if(event) {\n delete listeners[event];\n } else {\n listeners = {};\n }\n }", "function removeListeners() {\n\t\t\t$element.unbind(START_EV, touchStart);\n\t\t\t$element.unbind(CANCEL_EV, touchCancel);\n\t\t\t$element.unbind(MOVE_EV, touchMove);\n\t\t\t$element.unbind(END_EV, touchEnd);\n\t\t\t\n\t\t\t//we only have leave events on desktop, we manually calculate leave on touch as its not supported in webkit\n\t\t\tif(LEAVE_EV) { \n\t\t\t\t$element.unbind(LEAVE_EV, touchLeave);\n\t\t\t}\n\t\t\t\n\t\t\tsetTouchInProgress(false);\n\t\t}", "function removeListeners() {\n\t\t\t$element.unbind(START_EV, touchStart);\n\t\t\t$element.unbind(CANCEL_EV, touchCancel);\n\t\t\t$element.unbind(MOVE_EV, touchMove);\n\t\t\t$element.unbind(END_EV, touchEnd);\n\t\t\t\n\t\t\t//we only have leave events on desktop, we manually calculate leave on touch as its not supported in webkit\n\t\t\tif(LEAVE_EV) { \n\t\t\t\t$element.unbind(LEAVE_EV, touchLeave);\n\t\t\t}\n\t\t\t\n\t\t\tsetTouchInProgress(false);\n\t\t}", "function removeAddedEvents() {\n // remove added native events\n nativeEvents.forEach(function (_ref) {\n var key = _ref.key,\n listener = _ref.listener;\n element.removeEventListener(key, listener);\n });\n nativeEvents = [];\n }", "removeAll()\n {\n this.listeners.length = 0;\n this.errorListeners.length = 0;\n this.validateListeners.length = 0;\n this.createListeners.length = 0;\n this.submitListeners.length = 0;\n }", "function removeListeners() {\n $element.unbind(START_EV, touchStart);\n $element.unbind(CANCEL_EV, touchCancel);\n $element.unbind(MOVE_EV, touchMove);\n $element.unbind(END_EV, touchEnd);\n \n //we only have leave events on desktop, we manually calculate leave on touch as its not supported in webkit\n if(LEAVE_EV) { \n $element.unbind(LEAVE_EV, touchLeave);\n }\n \n setTouchInProgress(false);\n }", "undelegateEvents() {\n this.delegatedEventListeners.forEach(({ type, listener }) => {\n this.el.removeEventListener(type, listener);\n });\n\n this.delegatedEventListeners = [];\n }", "removeAllListeners (eventName) {\n // perform default behavior, preserve fn arity\n if (eventName) {\n super.removeAllListeners(eventName)\n } else {\n super.removeAllListeners()\n }\n // re-add internal events\n this._setupInternalEvents()\n // trigger stop check just in case\n this._onRemoveListener()\n }", "function _clearListeners(arr) {\n if (arr == null || arr._parent == null) {\n return;\n }\n\n for (const key in arr._handlers) {\n arr._parent.removeListener(key, arr._handlers[key]);\n }\n}", "function removeListeners() {\n $element.unbind(START_EV, touchStart);\n $element.unbind(CANCEL_EV, touchCancel);\n $element.unbind(MOVE_EV, touchMove);\n $element.unbind(END_EV, touchEnd);\n\n //we only have leave events on desktop, we manually calculate leave on touch as its not supported in webkit\n if (LEAVE_EV) {\n $element.unbind(LEAVE_EV, touchLeave);\n }\n\n setTouchInProgress(false);\n }", "removeListeners()\n {\n this.cancel.removeEventListener('click', this.destroy);\n }", "removeListeners() {\n const client = MatrixClientPeg.get();\n if (client === null) return;\n\n client.removeListener('sync', this.onSync);\n client.removeListener('Room.timeline', this.onRoomTimeline);\n client.removeListener('Event.decrypted', this.onEventDecrypted);\n client.removeListener('Room.timelineReset', this.onTimelineReset);\n client.removeListener('Room.redaction', this.onRedaction);\n }", "function detachEvents() {\n if (browser.addEventListener) {\n // remove current event listeners\n element.removeEventListener('touchstart', events, browser.passiveEvents ? { passive: true } : false);\n element.removeEventListener('mousedown', events, false);\n element.removeEventListener('webkitTransitionEnd', events, false);\n element.removeEventListener('msTransitionEnd', events, false);\n element.removeEventListener('oTransitionEnd', events, false);\n element.removeEventListener('otransitionend', events, false);\n element.removeEventListener('transitionend', events, false);\n root.removeEventListener('resize', events, false);\n } else {\n root.onresize = null;\n }\n }", "destroy() {\n let i;\n for (let type in this._listeners) {\n let arr = this._listeners[type];\n for (i = 0; i < arr.length; i += 1) {\n arr[i] = null;\n }\n }\n }", "unbindEvents() {\n this.toggleListeners.forEach(toggleListener => toggleListener.destroy());\n this.openListeners.forEach(openListener => openListener.destroy());\n this.closeListeners.forEach(closeListener => closeListener.destroy());\n this.radioOpenListeners.forEach(radioOpenListener => radioOpenListener.destroy());\n this.radioCloseListeners.forEach(radioCloseListener => radioCloseListener.destroy());\n this.inputOpenListeners.forEach(inputOpenListener => inputOpenListener.destroy());\n }", "removeEventListeners() {\n this.leafletMap.removeEventListener('click', (event) => {\n this.clickLeafletMap(event);\n })\n this.leafletMap.removeEventListener('mousemove', (event) => {\n this.onMouseMove(event);\n });\n this.leafletMap.removeEventListener('keydown', (event) => {\n this.onKeyPress(event.originalEvent);\n });\n this.leafletMap.removeEventListener('mouseover', (event) => {\n this.onMouseOverLeaflet(event)\n });\n this.leafletMap.removeEventListener('mouseout', (event) => {\n this.onMouseOutLeaflet(event)\n });\n }", "function clearRemainingListeners() {\n observerTestState.toBeEnabled.forEach(function(feature) {\n chrome.accessibilityFeatures[feature.name].onChange.removeListener(\n feature.listener);\n feature.listener = null;\n });\n observerTestState.toBeDisabled.forEach(function(feature) {\n chrome.accessibilityFeatures[feature.name].onChange.removeListener(\n feature.listener);\n feature.listener = null;\n });\n }", "removeEventListeners() {\r\n this.elementListener.removeEventListener(\"mouseenter\", this.onMouseEnterBind);\r\n this.elementListener.removeEventListener(\"mouseleave\", this.onMouseLeaveBind);\r\n this.elementListener.removeEventListener(\"mousemove\", this.onMouseMoveBind);\r\n \r\n if (this.gyroscope) {\r\n window.removeEventListener(\"deviceorientation\", this.onDeviceOrientationBind);\r\n }\r\n \r\n if (this.glare || this.fullPageListening) {\r\n window.removeEventListener(\"resize\", this.onWindowResizeBind);\r\n }\r\n }", "function removeButtonListeners() {\n if (buttons.fw) {\n buttons.fw.removeEventListener('click', handleForwardButtonClick);\n }\n if (buttons.bk) {\n buttons.bk.removeEventListener('click', handleBackwardButtonClick);\n }\n }", "__removeBroadcastEventListeners() {\n let bindEvents = this._bindBroadcastEvents;\n /* istanbul ignore next */\n if (!bindEvents) {\n return;\n }\n\n bindEvents.forEach(item => eventCenter.off(item[0], item[1]));\n this._bindBroadcastEvents = [];\n }", "_removeEventListeners() {\n this.el.removeEventListener('click', this._onClickBound);\n this.el.removeEventListener('keydown', this._onKeydownBound);\n }", "function removeListeners() {\n $(\"#controls\").off(\"click\");\n $(\"#sequence\").off(\"click\");\n}", "detachHandlers() {\n this.templateNext.removeEventListener('click', this.handleNext);\n this.templatePrev.removeEventListener('click', this.handlePrev);\n window.removeEventListener('keydown', this.handleKeyDown);\n window.removeEventListener('resize', this.handleResize)\n }", "function removeEventListeners() {\n\n eventsAreBound = false;\n\n document.removeEventListener('keydown', onDocumentKeyDown, false);\n window.removeEventListener('hashchange', onWindowHashChange, false);\n window.removeEventListener('resize', onWindowResize, false);\n\n dom.wrapper.removeEventListener('touchstart', onTouchStart, false);\n dom.wrapper.removeEventListener('touchmove', onTouchMove, false);\n dom.wrapper.removeEventListener('touchend', onTouchEnd, false);\n\n if (window.navigator.msPointerEnabled) {\n dom.wrapper.removeEventListener('MSPointerDown', onPointerDown, false);\n dom.wrapper.removeEventListener('MSPointerMove', onPointerMove, false);\n dom.wrapper.removeEventListener('MSPointerUp', onPointerUp, false);\n }\n\n if (config.progress && dom.progress) {\n dom.progress.removeEventListener('click', onProgressClicked, false);\n }\n\n if (config.controls && dom.controls) {\n ['touchstart', 'click'].forEach(function (eventName) {\n dom.controlsLeft.forEach(function (el) {\n el.removeEventListener(eventName, onNavigateLeftClicked, false);\n });\n dom.controlsRight.forEach(function (el) {\n el.removeEventListener(eventName, onNavigateRightClicked, false);\n });\n dom.controlsUp.forEach(function (el) {\n el.removeEventListener(eventName, onNavigateUpClicked, false);\n });\n dom.controlsDown.forEach(function (el) {\n el.removeEventListener(eventName, onNavigateDownClicked, false);\n });\n dom.controlsPrev.forEach(function (el) {\n el.removeEventListener(eventName, onNavigatePrevClicked, false);\n });\n dom.controlsNext.forEach(function (el) {\n el.removeEventListener(eventName, onNavigateNextClicked, false);\n });\n });\n }\n\n }", "destroy () {\n this.eventListeners = null;\n }", "_removeEventListeners() {\n window.removeEventListener('deviceorientation', this._onOrientationFound);\n\n this._map\n .off('locationfound', this._onLocationFound, this)\n .off('locationerror', this._onLocationError, this)\n .off('dragstart', this._onDragStart, this)\n .off('moveend', this._onMoveEnd, this);\n }", "function removeListeners() {\r\n modal.yes.removeEventListener(\"click\", backToMenu);\r\n modal.no.removeEventListener(\"click\", backToGame);\r\n }", "function removeRedandYellowListeners(){\n\t\tfor (var i = $boxes.length -1; i>=0;i--){\n\t\t\tvar $box = $($boxes[i]);\n\t\t\t$box.off('click', addRedorYellow);\n\t\t}\n\t}", "_removeEventListeners() {\n\n this.el.removeEventListener('click', this._onClickBound);\n window.removeEventListener('scroll', this._onScrollBound);\n window.removeEventListener('orientationchange', this._onScrollBound);\n document.removeEventListener('spark.visible-children', this._onVisibleBound, true);\n\n if (canObserve)\n this._removeMutationObserver();\n else\n window.removeEventListener('resize', this._onResizeBound);\n }", "removeEventListeners() {\n // Empty in base class.\n }", "removeDragListeners() {}", "removeDragListeners() {}", "destroy() {\n if (Object.values(this.events).length) {\n for (let event in this.events) {\n window.removeEventListener(event.name, event.fn);\n }\n }\n }", "detachAllEvents() {\n this.handledEvents.forEach((value, key) => {\n this.offEvent(key, value.target, value.options);\n });\n }", "unsubscribeEventListeners () {\n // Remove Aurelia event listeners\n this.subscriptions.forEach((subscription) => {\n subscription.dispose();\n });\n this.subscriptions = undefined;\n\n // Remove basic JS event listeners.\n if (this.canvas) {\n this.canvas.removeEventListener(\n 'contextmenu', this.canvasContextMenuHandler\n );\n this.canvas.removeEventListener('mousedown', this.canvasMouseDownHandler);\n this.canvas.removeEventListener('mouseleave', this.canvasMouseUpHandler);\n this.canvas.removeEventListener('mousemove', this.canvasMouseMoveHandler);\n this.canvas.removeEventListener('mouseup', this.canvasMouseUpHandler);\n this.canvas.removeEventListener('mousewheel', this.canvasMouseWheelHandler);\n }\n }", "_cleanToRemovedListeners() {\n const toRemovedListeners = this._toRemovedListeners;\n\n for (let i = 0; i < toRemovedListeners.length; ++i) {\n const selListener = toRemovedListeners[i];\n\n const listeners = this._listenersMap[selListener._getListenerID()];\n\n if (!listeners) {\n continue;\n }\n\n const fixedPriorityListeners = listeners.getFixedPriorityListeners();\n const sceneGraphPriorityListeners = listeners.getSceneGraphPriorityListeners();\n\n if (sceneGraphPriorityListeners) {\n const idx = sceneGraphPriorityListeners.indexOf(selListener);\n\n if (idx !== -1) {\n sceneGraphPriorityListeners.splice(idx, 1);\n }\n }\n\n if (fixedPriorityListeners) {\n const idx = fixedPriorityListeners.indexOf(selListener);\n\n if (idx !== -1) {\n fixedPriorityListeners.splice(idx, 1);\n }\n }\n }\n\n toRemovedListeners.length = 0;\n }", "clearListeners(clearPersistent) {\n if (this._listeners) {\n this._listeners.forEach(e => {\n if (clearPersistent || !e.persistent) {\n GOOGLE_MAP_API.event.removeListener(e.listener);\n e.listener = null;\n }\n });\n this._listeners = this._listeners.filter(e => {\n return e.listener != null;\n });\n }\n }", "removeAllEvents() {\n this.destroy();\n }", "_removeEventListeners () {\n this._socket.removeAllListeners(ConnectionSocket.EVENT_ESTABLISHED)\n this._socket.removeAllListeners(ConnectionSocket.EVENT_CLOSED)\n this._socket.removeAllListeners(ConnectionSocket.EVENT_PEER_CONNECTED)\n this._socket.removeAllListeners(ConnectionSocket.EVENT_PEER_PING)\n this._socket.removeAllListeners(ConnectionSocket.EVENT_PEER_SIGNAL)\n this._rtc.removeAllListeners(ConnectionRTC.EVENT_RTC_SIGNAL)\n this._rtc.removeAllListeners(ConnectionRTC.EVENT_PEER_PING)\n this._rtc.removeAllListeners(ConnectionRTC.EVENT_CLOSED)\n }", "function removeListeners() {\n window.removeEventListener('message', _onParentMessage);\n}", "function _removeEventListeners(target) {\n\t for (var i in this._eventOutput.listeners) {\n\t target.removeEventListener(i, this.eventForwarder);\n\t }\n\t }", "function dettachEvents() {\n // Remove custom events from the window\n window.removeEventListener(\"touch\", handleInteruption, false);\n window.removeEventListener(\"mousewheel\", handleInteruption, false);\n window.removeEventListener(\"mousedown\", handleInteruption, false);\n}", "cleanup() {\n const { ws, udp } = this.sockets;\n\n if (ws) {\n ws.removeAllListeners('error');\n ws.removeAllListeners('ready');\n ws.removeAllListeners('sessionDescription');\n ws.removeAllListeners('speaking');\n }\n\n if (udp) udp.removeAllListeners('error');\n\n this.sockets.ws = null;\n this.sockets.udp = null;\n }", "removeEventListeners(){\n\t\tif(!this.document) {\n\t\t\treturn;\n\t\t}\n\t\tDOM_EVENTS.forEach(function(eventName){\n\t\t\tthis.document.removeEventListener(eventName, this._triggerEvent, { passive: true });\n\t\t}, this);\n\t\tthis._triggerEvent = undefined;\n\t}", "cleanEchoListeners() {\n this.echoListeners.forEach(element => {\n window.Echo.private(\n element.channel\n ).stopListening(element.event);\n });\n }", "destroy() {\n this.listeners = null;\n }", "function unRegisterEventHandlers() {\n\tlet event_keys = Object.keys(registered_event_handlers);\n\tevent_keys.forEach(function(key) {\n\t\tlet event_obj = registered_event_handlers[key];\n\t\tif (typeof event_obj.id !== \"undefined\") {\n\t\t\t$(event_obj.dom_node).off(event_obj.event,\"#\"+event_obj.id);\n\t\t} else if (typeof event_obj.class !== \"undefined\") {\n\t\t\t$(event_obj.dom_node).off(event_obj.event,\".\"+event_obj.class);\n\t\t} else {\n\t\t\t$(event_obj.dom_node).off(event_obj.event);\n\t\t}\n\t});\n\tregistered_event_handlers = [];\n}", "removeFinWindowEventListeners() {\n finsembleWindow.removeEventListener(\"maximized\", this.onWindowMaximized);\n finsembleWindow.removeEventListener(\"restored\", this.onWindowRestored);\n finsembleWindow.removeEventListener(\"blurred\", this.onWindowBlurred);\n finsembleWindow.removeEventListener(\"focused\", this.onWindowFocused);\n finsembleWindow.removeEventListener(\"close-requested\", this.close);\n finsembleWindow.removeEventListener(\"minimized\", this.onWindowMinimized);\n }", "__detatchListeners() {\n if (qx.bom.History.SUPPORTS_HASH_CHANGE_EVENT) {\n qx.bom.Event.removeNativeListener(\n window,\n \"hashchange\",\n this.__checkOnHashChange\n );\n } else {\n qx.event.Idle.getInstance().removeListener(\n \"interval\",\n this.__onHashChange,\n this\n );\n }\n }", "function _removeEventListeners(target) {\n for (var i in this._eventOutput.listeners) {\n target.removeEventListener(i, this.eventForwarder);\n }\n }", "detach() {\n for (const container of this.containers) {\n container.removeEventListener('webkitmouseforcewillbegin', this[onMouseForceWillBegin], false);\n container.removeEventListener('webkitmouseforcedown', this[onMouseForceDown], false);\n container.removeEventListener('mousedown', this[onMouseDown], true);\n container.removeEventListener('webkitmouseforcechanged', this[onMouseForceChange], false);\n }\n\n document.removeEventListener('mousemove', this[onMouseMove]);\n document.removeEventListener('mouseup', this[onMouseUp]);\n }", "function removeListeners() {\n for (var i = 0; i < cards.length; i++) {\n card = cards[i];\n card.removeEventListener(\"click\", revealCard);\n card.removeEventListener(\"click\", cardOpen);\n card.removeEventListener(\"click\", winner);\n card.classList.add(\"open\", \"disabled\", \"match\");\n }\n}", "function removePlayFunctions() {\n play.removeEventListener(\"click\", scrollDown);\n play.removeEventListener(\"click\", generatedGridRows);\n play.removeEventListener(\"click\", randomise);\n play.removeEventListener(\"click\", newGame);\n play.removeEventListener(\"click\", squareSize);\n play.removeEventListener(\"click\", checkerboard);\n play.removeEventListener(\"click\", addFlags);\n play.removeEventListener(\"click\", assignRelativePosition);\n play.removeEventListener(\"click\", assignHTML);\n play.removeEventListener(\"click\", bombIcon);\n play.removeEventListener(\"click\", flags);\n}", "_cleanToRemovedListeners() {\n const toRemovedListeners = this._toRemovedListeners;\n\n for (let i = 0; i < toRemovedListeners.length; ++i) {\n const selListener = toRemovedListeners[i];\n\n const listeners = this._listenersMap[selListener._getListenerID()];\n\n if (!listeners) {\n continue;\n }\n\n const fixedPriorityListeners = listeners.getFixedPriorityListeners();\n const sceneGraphPriorityListeners = listeners.getSceneGraphPriorityListeners();\n\n if (sceneGraphPriorityListeners) {\n const idx = sceneGraphPriorityListeners.indexOf(selListener);\n\n if (idx !== -1) {\n sceneGraphPriorityListeners.splice(idx, 1);\n }\n }\n\n if (fixedPriorityListeners) {\n const idx = fixedPriorityListeners.indexOf(selListener);\n\n if (idx !== -1) {\n fixedPriorityListeners.splice(idx, 1);\n }\n }\n }\n\n toRemovedListeners.length = 0;\n }", "function cleanupEvents() {\n if (eventRegistry) {\n for (var i = 0; i < eventRegistry.length; i++) {\n var evt = eventRegistry[i];\n removeEvent(evt.element, evt.type, evt.handler, evt.useCapture);\n }\n // unlink circular refrences so they can be GC'd\n eventRegistry = null;\n removeEvent(window, \"unload\", cleanupEvents, false);\n }\n}", "removeEvents() {\n }", "function clearEvents() {\n $._clearEvents();\n}", "unWireEvent() {\n this.viewerContainer.removeEventListener('scroll', this.scrollHandler);\n this.viewerContainer.removeEventListener('mousedown', this.onMouseDownInternal);\n this.viewerContainer.removeEventListener('mousemove', this.onMouseMoveInternal);\n if (!Browser.isDevice) {\n this.editableDiv.removeEventListener('keypress', this.onKeyPressInternal);\n if (Browser.info.name === 'chrome') {\n this.editableDiv.removeEventListener('textInput', this.onTextInput);\n }\n }\n else {\n this.editableDiv.removeEventListener('input', this.onTextInputInternal);\n }\n this.editableDiv.removeEventListener('paste', this.onPaste);\n this.viewerContainer.removeEventListener('contextmenu', this.onContextMenu);\n this.editableDiv.removeEventListener('blur', this.onFocusOut);\n this.editableDiv.removeEventListener('keydown', this.onKeyDownInternal);\n this.editableDiv.removeEventListener('compositionstart', this.compositionStart);\n this.editableDiv.removeEventListener('compositionupdate', this.compositionUpdated);\n this.editableDiv.removeEventListener('compositionend', this.compositionEnd);\n this.viewerContainer.removeEventListener('mouseup', this.onMouseUpInternal);\n if (!isNullOrUndefined(this.iframe)) {\n this.iframe.removeEventListener('load', this.onIframeLoad);\n }\n this.viewerContainer.removeEventListener('dblclick', this.onDoubleTap);\n window.removeEventListener('resize', this.onWindowResize);\n window.removeEventListener('keyup', this.onKeyUpInternal);\n window.removeEventListener('mouseup', this.onImageResizer);\n window.removeEventListener('touchend', this.onImageResizer);\n }", "detachListeners() {\n this.#outInterface.off('line', this.lineListener);\n this.#errInterface.off('line', this.errorListener);\n this.#child.off('exit', this.exitListener);\n this.#child.removeAllListeners('close');\n }", "function removeListeners() {\r\n gameOverModal.btn.removeEventListener(\"click\", backToMenu);\r\n }", "remove() {\n //remove handlers of any atomic data defined here\n const {source, handler} = this.events;\n source.remove();\n //reset `this.events` \n this.events = {};\n }", "remove() {\n //remove handlers of any atomic data defined here\n const {source, handler} = this.events;\n source.remove();\n //reset `this.events` \n this.events = {};\n }", "reset() {\n const {\n listeners\n } = this;\n const len = listeners.length;\n\n if (len > 0) {\n for (let i = 0; i < len; i += 1) {\n const set = listeners[i];\n const pos = ArrayIndexOf.call(listeners[i], this);\n ArraySplice.call(set, pos, 1);\n }\n\n listeners.length = 0;\n }\n }", "clearListeners(clearPersistent) {\n if (google) {\n if (this._listeners) {\n this._listeners.forEach((e) => {\n if (clearPersistent || !e.persistent) {\n google.maps.event.removeListener(e.listener);\n e.listener = null;\n }\n });\n this._listeners = this._listeners.filter((e) => {\n return e.listener != null;\n });\n }\n }\n }", "function unsubscribeAll() {\n uninstallGlobalHandler();\n handlers = [];\n }", "function unsubscribeAll() {\n uninstallGlobalHandler();\n handlers = [];\n }", "function unsubscribeAll() {\n uninstallGlobalHandler();\n handlers = [];\n }", "function _removeEventListeners(target) {\n for (var i in this.eventHandler.listeners) {\n target.removeEventListener(i, this.eventForwarder);\n }\n }", "reset() {\n const {\n listeners\n } = this;\n const len = listeners.length;\n\n if (len > 0) {\n for (let i = 0; i < len; i += 1) {\n const set = listeners[i];\n const pos = ArrayIndexOf$1.call(listeners[i], this);\n ArraySplice$1.call(set, pos, 1);\n }\n\n listeners.length = 0;\n }\n }", "destroy() {\n\t\tfor(const [event, listener] of this.listeners) this.client.removeListener(event, listener);\n\t\tthis.listeners.clear();\n\t}", "destroy() {\n this.removeDomListeners()\n // 238-4\n this.unsubscribers.forEach(unsub => unsub())\n }", "destroy() {\n this.removeDOMListeners();\n this.unsubscribers.forEach((unsub) => unsub());\n }", "unlisten() {\n [\"change\"].forEach(name => {\n this.el_.removeEventListener(name, this.handler_, false)\n })\n\n /* Final reset */\n this.reset()\n }" ]
[ "0.8520297", "0.8520297", "0.8520297", "0.84204197", "0.83039397", "0.8296358", "0.8280406", "0.8272935", "0.82701606", "0.8259448", "0.8132839", "0.8061034", "0.803117", "0.7982723", "0.7968647", "0.79614586", "0.78650445", "0.7853363", "0.7831602", "0.778603", "0.77451617", "0.77127165", "0.7661399", "0.7653717", "0.76156664", "0.7610313", "0.7603374", "0.7594608", "0.7589419", "0.7574084", "0.7574084", "0.7563489", "0.75426185", "0.75300306", "0.7529177", "0.7518088", "0.7501213", "0.74979556", "0.7479809", "0.74783146", "0.7458702", "0.7454", "0.741297", "0.73848444", "0.7375742", "0.7344771", "0.7331615", "0.73303294", "0.7294052", "0.72789514", "0.7271374", "0.7256707", "0.72546023", "0.7246795", "0.72414166", "0.723476", "0.7224689", "0.7219426", "0.7216513", "0.7216513", "0.72138625", "0.7213095", "0.71896863", "0.71720266", "0.71632576", "0.7157473", "0.71564144", "0.7153092", "0.7136541", "0.7134765", "0.71306396", "0.71224266", "0.7118115", "0.7116299", "0.71056145", "0.70929533", "0.70922637", "0.7080597", "0.70717984", "0.70656204", "0.70655566", "0.7062351", "0.7062083", "0.7061346", "0.70490086", "0.70451593", "0.70450145", "0.703738", "0.702346", "0.702346", "0.7023353", "0.70179576", "0.7014975", "0.7014975", "0.7014975", "0.7012946", "0.70043373", "0.6985979", "0.69765675", "0.6973575", "0.6970694" ]
0.0
-1
if it's past the high water mark, we can push in some more. Also, if we have no data yet, we can stand some more bytes. This is to work around cases where hwm=0, such as the repl. Also, if the push() triggered a readable event, and the user called read(largeNumber) such that needReadable was set, then we ought to push more, so that another 'readable' event will be triggered.
function needMoreData(state) { return !state.ended && (state.needReadable || state.length < state.highWaterMark || state.length === 0); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function push(){if(pushes>PUSHCOUNT)return;if(pushes++===PUSHCOUNT){console.error(\" push(EOF)\");return r.push(null)}console.error(\" push #%d\",pushes);r.push(new Buffer(PUSHSIZE))&&setTimeout(push)}", "tryPush() {\n\t\t// Get the total length of what would be pushed.\n\t\tconst amountToPush = Math.min(this.buffer.length, this.requestedSize);\n\n\t\t// Check if it's possible to push right now.\n\t\tif (this.canPush &&\n\t\t\tamountToPush > 0 &&\n\t\t\t(this.initialPass || this.finished || this.buffer.length >= this.initial)) {\n\t\t\tthis.initialPass = true;\n\n\t\t\t// Push the data.\n\t\t\tthis.requestedSize = -1;\n\t\t\tthis.canPush = this.push(Buffer.from(this.buffer.shift(amountToPush)));\n\t\t}\n\n\t\t// Append part of the waiting chunk if possible.\n\t\tif (this.waiting) {\n\t\t\tconst chunk = this.waiting.chunk;\n\t\t\tconst callback = this.waiting.callback;\n\n\t\t\t// Append the data to the buffer.\n\t\t\tconst toPush = Math.min(this.buffer.remaining, chunk.length);\n\t\t\tthis.buffer.push(chunk.slice(0, toPush));\n\n\t\t\t// Adjust the waiting chunk.\n\t\t\tthis.waiting.chunk = chunk.slice(toPush);\n\n\t\t\t// If the waiting chunk is gone, callback and reset.\n\t\t\tif (this.waiting.chunk.length == 0) {\n\t\t\t\tthis.waiting = null;\n\t\t\t\tcallback();\n\t\t\t}\n\n\t\t\t// Try pushing.\n\t\t\tif (toPush > 0) this.tryPush();\n\t\t}\n\t}", "function needMoreData(state){return!state.ended&&(state.needReadable||state.length<state.highWaterMark||state.length===0)}", "function needMoreData(state){return!state.ended&&(state.needReadable||state.length<state.highWaterMark||state.length===0);}// backwards compatibility.", "function needMoreData(state){return!state.ended&&(state.needReadable||state.length<state.highWaterMark||state.length===0);}", "function needMoreData(state){return!state.ended&&(state.needReadable||state.length<state.highWaterMark||state.length===0);}", "function needMoreData(state) {\n return !state.ended && (state.needReadable || state.length < state.highWaterMark || state.length === 0);\n }", "function needMoreData(state) {\n return !state.ended && (state.needReadable || state.length < state.highWaterMark || state.length === 0);\n }", "function needMoreData(state) {\n return !state.ended && (state.needReadable || state.length < state.highWaterMark || state.length === 0);\n }", "function needMoreData(state) {\n\t return !state.ended && (state.needReadable || state.length < state.highWaterMark || state.length === 0);\n\t}", "function needMoreData(state) {\n\t return !state.ended && (state.needReadable || state.length < state.highWaterMark || state.length === 0);\n\t}", "function needMoreData(state) {\n\t return !state.ended && (state.needReadable || state.length < state.highWaterMark || state.length === 0);\n\t}", "function needMoreData(state) {\n\t return !state.ended && (state.needReadable || state.length < state.highWaterMark || state.length === 0);\n\t}", "function needMoreData(state) {\n\t return !state.ended && (state.needReadable || state.length < state.highWaterMark || state.length === 0);\n\t}", "function needMoreData(state) {\n\t return !state.ended && (state.needReadable || state.length < state.highWaterMark || state.length === 0);\n\t}", "function needMoreData(state) {\n\t return !state.ended && (state.needReadable || state.length < state.highWaterMark || state.length === 0);\n\t}", "function needMoreData(state) {\n\t return !state.ended && (state.needReadable || state.length < state.highWaterMark || state.length === 0);\n\t}", "function needMoreData(state) {\n\t return !state.ended && (state.needReadable || state.length < state.highWaterMark || state.length === 0);\n\t}", "function needMoreData(state) {\n\t return !state.ended && (state.needReadable || state.length < state.highWaterMark || state.length === 0);\n\t}", "function needMoreData(state) {\n\t return !state.ended && (state.needReadable || state.length < state.highWaterMark || state.length === 0);\n\t}", "function needMoreData(state) {\n\t return !state.ended && (state.needReadable || state.length < state.highWaterMark || state.length === 0);\n\t}", "function needMoreData(state) {\n\t return !state.ended && (state.needReadable || state.length < state.highWaterMark || state.length === 0);\n\t}", "function needMoreData(state) {\n\t return !state.ended && (state.needReadable || state.length < state.highWaterMark || state.length === 0);\n\t}", "function needMoreData(state) {\n\t return !state.ended && (state.needReadable || state.length < state.highWaterMark || state.length === 0);\n\t}", "function needMoreData(state) {\n\t return !state.ended && (state.needReadable || state.length < state.highWaterMark || state.length === 0);\n\t}", "function needMoreData(state) {\n\t return !state.ended && (state.needReadable || state.length < state.highWaterMark || state.length === 0);\n\t}", "function needMoreData(state) {\n\t return !state.ended && (state.needReadable || state.length < state.highWaterMark || state.length === 0);\n\t}", "function needMoreData(state) {\n\t return !state.ended && (state.needReadable || state.length < state.highWaterMark || state.length === 0);\n\t}", "function needMoreData(state) {\n\t return !state.ended && (state.needReadable || state.length < state.highWaterMark || state.length === 0);\n\t}", "function needMoreData(state) {\n\t return !state.ended && (state.needReadable || state.length < state.highWaterMark || state.length === 0);\n\t}", "function needMoreData(state) {\n return (\n !state.ended &&\n (state.needReadable ||\n state.length < state.highWaterMark ||\n state.length === 0)\n );\n }", "function needMoreData(state) {\n return !state.ended &&\n (state.needReadable ||\n state.length < state.highWaterMark ||\n state.length === 0);\n }", "function needMoreData(state) {\n return !state.ended &&\n (state.needReadable ||\n state.length < state.highWaterMark ||\n state.length === 0);\n }", "function needMoreData$2(state) {\n\t return !state.ended && (state.needReadable || state.length < state.highWaterMark || state.length === 0);\n\t}", "function needMoreData$1(state) {\n\t return !state.ended && (state.needReadable || state.length < state.highWaterMark || state.length === 0);\n\t}", "function needMoreData(state) {\r\n return !state.ended &&\r\n (state.needReadable ||\r\n state.length < state.highWaterMark ||\r\n state.length === 0);\r\n}", "unshiftUnreadOverflow() {\n\t\t\tconst {reader, writer} = this.state;\n\t\t\tconst leftover = reader.getReadableSize();\n\n\t\t\tif (leftover > 0 && reader.readOffset < writer.writeOffset) {\n\t\t\t\tconst bytes = writer.bytes.slice(reader.readOffset, writer.writeOffset);\n\t\t\t\tthis.overflow.unshift(bytes);\n\t\t\t}\n\t\t}", "function needMoreData(state) {\n return !state.ended && (state.needReadable || state.length < state.highWaterMark || state.length === 0);\n}", "function needMoreData(state) {\n return !state.ended && (state.needReadable || state.length < state.highWaterMark || state.length === 0);\n}", "function needMoreData(state) {\n return !state.ended && (state.needReadable || state.length < state.highWaterMark || state.length === 0);\n}", "function needMoreData(state) {\n return !state.ended && (state.needReadable || state.length < state.highWaterMark || state.length === 0);\n}", "function needMoreData(state) {\n return !state.ended && (state.needReadable || state.length < state.highWaterMark || state.length === 0);\n}", "function needMoreData(state) {\n return !state.ended && (state.needReadable || state.length < state.highWaterMark || state.length === 0);\n}", "function needMoreData(state) {\n return !state.ended && (state.needReadable || state.length < state.highWaterMark || state.length === 0);\n}", "function needMoreData(state) {\n return !state.ended && (state.needReadable || state.length < state.highWaterMark || state.length === 0);\n}", "function needMoreData(state) {\n return !state.ended && (state.needReadable || state.length < state.highWaterMark || state.length === 0);\n}", "function needMoreData(state) {\n return !state.ended && (state.needReadable || state.length < state.highWaterMark || state.length === 0);\n}", "function needMoreData(state) {\n return !state.ended && (state.needReadable || state.length < state.highWaterMark || state.length === 0);\n}", "function needMoreData(state) {\n return !state.ended && (state.needReadable || state.length < state.highWaterMark || state.length === 0);\n}", "function needMoreData(state) {\n return !state.ended && (state.needReadable || state.length < state.highWaterMark || state.length === 0);\n}", "function needMoreData(state) {\n return !state.ended && (state.needReadable || state.length < state.highWaterMark || state.length === 0);\n}", "function needMoreData(state) {\n return !state.ended && (state.needReadable || state.length < state.highWaterMark || state.length === 0);\n}", "function needMoreData(state) {\n return !state.ended && (state.needReadable || state.length < state.highWaterMark || state.length === 0);\n}", "function needMoreData(state) {\n return !state.ended && (state.needReadable || state.length < state.highWaterMark || state.length === 0);\n}", "function needMoreData(state) {\n return !state.ended && (state.needReadable || state.length < state.highWaterMark || state.length === 0);\n}", "function needMoreData(state) {\n return !state.ended && (state.needReadable || state.length < state.highWaterMark || state.length === 0);\n}", "function needMoreData(state) {\n return !state.ended && (state.needReadable || state.length < state.highWaterMark || state.length === 0);\n}", "function needMoreData(state) {\n return !state.ended && (state.needReadable || state.length < state.highWaterMark || state.length === 0);\n}", "function needMoreData(state) {\n return !state.ended && (state.needReadable || state.length < state.highWaterMark || state.length === 0);\n}", "function needMoreData(state) {\n return !state.ended && (state.needReadable || state.length < state.highWaterMark || state.length === 0);\n}", "function needMoreData(state) {\n return !state.ended && (state.needReadable || state.length < state.highWaterMark || state.length === 0);\n}", "function needMoreData(state) {\n return !state.ended && (state.needReadable || state.length < state.highWaterMark || state.length === 0);\n}", "function needMoreData(state) {\n return !state.ended && (state.needReadable || state.length < state.highWaterMark || state.length === 0);\n}", "function needMoreData(state) {\n return !state.ended && (state.needReadable || state.length < state.highWaterMark || state.length === 0);\n}", "function needMoreData(state) {\n return !state.ended && (state.needReadable || state.length < state.highWaterMark || state.length === 0);\n}", "function needMoreData(state) {\n return !state.ended && (state.needReadable || state.length < state.highWaterMark || state.length === 0);\n}", "function needMoreData(state) {\n return !state.ended && (state.needReadable || state.length < state.highWaterMark || state.length === 0);\n}", "function needMoreData(state) {\n return !state.ended && (state.needReadable || state.length < state.highWaterMark || state.length === 0);\n}", "function needMoreData(state) {\n return !state.ended && (state.needReadable || state.length < state.highWaterMark || state.length === 0);\n}", "function needMoreData(state) {\n return !state.ended && (state.needReadable || state.length < state.highWaterMark || state.length === 0);\n}", "function needMoreData(state) {\n return !state.ended && (state.needReadable || state.length < state.highWaterMark || state.length === 0);\n}", "function needMoreData(state) {\n return !state.ended && (state.needReadable || state.length < state.highWaterMark || state.length === 0);\n}", "function needMoreData(state) {\n return !state.ended && (state.needReadable || state.length < state.highWaterMark || state.length === 0);\n}", "function needMoreData(state) {\n return !state.ended && (state.needReadable || state.length < state.highWaterMark || state.length === 0);\n}", "function needMoreData(state) {\n return !state.ended && (state.needReadable || state.length < state.highWaterMark || state.length === 0);\n}", "function needMoreData(state) {\n return !state.ended && (state.needReadable || state.length < state.highWaterMark || state.length === 0);\n}", "function needMoreData(state) {\n return !state.ended && (state.needReadable || state.length < state.highWaterMark || state.length === 0);\n}", "function needMoreData(state) {\n return !state.ended && (state.needReadable || state.length < state.highWaterMark || state.length === 0);\n}", "function needMoreData(state) {\n return !state.ended && (state.needReadable || state.length < state.highWaterMark || state.length === 0);\n}", "function needMoreData(state) {\n return !state.ended && (state.needReadable || state.length < state.highWaterMark || state.length === 0);\n}", "function needMoreData(state) {\n return !state.ended && (state.needReadable || state.length < state.highWaterMark || state.length === 0);\n}", "function needMoreData(state) {\n return !state.ended && (state.needReadable || state.length < state.highWaterMark || state.length === 0);\n}", "function needMoreData(state) {\n return !state.ended && (state.needReadable || state.length < state.highWaterMark || state.length === 0);\n}", "function needMoreData(state) {\n return !state.ended && (state.needReadable || state.length < state.highWaterMark || state.length === 0);\n}" ]
[ "0.6566224", "0.6406297", "0.6394233", "0.6382326", "0.63522935", "0.63522935", "0.6243789", "0.6214812", "0.61722803", "0.6166624", "0.6166624", "0.6166624", "0.6166624", "0.6166624", "0.6166624", "0.6166624", "0.6166624", "0.6166624", "0.6166624", "0.6166624", "0.6166624", "0.6166624", "0.6166624", "0.6166624", "0.6166624", "0.6166624", "0.6166624", "0.6166624", "0.6166624", "0.6166624", "0.61655426", "0.61256254", "0.61256254", "0.6102963", "0.6097105", "0.6062845", "0.6037778", "0.60374206", "0.60374206", "0.60374206", "0.60374206", "0.60374206", "0.60374206", "0.60374206", "0.60374206", "0.60374206", "0.60374206", "0.60374206", "0.60374206", "0.60374206", "0.60374206", "0.60374206", "0.60374206", "0.60374206", "0.60374206", "0.60374206", "0.60374206", "0.60374206", "0.60374206", "0.60374206", "0.60374206", "0.60374206", "0.60374206", "0.60374206", "0.60374206", "0.60374206", "0.60374206", "0.60374206", "0.60374206", "0.60374206", "0.60374206", "0.60374206", "0.60374206", "0.60374206", "0.60374206", "0.60374206", "0.60374206", "0.60374206", "0.60374206", "0.60374206", "0.60374206", "0.60374206", "0.60374206", "0.60374206" ]
0.6114479
47
Don't emit readable right away in sync mode, because this can trigger another read() call => stack overflow. This way, it might trigger a nextTick recursion warning, but that's not so bad.
function emitReadable(stream) { var state = stream._readableState; state.needReadable = false; if (!state.emittedReadable) { debug('emitReadable', state.flowing); state.emittedReadable = true; if (state.sync) process.nextTick(function() { emitReadable_(stream); }); else emitReadable_(stream); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function emitReadable(stream){var state=stream._readableState;state.needReadable=false;if(!state.emittedReadable){debug(\"emitReadable\",state.flowing);state.emittedReadable=true;if(state.sync)processNextTick(emitReadable_,stream);else emitReadable_(stream)}}", "function emitReadable(stream){var state=stream._readableState;state.needReadable=false;if(!state.emittedReadable){debug('emitReadable',state.flowing);state.emittedReadable=true;if(state.sync)processNextTick(emitReadable_,stream);else emitReadable_(stream);}}", "function emitReadable(stream){var state=stream._readableState;state.needReadable=false;if(!state.emittedReadable){debug('emitReadable',state.flowing);state.emittedReadable=true;if(state.sync)processNextTick(emitReadable_,stream);else emitReadable_(stream);}}", "function emitReadable(stream){var state=stream._readableState;state.needReadable=false;if(!state.emittedReadable){debug('emitReadable',state.flowing);state.emittedReadable=true;if(state.sync)pna.nextTick(emitReadable_,stream);else emitReadable_(stream);}}", "function emitReadable(stream){var state=stream._readableState;debug('emitReadable',state.needReadable,state.emittedReadable);state.needReadable=false;if(!state.emittedReadable){debug('emitReadable',state.flowing);state.emittedReadable=true;process.nextTick(emitReadable_,stream);}}", "function emitReadable$1(stream) {\n var state = stream._readableState;\n state.needReadable = false;\n if (!state.emittedReadable) {\n debug$1('emitReadable', state.flowing);\n state.emittedReadable = true;\n if (state.sync) nextTick(emitReadable_$1, stream);else emitReadable_$1(stream);\n }\n}", "function emitReadable(stream) {\n\t var state = stream._readableState;\n\t state.needReadable = false;\n\t if (state.emittedReadable)\n\t return;\n\t\n\t state.emittedReadable = true;\n\t if (state.sync)\n\t process.nextTick(function() {\n\t emitReadable_(stream);\n\t });\n\t else\n\t emitReadable_(stream);\n\t}", "function emitReadable$2(stream) {\n\t var state = stream._readableState;\n\t state.needReadable = false;\n\t if (!state.emittedReadable) {\n\t debug$2('emitReadable', state.flowing);\n\t state.emittedReadable = true;\n\t if (state.sync) processNextickArgs.nextTick(emitReadable_$2, stream);else emitReadable_$2(stream);\n\t }\n\t}", "function emitReadable(stream) {\n\t var state = stream._readableState;\n\t state.needReadable = false;\n\t if (state.emittedReadable)\n\t return;\n\n\t state.emittedReadable = true;\n\t if (state.sync)\n\t process.nextTick(function() {\n\t emitReadable_(stream);\n\t });\n\t else\n\t emitReadable_(stream);\n\t}", "function emitReadable(stream) {\n var state = stream._readableState;\n state.needReadable = false;\n if (state.emittedReadable)\n return;\n\n state.emittedReadable = true;\n if (state.sync)\n process.nextTick(function() {\n emitReadable_(stream);\n });\n else\n emitReadable_(stream);\n}", "function emitReadable(stream) {\n var state = stream._readableState;\n state.needReadable = false;\n if (state.emittedReadable)\n return;\n\n state.emittedReadable = true;\n if (state.sync)\n process.nextTick(function() {\n emitReadable_(stream);\n });\n else\n emitReadable_(stream);\n}", "function emitReadable(stream) {\n var state = stream._readableState;\n state.needReadable = false;\n if (state.emittedReadable)\n return;\n\n state.emittedReadable = true;\n if (state.sync)\n process.nextTick(function() {\n emitReadable_(stream);\n });\n else\n emitReadable_(stream);\n}", "function emitReadable(stream) {\n var state = stream._readableState;\n state.needReadable = false;\n if (state.emittedReadable)\n return;\n\n state.emittedReadable = true;\n if (state.sync)\n process.nextTick(function() {\n emitReadable_(stream);\n });\n else\n emitReadable_(stream);\n}", "function emitReadable(stream) {\n var state = stream._readableState;\n state.needReadable = false;\n if (state.emittedReadable)\n return;\n\n state.emittedReadable = true;\n if (state.sync)\n process.nextTick(function() {\n emitReadable_(stream);\n });\n else\n emitReadable_(stream);\n}", "function emitReadable(stream) {\n var state = stream._readableState;\n state.needReadable = false;\n if (state.emittedReadable)\n return;\n\n state.emittedReadable = true;\n if (state.sync)\n process.nextTick(function() {\n emitReadable_(stream);\n });\n else\n emitReadable_(stream);\n}", "function emitReadable(stream) {\n var state = stream._readableState;\n state.needReadable = false;\n if (state.emittedReadable)\n return;\n\n state.emittedReadable = true;\n if (state.sync)\n process.nextTick(function() {\n emitReadable_(stream);\n });\n else\n emitReadable_(stream);\n}", "function emitReadable(stream) {\n var state = stream._readableState;\n state.needReadable = false;\n if (state.emittedReadable)\n return;\n\n state.emittedReadable = true;\n if (state.sync)\n process.nextTick(function() {\n emitReadable_(stream);\n });\n else\n emitReadable_(stream);\n}", "function emitReadable(stream) {\n var state = stream._readableState;\n state.needReadable = false;\n if (state.emittedReadable)\n return;\n\n state.emittedReadable = true;\n if (state.sync)\n process.nextTick(function() {\n emitReadable_(stream);\n });\n else\n emitReadable_(stream);\n}", "function emitReadable(stream) {\n var state = stream._readableState;\n state.needReadable = false;\n if (state.emittedReadable)\n return;\n\n state.emittedReadable = true;\n if (state.sync)\n process.nextTick(function() {\n emitReadable_(stream);\n });\n else\n emitReadable_(stream);\n}", "function emitReadable(stream) {\n var state = stream._readableState;\n state.needReadable = false;\n if (state.emittedReadable)\n return;\n\n state.emittedReadable = true;\n if (state.sync)\n process.nextTick(function() {\n emitReadable_(stream);\n });\n else\n emitReadable_(stream);\n}", "function emitReadable(stream) {\n var state = stream._readableState;\n state.needReadable = false;\n if (state.emittedReadable)\n return;\n\n state.emittedReadable = true;\n if (state.sync)\n process.nextTick(function() {\n emitReadable_(stream);\n });\n else\n emitReadable_(stream);\n}", "function emitReadable(stream) {\n var state = stream._readableState;\n state.needReadable = false;\n if (state.emittedReadable)\n return;\n\n state.emittedReadable = true;\n if (state.sync)\n process.nextTick(function() {\n emitReadable_(stream);\n });\n else\n emitReadable_(stream);\n}", "function emitReadable(stream) {\n var state = stream._readableState;\n state.needReadable = false;\n if (state.emittedReadable)\n return;\n\n state.emittedReadable = true;\n if (state.sync)\n process.nextTick(function() {\n emitReadable_(stream);\n });\n else\n emitReadable_(stream);\n}", "function emitReadable(stream) {\n var state = stream._readableState;\n state.needReadable = false;\n if (state.emittedReadable)\n return;\n\n state.emittedReadable = true;\n if (state.sync)\n process.nextTick(function() {\n emitReadable_(stream);\n });\n else\n emitReadable_(stream);\n}", "function emitReadable(stream) {\n var state = stream._readableState;\n state.needReadable = false;\n if (state.emittedReadable)\n return;\n\n state.emittedReadable = true;\n if (state.sync)\n process.nextTick(function() {\n emitReadable_(stream);\n });\n else\n emitReadable_(stream);\n}", "function emitReadable(stream) {\n var state = stream._readableState;\n state.needReadable = false;\n if (state.emittedReadable)\n return;\n\n state.emittedReadable = true;\n if (state.sync)\n process.nextTick(function() {\n emitReadable_(stream);\n });\n else\n emitReadable_(stream);\n}", "function emitReadable(stream) {\n var state = stream._readableState;\n state.needReadable = false;\n if (state.emittedReadable)\n return;\n\n state.emittedReadable = true;\n if (state.sync)\n process.nextTick(function() {\n emitReadable_(stream);\n });\n else\n emitReadable_(stream);\n}", "function emitReadable(stream) {\n var state = stream._readableState;\n state.needReadable = false;\n if (state.emittedReadable)\n return;\n\n state.emittedReadable = true;\n if (state.sync)\n process.nextTick(function() {\n emitReadable_(stream);\n });\n else\n emitReadable_(stream);\n}", "function emitReadable(stream) {\n var state = stream._readableState;\n state.needReadable = false;\n if (state.emittedReadable)\n return;\n\n state.emittedReadable = true;\n if (state.sync)\n process.nextTick(function() {\n emitReadable_(stream);\n });\n else\n emitReadable_(stream);\n}", "function emitReadable(stream) {\n var state = stream._readableState;\n state.needReadable = false;\n if (state.emittedReadable)\n return;\n\n state.emittedReadable = true;\n if (state.sync)\n process.nextTick(function() {\n emitReadable_(stream);\n });\n else\n emitReadable_(stream);\n}", "function emitReadable(stream) {\n var state = stream._readableState;\n state.needReadable = false;\n if (state.emittedReadable)\n return;\n\n state.emittedReadable = true;\n if (state.sync)\n process.nextTick(function() {\n emitReadable_(stream);\n });\n else\n emitReadable_(stream);\n}", "function emitReadable(stream) {\n var state = stream._readableState;\n state.needReadable = false;\n if (state.emittedReadable)\n return;\n\n state.emittedReadable = true;\n if (state.sync)\n process.nextTick(function() {\n emitReadable_(stream);\n });\n else\n emitReadable_(stream);\n}", "function emitReadable(stream) {\n var state = stream._readableState;\n state.needReadable = false;\n if (state.emittedReadable)\n return;\n\n state.emittedReadable = true;\n if (state.sync)\n process.nextTick(function() {\n emitReadable_(stream);\n });\n else\n emitReadable_(stream);\n}", "function emitReadable(stream) {\n var state = stream._readableState;\n state.needReadable = false;\n if (state.emittedReadable)\n return;\n\n state.emittedReadable = true;\n if (state.sync)\n process.nextTick(function() {\n emitReadable_(stream);\n });\n else\n emitReadable_(stream);\n}", "function emitReadable(stream) {\n var state = stream._readableState;\n state.needReadable = false;\n if (state.emittedReadable)\n return;\n\n state.emittedReadable = true;\n if (state.sync)\n process.nextTick(function() {\n emitReadable_(stream);\n });\n else\n emitReadable_(stream);\n}", "function emitReadable(stream) {\n var state = stream._readableState;\n state.needReadable = false;\n if (state.emittedReadable)\n return;\n\n state.emittedReadable = true;\n if (state.sync)\n process.nextTick(function() {\n emitReadable_(stream);\n });\n else\n emitReadable_(stream);\n}", "function emitReadable(stream) {\n var state = stream._readableState;\n state.needReadable = false;\n if (state.emittedReadable)\n return;\n\n state.emittedReadable = true;\n if (state.sync)\n process.nextTick(function() {\n emitReadable_(stream);\n });\n else\n emitReadable_(stream);\n}", "function emitReadable$1(stream) {\n\t var state = stream._readableState;\n\t debug$2('emitReadable', state.needReadable, state.emittedReadable);\n\t state.needReadable = false;\n\n\t if (!state.emittedReadable) {\n\t debug$2('emitReadable', state.flowing);\n\t state.emittedReadable = true;\n\t nextTick(emitReadable_$1, stream);\n\t }\n\t}", "function emitReadable(stream) {\n var state = stream._readableState;\n state.needReadable = false;\n if (state.emittedReadable) return;\n\n state.emittedReadable = true;\n if (state.sync) process.nextTick(function () {\n emitReadable_(stream);\n });else emitReadable_(stream);\n}", "function emitReadable(stream) {\n var state = stream._readableState;\n state.needReadable = false;\n if (state.emittedReadable)\n return;\n\n state.emittedReadable = true;\n if (state.sync)\n setImmediate(function() {\n emitReadable_(stream);\n });\n else\n emitReadable_(stream);\n}", "function emitReadable(stream) {\n var state = stream._readableState;\n state.needReadable = false;\n if (state.emittedReadable)\n return;\n\n state.emittedReadable = true;\n if (state.sync)\n setImmediate(function() {\n emitReadable_(stream);\n });\n else\n emitReadable_(stream);\n}", "function emitReadable(stream) {\n var state = stream._readableState;\n state.needReadable = false;\n if (state.emittedReadable)\n return;\n\n state.emittedReadable = true;\n if (state.sync)\n setImmediate(function() {\n emitReadable_(stream);\n });\n else\n emitReadable_(stream);\n}", "function emitReadable(stream) {\n var state = stream._readableState;\n state.needReadable = false;\n if (state.emittedReadable)\n return;\n\n state.emittedReadable = true;\n if (state.sync)\n setImmediate(function() {\n emitReadable_(stream);\n });\n else\n emitReadable_(stream);\n}", "function emitReadable(stream) {\n var state = stream._readableState;\n state.needReadable = false;\n if (state.emittedReadable)\n return;\n\n state.emittedReadable = true;\n if (state.sync)\n setImmediate(function() {\n emitReadable_(stream);\n });\n else\n emitReadable_(stream);\n}", "function emitReadable(stream) {\n var state = stream._readableState;\n state.needReadable = false;\n if (state.emittedReadable)\n return;\n\n state.emittedReadable = true;\n if (state.sync)\n setImmediate(function() {\n emitReadable_(stream);\n });\n else\n emitReadable_(stream);\n}", "function emitReadable(stream) {\n var state = stream._readableState;\n state.needReadable = false;\n if (state.emittedReadable)\n return;\n\n state.emittedReadable = true;\n if (state.sync)\n setImmediate(function() {\n emitReadable_(stream);\n });\n else\n emitReadable_(stream);\n}", "function emitReadable(stream) {\n var state = stream._readableState;\n state.needReadable = false;\n if (state.emittedReadable)\n return;\n\n state.emittedReadable = true;\n if (state.sync)\n timers.setImmediate(function() {\n emitReadable_(stream);\n });\n else\n emitReadable_(stream);\n}", "function emitReadable(stream) {\n var state = stream._readableState;\n state.needReadable = false;\n if (state.emittedReadable)\n return;\n\n state.emittedReadable = true;\n if (state.sync)\n timers.setImmediate(function() {\n emitReadable_(stream);\n });\n else\n emitReadable_(stream);\n}", "function emitReadable(stream) {\n var state = stream._readableState;\n state.needReadable = false;\n if (state.emittedReadable)\n return;\n\n state.emittedReadable = true;\n if (state.sync)\n timers.setImmediate(function() {\n emitReadable_(stream);\n });\n else\n emitReadable_(stream);\n}", "function emitReadable(stream) {\n var state = stream._readableState;\n state.needReadable = false;\n if (!state.emittedReadable) {\n debug('emitReadable', state.flowing);\n state.emittedReadable = true;\n if (state.sync)\n processNextTick(emitReadable_, stream);\n else\n emitReadable_(stream);\n }\n }", "function emitReadable(stream) {\n var state = stream._readableState;\n state.needReadable = false;\n if (!state.emittedReadable) {\n debug('emitReadable', state.flowing);\n state.emittedReadable = true;\n if (state.sync)\n processNextTick(emitReadable_, stream);\n else\n emitReadable_(stream);\n }\n }", "function emitReadable(stream) {\n\t var state = stream._readableState;\n\t state.needReadable = false;\n\t if (!state.emittedReadable) {\n\t debug('emitReadable', state.flowing);\n\t state.emittedReadable = true;\n\t if (state.sync)\n\t processNextTick(emitReadable_, stream);\n\t else\n\t emitReadable_(stream);\n\t }\n\t}", "function emitReadable(stream) {\n var state = stream._readableState;\n state.needReadable = false;\n if (!state.emittedReadable) {\n debug('emitReadable', state.flowing);\n state.emittedReadable = true;\n if (state.sync)\n processNextTick(emitReadable_, stream);\n else\n emitReadable_(stream);\n }\n}", "function emitReadable(stream) {\n var state = stream._readableState;\n state.needReadable = false;\n if (!state.emittedReadable) {\n debug('emitReadable', state.flowing);\n state.emittedReadable = true;\n if (state.sync)\n processNextTick(emitReadable_, stream);\n else\n emitReadable_(stream);\n }\n}", "function emitReadable(stream) {\n var state = stream._readableState;\n state.needReadable = false;\n if (!state.emittedReadable) {\n debug('emitReadable', state.flowing);\n state.emittedReadable = true;\n if (state.sync)\n processNextTick(emitReadable_, stream);\n else\n emitReadable_(stream);\n }\n}", "function emitReadable(stream) {\n var state = stream._readableState;\n state.needReadable = false;\n if (!state.emittedReadable) {\n debug('emitReadable', state.flowing);\n state.emittedReadable = true;\n if (state.sync)\n processNextTick(emitReadable_, stream);\n else\n emitReadable_(stream);\n }\n}", "function emitReadable(stream) {\n var state = stream._readableState;\n state.needReadable = false;\n if (!state.emittedReadable) {\n debug('emitReadable', state.flowing);\n state.emittedReadable = true;\n if (state.sync)\n processNextTick(emitReadable_, stream);\n else\n emitReadable_(stream);\n }\n}", "function emitReadable(stream) {\n var state = stream._readableState;\n state.needReadable = false;\n if (!state.emittedReadable) {\n debug('emitReadable', state.flowing);\n state.emittedReadable = true;\n if (state.sync)\n processNextTick(emitReadable_, stream);\n else\n emitReadable_(stream);\n }\n}", "function emitReadable(stream) {\n var state = stream._readableState;\n state.needReadable = false;\n if (!state.emittedReadable) {\n debug('emitReadable', state.flowing);\n state.emittedReadable = true;\n if (state.sync)\n processNextTick(emitReadable_, stream);\n else\n emitReadable_(stream);\n }\n}", "function emitReadable(stream) {\n var state = stream._readableState;\n state.needReadable = false;\n if (!state.emittedReadable) {\n debug('emitReadable', state.flowing);\n state.emittedReadable = true;\n if (state.sync)\n processNextTick(emitReadable_, stream);\n else\n emitReadable_(stream);\n }\n}", "function emitReadable(stream) {\n var state = stream._readableState;\n state.needReadable = false;\n if (!state.emittedReadable) {\n debug('emitReadable', state.flowing);\n state.emittedReadable = true;\n if (state.sync)\n processNextTick(emitReadable_, stream);\n else\n emitReadable_(stream);\n }\n}", "function emitReadable(stream) {\n var state = stream._readableState;\n state.needReadable = false;\n if (!state.emittedReadable) {\n debug('emitReadable', state.flowing);\n state.emittedReadable = true;\n if (state.sync)\n processNextTick(emitReadable_, stream);\n else\n emitReadable_(stream);\n }\n}", "function emitReadable(stream) {\n var state = stream._readableState;\n state.needReadable = false;\n if (!state.emittedReadable) {\n debug('emitReadable', state.flowing);\n state.emittedReadable = true;\n if (state.sync) nextTick(emitReadable_, stream);else emitReadable_(stream);\n }\n }", "function emitReadable(stream) {\n var state = stream._readableState;\n state.needReadable = false;\n if (!state.emittedReadable) {\n debug('emitReadable', state.flowing);\n state.emittedReadable = true;\n if (state.sync)\n processNextTick(emitReadable_, stream);\n else\n emitReadable_(stream);\n }\n }", "function emitReadable(stream) {\n var state = stream._readableState;\n state.needReadable = false;\n if (!state.emittedReadable) {\n debug('emitReadable', state.flowing);\n state.emittedReadable = true;\n if (state.sync) nextTick(emitReadable_, stream);else emitReadable_(stream);\n }\n}", "function emitReadable(stream) {\n var state = stream._readableState;\n state.needReadable = false;\n if (!state.emittedReadable) {\n debug('emitReadable', state.flowing);\n state.emittedReadable = true;\n if (state.sync) nextTick(emitReadable_, stream);else emitReadable_(stream);\n }\n}", "function emitReadable(stream) {\n var state = stream._readableState;\n state.needReadable = false;\n if (!state.emittedReadable) {\n debug('emitReadable', state.flowing);\n state.emittedReadable = true;\n if (state.sync) nextTick(emitReadable_, stream);else emitReadable_(stream);\n }\n}", "function emitReadable(stream) {\n\t var state = stream._readableState;\n\t state.needReadable = false;\n\t if (!state.emittedReadable) {\n\t debug('emitReadable', state.flowing);\n\t state.emittedReadable = true;\n\t if (state.sync) processNextTick(emitReadable_, stream);else emitReadable_(stream);\n\t }\n\t}", "function emitReadable(stream) {\n\t var state = stream._readableState;\n\t state.needReadable = false;\n\t if (!state.emittedReadable) {\n\t debug('emitReadable', state.flowing);\n\t state.emittedReadable = true;\n\t if (state.sync) processNextTick(emitReadable_, stream);else emitReadable_(stream);\n\t }\n\t}", "function emitReadable(stream) {\n\t var state = stream._readableState;\n\t state.needReadable = false;\n\t if (!state.emittedReadable) {\n\t debug('emitReadable', state.flowing);\n\t state.emittedReadable = true;\n\t if (state.sync) processNextTick(emitReadable_, stream);else emitReadable_(stream);\n\t }\n\t}", "function emitReadable(stream) {\n\t var state = stream._readableState;\n\t state.needReadable = false;\n\t if (!state.emittedReadable) {\n\t debug('emitReadable', state.flowing);\n\t state.emittedReadable = true;\n\t if (state.sync) processNextTick(emitReadable_, stream);else emitReadable_(stream);\n\t }\n\t}", "function emitReadable(stream) {\n\t var state = stream._readableState;\n\t state.needReadable = false;\n\t if (!state.emittedReadable) {\n\t debug('emitReadable', state.flowing);\n\t state.emittedReadable = true;\n\t if (state.sync) processNextTick(emitReadable_, stream);else emitReadable_(stream);\n\t }\n\t}", "function emitReadable(stream) {\n\t var state = stream._readableState;\n\t state.needReadable = false;\n\t if (!state.emittedReadable) {\n\t debug('emitReadable', state.flowing);\n\t state.emittedReadable = true;\n\t if (state.sync) processNextTick(emitReadable_, stream);else emitReadable_(stream);\n\t }\n\t}", "function emitReadable(stream) {\n\t var state = stream._readableState;\n\t state.needReadable = false;\n\t if (!state.emittedReadable) {\n\t debug('emitReadable', state.flowing);\n\t state.emittedReadable = true;\n\t if (state.sync) processNextTick(emitReadable_, stream);else emitReadable_(stream);\n\t }\n\t}", "function emitReadable(stream) {\n\t var state = stream._readableState;\n\t state.needReadable = false;\n\t if (!state.emittedReadable) {\n\t debug('emitReadable', state.flowing);\n\t state.emittedReadable = true;\n\t if (state.sync) processNextTick(emitReadable_, stream);else emitReadable_(stream);\n\t }\n\t}", "function emitReadable(stream) {\n\t var state = stream._readableState;\n\t state.needReadable = false;\n\t if (!state.emittedReadable) {\n\t debug('emitReadable', state.flowing);\n\t state.emittedReadable = true;\n\t if (state.sync) processNextTick(emitReadable_, stream);else emitReadable_(stream);\n\t }\n\t}", "function emitReadable(stream) {\n\t var state = stream._readableState;\n\t state.needReadable = false;\n\t if (!state.emittedReadable) {\n\t debug('emitReadable', state.flowing);\n\t state.emittedReadable = true;\n\t if (state.sync) processNextTick(emitReadable_, stream);else emitReadable_(stream);\n\t }\n\t}", "function emitReadable(stream) {\n\t var state = stream._readableState;\n\t state.needReadable = false;\n\t if (!state.emittedReadable) {\n\t debug('emitReadable', state.flowing);\n\t state.emittedReadable = true;\n\t if (state.sync) processNextTick(emitReadable_, stream);else emitReadable_(stream);\n\t }\n\t}", "function emitReadable(stream) {\n\t var state = stream._readableState;\n\t state.needReadable = false;\n\t if (!state.emittedReadable) {\n\t debug('emitReadable', state.flowing);\n\t state.emittedReadable = true;\n\t if (state.sync) processNextTick(emitReadable_, stream);else emitReadable_(stream);\n\t }\n\t}", "function emitReadable(stream) {\n var state = stream._readableState;\n state.needReadable = false;\n if (!state.emittedReadable) {\n debug('emitReadable', state.flowing);\n state.emittedReadable = true;\n if (state.sync) processNextTick(emitReadable_, stream);else emitReadable_(stream);\n }\n}", "function emitReadable(stream) {\n var state = stream._readableState;\n state.needReadable = false;\n if (!state.emittedReadable) {\n debug('emitReadable', state.flowing);\n state.emittedReadable = true;\n if (state.sync) processNextTick(emitReadable_, stream);else emitReadable_(stream);\n }\n}", "function emitReadable(stream) {\n var state = stream._readableState;\n state.needReadable = false;\n if (!state.emittedReadable) {\n debug('emitReadable', state.flowing);\n state.emittedReadable = true;\n if (state.sync) processNextTick(emitReadable_, stream);else emitReadable_(stream);\n }\n}", "function emitReadable(stream) {\n var state = stream._readableState;\n state.needReadable = false;\n if (!state.emittedReadable) {\n debug('emitReadable', state.flowing);\n state.emittedReadable = true;\n if (state.sync) processNextTick(emitReadable_, stream);else emitReadable_(stream);\n }\n}", "function emitReadable(stream) {\n var state = stream._readableState;\n state.needReadable = false;\n if (!state.emittedReadable) {\n debug('emitReadable', state.flowing);\n state.emittedReadable = true;\n if (state.sync) processNextTick(emitReadable_, stream);else emitReadable_(stream);\n }\n}", "function emitReadable(stream) {\n var state = stream._readableState;\n state.needReadable = false;\n if (!state.emittedReadable) {\n debug('emitReadable', state.flowing);\n state.emittedReadable = true;\n if (state.sync) processNextTick(emitReadable_, stream);else emitReadable_(stream);\n }\n}", "function emitReadable(stream) {\n var state = stream._readableState;\n state.needReadable = false;\n if (!state.emittedReadable) {\n debug('emitReadable', state.flowing);\n state.emittedReadable = true;\n if (state.sync) processNextTick(emitReadable_, stream);else emitReadable_(stream);\n }\n}", "function emitReadable(stream) {\n var state = stream._readableState;\n state.needReadable = false;\n if (!state.emittedReadable) {\n debug('emitReadable', state.flowing);\n state.emittedReadable = true;\n if (state.sync) processNextTick(emitReadable_, stream);else emitReadable_(stream);\n }\n}", "function emitReadable(stream) {\n var state = stream._readableState;\n state.needReadable = false;\n if (!state.emittedReadable) {\n debug('emitReadable', state.flowing);\n state.emittedReadable = true;\n if (state.sync) processNextTick(emitReadable_, stream);else emitReadable_(stream);\n }\n}", "function emitReadable(stream) {\n var state = stream._readableState;\n state.needReadable = false;\n if (!state.emittedReadable) {\n debug('emitReadable', state.flowing);\n state.emittedReadable = true;\n if (state.sync) processNextTick(emitReadable_, stream);else emitReadable_(stream);\n }\n}", "function emitReadable(stream) {\n var state = stream._readableState;\n state.needReadable = false;\n if (!state.emittedReadable) {\n debug('emitReadable', state.flowing);\n state.emittedReadable = true;\n if (state.sync) processNextTick(emitReadable_, stream);else emitReadable_(stream);\n }\n}", "function emitReadable(stream) {\n var state = stream._readableState;\n state.needReadable = false;\n if (!state.emittedReadable) {\n debug('emitReadable', state.flowing);\n state.emittedReadable = true;\n if (state.sync) processNextTick(emitReadable_, stream);else emitReadable_(stream);\n }\n}", "function emitReadable(stream) {\n var state = stream._readableState;\n state.needReadable = false;\n if (!state.emittedReadable) {\n debug('emitReadable', state.flowing);\n state.emittedReadable = true;\n if (state.sync) processNextTick(emitReadable_, stream);else emitReadable_(stream);\n }\n}", "function emitReadable(stream) {\n var state = stream._readableState;\n state.needReadable = false;\n if (!state.emittedReadable) {\n debug('emitReadable', state.flowing);\n state.emittedReadable = true;\n if (state.sync) processNextTick(emitReadable_, stream);else emitReadable_(stream);\n }\n}", "function emitReadable(stream) {\n var state = stream._readableState;\n state.needReadable = false;\n if (!state.emittedReadable) {\n debug('emitReadable', state.flowing);\n state.emittedReadable = true;\n if (state.sync) processNextTick(emitReadable_, stream);else emitReadable_(stream);\n }\n}", "function emitReadable(stream) {\n var state = stream._readableState;\n state.needReadable = false;\n if (!state.emittedReadable) {\n debug('emitReadable', state.flowing);\n state.emittedReadable = true;\n if (state.sync) processNextTick(emitReadable_, stream);else emitReadable_(stream);\n }\n}", "function emitReadable(stream) {\n var state = stream._readableState;\n state.needReadable = false;\n if (!state.emittedReadable) {\n debug('emitReadable', state.flowing);\n state.emittedReadable = true;\n if (state.sync) processNextTick(emitReadable_, stream);else emitReadable_(stream);\n }\n}", "function emitReadable(stream) {\n var state = stream._readableState;\n state.needReadable = false;\n if (!state.emittedReadable) {\n debug('emitReadable', state.flowing);\n state.emittedReadable = true;\n if (state.sync) processNextTick(emitReadable_, stream);else emitReadable_(stream);\n }\n}", "function emitReadable(stream) {\n var state = stream._readableState;\n state.needReadable = false;\n if (!state.emittedReadable) {\n debug('emitReadable', state.flowing);\n state.emittedReadable = true;\n if (state.sync) processNextTick(emitReadable_, stream);else emitReadable_(stream);\n }\n}", "function emitReadable(stream) {\n var state = stream._readableState;\n state.needReadable = false;\n if (!state.emittedReadable) {\n debug('emitReadable', state.flowing);\n state.emittedReadable = true;\n if (state.sync) processNextTick(emitReadable_, stream);else emitReadable_(stream);\n }\n}", "function emitReadable(stream) {\n var state = stream._readableState;\n state.needReadable = false;\n if (!state.emittedReadable) {\n debug('emitReadable', state.flowing);\n state.emittedReadable = true;\n if (state.sync) processNextTick(emitReadable_, stream);else emitReadable_(stream);\n }\n}", "function emitReadable(stream) {\n var state = stream._readableState;\n state.needReadable = false;\n if (!state.emittedReadable) {\n debug('emitReadable', state.flowing);\n state.emittedReadable = true;\n if (state.sync) processNextTick(emitReadable_, stream);else emitReadable_(stream);\n }\n}" ]
[ "0.7172262", "0.7115639", "0.7115639", "0.697873", "0.6932875", "0.69211066", "0.6901566", "0.6896036", "0.6883069", "0.68731534", "0.68731534", "0.68731534", "0.68731534", "0.68731534", "0.68731534", "0.68731534", "0.68731534", "0.68731534", "0.68731534", "0.68731534", "0.68731534", "0.68731534", "0.68731534", "0.68731534", "0.68731534", "0.68731534", "0.68731534", "0.68731534", "0.68731534", "0.68731534", "0.68731534", "0.68731534", "0.68731534", "0.68731534", "0.68731534", "0.68731534", "0.68731534", "0.68604004", "0.6841646", "0.68257827", "0.68257827", "0.68257827", "0.68257827", "0.68257827", "0.68257827", "0.68257827", "0.68247175", "0.68247175", "0.68247175", "0.6750825", "0.6750825", "0.67432636", "0.67405766", "0.67405766", "0.67405766", "0.67405766", "0.67405766", "0.67405766", "0.67405766", "0.67405766", "0.67405766", "0.67405766", "0.6738689", "0.672098", "0.6719491", "0.6719491", "0.6719491", "0.67150855", "0.67150855", "0.67150855", "0.67150855", "0.67150855", "0.67150855", "0.67150855", "0.67150855", "0.67150855", "0.67150855", "0.67150855", "0.67150855", "0.6710874", "0.6710874", "0.6710874", "0.6710874", "0.6710874", "0.6710874", "0.6710874", "0.6710874", "0.6710874", "0.6710874", "0.6710874", "0.6710874", "0.6710874", "0.6710874", "0.6710874", "0.6710874", "0.6710874", "0.6710874", "0.6710874", "0.6710874", "0.6710874", "0.6710874" ]
0.0
-1
at this point, the user has presumably seen the 'readable' event, and called read() to consume some data. that may have triggered in turn another _read(n) call, in which case reading = true if it's in progress. However, if we're not ended, or reading, and the length < hwm, then go ahead and try to read some more preemptively.
function maybeReadMore(stream, state) { if (!state.readingMore) { state.readingMore = true; process.nextTick(function() { maybeReadMore_(stream, state); }); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "_read() {\r\n\t\tthis._readingPaused = false\r\n\t\tsetImmediate(this._onReadable.bind(this))\r\n\t}", "_onReadable() {\r\n\t\t// Read all the data until one of two conditions is met\r\n\t\t// 1. there is nothing left to read on the socket\r\n\t\t// 2. reading is paused because the consumer is slow\r\n\t\twhile (!this._readingPaused) {\r\n\t\t\t// First step is reading the 32-bit integer from the socket\r\n\t\t\t// and if there is not a value, we simply abort processing\r\n\t\t\tlet lenBuf = this._socket.read(4)\r\n\t\t\tif (!lenBuf) return\r\n\r\n\t\t\t// Now that we have a length buffer we can convert it\r\n\t\t\t// into a number by reading the UInt32BE value\r\n\t\t\t// from the buffer.\r\n\t\t\tlet len = lenBuf.readUInt32LE()\r\n\t\t\t// ensure that we don't exceed the max size of 256KiB\r\n\t\t\tif (len > 2 ** 18) {\r\n\t\t\t\tthis.socket.destroy(new Error('Max length exceeded'))\r\n\t\t\t\treturn\r\n\t\t\t}\r\n\r\n\t\t\t// With the length, we can then consume the rest of the body.\r\n\t\t\tlet body = this._socket.read(len)\r\n\r\n\t\t\t// If we did not have enough data on the wire to read the body\r\n\t\t\t// we will wait for the body to arrive and push the length\r\n\t\t\t// back into the socket's read buffer with unshift.\r\n\t\t\tif (!body) {\r\n\t\t\t\tthis._socket.unshift(lenBuf)\r\n\t\t\t\treturn\r\n\t\t\t}\r\n\t\t\t// Try to parse the data and if it fails destroy the socket.\r\n\t\t\tlet json\r\n\t\t\ttry {\r\n\t\t\t\tlet message = Buffer.from(body).toString('utf8')\r\n\t\t\t\tif (this.encrypted) {\r\n\t\t\t\t\tmessage = decrypt(this.shkey, message)\r\n\t\t\t\t}\r\n\t\t\t\tjson = JSON.parse(message)\r\n\t\t\t} catch (ex) {\r\n\t\t\t\tthis._socket.destroy()\r\n\t\t\t\treturn\r\n\t\t\t}\r\n\r\n\t\t\t// Push the data into the read buffer and capture whether\r\n\t\t\t// we are hitting the back pressure limits\r\n\t\t\tlet pushOk = this.push(json)\r\n\r\n\t\t\t// When the push fails, we need to pause the ability to read\r\n\t\t\t// messages because the consumer is getting backed up.\r\n\t\t\tif (!pushOk) this._readingPaused = true\r\n\t\t}\r\n\t}", "function maybeReadMore(stream,state){if(!state.readingMore){state.readingMore=true;processNextTick(maybeReadMore_,stream,state)}}", "function maybeReadMore(stream,state){if(!state.readingMore){state.readingMore=true;processNextTick(maybeReadMore_,stream,state);}}", "function maybeReadMore(stream,state){if(!state.readingMore){state.readingMore=true;processNextTick(maybeReadMore_,stream,state);}}", "function howMuchToRead(n,state){if(n<=0||state.length===0&&state.ended)return 0;if(state.objectMode)return 1;if(n!==n){// Only flow one buffer at a time\nif(state.flowing&&state.length)return state.buffer.head.data.length;else return state.length;}// If we're asking for more than the current hwm, then raise the hwm.\nif(n>state.highWaterMark)state.highWaterMark=computeNewHighWaterMark(n);if(n<=state.length)return n;// Don't have enough\nif(!state.ended){state.needReadable=true;return 0;}return state.length;}// you can override either this method, or the async _read(n) below.", "function howMuchToRead(n,state){if(n<=0||state.length===0&&state.ended)return 0;if(state.objectMode)return 1;if(n!==n){// Only flow one buffer at a time\nif(state.flowing&&state.length)return state.buffer.head.data.length;else return state.length;}// If we're asking for more than the current hwm, then raise the hwm.\nif(n>state.highWaterMark)state.highWaterMark=computeNewHighWaterMark(n);if(n<=state.length)return n;// Don't have enough\nif(!state.ended){state.needReadable=true;return 0;}return state.length;}// you can override either this method, or the async _read(n) below.", "function howMuchToRead(n,state){if(n<=0||state.length===0&&state.ended)return 0;if(state.objectMode)return 1;if(n!==n){// Only flow one buffer at a time\n\tif(state.flowing&&state.length)return state.buffer.head.data.length;else return state.length;}// If we're asking for more than the current hwm, then raise the hwm.\n\tif(n>state.highWaterMark)state.highWaterMark=computeNewHighWaterMark(n);if(n<=state.length)return n;// Don't have enough\n\tif(!state.ended){state.needReadable=true;return 0;}return state.length;}// you can override either this method, or the async _read(n) below.", "function howMuchToRead(n,state){if(n<=0||state.length===0&&state.ended)return 0;if(state.objectMode)return 1;if(n!==n){// Only flow one buffer at a time\n if(state.flowing&&state.length)return state.buffer.head.data.length;else return state.length;}// If we're asking for more than the current hwm, then raise the hwm.\n if(n>state.highWaterMark)state.highWaterMark=computeNewHighWaterMark(n);if(n<=state.length)return n;// Don't have enough\n if(!state.ended){state.needReadable=true;return 0;}return state.length;}// you can override either this method, or the async _read(n) below.", "function $SYhk$var$howMuchToRead(n, state) {\n if (n <= 0 || state.length === 0 && state.ended) return 0;\n if (state.objectMode) return 1;\n\n if (n !== n) {\n // Only flow one buffer at a time\n if (state.flowing && state.length) return state.buffer.head.data.length;else return state.length;\n } // If we're asking for more than the current hwm, then raise the hwm.\n\n\n if (n > state.highWaterMark) state.highWaterMark = $SYhk$var$computeNewHighWaterMark(n);\n if (n <= state.length) return n; // Don't have enough\n\n if (!state.ended) {\n state.needReadable = true;\n return 0;\n }\n\n return state.length;\n} // you can override either this method, or the async _read(n) below.", "function maybeReadMore(stream,state){if(!state.readingMore){state.readingMore=true;pna.nextTick(maybeReadMore_,stream,state);}}", "function maybeReadMore(stream,state){if(!state.readingMore){state.readingMore=true;process.nextTick(maybeReadMore_,stream,state);}}", "function $Fj4k$var$howMuchToRead(n, state) {\n if (n <= 0 || state.length === 0 && state.ended) return 0;\n if (state.objectMode) return 1;\n\n if (n !== n) {\n // Only flow one buffer at a time\n if (state.flowing && state.length) return state.buffer.head.data.length;else return state.length;\n } // If we're asking for more than the current hwm, then raise the hwm.\n\n\n if (n > state.highWaterMark) state.highWaterMark = $Fj4k$var$computeNewHighWaterMark(n);\n if (n <= state.length) return n; // Don't have enough\n\n if (!state.ended) {\n state.needReadable = true;\n return 0;\n }\n\n return state.length;\n} // you can override either this method, or the async _read(n) below.", "function needMoreData(state){return!state.ended&&(state.needReadable||state.length<state.highWaterMark||state.length===0)}", "function needMoreData(state){return!state.ended&&(state.needReadable||state.length<state.highWaterMark||state.length===0);}", "function needMoreData(state){return!state.ended&&(state.needReadable||state.length<state.highWaterMark||state.length===0);}", "function needMoreData(state){return!state.ended&&(state.needReadable||state.length<state.highWaterMark||state.length===0);}// backwards compatibility.", "function howMuchToRead(n, state) {\n if (n <= 0 || (state.length === 0 && state.ended)) return 0;\n if (state.objectMode) return 1;\n\n if (n !== n) {\n // Only flow one buffer at a time\n if (state.flowing && state.length)\n return state.buffer.head.data.length;\n else return state.length;\n } // If we're asking for more than the current hwm, then raise the hwm.\n\n if (n > state.highWaterMark)\n state.highWaterMark = computeNewHighWaterMark(n);\n if (n <= state.length) return n; // Don't have enough\n\n if (!state.ended) {\n state.needReadable = true;\n return 0;\n }\n\n return state.length;\n } // you can override either this method, or the async _read(n) below.", "function howMuchToRead(n,state){if(n<=0||state.length===0&&state.ended)return 0;if(state.objectMode)return 1;if(n!==n){\n// Only flow one buffer at a time\nif(state.flowing&&state.length)return state.buffer.head.data.length;else return state.length}\n// If we're asking for more than the current hwm, then raise the hwm.\nif(n>state.highWaterMark)state.highWaterMark=computeNewHighWaterMark(n);if(n<=state.length)return n;\n// Don't have enough\nif(!state.ended){state.needReadable=true;return 0}return state.length}", "function needMoreData(state) {\n return !state.ended && (state.needReadable || state.length < state.highWaterMark || state.length === 0);\n }", "function howMuchToRead(n, state) {\n if (n <= 0 || state.length === 0 && state.ended) return 0;\n if (state.objectMode) return 1;\n\n if (n !== n) {\n // Only flow one buffer at a time\n if (state.flowing && state.length) return state.buffer.head.data.length;else return state.length;\n } // If we're asking for more than the current hwm, then raise the hwm.\n\n\n if (n > state.highWaterMark) state.highWaterMark = computeNewHighWaterMark(n);\n if (n <= state.length) return n; // Don't have enough\n\n if (!state.ended) {\n state.needReadable = true;\n return 0;\n }\n\n return state.length;\n} // you can override either this method, or the async _read(n) below.", "function howMuchToRead(n, state) {\n if (n <= 0 || state.length === 0 && state.ended) return 0;\n if (state.objectMode) return 1;\n\n if (n !== n) {\n // Only flow one buffer at a time\n if (state.flowing && state.length) return state.buffer.head.data.length;else return state.length;\n } // If we're asking for more than the current hwm, then raise the hwm.\n\n\n if (n > state.highWaterMark) state.highWaterMark = computeNewHighWaterMark(n);\n if (n <= state.length) return n; // Don't have enough\n\n if (!state.ended) {\n state.needReadable = true;\n return 0;\n }\n\n return state.length;\n} // you can override either this method, or the async _read(n) below.", "function howMuchToRead(n, state) {\n if (n <= 0 || state.length === 0 && state.ended) return 0;\n if (state.objectMode) return 1;\n\n if (n !== n) {\n // Only flow one buffer at a time\n if (state.flowing && state.length) return state.buffer.head.data.length;else return state.length;\n } // If we're asking for more than the current hwm, then raise the hwm.\n\n\n if (n > state.highWaterMark) state.highWaterMark = computeNewHighWaterMark(n);\n if (n <= state.length) return n; // Don't have enough\n\n if (!state.ended) {\n state.needReadable = true;\n return 0;\n }\n\n return state.length;\n} // you can override either this method, or the async _read(n) below.", "function howMuchToRead(n, state) {\n if (n <= 0 || state.length === 0 && state.ended) return 0;\n if (state.objectMode) return 1;\n\n if (n !== n) {\n // Only flow one buffer at a time\n if (state.flowing && state.length) return state.buffer.head.data.length;else return state.length;\n } // If we're asking for more than the current hwm, then raise the hwm.\n\n\n if (n > state.highWaterMark) state.highWaterMark = computeNewHighWaterMark(n);\n if (n <= state.length) return n; // Don't have enough\n\n if (!state.ended) {\n state.needReadable = true;\n return 0;\n }\n\n return state.length;\n} // you can override either this method, or the async _read(n) below.", "function howMuchToRead(n, state) {\n if (n <= 0 || state.length === 0 && state.ended) return 0;\n if (state.objectMode) return 1;\n\n if (n !== n) {\n // Only flow one buffer at a time\n if (state.flowing && state.length) return state.buffer.head.data.length;else return state.length;\n } // If we're asking for more than the current hwm, then raise the hwm.\n\n\n if (n > state.highWaterMark) state.highWaterMark = computeNewHighWaterMark(n);\n if (n <= state.length) return n; // Don't have enough\n\n if (!state.ended) {\n state.needReadable = true;\n return 0;\n }\n\n return state.length;\n} // you can override either this method, or the async _read(n) below.", "function howMuchToRead(n, state) {\n if (n <= 0 || state.length === 0 && state.ended) return 0;\n if (state.objectMode) return 1;\n\n if (n !== n) {\n // Only flow one buffer at a time\n if (state.flowing && state.length) return state.buffer.head.data.length;else return state.length;\n } // If we're asking for more than the current hwm, then raise the hwm.\n\n\n if (n > state.highWaterMark) state.highWaterMark = computeNewHighWaterMark(n);\n if (n <= state.length) return n; // Don't have enough\n\n if (!state.ended) {\n state.needReadable = true;\n return 0;\n }\n\n return state.length;\n} // you can override either this method, or the async _read(n) below.", "function howMuchToRead(n, state) {\n if (n <= 0 || state.length === 0 && state.ended) return 0;\n if (state.objectMode) return 1;\n\n if (n !== n) {\n // Only flow one buffer at a time\n if (state.flowing && state.length) return state.buffer.head.data.length;else return state.length;\n } // If we're asking for more than the current hwm, then raise the hwm.\n\n\n if (n > state.highWaterMark) state.highWaterMark = computeNewHighWaterMark(n);\n if (n <= state.length) return n; // Don't have enough\n\n if (!state.ended) {\n state.needReadable = true;\n return 0;\n }\n\n return state.length;\n} // you can override either this method, or the async _read(n) below.", "function howMuchToRead(n, state) {\n if (n <= 0 || state.length === 0 && state.ended) return 0;\n if (state.objectMode) return 1;\n\n if (n !== n) {\n // Only flow one buffer at a time\n if (state.flowing && state.length) return state.buffer.head.data.length;else return state.length;\n } // If we're asking for more than the current hwm, then raise the hwm.\n\n\n if (n > state.highWaterMark) state.highWaterMark = computeNewHighWaterMark(n);\n if (n <= state.length) return n; // Don't have enough\n\n if (!state.ended) {\n state.needReadable = true;\n return 0;\n }\n\n return state.length;\n} // you can override either this method, or the async _read(n) below.", "function howMuchToRead(n, state) {\n if (n <= 0 || state.length === 0 && state.ended) return 0;\n if (state.objectMode) return 1;\n\n if (n !== n) {\n // Only flow one buffer at a time\n if (state.flowing && state.length) return state.buffer.head.data.length;else return state.length;\n } // If we're asking for more than the current hwm, then raise the hwm.\n\n\n if (n > state.highWaterMark) state.highWaterMark = computeNewHighWaterMark(n);\n if (n <= state.length) return n; // Don't have enough\n\n if (!state.ended) {\n state.needReadable = true;\n return 0;\n }\n\n return state.length;\n} // you can override either this method, or the async _read(n) below.", "function howMuchToRead(n, state) {\n if (n <= 0 || state.length === 0 && state.ended) return 0;\n if (state.objectMode) return 1;\n\n if (n !== n) {\n // Only flow one buffer at a time\n if (state.flowing && state.length) return state.buffer.head.data.length;else return state.length;\n } // If we're asking for more than the current hwm, then raise the hwm.\n\n\n if (n > state.highWaterMark) state.highWaterMark = computeNewHighWaterMark(n);\n if (n <= state.length) return n; // Don't have enough\n\n if (!state.ended) {\n state.needReadable = true;\n return 0;\n }\n\n return state.length;\n} // you can override either this method, or the async _read(n) below.", "function howMuchToRead(n, state) {\n if (n <= 0 || state.length === 0 && state.ended) return 0;\n if (state.objectMode) return 1;\n\n if (n !== n) {\n // Only flow one buffer at a time\n if (state.flowing && state.length) return state.buffer.head.data.length;else return state.length;\n } // If we're asking for more than the current hwm, then raise the hwm.\n\n\n if (n > state.highWaterMark) state.highWaterMark = computeNewHighWaterMark(n);\n if (n <= state.length) return n; // Don't have enough\n\n if (!state.ended) {\n state.needReadable = true;\n return 0;\n }\n\n return state.length;\n} // you can override either this method, or the async _read(n) below.", "function howMuchToRead(n, state) {\n if (n <= 0 || state.length === 0 && state.ended) return 0;\n if (state.objectMode) return 1;\n\n if (n !== n) {\n // Only flow one buffer at a time\n if (state.flowing && state.length) return state.buffer.head.data.length;else return state.length;\n } // If we're asking for more than the current hwm, then raise the hwm.\n\n\n if (n > state.highWaterMark) state.highWaterMark = computeNewHighWaterMark(n);\n if (n <= state.length) return n; // Don't have enough\n\n if (!state.ended) {\n state.needReadable = true;\n return 0;\n }\n\n return state.length;\n} // you can override either this method, or the async _read(n) below.", "function howMuchToRead(n, state) {\n if (n <= 0 || state.length === 0 && state.ended) return 0;\n if (state.objectMode) return 1;\n\n if (n !== n) {\n // Only flow one buffer at a time\n if (state.flowing && state.length) return state.buffer.head.data.length;else return state.length;\n } // If we're asking for more than the current hwm, then raise the hwm.\n\n\n if (n > state.highWaterMark) state.highWaterMark = computeNewHighWaterMark(n);\n if (n <= state.length) return n; // Don't have enough\n\n if (!state.ended) {\n state.needReadable = true;\n return 0;\n }\n\n return state.length;\n} // you can override either this method, or the async _read(n) below.", "function howMuchToRead(n, state) {\n if (n <= 0 || state.length === 0 && state.ended) return 0;\n if (state.objectMode) return 1;\n\n if (n !== n) {\n // Only flow one buffer at a time\n if (state.flowing && state.length) return state.buffer.head.data.length;else return state.length;\n } // If we're asking for more than the current hwm, then raise the hwm.\n\n\n if (n > state.highWaterMark) state.highWaterMark = computeNewHighWaterMark(n);\n if (n <= state.length) return n; // Don't have enough\n\n if (!state.ended) {\n state.needReadable = true;\n return 0;\n }\n\n return state.length;\n} // you can override either this method, or the async _read(n) below.", "function howMuchToRead(n, state) {\n if (n <= 0 || state.length === 0 && state.ended) return 0;\n if (state.objectMode) return 1;\n\n if (n !== n) {\n // Only flow one buffer at a time\n if (state.flowing && state.length) return state.buffer.head.data.length;else return state.length;\n } // If we're asking for more than the current hwm, then raise the hwm.\n\n\n if (n > state.highWaterMark) state.highWaterMark = computeNewHighWaterMark(n);\n if (n <= state.length) return n; // Don't have enough\n\n if (!state.ended) {\n state.needReadable = true;\n return 0;\n }\n\n return state.length;\n} // you can override either this method, or the async _read(n) below.", "function howMuchToRead(n, state) {\n if (n <= 0 || state.length === 0 && state.ended) return 0;\n if (state.objectMode) return 1;\n\n if (n !== n) {\n // Only flow one buffer at a time\n if (state.flowing && state.length) return state.buffer.head.data.length;else return state.length;\n } // If we're asking for more than the current hwm, then raise the hwm.\n\n\n if (n > state.highWaterMark) state.highWaterMark = computeNewHighWaterMark(n);\n if (n <= state.length) return n; // Don't have enough\n\n if (!state.ended) {\n state.needReadable = true;\n return 0;\n }\n\n return state.length;\n} // you can override either this method, or the async _read(n) below.", "function howMuchToRead(n, state) {\n if (n <= 0 || state.length === 0 && state.ended) return 0;\n if (state.objectMode) return 1;\n\n if (n !== n) {\n // Only flow one buffer at a time\n if (state.flowing && state.length) return state.buffer.head.data.length;else return state.length;\n } // If we're asking for more than the current hwm, then raise the hwm.\n\n\n if (n > state.highWaterMark) state.highWaterMark = computeNewHighWaterMark(n);\n if (n <= state.length) return n; // Don't have enough\n\n if (!state.ended) {\n state.needReadable = true;\n return 0;\n }\n\n return state.length;\n} // you can override either this method, or the async _read(n) below.", "function howMuchToRead(n, state) {\n if (n <= 0 || state.length === 0 && state.ended) return 0;\n if (state.objectMode) return 1;\n\n if (n !== n) {\n // Only flow one buffer at a time\n if (state.flowing && state.length) return state.buffer.head.data.length;else return state.length;\n } // If we're asking for more than the current hwm, then raise the hwm.\n\n\n if (n > state.highWaterMark) state.highWaterMark = computeNewHighWaterMark(n);\n if (n <= state.length) return n; // Don't have enough\n\n if (!state.ended) {\n state.needReadable = true;\n return 0;\n }\n\n return state.length;\n} // you can override either this method, or the async _read(n) below.", "function howMuchToRead(n, state) {\n if (n <= 0 || state.length === 0 && state.ended) return 0;\n if (state.objectMode) return 1;\n\n if (n !== n) {\n // Only flow one buffer at a time\n if (state.flowing && state.length) return state.buffer.head.data.length;else return state.length;\n } // If we're asking for more than the current hwm, then raise the hwm.\n\n\n if (n > state.highWaterMark) state.highWaterMark = computeNewHighWaterMark(n);\n if (n <= state.length) return n; // Don't have enough\n\n if (!state.ended) {\n state.needReadable = true;\n return 0;\n }\n\n return state.length;\n} // you can override either this method, or the async _read(n) below.", "function howMuchToRead(n, state) {\n if (n <= 0 || state.length === 0 && state.ended) return 0;\n if (state.objectMode) return 1;\n\n if (n !== n) {\n // Only flow one buffer at a time\n if (state.flowing && state.length) return state.buffer.head.data.length;else return state.length;\n } // If we're asking for more than the current hwm, then raise the hwm.\n\n\n if (n > state.highWaterMark) state.highWaterMark = computeNewHighWaterMark(n);\n if (n <= state.length) return n; // Don't have enough\n\n if (!state.ended) {\n state.needReadable = true;\n return 0;\n }\n\n return state.length;\n} // you can override either this method, or the async _read(n) below.", "function howMuchToRead(n, state) {\n if (n <= 0 || state.length === 0 && state.ended) return 0;\n if (state.objectMode) return 1;\n\n if (n !== n) {\n // Only flow one buffer at a time\n if (state.flowing && state.length) return state.buffer.head.data.length;else return state.length;\n } // If we're asking for more than the current hwm, then raise the hwm.\n\n\n if (n > state.highWaterMark) state.highWaterMark = computeNewHighWaterMark(n);\n if (n <= state.length) return n; // Don't have enough\n\n if (!state.ended) {\n state.needReadable = true;\n return 0;\n }\n\n return state.length;\n} // you can override either this method, or the async _read(n) below.", "function howMuchToRead(n, state) {\n if (n <= 0 || state.length === 0 && state.ended) return 0;\n if (state.objectMode) return 1;\n\n if (n !== n) {\n // Only flow one buffer at a time\n if (state.flowing && state.length) return state.buffer.head.data.length;else return state.length;\n } // If we're asking for more than the current hwm, then raise the hwm.\n\n\n if (n > state.highWaterMark) state.highWaterMark = computeNewHighWaterMark(n);\n if (n <= state.length) return n; // Don't have enough\n\n if (!state.ended) {\n state.needReadable = true;\n return 0;\n }\n\n return state.length;\n} // you can override either this method, or the async _read(n) below.", "function howMuchToRead(n, state) {\n if (n <= 0 || state.length === 0 && state.ended) return 0;\n if (state.objectMode) return 1;\n\n if (n !== n) {\n // Only flow one buffer at a time\n if (state.flowing && state.length) return state.buffer.head.data.length;else return state.length;\n } // If we're asking for more than the current hwm, then raise the hwm.\n\n\n if (n > state.highWaterMark) state.highWaterMark = computeNewHighWaterMark(n);\n if (n <= state.length) return n; // Don't have enough\n\n if (!state.ended) {\n state.needReadable = true;\n return 0;\n }\n\n return state.length;\n} // you can override either this method, or the async _read(n) below.", "function howMuchToRead(n, state) {\n if (n <= 0 || state.length === 0 && state.ended) return 0;\n if (state.objectMode) return 1;\n\n if (n !== n) {\n // Only flow one buffer at a time\n if (state.flowing && state.length) return state.buffer.head.data.length;else return state.length;\n } // If we're asking for more than the current hwm, then raise the hwm.\n\n\n if (n > state.highWaterMark) state.highWaterMark = computeNewHighWaterMark(n);\n if (n <= state.length) return n; // Don't have enough\n\n if (!state.ended) {\n state.needReadable = true;\n return 0;\n }\n\n return state.length;\n} // you can override either this method, or the async _read(n) below.", "function howMuchToRead(n, state) {\n if (n <= 0 || state.length === 0 && state.ended) return 0;\n if (state.objectMode) return 1;\n\n if (n !== n) {\n // Only flow one buffer at a time\n if (state.flowing && state.length) return state.buffer.head.data.length;else return state.length;\n } // If we're asking for more than the current hwm, then raise the hwm.\n\n\n if (n > state.highWaterMark) state.highWaterMark = computeNewHighWaterMark(n);\n if (n <= state.length) return n; // Don't have enough\n\n if (!state.ended) {\n state.needReadable = true;\n return 0;\n }\n\n return state.length;\n} // you can override either this method, or the async _read(n) below.", "function howMuchToRead(n, state) {\n if (n <= 0 || state.length === 0 && state.ended) return 0;\n if (state.objectMode) return 1;\n\n if (n !== n) {\n // Only flow one buffer at a time\n if (state.flowing && state.length) return state.buffer.head.data.length;else return state.length;\n } // If we're asking for more than the current hwm, then raise the hwm.\n\n\n if (n > state.highWaterMark) state.highWaterMark = computeNewHighWaterMark(n);\n if (n <= state.length) return n; // Don't have enough\n\n if (!state.ended) {\n state.needReadable = true;\n return 0;\n }\n\n return state.length;\n} // you can override either this method, or the async _read(n) below.", "function howMuchToRead(n, state) {\n if (n <= 0 || state.length === 0 && state.ended) return 0;\n if (state.objectMode) return 1;\n\n if (n !== n) {\n // Only flow one buffer at a time\n if (state.flowing && state.length) return state.buffer.head.data.length;else return state.length;\n } // If we're asking for more than the current hwm, then raise the hwm.\n\n\n if (n > state.highWaterMark) state.highWaterMark = computeNewHighWaterMark(n);\n if (n <= state.length) return n; // Don't have enough\n\n if (!state.ended) {\n state.needReadable = true;\n return 0;\n }\n\n return state.length;\n} // you can override either this method, or the async _read(n) below.", "function howMuchToRead(n, state) {\n if (n <= 0 || state.length === 0 && state.ended) return 0;\n if (state.objectMode) return 1;\n\n if (n !== n) {\n // Only flow one buffer at a time\n if (state.flowing && state.length) return state.buffer.head.data.length;else return state.length;\n } // If we're asking for more than the current hwm, then raise the hwm.\n\n\n if (n > state.highWaterMark) state.highWaterMark = computeNewHighWaterMark(n);\n if (n <= state.length) return n; // Don't have enough\n\n if (!state.ended) {\n state.needReadable = true;\n return 0;\n }\n\n return state.length;\n} // you can override either this method, or the async _read(n) below.", "function howMuchToRead(n, state) {\n if (n <= 0 || state.length === 0 && state.ended) return 0;\n if (state.objectMode) return 1;\n\n if (n !== n) {\n // Only flow one buffer at a time\n if (state.flowing && state.length) return state.buffer.head.data.length;else return state.length;\n } // If we're asking for more than the current hwm, then raise the hwm.\n\n\n if (n > state.highWaterMark) state.highWaterMark = computeNewHighWaterMark(n);\n if (n <= state.length) return n; // Don't have enough\n\n if (!state.ended) {\n state.needReadable = true;\n return 0;\n }\n\n return state.length;\n} // you can override either this method, or the async _read(n) below.", "function howMuchToRead(n, state) {\n if (n <= 0 || state.length === 0 && state.ended) return 0;\n if (state.objectMode) return 1;\n\n if (n !== n) {\n // Only flow one buffer at a time\n if (state.flowing && state.length) return state.buffer.head.data.length;else return state.length;\n } // If we're asking for more than the current hwm, then raise the hwm.\n\n\n if (n > state.highWaterMark) state.highWaterMark = computeNewHighWaterMark(n);\n if (n <= state.length) return n; // Don't have enough\n\n if (!state.ended) {\n state.needReadable = true;\n return 0;\n }\n\n return state.length;\n} // you can override either this method, or the async _read(n) below.", "function howMuchToRead(n, state) {\n if (n <= 0 || state.length === 0 && state.ended) return 0;\n if (state.objectMode) return 1;\n\n if (n !== n) {\n // Only flow one buffer at a time\n if (state.flowing && state.length) return state.buffer.head.data.length;else return state.length;\n } // If we're asking for more than the current hwm, then raise the hwm.\n\n\n if (n > state.highWaterMark) state.highWaterMark = computeNewHighWaterMark(n);\n if (n <= state.length) return n; // Don't have enough\n\n if (!state.ended) {\n state.needReadable = true;\n return 0;\n }\n\n return state.length;\n} // you can override either this method, or the async _read(n) below.", "function howMuchToRead(n, state) {\n if (n <= 0 || state.length === 0 && state.ended) return 0;\n if (state.objectMode) return 1;\n\n if (n !== n) {\n // Only flow one buffer at a time\n if (state.flowing && state.length) return state.buffer.head.data.length;else return state.length;\n } // If we're asking for more than the current hwm, then raise the hwm.\n\n\n if (n > state.highWaterMark) state.highWaterMark = computeNewHighWaterMark(n);\n if (n <= state.length) return n; // Don't have enough\n\n if (!state.ended) {\n state.needReadable = true;\n return 0;\n }\n\n return state.length;\n} // you can override either this method, or the async _read(n) below.", "function howMuchToRead(n, state) {\n if (n <= 0 || state.length === 0 && state.ended) return 0;\n if (state.objectMode) return 1;\n\n if (n !== n) {\n // Only flow one buffer at a time\n if (state.flowing && state.length) return state.buffer.head.data.length;else return state.length;\n } // If we're asking for more than the current hwm, then raise the hwm.\n\n\n if (n > state.highWaterMark) state.highWaterMark = computeNewHighWaterMark(n);\n if (n <= state.length) return n; // Don't have enough\n\n if (!state.ended) {\n state.needReadable = true;\n return 0;\n }\n\n return state.length;\n} // you can override either this method, or the async _read(n) below.", "function howMuchToRead(n, state) {\n if (n <= 0 || state.length === 0 && state.ended) return 0;\n if (state.objectMode) return 1;\n\n if (n !== n) {\n // Only flow one buffer at a time\n if (state.flowing && state.length) return state.buffer.head.data.length;else return state.length;\n } // If we're asking for more than the current hwm, then raise the hwm.\n\n\n if (n > state.highWaterMark) state.highWaterMark = computeNewHighWaterMark(n);\n if (n <= state.length) return n; // Don't have enough\n\n if (!state.ended) {\n state.needReadable = true;\n return 0;\n }\n\n return state.length;\n} // you can override either this method, or the async _read(n) below.", "function howMuchToRead(n, state) {\n if (n <= 0 || state.length === 0 && state.ended) return 0;\n if (state.objectMode) return 1;\n\n if (n !== n) {\n // Only flow one buffer at a time\n if (state.flowing && state.length) return state.buffer.head.data.length;else return state.length;\n } // If we're asking for more than the current hwm, then raise the hwm.\n\n\n if (n > state.highWaterMark) state.highWaterMark = computeNewHighWaterMark(n);\n if (n <= state.length) return n; // Don't have enough\n\n if (!state.ended) {\n state.needReadable = true;\n return 0;\n }\n\n return state.length;\n} // you can override either this method, or the async _read(n) below.", "function howMuchToRead(n, state) {\n if (n <= 0 || state.length === 0 && state.ended) return 0;\n if (state.objectMode) return 1;\n\n if (n !== n) {\n // Only flow one buffer at a time\n if (state.flowing && state.length) return state.buffer.head.data.length;else return state.length;\n } // If we're asking for more than the current hwm, then raise the hwm.\n\n\n if (n > state.highWaterMark) state.highWaterMark = computeNewHighWaterMark(n);\n if (n <= state.length) return n; // Don't have enough\n\n if (!state.ended) {\n state.needReadable = true;\n return 0;\n }\n\n return state.length;\n} // you can override either this method, or the async _read(n) below.", "function howMuchToRead(n, state) {\n if (n <= 0 || state.length === 0 && state.ended) return 0;\n if (state.objectMode) return 1;\n\n if (n !== n) {\n // Only flow one buffer at a time\n if (state.flowing && state.length) return state.buffer.head.data.length;else return state.length;\n } // If we're asking for more than the current hwm, then raise the hwm.\n\n\n if (n > state.highWaterMark) state.highWaterMark = computeNewHighWaterMark(n);\n if (n <= state.length) return n; // Don't have enough\n\n if (!state.ended) {\n state.needReadable = true;\n return 0;\n }\n\n return state.length;\n} // you can override either this method, or the async _read(n) below.", "function howMuchToRead(n, state) {\n if (n <= 0 || state.length === 0 && state.ended) return 0;\n if (state.objectMode) return 1;\n\n if (n !== n) {\n // Only flow one buffer at a time\n if (state.flowing && state.length) return state.buffer.head.data.length;else return state.length;\n } // If we're asking for more than the current hwm, then raise the hwm.\n\n\n if (n > state.highWaterMark) state.highWaterMark = computeNewHighWaterMark(n);\n if (n <= state.length) return n; // Don't have enough\n\n if (!state.ended) {\n state.needReadable = true;\n return 0;\n }\n\n return state.length;\n} // you can override either this method, or the async _read(n) below.", "function howMuchToRead(n, state) {\n if (n <= 0 || state.length === 0 && state.ended) return 0;\n if (state.objectMode) return 1;\n\n if (n !== n) {\n // Only flow one buffer at a time\n if (state.flowing && state.length) return state.buffer.head.data.length;else return state.length;\n } // If we're asking for more than the current hwm, then raise the hwm.\n\n\n if (n > state.highWaterMark) state.highWaterMark = computeNewHighWaterMark(n);\n if (n <= state.length) return n; // Don't have enough\n\n if (!state.ended) {\n state.needReadable = true;\n return 0;\n }\n\n return state.length;\n} // you can override either this method, or the async _read(n) below.", "function howMuchToRead(n, state) {\n if (n <= 0 || state.length === 0 && state.ended) return 0;\n if (state.objectMode) return 1;\n\n if (n !== n) {\n // Only flow one buffer at a time\n if (state.flowing && state.length) return state.buffer.head.data.length;else return state.length;\n } // If we're asking for more than the current hwm, then raise the hwm.\n\n\n if (n > state.highWaterMark) state.highWaterMark = computeNewHighWaterMark(n);\n if (n <= state.length) return n; // Don't have enough\n\n if (!state.ended) {\n state.needReadable = true;\n return 0;\n }\n\n return state.length;\n} // you can override either this method, or the async _read(n) below.", "function howMuchToRead(n, state) {\n if (n <= 0 || state.length === 0 && state.ended) return 0;\n if (state.objectMode) return 1;\n\n if (n !== n) {\n // Only flow one buffer at a time\n if (state.flowing && state.length) return state.buffer.head.data.length;else return state.length;\n } // If we're asking for more than the current hwm, then raise the hwm.\n\n\n if (n > state.highWaterMark) state.highWaterMark = computeNewHighWaterMark(n);\n if (n <= state.length) return n; // Don't have enough\n\n if (!state.ended) {\n state.needReadable = true;\n return 0;\n }\n\n return state.length;\n} // you can override either this method, or the async _read(n) below.", "function howMuchToRead(n, state) {\n if (n <= 0 || state.length === 0 && state.ended) return 0;\n if (state.objectMode) return 1;\n\n if (n !== n) {\n // Only flow one buffer at a time\n if (state.flowing && state.length) return state.buffer.head.data.length;else return state.length;\n } // If we're asking for more than the current hwm, then raise the hwm.\n\n\n if (n > state.highWaterMark) state.highWaterMark = computeNewHighWaterMark(n);\n if (n <= state.length) return n; // Don't have enough\n\n if (!state.ended) {\n state.needReadable = true;\n return 0;\n }\n\n return state.length;\n} // you can override either this method, or the async _read(n) below.", "function howMuchToRead(n, state) {\n if (n <= 0 || state.length === 0 && state.ended) return 0;\n if (state.objectMode) return 1;\n\n if (n !== n) {\n // Only flow one buffer at a time\n if (state.flowing && state.length) return state.buffer.head.data.length;else return state.length;\n } // If we're asking for more than the current hwm, then raise the hwm.\n\n\n if (n > state.highWaterMark) state.highWaterMark = computeNewHighWaterMark(n);\n if (n <= state.length) return n; // Don't have enough\n\n if (!state.ended) {\n state.needReadable = true;\n return 0;\n }\n\n return state.length;\n} // you can override either this method, or the async _read(n) below.", "function howMuchToRead(n, state) {\n if (n <= 0 || state.length === 0 && state.ended) return 0;\n if (state.objectMode) return 1;\n\n if (n !== n) {\n // Only flow one buffer at a time\n if (state.flowing && state.length) return state.buffer.head.data.length;else return state.length;\n } // If we're asking for more than the current hwm, then raise the hwm.\n\n\n if (n > state.highWaterMark) state.highWaterMark = computeNewHighWaterMark(n);\n if (n <= state.length) return n; // Don't have enough\n\n if (!state.ended) {\n state.needReadable = true;\n return 0;\n }\n\n return state.length;\n} // you can override either this method, or the async _read(n) below.", "function howMuchToRead(n, state) {\n if (n <= 0 || state.length === 0 && state.ended) return 0;\n if (state.objectMode) return 1;\n\n if (n !== n) {\n // Only flow one buffer at a time\n if (state.flowing && state.length) return state.buffer.head.data.length;else return state.length;\n } // If we're asking for more than the current hwm, then raise the hwm.\n\n\n if (n > state.highWaterMark) state.highWaterMark = computeNewHighWaterMark(n);\n if (n <= state.length) return n; // Don't have enough\n\n if (!state.ended) {\n state.needReadable = true;\n return 0;\n }\n\n return state.length;\n} // you can override either this method, or the async _read(n) below.", "function howMuchToRead(n, state) {\n if (n <= 0 || state.length === 0 && state.ended) return 0;\n if (state.objectMode) return 1;\n\n if (n !== n) {\n // Only flow one buffer at a time\n if (state.flowing && state.length) return state.buffer.head.data.length;else return state.length;\n } // If we're asking for more than the current hwm, then raise the hwm.\n\n\n if (n > state.highWaterMark) state.highWaterMark = computeNewHighWaterMark(n);\n if (n <= state.length) return n; // Don't have enough\n\n if (!state.ended) {\n state.needReadable = true;\n return 0;\n }\n\n return state.length;\n} // you can override either this method, or the async _read(n) below.", "function howMuchToRead(n, state) {\n if (n <= 0 || state.length === 0 && state.ended) return 0;\n if (state.objectMode) return 1;\n\n if (n !== n) {\n // Only flow one buffer at a time\n if (state.flowing && state.length) return state.buffer.head.data.length;else return state.length;\n } // If we're asking for more than the current hwm, then raise the hwm.\n\n\n if (n > state.highWaterMark) state.highWaterMark = computeNewHighWaterMark(n);\n if (n <= state.length) return n; // Don't have enough\n\n if (!state.ended) {\n state.needReadable = true;\n return 0;\n }\n\n return state.length;\n} // you can override either this method, or the async _read(n) below.", "function howMuchToRead(n, state) {\n if (n <= 0 || state.length === 0 && state.ended) return 0;\n if (state.objectMode) return 1;\n\n if (n !== n) {\n // Only flow one buffer at a time\n if (state.flowing && state.length) return state.buffer.head.data.length;else return state.length;\n } // If we're asking for more than the current hwm, then raise the hwm.\n\n\n if (n > state.highWaterMark) state.highWaterMark = computeNewHighWaterMark(n);\n if (n <= state.length) return n; // Don't have enough\n\n if (!state.ended) {\n state.needReadable = true;\n return 0;\n }\n\n return state.length;\n} // you can override either this method, or the async _read(n) below.", "function howMuchToRead(n, state) {\n if (n <= 0 || state.length === 0 && state.ended) return 0;\n if (state.objectMode) return 1;\n\n if (n !== n) {\n // Only flow one buffer at a time\n if (state.flowing && state.length) return state.buffer.head.data.length;else return state.length;\n } // If we're asking for more than the current hwm, then raise the hwm.\n\n\n if (n > state.highWaterMark) state.highWaterMark = computeNewHighWaterMark(n);\n if (n <= state.length) return n; // Don't have enough\n\n if (!state.ended) {\n state.needReadable = true;\n return 0;\n }\n\n return state.length;\n} // you can override either this method, or the async _read(n) below.", "function howMuchToRead(n, state) {\n if (n <= 0 || state.length === 0 && state.ended) return 0;\n if (state.objectMode) return 1;\n\n if (n !== n) {\n // Only flow one buffer at a time\n if (state.flowing && state.length) return state.buffer.head.data.length;else return state.length;\n } // If we're asking for more than the current hwm, then raise the hwm.\n\n\n if (n > state.highWaterMark) state.highWaterMark = computeNewHighWaterMark(n);\n if (n <= state.length) return n; // Don't have enough\n\n if (!state.ended) {\n state.needReadable = true;\n return 0;\n }\n\n return state.length;\n} // you can override either this method, or the async _read(n) below.", "function howMuchToRead(n, state) {\n if (n <= 0 || state.length === 0 && state.ended) return 0;\n if (state.objectMode) return 1;\n\n if (n !== n) {\n // Only flow one buffer at a time\n if (state.flowing && state.length) return state.buffer.head.data.length;else return state.length;\n } // If we're asking for more than the current hwm, then raise the hwm.\n\n\n if (n > state.highWaterMark) state.highWaterMark = computeNewHighWaterMark(n);\n if (n <= state.length) return n; // Don't have enough\n\n if (!state.ended) {\n state.needReadable = true;\n return 0;\n }\n\n return state.length;\n} // you can override either this method, or the async _read(n) below.", "function howMuchToRead(n, state) {\n if (n <= 0 || state.length === 0 && state.ended) return 0;\n if (state.objectMode) return 1;\n\n if (n !== n) {\n // Only flow one buffer at a time\n if (state.flowing && state.length) return state.buffer.head.data.length;else return state.length;\n } // If we're asking for more than the current hwm, then raise the hwm.\n\n\n if (n > state.highWaterMark) state.highWaterMark = computeNewHighWaterMark(n);\n if (n <= state.length) return n; // Don't have enough\n\n if (!state.ended) {\n state.needReadable = true;\n return 0;\n }\n\n return state.length;\n} // you can override either this method, or the async _read(n) below.", "function howMuchToRead(n, state) {\n if (n <= 0 || state.length === 0 && state.ended) return 0;\n if (state.objectMode) return 1;\n\n if (n !== n) {\n // Only flow one buffer at a time\n if (state.flowing && state.length) return state.buffer.head.data.length;else return state.length;\n } // If we're asking for more than the current hwm, then raise the hwm.\n\n\n if (n > state.highWaterMark) state.highWaterMark = computeNewHighWaterMark(n);\n if (n <= state.length) return n; // Don't have enough\n\n if (!state.ended) {\n state.needReadable = true;\n return 0;\n }\n\n return state.length;\n} // you can override either this method, or the async _read(n) below.", "function howMuchToRead(n, state) {\n if (n <= 0 || state.length === 0 && state.ended) return 0;\n if (state.objectMode) return 1;\n\n if (n !== n) {\n // Only flow one buffer at a time\n if (state.flowing && state.length) return state.buffer.head.data.length;else return state.length;\n } // If we're asking for more than the current hwm, then raise the hwm.\n\n\n if (n > state.highWaterMark) state.highWaterMark = computeNewHighWaterMark(n);\n if (n <= state.length) return n; // Don't have enough\n\n if (!state.ended) {\n state.needReadable = true;\n return 0;\n }\n\n return state.length;\n} // you can override either this method, or the async _read(n) below.", "function howMuchToRead(n, state) {\n if (n <= 0 || state.length === 0 && state.ended) return 0;\n if (state.objectMode) return 1;\n\n if (n !== n) {\n // Only flow one buffer at a time\n if (state.flowing && state.length) return state.buffer.head.data.length;else return state.length;\n } // If we're asking for more than the current hwm, then raise the hwm.\n\n\n if (n > state.highWaterMark) state.highWaterMark = computeNewHighWaterMark(n);\n if (n <= state.length) return n; // Don't have enough\n\n if (!state.ended) {\n state.needReadable = true;\n return 0;\n }\n\n return state.length;\n} // you can override either this method, or the async _read(n) below.", "function howMuchToRead(n, state) {\n if (n <= 0 || state.length === 0 && state.ended) return 0;\n if (state.objectMode) return 1;\n\n if (n !== n) {\n // Only flow one buffer at a time\n if (state.flowing && state.length) return state.buffer.head.data.length;else return state.length;\n } // If we're asking for more than the current hwm, then raise the hwm.\n\n\n if (n > state.highWaterMark) state.highWaterMark = computeNewHighWaterMark(n);\n if (n <= state.length) return n; // Don't have enough\n\n if (!state.ended) {\n state.needReadable = true;\n return 0;\n }\n\n return state.length;\n} // you can override either this method, or the async _read(n) below.", "function howMuchToRead(n, state) {\n if (n <= 0 || state.length === 0 && state.ended) return 0;\n if (state.objectMode) return 1;\n\n if (n !== n) {\n // Only flow one buffer at a time\n if (state.flowing && state.length) return state.buffer.head.data.length;else return state.length;\n } // If we're asking for more than the current hwm, then raise the hwm.\n\n\n if (n > state.highWaterMark) state.highWaterMark = computeNewHighWaterMark(n);\n if (n <= state.length) return n; // Don't have enough\n\n if (!state.ended) {\n state.needReadable = true;\n return 0;\n }\n\n return state.length;\n} // you can override either this method, or the async _read(n) below.", "function howMuchToRead(n, state) {\n if (n <= 0 || state.length === 0 && state.ended) return 0;\n if (state.objectMode) return 1;\n\n if (n !== n) {\n // Only flow one buffer at a time\n if (state.flowing && state.length) return state.buffer.head.data.length;else return state.length;\n } // If we're asking for more than the current hwm, then raise the hwm.\n\n\n if (n > state.highWaterMark) state.highWaterMark = computeNewHighWaterMark(n);\n if (n <= state.length) return n; // Don't have enough\n\n if (!state.ended) {\n state.needReadable = true;\n return 0;\n }\n\n return state.length;\n} // you can override either this method, or the async _read(n) below.", "function needMoreData(state) {\n return !state.ended && (state.needReadable || state.length < state.highWaterMark || state.length === 0);\n }", "function howMuchToRead$1(n, state) {\n\t if (n <= 0 || state.length === 0 && state.ended) return 0;\n\t if (state.objectMode) return 1;\n\n\t if (n !== n) {\n\t // Only flow one buffer at a time\n\t if (state.flowing && state.length) return state.buffer.head.data.length;else return state.length;\n\t } // If we're asking for more than the current hwm, then raise the hwm.\n\n\n\t if (n > state.highWaterMark) state.highWaterMark = computeNewHighWaterMark$1(n);\n\t if (n <= state.length) return n; // Don't have enough\n\n\t if (!state.ended) {\n\t state.needReadable = true;\n\t return 0;\n\t }\n\n\t return state.length;\n\t} // you can override either this method, or the async _read(n) below.", "function needMoreData(state) {\n return !state.ended && (state.needReadable || state.length < state.highWaterMark || state.length === 0);\n }", "function needMoreData(state) {\n\t return !state.ended && (state.needReadable || state.length < state.highWaterMark || state.length === 0);\n\t}", "function needMoreData(state) {\n\t return !state.ended && (state.needReadable || state.length < state.highWaterMark || state.length === 0);\n\t}", "function needMoreData(state) {\n\t return !state.ended && (state.needReadable || state.length < state.highWaterMark || state.length === 0);\n\t}", "function needMoreData(state) {\n\t return !state.ended && (state.needReadable || state.length < state.highWaterMark || state.length === 0);\n\t}" ]
[ "0.730098", "0.6976404", "0.67713326", "0.6746773", "0.6746773", "0.6742494", "0.6742494", "0.67215955", "0.6689358", "0.6663105", "0.6655733", "0.66200536", "0.6566487", "0.65010446", "0.65003353", "0.65003353", "0.6484724", "0.6467524", "0.64654315", "0.6383285", "0.63813496", "0.63813496", "0.63813496", "0.63813496", "0.63813496", "0.63813496", "0.63813496", "0.63813496", "0.63813496", "0.63813496", "0.63813496", "0.63813496", "0.63813496", "0.63813496", "0.63813496", "0.63813496", "0.63813496", "0.63813496", "0.63813496", "0.63813496", "0.63813496", "0.63813496", "0.63813496", "0.63813496", "0.63813496", "0.63813496", "0.63813496", "0.63813496", "0.63813496", "0.63813496", "0.63813496", "0.63813496", "0.63813496", "0.63813496", "0.63813496", "0.63813496", "0.63813496", "0.63813496", "0.63813496", "0.63813496", "0.63813496", "0.63813496", "0.63813496", "0.63813496", "0.63813496", "0.63813496", "0.63813496", "0.63813496", "0.63813496", "0.63813496", "0.63813496", "0.63813496", "0.63813496", "0.63813496", "0.63813496", "0.63813496", "0.63813496", "0.63813496", "0.635241", "0.63519466", "0.63450336", "0.6330961", "0.6330961", "0.6330961", "0.6330961" ]
0.6335571
92
if the dest has an error, then stop piping into it. however, don't suppress the throwing behavior for this.
function onerror(er) { debug('onerror', er); unpipe(); dest.removeListener('error', onerror); if (EE.listenerCount(dest, 'error') === 0) dest.emit('error', er); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function onerror(er){debug(\"onerror\",er);unpipe();dest.removeListener(\"error\",onerror);if(EElistenerCount(dest,\"error\")===0)dest.emit(\"error\",er)}", "function onerror(er){debug('onerror',er);unpipe();dest.removeListener('error',onerror);if(EElistenerCount(dest,'error')===0)dest.emit('error',er);}// Make sure our error handler is attached before userland ones.", "function onerror(er){debug('onerror',er);unpipe();dest.removeListener('error',onerror);if(EElistenerCount(dest,'error')===0)dest.emit('error',er);}// Make sure our error handler is attached before userland ones.", "function onerror(er){debug('onerror',er);unpipe();dest.removeListener('error',onerror);if(EElistenerCount(dest,'error')===0)dest.emit('error',er);}// Make sure our error handler is attached before userland ones.", "function onerror(er) {\n\t unpipe();\n\t dest.removeListener('error', onerror);\n\t if (EE.listenerCount(dest, 'error') === 0)\n\t dest.emit('error', er);\n\t }", "function onerror(er) {\n\t unpipe();\n\t dest.removeListener('error', onerror);\n\t if (EE.listenerCount(dest, 'error') === 0)\n\t dest.emit('error', er);\n\t }", "function onerror(er) {\n unpipe();\n dest.removeListener('error', onerror);\n if (EE.listenerCount(dest, 'error') === 0) dest.emit('error', er);\n }", "function onerror(er) {\n unpipe();\n dest.removeListener('error', onerror);\n if (EE.listenerCount(dest, 'error') === 0)\n dest.emit('error', er);\n }", "function onerror(er) {\n unpipe();\n dest.removeListener('error', onerror);\n if (EE.listenerCount(dest, 'error') === 0)\n dest.emit('error', er);\n }", "function onerror(er) {\n unpipe();\n dest.removeListener('error', onerror);\n if (EE.listenerCount(dest, 'error') === 0)\n dest.emit('error', er);\n }", "function onerror(er) {\n unpipe();\n dest.removeListener('error', onerror);\n if (EE.listenerCount(dest, 'error') === 0)\n dest.emit('error', er);\n }", "function onerror(er) {\n unpipe();\n dest.removeListener('error', onerror);\n if (EE.listenerCount(dest, 'error') === 0)\n dest.emit('error', er);\n }", "function onerror(er) {\n unpipe();\n dest.removeListener('error', onerror);\n if (EE.listenerCount(dest, 'error') === 0)\n dest.emit('error', er);\n }", "function onerror(er) {\n unpipe();\n dest.removeListener('error', onerror);\n if (EE.listenerCount(dest, 'error') === 0)\n dest.emit('error', er);\n }", "function onerror(er) {\n unpipe();\n dest.removeListener('error', onerror);\n if (EE.listenerCount(dest, 'error') === 0)\n dest.emit('error', er);\n }", "function onerror(er) {\n unpipe();\n dest.removeListener('error', onerror);\n if (EE.listenerCount(dest, 'error') === 0)\n dest.emit('error', er);\n }", "function onerror(er) {\n unpipe();\n dest.removeListener('error', onerror);\n if (EE.listenerCount(dest, 'error') === 0)\n dest.emit('error', er);\n }", "function onerror(er) {\n unpipe();\n dest.removeListener('error', onerror);\n if (EE.listenerCount(dest, 'error') === 0)\n dest.emit('error', er);\n }", "function onerror(er) {\n unpipe();\n dest.removeListener('error', onerror);\n if (EE.listenerCount(dest, 'error') === 0)\n dest.emit('error', er);\n }", "function onerror(er) {\n unpipe();\n dest.removeListener('error', onerror);\n if (EE.listenerCount(dest, 'error') === 0)\n dest.emit('error', er);\n }", "function onerror(er) {\n unpipe();\n dest.removeListener('error', onerror);\n if (EE.listenerCount(dest, 'error') === 0)\n dest.emit('error', er);\n }", "function onerror(er) {\n unpipe();\n dest.removeListener('error', onerror);\n if (EE.listenerCount(dest, 'error') === 0)\n dest.emit('error', er);\n }", "function onerror(er) {\n unpipe();\n dest.removeListener('error', onerror);\n if (EE.listenerCount(dest, 'error') === 0)\n dest.emit('error', er);\n }", "function onerror(er) {\n unpipe();\n dest.removeListener('error', onerror);\n if (EE.listenerCount(dest, 'error') === 0)\n dest.emit('error', er);\n }", "function onerror(er) {\n unpipe();\n dest.removeListener('error', onerror);\n if (EE.listenerCount(dest, 'error') === 0)\n dest.emit('error', er);\n }", "function onerror(er) {\n unpipe();\n dest.removeListener('error', onerror);\n if (EE.listenerCount(dest, 'error') === 0)\n dest.emit('error', er);\n }", "function onerror(er) {\n unpipe();\n dest.removeListener('error', onerror);\n if (EE.listenerCount(dest, 'error') === 0)\n dest.emit('error', er);\n }", "function onerror(er) {\n unpipe();\n dest.removeListener('error', onerror);\n if (EE.listenerCount(dest, 'error') === 0)\n dest.emit('error', er);\n }", "function onerror(er) {\n unpipe();\n dest.removeListener('error', onerror);\n if (EE.listenerCount(dest, 'error') === 0)\n dest.emit('error', er);\n }", "function onerror(er) {\n unpipe();\n dest.removeListener('error', onerror);\n if (EE.listenerCount(dest, 'error') === 0)\n dest.emit('error', er);\n }", "function onerror(er) {\n unpipe();\n dest.removeListener('error', onerror);\n if (EE.listenerCount(dest, 'error') === 0)\n dest.emit('error', er);\n }", "function onerror(er) {\n unpipe();\n dest.removeListener('error', onerror);\n if (EE.listenerCount(dest, 'error') === 0)\n dest.emit('error', er);\n }", "function onerror(er) {\n unpipe();\n dest.removeListener('error', onerror);\n if (EE.listenerCount(dest, 'error') === 0)\n dest.emit('error', er);\n }", "function onerror(er) {\n unpipe();\n dest.removeListener('error', onerror);\n if (EE.listenerCount(dest, 'error') === 0)\n dest.emit('error', er);\n }", "function onerror(er) {\n unpipe();\n dest.removeListener('error', onerror);\n if (EE.listenerCount(dest, 'error') === 0)\n dest.emit('error', er);\n }", "function onerror(er) {\n debug('onerror', er);\n unpipe();\n dest.removeListener('error', onerror);\n if (EElistenerCount(dest, 'error') === 0)\n dest.emit('error', er);\n }", "function onerror(er) {\n debug('onerror', er);\n unpipe();\n dest.removeListener('error', onerror);\n if (dest.listenerCount('error') === 0) {\n const s = dest._writableState || dest._readableState;\n if (s && !s.errorEmitted) {\n // User incorrectly emitted 'error' directly on the stream.\n errorOrDestroy(dest, er);\n } else {\n dest.emit('error', er);\n }\n }\n } // Make sure our error handler is attached before userland ones.", "function onerror(er) {\n debug('onerror', er);\n unpipe();\n dest.removeListener('error', onerror);\n if (EElistenerCount(dest, 'error') === 0) dest.emit('error', er);\n }", "function onerror(er) {\n\t debug('onerror', er);\n\t unpipe();\n\t dest.removeListener('error', onerror);\n\t if (listenerCount(dest, 'error') === 0) dest.emit('error', er);\n\t }", "function onerror(er) {\n\t debug('onerror', er);\n\t unpipe();\n\t dest.removeListener('error', onerror);\n\t if (listenerCount(dest, 'error') === 0) dest.emit('error', er);\n\t }", "function onerror(er) {\n\t debug('onerror', er);\n\t unpipe();\n\t dest.removeListener('error', onerror);\n\t if (EE.listenerCount(dest, 'error') === 0) dest.emit('error', er);\n\t }", "function onerror(er) {\n debug('onerror', er);\n unpipe();\n dest.removeListener('error', onerror);\n if (listenerCount$1(dest, 'error') === 0) dest.emit('error', er);\n }", "function onerror(er) {\n debug('onerror', er);\n unpipe();\n dest.removeListener('error', onerror);\n if (listenerCount$1(dest, 'error') === 0) dest.emit('error', er);\n }", "function onerror(er) {\n debug('onerror', er);\n unpipe();\n dest.removeListener('error', onerror);\n if (listenerCount(dest, 'error') === 0) dest.emit('error', er);\n }", "function onerror(er) {\n\t debug('onerror', er);\n\t unpipe();\n\t dest.removeListener('error', onerror);\n\t if (listenerCount$1(dest, 'error') === 0) dest.emit('error', er);\n\t }", "function onerror(er) {\n\t debug('onerror', er);\n\t unpipe();\n\t dest.removeListener('error', onerror);\n\t if (listenerCount$1(dest, 'error') === 0) dest.emit('error', er);\n\t }", "function onerror(er) {\n\t debug('onerror', er);\n\t unpipe();\n\t dest.removeListener('error', onerror);\n\t if (listenerCount$1(dest, 'error') === 0) dest.emit('error', er);\n\t }", "function onerror(er) {\n debug('onerror', er);\n unpipe();\n dest.removeListener('error', onerror);\n if (EE.listenerCount(dest, 'error') === 0)\n dest.emit('error', er);\n }", "function onerror(er) {\n debug('onerror', er);\n unpipe();\n dest.removeListener('error', onerror);\n if (EE.listenerCount(dest, 'error') === 0)\n dest.emit('error', er);\n }", "function onerror(er) {\n debug('onerror', er);\n unpipe();\n dest.removeListener('error', onerror);\n if (listenerCount$1(dest, 'error') === 0) dest.emit('error', er);\n }", "function onerror(er) {\n debug('onerror', er);\n unpipe();\n dest.removeListener('error', onerror);\n if (listenerCount$1(dest, 'error') === 0) dest.emit('error', er);\n }", "function onerror(er) {\n debug('onerror', er);\n unpipe();\n dest.removeListener('error', onerror);\n if (EE.listenerCount(dest, 'error') === 0)\n dest.emit('error', er);\n }", "function onerror(er) {\n debug('onerror', er);\n unpipe();\n dest.removeListener('error', onerror);\n if (EE.listenerCount(dest, 'error') === 0)\n dest.emit('error', er);\n }", "function onerror(er) {\n debug('onerror', er);\n unpipe();\n dest.removeListener('error', onerror);\n if (EE.listenerCount(dest, 'error') === 0)\n dest.emit('error', er);\n }", "function onerror(er) {\n debug('onerror', er);\n unpipe();\n dest.removeListener('error', onerror);\n if (EE.listenerCount(dest, 'error') === 0)\n dest.emit('error', er);\n }", "function onerror(er) {\n debug('onerror', er);\n unpipe();\n dest.removeListener('error', onerror);\n if (EE.listenerCount(dest, 'error') === 0)\n dest.emit('error', er);\n }", "function onerror(er) {\n debug('onerror', er);\n unpipe();\n dest.removeListener('error', onerror);\n if (EE.listenerCount(dest, 'error') === 0)\n dest.emit('error', er);\n }", "function onerror(er) {\n debug('onerror', er);\n unpipe();\n dest.removeListener('error', onerror);\n if (EE.listenerCount(dest, 'error') === 0)\n dest.emit('error', er);\n }", "function onerror(er) {\n debug('onerror', er);\n unpipe();\n dest.removeListener('error', onerror);\n if (EE.listenerCount(dest, 'error') === 0)\n dest.emit('error', er);\n }", "function onerror(er) {\n debug('onerror', er);\n unpipe();\n dest.removeListener('error', onerror);\n if (EE.listenerCount(dest, 'error') === 0)\n dest.emit('error', er);\n }", "function onerror(er) {\n debug('onerror', er);\n unpipe();\n dest.removeListener('error', onerror);\n if (EE.listenerCount(dest, 'error') === 0)\n dest.emit('error', er);\n }", "function onerror(er) {\n debug('onerror', er);\n unpipe();\n dest.removeListener('error', onerror);\n if (EE.listenerCount(dest, 'error') === 0)\n dest.emit('error', er);\n }", "function onerror(er) {\n debug('onerror', er);\n unpipe();\n dest.removeListener('error', onerror);\n if (EE.listenerCount(dest, 'error') === 0)\n dest.emit('error', er);\n }", "function onerror(er) {\n debug('onerror', er);\n unpipe();\n dest.removeListener('error', onerror);\n if (EE.listenerCount(dest, 'error') === 0)\n dest.emit('error', er);\n }", "function onerror(er) {\n debug('onerror', er);\n unpipe();\n dest.removeListener('error', onerror);\n if (EE.listenerCount(dest, 'error') === 0)\n dest.emit('error', er);\n }", "function onerror(er) {\n debug('onerror', er);\n unpipe();\n dest.removeListener('error', onerror);\n if (EE.listenerCount(dest, 'error') === 0)\n dest.emit('error', er);\n }", "function onerror(er) {\n debug('onerror', er);\n unpipe();\n dest.removeListener('error', onerror);\n if (EE.listenerCount(dest, 'error') === 0)\n dest.emit('error', er);\n }", "function onerror(er) {\n debug('onerror', er);\n unpipe();\n dest.removeListener('error', onerror);\n if (EE.listenerCount(dest, 'error') === 0)\n dest.emit('error', er);\n }", "function onerror(er) {\n debug('onerror', er);\n unpipe();\n dest.removeListener('error', onerror);\n if (EE.listenerCount(dest, 'error') === 0)\n dest.emit('error', er);\n }", "function onerror(er) {\n debug('onerror', er);\n unpipe();\n dest.removeListener('error', onerror);\n if (EE.listenerCount(dest, 'error') === 0)\n dest.emit('error', er);\n }", "function onerror(er) {\n debug('onerror', er);\n unpipe();\n dest.removeListener('error', onerror);\n if (EE.listenerCount(dest, 'error') === 0)\n dest.emit('error', er);\n }", "function onerror(er) {\n debug('onerror', er);\n unpipe();\n dest.removeListener('error', onerror);\n if (EE.listenerCount(dest, 'error') === 0)\n dest.emit('error', er);\n }", "function onerror(er) {\n debug('onerror', er);\n unpipe();\n dest.removeListener('error', onerror);\n if (EE.listenerCount(dest, 'error') === 0)\n dest.emit('error', er);\n }", "function onerror(er) {\n debug('onerror', er);\n unpipe();\n dest.removeListener('error', onerror);\n if (EE.listenerCount(dest, 'error') === 0)\n dest.emit('error', er);\n }", "function onerror(er) {\n debug('onerror', er);\n unpipe();\n dest.removeListener('error', onerror);\n if (EE.listenerCount(dest, 'error') === 0)\n dest.emit('error', er);\n }", "function onerror(er) {\n debug('onerror', er);\n unpipe();\n dest.removeListener('error', onerror);\n if (EE.listenerCount(dest, 'error') === 0)\n dest.emit('error', er);\n }", "function onerror(er) {\n debug('onerror', er);\n unpipe();\n dest.removeListener('error', onerror);\n if (EE.listenerCount(dest, 'error') === 0)\n dest.emit('error', er);\n }", "function onerror(er) {\n debug('onerror', er);\n unpipe();\n dest.removeListener('error', onerror);\n if (EE.listenerCount(dest, 'error') === 0)\n dest.emit('error', er);\n }", "function onerror(er) {\n debug('onerror', er);\n unpipe();\n dest.removeListener('error', onerror);\n if (EE.listenerCount(dest, 'error') === 0)\n dest.emit('error', er);\n }", "function onerror(er) {\n\t debug('onerror', er);\n\t unpipe();\n\t dest.removeListener('error', onerror);\n\t if (EElistenerCount(dest, 'error') === 0) dest.emit('error', er);\n\t }", "function onerror(er) {\n\t debug('onerror', er);\n\t unpipe();\n\t dest.removeListener('error', onerror);\n\t if (EElistenerCount(dest, 'error') === 0) dest.emit('error', er);\n\t }", "function onerror(er) {\n\t debug('onerror', er);\n\t unpipe();\n\t dest.removeListener('error', onerror);\n\t if (EElistenerCount(dest, 'error') === 0) dest.emit('error', er);\n\t }", "function onerror(er) {\n\t debug('onerror', er);\n\t unpipe();\n\t dest.removeListener('error', onerror);\n\t if (EElistenerCount(dest, 'error') === 0) dest.emit('error', er);\n\t }", "function onerror(er) {\n\t debug('onerror', er);\n\t unpipe();\n\t dest.removeListener('error', onerror);\n\t if (EElistenerCount(dest, 'error') === 0) dest.emit('error', er);\n\t }", "function onerror(er) {\n\t debug('onerror', er);\n\t unpipe();\n\t dest.removeListener('error', onerror);\n\t if (EElistenerCount(dest, 'error') === 0) dest.emit('error', er);\n\t }", "function onerror(er) {\n\t debug('onerror', er);\n\t unpipe();\n\t dest.removeListener('error', onerror);\n\t if (EElistenerCount(dest, 'error') === 0) dest.emit('error', er);\n\t }" ]
[ "0.76037115", "0.7207509", "0.7207509", "0.7207509", "0.71483916", "0.71483916", "0.71426207", "0.712505", "0.712505", "0.712505", "0.712505", "0.712505", "0.712505", "0.712505", "0.712505", "0.712505", "0.712505", "0.712505", "0.712505", "0.712505", "0.712505", "0.712505", "0.712505", "0.712505", "0.712505", "0.712505", "0.712505", "0.712505", "0.712505", "0.712505", "0.712505", "0.712505", "0.712505", "0.712505", "0.712505", "0.7002624", "0.69997066", "0.69730365", "0.6924674", "0.6924674", "0.6908988", "0.6902022", "0.69002813", "0.6890788", "0.6882709", "0.6882709", "0.6882709", "0.6876214", "0.6876214", "0.6872053", "0.6872053", "0.68663925", "0.68663925", "0.68663925", "0.68663925", "0.68663925", "0.68663925", "0.68663925", "0.68663925", "0.68663925", "0.68663925", "0.68663925", "0.68663925", "0.68663925", "0.68663925", "0.68663925", "0.68663925", "0.68663925", "0.68663925", "0.68663925", "0.68663925", "0.68663925", "0.68663925", "0.68663925", "0.68663925", "0.68663925", "0.68663925", "0.68663925", "0.68663925", "0.685563", "0.685563", "0.685563", "0.685563", "0.685563", "0.685563", "0.685563" ]
0.6961965
51
Both close and finish should trigger unpipe, but only once.
function onclose() { dest.removeListener('finish', onfinish); unpipe(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function onclose(){dest.removeListener('finish',onfinish);unpipe();}", "function onclose(){dest.removeListener('finish',onfinish);unpipe();}", "function onclose(){dest.removeListener('finish',onfinish);unpipe();}", "function onclose(){dest.removeListener('finish',onfinish);unpipe();}", "function onclose(){dest.removeListener(\"finish\",onfinish);unpipe()}", "function onclose() {\n dest.removeListener('finish', onfinish);\n unpipe();\n }", "function onclose() {\n dest.removeListener('finish', onfinish);\n unpipe();\n }", "function onclose() {\n dest.removeListener('finish', onfinish);\n unpipe();\n }", "function onclose() {\n dest.removeListener('finish', onfinish);\n unpipe();\n }", "function onclose() {\n dest.removeListener('finish', onfinish);\n unpipe();\n }", "function onclose() {\n dest.removeListener('finish', onfinish);\n unpipe();\n }", "function onclose() {\n dest.removeListener('finish', onfinish);\n unpipe();\n }", "function onclose() {\n dest.removeListener('finish', onfinish);\n unpipe();\n }", "function onclose() {\n dest.removeListener('finish', onfinish);\n unpipe();\n }", "function onclose() {\r\n dest.removeListener('finish', onfinish);\r\n unpipe();\r\n }", "function onclose() {\n dest.removeListener('finish', onfinish);\n unpipe();\n }", "function onclose() {\n dest.removeListener('finish', onfinish);\n unpipe();\n }", "function onclose() {\n dest.removeListener('finish', onfinish);\n unpipe();\n }", "function onclose() {\n dest.removeListener('finish', onfinish);\n unpipe();\n }", "function onclose() {\n dest.removeListener('finish', onfinish);\n unpipe();\n }", "function onclose() {\n dest.removeListener('finish', onfinish);\n unpipe();\n }", "function onclose() {\n dest.removeListener('finish', onfinish);\n unpipe();\n }", "function onclose() {\n dest.removeListener('finish', onfinish);\n unpipe();\n }", "function onclose() {\n dest.removeListener('finish', onfinish);\n unpipe();\n }", "function onclose() {\n dest.removeListener('finish', onfinish);\n unpipe();\n }", "function onclose() {\n dest.removeListener('finish', onfinish);\n unpipe();\n }", "function onclose() {\n dest.removeListener('finish', onfinish);\n unpipe();\n }", "function onclose() {\n dest.removeListener('finish', onfinish);\n unpipe();\n }", "function onclose() {\n dest.removeListener('finish', onfinish);\n unpipe();\n }", "function onclose() {\n dest.removeListener('finish', onfinish);\n unpipe();\n }", "function onclose() {\n dest.removeListener('finish', onfinish);\n unpipe();\n }", "function onclose() {\n dest.removeListener('finish', onfinish);\n unpipe();\n }", "function onclose() {\n dest.removeListener('finish', onfinish);\n unpipe();\n }", "function onclose() {\n dest.removeListener('finish', onfinish);\n unpipe();\n }", "function onclose() {\n dest.removeListener('finish', onfinish);\n unpipe();\n }", "function onclose() {\n dest.removeListener('finish', onfinish);\n unpipe();\n }", "function onclose() {\n dest.removeListener('finish', onfinish);\n unpipe();\n }", "function onclose() {\n dest.removeListener('finish', onfinish);\n unpipe();\n }", "function onclose() {\n dest.removeListener('finish', onfinish);\n unpipe();\n }", "function onclose() {\n dest.removeListener('finish', onfinish);\n unpipe();\n }", "function onclose() {\n dest.removeListener('finish', onfinish);\n unpipe();\n }", "function onclose() {\n dest.removeListener('finish', onfinish);\n unpipe();\n }", "function onclose() {\n dest.removeListener('finish', onfinish);\n unpipe();\n }", "function onclose() {\n dest.removeListener('finish', onfinish);\n unpipe();\n }", "function onclose() {\n dest.removeListener('finish', onfinish);\n unpipe();\n }", "function onclose() {\n dest.removeListener('finish', onfinish);\n unpipe();\n }", "function onclose() {\n dest.removeListener('finish', onfinish);\n unpipe();\n }", "function onclose() {\n dest.removeListener('finish', onfinish);\n unpipe();\n }", "function onclose() {\n dest.removeListener('finish', onfinish);\n unpipe();\n }", "function onclose() {\n dest.removeListener('finish', onfinish);\n unpipe();\n }", "function onclose() {\n dest.removeListener('finish', onfinish);\n unpipe();\n }", "function onclose() {\n dest.removeListener('finish', onfinish);\n unpipe();\n }", "function onclose() {\n dest.removeListener('finish', onfinish);\n unpipe();\n }", "function onclose() {\n dest.removeListener('finish', onfinish);\n unpipe();\n }", "function onclose() {\n dest.removeListener('finish', onfinish);\n unpipe();\n }", "function onclose() {\n dest.removeListener('finish', onfinish);\n unpipe();\n }", "function onclose() {\n dest.removeListener('finish', onfinish);\n unpipe();\n }", "function onclose() {\n dest.removeListener('finish', onfinish);\n unpipe();\n }", "function onclose() {\n dest.removeListener('finish', onfinish);\n unpipe();\n }", "function onclose() {\n dest.removeListener('finish', onfinish);\n unpipe();\n }" ]
[ "0.79411215", "0.79411215", "0.79411215", "0.79411215", "0.79409623", "0.7933108", "0.78863096", "0.7816656", "0.78133255", "0.78133255", "0.78133255", "0.77925515", "0.77731764", "0.77731764", "0.7731312", "0.76912314", "0.76912314", "0.76912314", "0.76912314", "0.76912314", "0.76912314", "0.76912314", "0.76912314", "0.76912314", "0.76912314", "0.76912314", "0.76912314", "0.76912314", "0.76912314", "0.76912314", "0.76912314", "0.76912314", "0.76912314", "0.76912314", "0.76912314", "0.76912314", "0.76912314", "0.76912314", "0.76912314", "0.76912314", "0.76912314", "0.76912314", "0.76912314", "0.76912314", "0.76912314", "0.76912314", "0.76912314", "0.76912314", "0.76912314", "0.76912314", "0.76912314", "0.76912314", "0.76912314", "0.76912314", "0.76912314", "0.76912314", "0.76912314", "0.76912314", "0.76912314", "0.76912314" ]
0.7979085
35
Pluck off n bytes from an array of buffers. Length is the combined lengths of all the buffers in the list.
function fromList(n, state) { var list = state.buffer; var length = state.length; var stringMode = !!state.decoder; var objectMode = !!state.objectMode; var ret; // nothing in the list, definitely empty. if (list.length === 0) return null; if (length === 0) ret = null; else if (objectMode) ret = list.shift(); else if (!n || n >= length) { // read it all, truncate the array. if (stringMode) ret = list.join(''); else ret = Buffer.concat(list, length); list.length = 0; } else { // read just some of it. if (n < list[0].length) { // just take a part of the first list item. // slice is the same for buffers and strings. var buf = list[0]; ret = buf.slice(0, n); list[0] = buf.slice(n); } else if (n === list[0].length) { // first list is a perfect match ret = list.shift(); } else { // complex case. // we have enough to cover it, but it spans past the first buffer. if (stringMode) ret = ''; else ret = new Buffer(n); var c = 0; for (var i = 0, l = list.length; i < l && c < n; i++) { var buf = list[0]; var cpy = Math.min(n - c, buf.length); if (stringMode) ret += buf.slice(0, cpy); else buf.copy(ret, c, 0, cpy); if (cpy < buf.length) list[0] = buf.slice(cpy); else list.shift(); c += cpy; } } } return ret; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function copyFromBuffer(n, list) {\n var ret = Buffer.allocUnsafe(n);\n var p = list.head;\n var c = 1;\n p.data.copy(ret);\n n -= p.data.length;\n while (p = p.next) {\n var buf = p.data;\n var nb = n > buf.length ? buf.length : n;\n buf.copy(ret, ret.length - n, 0, nb);\n n -= nb;\n if (n === 0) {\n if (nb === buf.length) {\n ++c;\n if (p.next) list.head = p.next;else list.head = list.tail = null;\n } else {\n list.head = p;\n p.data = buf.slice(nb);\n }\n break;\n }\n ++c;\n }\n list.length -= c;\n return ret;\n}", "function copyFromBuffer(n, list) {\n var ret = Buffer.allocUnsafe(n);\n var p = list.head;\n var c = 1;\n p.data.copy(ret);\n n -= p.data.length;\n while (p = p.next) {\n var buf = p.data;\n var nb = n > buf.length ? buf.length : n;\n buf.copy(ret, ret.length - n, 0, nb);\n n -= nb;\n if (n === 0) {\n if (nb === buf.length) {\n ++c;\n if (p.next) list.head = p.next;else list.head = list.tail = null;\n } else {\n list.head = p;\n p.data = buf.slice(nb);\n }\n break;\n }\n ++c;\n }\n list.length -= c;\n return ret;\n}", "function copyFromBuffer(n, list) {\n var ret = Buffer.allocUnsafe(n);\n var p = list.head;\n var c = 1;\n p.data.copy(ret);\n n -= p.data.length;\n while (p = p.next) {\n var buf = p.data;\n var nb = n > buf.length ? buf.length : n;\n buf.copy(ret, ret.length - n, 0, nb);\n n -= nb;\n if (n === 0) {\n if (nb === buf.length) {\n ++c;\n if (p.next) list.head = p.next;else list.head = list.tail = null;\n } else {\n list.head = p;\n p.data = buf.slice(nb);\n }\n break;\n }\n ++c;\n }\n list.length -= c;\n return ret;\n}", "function copyFromBuffer(n, list) {\n var ret = Buffer.allocUnsafe(n);\n var p = list.head;\n var c = 1;\n p.data.copy(ret);\n n -= p.data.length;\n while (p = p.next) {\n var buf = p.data;\n var nb = n > buf.length ? buf.length : n;\n buf.copy(ret, ret.length - n, 0, nb);\n n -= nb;\n if (n === 0) {\n if (nb === buf.length) {\n ++c;\n if (p.next) list.head = p.next;else list.head = list.tail = null;\n } else {\n list.head = p;\n p.data = buf.slice(nb);\n }\n break;\n }\n ++c;\n }\n list.length -= c;\n return ret;\n}", "function copyFromBuffer(n, list) {\n var ret = Buffer.allocUnsafe(n);\n var p = list.head;\n var c = 1;\n p.data.copy(ret);\n n -= p.data.length;\n while (p = p.next) {\n var buf = p.data;\n var nb = n > buf.length ? buf.length : n;\n buf.copy(ret, ret.length - n, 0, nb);\n n -= nb;\n if (n === 0) {\n if (nb === buf.length) {\n ++c;\n if (p.next) list.head = p.next;else list.head = list.tail = null;\n } else {\n list.head = p;\n p.data = buf.slice(nb);\n }\n break;\n }\n ++c;\n }\n list.length -= c;\n return ret;\n}", "function copyFromBuffer(n, list) {\n var ret = Buffer.allocUnsafe(n);\n var p = list.head;\n var c = 1;\n p.data.copy(ret);\n n -= p.data.length;\n while (p = p.next) {\n var buf = p.data;\n var nb = n > buf.length ? buf.length : n;\n buf.copy(ret, ret.length - n, 0, nb);\n n -= nb;\n if (n === 0) {\n if (nb === buf.length) {\n ++c;\n if (p.next) list.head = p.next;else list.head = list.tail = null;\n } else {\n list.head = p;\n p.data = buf.slice(nb);\n }\n break;\n }\n ++c;\n }\n list.length -= c;\n return ret;\n}", "function copyFromBuffer(n, list) {\n var ret = Buffer.allocUnsafe(n);\n var p = list.head;\n var c = 1;\n p.data.copy(ret);\n n -= p.data.length;\n while (p = p.next) {\n var buf = p.data;\n var nb = n > buf.length ? buf.length : n;\n buf.copy(ret, ret.length - n, 0, nb);\n n -= nb;\n if (n === 0) {\n if (nb === buf.length) {\n ++c;\n if (p.next) list.head = p.next;else list.head = list.tail = null;\n } else {\n list.head = p;\n p.data = buf.slice(nb);\n }\n break;\n }\n ++c;\n }\n list.length -= c;\n return ret;\n}", "function copyFromBuffer(n, list) {\n var ret = Buffer.allocUnsafe(n);\n var p = list.head;\n var c = 1;\n p.data.copy(ret);\n n -= p.data.length;\n while (p = p.next) {\n var buf = p.data;\n var nb = n > buf.length ? buf.length : n;\n buf.copy(ret, ret.length - n, 0, nb);\n n -= nb;\n if (n === 0) {\n if (nb === buf.length) {\n ++c;\n if (p.next) list.head = p.next;else list.head = list.tail = null;\n } else {\n list.head = p;\n p.data = buf.slice(nb);\n }\n break;\n }\n ++c;\n }\n list.length -= c;\n return ret;\n}", "function copyFromBuffer(n, list) {\n var ret = Buffer.allocUnsafe(n);\n var p = list.head;\n var c = 1;\n p.data.copy(ret);\n n -= p.data.length;\n while (p = p.next) {\n var buf = p.data;\n var nb = n > buf.length ? buf.length : n;\n buf.copy(ret, ret.length - n, 0, nb);\n n -= nb;\n if (n === 0) {\n if (nb === buf.length) {\n ++c;\n if (p.next) list.head = p.next;else list.head = list.tail = null;\n } else {\n list.head = p;\n p.data = buf.slice(nb);\n }\n break;\n }\n ++c;\n }\n list.length -= c;\n return ret;\n}", "function copyFromBuffer(n, list) {\n var ret = Buffer.allocUnsafe(n);\n var p = list.head;\n var c = 1;\n p.data.copy(ret);\n n -= p.data.length;\n while (p = p.next) {\n var buf = p.data;\n var nb = n > buf.length ? buf.length : n;\n buf.copy(ret, ret.length - n, 0, nb);\n n -= nb;\n if (n === 0) {\n if (nb === buf.length) {\n ++c;\n if (p.next) list.head = p.next;else list.head = list.tail = null;\n } else {\n list.head = p;\n p.data = buf.slice(nb);\n }\n break;\n }\n ++c;\n }\n list.length -= c;\n return ret;\n}", "function copyFromBuffer(n, list) {\n var ret = Buffer.allocUnsafe(n);\n var p = list.head;\n var c = 1;\n p.data.copy(ret);\n n -= p.data.length;\n while (p = p.next) {\n var buf = p.data;\n var nb = n > buf.length ? buf.length : n;\n buf.copy(ret, ret.length - n, 0, nb);\n n -= nb;\n if (n === 0) {\n if (nb === buf.length) {\n ++c;\n if (p.next) list.head = p.next;else list.head = list.tail = null;\n } else {\n list.head = p;\n p.data = buf.slice(nb);\n }\n break;\n }\n ++c;\n }\n list.length -= c;\n return ret;\n}", "function copyFromBuffer(n, list) {\n var ret = Buffer.allocUnsafe(n);\n var p = list.head;\n var c = 1;\n p.data.copy(ret);\n n -= p.data.length;\n while (p = p.next) {\n var buf = p.data;\n var nb = n > buf.length ? buf.length : n;\n buf.copy(ret, ret.length - n, 0, nb);\n n -= nb;\n if (n === 0) {\n if (nb === buf.length) {\n ++c;\n if (p.next) list.head = p.next;else list.head = list.tail = null;\n } else {\n list.head = p;\n p.data = buf.slice(nb);\n }\n break;\n }\n ++c;\n }\n list.length -= c;\n return ret;\n}", "function copyFromBuffer(n, list) {\n var ret = Buffer.allocUnsafe(n);\n var p = list.head;\n var c = 1;\n p.data.copy(ret);\n n -= p.data.length;\n while (p = p.next) {\n var buf = p.data;\n var nb = n > buf.length ? buf.length : n;\n buf.copy(ret, ret.length - n, 0, nb);\n n -= nb;\n if (n === 0) {\n if (nb === buf.length) {\n ++c;\n if (p.next) list.head = p.next;else list.head = list.tail = null;\n } else {\n list.head = p;\n p.data = buf.slice(nb);\n }\n break;\n }\n ++c;\n }\n list.length -= c;\n return ret;\n}", "function copyFromBuffer(n, list) {\n var ret = Buffer.allocUnsafe(n);\n var p = list.head;\n var c = 1;\n p.data.copy(ret);\n n -= p.data.length;\n while (p = p.next) {\n var buf = p.data;\n var nb = n > buf.length ? buf.length : n;\n buf.copy(ret, ret.length - n, 0, nb);\n n -= nb;\n if (n === 0) {\n if (nb === buf.length) {\n ++c;\n if (p.next) list.head = p.next;else list.head = list.tail = null;\n } else {\n list.head = p;\n p.data = buf.slice(nb);\n }\n break;\n }\n ++c;\n }\n list.length -= c;\n return ret;\n}", "function copyFromBuffer(n, list) {\n var ret = Buffer.allocUnsafe(n);\n var p = list.head;\n var c = 1;\n p.data.copy(ret);\n n -= p.data.length;\n while (p = p.next) {\n var buf = p.data;\n var nb = n > buf.length ? buf.length : n;\n buf.copy(ret, ret.length - n, 0, nb);\n n -= nb;\n if (n === 0) {\n if (nb === buf.length) {\n ++c;\n if (p.next) list.head = p.next;else list.head = list.tail = null;\n } else {\n list.head = p;\n p.data = buf.slice(nb);\n }\n break;\n }\n ++c;\n }\n list.length -= c;\n return ret;\n}", "function copyFromBuffer(n, list) {\n var ret = Buffer.allocUnsafe(n);\n var p = list.head;\n var c = 1;\n p.data.copy(ret);\n n -= p.data.length;\n while (p = p.next) {\n var buf = p.data;\n var nb = n > buf.length ? buf.length : n;\n buf.copy(ret, ret.length - n, 0, nb);\n n -= nb;\n if (n === 0) {\n if (nb === buf.length) {\n ++c;\n if (p.next) list.head = p.next;else list.head = list.tail = null;\n } else {\n list.head = p;\n p.data = buf.slice(nb);\n }\n break;\n }\n ++c;\n }\n list.length -= c;\n return ret;\n}", "function copyFromBuffer(n, list) {\n var ret = Buffer.allocUnsafe(n);\n var p = list.head;\n var c = 1;\n p.data.copy(ret);\n n -= p.data.length;\n while (p = p.next) {\n var buf = p.data;\n var nb = n > buf.length ? buf.length : n;\n buf.copy(ret, ret.length - n, 0, nb);\n n -= nb;\n if (n === 0) {\n if (nb === buf.length) {\n ++c;\n if (p.next) list.head = p.next;else list.head = list.tail = null;\n } else {\n list.head = p;\n p.data = buf.slice(nb);\n }\n break;\n }\n ++c;\n }\n list.length -= c;\n return ret;\n}", "function copyFromBuffer(n, list) {\n var ret = Buffer.allocUnsafe(n);\n var p = list.head;\n var c = 1;\n p.data.copy(ret);\n n -= p.data.length;\n while (p = p.next) {\n var buf = p.data;\n var nb = n > buf.length ? buf.length : n;\n buf.copy(ret, ret.length - n, 0, nb);\n n -= nb;\n if (n === 0) {\n if (nb === buf.length) {\n ++c;\n if (p.next) list.head = p.next;else list.head = list.tail = null;\n } else {\n list.head = p;\n p.data = buf.slice(nb);\n }\n break;\n }\n ++c;\n }\n list.length -= c;\n return ret;\n}", "function copyFromBuffer(n, list) {\n var ret = Buffer.allocUnsafe(n);\n var p = list.head;\n var c = 1;\n p.data.copy(ret);\n n -= p.data.length;\n while (p = p.next) {\n var buf = p.data;\n var nb = n > buf.length ? buf.length : n;\n buf.copy(ret, ret.length - n, 0, nb);\n n -= nb;\n if (n === 0) {\n if (nb === buf.length) {\n ++c;\n if (p.next) list.head = p.next;else list.head = list.tail = null;\n } else {\n list.head = p;\n p.data = buf.slice(nb);\n }\n break;\n }\n ++c;\n }\n list.length -= c;\n return ret;\n}", "function copyFromBuffer(n, list) {\n var ret = Buffer.allocUnsafe(n);\n var p = list.head;\n var c = 1;\n p.data.copy(ret);\n n -= p.data.length;\n while (p = p.next) {\n var buf = p.data;\n var nb = n > buf.length ? buf.length : n;\n buf.copy(ret, ret.length - n, 0, nb);\n n -= nb;\n if (n === 0) {\n if (nb === buf.length) {\n ++c;\n if (p.next) list.head = p.next;else list.head = list.tail = null;\n } else {\n list.head = p;\n p.data = buf.slice(nb);\n }\n break;\n }\n ++c;\n }\n list.length -= c;\n return ret;\n}", "function copyFromBuffer(n, list) {\n var ret = Buffer.allocUnsafe(n);\n var p = list.head;\n var c = 1;\n p.data.copy(ret);\n n -= p.data.length;\n while (p = p.next) {\n var buf = p.data;\n var nb = n > buf.length ? buf.length : n;\n buf.copy(ret, ret.length - n, 0, nb);\n n -= nb;\n if (n === 0) {\n if (nb === buf.length) {\n ++c;\n if (p.next) list.head = p.next;else list.head = list.tail = null;\n } else {\n list.head = p;\n p.data = buf.slice(nb);\n }\n break;\n }\n ++c;\n }\n list.length -= c;\n return ret;\n}", "function copyFromBuffer(n, list) {\n var ret = Buffer.allocUnsafe(n);\n var p = list.head;\n var c = 1;\n p.data.copy(ret);\n n -= p.data.length;\n while (p = p.next) {\n var buf = p.data;\n var nb = n > buf.length ? buf.length : n;\n buf.copy(ret, ret.length - n, 0, nb);\n n -= nb;\n if (n === 0) {\n if (nb === buf.length) {\n ++c;\n if (p.next) list.head = p.next;else list.head = list.tail = null;\n } else {\n list.head = p;\n p.data = buf.slice(nb);\n }\n break;\n }\n ++c;\n }\n list.length -= c;\n return ret;\n}", "function copyFromBuffer(n, list) {\n var ret = Buffer.allocUnsafe(n);\n var p = list.head;\n var c = 1;\n p.data.copy(ret);\n n -= p.data.length;\n while (p = p.next) {\n var buf = p.data;\n var nb = n > buf.length ? buf.length : n;\n buf.copy(ret, ret.length - n, 0, nb);\n n -= nb;\n if (n === 0) {\n if (nb === buf.length) {\n ++c;\n if (p.next) list.head = p.next;else list.head = list.tail = null;\n } else {\n list.head = p;\n p.data = buf.slice(nb);\n }\n break;\n }\n ++c;\n }\n list.length -= c;\n return ret;\n}", "function copyFromBuffer(n, list) {\n var ret = Buffer.allocUnsafe(n);\n var p = list.head;\n var c = 1;\n p.data.copy(ret);\n n -= p.data.length;\n while (p = p.next) {\n var buf = p.data;\n var nb = n > buf.length ? buf.length : n;\n buf.copy(ret, ret.length - n, 0, nb);\n n -= nb;\n if (n === 0) {\n if (nb === buf.length) {\n ++c;\n if (p.next) list.head = p.next;else list.head = list.tail = null;\n } else {\n list.head = p;\n p.data = buf.slice(nb);\n }\n break;\n }\n ++c;\n }\n list.length -= c;\n return ret;\n}", "function copyFromBuffer(n, list) {\n var ret = Buffer.allocUnsafe(n);\n var p = list.head;\n var c = 1;\n p.data.copy(ret);\n n -= p.data.length;\n while (p = p.next) {\n var buf = p.data;\n var nb = n > buf.length ? buf.length : n;\n buf.copy(ret, ret.length - n, 0, nb);\n n -= nb;\n if (n === 0) {\n if (nb === buf.length) {\n ++c;\n if (p.next) list.head = p.next;else list.head = list.tail = null;\n } else {\n list.head = p;\n p.data = buf.slice(nb);\n }\n break;\n }\n ++c;\n }\n list.length -= c;\n return ret;\n}", "function copyFromBuffer(n, list) {\n var ret = Buffer.allocUnsafe(n);\n var p = list.head;\n var c = 1;\n p.data.copy(ret);\n n -= p.data.length;\n while (p = p.next) {\n var buf = p.data;\n var nb = n > buf.length ? buf.length : n;\n buf.copy(ret, ret.length - n, 0, nb);\n n -= nb;\n if (n === 0) {\n if (nb === buf.length) {\n ++c;\n if (p.next) list.head = p.next;else list.head = list.tail = null;\n } else {\n list.head = p;\n p.data = buf.slice(nb);\n }\n break;\n }\n ++c;\n }\n list.length -= c;\n return ret;\n}", "function copyFromBuffer(n, list) {\n var ret = Buffer.allocUnsafe(n);\n var p = list.head;\n var c = 1;\n p.data.copy(ret);\n n -= p.data.length;\n while (p = p.next) {\n var buf = p.data;\n var nb = n > buf.length ? buf.length : n;\n buf.copy(ret, ret.length - n, 0, nb);\n n -= nb;\n if (n === 0) {\n if (nb === buf.length) {\n ++c;\n if (p.next) list.head = p.next;else list.head = list.tail = null;\n } else {\n list.head = p;\n p.data = buf.slice(nb);\n }\n break;\n }\n ++c;\n }\n list.length -= c;\n return ret;\n}", "function copyFromBuffer(n, list) {\n var ret = Buffer.allocUnsafe(n);\n var p = list.head;\n var c = 1;\n p.data.copy(ret);\n n -= p.data.length;\n while (p = p.next) {\n var buf = p.data;\n var nb = n > buf.length ? buf.length : n;\n buf.copy(ret, ret.length - n, 0, nb);\n n -= nb;\n if (n === 0) {\n if (nb === buf.length) {\n ++c;\n if (p.next) list.head = p.next;else list.head = list.tail = null;\n } else {\n list.head = p;\n p.data = buf.slice(nb);\n }\n break;\n }\n ++c;\n }\n list.length -= c;\n return ret;\n}", "function copyFromBuffer(n, list) {\n var ret = Buffer.allocUnsafe(n);\n var p = list.head;\n var c = 1;\n p.data.copy(ret);\n n -= p.data.length;\n while (p = p.next) {\n var buf = p.data;\n var nb = n > buf.length ? buf.length : n;\n buf.copy(ret, ret.length - n, 0, nb);\n n -= nb;\n if (n === 0) {\n if (nb === buf.length) {\n ++c;\n if (p.next) list.head = p.next;else list.head = list.tail = null;\n } else {\n list.head = p;\n p.data = buf.slice(nb);\n }\n break;\n }\n ++c;\n }\n list.length -= c;\n return ret;\n}", "function copyFromBuffer(n, list) {\n var ret = Buffer.allocUnsafe(n);\n var p = list.head;\n var c = 1;\n p.data.copy(ret);\n n -= p.data.length;\n while (p = p.next) {\n var buf = p.data;\n var nb = n > buf.length ? buf.length : n;\n buf.copy(ret, ret.length - n, 0, nb);\n n -= nb;\n if (n === 0) {\n if (nb === buf.length) {\n ++c;\n if (p.next) list.head = p.next;else list.head = list.tail = null;\n } else {\n list.head = p;\n p.data = buf.slice(nb);\n }\n break;\n }\n ++c;\n }\n list.length -= c;\n return ret;\n}", "function copyFromBuffer(n, list) {\n var ret = Buffer.allocUnsafe(n);\n var p = list.head;\n var c = 1;\n p.data.copy(ret);\n n -= p.data.length;\n while (p = p.next) {\n var buf = p.data;\n var nb = n > buf.length ? buf.length : n;\n buf.copy(ret, ret.length - n, 0, nb);\n n -= nb;\n if (n === 0) {\n if (nb === buf.length) {\n ++c;\n if (p.next) list.head = p.next;else list.head = list.tail = null;\n } else {\n list.head = p;\n p.data = buf.slice(nb);\n }\n break;\n }\n ++c;\n }\n list.length -= c;\n return ret;\n}", "function copyFromBuffer(n, list) {\n var ret = Buffer.allocUnsafe(n);\n var p = list.head;\n var c = 1;\n p.data.copy(ret);\n n -= p.data.length;\n while (p = p.next) {\n var buf = p.data;\n var nb = n > buf.length ? buf.length : n;\n buf.copy(ret, ret.length - n, 0, nb);\n n -= nb;\n if (n === 0) {\n if (nb === buf.length) {\n ++c;\n if (p.next) list.head = p.next;else list.head = list.tail = null;\n } else {\n list.head = p;\n p.data = buf.slice(nb);\n }\n break;\n }\n ++c;\n }\n list.length -= c;\n return ret;\n}", "function copyFromBuffer(n, list) {\n var ret = Buffer.allocUnsafe(n);\n var p = list.head;\n var c = 1;\n p.data.copy(ret);\n n -= p.data.length;\n while (p = p.next) {\n var buf = p.data;\n var nb = n > buf.length ? buf.length : n;\n buf.copy(ret, ret.length - n, 0, nb);\n n -= nb;\n if (n === 0) {\n if (nb === buf.length) {\n ++c;\n if (p.next) list.head = p.next;else list.head = list.tail = null;\n } else {\n list.head = p;\n p.data = buf.slice(nb);\n }\n break;\n }\n ++c;\n }\n list.length -= c;\n return ret;\n}", "function copyFromBuffer(n, list) {\n var ret = Buffer.allocUnsafe(n);\n var p = list.head;\n var c = 1;\n p.data.copy(ret);\n n -= p.data.length;\n while (p = p.next) {\n var buf = p.data;\n var nb = n > buf.length ? buf.length : n;\n buf.copy(ret, ret.length - n, 0, nb);\n n -= nb;\n if (n === 0) {\n if (nb === buf.length) {\n ++c;\n if (p.next) list.head = p.next;else list.head = list.tail = null;\n } else {\n list.head = p;\n p.data = buf.slice(nb);\n }\n break;\n }\n ++c;\n }\n list.length -= c;\n return ret;\n}", "function copyFromBuffer(n, list) {\n var ret = Buffer.allocUnsafe(n);\n var p = list.head;\n var c = 1;\n p.data.copy(ret);\n n -= p.data.length;\n while (p = p.next) {\n var buf = p.data;\n var nb = n > buf.length ? buf.length : n;\n buf.copy(ret, ret.length - n, 0, nb);\n n -= nb;\n if (n === 0) {\n if (nb === buf.length) {\n ++c;\n if (p.next) list.head = p.next;else list.head = list.tail = null;\n } else {\n list.head = p;\n p.data = buf.slice(nb);\n }\n break;\n }\n ++c;\n }\n list.length -= c;\n return ret;\n}", "function copyFromBuffer(n, list) {\n var ret = Buffer.allocUnsafe(n);\n var p = list.head;\n var c = 1;\n p.data.copy(ret);\n n -= p.data.length;\n while (p = p.next) {\n var buf = p.data;\n var nb = n > buf.length ? buf.length : n;\n buf.copy(ret, ret.length - n, 0, nb);\n n -= nb;\n if (n === 0) {\n if (nb === buf.length) {\n ++c;\n if (p.next) list.head = p.next;else list.head = list.tail = null;\n } else {\n list.head = p;\n p.data = buf.slice(nb);\n }\n break;\n }\n ++c;\n }\n list.length -= c;\n return ret;\n}", "function copyFromBuffer(n, list) {\n var ret = Buffer.allocUnsafe(n);\n var p = list.head;\n var c = 1;\n p.data.copy(ret);\n n -= p.data.length;\n while (p = p.next) {\n var buf = p.data;\n var nb = n > buf.length ? buf.length : n;\n buf.copy(ret, ret.length - n, 0, nb);\n n -= nb;\n if (n === 0) {\n if (nb === buf.length) {\n ++c;\n if (p.next) list.head = p.next;else list.head = list.tail = null;\n } else {\n list.head = p;\n p.data = buf.slice(nb);\n }\n break;\n }\n ++c;\n }\n list.length -= c;\n return ret;\n}", "function copyFromBuffer(n, list) {\n var ret = Buffer.allocUnsafe(n);\n var p = list.head;\n var c = 1;\n p.data.copy(ret);\n n -= p.data.length;\n while (p = p.next) {\n var buf = p.data;\n var nb = n > buf.length ? buf.length : n;\n buf.copy(ret, ret.length - n, 0, nb);\n n -= nb;\n if (n === 0) {\n if (nb === buf.length) {\n ++c;\n if (p.next) list.head = p.next;else list.head = list.tail = null;\n } else {\n list.head = p;\n p.data = buf.slice(nb);\n }\n break;\n }\n ++c;\n }\n list.length -= c;\n return ret;\n}", "function copyFromBuffer(n, list) {\n var ret = Buffer.allocUnsafe(n);\n var p = list.head;\n var c = 1;\n p.data.copy(ret);\n n -= p.data.length;\n while (p = p.next) {\n var buf = p.data;\n var nb = n > buf.length ? buf.length : n;\n buf.copy(ret, ret.length - n, 0, nb);\n n -= nb;\n if (n === 0) {\n if (nb === buf.length) {\n ++c;\n if (p.next) list.head = p.next;else list.head = list.tail = null;\n } else {\n list.head = p;\n p.data = buf.slice(nb);\n }\n break;\n }\n ++c;\n }\n list.length -= c;\n return ret;\n}", "function copyFromBuffer(n, list) {\n var ret = Buffer.allocUnsafe(n);\n var p = list.head;\n var c = 1;\n p.data.copy(ret);\n n -= p.data.length;\n while (p = p.next) {\n var buf = p.data;\n var nb = n > buf.length ? buf.length : n;\n buf.copy(ret, ret.length - n, 0, nb);\n n -= nb;\n if (n === 0) {\n if (nb === buf.length) {\n ++c;\n if (p.next) list.head = p.next;else list.head = list.tail = null;\n } else {\n list.head = p;\n p.data = buf.slice(nb);\n }\n break;\n }\n ++c;\n }\n list.length -= c;\n return ret;\n}", "function copyFromBuffer(n, list) {\n var ret = Buffer.allocUnsafe(n);\n var p = list.head;\n var c = 1;\n p.data.copy(ret);\n n -= p.data.length;\n while (p = p.next) {\n var buf = p.data;\n var nb = n > buf.length ? buf.length : n;\n buf.copy(ret, ret.length - n, 0, nb);\n n -= nb;\n if (n === 0) {\n if (nb === buf.length) {\n ++c;\n if (p.next) list.head = p.next;else list.head = list.tail = null;\n } else {\n list.head = p;\n p.data = buf.slice(nb);\n }\n break;\n }\n ++c;\n }\n list.length -= c;\n return ret;\n}", "function copyFromBuffer(n, list) {\n var ret = Buffer.allocUnsafe(n);\n var p = list.head;\n var c = 1;\n p.data.copy(ret);\n n -= p.data.length;\n while (p = p.next) {\n var buf = p.data;\n var nb = n > buf.length ? buf.length : n;\n buf.copy(ret, ret.length - n, 0, nb);\n n -= nb;\n if (n === 0) {\n if (nb === buf.length) {\n ++c;\n if (p.next) list.head = p.next;else list.head = list.tail = null;\n } else {\n list.head = p;\n p.data = buf.slice(nb);\n }\n break;\n }\n ++c;\n }\n list.length -= c;\n return ret;\n}", "function copyFromBuffer(n, list) {\n var ret = Buffer.allocUnsafe(n);\n var p = list.head;\n var c = 1;\n p.data.copy(ret);\n n -= p.data.length;\n while (p = p.next) {\n var buf = p.data;\n var nb = n > buf.length ? buf.length : n;\n buf.copy(ret, ret.length - n, 0, nb);\n n -= nb;\n if (n === 0) {\n if (nb === buf.length) {\n ++c;\n if (p.next) list.head = p.next;else list.head = list.tail = null;\n } else {\n list.head = p;\n p.data = buf.slice(nb);\n }\n break;\n }\n ++c;\n }\n list.length -= c;\n return ret;\n}", "function copyFromBuffer(n, list) {\n var ret = Buffer.allocUnsafe(n);\n var p = list.head;\n var c = 1;\n p.data.copy(ret);\n n -= p.data.length;\n while (p = p.next) {\n var buf = p.data;\n var nb = n > buf.length ? buf.length : n;\n buf.copy(ret, ret.length - n, 0, nb);\n n -= nb;\n if (n === 0) {\n if (nb === buf.length) {\n ++c;\n if (p.next) list.head = p.next;else list.head = list.tail = null;\n } else {\n list.head = p;\n p.data = buf.slice(nb);\n }\n break;\n }\n ++c;\n }\n list.length -= c;\n return ret;\n}", "function copyFromBuffer(n, list) {\n var ret = Buffer.allocUnsafe(n);\n var p = list.head;\n var c = 1;\n p.data.copy(ret);\n n -= p.data.length;\n while (p = p.next) {\n var buf = p.data;\n var nb = n > buf.length ? buf.length : n;\n buf.copy(ret, ret.length - n, 0, nb);\n n -= nb;\n if (n === 0) {\n if (nb === buf.length) {\n ++c;\n if (p.next) list.head = p.next;else list.head = list.tail = null;\n } else {\n list.head = p;\n p.data = buf.slice(nb);\n }\n break;\n }\n ++c;\n }\n list.length -= c;\n return ret;\n}", "function copyFromBuffer(n, list) {\n var ret = Buffer.allocUnsafe(n);\n var p = list.head;\n var c = 1;\n p.data.copy(ret);\n n -= p.data.length;\n while (p = p.next) {\n var buf = p.data;\n var nb = n > buf.length ? buf.length : n;\n buf.copy(ret, ret.length - n, 0, nb);\n n -= nb;\n if (n === 0) {\n if (nb === buf.length) {\n ++c;\n if (p.next) list.head = p.next;else list.head = list.tail = null;\n } else {\n list.head = p;\n p.data = buf.slice(nb);\n }\n break;\n }\n ++c;\n }\n list.length -= c;\n return ret;\n}", "function copyFromBuffer(n, list) {\n var ret = Buffer.allocUnsafe(n);\n var p = list.head;\n var c = 1;\n p.data.copy(ret);\n n -= p.data.length;\n while (p = p.next) {\n var buf = p.data;\n var nb = n > buf.length ? buf.length : n;\n buf.copy(ret, ret.length - n, 0, nb);\n n -= nb;\n if (n === 0) {\n if (nb === buf.length) {\n ++c;\n if (p.next) list.head = p.next;else list.head = list.tail = null;\n } else {\n list.head = p;\n p.data = buf.slice(nb);\n }\n break;\n }\n ++c;\n }\n list.length -= c;\n return ret;\n}", "function copyFromBuffer(n, list) {\n var ret = Buffer.allocUnsafe(n);\n var p = list.head;\n var c = 1;\n p.data.copy(ret);\n n -= p.data.length;\n while (p = p.next) {\n var buf = p.data;\n var nb = n > buf.length ? buf.length : n;\n buf.copy(ret, ret.length - n, 0, nb);\n n -= nb;\n if (n === 0) {\n if (nb === buf.length) {\n ++c;\n if (p.next) list.head = p.next;else list.head = list.tail = null;\n } else {\n list.head = p;\n p.data = buf.slice(nb);\n }\n break;\n }\n ++c;\n }\n list.length -= c;\n return ret;\n}", "function copyFromBuffer(n, list) {\n var ret = Buffer.allocUnsafe(n);\n var p = list.head;\n var c = 1;\n p.data.copy(ret);\n n -= p.data.length;\n while (p = p.next) {\n var buf = p.data;\n var nb = n > buf.length ? buf.length : n;\n buf.copy(ret, ret.length - n, 0, nb);\n n -= nb;\n if (n === 0) {\n if (nb === buf.length) {\n ++c;\n if (p.next) list.head = p.next;else list.head = list.tail = null;\n } else {\n list.head = p;\n p.data = buf.slice(nb);\n }\n break;\n }\n ++c;\n }\n list.length -= c;\n return ret;\n}", "function copyFromBuffer(n, list) {\n var ret = Buffer.allocUnsafe(n);\n var p = list.head;\n var c = 1;\n p.data.copy(ret);\n n -= p.data.length;\n while (p = p.next) {\n var buf = p.data;\n var nb = n > buf.length ? buf.length : n;\n buf.copy(ret, ret.length - n, 0, nb);\n n -= nb;\n if (n === 0) {\n if (nb === buf.length) {\n ++c;\n if (p.next) list.head = p.next;else list.head = list.tail = null;\n } else {\n list.head = p;\n p.data = buf.slice(nb);\n }\n break;\n }\n ++c;\n }\n list.length -= c;\n return ret;\n}", "function copyFromBuffer(n, list) {\n var ret = Buffer.allocUnsafe(n);\n var p = list.head;\n var c = 1;\n p.data.copy(ret);\n n -= p.data.length;\n while (p = p.next) {\n var buf = p.data;\n var nb = n > buf.length ? buf.length : n;\n buf.copy(ret, ret.length - n, 0, nb);\n n -= nb;\n if (n === 0) {\n if (nb === buf.length) {\n ++c;\n if (p.next) list.head = p.next;else list.head = list.tail = null;\n } else {\n list.head = p;\n p.data = buf.slice(nb);\n }\n break;\n }\n ++c;\n }\n list.length -= c;\n return ret;\n}", "function copyFromBuffer(n, list) {\n var ret = Buffer.allocUnsafe(n);\n var p = list.head;\n var c = 1;\n p.data.copy(ret);\n n -= p.data.length;\n while (p = p.next) {\n var buf = p.data;\n var nb = n > buf.length ? buf.length : n;\n buf.copy(ret, ret.length - n, 0, nb);\n n -= nb;\n if (n === 0) {\n if (nb === buf.length) {\n ++c;\n if (p.next) list.head = p.next;else list.head = list.tail = null;\n } else {\n list.head = p;\n p.data = buf.slice(nb);\n }\n break;\n }\n ++c;\n }\n list.length -= c;\n return ret;\n}", "function copyFromBuffer(n, list) {\n var ret = Buffer.allocUnsafe(n);\n var p = list.head;\n var c = 1;\n p.data.copy(ret);\n n -= p.data.length;\n while (p = p.next) {\n var buf = p.data;\n var nb = n > buf.length ? buf.length : n;\n buf.copy(ret, ret.length - n, 0, nb);\n n -= nb;\n if (n === 0) {\n if (nb === buf.length) {\n ++c;\n if (p.next) list.head = p.next;else list.head = list.tail = null;\n } else {\n list.head = p;\n p.data = buf.slice(nb);\n }\n break;\n }\n ++c;\n }\n list.length -= c;\n return ret;\n}", "function copyFromBuffer(n, list) {\n var ret = Buffer.allocUnsafe(n);\n var p = list.head;\n var c = 1;\n p.data.copy(ret);\n n -= p.data.length;\n while (p = p.next) {\n var buf = p.data;\n var nb = n > buf.length ? buf.length : n;\n buf.copy(ret, ret.length - n, 0, nb);\n n -= nb;\n if (n === 0) {\n if (nb === buf.length) {\n ++c;\n if (p.next) list.head = p.next;else list.head = list.tail = null;\n } else {\n list.head = p;\n p.data = buf.slice(nb);\n }\n break;\n }\n ++c;\n }\n list.length -= c;\n return ret;\n}", "function copyFromBuffer(n, list) {\n var ret = Buffer.allocUnsafe(n);\n var p = list.head;\n var c = 1;\n p.data.copy(ret);\n n -= p.data.length;\n while (p = p.next) {\n var buf = p.data;\n var nb = n > buf.length ? buf.length : n;\n buf.copy(ret, ret.length - n, 0, nb);\n n -= nb;\n if (n === 0) {\n if (nb === buf.length) {\n ++c;\n if (p.next) list.head = p.next;else list.head = list.tail = null;\n } else {\n list.head = p;\n p.data = buf.slice(nb);\n }\n break;\n }\n ++c;\n }\n list.length -= c;\n return ret;\n}", "function copyFromBuffer(n, list) {\n var ret = Buffer.allocUnsafe(n);\n var p = list.head;\n var c = 1;\n p.data.copy(ret);\n n -= p.data.length;\n while (p = p.next) {\n var buf = p.data;\n var nb = n > buf.length ? buf.length : n;\n buf.copy(ret, ret.length - n, 0, nb);\n n -= nb;\n if (n === 0) {\n if (nb === buf.length) {\n ++c;\n if (p.next) list.head = p.next;else list.head = list.tail = null;\n } else {\n list.head = p;\n p.data = buf.slice(nb);\n }\n break;\n }\n ++c;\n }\n list.length -= c;\n return ret;\n}", "function copyFromBuffer(n, list) {\n var ret = Buffer.allocUnsafe(n);\n var p = list.head;\n var c = 1;\n p.data.copy(ret);\n n -= p.data.length;\n while (p = p.next) {\n var buf = p.data;\n var nb = n > buf.length ? buf.length : n;\n buf.copy(ret, ret.length - n, 0, nb);\n n -= nb;\n if (n === 0) {\n if (nb === buf.length) {\n ++c;\n if (p.next) list.head = p.next;else list.head = list.tail = null;\n } else {\n list.head = p;\n p.data = buf.slice(nb);\n }\n break;\n }\n ++c;\n }\n list.length -= c;\n return ret;\n}", "function copyFromBuffer(n, list) {\n var ret = Buffer.allocUnsafe(n);\n var p = list.head;\n var c = 1;\n p.data.copy(ret);\n n -= p.data.length;\n while (p = p.next) {\n var buf = p.data;\n var nb = n > buf.length ? buf.length : n;\n buf.copy(ret, ret.length - n, 0, nb);\n n -= nb;\n if (n === 0) {\n if (nb === buf.length) {\n ++c;\n if (p.next) list.head = p.next;else list.head = list.tail = null;\n } else {\n list.head = p;\n p.data = buf.slice(nb);\n }\n break;\n }\n ++c;\n }\n list.length -= c;\n return ret;\n}", "function copyFromBuffer(n, list) {\n var ret = Buffer.allocUnsafe(n);\n var p = list.head;\n var c = 1;\n p.data.copy(ret);\n n -= p.data.length;\n while (p = p.next) {\n var buf = p.data;\n var nb = n > buf.length ? buf.length : n;\n buf.copy(ret, ret.length - n, 0, nb);\n n -= nb;\n if (n === 0) {\n if (nb === buf.length) {\n ++c;\n if (p.next) list.head = p.next;else list.head = list.tail = null;\n } else {\n list.head = p;\n p.data = buf.slice(nb);\n }\n break;\n }\n ++c;\n }\n list.length -= c;\n return ret;\n}", "function copyFromBuffer(n, list) {\n var ret = Buffer.allocUnsafe(n);\n var p = list.head;\n var c = 1;\n p.data.copy(ret);\n n -= p.data.length;\n while (p = p.next) {\n var buf = p.data;\n var nb = n > buf.length ? buf.length : n;\n buf.copy(ret, ret.length - n, 0, nb);\n n -= nb;\n if (n === 0) {\n if (nb === buf.length) {\n ++c;\n if (p.next) list.head = p.next;else list.head = list.tail = null;\n } else {\n list.head = p;\n p.data = buf.slice(nb);\n }\n break;\n }\n ++c;\n }\n list.length -= c;\n return ret;\n}", "function copyFromBuffer(n, list) {\n var ret = Buffer.allocUnsafe(n);\n var p = list.head;\n var c = 1;\n p.data.copy(ret);\n n -= p.data.length;\n while (p = p.next) {\n var buf = p.data;\n var nb = n > buf.length ? buf.length : n;\n buf.copy(ret, ret.length - n, 0, nb);\n n -= nb;\n if (n === 0) {\n if (nb === buf.length) {\n ++c;\n if (p.next) list.head = p.next;else list.head = list.tail = null;\n } else {\n list.head = p;\n p.data = buf.slice(nb);\n }\n break;\n }\n ++c;\n }\n list.length -= c;\n return ret;\n}", "function copyFromBuffer(n, list) {\n var ret = Buffer.allocUnsafe(n);\n var p = list.head;\n var c = 1;\n p.data.copy(ret);\n n -= p.data.length;\n while (p = p.next) {\n var buf = p.data;\n var nb = n > buf.length ? buf.length : n;\n buf.copy(ret, ret.length - n, 0, nb);\n n -= nb;\n if (n === 0) {\n if (nb === buf.length) {\n ++c;\n if (p.next) list.head = p.next;else list.head = list.tail = null;\n } else {\n list.head = p;\n p.data = buf.slice(nb);\n }\n break;\n }\n ++c;\n }\n list.length -= c;\n return ret;\n}", "function copyFromBuffer(n, list) {\n var ret = Buffer.allocUnsafe(n);\n var p = list.head;\n var c = 1;\n p.data.copy(ret);\n n -= p.data.length;\n while (p = p.next) {\n var buf = p.data;\n var nb = n > buf.length ? buf.length : n;\n buf.copy(ret, ret.length - n, 0, nb);\n n -= nb;\n if (n === 0) {\n if (nb === buf.length) {\n ++c;\n if (p.next) list.head = p.next;else list.head = list.tail = null;\n } else {\n list.head = p;\n p.data = buf.slice(nb);\n }\n break;\n }\n ++c;\n }\n list.length -= c;\n return ret;\n}", "function copyFromBuffer(n, list) {\n var ret = Buffer.allocUnsafe(n);\n var p = list.head;\n var c = 1;\n p.data.copy(ret);\n n -= p.data.length;\n while (p = p.next) {\n var buf = p.data;\n var nb = n > buf.length ? buf.length : n;\n buf.copy(ret, ret.length - n, 0, nb);\n n -= nb;\n if (n === 0) {\n if (nb === buf.length) {\n ++c;\n if (p.next) list.head = p.next;else list.head = list.tail = null;\n } else {\n list.head = p;\n p.data = buf.slice(nb);\n }\n break;\n }\n ++c;\n }\n list.length -= c;\n return ret;\n}", "function copyFromBuffer(n, list) {\n var ret = Buffer.allocUnsafe(n);\n var p = list.head;\n var c = 1;\n p.data.copy(ret);\n n -= p.data.length;\n while (p = p.next) {\n var buf = p.data;\n var nb = n > buf.length ? buf.length : n;\n buf.copy(ret, ret.length - n, 0, nb);\n n -= nb;\n if (n === 0) {\n if (nb === buf.length) {\n ++c;\n if (p.next) list.head = p.next;else list.head = list.tail = null;\n } else {\n list.head = p;\n p.data = buf.slice(nb);\n }\n break;\n }\n ++c;\n }\n list.length -= c;\n return ret;\n}", "function copyFromBuffer(n, list) {\n var ret = Buffer.allocUnsafe(n);\n var p = list.head;\n var c = 1;\n p.data.copy(ret);\n n -= p.data.length;\n while (p = p.next) {\n var buf = p.data;\n var nb = n > buf.length ? buf.length : n;\n buf.copy(ret, ret.length - n, 0, nb);\n n -= nb;\n if (n === 0) {\n if (nb === buf.length) {\n ++c;\n if (p.next) list.head = p.next;else list.head = list.tail = null;\n } else {\n list.head = p;\n p.data = buf.slice(nb);\n }\n break;\n }\n ++c;\n }\n list.length -= c;\n return ret;\n}", "function copyFromBuffer(n, list) {\n var ret = Buffer.allocUnsafe(n);\n var p = list.head;\n var c = 1;\n p.data.copy(ret);\n n -= p.data.length;\n while (p = p.next) {\n var buf = p.data;\n var nb = n > buf.length ? buf.length : n;\n buf.copy(ret, ret.length - n, 0, nb);\n n -= nb;\n if (n === 0) {\n if (nb === buf.length) {\n ++c;\n if (p.next) list.head = p.next;else list.head = list.tail = null;\n } else {\n list.head = p;\n p.data = buf.slice(nb);\n }\n break;\n }\n ++c;\n }\n list.length -= c;\n return ret;\n}", "function copyFromBuffer(n, list) {\n var ret = Buffer.allocUnsafe(n);\n var p = list.head;\n var c = 1;\n p.data.copy(ret);\n n -= p.data.length;\n while (p = p.next) {\n var buf = p.data;\n var nb = n > buf.length ? buf.length : n;\n buf.copy(ret, ret.length - n, 0, nb);\n n -= nb;\n if (n === 0) {\n if (nb === buf.length) {\n ++c;\n if (p.next) list.head = p.next;else list.head = list.tail = null;\n } else {\n list.head = p;\n p.data = buf.slice(nb);\n }\n break;\n }\n ++c;\n }\n list.length -= c;\n return ret;\n}", "function copyFromBuffer(n, list) {\n var ret = Buffer.allocUnsafe(n);\n var p = list.head;\n var c = 1;\n p.data.copy(ret);\n n -= p.data.length;\n while (p = p.next) {\n var buf = p.data;\n var nb = n > buf.length ? buf.length : n;\n buf.copy(ret, ret.length - n, 0, nb);\n n -= nb;\n if (n === 0) {\n if (nb === buf.length) {\n ++c;\n if (p.next) list.head = p.next;else list.head = list.tail = null;\n } else {\n list.head = p;\n p.data = buf.slice(nb);\n }\n break;\n }\n ++c;\n }\n list.length -= c;\n return ret;\n}", "function copyFromBuffer(n, list) {\n var ret = Buffer.allocUnsafe(n);\n var p = list.head;\n var c = 1;\n p.data.copy(ret);\n n -= p.data.length;\n while (p = p.next) {\n var buf = p.data;\n var nb = n > buf.length ? buf.length : n;\n buf.copy(ret, ret.length - n, 0, nb);\n n -= nb;\n if (n === 0) {\n if (nb === buf.length) {\n ++c;\n if (p.next) list.head = p.next;else list.head = list.tail = null;\n } else {\n list.head = p;\n p.data = buf.slice(nb);\n }\n break;\n }\n ++c;\n }\n list.length -= c;\n return ret;\n}", "function copyFromBuffer(n, list) {\n var ret = Buffer.allocUnsafe(n);\n var p = list.head;\n var c = 1;\n p.data.copy(ret);\n n -= p.data.length;\n while (p = p.next) {\n var buf = p.data;\n var nb = n > buf.length ? buf.length : n;\n buf.copy(ret, ret.length - n, 0, nb);\n n -= nb;\n if (n === 0) {\n if (nb === buf.length) {\n ++c;\n if (p.next) list.head = p.next;else list.head = list.tail = null;\n } else {\n list.head = p;\n p.data = buf.slice(nb);\n }\n break;\n }\n ++c;\n }\n list.length -= c;\n return ret;\n}", "function copyFromBuffer(n, list) {\n var ret = Buffer.allocUnsafe(n);\n var p = list.head;\n var c = 1;\n p.data.copy(ret);\n n -= p.data.length;\n while (p = p.next) {\n var buf = p.data;\n var nb = n > buf.length ? buf.length : n;\n buf.copy(ret, ret.length - n, 0, nb);\n n -= nb;\n if (n === 0) {\n if (nb === buf.length) {\n ++c;\n if (p.next) list.head = p.next;else list.head = list.tail = null;\n } else {\n list.head = p;\n p.data = buf.slice(nb);\n }\n break;\n }\n ++c;\n }\n list.length -= c;\n return ret;\n}", "function copyFromBuffer(n, list) {\n var ret = Buffer.allocUnsafe(n);\n var p = list.head;\n var c = 1;\n p.data.copy(ret);\n n -= p.data.length;\n while (p = p.next) {\n var buf = p.data;\n var nb = n > buf.length ? buf.length : n;\n buf.copy(ret, ret.length - n, 0, nb);\n n -= nb;\n if (n === 0) {\n if (nb === buf.length) {\n ++c;\n if (p.next) list.head = p.next;else list.head = list.tail = null;\n } else {\n list.head = p;\n p.data = buf.slice(nb);\n }\n break;\n }\n ++c;\n }\n list.length -= c;\n return ret;\n}", "function copyFromBuffer(n, list) {\n var ret = Buffer.allocUnsafe(n);\n var p = list.head;\n var c = 1;\n p.data.copy(ret);\n n -= p.data.length;\n while (p = p.next) {\n var buf = p.data;\n var nb = n > buf.length ? buf.length : n;\n buf.copy(ret, ret.length - n, 0, nb);\n n -= nb;\n if (n === 0) {\n if (nb === buf.length) {\n ++c;\n if (p.next) list.head = p.next;else list.head = list.tail = null;\n } else {\n list.head = p;\n p.data = buf.slice(nb);\n }\n break;\n }\n ++c;\n }\n list.length -= c;\n return ret;\n}", "function copyFromBuffer(n, list) {\n var ret = Buffer.allocUnsafe(n);\n var p = list.head;\n var c = 1;\n p.data.copy(ret);\n n -= p.data.length;\n while (p = p.next) {\n var buf = p.data;\n var nb = n > buf.length ? buf.length : n;\n buf.copy(ret, ret.length - n, 0, nb);\n n -= nb;\n if (n === 0) {\n if (nb === buf.length) {\n ++c;\n if (p.next) list.head = p.next;else list.head = list.tail = null;\n } else {\n list.head = p;\n p.data = buf.slice(nb);\n }\n break;\n }\n ++c;\n }\n list.length -= c;\n return ret;\n}", "function copyFromBuffer(n, list) {\n var ret = Buffer.allocUnsafe(n);\n var p = list.head;\n var c = 1;\n p.data.copy(ret);\n n -= p.data.length;\n while (p = p.next) {\n var buf = p.data;\n var nb = n > buf.length ? buf.length : n;\n buf.copy(ret, ret.length - n, 0, nb);\n n -= nb;\n if (n === 0) {\n if (nb === buf.length) {\n ++c;\n if (p.next) list.head = p.next;else list.head = list.tail = null;\n } else {\n list.head = p;\n p.data = buf.slice(nb);\n }\n break;\n }\n ++c;\n }\n list.length -= c;\n return ret;\n}", "function copyFromBuffer(n, list) {\n var ret = Buffer.allocUnsafe(n);\n var p = list.head;\n var c = 1;\n p.data.copy(ret);\n n -= p.data.length;\n while (p = p.next) {\n var buf = p.data;\n var nb = n > buf.length ? buf.length : n;\n buf.copy(ret, ret.length - n, 0, nb);\n n -= nb;\n if (n === 0) {\n if (nb === buf.length) {\n ++c;\n if (p.next) list.head = p.next;else list.head = list.tail = null;\n } else {\n list.head = p;\n p.data = buf.slice(nb);\n }\n break;\n }\n ++c;\n }\n list.length -= c;\n return ret;\n}", "function copyFromBuffer(n, list) {\n var ret = Buffer.allocUnsafe(n);\n var p = list.head;\n var c = 1;\n p.data.copy(ret);\n n -= p.data.length;\n while (p = p.next) {\n var buf = p.data;\n var nb = n > buf.length ? buf.length : n;\n buf.copy(ret, ret.length - n, 0, nb);\n n -= nb;\n if (n === 0) {\n if (nb === buf.length) {\n ++c;\n if (p.next) list.head = p.next;else list.head = list.tail = null;\n } else {\n list.head = p;\n p.data = buf.slice(nb);\n }\n break;\n }\n ++c;\n }\n list.length -= c;\n return ret;\n}", "function copyFromBuffer(n, list) {\n var ret = Buffer.allocUnsafe(n);\n var p = list.head;\n var c = 1;\n p.data.copy(ret);\n n -= p.data.length;\n while (p = p.next) {\n var buf = p.data;\n var nb = n > buf.length ? buf.length : n;\n buf.copy(ret, ret.length - n, 0, nb);\n n -= nb;\n if (n === 0) {\n if (nb === buf.length) {\n ++c;\n if (p.next) list.head = p.next;else list.head = list.tail = null;\n } else {\n list.head = p;\n p.data = buf.slice(nb);\n }\n break;\n }\n ++c;\n }\n list.length -= c;\n return ret;\n}", "function copyFromBuffer(n, list) {\n var ret = Buffer.allocUnsafe(n);\n var p = list.head;\n var c = 1;\n p.data.copy(ret);\n n -= p.data.length;\n while (p = p.next) {\n var buf = p.data;\n var nb = n > buf.length ? buf.length : n;\n buf.copy(ret, ret.length - n, 0, nb);\n n -= nb;\n if (n === 0) {\n if (nb === buf.length) {\n ++c;\n if (p.next) list.head = p.next;else list.head = list.tail = null;\n } else {\n list.head = p;\n p.data = buf.slice(nb);\n }\n break;\n }\n ++c;\n }\n list.length -= c;\n return ret;\n}", "function copyFromBuffer(n, list) {\n var ret = Buffer.allocUnsafe(n);\n var p = list.head;\n var c = 1;\n p.data.copy(ret);\n n -= p.data.length;\n while (p = p.next) {\n var buf = p.data;\n var nb = n > buf.length ? buf.length : n;\n buf.copy(ret, ret.length - n, 0, nb);\n n -= nb;\n if (n === 0) {\n if (nb === buf.length) {\n ++c;\n if (p.next) list.head = p.next;else list.head = list.tail = null;\n } else {\n list.head = p;\n p.data = buf.slice(nb);\n }\n break;\n }\n ++c;\n }\n list.length -= c;\n return ret;\n}", "function copyFromBuffer(n, list) {\n var ret = Buffer.allocUnsafe(n);\n var p = list.head;\n var c = 1;\n p.data.copy(ret);\n n -= p.data.length;\n while (p = p.next) {\n var buf = p.data;\n var nb = n > buf.length ? buf.length : n;\n buf.copy(ret, ret.length - n, 0, nb);\n n -= nb;\n if (n === 0) {\n if (nb === buf.length) {\n ++c;\n if (p.next) list.head = p.next;else list.head = list.tail = null;\n } else {\n list.head = p;\n p.data = buf.slice(nb);\n }\n break;\n }\n ++c;\n }\n list.length -= c;\n return ret;\n}", "function copyFromBuffer(n, list) {\n var ret = Buffer.allocUnsafe(n);\n var p = list.head;\n var c = 1;\n p.data.copy(ret);\n n -= p.data.length;\n while (p = p.next) {\n var buf = p.data;\n var nb = n > buf.length ? buf.length : n;\n buf.copy(ret, ret.length - n, 0, nb);\n n -= nb;\n if (n === 0) {\n if (nb === buf.length) {\n ++c;\n if (p.next) list.head = p.next;else list.head = list.tail = null;\n } else {\n list.head = p;\n p.data = buf.slice(nb);\n }\n break;\n }\n ++c;\n }\n list.length -= c;\n return ret;\n}", "function copyFromBuffer(n, list) {\n var ret = Buffer.allocUnsafe(n);\n var p = list.head;\n var c = 1;\n p.data.copy(ret);\n n -= p.data.length;\n while (p = p.next) {\n var buf = p.data;\n var nb = n > buf.length ? buf.length : n;\n buf.copy(ret, ret.length - n, 0, nb);\n n -= nb;\n if (n === 0) {\n if (nb === buf.length) {\n ++c;\n if (p.next) list.head = p.next;else list.head = list.tail = null;\n } else {\n list.head = p;\n p.data = buf.slice(nb);\n }\n break;\n }\n ++c;\n }\n list.length -= c;\n return ret;\n}", "function copyFromBuffer(n, list) {\n var ret = Buffer.allocUnsafe(n);\n var p = list.head;\n var c = 1;\n p.data.copy(ret);\n n -= p.data.length;\n while (p = p.next) {\n var buf = p.data;\n var nb = n > buf.length ? buf.length : n;\n buf.copy(ret, ret.length - n, 0, nb);\n n -= nb;\n if (n === 0) {\n if (nb === buf.length) {\n ++c;\n if (p.next) list.head = p.next;else list.head = list.tail = null;\n } else {\n list.head = p;\n p.data = buf.slice(nb);\n }\n break;\n }\n ++c;\n }\n list.length -= c;\n return ret;\n}", "function copyFromBuffer(n, list) {\n var ret = Buffer.allocUnsafe(n);\n var p = list.head;\n var c = 1;\n p.data.copy(ret);\n n -= p.data.length;\n while (p = p.next) {\n var buf = p.data;\n var nb = n > buf.length ? buf.length : n;\n buf.copy(ret, ret.length - n, 0, nb);\n n -= nb;\n if (n === 0) {\n if (nb === buf.length) {\n ++c;\n if (p.next) list.head = p.next;else list.head = list.tail = null;\n } else {\n list.head = p;\n p.data = buf.slice(nb);\n }\n break;\n }\n ++c;\n }\n list.length -= c;\n return ret;\n}", "function copyFromBuffer(n, list) {\n var ret = Buffer.allocUnsafe(n);\n var p = list.head;\n var c = 1;\n p.data.copy(ret);\n n -= p.data.length;\n while (p = p.next) {\n var buf = p.data;\n var nb = n > buf.length ? buf.length : n;\n buf.copy(ret, ret.length - n, 0, nb);\n n -= nb;\n if (n === 0) {\n if (nb === buf.length) {\n ++c;\n if (p.next) list.head = p.next;else list.head = list.tail = null;\n } else {\n list.head = p;\n p.data = buf.slice(nb);\n }\n break;\n }\n ++c;\n }\n list.length -= c;\n return ret;\n}", "function copyFromBuffer(n, list) {\n var ret = Buffer.allocUnsafe(n);\n var p = list.head;\n var c = 1;\n p.data.copy(ret);\n n -= p.data.length;\n while (p = p.next) {\n var buf = p.data;\n var nb = n > buf.length ? buf.length : n;\n buf.copy(ret, ret.length - n, 0, nb);\n n -= nb;\n if (n === 0) {\n if (nb === buf.length) {\n ++c;\n if (p.next) list.head = p.next;else list.head = list.tail = null;\n } else {\n list.head = p;\n p.data = buf.slice(nb);\n }\n break;\n }\n ++c;\n }\n list.length -= c;\n return ret;\n}", "function copyFromBuffer(n, list) {\n var ret = Buffer.allocUnsafe(n);\n var p = list.head;\n var c = 1;\n p.data.copy(ret);\n n -= p.data.length;\n while (p = p.next) {\n var buf = p.data;\n var nb = n > buf.length ? buf.length : n;\n buf.copy(ret, ret.length - n, 0, nb);\n n -= nb;\n if (n === 0) {\n if (nb === buf.length) {\n ++c;\n if (p.next) list.head = p.next;else list.head = list.tail = null;\n } else {\n list.head = p;\n p.data = buf.slice(nb);\n }\n break;\n }\n ++c;\n }\n list.length -= c;\n return ret;\n}", "function copyFromBuffer(n, list) {\n var ret = Buffer.allocUnsafe(n);\n var p = list.head;\n var c = 1;\n p.data.copy(ret);\n n -= p.data.length;\n while (p = p.next) {\n var buf = p.data;\n var nb = n > buf.length ? buf.length : n;\n buf.copy(ret, ret.length - n, 0, nb);\n n -= nb;\n if (n === 0) {\n if (nb === buf.length) {\n ++c;\n if (p.next) list.head = p.next;else list.head = list.tail = null;\n } else {\n list.head = p;\n p.data = buf.slice(nb);\n }\n break;\n }\n ++c;\n }\n list.length -= c;\n return ret;\n}", "function copyFromBuffer(n, list) {\n var ret = Buffer.allocUnsafe(n);\n var p = list.head;\n var c = 1;\n p.data.copy(ret);\n n -= p.data.length;\n while (p = p.next) {\n var buf = p.data;\n var nb = n > buf.length ? buf.length : n;\n buf.copy(ret, ret.length - n, 0, nb);\n n -= nb;\n if (n === 0) {\n if (nb === buf.length) {\n ++c;\n if (p.next) list.head = p.next;else list.head = list.tail = null;\n } else {\n list.head = p;\n p.data = buf.slice(nb);\n }\n break;\n }\n ++c;\n }\n list.length -= c;\n return ret;\n}", "function copyFromBuffer(n, list) {\n var ret = Buffer.allocUnsafe(n);\n var p = list.head;\n var c = 1;\n p.data.copy(ret);\n n -= p.data.length;\n while (p = p.next) {\n var buf = p.data;\n var nb = n > buf.length ? buf.length : n;\n buf.copy(ret, ret.length - n, 0, nb);\n n -= nb;\n if (n === 0) {\n if (nb === buf.length) {\n ++c;\n if (p.next) list.head = p.next;else list.head = list.tail = null;\n } else {\n list.head = p;\n p.data = buf.slice(nb);\n }\n break;\n }\n ++c;\n }\n list.length -= c;\n return ret;\n}", "function copyFromBuffer(n, list) {\n var ret = Buffer.allocUnsafe(n);\n var p = list.head;\n var c = 1;\n p.data.copy(ret);\n n -= p.data.length;\n while (p = p.next) {\n var buf = p.data;\n var nb = n > buf.length ? buf.length : n;\n buf.copy(ret, ret.length - n, 0, nb);\n n -= nb;\n if (n === 0) {\n if (nb === buf.length) {\n ++c;\n if (p.next) list.head = p.next;else list.head = list.tail = null;\n } else {\n list.head = p;\n p.data = buf.slice(nb);\n }\n break;\n }\n ++c;\n }\n list.length -= c;\n return ret;\n}", "function copyFromBuffer(n, list) {\n var ret = Buffer.allocUnsafe(n);\n var p = list.head;\n var c = 1;\n p.data.copy(ret);\n n -= p.data.length;\n while (p = p.next) {\n var buf = p.data;\n var nb = n > buf.length ? buf.length : n;\n buf.copy(ret, ret.length - n, 0, nb);\n n -= nb;\n if (n === 0) {\n if (nb === buf.length) {\n ++c;\n if (p.next) list.head = p.next;else list.head = list.tail = null;\n } else {\n list.head = p;\n p.data = buf.slice(nb);\n }\n break;\n }\n ++c;\n }\n list.length -= c;\n return ret;\n}", "function copyFromBuffer(n, list) {\n var ret = Buffer.allocUnsafe(n);\n var p = list.head;\n var c = 1;\n p.data.copy(ret);\n n -= p.data.length;\n while (p = p.next) {\n var buf = p.data;\n var nb = n > buf.length ? buf.length : n;\n buf.copy(ret, ret.length - n, 0, nb);\n n -= nb;\n if (n === 0) {\n if (nb === buf.length) {\n ++c;\n if (p.next) list.head = p.next;else list.head = list.tail = null;\n } else {\n list.head = p;\n p.data = buf.slice(nb);\n }\n break;\n }\n ++c;\n }\n list.length -= c;\n return ret;\n}", "function copyFromBuffer(n, list) {\n var ret = Buffer.allocUnsafe(n);\n var p = list.head;\n var c = 1;\n p.data.copy(ret);\n n -= p.data.length;\n while (p = p.next) {\n var buf = p.data;\n var nb = n > buf.length ? buf.length : n;\n buf.copy(ret, ret.length - n, 0, nb);\n n -= nb;\n if (n === 0) {\n if (nb === buf.length) {\n ++c;\n if (p.next) list.head = p.next;else list.head = list.tail = null;\n } else {\n list.head = p;\n p.data = buf.slice(nb);\n }\n break;\n }\n ++c;\n }\n list.length -= c;\n return ret;\n}", "function copyFromBuffer(n, list) {\n var ret = Buffer.allocUnsafe(n);\n var p = list.head;\n var c = 1;\n p.data.copy(ret);\n n -= p.data.length;\n while (p = p.next) {\n var buf = p.data;\n var nb = n > buf.length ? buf.length : n;\n buf.copy(ret, ret.length - n, 0, nb);\n n -= nb;\n if (n === 0) {\n if (nb === buf.length) {\n ++c;\n if (p.next) list.head = p.next;else list.head = list.tail = null;\n } else {\n list.head = p;\n p.data = buf.slice(nb);\n }\n break;\n }\n ++c;\n }\n list.length -= c;\n return ret;\n}", "function copyFromBuffer(n, list) {\n var ret = Buffer.allocUnsafe(n);\n var p = list.head;\n var c = 1;\n p.data.copy(ret);\n n -= p.data.length;\n while (p = p.next) {\n var buf = p.data;\n var nb = n > buf.length ? buf.length : n;\n buf.copy(ret, ret.length - n, 0, nb);\n n -= nb;\n if (n === 0) {\n if (nb === buf.length) {\n ++c;\n if (p.next) list.head = p.next;else list.head = list.tail = null;\n } else {\n list.head = p;\n p.data = buf.slice(nb);\n }\n break;\n }\n ++c;\n }\n list.length -= c;\n return ret;\n}", "function copyFromBuffer(n, list) {\n var ret = Buffer.allocUnsafe(n);\n var p = list.head;\n var c = 1;\n p.data.copy(ret);\n n -= p.data.length;\n while (p = p.next) {\n var buf = p.data;\n var nb = n > buf.length ? buf.length : n;\n buf.copy(ret, ret.length - n, 0, nb);\n n -= nb;\n if (n === 0) {\n if (nb === buf.length) {\n ++c;\n if (p.next) list.head = p.next;else list.head = list.tail = null;\n } else {\n list.head = p;\n p.data = buf.slice(nb);\n }\n break;\n }\n ++c;\n }\n list.length -= c;\n return ret;\n}", "function copyFromBuffer(n, list) {\n var ret = Buffer.allocUnsafe(n);\n var p = list.head;\n var c = 1;\n p.data.copy(ret);\n n -= p.data.length;\n while (p = p.next) {\n var buf = p.data;\n var nb = n > buf.length ? buf.length : n;\n buf.copy(ret, ret.length - n, 0, nb);\n n -= nb;\n if (n === 0) {\n if (nb === buf.length) {\n ++c;\n if (p.next) list.head = p.next;else list.head = list.tail = null;\n } else {\n list.head = p;\n p.data = buf.slice(nb);\n }\n break;\n }\n ++c;\n }\n list.length -= c;\n return ret;\n}", "function copyFromBuffer(n, list) {\n var ret = Buffer.allocUnsafe(n);\n var p = list.head;\n var c = 1;\n p.data.copy(ret);\n n -= p.data.length;\n while (p = p.next) {\n var buf = p.data;\n var nb = n > buf.length ? buf.length : n;\n buf.copy(ret, ret.length - n, 0, nb);\n n -= nb;\n if (n === 0) {\n if (nb === buf.length) {\n ++c;\n if (p.next) list.head = p.next;else list.head = list.tail = null;\n } else {\n list.head = p;\n p.data = buf.slice(nb);\n }\n break;\n }\n ++c;\n }\n list.length -= c;\n return ret;\n}" ]
[ "0.65536433", "0.65536433", "0.65536433", "0.65536433", "0.65536433", "0.65536433", "0.65536433", "0.65536433", "0.65536433", "0.65536433", "0.65536433", "0.65536433", "0.65536433", "0.65536433", "0.65536433", "0.65536433", "0.65536433", "0.65536433", "0.65536433", "0.65536433", "0.65536433", "0.65536433", "0.65536433", "0.65536433", "0.65536433", "0.65536433", "0.65536433", "0.65536433", "0.65536433", "0.65536433", "0.65536433", "0.65536433", "0.65536433", "0.65536433", "0.65536433", "0.65536433", "0.65536433", "0.65536433", "0.65536433", "0.65536433", "0.65536433", "0.65536433", "0.65536433", "0.65536433", "0.65536433", "0.65536433", "0.65536433", "0.65536433", "0.65536433", "0.65536433", "0.65536433", "0.65536433", "0.65536433", "0.65536433", "0.65536433", "0.65536433", "0.65536433", "0.65536433", "0.65536433", "0.65536433", "0.65536433", "0.65536433", "0.65536433", "0.65536433", "0.65536433", "0.65536433", "0.65536433", "0.65536433", "0.65536433", "0.65536433", "0.65536433", "0.65536433", "0.65536433", "0.65536433", "0.65536433", "0.65536433", "0.65536433", "0.65536433", "0.65536433", "0.65536433", "0.65536433", "0.65536433", "0.65536433", "0.65536433", "0.65536433", "0.65536433", "0.65536433", "0.65536433", "0.65536433", "0.65536433", "0.65536433", "0.65536433", "0.65536433", "0.65536433", "0.65536433", "0.65536433", "0.65536433", "0.65536433", "0.65536433", "0.65536433", "0.65536433" ]
0.0
-1
Class: Buffer ============= The Buffer constructor returns instances of `Uint8Array` that are augmented with function properties for all the node `Buffer` API functions. We use `Uint8Array` so that square bracket notation works as expected it returns a single octet. By augmenting the instances, we can avoid modifying the `Uint8Array` prototype.
function Buffer (arg) { if (!(this instanceof Buffer)) { // Avoid going through an ArgumentsAdaptorTrampoline in the common case. if (arguments.length > 1) return new Buffer(arg, arguments[1]) return new Buffer(arg) } this.length = 0 this.parent = undefined // Common case. if (typeof arg === 'number') { return fromNumber(this, arg) } // Slightly less common case. if (typeof arg === 'string') { return fromString(this, arg, arguments.length > 1 ? arguments[1] : 'utf8') } // Unusual. return fromObject(this, arg) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function Buffer (arg) {\n\t if (!(this instanceof Buffer)) {\n\t // Avoid going through an ArgumentsAdaptorTrampoline in the common case.\n\t if (arguments.length > 1) return new Buffer(arg, arguments[1])\n\t return new Buffer(arg)\n\t }\n\t\n\t if (!Buffer.TYPED_ARRAY_SUPPORT) {\n\t this.length = 0\n\t this.parent = undefined\n\t }\n\t\n\t // Common case.\n\t if (typeof arg === 'number') {\n\t return fromNumber(this, arg)\n\t }\n\t\n\t // Slightly less common case.\n\t if (typeof arg === 'string') {\n\t return fromString(this, arg, arguments.length > 1 ? arguments[1] : 'utf8')\n\t }\n\t\n\t // Unusual.\n\t return fromObject(this, arg)\n\t}", "function Buffer (arg) {\n\t if (!(this instanceof Buffer)) {\n\t // Avoid going through an ArgumentsAdaptorTrampoline in the common case.\n\t if (arguments.length > 1) return new Buffer(arg, arguments[1])\n\t return new Buffer(arg)\n\t }\n\t\n\t if (!Buffer.TYPED_ARRAY_SUPPORT) {\n\t this.length = 0\n\t this.parent = undefined\n\t }\n\t\n\t // Common case.\n\t if (typeof arg === 'number') {\n\t return fromNumber(this, arg)\n\t }\n\t\n\t // Slightly less common case.\n\t if (typeof arg === 'string') {\n\t return fromString(this, arg, arguments.length > 1 ? arguments[1] : 'utf8')\n\t }\n\t\n\t // Unusual.\n\t return fromObject(this, arg)\n\t}", "function Buffer (arg) {\n\t if (!(this instanceof Buffer)) {\n\t // Avoid going through an ArgumentsAdaptorTrampoline in the common case.\n\t if (arguments.length > 1) return new Buffer(arg, arguments[1])\n\t return new Buffer(arg)\n\t }\n\t\n\t if (!Buffer.TYPED_ARRAY_SUPPORT) {\n\t this.length = 0\n\t this.parent = undefined\n\t }\n\t\n\t // Common case.\n\t if (typeof arg === 'number') {\n\t return fromNumber(this, arg)\n\t }\n\t\n\t // Slightly less common case.\n\t if (typeof arg === 'string') {\n\t return fromString(this, arg, arguments.length > 1 ? arguments[1] : 'utf8')\n\t }\n\t\n\t // Unusual.\n\t return fromObject(this, arg)\n\t}", "function Buffer (arg) {\n\t if (!(this instanceof Buffer)) {\n\t // Avoid going through an ArgumentsAdaptorTrampoline in the common case.\n\t if (arguments.length > 1) return new Buffer(arg, arguments[1])\n\t return new Buffer(arg)\n\t }\n\t\n\t if (!Buffer.TYPED_ARRAY_SUPPORT) {\n\t this.length = 0\n\t this.parent = undefined\n\t }\n\t\n\t // Common case.\n\t if (typeof arg === 'number') {\n\t return fromNumber(this, arg)\n\t }\n\t\n\t // Slightly less common case.\n\t if (typeof arg === 'string') {\n\t return fromString(this, arg, arguments.length > 1 ? arguments[1] : 'utf8')\n\t }\n\t\n\t // Unusual.\n\t return fromObject(this, arg)\n\t}", "function Buffer (arg) {\n\t if (!(this instanceof Buffer)) {\n\t // Avoid going through an ArgumentsAdaptorTrampoline in the common case.\n\t if (arguments.length > 1) return new Buffer(arg, arguments[1])\n\t return new Buffer(arg)\n\t }\n\t\n\t if (!Buffer.TYPED_ARRAY_SUPPORT) {\n\t this.length = 0\n\t this.parent = undefined\n\t }\n\t\n\t // Common case.\n\t if (typeof arg === 'number') {\n\t return fromNumber(this, arg)\n\t }\n\t\n\t // Slightly less common case.\n\t if (typeof arg === 'string') {\n\t return fromString(this, arg, arguments.length > 1 ? arguments[1] : 'utf8')\n\t }\n\t\n\t // Unusual.\n\t return fromObject(this, arg)\n\t}", "function Buffer (arg) {\n\t if (!(this instanceof Buffer)) {\n\t // Avoid going through an ArgumentsAdaptorTrampoline in the common case.\n\t if (arguments.length > 1) return new Buffer(arg, arguments[1])\n\t return new Buffer(arg)\n\t }\n\t\n\t if (!Buffer.TYPED_ARRAY_SUPPORT) {\n\t this.length = 0\n\t this.parent = undefined\n\t }\n\t\n\t // Common case.\n\t if (typeof arg === 'number') {\n\t return fromNumber(this, arg)\n\t }\n\t\n\t // Slightly less common case.\n\t if (typeof arg === 'string') {\n\t return fromString(this, arg, arguments.length > 1 ? arguments[1] : 'utf8')\n\t }\n\t\n\t // Unusual.\n\t return fromObject(this, arg)\n\t}", "function Buffer (arg) {\n\t if (!(this instanceof Buffer)) {\n\t // Avoid going through an ArgumentsAdaptorTrampoline in the common case.\n\t if (arguments.length > 1) return new Buffer(arg, arguments[1])\n\t return new Buffer(arg)\n\t }\n\t\n\t if (!Buffer.TYPED_ARRAY_SUPPORT) {\n\t this.length = 0\n\t this.parent = undefined\n\t }\n\t\n\t // Common case.\n\t if (typeof arg === 'number') {\n\t return fromNumber(this, arg)\n\t }\n\t\n\t // Slightly less common case.\n\t if (typeof arg === 'string') {\n\t return fromString(this, arg, arguments.length > 1 ? arguments[1] : 'utf8')\n\t }\n\t\n\t // Unusual.\n\t return fromObject(this, arg)\n\t}", "function Buffer (arg) {\n\t if (!(this instanceof Buffer)) {\n\t // Avoid going through an ArgumentsAdaptorTrampoline in the common case.\n\t if (arguments.length > 1) return new Buffer(arg, arguments[1])\n\t return new Buffer(arg)\n\t }\n\n\t if (!Buffer.TYPED_ARRAY_SUPPORT) {\n\t this.length = 0\n\t this.parent = undefined\n\t }\n\n\t // Common case.\n\t if (typeof arg === 'number') {\n\t return fromNumber(this, arg)\n\t }\n\n\t // Slightly less common case.\n\t if (typeof arg === 'string') {\n\t return fromString(this, arg, arguments.length > 1 ? arguments[1] : 'utf8')\n\t }\n\n\t // Unusual.\n\t return fromObject(this, arg)\n\t}", "function Buffer (arg) {\n\t if (!(this instanceof Buffer)) {\n\t // Avoid going through an ArgumentsAdaptorTrampoline in the common case.\n\t if (arguments.length > 1) return new Buffer(arg, arguments[1])\n\t return new Buffer(arg)\n\t }\n\n\t if (!Buffer.TYPED_ARRAY_SUPPORT) {\n\t this.length = 0\n\t this.parent = undefined\n\t }\n\n\t // Common case.\n\t if (typeof arg === 'number') {\n\t return fromNumber(this, arg)\n\t }\n\n\t // Slightly less common case.\n\t if (typeof arg === 'string') {\n\t return fromString(this, arg, arguments.length > 1 ? arguments[1] : 'utf8')\n\t }\n\n\t // Unusual.\n\t return fromObject(this, arg)\n\t}", "function Buffer (arg) {\n\t if (!(this instanceof Buffer)) {\n\t // Avoid going through an ArgumentsAdaptorTrampoline in the common case.\n\t if (arguments.length > 1) return new Buffer(arg, arguments[1])\n\t return new Buffer(arg)\n\t }\n\n\t if (!Buffer.TYPED_ARRAY_SUPPORT) {\n\t this.length = 0\n\t this.parent = undefined\n\t }\n\n\t // Common case.\n\t if (typeof arg === 'number') {\n\t return fromNumber(this, arg)\n\t }\n\n\t // Slightly less common case.\n\t if (typeof arg === 'string') {\n\t return fromString(this, arg, arguments.length > 1 ? arguments[1] : 'utf8')\n\t }\n\n\t // Unusual.\n\t return fromObject(this, arg)\n\t}", "function Buffer (arg) {\n\t if (!(this instanceof Buffer)) {\n\t // Avoid going through an ArgumentsAdaptorTrampoline in the common case.\n\t if (arguments.length > 1) return new Buffer(arg, arguments[1])\n\t return new Buffer(arg)\n\t }\n\n\t if (!Buffer.TYPED_ARRAY_SUPPORT) {\n\t this.length = 0\n\t this.parent = undefined\n\t }\n\n\t // Common case.\n\t if (typeof arg === 'number') {\n\t return fromNumber(this, arg)\n\t }\n\n\t // Slightly less common case.\n\t if (typeof arg === 'string') {\n\t return fromString(this, arg, arguments.length > 1 ? arguments[1] : 'utf8')\n\t }\n\n\t // Unusual.\n\t return fromObject(this, arg)\n\t}", "function Buffer (arg) {\n\t if (!(this instanceof Buffer)) {\n\t // Avoid going through an ArgumentsAdaptorTrampoline in the common case.\n\t if (arguments.length > 1) return new Buffer(arg, arguments[1])\n\t return new Buffer(arg)\n\t }\n\n\t if (!Buffer.TYPED_ARRAY_SUPPORT) {\n\t this.length = 0\n\t this.parent = undefined\n\t }\n\n\t // Common case.\n\t if (typeof arg === 'number') {\n\t return fromNumber(this, arg)\n\t }\n\n\t // Slightly less common case.\n\t if (typeof arg === 'string') {\n\t return fromString(this, arg, arguments.length > 1 ? arguments[1] : 'utf8')\n\t }\n\n\t // Unusual.\n\t return fromObject(this, arg)\n\t}", "function Buffer (arg) {\n\t if (!(this instanceof Buffer)) {\n\t // Avoid going through an ArgumentsAdaptorTrampoline in the common case.\n\t if (arguments.length > 1) return new Buffer(arg, arguments[1])\n\t return new Buffer(arg)\n\t }\n\n\t if (!Buffer.TYPED_ARRAY_SUPPORT) {\n\t this.length = 0\n\t this.parent = undefined\n\t }\n\n\t // Common case.\n\t if (typeof arg === 'number') {\n\t return fromNumber(this, arg)\n\t }\n\n\t // Slightly less common case.\n\t if (typeof arg === 'string') {\n\t return fromString(this, arg, arguments.length > 1 ? arguments[1] : 'utf8')\n\t }\n\n\t // Unusual.\n\t return fromObject(this, arg)\n\t}", "function Buffer (arg) {\n\t if (!(this instanceof Buffer)) {\n\t // Avoid going through an ArgumentsAdaptorTrampoline in the common case.\n\t if (arguments.length > 1) return new Buffer(arg, arguments[1])\n\t return new Buffer(arg)\n\t }\n\n\t if (!Buffer.TYPED_ARRAY_SUPPORT) {\n\t this.length = 0\n\t this.parent = undefined\n\t }\n\n\t // Common case.\n\t if (typeof arg === 'number') {\n\t return fromNumber(this, arg)\n\t }\n\n\t // Slightly less common case.\n\t if (typeof arg === 'string') {\n\t return fromString(this, arg, arguments.length > 1 ? arguments[1] : 'utf8')\n\t }\n\n\t // Unusual.\n\t return fromObject(this, arg)\n\t}", "function Buffer (arg) {\n\t if (!(this instanceof Buffer)) {\n\t // Avoid going through an ArgumentsAdaptorTrampoline in the common case.\n\t if (arguments.length > 1) return new Buffer(arg, arguments[1])\n\t return new Buffer(arg)\n\t }\n\n\t if (!Buffer.TYPED_ARRAY_SUPPORT) {\n\t this.length = 0\n\t this.parent = undefined\n\t }\n\n\t // Common case.\n\t if (typeof arg === 'number') {\n\t return fromNumber(this, arg)\n\t }\n\n\t // Slightly less common case.\n\t if (typeof arg === 'string') {\n\t return fromString(this, arg, arguments.length > 1 ? arguments[1] : 'utf8')\n\t }\n\n\t // Unusual.\n\t return fromObject(this, arg)\n\t}", "function Buffer (arg) {\n\t if (!(this instanceof Buffer)) {\n\t // Avoid going through an ArgumentsAdaptorTrampoline in the common case.\n\t if (arguments.length > 1) return new Buffer(arg, arguments[1])\n\t return new Buffer(arg)\n\t }\n\n\t if (!Buffer.TYPED_ARRAY_SUPPORT) {\n\t this.length = 0\n\t this.parent = undefined\n\t }\n\n\t // Common case.\n\t if (typeof arg === 'number') {\n\t return fromNumber(this, arg)\n\t }\n\n\t // Slightly less common case.\n\t if (typeof arg === 'string') {\n\t return fromString(this, arg, arguments.length > 1 ? arguments[1] : 'utf8')\n\t }\n\n\t // Unusual.\n\t return fromObject(this, arg)\n\t}", "function Buffer (arg) {\n\t if (!(this instanceof Buffer)) {\n\t // Avoid going through an ArgumentsAdaptorTrampoline in the common case.\n\t if (arguments.length > 1) return new Buffer(arg, arguments[1])\n\t return new Buffer(arg)\n\t }\n\n\t if (!Buffer.TYPED_ARRAY_SUPPORT) {\n\t this.length = 0\n\t this.parent = undefined\n\t }\n\n\t // Common case.\n\t if (typeof arg === 'number') {\n\t return fromNumber(this, arg)\n\t }\n\n\t // Slightly less common case.\n\t if (typeof arg === 'string') {\n\t return fromString(this, arg, arguments.length > 1 ? arguments[1] : 'utf8')\n\t }\n\n\t // Unusual.\n\t return fromObject(this, arg)\n\t}", "function Buffer (arg) {\n\t if (!(this instanceof Buffer)) {\n\t // Avoid going through an ArgumentsAdaptorTrampoline in the common case.\n\t if (arguments.length > 1) return new Buffer(arg, arguments[1])\n\t return new Buffer(arg)\n\t }\n\n\t if (!Buffer.TYPED_ARRAY_SUPPORT) {\n\t this.length = 0\n\t this.parent = undefined\n\t }\n\n\t // Common case.\n\t if (typeof arg === 'number') {\n\t return fromNumber(this, arg)\n\t }\n\n\t // Slightly less common case.\n\t if (typeof arg === 'string') {\n\t return fromString(this, arg, arguments.length > 1 ? arguments[1] : 'utf8')\n\t }\n\n\t // Unusual.\n\t return fromObject(this, arg)\n\t}", "function Buffer (arg) {\n\t if (!(this instanceof Buffer)) {\n\t // Avoid going through an ArgumentsAdaptorTrampoline in the common case.\n\t if (arguments.length > 1) return new Buffer(arg, arguments[1])\n\t return new Buffer(arg)\n\t }\n\n\t if (!Buffer.TYPED_ARRAY_SUPPORT) {\n\t this.length = 0\n\t this.parent = undefined\n\t }\n\n\t // Common case.\n\t if (typeof arg === 'number') {\n\t return fromNumber(this, arg)\n\t }\n\n\t // Slightly less common case.\n\t if (typeof arg === 'string') {\n\t return fromString(this, arg, arguments.length > 1 ? arguments[1] : 'utf8')\n\t }\n\n\t // Unusual.\n\t return fromObject(this, arg)\n\t}", "function Buffer (arg) {\n\t if (!(this instanceof Buffer)) {\n\t // Avoid going through an ArgumentsAdaptorTrampoline in the common case.\n\t if (arguments.length > 1) return new Buffer(arg, arguments[1])\n\t return new Buffer(arg)\n\t }\n\n\t if (!Buffer.TYPED_ARRAY_SUPPORT) {\n\t this.length = 0\n\t this.parent = undefined\n\t }\n\n\t // Common case.\n\t if (typeof arg === 'number') {\n\t return fromNumber(this, arg)\n\t }\n\n\t // Slightly less common case.\n\t if (typeof arg === 'string') {\n\t return fromString(this, arg, arguments.length > 1 ? arguments[1] : 'utf8')\n\t }\n\n\t // Unusual.\n\t return fromObject(this, arg)\n\t}", "function Buffer (arg) {\n\t if (!(this instanceof Buffer)) {\n\t // Avoid going through an ArgumentsAdaptorTrampoline in the common case.\n\t if (arguments.length > 1) return new Buffer(arg, arguments[1])\n\t return new Buffer(arg)\n\t }\n\n\t if (!Buffer.TYPED_ARRAY_SUPPORT) {\n\t this.length = 0\n\t this.parent = undefined\n\t }\n\n\t // Common case.\n\t if (typeof arg === 'number') {\n\t return fromNumber(this, arg)\n\t }\n\n\t // Slightly less common case.\n\t if (typeof arg === 'string') {\n\t return fromString(this, arg, arguments.length > 1 ? arguments[1] : 'utf8')\n\t }\n\n\t // Unusual.\n\t return fromObject(this, arg)\n\t}", "function Buffer (arg) {\n\t if (!(this instanceof Buffer)) {\n\t // Avoid going through an ArgumentsAdaptorTrampoline in the common case.\n\t if (arguments.length > 1) return new Buffer(arg, arguments[1])\n\t return new Buffer(arg)\n\t }\n\n\t if (!Buffer.TYPED_ARRAY_SUPPORT) {\n\t this.length = 0\n\t this.parent = undefined\n\t }\n\n\t // Common case.\n\t if (typeof arg === 'number') {\n\t return fromNumber(this, arg)\n\t }\n\n\t // Slightly less common case.\n\t if (typeof arg === 'string') {\n\t return fromString(this, arg, arguments.length > 1 ? arguments[1] : 'utf8')\n\t }\n\n\t // Unusual.\n\t return fromObject(this, arg)\n\t}", "function Buffer (arg) {\n\t if (!(this instanceof Buffer)) {\n\t // Avoid going through an ArgumentsAdaptorTrampoline in the common case.\n\t if (arguments.length > 1) return new Buffer(arg, arguments[1])\n\t return new Buffer(arg)\n\t }\n\n\t if (!Buffer.TYPED_ARRAY_SUPPORT) {\n\t this.length = 0\n\t this.parent = undefined\n\t }\n\n\t // Common case.\n\t if (typeof arg === 'number') {\n\t return fromNumber(this, arg)\n\t }\n\n\t // Slightly less common case.\n\t if (typeof arg === 'string') {\n\t return fromString(this, arg, arguments.length > 1 ? arguments[1] : 'utf8')\n\t }\n\n\t // Unusual.\n\t return fromObject(this, arg)\n\t}", "function Buffer (subject, encoding) {\n var self = this\n if (!(self instanceof Buffer)) return new Buffer(subject, encoding)\n\n var type = typeof subject\n var length\n\n if (type === 'number') {\n length = +subject\n } else if (type === 'string') {\n length = Buffer.byteLength(subject, encoding)\n } else if (type === 'object' && subject !== null) {\n // assume object is array-like\n if (subject.type === 'Buffer' && isArray(subject.data)) subject = subject.data\n length = +subject.length\n } else {\n throw new TypeError('must start with number, buffer, array or string')\n }\n\n if (length > kMaxLength) {\n throw new RangeError('Attempt to allocate Buffer larger than maximum size: 0x' +\n kMaxLength.toString(16) + ' bytes')\n }\n\n if (length < 0) length = 0\n else length >>>= 0 // coerce to uint32\n\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n // Preferred: Return an augmented `Uint8Array` instance for best performance\n self = Buffer._augment(new Uint8Array(length)) // eslint-disable-line consistent-this\n } else {\n // Fallback: Return THIS instance of Buffer (created by `new`)\n self.length = length\n self._isBuffer = true\n }\n\n var i\n if (Buffer.TYPED_ARRAY_SUPPORT && typeof subject.byteLength === 'number') {\n // Speed optimization -- use set if we're copying from a typed array\n self._set(subject)\n } else if (isArrayish(subject)) {\n // Treat array-ish objects as a byte array\n if (Buffer.isBuffer(subject)) {\n for (i = 0; i < length; i++) {\n self[i] = subject.readUInt8(i)\n }\n } else {\n for (i = 0; i < length; i++) {\n self[i] = ((subject[i] % 256) + 256) % 256\n }\n }\n } else if (type === 'string') {\n self.write(subject, 0, encoding)\n } else if (type === 'number' && !Buffer.TYPED_ARRAY_SUPPORT) {\n for (i = 0; i < length; i++) {\n self[i] = 0\n }\n }\n\n if (length > 0 && length <= Buffer.poolSize) self.parent = rootParent\n\n return self\n}", "function Buffer (subject, encoding) {\n var self = this\n if (!(self instanceof Buffer)) return new Buffer(subject, encoding)\n\n var type = typeof subject\n var length\n\n if (type === 'number') {\n length = +subject\n } else if (type === 'string') {\n length = Buffer.byteLength(subject, encoding)\n } else if (type === 'object' && subject !== null) {\n // assume object is array-like\n if (subject.type === 'Buffer' && isArray(subject.data)) subject = subject.data\n length = +subject.length\n } else {\n throw new TypeError('must start with number, buffer, array or string')\n }\n\n if (length > kMaxLength) {\n throw new RangeError('Attempt to allocate Buffer larger than maximum size: 0x' +\n kMaxLength.toString(16) + ' bytes')\n }\n\n if (length < 0) length = 0\n else length >>>= 0 // coerce to uint32\n\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n // Preferred: Return an augmented `Uint8Array` instance for best performance\n self = Buffer._augment(new Uint8Array(length)) // eslint-disable-line consistent-this\n } else {\n // Fallback: Return THIS instance of Buffer (created by `new`)\n self.length = length\n self._isBuffer = true\n }\n\n var i\n if (Buffer.TYPED_ARRAY_SUPPORT && typeof subject.byteLength === 'number') {\n // Speed optimization -- use set if we're copying from a typed array\n self._set(subject)\n } else if (isArrayish(subject)) {\n // Treat array-ish objects as a byte array\n if (Buffer.isBuffer(subject)) {\n for (i = 0; i < length; i++) {\n self[i] = subject.readUInt8(i)\n }\n } else {\n for (i = 0; i < length; i++) {\n self[i] = ((subject[i] % 256) + 256) % 256\n }\n }\n } else if (type === 'string') {\n self.write(subject, 0, encoding)\n } else if (type === 'number' && !Buffer.TYPED_ARRAY_SUPPORT) {\n for (i = 0; i < length; i++) {\n self[i] = 0\n }\n }\n\n if (length > 0 && length <= Buffer.poolSize) self.parent = rootParent\n\n return self\n}", "function Buffer (subject, encoding) {\n var self = this\n if (!(self instanceof Buffer)) return new Buffer(subject, encoding)\n\n var type = typeof subject\n var length\n\n if (type === 'number') {\n length = +subject\n } else if (type === 'string') {\n length = Buffer.byteLength(subject, encoding)\n } else if (type === 'object' && subject !== null) {\n // assume object is array-like\n if (subject.type === 'Buffer' && isArray(subject.data)) subject = subject.data\n length = +subject.length\n } else {\n throw new TypeError('must start with number, buffer, array or string')\n }\n\n if (length > kMaxLength) {\n throw new RangeError('Attempt to allocate Buffer larger than maximum size: 0x' +\n kMaxLength.toString(16) + ' bytes')\n }\n\n if (length < 0) length = 0\n else length >>>= 0 // coerce to uint32\n\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n // Preferred: Return an augmented `Uint8Array` instance for best performance\n self = Buffer._augment(new Uint8Array(length)) // eslint-disable-line consistent-this\n } else {\n // Fallback: Return THIS instance of Buffer (created by `new`)\n self.length = length\n self._isBuffer = true\n }\n\n var i\n if (Buffer.TYPED_ARRAY_SUPPORT && typeof subject.byteLength === 'number') {\n // Speed optimization -- use set if we're copying from a typed array\n self._set(subject)\n } else if (isArrayish(subject)) {\n // Treat array-ish objects as a byte array\n if (Buffer.isBuffer(subject)) {\n for (i = 0; i < length; i++) {\n self[i] = subject.readUInt8(i)\n }\n } else {\n for (i = 0; i < length; i++) {\n self[i] = ((subject[i] % 256) + 256) % 256\n }\n }\n } else if (type === 'string') {\n self.write(subject, 0, encoding)\n } else if (type === 'number' && !Buffer.TYPED_ARRAY_SUPPORT) {\n for (i = 0; i < length; i++) {\n self[i] = 0\n }\n }\n\n if (length > 0 && length <= Buffer.poolSize) self.parent = rootParent\n\n return self\n}", "function Buffer (subject, encoding) {\n var self = this\n if (!(self instanceof Buffer)) return new Buffer(subject, encoding)\n\n var type = typeof subject\n var length\n\n if (type === 'number') {\n length = +subject\n } else if (type === 'string') {\n length = Buffer.byteLength(subject, encoding)\n } else if (type === 'object' && subject !== null) {\n // assume object is array-like\n if (subject.type === 'Buffer' && isArray(subject.data)) subject = subject.data\n length = +subject.length\n } else {\n throw new TypeError('must start with number, buffer, array or string')\n }\n\n if (length > kMaxLength) {\n throw new RangeError('Attempt to allocate Buffer larger than maximum size: 0x' +\n kMaxLength.toString(16) + ' bytes')\n }\n\n if (length < 0) length = 0\n else length >>>= 0 // coerce to uint32\n\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n // Preferred: Return an augmented `Uint8Array` instance for best performance\n self = Buffer._augment(new Uint8Array(length)) // eslint-disable-line consistent-this\n } else {\n // Fallback: Return THIS instance of Buffer (created by `new`)\n self.length = length\n self._isBuffer = true\n }\n\n var i\n if (Buffer.TYPED_ARRAY_SUPPORT && typeof subject.byteLength === 'number') {\n // Speed optimization -- use set if we're copying from a typed array\n self._set(subject)\n } else if (isArrayish(subject)) {\n // Treat array-ish objects as a byte array\n if (Buffer.isBuffer(subject)) {\n for (i = 0; i < length; i++) {\n self[i] = subject.readUInt8(i)\n }\n } else {\n for (i = 0; i < length; i++) {\n self[i] = ((subject[i] % 256) + 256) % 256\n }\n }\n } else if (type === 'string') {\n self.write(subject, 0, encoding)\n } else if (type === 'number' && !Buffer.TYPED_ARRAY_SUPPORT) {\n for (i = 0; i < length; i++) {\n self[i] = 0\n }\n }\n\n if (length > 0 && length <= Buffer.poolSize) self.parent = rootParent\n\n return self\n}", "function Buffer (subject, encoding) {\n var self = this\n if (!(self instanceof Buffer)) return new Buffer(subject, encoding)\n\n var type = typeof subject\n var length\n\n if (type === 'number') {\n length = +subject\n } else if (type === 'string') {\n length = Buffer.byteLength(subject, encoding)\n } else if (type === 'object' && subject !== null) {\n // assume object is array-like\n if (subject.type === 'Buffer' && isArray(subject.data)) subject = subject.data\n length = +subject.length\n } else {\n throw new TypeError('must start with number, buffer, array or string')\n }\n\n if (length > kMaxLength) {\n throw new RangeError('Attempt to allocate Buffer larger than maximum size: 0x' +\n kMaxLength.toString(16) + ' bytes')\n }\n\n if (length < 0) length = 0\n else length >>>= 0 // coerce to uint32\n\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n // Preferred: Return an augmented `Uint8Array` instance for best performance\n self = Buffer._augment(new Uint8Array(length)) // eslint-disable-line consistent-this\n } else {\n // Fallback: Return THIS instance of Buffer (created by `new`)\n self.length = length\n self._isBuffer = true\n }\n\n var i\n if (Buffer.TYPED_ARRAY_SUPPORT && typeof subject.byteLength === 'number') {\n // Speed optimization -- use set if we're copying from a typed array\n self._set(subject)\n } else if (isArrayish(subject)) {\n // Treat array-ish objects as a byte array\n if (Buffer.isBuffer(subject)) {\n for (i = 0; i < length; i++) {\n self[i] = subject.readUInt8(i)\n }\n } else {\n for (i = 0; i < length; i++) {\n self[i] = ((subject[i] % 256) + 256) % 256\n }\n }\n } else if (type === 'string') {\n self.write(subject, 0, encoding)\n } else if (type === 'number' && !Buffer.TYPED_ARRAY_SUPPORT) {\n for (i = 0; i < length; i++) {\n self[i] = 0\n }\n }\n\n if (length > 0 && length <= Buffer.poolSize) self.parent = rootParent\n\n return self\n}", "function Buffer(arg) {\n\t if (!(this instanceof Buffer)) {\n\t // Avoid going through an ArgumentsAdaptorTrampoline in the common case.\n\t if (arguments.length > 1) return new Buffer(arg, arguments[1]);\n\t return new Buffer(arg);\n\t }\n\t\n\t if (!Buffer.TYPED_ARRAY_SUPPORT) {\n\t this.length = 0;\n\t this.parent = undefined;\n\t }\n\t\n\t // Common case.\n\t if (typeof arg === 'number') {\n\t return fromNumber(this, arg);\n\t }\n\t\n\t // Slightly less common case.\n\t if (typeof arg === 'string') {\n\t return fromString(this, arg, arguments.length > 1 ? arguments[1] : 'utf8');\n\t }\n\t\n\t // Unusual.\n\t return fromObject(this, arg);\n\t}", "function Buffer(arg) {\n\t if (!(this instanceof Buffer)) {\n\t // Avoid going through an ArgumentsAdaptorTrampoline in the common case.\n\t if (arguments.length > 1) return new Buffer(arg, arguments[1]);\n\t return new Buffer(arg);\n\t }\n\n\t if (!Buffer.TYPED_ARRAY_SUPPORT) {\n\t this.length = 0;\n\t this.parent = undefined;\n\t }\n\n\t // Common case.\n\t if (typeof arg === 'number') {\n\t return fromNumber(this, arg);\n\t }\n\n\t // Slightly less common case.\n\t if (typeof arg === 'string') {\n\t return fromString(this, arg, arguments.length > 1 ? arguments[1] : 'utf8');\n\t }\n\n\t // Unusual.\n\t return fromObject(this, arg);\n\t}", "function Buffer(arg) {\n\t if (!(this instanceof Buffer)) {\n\t // Avoid going through an ArgumentsAdaptorTrampoline in the common case.\n\t if (arguments.length > 1) return new Buffer(arg, arguments[1]);\n\t return new Buffer(arg);\n\t }\n\n\t if (!Buffer.TYPED_ARRAY_SUPPORT) {\n\t this.length = 0;\n\t this.parent = undefined;\n\t }\n\n\t // Common case.\n\t if (typeof arg === 'number') {\n\t return fromNumber(this, arg);\n\t }\n\n\t // Slightly less common case.\n\t if (typeof arg === 'string') {\n\t return fromString(this, arg, arguments.length > 1 ? arguments[1] : 'utf8');\n\t }\n\n\t // Unusual.\n\t return fromObject(this, arg);\n\t}", "function Buffer(arg,encodingOrOffset,length){if(!Buffer.TYPED_ARRAY_SUPPORT&&!(this instanceof Buffer)){return new Buffer(arg,encodingOrOffset,length);}// Common case.\n\tif(typeof arg==='number'){if(typeof encodingOrOffset==='string'){throw new Error('If encoding is specified then the first argument must be a string');}return allocUnsafe(this,arg);}return from(this,arg,encodingOrOffset,length);}", "function Buffer(arg,encodingOrOffset,length){if(!Buffer.TYPED_ARRAY_SUPPORT&&!(this instanceof Buffer)){return new Buffer(arg,encodingOrOffset,length);}// Common case.\nif(typeof arg==='number'){if(typeof encodingOrOffset==='string'){throw new Error('If encoding is specified then the first argument must be a string');}return allocUnsafe(this,arg);}return from(this,arg,encodingOrOffset,length);}", "function Buffer(arg,encodingOrOffset,length){if(!Buffer.TYPED_ARRAY_SUPPORT&&!(this instanceof Buffer)){return new Buffer(arg,encodingOrOffset,length);}// Common case.\nif(typeof arg==='number'){if(typeof encodingOrOffset==='string'){throw new Error('If encoding is specified then the first argument must be a string');}return allocUnsafe(this,arg);}return from(this,arg,encodingOrOffset,length);}", "function Buffer (arg) {\n if (!(this instanceof Buffer)) {\n // Avoid going through an ArgumentsAdaptorTrampoline in the common case.\n if (arguments.length > 1) return new Buffer(arg, arguments[1])\n return new Buffer(arg)\n }\n\n if (!Buffer.TYPED_ARRAY_SUPPORT) {\n this.length = 0\n this.parent = undefined\n }\n\n // Common case.\n if (typeof arg === 'number') {\n return fromNumber(this, arg)\n }\n\n // Slightly less common case.\n if (typeof arg === 'string') {\n return fromString(this, arg, arguments.length > 1 ? arguments[1] : 'utf8')\n }\n\n // Unusual.\n return fromObject(this, arg)\n }", "function Buffer(arg) {\n if (!(this instanceof Buffer)) {\n // Avoid going through an ArgumentsAdaptorTrampoline in the common case.\n if (arguments.length > 1)\n return new Buffer(arg, arguments[1]);\n return new Buffer(arg);\n }\n if (!Buffer.TYPED_ARRAY_SUPPORT) {\n this.length = 0;\n this.parent = undefined;\n }\n // Common case.\n if (typeof arg === 'number') {\n return fromNumber(this, arg);\n }\n // Slightly less common case.\n if (typeof arg === 'string') {\n return fromString(this, arg, arguments.length > 1 ? arguments[1] : 'utf8');\n }\n // Unusual.\n return fromObject(this, arg);\n }", "function Buffer(arg) {\n if (!(this instanceof Buffer)) {\n // Avoid going through an ArgumentsAdaptorTrampoline in the common case.\n if (arguments.length > 1) return new Buffer(arg, arguments[1])\n return new Buffer(arg)\n }\n\n if (!Buffer.TYPED_ARRAY_SUPPORT) {\n this.length = 0\n this.parent = undefined\n }\n\n // Common case.\n if (typeof arg === 'number') {\n return fromNumber(this, arg)\n }\n\n // Slightly less common case.\n if (typeof arg === 'string') {\n return fromString(this, arg, arguments.length > 1 ? arguments[1] : 'utf8')\n }\n\n // Unusual.\n return fromObject(this, arg)\n }", "function BufferToArrayBuffer () {\n return (new Buffer(this)).buffer\n}", "function BufferToArrayBuffer () {\n return (new Buffer(this)).buffer\n}", "function BufferToArrayBuffer () {\n return (new Buffer(this)).buffer\n}", "function BufferToArrayBuffer () {\n return (new Buffer(this)).buffer\n}", "function Buffer(arg){if(!(this instanceof Buffer)){ // Avoid going through an ArgumentsAdaptorTrampoline in the common case.\nif(arguments.length>1)return new Buffer(arg,arguments[1]);return new Buffer(arg);}if(!Buffer.TYPED_ARRAY_SUPPORT){this.length=0;this.parent=undefined;} // Common case.\nif(typeof arg==='number'){return fromNumber(this,arg);} // Slightly less common case.\nif(typeof arg==='string'){return fromString(this,arg,arguments.length>1?arguments[1]:'utf8');} // Unusual.\nreturn fromObject(this,arg);}", "function Buffer (arg, encodingOrOffset, length) {\n if (!Buffer.TYPED_ARRAY_SUPPORT && !(this instanceof Buffer)) {\n return new Buffer(arg, encodingOrOffset, length)\n }\n \n // Common case.\n if (typeof arg === 'number') {\n if (typeof encodingOrOffset === 'string') {\n throw new Error(\n 'If encoding is specified then the first argument must be a string'\n )\n }\n return allocUnsafe(this, arg)\n }\n return from(this, arg, encodingOrOffset, length)\n }", "function Buffer(arg) {\n if (!(this instanceof Buffer)) {\n // Avoid going through an ArgumentsAdaptorTrampoline in the common case.\n if (arguments.length > 1) return new Buffer(arg, arguments[1]);\n return new Buffer(arg);\n }\n\n if (!Buffer.TYPED_ARRAY_SUPPORT) {\n this.length = 0;\n this.parent = undefined;\n }\n\n // Common case.\n if (typeof arg === 'number') {\n return fromNumber(this, arg);\n }\n\n // Slightly less common case.\n if (typeof arg === 'string') {\n return fromString(this, arg, arguments.length > 1 ? arguments[1] : 'utf8');\n }\n\n // Unusual.\n return fromObject(this, arg);\n }", "function Buffer (arg) {\n if (!(this instanceof Buffer)) {\n // Avoid going through an ArgumentsAdaptorTrampoline in the common case.\n if (arguments.length > 1) return new Buffer(arg, arguments[1])\n return new Buffer(arg)\n }\n\n if (!Buffer.TYPED_ARRAY_SUPPORT) {\n this.length = 0\n this.parent = undefined\n }\n\n // Common case.\n if (typeof arg === 'number') {\n return fromNumber(this, arg)\n }\n\n // Slightly less common case.\n if (typeof arg === 'string') {\n return fromString(this, arg, arguments.length > 1 ? arguments[1] : 'utf8')\n }\n\n // Unusual.\n return fromObject(this, arg)\n}", "function Buffer (arg) {\n if (!(this instanceof Buffer)) {\n // Avoid going through an ArgumentsAdaptorTrampoline in the common case.\n if (arguments.length > 1) return new Buffer(arg, arguments[1])\n return new Buffer(arg)\n }\n\n if (!Buffer.TYPED_ARRAY_SUPPORT) {\n this.length = 0\n this.parent = undefined\n }\n\n // Common case.\n if (typeof arg === 'number') {\n return fromNumber(this, arg)\n }\n\n // Slightly less common case.\n if (typeof arg === 'string') {\n return fromString(this, arg, arguments.length > 1 ? arguments[1] : 'utf8')\n }\n\n // Unusual.\n return fromObject(this, arg)\n}", "function Buffer (arg) {\n if (!(this instanceof Buffer)) {\n // Avoid going through an ArgumentsAdaptorTrampoline in the common case.\n if (arguments.length > 1) return new Buffer(arg, arguments[1])\n return new Buffer(arg)\n }\n\n if (!Buffer.TYPED_ARRAY_SUPPORT) {\n this.length = 0\n this.parent = undefined\n }\n\n // Common case.\n if (typeof arg === 'number') {\n return fromNumber(this, arg)\n }\n\n // Slightly less common case.\n if (typeof arg === 'string') {\n return fromString(this, arg, arguments.length > 1 ? arguments[1] : 'utf8')\n }\n\n // Unusual.\n return fromObject(this, arg)\n}", "function Buffer (arg) {\n if (!(this instanceof Buffer)) {\n // Avoid going through an ArgumentsAdaptorTrampoline in the common case.\n if (arguments.length > 1) return new Buffer(arg, arguments[1])\n return new Buffer(arg)\n }\n\n if (!Buffer.TYPED_ARRAY_SUPPORT) {\n this.length = 0\n this.parent = undefined\n }\n\n // Common case.\n if (typeof arg === 'number') {\n return fromNumber(this, arg)\n }\n\n // Slightly less common case.\n if (typeof arg === 'string') {\n return fromString(this, arg, arguments.length > 1 ? arguments[1] : 'utf8')\n }\n\n // Unusual.\n return fromObject(this, arg)\n}", "function Buffer (arg) {\n if (!(this instanceof Buffer)) {\n // Avoid going through an ArgumentsAdaptorTrampoline in the common case.\n if (arguments.length > 1) return new Buffer(arg, arguments[1])\n return new Buffer(arg)\n }\n\n if (!Buffer.TYPED_ARRAY_SUPPORT) {\n this.length = 0\n this.parent = undefined\n }\n\n // Common case.\n if (typeof arg === 'number') {\n return fromNumber(this, arg)\n }\n\n // Slightly less common case.\n if (typeof arg === 'string') {\n return fromString(this, arg, arguments.length > 1 ? arguments[1] : 'utf8')\n }\n\n // Unusual.\n return fromObject(this, arg)\n}", "function Buffer (arg) {\n if (!(this instanceof Buffer)) {\n // Avoid going through an ArgumentsAdaptorTrampoline in the common case.\n if (arguments.length > 1) return new Buffer(arg, arguments[1])\n return new Buffer(arg)\n }\n\n if (!Buffer.TYPED_ARRAY_SUPPORT) {\n this.length = 0\n this.parent = undefined\n }\n\n // Common case.\n if (typeof arg === 'number') {\n return fromNumber(this, arg)\n }\n\n // Slightly less common case.\n if (typeof arg === 'string') {\n return fromString(this, arg, arguments.length > 1 ? arguments[1] : 'utf8')\n }\n\n // Unusual.\n return fromObject(this, arg)\n}", "function Buffer (arg) {\n if (!(this instanceof Buffer)) {\n // Avoid going through an ArgumentsAdaptorTrampoline in the common case.\n if (arguments.length > 1) return new Buffer(arg, arguments[1])\n return new Buffer(arg)\n }\n\n if (!Buffer.TYPED_ARRAY_SUPPORT) {\n this.length = 0\n this.parent = undefined\n }\n\n // Common case.\n if (typeof arg === 'number') {\n return fromNumber(this, arg)\n }\n\n // Slightly less common case.\n if (typeof arg === 'string') {\n return fromString(this, arg, arguments.length > 1 ? arguments[1] : 'utf8')\n }\n\n // Unusual.\n return fromObject(this, arg)\n}", "function Buffer (arg) {\n if (!(this instanceof Buffer)) {\n // Avoid going through an ArgumentsAdaptorTrampoline in the common case.\n if (arguments.length > 1) return new Buffer(arg, arguments[1])\n return new Buffer(arg)\n }\n\n if (!Buffer.TYPED_ARRAY_SUPPORT) {\n this.length = 0\n this.parent = undefined\n }\n\n // Common case.\n if (typeof arg === 'number') {\n return fromNumber(this, arg)\n }\n\n // Slightly less common case.\n if (typeof arg === 'string') {\n return fromString(this, arg, arguments.length > 1 ? arguments[1] : 'utf8')\n }\n\n // Unusual.\n return fromObject(this, arg)\n}", "function Buffer (arg) {\n if (!(this instanceof Buffer)) {\n // Avoid going through an ArgumentsAdaptorTrampoline in the common case.\n if (arguments.length > 1) return new Buffer(arg, arguments[1])\n return new Buffer(arg)\n }\n\n if (!Buffer.TYPED_ARRAY_SUPPORT) {\n this.length = 0\n this.parent = undefined\n }\n\n // Common case.\n if (typeof arg === 'number') {\n return fromNumber(this, arg)\n }\n\n // Slightly less common case.\n if (typeof arg === 'string') {\n return fromString(this, arg, arguments.length > 1 ? arguments[1] : 'utf8')\n }\n\n // Unusual.\n return fromObject(this, arg)\n}", "function Buffer (arg) {\n if (!(this instanceof Buffer)) {\n // Avoid going through an ArgumentsAdaptorTrampoline in the common case.\n if (arguments.length > 1) return new Buffer(arg, arguments[1])\n return new Buffer(arg)\n }\n\n if (!Buffer.TYPED_ARRAY_SUPPORT) {\n this.length = 0\n this.parent = undefined\n }\n\n // Common case.\n if (typeof arg === 'number') {\n return fromNumber(this, arg)\n }\n\n // Slightly less common case.\n if (typeof arg === 'string') {\n return fromString(this, arg, arguments.length > 1 ? arguments[1] : 'utf8')\n }\n\n // Unusual.\n return fromObject(this, arg)\n}", "function Buffer (arg) {\n if (!(this instanceof Buffer)) {\n // Avoid going through an ArgumentsAdaptorTrampoline in the common case.\n if (arguments.length > 1) return new Buffer(arg, arguments[1])\n return new Buffer(arg)\n }\n\n if (!Buffer.TYPED_ARRAY_SUPPORT) {\n this.length = 0\n this.parent = undefined\n }\n\n // Common case.\n if (typeof arg === 'number') {\n return fromNumber(this, arg)\n }\n\n // Slightly less common case.\n if (typeof arg === 'string') {\n return fromString(this, arg, arguments.length > 1 ? arguments[1] : 'utf8')\n }\n\n // Unusual.\n return fromObject(this, arg)\n}", "function Buffer (arg) {\n if (!(this instanceof Buffer)) {\n // Avoid going through an ArgumentsAdaptorTrampoline in the common case.\n if (arguments.length > 1) return new Buffer(arg, arguments[1])\n return new Buffer(arg)\n }\n\n if (!Buffer.TYPED_ARRAY_SUPPORT) {\n this.length = 0\n this.parent = undefined\n }\n\n // Common case.\n if (typeof arg === 'number') {\n return fromNumber(this, arg)\n }\n\n // Slightly less common case.\n if (typeof arg === 'string') {\n return fromString(this, arg, arguments.length > 1 ? arguments[1] : 'utf8')\n }\n\n // Unusual.\n return fromObject(this, arg)\n}", "function Buffer (arg) {\n if (!(this instanceof Buffer)) {\n // Avoid going through an ArgumentsAdaptorTrampoline in the common case.\n if (arguments.length > 1) return new Buffer(arg, arguments[1])\n return new Buffer(arg)\n }\n\n if (!Buffer.TYPED_ARRAY_SUPPORT) {\n this.length = 0\n this.parent = undefined\n }\n\n // Common case.\n if (typeof arg === 'number') {\n return fromNumber(this, arg)\n }\n\n // Slightly less common case.\n if (typeof arg === 'string') {\n return fromString(this, arg, arguments.length > 1 ? arguments[1] : 'utf8')\n }\n\n // Unusual.\n return fromObject(this, arg)\n}", "function Buffer (arg) {\n if (!(this instanceof Buffer)) {\n // Avoid going through an ArgumentsAdaptorTrampoline in the common case.\n if (arguments.length > 1) return new Buffer(arg, arguments[1])\n return new Buffer(arg)\n }\n\n if (!Buffer.TYPED_ARRAY_SUPPORT) {\n this.length = 0\n this.parent = undefined\n }\n\n // Common case.\n if (typeof arg === 'number') {\n return fromNumber(this, arg)\n }\n\n // Slightly less common case.\n if (typeof arg === 'string') {\n return fromString(this, arg, arguments.length > 1 ? arguments[1] : 'utf8')\n }\n\n // Unusual.\n return fromObject(this, arg)\n}", "function Buffer (arg) {\n if (!(this instanceof Buffer)) {\n // Avoid going through an ArgumentsAdaptorTrampoline in the common case.\n if (arguments.length > 1) return new Buffer(arg, arguments[1])\n return new Buffer(arg)\n }\n\n if (!Buffer.TYPED_ARRAY_SUPPORT) {\n this.length = 0\n this.parent = undefined\n }\n\n // Common case.\n if (typeof arg === 'number') {\n return fromNumber(this, arg)\n }\n\n // Slightly less common case.\n if (typeof arg === 'string') {\n return fromString(this, arg, arguments.length > 1 ? arguments[1] : 'utf8')\n }\n\n // Unusual.\n return fromObject(this, arg)\n}", "function Buffer (arg) {\n if (!(this instanceof Buffer)) {\n // Avoid going through an ArgumentsAdaptorTrampoline in the common case.\n if (arguments.length > 1) return new Buffer(arg, arguments[1])\n return new Buffer(arg)\n }\n\n if (!Buffer.TYPED_ARRAY_SUPPORT) {\n this.length = 0\n this.parent = undefined\n }\n\n // Common case.\n if (typeof arg === 'number') {\n return fromNumber(this, arg)\n }\n\n // Slightly less common case.\n if (typeof arg === 'string') {\n return fromString(this, arg, arguments.length > 1 ? arguments[1] : 'utf8')\n }\n\n // Unusual.\n return fromObject(this, arg)\n}", "function Buffer (arg) {\n if (!(this instanceof Buffer)) {\n // Avoid going through an ArgumentsAdaptorTrampoline in the common case.\n if (arguments.length > 1) return new Buffer(arg, arguments[1])\n return new Buffer(arg)\n }\n\n if (!Buffer.TYPED_ARRAY_SUPPORT) {\n this.length = 0\n this.parent = undefined\n }\n\n // Common case.\n if (typeof arg === 'number') {\n return fromNumber(this, arg)\n }\n\n // Slightly less common case.\n if (typeof arg === 'string') {\n return fromString(this, arg, arguments.length > 1 ? arguments[1] : 'utf8')\n }\n\n // Unusual.\n return fromObject(this, arg)\n}", "function Buffer (arg) {\n if (!(this instanceof Buffer)) {\n // Avoid going through an ArgumentsAdaptorTrampoline in the common case.\n if (arguments.length > 1) return new Buffer(arg, arguments[1])\n return new Buffer(arg)\n }\n\n if (!Buffer.TYPED_ARRAY_SUPPORT) {\n this.length = 0\n this.parent = undefined\n }\n\n // Common case.\n if (typeof arg === 'number') {\n return fromNumber(this, arg)\n }\n\n // Slightly less common case.\n if (typeof arg === 'string') {\n return fromString(this, arg, arguments.length > 1 ? arguments[1] : 'utf8')\n }\n\n // Unusual.\n return fromObject(this, arg)\n}", "function Buffer (arg) {\n if (!(this instanceof Buffer)) {\n // Avoid going through an ArgumentsAdaptorTrampoline in the common case.\n if (arguments.length > 1) return new Buffer(arg, arguments[1])\n return new Buffer(arg)\n }\n\n if (!Buffer.TYPED_ARRAY_SUPPORT) {\n this.length = 0\n this.parent = undefined\n }\n\n // Common case.\n if (typeof arg === 'number') {\n return fromNumber(this, arg)\n }\n\n // Slightly less common case.\n if (typeof arg === 'string') {\n return fromString(this, arg, arguments.length > 1 ? arguments[1] : 'utf8')\n }\n\n // Unusual.\n return fromObject(this, arg)\n}", "function Buffer (arg) {\n if (!(this instanceof Buffer)) {\n // Avoid going through an ArgumentsAdaptorTrampoline in the common case.\n if (arguments.length > 1) return new Buffer(arg, arguments[1])\n return new Buffer(arg)\n }\n\n if (!Buffer.TYPED_ARRAY_SUPPORT) {\n this.length = 0\n this.parent = undefined\n }\n\n // Common case.\n if (typeof arg === 'number') {\n return fromNumber(this, arg)\n }\n\n // Slightly less common case.\n if (typeof arg === 'string') {\n return fromString(this, arg, arguments.length > 1 ? arguments[1] : 'utf8')\n }\n\n // Unusual.\n return fromObject(this, arg)\n}", "function Buffer (arg) {\n if (!(this instanceof Buffer)) {\n // Avoid going through an ArgumentsAdaptorTrampoline in the common case.\n if (arguments.length > 1) return new Buffer(arg, arguments[1])\n return new Buffer(arg)\n }\n\n if (!Buffer.TYPED_ARRAY_SUPPORT) {\n this.length = 0\n this.parent = undefined\n }\n\n // Common case.\n if (typeof arg === 'number') {\n return fromNumber(this, arg)\n }\n\n // Slightly less common case.\n if (typeof arg === 'string') {\n return fromString(this, arg, arguments.length > 1 ? arguments[1] : 'utf8')\n }\n\n // Unusual.\n return fromObject(this, arg)\n}", "function Buffer (arg) {\n if (!(this instanceof Buffer)) {\n // Avoid going through an ArgumentsAdaptorTrampoline in the common case.\n if (arguments.length > 1) return new Buffer(arg, arguments[1])\n return new Buffer(arg)\n }\n\n if (!Buffer.TYPED_ARRAY_SUPPORT) {\n this.length = 0\n this.parent = undefined\n }\n\n // Common case.\n if (typeof arg === 'number') {\n return fromNumber(this, arg)\n }\n\n // Slightly less common case.\n if (typeof arg === 'string') {\n return fromString(this, arg, arguments.length > 1 ? arguments[1] : 'utf8')\n }\n\n // Unusual.\n return fromObject(this, arg)\n}", "function Buffer (arg) {\n if (!(this instanceof Buffer)) {\n // Avoid going through an ArgumentsAdaptorTrampoline in the common case.\n if (arguments.length > 1) return new Buffer(arg, arguments[1])\n return new Buffer(arg)\n }\n\n if (!Buffer.TYPED_ARRAY_SUPPORT) {\n this.length = 0\n this.parent = undefined\n }\n\n // Common case.\n if (typeof arg === 'number') {\n return fromNumber(this, arg)\n }\n\n // Slightly less common case.\n if (typeof arg === 'string') {\n return fromString(this, arg, arguments.length > 1 ? arguments[1] : 'utf8')\n }\n\n // Unusual.\n return fromObject(this, arg)\n}", "function Buffer (arg, encodingOrOffset, length) {\n\t if (!Buffer.TYPED_ARRAY_SUPPORT && !(this instanceof Buffer)) {\n\t return new Buffer(arg, encodingOrOffset, length)\n\t }\n\t\n\t // Common case.\n\t if (typeof arg === 'number') {\n\t if (typeof encodingOrOffset === 'string') {\n\t throw new Error(\n\t 'If encoding is specified then the first argument must be a string'\n\t )\n\t }\n\t return allocUnsafe(this, arg)\n\t }\n\t return from(this, arg, encodingOrOffset, length)\n\t}", "function Buffer (arg, encodingOrOffset, length) {\n\t if (!Buffer.TYPED_ARRAY_SUPPORT && !(this instanceof Buffer)) {\n\t return new Buffer(arg, encodingOrOffset, length)\n\t }\n\t\n\t // Common case.\n\t if (typeof arg === 'number') {\n\t if (typeof encodingOrOffset === 'string') {\n\t throw new Error(\n\t 'If encoding is specified then the first argument must be a string'\n\t )\n\t }\n\t return allocUnsafe(this, arg)\n\t }\n\t return from(this, arg, encodingOrOffset, length)\n\t}", "function Buffer (arg, encodingOrOffset, length) {\n\t if (!Buffer.TYPED_ARRAY_SUPPORT && !(this instanceof Buffer)) {\n\t return new Buffer(arg, encodingOrOffset, length)\n\t }\n\t\n\t // Common case.\n\t if (typeof arg === 'number') {\n\t if (typeof encodingOrOffset === 'string') {\n\t throw new Error(\n\t 'If encoding is specified then the first argument must be a string'\n\t )\n\t }\n\t return allocUnsafe(this, arg)\n\t }\n\t return from(this, arg, encodingOrOffset, length)\n\t}", "function Buffer (arg, encodingOrOffset, length) {\n\t if (!Buffer.TYPED_ARRAY_SUPPORT && !(this instanceof Buffer)) {\n\t return new Buffer(arg, encodingOrOffset, length)\n\t }\n\t\n\t // Common case.\n\t if (typeof arg === 'number') {\n\t if (typeof encodingOrOffset === 'string') {\n\t throw new Error(\n\t 'If encoding is specified then the first argument must be a string'\n\t )\n\t }\n\t return allocUnsafe(this, arg)\n\t }\n\t return from(this, arg, encodingOrOffset, length)\n\t}", "function Buffer (arg, encodingOrOffset, length) {\n\t if (!Buffer.TYPED_ARRAY_SUPPORT && !(this instanceof Buffer)) {\n\t return new Buffer(arg, encodingOrOffset, length)\n\t }\n\t\n\t // Common case.\n\t if (typeof arg === 'number') {\n\t if (typeof encodingOrOffset === 'string') {\n\t throw new Error(\n\t 'If encoding is specified then the first argument must be a string'\n\t )\n\t }\n\t return allocUnsafe(this, arg)\n\t }\n\t return from(this, arg, encodingOrOffset, length)\n\t}", "function Buffer (arg, encodingOrOffset, length) {\n\t if (!Buffer.TYPED_ARRAY_SUPPORT && !(this instanceof Buffer)) {\n\t return new Buffer(arg, encodingOrOffset, length)\n\t }\n\t\n\t // Common case.\n\t if (typeof arg === 'number') {\n\t if (typeof encodingOrOffset === 'string') {\n\t throw new Error(\n\t 'If encoding is specified then the first argument must be a string'\n\t )\n\t }\n\t return allocUnsafe(this, arg)\n\t }\n\t return from(this, arg, encodingOrOffset, length)\n\t}", "function Buffer (arg, encodingOrOffset, length) {\n\t if (!Buffer.TYPED_ARRAY_SUPPORT && !(this instanceof Buffer)) {\n\t return new Buffer(arg, encodingOrOffset, length)\n\t }\n\t\n\t // Common case.\n\t if (typeof arg === 'number') {\n\t if (typeof encodingOrOffset === 'string') {\n\t throw new Error(\n\t 'If encoding is specified then the first argument must be a string'\n\t )\n\t }\n\t return allocUnsafe(this, arg)\n\t }\n\t return from(this, arg, encodingOrOffset, length)\n\t}", "function Buffer (arg, encodingOrOffset, length) {\n\t if (!Buffer.TYPED_ARRAY_SUPPORT && !(this instanceof Buffer)) {\n\t return new Buffer(arg, encodingOrOffset, length)\n\t }\n\t\n\t // Common case.\n\t if (typeof arg === 'number') {\n\t if (typeof encodingOrOffset === 'string') {\n\t throw new Error(\n\t 'If encoding is specified then the first argument must be a string'\n\t )\n\t }\n\t return allocUnsafe(this, arg)\n\t }\n\t return from(this, arg, encodingOrOffset, length)\n\t}", "function Buffer (arg, encodingOrOffset, length) {\n\t if (!Buffer.TYPED_ARRAY_SUPPORT && !(this instanceof Buffer)) {\n\t return new Buffer(arg, encodingOrOffset, length)\n\t }\n\t\n\t // Common case.\n\t if (typeof arg === 'number') {\n\t if (typeof encodingOrOffset === 'string') {\n\t throw new Error(\n\t 'If encoding is specified then the first argument must be a string'\n\t )\n\t }\n\t return allocUnsafe(this, arg)\n\t }\n\t return from(this, arg, encodingOrOffset, length)\n\t}", "function Buffer (arg, encodingOrOffset, length) {\n\t if (!Buffer.TYPED_ARRAY_SUPPORT && !(this instanceof Buffer)) {\n\t return new Buffer(arg, encodingOrOffset, length)\n\t }\n\t\n\t // Common case.\n\t if (typeof arg === 'number') {\n\t if (typeof encodingOrOffset === 'string') {\n\t throw new Error(\n\t 'If encoding is specified then the first argument must be a string'\n\t )\n\t }\n\t return allocUnsafe(this, arg)\n\t }\n\t return from(this, arg, encodingOrOffset, length)\n\t}", "function Buffer (arg, encodingOrOffset, length) {\n\t if (!Buffer.TYPED_ARRAY_SUPPORT && !(this instanceof Buffer)) {\n\t return new Buffer(arg, encodingOrOffset, length)\n\t }\n\t\n\t // Common case.\n\t if (typeof arg === 'number') {\n\t if (typeof encodingOrOffset === 'string') {\n\t throw new Error(\n\t 'If encoding is specified then the first argument must be a string'\n\t )\n\t }\n\t return allocUnsafe(this, arg)\n\t }\n\t return from(this, arg, encodingOrOffset, length)\n\t}", "function Buffer (arg, encodingOrOffset, length) {\n\t if (!Buffer.TYPED_ARRAY_SUPPORT && !(this instanceof Buffer)) {\n\t return new Buffer(arg, encodingOrOffset, length)\n\t }\n\t\n\t // Common case.\n\t if (typeof arg === 'number') {\n\t if (typeof encodingOrOffset === 'string') {\n\t throw new Error(\n\t 'If encoding is specified then the first argument must be a string'\n\t )\n\t }\n\t return allocUnsafe(this, arg)\n\t }\n\t return from(this, arg, encodingOrOffset, length)\n\t}", "function Buffer (arg, encodingOrOffset, length) {\n\t if (!Buffer.TYPED_ARRAY_SUPPORT && !(this instanceof Buffer)) {\n\t return new Buffer(arg, encodingOrOffset, length)\n\t }\n\t\n\t // Common case.\n\t if (typeof arg === 'number') {\n\t if (typeof encodingOrOffset === 'string') {\n\t throw new Error(\n\t 'If encoding is specified then the first argument must be a string'\n\t )\n\t }\n\t return allocUnsafe(this, arg)\n\t }\n\t return from(this, arg, encodingOrOffset, length)\n\t}", "function Buffer (arg, encodingOrOffset, length) {\n\t if (!Buffer.TYPED_ARRAY_SUPPORT && !(this instanceof Buffer)) {\n\t return new Buffer(arg, encodingOrOffset, length)\n\t }\n\t\n\t // Common case.\n\t if (typeof arg === 'number') {\n\t if (typeof encodingOrOffset === 'string') {\n\t throw new Error(\n\t 'If encoding is specified then the first argument must be a string'\n\t )\n\t }\n\t return allocUnsafe(this, arg)\n\t }\n\t return from(this, arg, encodingOrOffset, length)\n\t}", "function Buffer (arg, encodingOrOffset, length) {\n\t if (!Buffer.TYPED_ARRAY_SUPPORT && !(this instanceof Buffer)) {\n\t return new Buffer(arg, encodingOrOffset, length)\n\t }\n\t\n\t // Common case.\n\t if (typeof arg === 'number') {\n\t if (typeof encodingOrOffset === 'string') {\n\t throw new Error(\n\t 'If encoding is specified then the first argument must be a string'\n\t )\n\t }\n\t return allocUnsafe(this, arg)\n\t }\n\t return from(this, arg, encodingOrOffset, length)\n\t}", "function Buffer (arg, encodingOrOffset, length) {\n\t if (!Buffer.TYPED_ARRAY_SUPPORT && !(this instanceof Buffer)) {\n\t return new Buffer(arg, encodingOrOffset, length)\n\t }\n\t\n\t // Common case.\n\t if (typeof arg === 'number') {\n\t if (typeof encodingOrOffset === 'string') {\n\t throw new Error(\n\t 'If encoding is specified then the first argument must be a string'\n\t )\n\t }\n\t return allocUnsafe(this, arg)\n\t }\n\t return from(this, arg, encodingOrOffset, length)\n\t}", "function Buffer (arg, encodingOrOffset, length) {\n\t if (!Buffer.TYPED_ARRAY_SUPPORT && !(this instanceof Buffer)) {\n\t return new Buffer(arg, encodingOrOffset, length)\n\t }\n\t\n\t // Common case.\n\t if (typeof arg === 'number') {\n\t if (typeof encodingOrOffset === 'string') {\n\t throw new Error(\n\t 'If encoding is specified then the first argument must be a string'\n\t )\n\t }\n\t return allocUnsafe(this, arg)\n\t }\n\t return from(this, arg, encodingOrOffset, length)\n\t}", "function Buffer (arg, encodingOrOffset, length) {\n if (!Buffer.TYPED_ARRAY_SUPPORT && !(this instanceof Buffer)) {\n return new Buffer(arg, encodingOrOffset, length)\n }\n\n // Common case.\n if (typeof arg === 'number') {\n if (typeof encodingOrOffset === 'string') {\n throw new Error(\n 'If encoding is specified then the first argument must be a string'\n )\n }\n return allocUnsafe(this, arg)\n }\n return from(this, arg, encodingOrOffset, length)\n }", "function Buffer (arg, encodingOrOffset, length) {\n if (!Buffer.TYPED_ARRAY_SUPPORT && !(this instanceof Buffer)) {\n return new Buffer(arg, encodingOrOffset, length)\n }\n\n // Common case.\n if (typeof arg === 'number') {\n if (typeof encodingOrOffset === 'string') {\n throw new Error(\n 'If encoding is specified then the first argument must be a string'\n )\n }\n return allocUnsafe(this, arg)\n }\n return from(this, arg, encodingOrOffset, length)\n }", "function Buffer (arg, encodingOrOffset, length) {\n if (!Buffer.TYPED_ARRAY_SUPPORT && !(this instanceof Buffer)) {\n return new Buffer(arg, encodingOrOffset, length)\n }\n\n // Common case.\n if (typeof arg === 'number') {\n if (typeof encodingOrOffset === 'string') {\n throw new Error(\n 'If encoding is specified then the first argument must be a string'\n )\n }\n return allocUnsafe(this, arg)\n }\n return from(this, arg, encodingOrOffset, length)\n }", "function Buffer (arg) {\n\t\t if (!(this instanceof Buffer)) {\n\t\t // Avoid going through an ArgumentsAdaptorTrampoline in the common case.\n\t\t if (arguments.length > 1) return new Buffer(arg, arguments[1])\n\t\t return new Buffer(arg)\n\t\t }\n\t\t\n\t\t this.length = 0\n\t\t this.parent = undefined\n\t\t\n\t\t // Common case.\n\t\t if (typeof arg === 'number') {\n\t\t return fromNumber(this, arg)\n\t\t }\n\t\t\n\t\t // Slightly less common case.\n\t\t if (typeof arg === 'string') {\n\t\t return fromString(this, arg, arguments.length > 1 ? arguments[1] : 'utf8')\n\t\t }\n\t\t\n\t\t // Unusual.\n\t\t return fromObject(this, arg)\n\t\t}", "function createByteContainer() {\n if (HAS_BUFFER)\n return new Buffer(0);\n\n return new Uint8Array();\n }", "function createByteContainer() {\n if (HAS_BUFFER)\n return new Buffer(0);\n\n return new Uint8Array();\n }", "function Buffer (subject, encoding, noZero) {\n if (!(this instanceof Buffer))\n return new Buffer(subject, encoding, noZero)\n\n var type = typeof subject\n\n // Find the length\n var length\n if (type === 'number') {\n length = +subject\n } else if (type === 'string') {\n length = Buffer.byteLength(subject, encoding)\n } else if (type === 'object' && subject !== null) { // assume object is array-like\n if (subject.type === 'Buffer' && isArray(subject.data))\n subject = subject.data\n length = +subject.length\n } else {\n throw new TypeError('must start with number, buffer, array or string')\n }\n\n if (length > kMaxLength)\n throw new RangeError('Attempt to allocate Buffer larger than maximum ' +\n 'size: 0x' + kMaxLength.toString(16) + ' bytes')\n\n if (length < 0)\n length = 0\n else\n length >>>= 0 // Coerce to uint32.\n\n var self = this\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n // Preferred: Return an augmented `Uint8Array` instance for best performance\n /*eslint-disable consistent-this */\n self = Buffer._augment(new Uint8Array(length))\n /*eslint-enable consistent-this */\n } else {\n // Fallback: Return THIS instance of Buffer (created by `new`)\n self.length = length\n self._isBuffer = true\n }\n\n var i\n if (Buffer.TYPED_ARRAY_SUPPORT && typeof subject.byteLength === 'number') {\n // Speed optimization -- use set if we're copying from a typed array\n self._set(subject)\n } else if (isArrayish(subject)) {\n // Treat array-ish objects as a byte array\n if (Buffer.isBuffer(subject)) {\n for (i = 0; i < length; i++)\n self[i] = subject.readUInt8(i)\n } else {\n for (i = 0; i < length; i++)\n self[i] = ((subject[i] % 256) + 256) % 256\n }\n } else if (type === 'string') {\n self.write(subject, 0, encoding)\n } else if (type === 'number' && !Buffer.TYPED_ARRAY_SUPPORT && !noZero) {\n for (i = 0; i < length; i++) {\n self[i] = 0\n }\n }\n\n if (length > 0 && length <= Buffer.poolSize)\n self.parent = rootParent\n\n return self\n}", "function Buffer (subject, encoding, noZero) {\n if (!(this instanceof Buffer))\n return new Buffer(subject, encoding, noZero)\n\n var type = typeof subject\n\n // Find the length\n var length\n if (type === 'number') {\n length = +subject\n } else if (type === 'string') {\n length = Buffer.byteLength(subject, encoding)\n } else if (type === 'object' && subject !== null) { // assume object is array-like\n if (subject.type === 'Buffer' && isArray(subject.data))\n subject = subject.data\n length = +subject.length\n } else {\n throw new TypeError('must start with number, buffer, array or string')\n }\n\n if (length > kMaxLength)\n throw new RangeError('Attempt to allocate Buffer larger than maximum ' +\n 'size: 0x' + kMaxLength.toString(16) + ' bytes')\n\n if (length < 0)\n length = 0\n else\n length >>>= 0 // Coerce to uint32.\n\n var self = this\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n // Preferred: Return an augmented `Uint8Array` instance for best performance\n /*eslint-disable consistent-this */\n self = Buffer._augment(new Uint8Array(length))\n /*eslint-enable consistent-this */\n } else {\n // Fallback: Return THIS instance of Buffer (created by `new`)\n self.length = length\n self._isBuffer = true\n }\n\n var i\n if (Buffer.TYPED_ARRAY_SUPPORT && typeof subject.byteLength === 'number') {\n // Speed optimization -- use set if we're copying from a typed array\n self._set(subject)\n } else if (isArrayish(subject)) {\n // Treat array-ish objects as a byte array\n if (Buffer.isBuffer(subject)) {\n for (i = 0; i < length; i++)\n self[i] = subject.readUInt8(i)\n } else {\n for (i = 0; i < length; i++)\n self[i] = ((subject[i] % 256) + 256) % 256\n }\n } else if (type === 'string') {\n self.write(subject, 0, encoding)\n } else if (type === 'number' && !Buffer.TYPED_ARRAY_SUPPORT && !noZero) {\n for (i = 0; i < length; i++) {\n self[i] = 0\n }\n }\n\n if (length > 0 && length <= Buffer.poolSize)\n self.parent = rootParent\n\n return self\n}", "function Buffer (subject, encoding, noZero) {\n if (!(this instanceof Buffer))\n return new Buffer(subject, encoding, noZero)\n\n var type = typeof subject\n\n // Find the length\n var length\n if (type === 'number') {\n length = +subject\n } else if (type === 'string') {\n length = Buffer.byteLength(subject, encoding)\n } else if (type === 'object' && subject !== null) { // assume object is array-like\n if (subject.type === 'Buffer' && isArray(subject.data))\n subject = subject.data\n length = +subject.length\n } else {\n throw new TypeError('must start with number, buffer, array or string')\n }\n\n if (length > kMaxLength)\n throw new RangeError('Attempt to allocate Buffer larger than maximum ' +\n 'size: 0x' + kMaxLength.toString(16) + ' bytes')\n\n if (length < 0)\n length = 0\n else\n length >>>= 0 // Coerce to uint32.\n\n var self = this\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n // Preferred: Return an augmented `Uint8Array` instance for best performance\n /*eslint-disable consistent-this */\n self = Buffer._augment(new Uint8Array(length))\n /*eslint-enable consistent-this */\n } else {\n // Fallback: Return THIS instance of Buffer (created by `new`)\n self.length = length\n self._isBuffer = true\n }\n\n var i\n if (Buffer.TYPED_ARRAY_SUPPORT && typeof subject.byteLength === 'number') {\n // Speed optimization -- use set if we're copying from a typed array\n self._set(subject)\n } else if (isArrayish(subject)) {\n // Treat array-ish objects as a byte array\n if (Buffer.isBuffer(subject)) {\n for (i = 0; i < length; i++)\n self[i] = subject.readUInt8(i)\n } else {\n for (i = 0; i < length; i++)\n self[i] = ((subject[i] % 256) + 256) % 256\n }\n } else if (type === 'string') {\n self.write(subject, 0, encoding)\n } else if (type === 'number' && !Buffer.TYPED_ARRAY_SUPPORT && !noZero) {\n for (i = 0; i < length; i++) {\n self[i] = 0\n }\n }\n\n if (length > 0 && length <= Buffer.poolSize)\n self.parent = rootParent\n\n return self\n}", "function Buffer (arg, encodingOrOffset, length) {\n\t if (!Buffer.TYPED_ARRAY_SUPPORT && !(this instanceof Buffer)) {\n\t return new Buffer(arg, encodingOrOffset, length)\n\t }\n\n\t // Common case.\n\t if (typeof arg === 'number') {\n\t if (typeof encodingOrOffset === 'string') {\n\t throw new Error(\n\t 'If encoding is specified then the first argument must be a string'\n\t )\n\t }\n\t return allocUnsafe(this, arg)\n\t }\n\t return from(this, arg, encodingOrOffset, length)\n\t}", "function Buffer (arg, encodingOrOffset, length) {\n\t if (!Buffer.TYPED_ARRAY_SUPPORT && !(this instanceof Buffer)) {\n\t return new Buffer(arg, encodingOrOffset, length)\n\t }\n\n\t // Common case.\n\t if (typeof arg === 'number') {\n\t if (typeof encodingOrOffset === 'string') {\n\t throw new Error(\n\t 'If encoding is specified then the first argument must be a string'\n\t )\n\t }\n\t return allocUnsafe(this, arg)\n\t }\n\t return from(this, arg, encodingOrOffset, length)\n\t}" ]
[ "0.7388382", "0.7388382", "0.7388382", "0.7388382", "0.7388382", "0.7388382", "0.7388382", "0.7384623", "0.7384623", "0.7384623", "0.7384623", "0.7384623", "0.7384623", "0.7384623", "0.7384623", "0.7384623", "0.7384623", "0.7384623", "0.7384623", "0.7384623", "0.7384623", "0.7384623", "0.7384623", "0.73229915", "0.73229915", "0.73229915", "0.73229915", "0.73229915", "0.7311373", "0.73075855", "0.73075855", "0.7273676", "0.72458464", "0.72458464", "0.720006", "0.71983886", "0.7197324", "0.7184513", "0.7184513", "0.7184513", "0.7184513", "0.71633613", "0.7152594", "0.71421325", "0.7126319", "0.7126319", "0.7126319", "0.7126319", "0.7126319", "0.7126319", "0.7126319", "0.7126319", "0.7126319", "0.7126319", "0.7126319", "0.7126319", "0.7126319", "0.7126319", "0.7126319", "0.7126319", "0.7126319", "0.7126319", "0.7126319", "0.7126319", "0.7126319", "0.7126319", "0.7126319", "0.71225774", "0.71225774", "0.71225774", "0.71225774", "0.71225774", "0.71225774", "0.71225774", "0.71225774", "0.71225774", "0.71225774", "0.71225774", "0.71225774", "0.71225774", "0.71225774", "0.71225774", "0.71225774", "0.71225774", "0.71177316", "0.71177316", "0.71177316", "0.71109897", "0.70998895", "0.70998895", "0.70945644", "0.70945644", "0.70945644", "0.70899457", "0.70899457" ]
0.70921373
98
Duplicate of fromArray() to keep fromArray() monomorphic.
function fromTypedArray (that, array) { var length = checked(array.length) | 0 that = allocate(that, length) // Truncating the elements is probably not what people expect from typed // arrays with BYTES_PER_ELEMENT > 1 but it's compatible with the behavior // of the old Buffer constructor. for (var i = 0; i < length; i += 1) { that[i] = array[i] & 255 } return that }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function fromArray(as) {\n // For some reason, TypeScript does not infer this type correctly\n var b = build;\n var f = as.reduce(b, []);\n return f;\n }", "function __spreadArray(to, from) {\n for (var i = 0, il = from.length, j = to.length; i < il; i++, j++)\n to[j] = from[i];\n return to;\n }", "function cloneArrFrom(arr) {\n let newArr = Array.from(arr);\n return newArr;\n}", "function fromTypedArray(that, array) {\n var length = checked(array.length) | 0;\n that = allocate(that, length);\n // Truncating the elements is probably not what people expect from typed\n // arrays with BYTES_PER_ELEMENT > 1 but it's compatible with the behavior\n // of the old Buffer constructor.\n for (var i = 0; i < length; i += 1) {\n that[i] = array[i] & 255;\n }\n return that;\n }", "function fromTypedArray(that, array) {\n var length = checked(array.length) | 0;\n that = allocate(that, length);\n // Truncating the elements is probably not what people expect from typed\n // arrays with BYTES_PER_ELEMENT > 1 but it's compatible with the behavior\n // of the old Buffer constructor.\n for (var i = 0; i < length; i += 1) {\n that[i] = array[i] & 255;\n }\n return that;\n }", "function fromTypedArray(that, array) {\n var length = checked(array.length) | 0\n that = allocate(that, length)\n // Truncating the elements is probably not what people expect from typed\n // arrays with BYTES_PER_ELEMENT > 1 but it's compatible with the behavior\n // of the old Buffer constructor.\n for (var i = 0; i < length; i += 1) {\n that[i] = array[i] & 255\n }\n return that\n }", "function copyArray() {\n return new Array(...array);\n}", "function fromTypedArray(that, array) {\n\t var length = checked(array.length) | 0;\n\t that = allocate(that, length);\n\t // Truncating the elements is probably not what people expect from typed\n\t // arrays with BYTES_PER_ELEMENT > 1 but it's compatible with the behavior\n\t // of the old Buffer constructor.\n\t for (var i = 0; i < length; i += 1) {\n\t that[i] = array[i] & 255;\n\t }\n\t return that;\n\t}", "function fromTypedArray(that, array) {\n\t var length = checked(array.length) | 0;\n\t that = allocate(that, length);\n\t // Truncating the elements is probably not what people expect from typed\n\t // arrays with BYTES_PER_ELEMENT > 1 but it's compatible with the behavior\n\t // of the old Buffer constructor.\n\t for (var i = 0; i < length; i += 1) {\n\t that[i] = array[i] & 255;\n\t }\n\t return that;\n\t}", "function fromTypedArray(that, array) {\n\t var length = checked(array.length) | 0;\n\t that = allocate(that, length);\n\t // Truncating the elements is probably not what people expect from typed\n\t // arrays with BYTES_PER_ELEMENT > 1 but it's compatible with the behavior\n\t // of the old Buffer constructor.\n\t for (var i = 0; i < length; i += 1) {\n\t that[i] = array[i] & 255;\n\t }\n\t return that;\n\t}", "function fromTypedArray(that, array) {\n\t var length = checked(array.length) | 0;\n\t that = allocate(that, length);\n\t // Truncating the elements is probably not what people expect from typed\n\t // arrays with BYTES_PER_ELEMENT > 1 but it's compatible with the behavior\n\t // of the old Buffer constructor.\n\t for (var i = 0; i < length; i += 1) {\n\t that[i] = array[i] & 255;\n\t }\n\t return that;\n\t}", "function fromTypedArray (that, array) {\n var length = checked(array.length) | 0\n that = allocate(that, length)\n // Truncating the elements is probably not what people expect from typed\n // arrays with BYTES_PER_ELEMENT > 1 but it's compatible with the behavior\n // of the old Buffer constructor.\n for (var i = 0; i < length; i += 1) {\n that[i] = array[i] & 255\n }\n return that\n }", "function fromTypedArray (that, array) {\n var length = checked(array.length) | 0\n that = allocate(that, length)\n // Truncating the elements is probably not what people expect from typed\n // arrays with BYTES_PER_ELEMENT > 1 but it's compatible with the behavior\n // of the old Buffer constructor.\n for (var i = 0; i < length; i += 1) {\n that[i] = array[i] & 255\n }\n return that\n }", "function fromArray(as) {\n return as.reduce(build, {});\n }", "function fromTypedArray (that, array) {\n var length = checked(array.length) | 0\n that = allocate(that, length)\n // Truncating the elements is probably not what people expect from typed\n // arrays with BYTES_PER_ELEMENT > 1 but it's compatible with the behavior\n // of the old Buffer constructor.\n for (var i = 0; i < length; i += 1) {\n that[i] = array[i] & 255\n }\n return that\n}", "function fromTypedArray (that, array) {\n var length = checked(array.length) | 0\n that = allocate(that, length)\n // Truncating the elements is probably not what people expect from typed\n // arrays with BYTES_PER_ELEMENT > 1 but it's compatible with the behavior\n // of the old Buffer constructor.\n for (var i = 0; i < length; i += 1) {\n that[i] = array[i] & 255\n }\n return that\n}", "function fromTypedArray (that, array) {\n var length = checked(array.length) | 0\n that = allocate(that, length)\n // Truncating the elements is probably not what people expect from typed\n // arrays with BYTES_PER_ELEMENT > 1 but it's compatible with the behavior\n // of the old Buffer constructor.\n for (var i = 0; i < length; i += 1) {\n that[i] = array[i] & 255\n }\n return that\n}", "function fromTypedArray (that, array) {\n var length = checked(array.length) | 0\n that = allocate(that, length)\n // Truncating the elements is probably not what people expect from typed\n // arrays with BYTES_PER_ELEMENT > 1 but it's compatible with the behavior\n // of the old Buffer constructor.\n for (var i = 0; i < length; i += 1) {\n that[i] = array[i] & 255\n }\n return that\n}", "function fromTypedArray (that, array) {\n var length = checked(array.length) | 0\n that = allocate(that, length)\n // Truncating the elements is probably not what people expect from typed\n // arrays with BYTES_PER_ELEMENT > 1 but it's compatible with the behavior\n // of the old Buffer constructor.\n for (var i = 0; i < length; i += 1) {\n that[i] = array[i] & 255\n }\n return that\n}", "function fromTypedArray (that, array) {\n var length = checked(array.length) | 0\n that = allocate(that, length)\n // Truncating the elements is probably not what people expect from typed\n // arrays with BYTES_PER_ELEMENT > 1 but it's compatible with the behavior\n // of the old Buffer constructor.\n for (var i = 0; i < length; i += 1) {\n that[i] = array[i] & 255\n }\n return that\n}", "function fromTypedArray (that, array) {\n var length = checked(array.length) | 0\n that = allocate(that, length)\n // Truncating the elements is probably not what people expect from typed\n // arrays with BYTES_PER_ELEMENT > 1 but it's compatible with the behavior\n // of the old Buffer constructor.\n for (var i = 0; i < length; i += 1) {\n that[i] = array[i] & 255\n }\n return that\n}", "function fromTypedArray (that, array) {\n var length = checked(array.length) | 0\n that = allocate(that, length)\n // Truncating the elements is probably not what people expect from typed\n // arrays with BYTES_PER_ELEMENT > 1 but it's compatible with the behavior\n // of the old Buffer constructor.\n for (var i = 0; i < length; i += 1) {\n that[i] = array[i] & 255\n }\n return that\n}", "function fromTypedArray (that, array) {\n var length = checked(array.length) | 0\n that = allocate(that, length)\n // Truncating the elements is probably not what people expect from typed\n // arrays with BYTES_PER_ELEMENT > 1 but it's compatible with the behavior\n // of the old Buffer constructor.\n for (var i = 0; i < length; i += 1) {\n that[i] = array[i] & 255\n }\n return that\n}", "function fromTypedArray (that, array) {\n var length = checked(array.length) | 0\n that = allocate(that, length)\n // Truncating the elements is probably not what people expect from typed\n // arrays with BYTES_PER_ELEMENT > 1 but it's compatible with the behavior\n // of the old Buffer constructor.\n for (var i = 0; i < length; i += 1) {\n that[i] = array[i] & 255\n }\n return that\n}", "function fromTypedArray (that, array) {\n var length = checked(array.length) | 0\n that = allocate(that, length)\n // Truncating the elements is probably not what people expect from typed\n // arrays with BYTES_PER_ELEMENT > 1 but it's compatible with the behavior\n // of the old Buffer constructor.\n for (var i = 0; i < length; i += 1) {\n that[i] = array[i] & 255\n }\n return that\n}", "function fromTypedArray (that, array) {\n var length = checked(array.length) | 0\n that = allocate(that, length)\n // Truncating the elements is probably not what people expect from typed\n // arrays with BYTES_PER_ELEMENT > 1 but it's compatible with the behavior\n // of the old Buffer constructor.\n for (var i = 0; i < length; i += 1) {\n that[i] = array[i] & 255\n }\n return that\n}", "function fromTypedArray (that, array) {\n var length = checked(array.length) | 0\n that = allocate(that, length)\n // Truncating the elements is probably not what people expect from typed\n // arrays with BYTES_PER_ELEMENT > 1 but it's compatible with the behavior\n // of the old Buffer constructor.\n for (var i = 0; i < length; i += 1) {\n that[i] = array[i] & 255\n }\n return that\n}", "function fromTypedArray (that, array) {\n var length = checked(array.length) | 0\n that = allocate(that, length)\n // Truncating the elements is probably not what people expect from typed\n // arrays with BYTES_PER_ELEMENT > 1 but it's compatible with the behavior\n // of the old Buffer constructor.\n for (var i = 0; i < length; i += 1) {\n that[i] = array[i] & 255\n }\n return that\n}", "function fromTypedArray (that, array) {\n var length = checked(array.length) | 0\n that = allocate(that, length)\n // Truncating the elements is probably not what people expect from typed\n // arrays with BYTES_PER_ELEMENT > 1 but it's compatible with the behavior\n // of the old Buffer constructor.\n for (var i = 0; i < length; i += 1) {\n that[i] = array[i] & 255\n }\n return that\n}", "function fromTypedArray (that, array) {\n var length = checked(array.length) | 0\n that = allocate(that, length)\n // Truncating the elements is probably not what people expect from typed\n // arrays with BYTES_PER_ELEMENT > 1 but it's compatible with the behavior\n // of the old Buffer constructor.\n for (var i = 0; i < length; i += 1) {\n that[i] = array[i] & 255\n }\n return that\n}", "function fromTypedArray (that, array) {\n var length = checked(array.length) | 0\n that = allocate(that, length)\n // Truncating the elements is probably not what people expect from typed\n // arrays with BYTES_PER_ELEMENT > 1 but it's compatible with the behavior\n // of the old Buffer constructor.\n for (var i = 0; i < length; i += 1) {\n that[i] = array[i] & 255\n }\n return that\n}", "function fromTypedArray (that, array) {\n var length = checked(array.length) | 0\n that = allocate(that, length)\n // Truncating the elements is probably not what people expect from typed\n // arrays with BYTES_PER_ELEMENT > 1 but it's compatible with the behavior\n // of the old Buffer constructor.\n for (var i = 0; i < length; i += 1) {\n that[i] = array[i] & 255\n }\n return that\n}", "function fromTypedArray (that, array) {\n var length = checked(array.length) | 0\n that = allocate(that, length)\n // Truncating the elements is probably not what people expect from typed\n // arrays with BYTES_PER_ELEMENT > 1 but it's compatible with the behavior\n // of the old Buffer constructor.\n for (var i = 0; i < length; i += 1) {\n that[i] = array[i] & 255\n }\n return that\n}", "function fromTypedArray (that, array) {\n var length = checked(array.length) | 0\n that = allocate(that, length)\n // Truncating the elements is probably not what people expect from typed\n // arrays with BYTES_PER_ELEMENT > 1 but it's compatible with the behavior\n // of the old Buffer constructor.\n for (var i = 0; i < length; i += 1) {\n that[i] = array[i] & 255\n }\n return that\n}", "function fromTypedArray (that, array) {\n var length = checked(array.length) | 0\n that = allocate(that, length)\n // Truncating the elements is probably not what people expect from typed\n // arrays with BYTES_PER_ELEMENT > 1 but it's compatible with the behavior\n // of the old Buffer constructor.\n for (var i = 0; i < length; i += 1) {\n that[i] = array[i] & 255\n }\n return that\n}", "function fromTypedArray (that, array) {\n var length = checked(array.length) | 0\n that = allocate(that, length)\n // Truncating the elements is probably not what people expect from typed\n // arrays with BYTES_PER_ELEMENT > 1 but it's compatible with the behavior\n // of the old Buffer constructor.\n for (var i = 0; i < length; i += 1) {\n that[i] = array[i] & 255\n }\n return that\n}", "function fromTypedArray (that, array) {\n var length = checked(array.length) | 0\n that = allocate(that, length)\n // Truncating the elements is probably not what people expect from typed\n // arrays with BYTES_PER_ELEMENT > 1 but it's compatible with the behavior\n // of the old Buffer constructor.\n for (var i = 0; i < length; i += 1) {\n that[i] = array[i] & 255\n }\n return that\n}", "function fromTypedArray (that, array) {\n var length = checked(array.length) | 0\n that = allocate(that, length)\n // Truncating the elements is probably not what people expect from typed\n // arrays with BYTES_PER_ELEMENT > 1 but it's compatible with the behavior\n // of the old Buffer constructor.\n for (var i = 0; i < length; i += 1) {\n that[i] = array[i] & 255\n }\n return that\n}", "function fromTypedArray (that, array) {\n var length = checked(array.length) | 0\n that = allocate(that, length)\n // Truncating the elements is probably not what people expect from typed\n // arrays with BYTES_PER_ELEMENT > 1 but it's compatible with the behavior\n // of the old Buffer constructor.\n for (var i = 0; i < length; i += 1) {\n that[i] = array[i] & 255\n }\n return that\n}", "function fromTypedArray (that, array) {\n var length = checked(array.length) | 0\n that = allocate(that, length)\n // Truncating the elements is probably not what people expect from typed\n // arrays with BYTES_PER_ELEMENT > 1 but it's compatible with the behavior\n // of the old Buffer constructor.\n for (var i = 0; i < length; i += 1) {\n that[i] = array[i] & 255\n }\n return that\n}", "function fromTypedArray (that, array) {\n var length = checked(array.length) | 0\n that = allocate(that, length)\n // Truncating the elements is probably not what people expect from typed\n // arrays with BYTES_PER_ELEMENT > 1 but it's compatible with the behavior\n // of the old Buffer constructor.\n for (var i = 0; i < length; i += 1) {\n that[i] = array[i] & 255\n }\n return that\n}", "function fromTypedArray (that, array) {\n var length = checked(array.length) | 0\n that = allocate(that, length)\n // Truncating the elements is probably not what people expect from typed\n // arrays with BYTES_PER_ELEMENT > 1 but it's compatible with the behavior\n // of the old Buffer constructor.\n for (var i = 0; i < length; i += 1) {\n that[i] = array[i] & 255\n }\n return that\n}", "function fromTypedArray (that, array) {\n var length = checked(array.length) | 0\n that = allocate(that, length)\n // Truncating the elements is probably not what people expect from typed\n // arrays with BYTES_PER_ELEMENT > 1 but it's compatible with the behavior\n // of the old Buffer constructor.\n for (var i = 0; i < length; i += 1) {\n that[i] = array[i] & 255\n }\n return that\n}", "function fromTypedArray (that, array) {\n var length = checked(array.length) | 0\n that = allocate(that, length)\n // Truncating the elements is probably not what people expect from typed\n // arrays with BYTES_PER_ELEMENT > 1 but it's compatible with the behavior\n // of the old Buffer constructor.\n for (var i = 0; i < length; i += 1) {\n that[i] = array[i] & 255\n }\n return that\n}", "function fromTypedArray (that, array) {\n var length = checked(array.length) | 0\n that = allocate(that, length)\n // Truncating the elements is probably not what people expect from typed\n // arrays with BYTES_PER_ELEMENT > 1 but it's compatible with the behavior\n // of the old Buffer constructor.\n for (var i = 0; i < length; i += 1) {\n that[i] = array[i] & 255\n }\n return that\n}", "function fromTypedArray (that, array) {\n var length = checked(array.length) | 0\n that = allocate(that, length)\n // Truncating the elements is probably not what people expect from typed\n // arrays with BYTES_PER_ELEMENT > 1 but it's compatible with the behavior\n // of the old Buffer constructor.\n for (var i = 0; i < length; i += 1) {\n that[i] = array[i] & 255\n }\n return that\n}", "function fromTypedArray (that, array) {\n var length = checked(array.length) | 0\n that = allocate(that, length)\n // Truncating the elements is probably not what people expect from typed\n // arrays with BYTES_PER_ELEMENT > 1 but it's compatible with the behavior\n // of the old Buffer constructor.\n for (var i = 0; i < length; i += 1) {\n that[i] = array[i] & 255\n }\n return that\n}", "function fromTypedArray (that, array) {\n var length = checked(array.length) | 0\n that = allocate(that, length)\n // Truncating the elements is probably not what people expect from typed\n // arrays with BYTES_PER_ELEMENT > 1 but it's compatible with the behavior\n // of the old Buffer constructor.\n for (var i = 0; i < length; i += 1) {\n that[i] = array[i] & 255\n }\n return that\n}", "function fromTypedArray (that, array) {\n var length = checked(array.length) | 0\n that = allocate(that, length)\n // Truncating the elements is probably not what people expect from typed\n // arrays with BYTES_PER_ELEMENT > 1 but it's compatible with the behavior\n // of the old Buffer constructor.\n for (var i = 0; i < length; i += 1) {\n that[i] = array[i] & 255\n }\n return that\n}", "function fromTypedArray (that, array) {\n var length = checked(array.length) | 0\n that = allocate(that, length)\n // Truncating the elements is probably not what people expect from typed\n // arrays with BYTES_PER_ELEMENT > 1 but it's compatible with the behavior\n // of the old Buffer constructor.\n for (var i = 0; i < length; i += 1) {\n that[i] = array[i] & 255\n }\n return that\n}", "function fromTypedArray (that, array) {\n var length = checked(array.length) | 0\n that = allocate(that, length)\n // Truncating the elements is probably not what people expect from typed\n // arrays with BYTES_PER_ELEMENT > 1 but it's compatible with the behavior\n // of the old Buffer constructor.\n for (var i = 0; i < length; i += 1) {\n that[i] = array[i] & 255\n }\n return that\n}", "function fromTypedArray (that, array) {\n var length = checked(array.length) | 0\n that = allocate(that, length)\n // Truncating the elements is probably not what people expect from typed\n // arrays with BYTES_PER_ELEMENT > 1 but it's compatible with the behavior\n // of the old Buffer constructor.\n for (var i = 0; i < length; i += 1) {\n that[i] = array[i] & 255\n }\n return that\n}", "function fromTypedArray (that, array) {\n var length = checked(array.length) | 0\n that = allocate(that, length)\n // Truncating the elements is probably not what people expect from typed\n // arrays with BYTES_PER_ELEMENT > 1 but it's compatible with the behavior\n // of the old Buffer constructor.\n for (var i = 0; i < length; i += 1) {\n that[i] = array[i] & 255\n }\n return that\n}", "function fromTypedArray (that, array) {\n var length = checked(array.length) | 0\n that = allocate(that, length)\n // Truncating the elements is probably not what people expect from typed\n // arrays with BYTES_PER_ELEMENT > 1 but it's compatible with the behavior\n // of the old Buffer constructor.\n for (var i = 0; i < length; i += 1) {\n that[i] = array[i] & 255\n }\n return that\n}", "static fromArray(arr) {\n return Matrix.map(new Matrix(arr.length, 1), (_, i) => arr[i]);\n }", "function fromTypedArray (that, array) {\n\t\t var length = checked(array.length) | 0\n\t\t that = allocate(that, length)\n\t\t // Truncating the elements is probably not what people expect from typed\n\t\t // arrays with BYTES_PER_ELEMENT > 1 but it's compatible with the behavior\n\t\t // of the old Buffer constructor.\n\t\t for (var i = 0; i < length; i += 1) {\n\t\t that[i] = array[i] & 255\n\t\t }\n\t\t return that\n\t\t}", "function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } }", "function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } }", "function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } }", "function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } }", "function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } }", "function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } }", "function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } }", "function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } }", "function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } }", "function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } }", "copyArray(arr) {\n\t\treturn Array.from(arr).map((val, ind) => Array.from(arr[ind]));\n\t}", "function _toConsumableArray(arr){if(Array.isArray(arr)){for(var i=0,arr2=Array(arr.length);i<arr.length;i++)arr2[i]=arr[i];return arr2}else return Array.from(arr)}", "function toObjectArray(origArray) {\n\n var newArray = [];\n for (var index = 1; index < origArray.length; index++) {\n newArray.push(_.zipObject(origArray[0], origArray[index]));\n }\n\n return newArray;\n\n}", "function h$fromArray(a) {\n var r = h$ghczmprimZCGHCziTypesziZMZN;\n for(var i=a.length-1;i>=0;i--) r = (h$c2(h$ghczmprimZCGHCziTypesziZC_con_e, ((h$c1(h$ghcjszmprimZCGHCJSziPrimziJSVal_con_e, (a[i])))), (r)));\n return a;\n}", "function h$fromArray(a) {\n var r = h$ghczmprimZCGHCziTypesziZMZN;\n for(var i=a.length-1;i>=0;i--) r = (h$c2(h$ghczmprimZCGHCziTypesziZC_con_e, ((h$c1(h$ghcjszmprimZCGHCJSziPrimziJSVal_con_e, (a[i])))), (r)));\n return a;\n}", "function h$fromArray(a) {\n var r = h$ghczmprimZCGHCziTypesziZMZN;\n for(var i=a.length-1;i>=0;i--) r = (h$c2(h$ghczmprimZCGHCziTypesziZC_con_e, ((h$c1(h$ghcjszmprimZCGHCJSziPrimziJSVal_con_e, (a[i])))), (r)));\n return a;\n}" ]
[ "0.65911216", "0.65310407", "0.65121055", "0.64978987", "0.6463779", "0.6456704", "0.64391524", "0.63985753", "0.63985753", "0.63985753", "0.63985753", "0.631068", "0.631068", "0.6280822", "0.62328637", "0.62328637", "0.62328637", "0.62328637", "0.62328637", "0.62328637", "0.62328637", "0.62328637", "0.62328637", "0.62328637", "0.62328637", "0.62328637", "0.62328637", "0.62328637", "0.62328637", "0.62328637", "0.62328637", "0.62328637", "0.62328637", "0.62328637", "0.62328637", "0.62328637", "0.62328637", "0.62328637", "0.62328637", "0.62328637", "0.62328637", "0.62328637", "0.62328637", "0.62328637", "0.62328637", "0.62328637", "0.62328637", "0.62328637", "0.62328637", "0.62328637", "0.62328637", "0.62328637", "0.62328637", "0.62328637", "0.6214045", "0.61983263", "0.61792153", "0.61792153", "0.61792153", "0.61792153", "0.61792153", "0.61792153", "0.61792153", "0.61792153", "0.61792153", "0.61792153", "0.61069787", "0.61005676", "0.6097954", "0.6091116", "0.6091116", "0.6091116" ]
0.62617916
39
Need to make sure that buffer isn't trying to write out of bounds.
function checkOffset (offset, ext, length) { if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint') if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length') }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function writeBuffer(buffer, pos, src) {\n src.copy(buffer, pos)\n return src.length\n}", "function writeBuffer(buffer, pos, src) {\n src.copy(buffer, pos)\n return src.length\n}", "ensure(n) {\n let minsize = this.pos + n;\n if (minsize > this.capacity) {\n let cap = this.capacity * 2;\n while (cap < minsize) cap *= 2;\n let newbuf = new Uint8Array(cap);\n newbuf.set(this.buffer);\n this.buffer = newbuf;\n this.capacity = cap;\n }\n }", "function bufferOutOfBounds(name = undefined) {\n if (name) {\n return `\"${name}\" is outside of buffer bounds`;\n }\n return 'Attempt to write outside buffer bounds';\n}", "writeBytes(value) {\n let start = 0;\n let valueLen = value.length;\n while (valueLen > 0) {\n const bytesLeft = this.numBytesLeft();\n if (bytesLeft === 0) {\n this._grow(this.pos + valueLen);\n }\n const bytesToWrite = Math.min(bytesLeft, valueLen);\n value.copy(this.buf, this.pos, start, start + bytesToWrite);\n this.pos += bytesToWrite;\n start += bytesToWrite;\n valueLen -= bytesToWrite;\n }\n }", "function checkLen(len){\n if(pos + len > buf.length)\n throw new Error('Broken data stream at pos ' + pos + ' (need ' + len + ' more bytes)');\n }", "oob() {\n return this.at > this.buffer.byteLength || this.at < 0;\n }", "_blockedWrite() {\n throw new Error('Cannot write because the writer has been closed.');\n }", "_blockedWrite() {\n throw new Error('Cannot write because the writer has been closed.');\n }", "function write() {\n\t// Bail if the write queue is invalid\n\tif (!check_queue_write()) return;\n\n\t// Create message from buffer\n\tlet buffer = proto.proto.create(intf.intf.queue_write[intf.intf.queue_write.length - 1]);\n\n\tif (typeof buffer === 'undefined' || buffer === null || buffer === '') return;\n\n\tintf.intf.port.write(buffer, (error) => {\n\t\t// Bail and retry if there was a write error\n\t\tif (error) {\n\t\t\terror_out('writing', error);\n\n\t\t\t// Re-kick it\n\t\t\tsetImmediate(write);\n\n\t\t\treturn;\n\t\t}\n\n\t\tintf.intf.port.drain(() => {\n\t\t\t// After a successful write and drain, remove the last element from the write queue\n\t\t\tintf.intf.queue_write.pop();\n\n\t\t\t// Re-kick it\n\t\t\t// setImmediate(write);\n\t\t\tprocess.nextTick(write);\n\t\t});\n\t});\n}", "write(sequence, offset) {\n offset = typeof offset === 'number' ? offset : this.position;\n // If the buffer is to small let's extend the buffer\n if (this.buffer.length < offset + sequence.length) {\n const buffer$1 = buffer__WEBPACK_IMPORTED_MODULE_0___default.a.Buffer.alloc(this.buffer.length + sequence.length);\n this.buffer.copy(buffer$1, 0, 0, this.buffer.length);\n // Assign the new buffer\n this.buffer = buffer$1;\n }\n if (ArrayBuffer.isView(sequence)) {\n this.buffer.set(ensure_buffer.ensureBuffer(sequence), offset);\n this.position =\n offset + sequence.byteLength > this.position ? offset + sequence.length : this.position;\n }\n else if (typeof sequence === 'string') {\n this.buffer.write(sequence, offset, sequence.length, 'binary');\n this.position =\n offset + sequence.length > this.position ? offset + sequence.length : this.position;\n }\n }", "function pushError(){assert.throws(function(){r.push(new Buffer(1))})}", "function writeBuffer()\n{\n fs.writeFile(outputFile, outputBuffer, 'utf8', function (error) {\n if (error)\n {\n console.log('Could not write the file', error);\n }\n\n exit();\n });\n}", "function checkOffset (offset, ext, length) {\n\t if ((offset % 1) !== 0 || offset < 0)\n\t throw new RangeError('offset is not uint')\n\t if (offset + ext > length)\n\t throw new RangeError('Trying to access beyond buffer length')\n\t}", "function checkOffset (offset, ext, length) {\n if ((offset % 1) !== 0 || offset < 0)\n throw new RangeError('offset is not uint')\n if (offset + ext > length)\n throw new RangeError('Trying to access beyond buffer length')\n }", "function checkOffset (offset, ext, length) {\n if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint')\n if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length')\n }", "function checkOffset (offset, ext, length) {\n if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint')\n if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length')\n }", "function checkOffset (offset, ext, length) {\n if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint')\n if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length')\n }", "function writeOrBuffer(stream, state, chunk, encoding, cb) {\n\t chunk = decodeChunk(state, chunk, encoding);\n\t if (util.isBuffer(chunk)) encoding = 'buffer';\n\t var len = state.objectMode ? 1 : chunk.length;\n\n\t state.length += len;\n\n\t var ret = state.length < state.highWaterMark;\n\t // we must ensure that previous needDrain will not be reset to false.\n\t if (!ret) state.needDrain = true;\n\n\t if (state.writing || state.corked) state.buffer.push(new WriteReq(chunk, encoding, cb));else doWrite(stream, state, false, len, chunk, encoding, cb);\n\n\t return ret;\n\t}", "onDrain() {\n this.writeBuffer.splice(0, this.prevBufferLen);\n\n // setting prevBufferLen = 0 is very important\n // for example, when upgrading, upgrade packet is sent over,\n // and a nonzero prevBufferLen could cause problems on `drain`\n this.prevBufferLen = 0;\n\n if (0 === this.writeBuffer.length) {\n this.emit(\"drain\");\n } else {\n this.flush();\n }\n }", "onDrain() {\n this.writeBuffer.splice(0, this.prevBufferLen);\n\n // setting prevBufferLen = 0 is very important\n // for example, when upgrading, upgrade packet is sent over,\n // and a nonzero prevBufferLen could cause problems on `drain`\n this.prevBufferLen = 0;\n\n if (0 === this.writeBuffer.length) {\n this.emit(\"drain\");\n } else {\n this.flush();\n }\n }", "function checkOffset (offset, ext, length) {\n\t\t if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint')\n\t\t if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length')\n\t\t}", "function writeLength(buffer, pos, length) {\n var digit = 0\n , origPos = pos\n\n do {\n digit = length % 128 | 0\n length = length / 128 | 0\n if (length > 0) {\n digit = digit | 0x80\n }\n buffer.writeUInt8(digit, pos++, true)\n } while (length > 0)\n\n return pos - origPos\n}", "function writeLength(buffer, pos, length) {\n var digit = 0\n , origPos = pos\n\n do {\n digit = length % 128 | 0\n length = length / 128 | 0\n if (length > 0) {\n digit = digit | 0x80\n }\n buffer.writeUInt8(digit, pos++, true)\n } while (length > 0)\n\n return pos - origPos\n}", "function checkOffset (offset, ext, length) {\n if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint')\n if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length')\n }", "function checkOffset(offset, ext, length) {\n if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint')\n if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length')\n }", "function writeOrBuffer(stream, state, chunk, encoding, cb) {\n\t chunk = decodeChunk(state, chunk, encoding);\n\t if (Buffer.isBuffer(chunk))\n\t encoding = 'buffer';\n\t var len = state.objectMode ? 1 : chunk.length;\n\t\n\t state.length += len;\n\t\n\t var ret = state.length < state.highWaterMark;\n\t // we must ensure that previous needDrain will not be reset to false.\n\t if (!ret)\n\t state.needDrain = true;\n\t\n\t if (state.writing)\n\t state.buffer.push(new WriteReq(chunk, encoding, cb));\n\t else\n\t doWrite(stream, state, len, chunk, encoding, cb);\n\t\n\t return ret;\n\t}" ]
[ "0.66716176", "0.66716176", "0.66315866", "0.6520346", "0.63839465", "0.627423", "0.6253665", "0.62347245", "0.62347245", "0.6108547", "0.6036368", "0.6017906", "0.59830993", "0.59575397", "0.5946407", "0.5938225", "0.5938225", "0.5938225", "0.593551", "0.5929771", "0.5929771", "0.5923442", "0.59165347", "0.59165347", "0.59157187", "0.59137034", "0.5911989" ]
0.59489954
73
Copyright Joyent, Inc. and other Node contributors. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. NOTE: These type checking functions intentionally don't use `instanceof` because it is fragile and can be easily faked with `Object.create()`.
function isArray(ar) { return Array.isArray(ar); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function t(e){return!!e.constructor&&'function'==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}", "function n(e){return!!e.constructor&&\"function\"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}", "function t(n){return!!n.constructor&&typeof n.constructor.isBuffer==\"function\"&&n.constructor.isBuffer(n)}", "function t(n){return!!n.constructor&&typeof n.constructor.isBuffer==\"function\"&&n.constructor.isBuffer(n)}", "function t(n){return!!n.constructor&&typeof n.constructor.isBuffer==\"function\"&&n.constructor.isBuffer(n)}", "function o(e){return!!e.constructor&&\"function\"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}", "function F(t) {\n return \"object\" == typeof t && null !== t && (Object.getPrototypeOf(t) === Object.prototype || null === Object.getPrototypeOf(t));\n}", "function r(e){return!!e.constructor&&\"function\"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}", "function r(e){return!!e.constructor&&\"function\"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}", "function r(e){return!!e.constructor&&\"function\"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}", "function r(e){return!!e.constructor&&\"function\"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}", "function r(e){return!!e.constructor&&\"function\"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}", "function r(e){return!!e.constructor&&\"function\"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}", "function r(e){return!!e.constructor&&\"function\"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}", "function r(e){return!!e.constructor&&\"function\"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}", "function r(e){return!!e.constructor&&\"function\"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}", "function Y(t) {\n return \"object\" == typeof t && null !== t && (Object.getPrototypeOf(t) === Object.prototype || null === Object.getPrototypeOf(t));\n}", "function e(t){return!!t.constructor&&\"function\"==typeof t.constructor.isBuffer&&t.constructor.isBuffer(t)}", "function n(t){return!!t.constructor&&\"function\"==typeof t.constructor.isBuffer&&t.constructor.isBuffer(t)}", "function n(t){return!!t.constructor&&\"function\"==typeof t.constructor.isBuffer&&t.constructor.isBuffer(t)}", "function fe(t) {\n return \"object\" == typeof t && null !== t && (Object.getPrototypeOf(t) === Object.prototype || null === Object.getPrototypeOf(t));\n}", "function an(t) {\n return \"object\" == typeof t && null !== t && (Object.getPrototypeOf(t) === Object.prototype || null === Object.getPrototypeOf(t));\n}", "function n(r){return!!r.constructor&&typeof r.constructor.isBuffer==\"function\"&&r.constructor.isBuffer(r)}", "function u(e){return!0===\n/*!\n * isobject <https://github.com/jonschlinkert/isobject>\n *\n * Copyright (c) 2014-2017, Jon Schlinkert.\n * Released under the MIT License.\n */\nfunction(e){return null!=e&&\"object\"==typeof e&&!1===Array.isArray(e)}(e)&&\"[object Object]\"===Object.prototype.toString.call(e)}", "function r(t){return t&&\"object\"===typeof t}", "function r(t){return!!t.constructor&&\"function\"==typeof t.constructor.isBuffer&&t.constructor.isBuffer(t)}", "function r(t){return!!t.constructor&&\"function\"==typeof t.constructor.isBuffer&&t.constructor.isBuffer(t)}", "function r(t){return!!t.constructor&&\"function\"==typeof t.constructor.isBuffer&&t.constructor.isBuffer(t)}", "function isPlainObject(input){return typeof input==='object'&&input!==null&&(Object.getPrototypeOf(input)===Object.prototype||Object.getPrototypeOf(input)===null);}", "function i(e){return!0===\n/*!\n * isobject <https://github.com/jonschlinkert/isobject>\n *\n * Copyright (c) 2014-2017, Jon Schlinkert.\n * Released under the MIT License.\n */\nfunction(e){return null!=e&&\"object\"==typeof e&&!1===Array.isArray(e)}(e)&&\"[object Object]\"===Object.prototype.toString.call(e)}", "function builtinprototypesarenotinstances() {\n try {\n Boolean.prototype.valueOf(); return false;\n } catch(e) {}\n try {\n Number.prototype.valueOf(); return false;\n } catch(e) {}\n try {\n String.prototype.toString(); return false;\n } catch(e) {}\n try {\n RegExp.prototype.source; return false;\n } catch(e) {}\n try {\n Date.prototype.valueOf(); return false;\n } catch(e) {}\n return true;\n}", "function Ko(t) {\n return \"object\" == typeof t && null !== t && (Object.getPrototypeOf(t) === Object.prototype || null === Object.getPrototypeOf(t));\n}", "function testcase() {\n var numProto = Object.getPrototypeOf(new Number(42));\n var s = Object.prototype.toString.call(numProto );\n return (s === '[object Object]') ;\n }", "function v11(v12,v13) {\n const v15 = v11(Object,Function);\n // v15 = .unknown\n const v16 = Object(v13,v8,0,v6);\n // v16 = .object()\n const v17 = 0;\n // v17 = .integer\n const v18 = 1;\n // v18 = .integer\n const v19 = 512;\n // v19 = .integer\n const v20 = \"-1024\";\n // v20 = .string + .object(ofGroup: String, withProperties: [\"constructor\", \"__proto__\", \"length\"], withMethods: [\"padEnd\", \"split\", \"charAt\", \"match\", \"lastIndexOf\", \"charCodeAt\", \"trim\", \"startsWith\", \"includes\", \"repeat\", \"search\", \"slice\", \"endsWith\", \"matchAll\", \"indexOf\", \"concat\", \"replace\", \"padStart\", \"substring\", \"codePointAt\"])\n const v21 = isFinite;\n // v21 = .function([.anything] => .boolean)\n const v23 = [1337];\n // v23 = .object(ofGroup: Array, withProperties: [\"length\", \"__proto__\", \"constructor\"], withMethods: [\"concat\", \"fill\", \"indexOf\", \"entries\", \"forEach\", \"find\", \"reverse\", \"slice\", \"flat\", \"reduce\", \"join\", \"findIndex\", \"reduceRight\", \"some\", \"copyWithin\", \"toString\", \"pop\", \"filter\", \"map\", \"splice\", \"keys\", \"unshift\", \"sort\", \"includes\", \"flatMap\", \"shift\", \"values\", \"every\", \"toLocaleString\", \"push\", \"lastIndexOf\"])\n const v24 = {};\n // v24 = .object(ofGroup: Object, withProperties: [\"__proto__\"])\n let v25 = v23;\n const v26 = -29897853;\n // v26 = .integer\n const v27 = \"replace\";\n // v27 = .string + .object(ofGroup: String, withProperties: [\"constructor\", \"__proto__\", \"length\"], withMethods: [\"padEnd\", \"split\", \"charAt\", \"match\", \"lastIndexOf\", \"charCodeAt\", \"trim\", \"startsWith\", \"includes\", \"repeat\", \"search\", \"slice\", \"endsWith\", \"matchAll\", \"indexOf\", \"concat\", \"replace\", \"padStart\", \"substring\", \"codePointAt\"])\n const v28 = Boolean;\n // v28 = .object(ofGroup: BooleanConstructor, withProperties: [\"prototype\"]) + .function([.anything] => .boolean) + .constructor([.anything] => .boolean)\n const v30 = [13.37,13.37];\n // v30 = .object(ofGroup: Array, withProperties: [\"length\", \"__proto__\", \"constructor\"], withMethods: [\"concat\", \"fill\", \"indexOf\", \"entries\", \"forEach\", \"find\", \"reverse\", \"slice\", \"flat\", \"reduce\", \"join\", \"findIndex\", \"reduceRight\", \"some\", \"copyWithin\", \"toString\", \"pop\", \"filter\", \"map\", \"splice\", \"keys\", \"unshift\", \"sort\", \"includes\", \"flatMap\", \"shift\", \"values\", \"every\", \"toLocaleString\", \"push\", \"lastIndexOf\"])\n const v31 = 1337;\n // v31 = .integer\n let v32 = 13.37;\n const v36 = [13.37,13.37,13.37];\n // v36 = .object(ofGroup: Array, withProperties: [\"length\", \"__proto__\", \"constructor\"], withMethods: [\"concat\", \"fill\", \"indexOf\", \"entries\", \"forEach\", \"find\", \"reverse\", \"slice\", \"flat\", \"reduce\", \"join\", \"findIndex\", \"reduceRight\", \"some\", \"copyWithin\", \"toString\", \"pop\", \"filter\", \"map\", \"splice\", \"keys\", \"unshift\", \"sort\", \"includes\", \"flatMap\", \"shift\", \"values\", \"every\", \"toLocaleString\", \"push\", \"lastIndexOf\"])\n const v38 = [1337,1337];\n // v38 = .object(ofGroup: Array, withProperties: [\"length\", \"__proto__\", \"constructor\"], withMethods: [\"concat\", \"fill\", \"indexOf\", \"entries\", \"forEach\", \"find\", \"reverse\", \"slice\", \"flat\", \"reduce\", \"join\", \"findIndex\", \"reduceRight\", \"some\", \"copyWithin\", \"toString\", \"pop\", \"filter\", \"map\", \"splice\", \"keys\", \"unshift\", \"sort\", \"includes\", \"flatMap\", \"shift\", \"values\", \"every\", \"toLocaleString\", \"push\", \"lastIndexOf\"])\n const v39 = [13.37,1337,v38,1337,\"-128\",13.37,\"-128\",\"-128\",2147483647,1337];\n // v39 = .object(ofGroup: Array, withProperties: [\"length\", \"__proto__\", \"constructor\"], withMethods: [\"concat\", \"fill\", \"indexOf\", \"entries\", \"forEach\", \"find\", \"reverse\", \"slice\", \"flat\", \"reduce\", \"join\", \"findIndex\", \"reduceRight\", \"some\", \"copyWithin\", \"toString\", \"pop\", \"filter\", \"map\", \"splice\", \"keys\", \"unshift\", \"sort\", \"includes\", \"flatMap\", \"shift\", \"values\", \"every\", \"toLocaleString\", \"push\", \"lastIndexOf\"])\n const v40 = {__proto__:v36,length:v39};\n // v40 = .object(ofGroup: Object, withProperties: [\"__proto__\", \"length\"])\n const v41 = \"0\";\n // v41 = .string + .object(ofGroup: String, withProperties: [\"constructor\", \"__proto__\", \"length\"], withMethods: [\"padEnd\", \"split\", \"charAt\", \"match\", \"lastIndexOf\", \"charCodeAt\", \"trim\", \"startsWith\", \"includes\", \"repeat\", \"search\", \"slice\", \"endsWith\", \"matchAll\", \"indexOf\", \"concat\", \"replace\", \"padStart\", \"substring\", \"codePointAt\"])\n const v42 = -4130093409;\n // v42 = .integer\n const v44 = {b:2147483647,e:v38,valueOf:v36};\n // v44 = .object(ofGroup: Object, withProperties: [\"__proto__\", \"b\", \"valueOf\", \"e\"])\n const v45 = \"k**baeaDif\";\n // v45 = .string + .object(ofGroup: String, withProperties: [\"constructor\", \"__proto__\", \"length\"], withMethods: [\"padEnd\", \"split\", \"charAt\", \"match\", \"lastIndexOf\", \"charCodeAt\", \"trim\", \"startsWith\", \"includes\", \"repeat\", \"search\", \"slice\", \"endsWith\", \"matchAll\", \"indexOf\", \"concat\", \"replace\", \"padStart\", \"substring\", \"codePointAt\"])\n const v46 = 65536;\n // v46 = .integer\n const v47 = \"k**baeaDif\";\n // v47 = .string + .object(ofGroup: String, withProperties: [\"constructor\", \"__proto__\", \"length\"], withMethods: [\"padEnd\", \"split\", \"charAt\", \"match\", \"lastIndexOf\", \"charCodeAt\", \"trim\", \"startsWith\", \"includes\", \"repeat\", \"search\", \"slice\", \"endsWith\", \"matchAll\", \"indexOf\", \"concat\", \"replace\", \"padStart\", \"substring\", \"codePointAt\"])\n const v48 = 13.37;\n // v48 = .float\n const v50 = [13.37,13.37];\n // v50 = .object(ofGroup: Array, withProperties: [\"length\", \"__proto__\", \"constructor\"], withMethods: [\"concat\", \"fill\", \"indexOf\", \"entries\", \"forEach\", \"find\", \"reverse\", \"slice\", \"flat\", \"reduce\", \"join\", \"findIndex\", \"reduceRight\", \"some\", \"copyWithin\", \"toString\", \"pop\", \"filter\", \"map\", \"splice\", \"keys\", \"unshift\", \"sort\", \"includes\", \"flatMap\", \"shift\", \"values\", \"every\", \"toLocaleString\", \"push\", \"lastIndexOf\"])\n const v51 = ~v50;\n // v51 = .boolean\n const v53 = [13.37];\n // v53 = .object(ofGroup: Array, withProperties: [\"length\", \"__proto__\", \"constructor\"], withMethods: [\"concat\", \"fill\", \"indexOf\", \"entries\", \"forEach\", \"find\", \"reverse\", \"slice\", \"flat\", \"reduce\", \"join\", \"findIndex\", \"reduceRight\", \"some\", \"copyWithin\", \"toString\", \"pop\", \"filter\", \"map\", \"splice\", \"keys\", \"unshift\", \"sort\", \"includes\", \"flatMap\", \"shift\", \"values\", \"every\", \"toLocaleString\", \"push\", \"lastIndexOf\"])\n let v54 = v53;\n const v55 = gc;\n // v55 = .function([] => .undefined)\n const v58 = [13.37,13.37,13.37,13.37];\n // v58 = .object(ofGroup: Array, withProperties: [\"length\", \"__proto__\", \"constructor\"], withMethods: [\"concat\", \"fill\", \"indexOf\", \"entries\", \"forEach\", \"find\", \"reverse\", \"slice\", \"flat\", \"reduce\", \"join\", \"findIndex\", \"reduceRight\", \"some\", \"copyWithin\", \"toString\", \"pop\", \"filter\", \"map\", \"splice\", \"keys\", \"unshift\", \"sort\", \"includes\", \"flatMap\", \"shift\", \"values\", \"every\", \"toLocaleString\", \"push\", \"lastIndexOf\"])\n const v60 = [1337,1337,1337,1337];\n // v60 = .object(ofGroup: Array, withProperties: [\"length\", \"__proto__\", \"constructor\"], withMethods: [\"concat\", \"fill\", \"indexOf\", \"entries\", \"forEach\", \"find\", \"reverse\", \"slice\", \"flat\", \"reduce\", \"join\", \"findIndex\", \"reduceRight\", \"some\", \"copyWithin\", \"toString\", \"pop\", \"filter\", \"map\", \"splice\", \"keys\", \"unshift\", \"sort\", \"includes\", \"flatMap\", \"shift\", \"values\", \"every\", \"toLocaleString\", \"push\", \"lastIndexOf\"])\n const v61 = [3697200800,v58,v60];\n // v61 = .object(ofGroup: Array, withProperties: [\"length\", \"__proto__\", \"constructor\"], withMethods: [\"concat\", \"fill\", \"indexOf\", \"entries\", \"forEach\", \"find\", \"reverse\", \"slice\", \"flat\", \"reduce\", \"join\", \"findIndex\", \"reduceRight\", \"some\", \"copyWithin\", \"toString\", \"pop\", \"filter\", \"map\", \"splice\", \"keys\", \"unshift\", \"sort\", \"includes\", \"flatMap\", \"shift\", \"values\", \"every\", \"toLocaleString\", \"push\", \"lastIndexOf\"])\n const v62 = {__proto__:3697200800,constructor:1337,e:3697200800,length:13.37,toString:3697200800,valueOf:v61};\n // v62 = .object(ofGroup: Object, withProperties: [\"e\", \"__proto__\", \"length\", \"constructor\", \"toString\", \"valueOf\"])\n const v65 = [13.37,13.37,13.37,13.37];\n // v65 = .object(ofGroup: Array, withProperties: [\"length\", \"__proto__\", \"constructor\"], withMethods: [\"concat\", \"fill\", \"indexOf\", \"entries\", \"forEach\", \"find\", \"reverse\", \"slice\", \"flat\", \"reduce\", \"join\", \"findIndex\", \"reduceRight\", \"some\", \"copyWithin\", \"toString\", \"pop\", \"filter\", \"map\", \"splice\", \"keys\", \"unshift\", \"sort\", \"includes\", \"flatMap\", \"shift\", \"values\", \"every\", \"toLocaleString\", \"push\", \"lastIndexOf\"])\n const v67 = [1337,1337,1337,1337];\n // v67 = .object(ofGroup: Array, withProperties: [\"length\", \"__proto__\", \"constructor\"], withMethods: [\"concat\", \"fill\", \"indexOf\", \"entries\", \"forEach\", \"find\", \"reverse\", \"slice\", \"flat\", \"reduce\", \"join\", \"findIndex\", \"reduceRight\", \"some\", \"copyWithin\", \"toString\", \"pop\", \"filter\", \"map\", \"splice\", \"keys\", \"unshift\", \"sort\", \"includes\", \"flatMap\", \"shift\", \"values\", \"every\", \"toLocaleString\", \"push\", \"lastIndexOf\"])\n const v68 = [3697200800,v65,v67];\n // v68 = .object(ofGroup: Array, withProperties: [\"length\", \"__proto__\", \"constructor\"], withMethods: [\"concat\", \"fill\", \"indexOf\", \"entries\", \"forEach\", \"find\", \"reverse\", \"slice\", \"flat\", \"reduce\", \"join\", \"findIndex\", \"reduceRight\", \"some\", \"copyWithin\", \"toString\", \"pop\", \"filter\", \"map\", \"splice\", \"keys\", \"unshift\", \"sort\", \"includes\", \"flatMap\", \"shift\", \"values\", \"every\", \"toLocaleString\", \"push\", \"lastIndexOf\"])\n const v69 = {__proto__:3697200800,constructor:1337,e:3697200800,length:13.37,toString:3697200800,valueOf:v68};\n // v69 = .object(ofGroup: Object, withProperties: [\"e\", \"constructor\", \"__proto__\", \"length\", \"toString\", \"valueOf\"])\n const v70 = Object;\n // v70 = .object(ofGroup: ObjectConstructor, withProperties: [\"prototype\"], withMethods: [\"setPrototypeOf\", \"assign\", \"fromEntries\", \"seal\", \"getOwnPropertyNames\", \"freeze\", \"defineProperty\", \"create\", \"getPrototypeOf\", \"getOwnPropertySymbols\", \"keys\", \"values\", \"isExtensible\", \"entries\", \"is\", \"getOwnPropertyDescriptor\", \"preventExtensions\", \"defineProperties\", \"getOwnPropertyDescriptors\", \"isSealed\", \"isFrozen\"]) + .function([.anything...] => .object()) + .constructor([.anything...] => .object())\n function v71(v72) {\n }\n const v74 = [13.37];\n // v74 = .object(ofGroup: Array, withProperties: [\"length\", \"__proto__\", \"constructor\"], withMethods: [\"concat\", \"fill\", \"indexOf\", \"entries\", \"forEach\", \"find\", \"reverse\", \"slice\", \"flat\", \"reduce\", \"join\", \"findIndex\", \"reduceRight\", \"some\", \"copyWithin\", \"toString\", \"pop\", \"filter\", \"map\", \"splice\", \"keys\", \"unshift\", \"sort\", \"includes\", \"flatMap\", \"shift\", \"values\", \"every\", \"toLocaleString\", \"push\", \"lastIndexOf\"])\n const v75 = 1337;\n // v75 = .integer\n const v76 = v44 ** 13.37;\n // v76 = .integer | .float | .bigint\n function v77(v78,v79,v80,v81,v82) {\n }\n let v83 = v74;\n const v84 = \"2\";\n // v84 = .string + .object(ofGroup: String, withProperties: [\"constructor\", \"__proto__\", \"length\"], withMethods: [\"padEnd\", \"split\", \"charAt\", \"match\", \"lastIndexOf\", \"charCodeAt\", \"trim\", \"startsWith\", \"includes\", \"repeat\", \"search\", \"slice\", \"endsWith\", \"matchAll\", \"indexOf\", \"concat\", \"replace\", \"padStart\", \"substring\", \"codePointAt\"])\n const v85 = \"2\";\n // v85 = .string + .object(ofGroup: String, withProperties: [\"constructor\", \"__proto__\", \"length\"], withMethods: [\"padEnd\", \"split\", \"charAt\", \"match\", \"lastIndexOf\", \"charCodeAt\", \"trim\", \"startsWith\", \"includes\", \"repeat\", \"search\", \"slice\", \"endsWith\", \"matchAll\", \"indexOf\", \"concat\", \"replace\", \"padStart\", \"substring\", \"codePointAt\"])\n const v88 = [13.37,13.37,1337,13.37];\n // v88 = .object(ofGroup: Array, withProperties: [\"length\", \"__proto__\", \"constructor\"], withMethods: [\"concat\", \"fill\", \"indexOf\", \"entries\", \"forEach\", \"find\", \"reverse\", \"slice\", \"flat\", \"reduce\", \"join\", \"findIndex\", \"reduceRight\", \"some\", \"copyWithin\", \"toString\", \"pop\", \"filter\", \"map\", \"splice\", \"keys\", \"unshift\", \"sort\", \"includes\", \"flatMap\", \"shift\", \"values\", \"every\", \"toLocaleString\", \"push\", \"lastIndexOf\"])\n function v89(v90,v91,v92) {\n }\n const v94 = [1337,1337,1337,1337];\n // v94 = .object(ofGroup: Array, withProperties: [\"length\", \"__proto__\", \"constructor\"], withMethods: [\"concat\", \"fill\", \"indexOf\", \"entries\", \"forEach\", \"find\", \"reverse\", \"slice\", \"flat\", \"reduce\", \"join\", \"findIndex\", \"reduceRight\", \"some\", \"copyWithin\", \"toString\", \"pop\", \"filter\", \"map\", \"splice\", \"keys\", \"unshift\", \"sort\", \"includes\", \"flatMap\", \"shift\", \"values\", \"every\", \"toLocaleString\", \"push\", \"lastIndexOf\"])\n const v95 = [3697200800,v88,v94];\n // v95 = .object(ofGroup: Array, withProperties: [\"length\", \"__proto__\", \"constructor\"], withMethods: [\"concat\", \"fill\", \"indexOf\", \"entries\", \"forEach\", \"find\", \"reverse\", \"slice\", \"flat\", \"reduce\", \"join\", \"findIndex\", \"reduceRight\", \"some\", \"copyWithin\", \"toString\", \"pop\", \"filter\", \"map\", \"splice\", \"keys\", \"unshift\", \"sort\", \"includes\", \"flatMap\", \"shift\", \"values\", \"every\", \"toLocaleString\", \"push\", \"lastIndexOf\"])\n function v96(v97,v98) {\n }\n const v99 = {__proto__:3697200800,constructor:1337,e:3697200800,length:13.37,toString:3697200800,d:v95};\n // v99 = .object(ofGroup: Object, withProperties: [\"toString\", \"length\", \"constructor\", \"__proto__\", \"e\", \"d\"])\n let v100 = 13.37;\n const v101 = typeof v74;\n // v101 = .string\n const v102 = \"symbol\";\n // v102 = .string + .object(ofGroup: String, withProperties: [\"constructor\", \"__proto__\", \"length\"], withMethods: [\"padEnd\", \"split\", \"charAt\", \"match\", \"lastIndexOf\", \"charCodeAt\", \"trim\", \"startsWith\", \"includes\", \"repeat\", \"search\", \"slice\", \"endsWith\", \"matchAll\", \"indexOf\", \"concat\", \"replace\", \"padStart\", \"substring\", \"codePointAt\"])\n const v103 = 3697200800;\n // v103 = .integer\n const v104 = \"2\";\n // v104 = .string + .object(ofGroup: String, withProperties: [\"constructor\", \"__proto__\", \"length\"], withMethods: [\"padEnd\", \"split\", \"charAt\", \"match\", \"lastIndexOf\", \"charCodeAt\", \"trim\", \"startsWith\", \"includes\", \"repeat\", \"search\", \"slice\", \"endsWith\", \"matchAll\", \"indexOf\", \"concat\", \"replace\", \"padStart\", \"substring\", \"codePointAt\"])\n const v105 = Boolean;\n // v105 = .object(ofGroup: BooleanConstructor, withProperties: [\"prototype\"]) + .function([.anything] => .boolean) + .constructor([.anything] => .boolean)\n const v106 = Function;\n // v106 = .constructor([.string] => .object(ofGroup: Function, withProperties: [\"constructor\", \"arguments\", \"__proto__\", \"name\", \"caller\", \"prototype\", \"length\"], withMethods: [\"call\", \"bind\", \"apply\"]) + .function([.anything...] => .unknown) + .constructor([.anything...] => .unknown))\n const v107 = 13.37;\n // v107 = .float\n const v108 = 1337;\n // v108 = .integer\n const v109 = \"2\";\n // v109 = .string + .object(ofGroup: String, withProperties: [\"constructor\", \"__proto__\", \"length\"], withMethods: [\"padEnd\", \"split\", \"charAt\", \"match\", \"lastIndexOf\", \"charCodeAt\", \"trim\", \"startsWith\", \"includes\", \"repeat\", \"search\", \"slice\", \"endsWith\", \"matchAll\", \"indexOf\", \"concat\", \"replace\", \"padStart\", \"substring\", \"codePointAt\"])\n const v110 = Function;\n // v110 = .constructor([.string] => .object(ofGroup: Function, withProperties: [\"constructor\", \"arguments\", \"__proto__\", \"name\", \"caller\", \"prototype\", \"length\"], withMethods: [\"call\", \"bind\", \"apply\"]) + .function([.anything...] => .unknown) + .constructor([.anything...] => .unknown))\n const v112 = [13.37,13.37,13.37,13.37];\n // v112 = .object(ofGroup: Array, withProperties: [\"length\", \"__proto__\", \"constructor\"], withMethods: [\"concat\", \"fill\", \"indexOf\", \"entries\", \"forEach\", \"find\", \"reverse\", \"slice\", \"flat\", \"reduce\", \"join\", \"findIndex\", \"reduceRight\", \"some\", \"copyWithin\", \"toString\", \"pop\", \"filter\", \"map\", \"splice\", \"keys\", \"unshift\", \"sort\", \"includes\", \"flatMap\", \"shift\", \"values\", \"every\", \"toLocaleString\", \"push\", \"lastIndexOf\"])\n const v113 = 1337;\n // v113 = .integer\n let v114 = 13.37;\n const v116 = {...3697200800,...3697200800};\n // v116 = .object(ofGroup: Object, withProperties: [\"__proto__\"])\n const v117 = Object;\n // v117 = .object(ofGroup: ObjectConstructor, withProperties: [\"prototype\"], withMethods: [\"setPrototypeOf\", \"assign\", \"fromEntries\", \"seal\", \"getOwnPropertyNames\", \"freeze\", \"defineProperty\", \"create\", \"getPrototypeOf\", \"getOwnPropertySymbols\", \"keys\", \"values\", \"isExtensible\", \"entries\", \"is\", \"getOwnPropertyDescriptor\", \"preventExtensions\", \"defineProperties\", \"getOwnPropertyDescriptors\", \"isSealed\", \"isFrozen\"]) + .function([.anything...] => .object()) + .constructor([.anything...] => .object())\n const v118 = Function;\n // v118 = .constructor([.string] => .object(ofGroup: Function, withProperties: [\"constructor\", \"arguments\", \"__proto__\", \"name\", \"caller\", \"prototype\", \"length\"], withMethods: [\"call\", \"bind\", \"apply\"]) + .function([.anything...] => .unknown) + .constructor([.anything...] => .unknown))\n const v119 = {};\n // v119 = .object(ofGroup: Object, withProperties: [\"__proto__\"])\n let v120 = v119;\n const v121 = (3697200800).constructor;\n // v121 = .unknown\n function v122(v123,v124) {\n }\n const v125 = Promise;\n // v125 = .object(ofGroup: PromiseConstructor, withProperties: [\"prototype\"], withMethods: [\"race\", \"allSettled\", \"reject\", \"all\", \"resolve\"]) + .constructor([.function()] => .object(ofGroup: Promise, withProperties: [\"__proto__\"], withMethods: [\"finally\", \"then\", \"catch\"]))\n const v128 = 4;\n // v128 = .integer\n let v129 = 0;\n const v131 = [13.37,13.37,13.37,13.37];\n // v131 = .object(ofGroup: Array, withProperties: [\"length\", \"__proto__\", \"constructor\"], withMethods: [\"concat\", \"fill\", \"indexOf\", \"entries\", \"forEach\", \"find\", \"reverse\", \"slice\", \"flat\", \"reduce\", \"join\", \"findIndex\", \"reduceRight\", \"some\", \"copyWithin\", \"toString\", \"pop\", \"filter\", \"map\", \"splice\", \"keys\", \"unshift\", \"sort\", \"includes\", \"flatMap\", \"shift\", \"values\", \"every\", \"toLocaleString\", \"push\", \"lastIndexOf\"])\n const v133 = [1337,1337,1337,1337];\n // v133 = .object(ofGroup: Array, withProperties: [\"length\", \"__proto__\", \"constructor\"], withMethods: [\"concat\", \"fill\", \"indexOf\", \"entries\", \"forEach\", \"find\", \"reverse\", \"slice\", \"flat\", \"reduce\", \"join\", \"findIndex\", \"reduceRight\", \"some\", \"copyWithin\", \"toString\", \"pop\", \"filter\", \"map\", \"splice\", \"keys\", \"unshift\", \"sort\", \"includes\", \"flatMap\", \"shift\", \"values\", \"every\", \"toLocaleString\", \"push\", \"lastIndexOf\"])\n const v134 = [3697200800,v131,v133];\n // v134 = .object(ofGroup: Array, withProperties: [\"length\", \"__proto__\", \"constructor\"], withMethods: [\"concat\", \"fill\", \"indexOf\", \"entries\", \"forEach\", \"find\", \"reverse\", \"slice\", \"flat\", \"reduce\", \"join\", \"findIndex\", \"reduceRight\", \"some\", \"copyWithin\", \"toString\", \"pop\", \"filter\", \"map\", \"splice\", \"keys\", \"unshift\", \"sort\", \"includes\", \"flatMap\", \"shift\", \"values\", \"every\", \"toLocaleString\", \"push\", \"lastIndexOf\"])\n const v135 = Object;\n // v135 = .object(ofGroup: ObjectConstructor, withProperties: [\"prototype\"], withMethods: [\"setPrototypeOf\", \"assign\", \"fromEntries\", \"seal\", \"getOwnPropertyNames\", \"freeze\", \"defineProperty\", \"create\", \"getPrototypeOf\", \"getOwnPropertySymbols\", \"keys\", \"values\", \"isExtensible\", \"entries\", \"is\", \"getOwnPropertyDescriptor\", \"preventExtensions\", \"defineProperties\", \"getOwnPropertyDescriptors\", \"isSealed\", \"isFrozen\"]) + .function([.anything...] => .object()) + .constructor([.anything...] => .object())\n const v136 = -944747134;\n // v136 = .integer\n const v139 = [13.37,13.37,13.37,13.37];\n // v139 = .object(ofGroup: Array, withProperties: [\"length\", \"__proto__\", \"constructor\"], withMethods: [\"concat\", \"fill\", \"indexOf\", \"entries\", \"forEach\", \"find\", \"reverse\", \"slice\", \"flat\", \"reduce\", \"join\", \"findIndex\", \"reduceRight\", \"some\", \"copyWithin\", \"toString\", \"pop\", \"filter\", \"map\", \"splice\", \"keys\", \"unshift\", \"sort\", \"includes\", \"flatMap\", \"shift\", \"values\", \"every\", \"toLocaleString\", \"push\", \"lastIndexOf\"])\n const v141 = [1337,1337,1337,1337];\n // v141 = .object(ofGroup: Array, withProperties: [\"length\", \"__proto__\", \"constructor\"], withMethods: [\"concat\", \"fill\", \"indexOf\", \"entries\", \"forEach\", \"find\", \"reverse\", \"slice\", \"flat\", \"reduce\", \"join\", \"findIndex\", \"reduceRight\", \"some\", \"copyWithin\", \"toString\", \"pop\", \"filter\", \"map\", \"splice\", \"keys\", \"unshift\", \"sort\", \"includes\", \"flatMap\", \"shift\", \"values\", \"every\", \"toLocaleString\", \"push\", \"lastIndexOf\"])\n const v142 = [3697200800,v139,v141];\n // v142 = .object(ofGroup: Array, withProperties: [\"length\", \"__proto__\", \"constructor\"], withMethods: [\"concat\", \"fill\", \"indexOf\", \"entries\", \"forEach\", \"find\", \"reverse\", \"slice\", \"flat\", \"reduce\", \"join\", \"findIndex\", \"reduceRight\", \"some\", \"copyWithin\", \"toString\", \"pop\", \"filter\", \"map\", \"splice\", \"keys\", \"unshift\", \"sort\", \"includes\", \"flatMap\", \"shift\", \"values\", \"every\", \"toLocaleString\", \"push\", \"lastIndexOf\"])\n const v143 = {__proto__:3697200800,constructor:1337,e:3697200800,length:13.37,toString:3697200800,valueOf:v142};\n // v143 = .object(ofGroup: Object, withProperties: [\"toString\", \"constructor\", \"e\", \"__proto__\", \"valueOf\", \"length\"])\n let v144 = v143;\n const v145 = gc;\n // v145 = .function([] => .undefined)\n let v146 = 13.37;\n const v150 = [13.37,13.37,13.37,Function];\n // v150 = .object(ofGroup: Array, withProperties: [\"length\", \"__proto__\", \"constructor\"], withMethods: [\"concat\", \"fill\", \"indexOf\", \"entries\", \"forEach\", \"find\", \"reverse\", \"slice\", \"flat\", \"reduce\", \"join\", \"findIndex\", \"reduceRight\", \"some\", \"copyWithin\", \"toString\", \"pop\", \"filter\", \"map\", \"splice\", \"keys\", \"unshift\", \"sort\", \"includes\", \"flatMap\", \"shift\", \"values\", \"every\", \"toLocaleString\", \"push\", \"lastIndexOf\"])\n const v152 = [1337,1337,1337,1337];\n // v152 = .object(ofGroup: Array, withProperties: [\"length\", \"__proto__\", \"constructor\"], withMethods: [\"concat\", \"fill\", \"indexOf\", \"entries\", \"forEach\", \"find\", \"reverse\", \"slice\", \"flat\", \"reduce\", \"join\", \"findIndex\", \"reduceRight\", \"some\", \"copyWithin\", \"toString\", \"pop\", \"filter\", \"map\", \"splice\", \"keys\", \"unshift\", \"sort\", \"includes\", \"flatMap\", \"shift\", \"values\", \"every\", \"toLocaleString\", \"push\", \"lastIndexOf\"])\n const v153 = [3697200800,v150,v152];\n // v153 = .object(ofGroup: Array, withProperties: [\"length\", \"__proto__\", \"constructor\"], withMethods: [\"concat\", \"fill\", \"indexOf\", \"entries\", \"forEach\", \"find\", \"reverse\", \"slice\", \"flat\", \"reduce\", \"join\", \"findIndex\", \"reduceRight\", \"some\", \"copyWithin\", \"toString\", \"pop\", \"filter\", \"map\", \"splice\", \"keys\", \"unshift\", \"sort\", \"includes\", \"flatMap\", \"shift\", \"values\", \"every\", \"toLocaleString\", \"push\", \"lastIndexOf\"])\n const v154 = v153 + 1;\n // v154 = .primitive\n let v155 = 0;\n const v156 = v155 + 1;\n // v156 = .primitive\n const v158 = \"2\";\n // v158 = .string + .object(ofGroup: String, withProperties: [\"constructor\", \"__proto__\", \"length\"], withMethods: [\"padEnd\", \"split\", \"charAt\", \"match\", \"lastIndexOf\", \"charCodeAt\", \"trim\", \"startsWith\", \"includes\", \"repeat\", \"search\", \"slice\", \"endsWith\", \"matchAll\", \"indexOf\", \"concat\", \"replace\", \"padStart\", \"substring\", \"codePointAt\"])\n const v160 = [13.37,13.37,13.37,13.37];\n // v160 = .object(ofGroup: Array, withProperties: [\"length\", \"__proto__\", \"constructor\"], withMethods: [\"concat\", \"fill\", \"indexOf\", \"entries\", \"forEach\", \"find\", \"reverse\", \"slice\", \"flat\", \"reduce\", \"join\", \"findIndex\", \"reduceRight\", \"some\", \"copyWithin\", \"toString\", \"pop\", \"filter\", \"map\", \"splice\", \"keys\", \"unshift\", \"sort\", \"includes\", \"flatMap\", \"shift\", \"values\", \"every\", \"toLocaleString\", \"push\", \"lastIndexOf\"])\n const v162 = 0;\n // v162 = .integer\n const v163 = [1337,1337,1337,1337];\n // v163 = .object(ofGroup: Array, withProperties: [\"length\", \"__proto__\", \"constructor\"], withMethods: [\"concat\", \"fill\", \"indexOf\", \"entries\", \"forEach\", \"find\", \"reverse\", \"slice\", \"flat\", \"reduce\", \"join\", \"findIndex\", \"reduceRight\", \"some\", \"copyWithin\", \"toString\", \"pop\", \"filter\", \"map\", \"splice\", \"keys\", \"unshift\", \"sort\", \"includes\", \"flatMap\", \"shift\", \"values\", \"every\", \"toLocaleString\", \"push\", \"lastIndexOf\"])\n const v164 = [3697200800,1337,v163];\n // v164 = .object(ofGroup: Array, withProperties: [\"length\", \"__proto__\", \"constructor\"], withMethods: [\"concat\", \"fill\", \"indexOf\", \"entries\", \"forEach\", \"find\", \"reverse\", \"slice\", \"flat\", \"reduce\", \"join\", \"findIndex\", \"reduceRight\", \"some\", \"copyWithin\", \"toString\", \"pop\", \"filter\", \"map\", \"splice\", \"keys\", \"unshift\", \"sort\", \"includes\", \"flatMap\", \"shift\", \"values\", \"every\", \"toLocaleString\", \"push\", \"lastIndexOf\"])\n const v166 = 1337;\n // v166 = .integer\n let v167 = 2594067260;\n const v169 = 4;\n // v169 = .integer\n let v170 = 0;\n const v171 = v167 + 1;\n // v171 = .primitive\n const v172 = {__proto__:3697200800,constructor:v163,e:3697200800,length:13.37,toString:3697200800,valueOf:v164};\n // v172 = .object(ofGroup: Object, withProperties: [\"e\", \"__proto__\", \"constructor\", \"valueOf\", \"length\", \"toString\"])\n const v173 = 0;\n // v173 = .integer\n const v174 = 5;\n // v174 = .integer\n const v175 = 2937513072;\n // v175 = .integer\n const v176 = Object;\n // v176 = .object(ofGroup: ObjectConstructor, withProperties: [\"prototype\"], withMethods: [\"setPrototypeOf\", \"assign\", \"fromEntries\", \"seal\", \"getOwnPropertyNames\", \"freeze\", \"defineProperty\", \"create\", \"getPrototypeOf\", \"getOwnPropertySymbols\", \"keys\", \"values\", \"isExtensible\", \"entries\", \"is\", \"getOwnPropertyDescriptor\", \"preventExtensions\", \"defineProperties\", \"getOwnPropertyDescriptors\", \"isSealed\", \"isFrozen\"]) + .function([.anything...] => .object()) + .constructor([.anything...] => .object())\n const v177 = v172.constructor;\n // v177 = .unknown\n const v178 = 0;\n // v178 = .integer\n const v179 = 1;\n // v179 = .integer\n try {\n } catch(v180) {\n const v182 = [13.37,13.37,13.37,13.37];\n // v182 = .object(ofGroup: Array, withProperties: [\"length\", \"__proto__\", \"constructor\"], withMethods: [\"concat\", \"fill\", \"indexOf\", \"entries\", \"forEach\", \"find\", \"reverse\", \"slice\", \"flat\", \"reduce\", \"join\", \"findIndex\", \"reduceRight\", \"some\", \"copyWithin\", \"toString\", \"pop\", \"filter\", \"map\", \"splice\", \"keys\", \"unshift\", \"sort\", \"includes\", \"flatMap\", \"shift\", \"values\", \"every\", \"toLocaleString\", \"push\", \"lastIndexOf\"])\n const v183 = v182.__proto__;\n // v183 = .object()\n function v185(v186) {\n }\n const v187 = Object >>> v183;\n // v187 = .integer | .bigint\n }\n function v188(v189,v190,v191,v192,...v193) {\n }\n}", "function c(t){return!0===s(t)&&\"[object Object]\"===Object.prototype.toString.call(t)}", "function detecteInstanceOf (obj, origin) {\n return obj instanceof origin\n // return Object.getPrototypeOf(obj) === origin.prototype\n // return obj.__proto__ === origin.prototype\n}", "function V(e){if(null===e||\"[object Object]\"!==function(e){return Object.prototype.toString.call(e)}(e))return!1;var t=Object.getPrototypeOf(e);return null===t||t===Object.prototype}", "function isObj$1(something) {\n return typeDetect(something) === 'Object';\n}", "testObjectAssertions() {\n var objConstructor = {}.constructor;\n\n this.assertIdentical({ a: 12 }.constructor, objConstructor);\n /* eslint-disable-next-line no-new-object */\n this.assertIdentical(new Object().constructor, objConstructor);\n\n var qxObj = new qx.core.Object();\n this.assertNotIdentical(qxObj.constructor, objConstructor);\n this.assertNotIdentical((1).constructor, objConstructor);\n this.assertNotIdentical(\"Juhu\".constructor, objConstructor);\n this.assertNotIdentical(/abc/.constructor, objConstructor);\n qxObj.dispose();\n }", "function U(e){return!0==(null!=(r=e)&&\"object\"==typeof r&&!1===Array.isArray(r))&&\"[object Object]\"===Object.prototype.toString.call(e);\n/*!\n * isobject <https://github.com/jonschlinkert/isobject>\n *\n * Copyright (c) 2014-2017, Jon Schlinkert.\n * Released under the MIT License.\n */\nvar r}", "function Is(){return Is=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},Is.apply(this,arguments)}", "function r(t){return\"[object Object]\"==={}.toString.call(t)}", "function r(t){return\"[object Object]\"==={}.toString.call(t)}", "function isInstanceOf(victim, constructor) {\n return victim instanceof constructor;\n}", "function isObject(input) {\n return typeof input === 'object';\n}", "function assert_event_type (obj, type, inheritsp) {\n if (typeof obj === 'object') {\n var type_str = \"[object \" + type + \"]\";\n inheritsp = (typeof inheritsp === 'boolean') ? inheritsp : false;\n while (obj) {\n if (obj.toString() === type_str || (obj.constructor && obj.constructor.name === type)) {\n return true;\n } else {\n obj = inheritsp ? Object.getPrototypeOf(obj) : null;\n }\n }\n }\n throw new TypeError();\n }", "function testcase() {\n function base() {}\n var b = new base();\n var prop = new Object();\n var d = Object.create(b);\n\n if (typeof d === 'object') {\n return true;\n }\n }", "function isInstanceOf(mixed, ctor) {\n return ((mixed instanceof ctor) &&\n (try_get_bigint_factory_function_1.isBigIntNativelySupported() ||\n !is_bigint_1.isBigInt(mixed)));\n}", "function b(e){return!0==(null!=(t=e)&&\"object\"==typeof t&&!1===Array.isArray(t))&&\"[object Object]\"===Object.prototype.toString.call(e);\n/*!\n * isobject <https://github.com/jonschlinkert/isobject>\n *\n * Copyright (c) 2014-2017, Jon Schlinkert.\n * Released under the MIT License.\n */\nvar t}", "#isPrimitive(value) {\n return value !== Object(value); \n }", "function is(obj) {\n return obj instanceof __WEBPACK_IMPORTED_MODULE_3__Range__[\"c\" /* default */];\n}", "function Ut(e){return!0==(null!=(t=e)&&\"object\"==typeof t&&!1===Array.isArray(t))&&\"[object Object]\"===Object.prototype.toString.call(e);\n/*!\n * isobject <https://github.com/jonschlinkert/isobject>\n *\n * Copyright (c) 2014-2017, Jon Schlinkert.\n * Released under the MIT License.\n */\nvar t}", "function i(t){return null!==t&&\"object\"==typeof t}", "function is(v, t) { return typeof v === t; }", "function b(e) {\n return (\n !0 ==\n (null != (t = e) &&\n \"object\" == typeof t &&\n !1 === Array.isArray(t)) &&\n \"[object Object]\" === Object.prototype.toString.call(e)\n );\n /*!\n * isobject <https://github.com/jonschlinkert/isobject>\n *\n * Copyright (c) 2014-2017, Jon Schlinkert.\n * Released under the MIT License.\n */\n var t;\n }", "function u(e){return!0==(null!=(t=e)&&\"object\"==typeof t&&!1===Array.isArray(t))&&\"[object Object]\"===Object.prototype.toString.call(e);\n/*!\n * isobject <https://github.com/jonschlinkert/isobject>\n *\n * Copyright (c) 2014-2017, Jon Schlinkert.\n * Released under the MIT License.\n */\nvar t}", "function u(e){return!0==(null!=(t=e)&&\"object\"==typeof t&&!1===Array.isArray(t))&&\"[object Object]\"===Object.prototype.toString.call(e);\n/*!\n * isobject <https://github.com/jonschlinkert/isobject>\n *\n * Copyright (c) 2014-2017, Jon Schlinkert.\n * Released under the MIT License.\n */\nvar t}", "function u(e){return!0==(null!=(t=e)&&\"object\"==typeof t&&!1===Array.isArray(t))&&\"[object Object]\"===Object.prototype.toString.call(e);\n/*!\n * isobject <https://github.com/jonschlinkert/isobject>\n *\n * Copyright (c) 2014-2017, Jon Schlinkert.\n * Released under the MIT License.\n */\nvar t}", "function u(e){return!0==(null!=(t=e)&&\"object\"==typeof t&&!1===Array.isArray(t))&&\"[object Object]\"===Object.prototype.toString.call(e);\n/*!\n * isobject <https://github.com/jonschlinkert/isobject>\n *\n * Copyright (c) 2014-2017, Jon Schlinkert.\n * Released under the MIT License.\n */\nvar t}", "function u(e){return!0==(null!=(t=e)&&\"object\"==typeof t&&!1===Array.isArray(t))&&\"[object Object]\"===Object.prototype.toString.call(e);\n/*!\n * isobject <https://github.com/jonschlinkert/isobject>\n *\n * Copyright (c) 2014-2017, Jon Schlinkert.\n * Released under the MIT License.\n */\nvar t}", "function u(e){return!0==(null!=(t=e)&&\"object\"==typeof t&&!1===Array.isArray(t))&&\"[object Object]\"===Object.prototype.toString.call(e);\n/*!\n * isobject <https://github.com/jonschlinkert/isobject>\n *\n * Copyright (c) 2014-2017, Jon Schlinkert.\n * Released under the MIT License.\n */\nvar t}", "function o(e){return 1==(null!=(t=e)&&\"object\"==typeof t&&!1===Array.isArray(t))&&\"[object Object]\"===Object.prototype.toString.call(e);\n/*!\n * isobject <https://github.com/jonschlinkert/isobject>\n *\n * Copyright (c) 2014-2017, Jon Schlinkert.\n * Released under the MIT License.\n */var t}", "function mn(e){return!0==(null!=(t=e)&&\"object\"==typeof t&&!1===Array.isArray(t))&&\"[object Object]\"===Object.prototype.toString.call(e);\n/*!\n * isobject <https://github.com/jonschlinkert/isobject>\n *\n * Copyright (c) 2014-2017, Jon Schlinkert.\n * Released under the MIT License.\n */\nvar t}", "function N(e){return!0==(null!=(t=e)&&\"object\"==typeof t&&!1===Array.isArray(t))&&\"[object Object]\"===Object.prototype.toString.call(e);\n/*!\n * isobject <https://github.com/jonschlinkert/isobject>\n *\n * Copyright (c) 2014-2017, Jon Schlinkert.\n * Released under the MIT License.\n */\nvar t}", "function vo(t){return!0==(null!=(e=t)&&\"object\"==typeof e&&!1===Array.isArray(e))&&\"[object Object]\"===Object.prototype.toString.call(t);\n/*!\n * isobject <https://github.com/jonschlinkert/isobject>\n *\n * Copyright (c) 2014-2017, Jon Schlinkert.\n * Released under the MIT License.\n */\nvar e}", "function _instanceof(left, right) { if (right != null && typeof Symbol !== \"undefined\" && right[Symbol.hasInstance]) { return right[Symbol.hasInstance](left); } else { return left instanceof right; } }", "function r(e){return!0==(null!=(t=e)&&\"object\"==typeof t&&!1===Array.isArray(t))&&\"[object Object]\"===Object.prototype.toString.call(e);\n/*!\n * isobject <https://github.com/jonschlinkert/isobject>\n *\n * Copyright (c) 2014-2017, Jon Schlinkert.\n * Released under the MIT License.\n */\nvar t}", "function r(e){return!0==(null!=(t=e)&&\"object\"==typeof t&&!1===Array.isArray(t))&&\"[object Object]\"===Object.prototype.toString.call(e);\n/*!\n * isobject <https://github.com/jonschlinkert/isobject>\n *\n * Copyright (c) 2014-2017, Jon Schlinkert.\n * Released under the MIT License.\n */\nvar t}", "function of(value) {\n switch (typeof value) {\n case 'object':\n if (value === null) {\n return NULL;\n } else if (Array.isArray(value)) {\n return ARRAY;\n }\n return OBJECT;\n case 'string':\n return STRING;\n case 'boolean':\n return BOOLEAN;\n case 'number':\n return isFinite(value) ? NUMBER : MISSING;\n }\n // Covers undefined, function, etc\n return MISSING;\n}", "function n(t){return\"[object Object]\"==={}.toString.call(t)}", "function n(t){return\"[object Object]\"===Object.prototype.toString.call(t)}", "function n(t){return\"[object Object]\"===Object.prototype.toString.call(t)}", "isPlainObject(obj) {\n return _toString.call(obj) === '[object Object]'\n }", "function d(e){return!0==(null!=(t=e)&&\"object\"==typeof t&&!1===Array.isArray(t))&&\"[object Object]\"===Object.prototype.toString.call(e);\n/*!\n * isobject <https://github.com/jonschlinkert/isobject>\n *\n * Copyright (c) 2014-2017, Jon Schlinkert.\n * Released under the MIT License.\n */\nvar t}", "function d(e){return!0==(null!=(t=e)&&\"object\"==typeof t&&!1===Array.isArray(t))&&\"[object Object]\"===Object.prototype.toString.call(e);\n/*!\n * isobject <https://github.com/jonschlinkert/isobject>\n *\n * Copyright (c) 2014-2017, Jon Schlinkert.\n * Released under the MIT License.\n */\nvar t}", "function isObject_(test) {\r\n return Object.prototype.toString.call(test) === '[object Object]';\r\n}", "function ro(t){return Object.prototype.toString.call(t)===\"[object Object]\"}", "function nt(e){return!0==(null!=(t=e)&&\"object\"==typeof t&&!1===Array.isArray(t))&&\"[object Object]\"===Object.prototype.toString.call(e);\n/*!\n * isobject <https://github.com/jonschlinkert/isobject>\n *\n * Copyright (c) 2014-2017, Jon Schlinkert.\n * Released under the MIT License.\n */\nvar t}", "function c(e){return null!==e&&\"object\"==typeof e}", "function n(e){return!0==(null!=(t=e)&&\"object\"==typeof t&&!1===Array.isArray(t))&&\"[object Object]\"===Object.prototype.toString.call(e);\n/*!\n * isobject <https://github.com/jonschlinkert/isobject>\n *\n * Copyright (c) 2014-2017, Jon Schlinkert.\n * Released under the MIT License.\n */\nvar t}", "function n(e){return!0==(null!=(t=e)&&\"object\"==typeof t&&!1===Array.isArray(t))&&\"[object Object]\"===Object.prototype.toString.call(e);\n/*!\n * isobject <https://github.com/jonschlinkert/isobject>\n *\n * Copyright (c) 2014-2017, Jon Schlinkert.\n * Released under the MIT License.\n */\nvar t}", "function n(e){return!0==(null!=(t=e)&&\"object\"==typeof t&&!1===Array.isArray(t))&&\"[object Object]\"===Object.prototype.toString.call(e);\n/*!\n * isobject <https://github.com/jonschlinkert/isobject>\n *\n * Copyright (c) 2014-2017, Jon Schlinkert.\n * Released under the MIT License.\n */\nvar t}", "function qe(t) {\n return !(\"object\" != typeof t || null === t || t instanceof Array || t instanceof Date || t instanceof V || t instanceof Ne || t instanceof Ie || t instanceof Le || t instanceof Re);\n}", "static is()\n {\n var arg0 = arguments[0]\n var type = Tester.type(arg0)\n for (let i = 1, len = arguments.length; i < len; i++) {\n let argN = arguments[i]\n if (\n type === argN ||\n argN === 'mixed' ||\n argN === '*' ||\n Tester.type(argN) === 'function' && (\n arg0 instanceof argN ||\n // Why? Probably if the class does not have a constructor for \"this\".\n // @see @cyrhla/core/Controller/SetController\n Tester.type(arg0) === 'object' && arg0.constructor.name === argN.name\n )\n ) {\n return true\n }\n }\n\n return false\n }", "function ra(t){return Object.prototype.toString.call(t)===\"[object Object]\"}", "function f(i) {\n var x = new Number(i);\n return x;\n} // Assert that a unique object really was created.", "function Ft(e){return!0==(null!=(t=e)&&\"object\"==typeof t&&!1===Array.isArray(t))&&\"[object Object]\"===Object.prototype.toString.call(e);\n/*!\n * isobject <https://github.com/jonschlinkert/isobject>\n *\n * Copyright (c) 2014-2017, Jon Schlinkert.\n * Released under the MIT License.\n */\nvar t}", "function isObject_(test) {\r\n return Object.prototype.toString.call(test) === '[object Object]';\r\n}", "function assertInstance(o, f) {\n assertSame(o.constructor, f);\n assertInstanceof(o, f);\n}", "function test_fail_hole_prototype() {\n var obj = Object.create({ stuff: \"in prototype\" });\n obj.foo = \"bar\";\n\n function f1() {\n bidar.serialize(obj);\n }\n assert.throws(f1, /Hole-ful graph, but no hole filter/);\n}", "function i(t){var e=typeof t;return null==t||\"object\"!=e&&\"function\"!=e}", "function isObject$1(obj){\nreturn kindOf(obj)==='object'||kindOf(obj)==='function';\n}", "function s(e){return!0==(null!=(t=e)&&\"object\"==typeof t&&!1===Array.isArray(t))&&\"[object Object]\"===Object.prototype.toString.call(e);\n/*!\n * isobject <https://github.com/jonschlinkert/isobject>\n *\n * Copyright (c) 2014-2017, Jon Schlinkert.\n * Released under the MIT License.\n */\nvar t}", "function Object() {}", "function Object() {}", "function r(t){return t&&\"object\"===typeof t&&!Array.isArray(t)}", "function proxyInstanceof(args) {\n var obj = deserialize(args[0]);\n var type = deserialize(args[1]);\n return obj instanceof type;\n }", "function isObject$1(e){return\"[object Object]\"===Object.prototype.toString.call(e)}", "function r(e){return e&&\"object\"==typeof e&&!Array.isArray(e)}", "function r(e){return e&&\"object\"==typeof e&&!Array.isArray(e)}", "function r(e){return e&&\"object\"==typeof e&&!Array.isArray(e)}" ]
[ "0.63094425", "0.62230873", "0.6219001", "0.6219001", "0.6219001", "0.6152917", "0.6147534", "0.6083092", "0.6083092", "0.6083092", "0.6083092", "0.6083092", "0.6083092", "0.6083092", "0.6083092", "0.6083092", "0.6047344", "0.60186744", "0.5979627", "0.5979627", "0.59516007", "0.59323066", "0.59068817", "0.5892869", "0.5860247", "0.58537513", "0.58537513", "0.58537513", "0.5848118", "0.5838548", "0.5794538", "0.5789509", "0.5769886", "0.57691514", "0.5750563", "0.57338524", "0.5695877", "0.5674302", "0.5634917", "0.56117594", "0.55867857", "0.5583702", "0.5583702", "0.5582671", "0.55776954", "0.5572054", "0.5559757", "0.5556944", "0.555082", "0.55487216", "0.55400574", "0.5537763", "0.5531681", "0.55177563", "0.55133784", "0.5507404", "0.5507404", "0.5507404", "0.5507404", "0.5507404", "0.5507404", "0.55051166", "0.5500499", "0.5499555", "0.5497799", "0.5493758", "0.54839796", "0.54839796", "0.5472502", "0.5472056", "0.5457517", "0.5457517", "0.5456854", "0.54525876", "0.54525876", "0.54442066", "0.54403675", "0.5436281", "0.5423077", "0.54168963", "0.54168963", "0.54168963", "0.54162174", "0.5415358", "0.54063183", "0.5400964", "0.53911203", "0.53850085", "0.53848433", "0.5382316", "0.5368927", "0.53642964", "0.5361831", "0.5361636", "0.5361636", "0.5356696", "0.5338498", "0.53364205", "0.53338355", "0.53338355", "0.53338355" ]
0.0
-1
If we get something that is not a buffer, string, null, or undefined, and we're not in objectMode, then that's an error. Otherwise stream chunks are all considered to be of length=1, and the watermarks determine how many objects to keep in the buffer, rather than how many bytes or characters.
function validChunk(stream, state, chunk, cb) { var valid = true; if (!util.isBuffer(chunk) && !util.isString(chunk) && !util.isNullOrUndefined(chunk) && !state.objectMode) { var er = new TypeError('Invalid non-string/buffer chunk'); stream.emit('error', er); process.nextTick(function() { cb(er); }); valid = false; } return valid; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function validChunk(stream,state,chunk,cb){var valid=true;var er=false;if(chunk===null){er=new TypeError(\"May not write null values to stream\")}else if(typeof chunk!==\"string\"&&chunk!==undefined&&!state.objectMode){er=new TypeError(\"Invalid non-string/buffer chunk\")}if(er){stream.emit(\"error\",er);processNextTick(cb,er);valid=false}return valid}", "function validChunk(stream,state,chunk,cb){var valid=true;var er=false;if(chunk===null){er=new TypeError('May not write null values to stream');}else if(typeof chunk!=='string'&&chunk!==undefined&&!state.objectMode){er=new TypeError('Invalid non-string/buffer chunk');}if(er){stream.emit('error',er);processNextTick(cb,er);valid=false;}return valid;}", "function validChunk(stream,state,chunk,cb){var valid=true;var er=false;// Always throw error if a null is written\n\t// if we are not in object mode then throw\n\t// if it is not a buffer, string, or undefined.\n\tif(chunk===null){er=new TypeError('May not write null values to stream');}else if(!Buffer.isBuffer(chunk)&&typeof chunk!=='string'&&chunk!==undefined&&!state.objectMode){er=new TypeError('Invalid non-string/buffer chunk');}if(er){stream.emit('error',er);processNextTick(cb,er);valid=false;}return valid;}", "function validChunk(stream,state,chunk,cb){var valid=true;var er=false;if(chunk===null){er=new TypeError('May not write null values to stream');}else if(typeof chunk!=='string'&&chunk!==undefined&&!state.objectMode){er=new TypeError('Invalid non-string/buffer chunk');}if(er){stream.emit('error',er);pna.nextTick(cb,er);valid=false;}return valid;}", "function validChunk(stream,state,chunk,cb){var er;if(chunk===null){er=new ERR_STREAM_NULL_VALUES();}else if(typeof chunk!=='string'&&!state.objectMode){er=new ERR_INVALID_ARG_TYPE('chunk',['string','Buffer'],chunk);}if(er){errorOrDestroy(stream,er);process.nextTick(cb,er);return false;}return true;}", "function isBuffer(_chunk, encoding) {\n return encoding === \"buffer\";\n }", "function validChunk(stream, state, chunk, cb) {\n var valid = true;\n var er = false;\n\n if (chunk === null) {\n er = new TypeError('May not write null values to stream');\n } else if (\n typeof chunk !== 'string' &&\n chunk !== undefined &&\n !state.objectMode\n ) {\n er = new TypeError('Invalid non-string/buffer chunk');\n }\n if (er) {\n stream.emit('error', er);\n processNextTick(cb, er);\n valid = false;\n }\n return valid;\n }", "function $rtWY$var$validChunk(stream, state, chunk, cb) {\n var valid = true;\n var er = false;\n\n if (chunk === null) {\n er = new TypeError('May not write null values to stream');\n } else if (typeof chunk !== 'string' && chunk !== undefined && !state.objectMode) {\n er = new TypeError('Invalid non-string/buffer chunk');\n }\n\n if (er) {\n stream.emit('error', er);\n $rtWY$var$pna.nextTick(cb, er);\n valid = false;\n }\n\n return valid;\n}", "function validChunk(stream, state, chunk, cb) {\n\t var valid = true;\n\t\n\t if (!Buffer.isBuffer(chunk) && typeof chunk !== 'string' && chunk !== null && chunk !== undefined && !state.objectMode) {\n\t var er = new TypeError('Invalid non-string/buffer chunk');\n\t stream.emit('error', er);\n\t processNextTick(cb, er);\n\t valid = false;\n\t }\n\t return valid;\n\t}", "function validChunk(stream, state, chunk, cb) {\n\t var valid = true;\n\t\n\t if (!Buffer.isBuffer(chunk) && typeof chunk !== 'string' && chunk !== null && chunk !== undefined && !state.objectMode) {\n\t var er = new TypeError('Invalid non-string/buffer chunk');\n\t stream.emit('error', er);\n\t processNextTick(cb, er);\n\t valid = false;\n\t }\n\t return valid;\n\t}", "function validChunk$2(stream, state, chunk, cb) {\n\t var valid = true;\n\t var er = false;\n\n\t if (chunk === null) {\n\t er = new TypeError('May not write null values to stream');\n\t } else if (typeof chunk !== 'string' && chunk !== undefined && !state.objectMode) {\n\t er = new TypeError('Invalid non-string/buffer chunk');\n\t }\n\t if (er) {\n\t stream.emit('error', er);\n\t processNextickArgs.nextTick(cb, er);\n\t valid = false;\n\t }\n\t return valid;\n\t}", "function validChunk(stream, state, chunk, cb) {\n\t var valid = true;\n\t var er = false;\n\t\n\t if (chunk === null) {\n\t er = new TypeError('May not write null values to stream');\n\t } else if (typeof chunk !== 'string' && chunk !== undefined && !state.objectMode) {\n\t er = new TypeError('Invalid non-string/buffer chunk');\n\t }\n\t if (er) {\n\t stream.emit('error', er);\n\t processNextTick(cb, er);\n\t valid = false;\n\t }\n\t return valid;\n\t}", "function validChunk(stream, state, chunk, cb) {\n\t var valid = true;\n\t var er = false;\n\t\n\t if (chunk === null) {\n\t er = new TypeError('May not write null values to stream');\n\t } else if (typeof chunk !== 'string' && chunk !== undefined && !state.objectMode) {\n\t er = new TypeError('Invalid non-string/buffer chunk');\n\t }\n\t if (er) {\n\t stream.emit('error', er);\n\t processNextTick(cb, er);\n\t valid = false;\n\t }\n\t return valid;\n\t}", "function validChunk(stream, state, chunk, cb) {\n\t var valid = true;\n\t var er = false;\n\n\t if (chunk === null) {\n\t er = new TypeError('May not write null values to stream');\n\t } else if (typeof chunk !== 'string' && chunk !== undefined && !state.objectMode) {\n\t er = new TypeError('Invalid non-string/buffer chunk');\n\t }\n\t if (er) {\n\t stream.emit('error', er);\n\t processNextTick(cb, er);\n\t valid = false;\n\t }\n\t return valid;\n\t}", "function validChunk(stream, state, chunk, cb) {\n\t var valid = true;\n\t var er = false;\n\n\t if (chunk === null) {\n\t er = new TypeError('May not write null values to stream');\n\t } else if (typeof chunk !== 'string' && chunk !== undefined && !state.objectMode) {\n\t er = new TypeError('Invalid non-string/buffer chunk');\n\t }\n\t if (er) {\n\t stream.emit('error', er);\n\t processNextTick(cb, er);\n\t valid = false;\n\t }\n\t return valid;\n\t}", "function validChunk(stream, state, chunk, cb) {\n\t var valid = true;\n\t var er = false;\n\n\t if (chunk === null) {\n\t er = new TypeError('May not write null values to stream');\n\t } else if (typeof chunk !== 'string' && chunk !== undefined && !state.objectMode) {\n\t er = new TypeError('Invalid non-string/buffer chunk');\n\t }\n\t if (er) {\n\t stream.emit('error', er);\n\t processNextTick(cb, er);\n\t valid = false;\n\t }\n\t return valid;\n\t}", "function validChunk(stream, state, chunk, cb) {\n\t var valid = true;\n\t var er = false;\n\n\t if (chunk === null) {\n\t er = new TypeError('May not write null values to stream');\n\t } else if (typeof chunk !== 'string' && chunk !== undefined && !state.objectMode) {\n\t er = new TypeError('Invalid non-string/buffer chunk');\n\t }\n\t if (er) {\n\t stream.emit('error', er);\n\t processNextTick(cb, er);\n\t valid = false;\n\t }\n\t return valid;\n\t}", "function validChunk(stream, state, chunk, cb) {\n\t var valid = true;\n\t var er = false;\n\n\t if (chunk === null) {\n\t er = new TypeError('May not write null values to stream');\n\t } else if (typeof chunk !== 'string' && chunk !== undefined && !state.objectMode) {\n\t er = new TypeError('Invalid non-string/buffer chunk');\n\t }\n\t if (er) {\n\t stream.emit('error', er);\n\t processNextTick(cb, er);\n\t valid = false;\n\t }\n\t return valid;\n\t}", "function validChunk(stream, state, chunk, cb) {\n var valid = true;\n var er = false;\n // Always throw error if a null is written\n // if we are not in object mode then throw\n // if it is not a buffer, string, or undefined.\n if (chunk === null) {\n er = new TypeError('May not write null values to stream');\n } else if (!Buffer.isBuffer(chunk) && typeof chunk !== 'string' && chunk !== undefined && !state.objectMode) {\n er = new TypeError('Invalid non-string/buffer chunk');\n }\n if (er) {\n stream.emit('error', er);\n processNextTick(cb, er);\n valid = false;\n }\n return valid;\n }", "function validChunk(stream, state, chunk, cb) {\n var valid = true;\n \n if (!(Buffer.isBuffer(chunk)) &&\n typeof chunk !== 'string' &&\n chunk !== null &&\n chunk !== undefined &&\n !state.objectMode) {\n var er = new TypeError('Invalid non-string/buffer chunk');\n stream.emit('error', er);\n processNextTick(cb, er);\n valid = false;\n }\n return valid;\n }", "function validChunk(stream, state, chunk, cb) {\n var valid = true;\n \n if (!(Buffer.isBuffer(chunk)) &&\n typeof chunk !== 'string' &&\n chunk !== null &&\n chunk !== undefined &&\n !state.objectMode) {\n var er = new TypeError('Invalid non-string/buffer chunk');\n stream.emit('error', er);\n processNextTick(cb, er);\n valid = false;\n }\n return valid;\n }", "function validChunk(stream, state, chunk, cb) {\n\t var valid = true;\n\t var er = false;\n\t // Always throw error if a null is written\n\t // if we are not in object mode then throw\n\t // if it is not a buffer, string, or undefined.\n\t if (chunk === null) {\n\t er = new TypeError('May not write null values to stream');\n\t } else if (!Buffer.isBuffer(chunk) && typeof chunk !== 'string' && chunk !== undefined && !state.objectMode) {\n\t er = new TypeError('Invalid non-string/buffer chunk');\n\t }\n\t if (er) {\n\t stream.emit('error', er);\n\t processNextTick(cb, er);\n\t valid = false;\n\t }\n\t return valid;\n\t}", "function validChunk(stream, state, chunk, cb) {\n\t var valid = true;\n\t var er = false;\n\t // Always throw error if a null is written\n\t // if we are not in object mode then throw\n\t // if it is not a buffer, string, or undefined.\n\t if (chunk === null) {\n\t er = new TypeError('May not write null values to stream');\n\t } else if (!Buffer.isBuffer(chunk) && typeof chunk !== 'string' && chunk !== undefined && !state.objectMode) {\n\t er = new TypeError('Invalid non-string/buffer chunk');\n\t }\n\t if (er) {\n\t stream.emit('error', er);\n\t processNextTick(cb, er);\n\t valid = false;\n\t }\n\t return valid;\n\t}", "function validChunk(stream, state, chunk, cb) {\n\t var valid = true;\n\t var er = false;\n\t // Always throw error if a null is written\n\t // if we are not in object mode then throw\n\t // if it is not a buffer, string, or undefined.\n\t if (chunk === null) {\n\t er = new TypeError('May not write null values to stream');\n\t } else if (!Buffer.isBuffer(chunk) && typeof chunk !== 'string' && chunk !== undefined && !state.objectMode) {\n\t er = new TypeError('Invalid non-string/buffer chunk');\n\t }\n\t if (er) {\n\t stream.emit('error', er);\n\t processNextTick(cb, er);\n\t valid = false;\n\t }\n\t return valid;\n\t}", "function validChunk(stream, state, chunk, cb) {\n\t var valid = true;\n\n\t if (!(Buffer.isBuffer(chunk)) &&\n\t typeof chunk !== 'string' &&\n\t chunk !== null &&\n\t chunk !== undefined &&\n\t !state.objectMode) {\n\t var er = new TypeError('Invalid non-string/buffer chunk');\n\t stream.emit('error', er);\n\t processNextTick(cb, er);\n\t valid = false;\n\t }\n\t return valid;\n\t}", "function validChunk(stream, state, chunk, cb) {\n var valid = true;\n var er = false;\n // Always throw error if a null is written\n // if we are not in object mode then throw\n // if it is not a buffer, string, or undefined.\n if (chunk === null) {\n er = new TypeError('May not write null values to stream');\n } else if (!Buffer.isBuffer(chunk) && typeof chunk !== 'string' && chunk !== undefined && !state.objectMode) {\n er = new TypeError('Invalid non-string/buffer chunk');\n }\n if (er) {\n stream.emit('error', er);\n nextTick(cb, er);\n valid = false;\n }\n return valid;\n }", "function validChunk$1(stream$$1, state, chunk, cb) {\n\t var valid = true;\n\t var er = false;\n\n\t if (chunk === null) {\n\t er = new TypeError('May not write null values to stream');\n\t } else if (typeof chunk !== 'string' && chunk !== undefined && !state.objectMode) {\n\t er = new TypeError('Invalid non-string/buffer chunk');\n\t }\n\t if (er) {\n\t stream$$1.emit('error', er);\n\t processNextickArgs.nextTick(cb, er);\n\t valid = false;\n\t }\n\t return valid;\n\t}", "function validChunk(stream, state, chunk, cb) {\n var valid = true;\n var er = false;\n // Always throw error if a null is written\n // if we are not in object mode then throw\n // if it is not a buffer, string, or undefined.\n if (chunk === null) {\n er = new TypeError('May not write null values to stream');\n } else if (!Buffer.isBuffer(chunk) && typeof chunk !== 'string' && chunk !== undefined && !state.objectMode) {\n er = new TypeError('Invalid non-string/buffer chunk');\n }\n if (er) {\n stream.emit('error', er);\n nextTick(cb, er);\n valid = false;\n }\n return valid;\n }", "function validChunk(stream, state, chunk, cb) {\n\t var valid = true;\n\t var er = false;\n\t // Always throw error if a null is written\n\t // if we are not in object mode then throw\n\t // if it is not a buffer, string, or undefined.\n\t if (chunk === null) {\n\t er = new TypeError('May not write null values to stream');\n\t } else if (!Buffer.isBuffer(chunk) && typeof chunk !== 'string' && chunk !== undefined && !state.objectMode) {\n\t er = new TypeError('Invalid non-string/buffer chunk');\n\t }\n\t if (er) {\n\t stream.emit('error', er);\n\t nextTick(cb, er);\n\t valid = false;\n\t }\n\t return valid;\n\t}", "function validChunk(stream, state, chunk, cb) {\n\t var valid = true;\n\t var er = false;\n\t // Always throw error if a null is written\n\t // if we are not in object mode then throw\n\t // if it is not a buffer, string, or undefined.\n\t if (chunk === null) {\n\t er = new TypeError('May not write null values to stream');\n\t } else if (!Buffer.isBuffer(chunk) && typeof chunk !== 'string' && chunk !== undefined && !state.objectMode) {\n\t er = new TypeError('Invalid non-string/buffer chunk');\n\t }\n\t if (er) {\n\t stream.emit('error', er);\n\t nextTick(cb, er);\n\t valid = false;\n\t }\n\t return valid;\n\t}", "function validChunk(stream, state, chunk, cb) {\n\t var valid = true;\n\t var er = false;\n\t // Always throw error if a null is written\n\t // if we are not in object mode then throw\n\t // if it is not a buffer, string, or undefined.\n\t if (chunk === null) {\n\t er = new TypeError('May not write null values to stream');\n\t } else if (!Buffer.isBuffer(chunk) && typeof chunk !== 'string' && chunk !== undefined && !state.objectMode) {\n\t er = new TypeError('Invalid non-string/buffer chunk');\n\t }\n\t if (er) {\n\t stream.emit('error', er);\n\t nextTick(cb, er);\n\t valid = false;\n\t }\n\t return valid;\n\t}", "function validChunk(stream, state, chunk, cb) {\n\t var valid = true;\n\t if (!Buffer.isBuffer(chunk) &&\n\t 'string' !== typeof chunk &&\n\t chunk !== null &&\n\t chunk !== undefined &&\n\t !state.objectMode) {\n\t var er = new TypeError('Invalid non-string/buffer chunk');\n\t stream.emit('error', er);\n\t process.nextTick(function() {\n\t cb(er);\n\t });\n\t valid = false;\n\t }\n\t return valid;\n\t}", "function validChunk(stream, state, chunk, cb) {\n\t var valid = true;\n\t var er = false;\n\t // Always throw error if a null is written\n\t // if we are not in object mode then throw\n\t // if it is not a buffer, string, or undefined.\n\t if (chunk === null) {\n\t er = new TypeError('May not write null values to stream');\n\t } else if (!Buffer$4.isBuffer(chunk) && typeof chunk !== 'string' && chunk !== undefined && !state.objectMode) {\n\t er = new TypeError('Invalid non-string/buffer chunk');\n\t }\n\t if (er) {\n\t stream.emit('error', er);\n\t nextTick(cb, er);\n\t valid = false;\n\t }\n\t return valid;\n\t}", "function writeOrBuffer$1(stream$$1, state, isBuf, chunk, encoding, cb) {\n\t if (!isBuf) {\n\t var newChunk = decodeChunk$1(state, chunk, encoding);\n\t if (chunk !== newChunk) {\n\t isBuf = true;\n\t encoding = 'buffer';\n\t chunk = newChunk;\n\t }\n\t }\n\t var len = state.objectMode ? 1 : chunk.length;\n\n\t state.length += len;\n\n\t var ret = state.length < state.highWaterMark;\n\t // we must ensure that previous needDrain will not be reset to false.\n\t if (!ret) state.needDrain = true;\n\n\t if (state.writing || state.corked) {\n\t var last = state.lastBufferedRequest;\n\t state.lastBufferedRequest = {\n\t chunk: chunk,\n\t encoding: encoding,\n\t isBuf: isBuf,\n\t callback: cb,\n\t next: null\n\t };\n\t if (last) {\n\t last.next = state.lastBufferedRequest;\n\t } else {\n\t state.bufferedRequest = state.lastBufferedRequest;\n\t }\n\t state.bufferedRequestCount += 1;\n\t } else {\n\t doWrite$1(stream$$1, state, false, len, chunk, encoding, cb);\n\t }\n\n\t return ret;\n\t}", "function validChunk(stream, state, chunk, cb) {\n\t var valid = true;\n\t var er = false;\n\t // Always throw error if a null is written\n\t // if we are not in object mode then throw\n\t // if it is not a buffer, string, or undefined.\n\t if (chunk === null) {\n\t er = new TypeError('May not write null values to stream');\n\t } else if (!Buffer$1.isBuffer(chunk) && typeof chunk !== 'string' && chunk !== undefined && !state.objectMode) {\n\t er = new TypeError('Invalid non-string/buffer chunk');\n\t }\n\t if (er) {\n\t stream.emit('error', er);\n\t nextTick(cb, er);\n\t valid = false;\n\t }\n\t return valid;\n\t}", "function validChunk(stream, state, chunk, cb) {\n var valid = true;\n if (!Buffer.isBuffer(chunk) &&\n 'string' !== typeof chunk &&\n chunk !== null &&\n chunk !== undefined &&\n !state.objectMode) {\n var er = new TypeError('Invalid non-string/buffer chunk');\n stream.emit('error', er);\n setImmediate(function() {\n cb(er);\n });\n valid = false;\n }\n return valid;\n}", "function validChunk(stream, state, chunk, cb) {\n var valid = true;\n if (!Buffer.isBuffer(chunk) &&\n 'string' !== typeof chunk &&\n chunk !== null &&\n chunk !== undefined &&\n !state.objectMode) {\n var er = new TypeError('Invalid non-string/buffer chunk');\n stream.emit('error', er);\n setImmediate(function() {\n cb(er);\n });\n valid = false;\n }\n return valid;\n}", "function validChunk(stream, state, chunk, cb) {\n var valid = true;\n if (!Buffer.isBuffer(chunk) &&\n 'string' !== typeof chunk &&\n chunk !== null &&\n chunk !== undefined &&\n !state.objectMode) {\n var er = new TypeError('Invalid non-string/buffer chunk');\n stream.emit('error', er);\n setImmediate(function() {\n cb(er);\n });\n valid = false;\n }\n return valid;\n}", "function validChunk(stream, state, chunk, cb) {\n var valid = true;\n if (!Buffer.isBuffer(chunk) &&\n 'string' !== typeof chunk &&\n chunk !== null &&\n chunk !== undefined &&\n !state.objectMode) {\n var er = new TypeError('Invalid non-string/buffer chunk');\n stream.emit('error', er);\n setImmediate(function() {\n cb(er);\n });\n valid = false;\n }\n return valid;\n}", "function validChunk(stream, state, chunk, cb) {\n var valid = true;\n if (!Buffer.isBuffer(chunk) &&\n 'string' !== typeof chunk &&\n chunk !== null &&\n chunk !== undefined &&\n !state.objectMode) {\n var er = new TypeError('Invalid non-string/buffer chunk');\n stream.emit('error', er);\n setImmediate(function() {\n cb(er);\n });\n valid = false;\n }\n return valid;\n}", "function validChunk(stream, state, chunk, cb) {\n var valid = true;\n if (!Buffer.isBuffer(chunk) &&\n 'string' !== typeof chunk &&\n chunk !== null &&\n chunk !== undefined &&\n !state.objectMode) {\n var er = new TypeError('Invalid non-string/buffer chunk');\n stream.emit('error', er);\n setImmediate(function() {\n cb(er);\n });\n valid = false;\n }\n return valid;\n}", "function validChunk(stream, state, chunk, cb) {\n var valid = true;\n if (!Buffer.isBuffer(chunk) &&\n 'string' !== typeof chunk &&\n chunk !== null &&\n chunk !== undefined &&\n !state.objectMode) {\n var er = new TypeError('Invalid non-string/buffer chunk');\n stream.emit('error', er);\n setImmediate(function() {\n cb(er);\n });\n valid = false;\n }\n return valid;\n}", "function validChunk(stream, state, chunk, cb) {\n\t var valid = true;\n\t var er = false;\n\t\n\t if (chunk === null) {\n\t er = new TypeError('May not write null values to stream');\n\t } else if (typeof chunk !== 'string' && chunk !== undefined && !state.objectMode) {\n\t er = new TypeError('Invalid non-string/buffer chunk');\n\t }\n\t if (er) {\n\t stream.emit('error', er);\n\t pna.nextTick(cb, er);\n\t valid = false;\n\t }\n\t return valid;\n\t}", "function validChunk(stream, state, chunk, cb) {\n var valid = true;\n\n if (!Buffer.isBuffer(chunk) && typeof chunk !== 'string' && chunk !== null && chunk !== undefined && !state.objectMode) {\n var er = new TypeError('Invalid non-string/buffer chunk');\n stream.emit('error', er);\n processNextTick(cb, er);\n valid = false;\n }\n return valid;\n}", "function validChunk(stream, state, chunk, cb) {\n var valid = true;\n\n if (!Buffer.isBuffer(chunk) && typeof chunk !== 'string' && chunk !== null && chunk !== undefined && !state.objectMode) {\n var er = new TypeError('Invalid non-string/buffer chunk');\n stream.emit('error', er);\n processNextTick(cb, er);\n valid = false;\n }\n return valid;\n}", "function validChunk(stream, state, chunk, cb) {\n var valid = true;\n\n if (!Buffer.isBuffer(chunk) && typeof chunk !== 'string' && chunk !== null && chunk !== undefined && !state.objectMode) {\n var er = new TypeError('Invalid non-string/buffer chunk');\n stream.emit('error', er);\n processNextTick(cb, er);\n valid = false;\n }\n return valid;\n}", "function validChunk(stream, state, chunk, cb) {\n var valid = true;\n\n if (!Buffer.isBuffer(chunk) && typeof chunk !== 'string' && chunk !== null && chunk !== undefined && !state.objectMode) {\n var er = new TypeError('Invalid non-string/buffer chunk');\n stream.emit('error', er);\n processNextTick(cb, er);\n valid = false;\n }\n return valid;\n}", "function validChunk(stream, state, chunk, cb) {\n var valid = true;\n\n if (!Buffer.isBuffer(chunk) && typeof chunk !== 'string' && chunk !== null && chunk !== undefined && !state.objectMode) {\n var er = new TypeError('Invalid non-string/buffer chunk');\n stream.emit('error', er);\n processNextTick(cb, er);\n valid = false;\n }\n return valid;\n}", "function validChunk(stream, state, chunk, cb) {\n var valid = true;\n\n if (!Buffer.isBuffer(chunk) && typeof chunk !== 'string' && chunk !== null && chunk !== undefined && !state.objectMode) {\n var er = new TypeError('Invalid non-string/buffer chunk');\n stream.emit('error', er);\n processNextTick(cb, er);\n valid = false;\n }\n return valid;\n}", "function validChunk(stream, state, chunk, cb) {\n var valid = true;\n\n if (!Buffer.isBuffer(chunk) && typeof chunk !== 'string' && chunk !== null && chunk !== undefined && !state.objectMode) {\n var er = new TypeError('Invalid non-string/buffer chunk');\n stream.emit('error', er);\n processNextTick(cb, er);\n valid = false;\n }\n return valid;\n}", "function validChunk(stream, state, chunk, cb) {\n var valid = true;\n\n if (!Buffer.isBuffer(chunk) && typeof chunk !== 'string' && chunk !== null && chunk !== undefined && !state.objectMode) {\n var er = new TypeError('Invalid non-string/buffer chunk');\n stream.emit('error', er);\n processNextTick(cb, er);\n valid = false;\n }\n return valid;\n}", "function writeOrBuffer$2(stream, state, isBuf, chunk, encoding, cb) {\n\t if (!isBuf) {\n\t var newChunk = decodeChunk$2(state, chunk, encoding);\n\t if (chunk !== newChunk) {\n\t isBuf = true;\n\t encoding = 'buffer';\n\t chunk = newChunk;\n\t }\n\t }\n\t var len = state.objectMode ? 1 : chunk.length;\n\n\t state.length += len;\n\n\t var ret = state.length < state.highWaterMark;\n\t // we must ensure that previous needDrain will not be reset to false.\n\t if (!ret) state.needDrain = true;\n\n\t if (state.writing || state.corked) {\n\t var last = state.lastBufferedRequest;\n\t state.lastBufferedRequest = {\n\t chunk: chunk,\n\t encoding: encoding,\n\t isBuf: isBuf,\n\t callback: cb,\n\t next: null\n\t };\n\t if (last) {\n\t last.next = state.lastBufferedRequest;\n\t } else {\n\t state.bufferedRequest = state.lastBufferedRequest;\n\t }\n\t state.bufferedRequestCount += 1;\n\t } else {\n\t doWrite$2(stream, state, false, len, chunk, encoding, cb);\n\t }\n\n\t return ret;\n\t}", "function validChunk(stream, state, chunk, cb) {\n\t var valid = true;\n\t var er = false;\n\n\t if (chunk === null) {\n\t er = new TypeError('May not write null values to stream');\n\t } else if (typeof chunk !== 'string' && chunk !== undefined && !state.objectMode) {\n\t er = new TypeError('Invalid non-string/buffer chunk');\n\t }\n\t if (er) {\n\t stream.emit('error', er);\n\t pna.nextTick(cb, er);\n\t valid = false;\n\t }\n\t return valid;\n\t}", "function validChunk(stream, state, chunk, cb) {\n\t var valid = true;\n\t var er = false;\n\n\t if (chunk === null) {\n\t er = new TypeError('May not write null values to stream');\n\t } else if (typeof chunk !== 'string' && chunk !== undefined && !state.objectMode) {\n\t er = new TypeError('Invalid non-string/buffer chunk');\n\t }\n\t if (er) {\n\t stream.emit('error', er);\n\t pna.nextTick(cb, er);\n\t valid = false;\n\t }\n\t return valid;\n\t}", "function $rtWY$var$writeOrBuffer(stream, state, isBuf, chunk, encoding, cb) {\n if (!isBuf) {\n var newChunk = $rtWY$var$decodeChunk(state, chunk, encoding);\n\n if (chunk !== newChunk) {\n isBuf = true;\n encoding = 'buffer';\n chunk = newChunk;\n }\n }\n\n var len = state.objectMode ? 1 : chunk.length;\n state.length += len;\n var ret = state.length < state.highWaterMark; // we must ensure that previous needDrain will not be reset to false.\n\n if (!ret) state.needDrain = true;\n\n if (state.writing || state.corked) {\n var last = state.lastBufferedRequest;\n state.lastBufferedRequest = {\n chunk: chunk,\n encoding: encoding,\n isBuf: isBuf,\n callback: cb,\n next: null\n };\n\n if (last) {\n last.next = state.lastBufferedRequest;\n } else {\n state.bufferedRequest = state.lastBufferedRequest;\n }\n\n state.bufferedRequestCount += 1;\n } else {\n $rtWY$var$doWrite(stream, state, false, len, chunk, encoding, cb);\n }\n\n return ret;\n}", "function writeOrBuffer(stream, state, isBuf, chunk, encoding, cb) {\n\t if (!isBuf) {\n\t var newChunk = decodeChunk(state, chunk, encoding);\n\t if (chunk !== newChunk) {\n\t isBuf = true;\n\t encoding = 'buffer';\n\t chunk = newChunk;\n\t }\n\t }\n\t var len = state.objectMode ? 1 : chunk.length;\n\t\n\t state.length += len;\n\t\n\t var ret = state.length < state.highWaterMark;\n\t // we must ensure that previous needDrain will not be reset to false.\n\t if (!ret) state.needDrain = true;\n\t\n\t if (state.writing || state.corked) {\n\t var last = state.lastBufferedRequest;\n\t state.lastBufferedRequest = {\n\t chunk: chunk,\n\t encoding: encoding,\n\t isBuf: isBuf,\n\t callback: cb,\n\t next: null\n\t };\n\t if (last) {\n\t last.next = state.lastBufferedRequest;\n\t } else {\n\t state.bufferedRequest = state.lastBufferedRequest;\n\t }\n\t state.bufferedRequestCount += 1;\n\t } else {\n\t doWrite(stream, state, false, len, chunk, encoding, cb);\n\t }\n\t\n\t return ret;\n\t}", "function validChunk(stream, state, chunk, cb) {\n var valid = true;\n var er = false;\n\n if (chunk === null) {\n er = new TypeError('May not write null values to stream');\n } else if (typeof chunk !== 'string' && chunk !== undefined && !state.objectMode) {\n er = new TypeError('Invalid non-string/buffer chunk');\n }\n if (er) {\n stream.emit('error', er);\n processNextTick(cb, er);\n valid = false;\n }\n return valid;\n}", "function validChunk(stream, state, chunk, cb) {\n var valid = true;\n var er = false;\n\n if (chunk === null) {\n er = new TypeError('May not write null values to stream');\n } else if (typeof chunk !== 'string' && chunk !== undefined && !state.objectMode) {\n er = new TypeError('Invalid non-string/buffer chunk');\n }\n if (er) {\n stream.emit('error', er);\n processNextTick(cb, er);\n valid = false;\n }\n return valid;\n}", "function validChunk(stream, state, chunk, cb) {\n var valid = true;\n var er = false;\n\n if (chunk === null) {\n er = new TypeError('May not write null values to stream');\n } else if (typeof chunk !== 'string' && chunk !== undefined && !state.objectMode) {\n er = new TypeError('Invalid non-string/buffer chunk');\n }\n if (er) {\n stream.emit('error', er);\n processNextTick(cb, er);\n valid = false;\n }\n return valid;\n}", "function validChunk(stream, state, chunk, cb) {\n var valid = true;\n var er = false;\n\n if (chunk === null) {\n er = new TypeError('May not write null values to stream');\n } else if (typeof chunk !== 'string' && chunk !== undefined && !state.objectMode) {\n er = new TypeError('Invalid non-string/buffer chunk');\n }\n if (er) {\n stream.emit('error', er);\n processNextTick(cb, er);\n valid = false;\n }\n return valid;\n}", "function validChunk(stream, state, chunk, cb) {\n var valid = true;\n var er = false;\n\n if (chunk === null) {\n er = new TypeError('May not write null values to stream');\n } else if (typeof chunk !== 'string' && chunk !== undefined && !state.objectMode) {\n er = new TypeError('Invalid non-string/buffer chunk');\n }\n if (er) {\n stream.emit('error', er);\n processNextTick(cb, er);\n valid = false;\n }\n return valid;\n}", "function validChunk(stream, state, chunk, cb) {\n var valid = true;\n var er = false;\n\n if (chunk === null) {\n er = new TypeError('May not write null values to stream');\n } else if (typeof chunk !== 'string' && chunk !== undefined && !state.objectMode) {\n er = new TypeError('Invalid non-string/buffer chunk');\n }\n if (er) {\n stream.emit('error', er);\n processNextTick(cb, er);\n valid = false;\n }\n return valid;\n}", "function validChunk(stream, state, chunk, cb) {\n var valid = true;\n var er = false;\n\n if (chunk === null) {\n er = new TypeError('May not write null values to stream');\n } else if (typeof chunk !== 'string' && chunk !== undefined && !state.objectMode) {\n er = new TypeError('Invalid non-string/buffer chunk');\n }\n if (er) {\n stream.emit('error', er);\n processNextTick(cb, er);\n valid = false;\n }\n return valid;\n}", "function validChunk(stream, state, chunk, cb) {\n var valid = true;\n var er = false;\n\n if (chunk === null) {\n er = new TypeError('May not write null values to stream');\n } else if (typeof chunk !== 'string' && chunk !== undefined && !state.objectMode) {\n er = new TypeError('Invalid non-string/buffer chunk');\n }\n if (er) {\n stream.emit('error', er);\n processNextTick(cb, er);\n valid = false;\n }\n return valid;\n}", "function validChunk(stream, state, chunk, cb) {\n var valid = true;\n var er = false;\n\n if (chunk === null) {\n er = new TypeError('May not write null values to stream');\n } else if (typeof chunk !== 'string' && chunk !== undefined && !state.objectMode) {\n er = new TypeError('Invalid non-string/buffer chunk');\n }\n if (er) {\n stream.emit('error', er);\n processNextTick(cb, er);\n valid = false;\n }\n return valid;\n}", "function validChunk(stream, state, chunk, cb) {\n var valid = true;\n var er = false;\n\n if (chunk === null) {\n er = new TypeError('May not write null values to stream');\n } else if (typeof chunk !== 'string' && chunk !== undefined && !state.objectMode) {\n er = new TypeError('Invalid non-string/buffer chunk');\n }\n if (er) {\n stream.emit('error', er);\n processNextTick(cb, er);\n valid = false;\n }\n return valid;\n}", "function validChunk(stream, state, chunk, cb) {\n var valid = true;\n var er = false;\n\n if (chunk === null) {\n er = new TypeError('May not write null values to stream');\n } else if (typeof chunk !== 'string' && chunk !== undefined && !state.objectMode) {\n er = new TypeError('Invalid non-string/buffer chunk');\n }\n if (er) {\n stream.emit('error', er);\n processNextTick(cb, er);\n valid = false;\n }\n return valid;\n}", "function validChunk(stream, state, chunk, cb) {\n var valid = true;\n var er = false;\n\n if (chunk === null) {\n er = new TypeError('May not write null values to stream');\n } else if (typeof chunk !== 'string' && chunk !== undefined && !state.objectMode) {\n er = new TypeError('Invalid non-string/buffer chunk');\n }\n if (er) {\n stream.emit('error', er);\n processNextTick(cb, er);\n valid = false;\n }\n return valid;\n}", "function validChunk(stream, state, chunk, cb) {\n var valid = true;\n var er = false;\n\n if (chunk === null) {\n er = new TypeError('May not write null values to stream');\n } else if (typeof chunk !== 'string' && chunk !== undefined && !state.objectMode) {\n er = new TypeError('Invalid non-string/buffer chunk');\n }\n if (er) {\n stream.emit('error', er);\n processNextTick(cb, er);\n valid = false;\n }\n return valid;\n}", "function validChunk(stream, state, chunk, cb) {\n var valid = true;\n var er = false;\n\n if (chunk === null) {\n er = new TypeError('May not write null values to stream');\n } else if (typeof chunk !== 'string' && chunk !== undefined && !state.objectMode) {\n er = new TypeError('Invalid non-string/buffer chunk');\n }\n if (er) {\n stream.emit('error', er);\n processNextTick(cb, er);\n valid = false;\n }\n return valid;\n}", "function validChunk(stream, state, chunk, cb) {\n var valid = true;\n var er = false;\n\n if (chunk === null) {\n er = new TypeError('May not write null values to stream');\n } else if (typeof chunk !== 'string' && chunk !== undefined && !state.objectMode) {\n er = new TypeError('Invalid non-string/buffer chunk');\n }\n if (er) {\n stream.emit('error', er);\n processNextTick(cb, er);\n valid = false;\n }\n return valid;\n}", "function validChunk(stream, state, chunk, cb) {\n var valid = true;\n var er = false;\n\n if (chunk === null) {\n er = new TypeError('May not write null values to stream');\n } else if (typeof chunk !== 'string' && chunk !== undefined && !state.objectMode) {\n er = new TypeError('Invalid non-string/buffer chunk');\n }\n if (er) {\n stream.emit('error', er);\n processNextTick(cb, er);\n valid = false;\n }\n return valid;\n}", "function validChunk(stream, state, chunk, cb) {\n var valid = true;\n var er = false;\n\n if (chunk === null) {\n er = new TypeError('May not write null values to stream');\n } else if (typeof chunk !== 'string' && chunk !== undefined && !state.objectMode) {\n er = new TypeError('Invalid non-string/buffer chunk');\n }\n if (er) {\n stream.emit('error', er);\n processNextTick(cb, er);\n valid = false;\n }\n return valid;\n}", "function validChunk(stream, state, chunk, cb) {\n var valid = true;\n var er = false;\n\n if (chunk === null) {\n er = new TypeError('May not write null values to stream');\n } else if (typeof chunk !== 'string' && chunk !== undefined && !state.objectMode) {\n er = new TypeError('Invalid non-string/buffer chunk');\n }\n if (er) {\n stream.emit('error', er);\n processNextTick(cb, er);\n valid = false;\n }\n return valid;\n}", "function validChunk(stream, state, chunk, cb) {\n var valid = true;\n var er = false;\n\n if (chunk === null) {\n er = new TypeError('May not write null values to stream');\n } else if (typeof chunk !== 'string' && chunk !== undefined && !state.objectMode) {\n er = new TypeError('Invalid non-string/buffer chunk');\n }\n if (er) {\n stream.emit('error', er);\n processNextTick(cb, er);\n valid = false;\n }\n return valid;\n}", "function validChunk(stream, state, chunk, cb) {\n var valid = true;\n var er = false;\n\n if (chunk === null) {\n er = new TypeError('May not write null values to stream');\n } else if (typeof chunk !== 'string' && chunk !== undefined && !state.objectMode) {\n er = new TypeError('Invalid non-string/buffer chunk');\n }\n if (er) {\n stream.emit('error', er);\n processNextTick(cb, er);\n valid = false;\n }\n return valid;\n}", "function validChunk(stream, state, chunk, cb) {\n var valid = true;\n var er = false;\n\n if (chunk === null) {\n er = new TypeError('May not write null values to stream');\n } else if (typeof chunk !== 'string' && chunk !== undefined && !state.objectMode) {\n er = new TypeError('Invalid non-string/buffer chunk');\n }\n if (er) {\n stream.emit('error', er);\n processNextTick(cb, er);\n valid = false;\n }\n return valid;\n}", "function validChunk(stream, state, chunk, cb) {\n var valid = true;\n var er = false;\n\n if (chunk === null) {\n er = new TypeError('May not write null values to stream');\n } else if (typeof chunk !== 'string' && chunk !== undefined && !state.objectMode) {\n er = new TypeError('Invalid non-string/buffer chunk');\n }\n if (er) {\n stream.emit('error', er);\n processNextTick(cb, er);\n valid = false;\n }\n return valid;\n}", "function validChunk(stream, state, chunk, cb) {\n var valid = true;\n var er = false;\n\n if (chunk === null) {\n er = new TypeError('May not write null values to stream');\n } else if (typeof chunk !== 'string' && chunk !== undefined && !state.objectMode) {\n er = new TypeError('Invalid non-string/buffer chunk');\n }\n if (er) {\n stream.emit('error', er);\n processNextTick(cb, er);\n valid = false;\n }\n return valid;\n}", "function validChunk(stream, state, chunk, cb) {\n var valid = true;\n var er = false;\n\n if (chunk === null) {\n er = new TypeError('May not write null values to stream');\n } else if (typeof chunk !== 'string' && chunk !== undefined && !state.objectMode) {\n er = new TypeError('Invalid non-string/buffer chunk');\n }\n if (er) {\n stream.emit('error', er);\n processNextTick(cb, er);\n valid = false;\n }\n return valid;\n}", "function validChunk(stream, state, chunk, cb) {\n var valid = true;\n var er = false;\n\n if (chunk === null) {\n er = new TypeError('May not write null values to stream');\n } else if (typeof chunk !== 'string' && chunk !== undefined && !state.objectMode) {\n er = new TypeError('Invalid non-string/buffer chunk');\n }\n if (er) {\n stream.emit('error', er);\n processNextTick(cb, er);\n valid = false;\n }\n return valid;\n}", "function validChunk(stream, state, chunk, cb) {\n var valid = true;\n var er = false;\n\n if (chunk === null) {\n er = new TypeError('May not write null values to stream');\n } else if (typeof chunk !== 'string' && chunk !== undefined && !state.objectMode) {\n er = new TypeError('Invalid non-string/buffer chunk');\n }\n if (er) {\n stream.emit('error', er);\n processNextTick(cb, er);\n valid = false;\n }\n return valid;\n}", "function validChunk(stream, state, chunk, cb) {\n var valid = true;\n var er = false;\n\n if (chunk === null) {\n er = new TypeError('May not write null values to stream');\n } else if (typeof chunk !== 'string' && chunk !== undefined && !state.objectMode) {\n er = new TypeError('Invalid non-string/buffer chunk');\n }\n if (er) {\n stream.emit('error', er);\n processNextTick(cb, er);\n valid = false;\n }\n return valid;\n}", "function validChunk(stream, state, chunk, cb) {\n var valid = true;\n var er = false;\n\n if (chunk === null) {\n er = new TypeError('May not write null values to stream');\n } else if (typeof chunk !== 'string' && chunk !== undefined && !state.objectMode) {\n er = new TypeError('Invalid non-string/buffer chunk');\n }\n if (er) {\n stream.emit('error', er);\n processNextTick(cb, er);\n valid = false;\n }\n return valid;\n}", "function validChunk(stream, state, chunk, cb) {\n var valid = true;\n var er = false;\n\n if (chunk === null) {\n er = new TypeError('May not write null values to stream');\n } else if (typeof chunk !== 'string' && chunk !== undefined && !state.objectMode) {\n er = new TypeError('Invalid non-string/buffer chunk');\n }\n if (er) {\n stream.emit('error', er);\n processNextTick(cb, er);\n valid = false;\n }\n return valid;\n}", "function validChunk(stream, state, chunk, cb) {\n var valid = true;\n var er = false;\n\n if (chunk === null) {\n er = new TypeError('May not write null values to stream');\n } else if (typeof chunk !== 'string' && chunk !== undefined && !state.objectMode) {\n er = new TypeError('Invalid non-string/buffer chunk');\n }\n if (er) {\n stream.emit('error', er);\n processNextTick(cb, er);\n valid = false;\n }\n return valid;\n}", "function validChunk(stream, state, chunk, cb) {\n var valid = true;\n var er = false;\n\n if (chunk === null) {\n er = new TypeError('May not write null values to stream');\n } else if (typeof chunk !== 'string' && chunk !== undefined && !state.objectMode) {\n er = new TypeError('Invalid non-string/buffer chunk');\n }\n if (er) {\n stream.emit('error', er);\n processNextTick(cb, er);\n valid = false;\n }\n return valid;\n}", "function validChunk(stream, state, chunk, cb) {\n var valid = true;\n var er = false;\n\n if (chunk === null) {\n er = new TypeError('May not write null values to stream');\n } else if (typeof chunk !== 'string' && chunk !== undefined && !state.objectMode) {\n er = new TypeError('Invalid non-string/buffer chunk');\n }\n if (er) {\n stream.emit('error', er);\n processNextTick(cb, er);\n valid = false;\n }\n return valid;\n}", "function validChunk(stream, state, chunk, cb) {\n var valid = true;\n var er = false;\n\n if (chunk === null) {\n er = new TypeError('May not write null values to stream');\n } else if (typeof chunk !== 'string' && chunk !== undefined && !state.objectMode) {\n er = new TypeError('Invalid non-string/buffer chunk');\n }\n if (er) {\n stream.emit('error', er);\n processNextTick(cb, er);\n valid = false;\n }\n return valid;\n}", "function validChunk(stream, state, chunk, cb) {\n var valid = true;\n var er = false;\n\n if (chunk === null) {\n er = new TypeError('May not write null values to stream');\n } else if (typeof chunk !== 'string' && chunk !== undefined && !state.objectMode) {\n er = new TypeError('Invalid non-string/buffer chunk');\n }\n if (er) {\n stream.emit('error', er);\n processNextTick(cb, er);\n valid = false;\n }\n return valid;\n}", "function validChunk(stream, state, chunk, cb) {\n var valid = true;\n var er = false;\n\n if (chunk === null) {\n er = new TypeError('May not write null values to stream');\n } else if (typeof chunk !== 'string' && chunk !== undefined && !state.objectMode) {\n er = new TypeError('Invalid non-string/buffer chunk');\n }\n if (er) {\n stream.emit('error', er);\n processNextTick(cb, er);\n valid = false;\n }\n return valid;\n}", "function validChunk(stream, state, chunk, cb) {\n var valid = true;\n var er = false;\n\n if (chunk === null) {\n er = new TypeError('May not write null values to stream');\n } else if (typeof chunk !== 'string' && chunk !== undefined && !state.objectMode) {\n er = new TypeError('Invalid non-string/buffer chunk');\n }\n if (er) {\n stream.emit('error', er);\n processNextTick(cb, er);\n valid = false;\n }\n return valid;\n}", "function validChunk(stream, state, chunk, cb) {\n var valid = true;\n var er = false;\n\n if (chunk === null) {\n er = new TypeError('May not write null values to stream');\n } else if (typeof chunk !== 'string' && chunk !== undefined && !state.objectMode) {\n er = new TypeError('Invalid non-string/buffer chunk');\n }\n if (er) {\n stream.emit('error', er);\n processNextTick(cb, er);\n valid = false;\n }\n return valid;\n}", "function validChunk(stream, state, chunk, cb) {\n var valid = true;\n var er = false;\n\n if (chunk === null) {\n er = new TypeError('May not write null values to stream');\n } else if (typeof chunk !== 'string' && chunk !== undefined && !state.objectMode) {\n er = new TypeError('Invalid non-string/buffer chunk');\n }\n if (er) {\n stream.emit('error', er);\n processNextTick(cb, er);\n valid = false;\n }\n return valid;\n}", "function validChunk(stream, state, chunk, cb) {\n var valid = true;\n var er = false;\n\n if (chunk === null) {\n er = new TypeError('May not write null values to stream');\n } else if (typeof chunk !== 'string' && chunk !== undefined && !state.objectMode) {\n er = new TypeError('Invalid non-string/buffer chunk');\n }\n if (er) {\n stream.emit('error', er);\n processNextTick(cb, er);\n valid = false;\n }\n return valid;\n}", "function validChunk(stream, state, chunk, cb) {\n var valid = true;\n var er = false;\n\n if (chunk === null) {\n er = new TypeError('May not write null values to stream');\n } else if (typeof chunk !== 'string' && chunk !== undefined && !state.objectMode) {\n er = new TypeError('Invalid non-string/buffer chunk');\n }\n if (er) {\n stream.emit('error', er);\n processNextTick(cb, er);\n valid = false;\n }\n return valid;\n}", "function validChunk(stream, state, chunk, cb) {\n var valid = true;\n var er = false;\n\n if (chunk === null) {\n er = new TypeError('May not write null values to stream');\n } else if (typeof chunk !== 'string' && chunk !== undefined && !state.objectMode) {\n er = new TypeError('Invalid non-string/buffer chunk');\n }\n if (er) {\n stream.emit('error', er);\n processNextTick(cb, er);\n valid = false;\n }\n return valid;\n}", "function validChunk(stream, state, chunk, cb) {\n var valid = true;\n var er = false;\n\n if (chunk === null) {\n er = new TypeError('May not write null values to stream');\n } else if (typeof chunk !== 'string' && chunk !== undefined && !state.objectMode) {\n er = new TypeError('Invalid non-string/buffer chunk');\n }\n if (er) {\n stream.emit('error', er);\n processNextTick(cb, er);\n valid = false;\n }\n return valid;\n}", "function validChunk(stream, state, chunk, cb) {\n var valid = true;\n var er = false;\n\n if (chunk === null) {\n er = new TypeError('May not write null values to stream');\n } else if (typeof chunk !== 'string' && chunk !== undefined && !state.objectMode) {\n er = new TypeError('Invalid non-string/buffer chunk');\n }\n if (er) {\n stream.emit('error', er);\n processNextTick(cb, er);\n valid = false;\n }\n return valid;\n}", "function validChunk(stream, state, chunk, cb) {\n var valid = true;\n var er = false;\n\n if (chunk === null) {\n er = new TypeError('May not write null values to stream');\n } else if (typeof chunk !== 'string' && chunk !== undefined && !state.objectMode) {\n er = new TypeError('Invalid non-string/buffer chunk');\n }\n if (er) {\n stream.emit('error', er);\n processNextTick(cb, er);\n valid = false;\n }\n return valid;\n}", "function validChunk(stream, state, chunk, cb) {\n var valid = true;\n var er = false;\n\n if (chunk === null) {\n er = new TypeError('May not write null values to stream');\n } else if (typeof chunk !== 'string' && chunk !== undefined && !state.objectMode) {\n er = new TypeError('Invalid non-string/buffer chunk');\n }\n if (er) {\n stream.emit('error', er);\n processNextTick(cb, er);\n valid = false;\n }\n return valid;\n}" ]
[ "0.67616236", "0.66709983", "0.6603179", "0.6489302", "0.64036095", "0.6382999", "0.6302069", "0.6222092", "0.62168604", "0.62168604", "0.6212825", "0.61844486", "0.61844486", "0.6166149", "0.6166149", "0.6166149", "0.6166149", "0.6166149", "0.61596984", "0.61552274", "0.61552274", "0.6132882", "0.6132882", "0.6132882", "0.61299646", "0.6112893", "0.61122733", "0.61122215", "0.60980433", "0.60980433", "0.60980433", "0.60790485", "0.60753113", "0.6067023", "0.60637105", "0.60362595", "0.60362595", "0.60362595", "0.60362595", "0.60362595", "0.60362595", "0.60362595", "0.6034646", "0.60340714", "0.60340714", "0.60340714", "0.60340714", "0.60340714", "0.60340714", "0.60340714", "0.60340714", "0.6013104", "0.6011529", "0.6011529", "0.6009288", "0.600918", "0.600808", "0.600808", "0.600808", "0.600808", "0.600808", "0.600808", "0.600808", "0.600808", "0.600808", "0.600808", "0.600808", "0.600808", "0.600808", "0.600808", "0.600808", "0.600808", "0.600808", "0.600808", "0.600808", "0.600808", "0.600808", "0.600808", "0.600808", "0.600808", "0.600808", "0.600808", "0.600808", "0.600808", "0.600808", "0.600808", "0.600808", "0.600808", "0.600808", "0.600808", "0.600808", "0.600808", "0.600808", "0.600808", "0.600808", "0.600808", "0.600808", "0.600808", "0.600808", "0.600808", "0.600808" ]
0.0
-1
if we're already writing something, then just put this in the queue, and wait our turn. Otherwise, call _write If we return false, then we need a drain event, so set that flag.
function writeOrBuffer(stream, state, chunk, encoding, cb) { chunk = decodeChunk(state, chunk, encoding); if (util.isBuffer(chunk)) encoding = 'buffer'; var len = state.objectMode ? 1 : chunk.length; state.length += len; var ret = state.length < state.highWaterMark; // we must ensure that previous needDrain will not be reset to false. if (!ret) state.needDrain = true; if (state.writing || state.corked) state.buffer.push(new WriteReq(chunk, encoding, cb)); else doWrite(stream, state, false, len, chunk, encoding, cb); return ret; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function onwriteDrain(stream,state){if(state.length===0&&state.needDrain){state.needDrain=false;stream.emit('drain');}}// if there's something in the buffer waiting, then process it", "function onwriteDrain(stream,state){if(state.length===0&&state.needDrain){state.needDrain=false;stream.emit('drain');}}// if there's something in the buffer waiting, then process it", "function onwriteDrain(stream,state){if(state.length===0&&state.needDrain){state.needDrain=false;stream.emit('drain');}}// if there's something in the buffer waiting, then process it", "function onwriteDrain(stream,state){if(state.length===0&&state.needDrain){state.needDrain=false;stream.emit('drain');}}// if there's something in the buffer waiting, then process it", "function $rtWY$var$onwriteDrain(stream, state) {\n if (state.length === 0 && state.needDrain) {\n state.needDrain = false;\n stream.emit('drain');\n }\n} // if there's something in the buffer waiting, then process it", "function $KNil$var$onwriteDrain(stream, state) {\n if (state.length === 0 && state.needDrain) {\n state.needDrain = false;\n stream.emit('drain');\n }\n} // if there's something in the buffer waiting, then process it", "function onwriteDrain(stream, state) {\n if (state.length === 0 && state.needDrain) {\n state.needDrain = false;\n stream.emit('drain');\n }\n} // if there's something in the buffer waiting, then process it", "function onwriteDrain(stream, state) {\n if (state.length === 0 && state.needDrain) {\n state.needDrain = false;\n stream.emit('drain');\n }\n} // if there's something in the buffer waiting, then process it", "function onwriteDrain(stream, state) {\n if (state.length === 0 && state.needDrain) {\n state.needDrain = false;\n stream.emit('drain');\n }\n} // if there's something in the buffer waiting, then process it", "function onwriteDrain(stream, state) {\n if (state.length === 0 && state.needDrain) {\n state.needDrain = false;\n stream.emit('drain');\n }\n} // if there's something in the buffer waiting, then process it", "function onwriteDrain(stream, state) {\n if (state.length === 0 && state.needDrain) {\n state.needDrain = false;\n stream.emit('drain');\n }\n} // if there's something in the buffer waiting, then process it", "function onwriteDrain(stream, state) {\n if (state.length === 0 && state.needDrain) {\n state.needDrain = false;\n stream.emit('drain');\n }\n} // if there's something in the buffer waiting, then process it", "function onwriteDrain(stream, state) {\n if (state.length === 0 && state.needDrain) {\n state.needDrain = false;\n stream.emit('drain');\n }\n} // if there's something in the buffer waiting, then process it", "function onwriteDrain(stream, state) {\n if (state.length === 0 && state.needDrain) {\n state.needDrain = false;\n stream.emit('drain');\n }\n} // if there's something in the buffer waiting, then process it", "function onwriteDrain(stream, state) {\n if (state.length === 0 && state.needDrain) {\n state.needDrain = false;\n stream.emit('drain');\n }\n} // if there's something in the buffer waiting, then process it", "function onwriteDrain(stream, state) {\n if (state.length === 0 && state.needDrain) {\n state.needDrain = false;\n stream.emit('drain');\n }\n} // if there's something in the buffer waiting, then process it", "function onwriteDrain(stream, state) {\n if (state.length === 0 && state.needDrain) {\n state.needDrain = false;\n stream.emit('drain');\n }\n} // if there's something in the buffer waiting, then process it", "function onwriteDrain(stream, state) {\n if (state.length === 0 && state.needDrain) {\n state.needDrain = false;\n stream.emit('drain');\n }\n} // if there's something in the buffer waiting, then process it", "function onwriteDrain(stream, state) {\n if (state.length === 0 && state.needDrain) {\n state.needDrain = false;\n stream.emit('drain');\n }\n} // if there's something in the buffer waiting, then process it", "function onwriteDrain(stream, state) {\n if (state.length === 0 && state.needDrain) {\n state.needDrain = false;\n stream.emit('drain');\n }\n} // if there's something in the buffer waiting, then process it", "function onwriteDrain(stream, state) {\n if (state.length === 0 && state.needDrain) {\n state.needDrain = false;\n stream.emit('drain');\n }\n} // if there's something in the buffer waiting, then process it", "function onwriteDrain(stream, state) {\n if (state.length === 0 && state.needDrain) {\n state.needDrain = false;\n stream.emit('drain');\n }\n} // if there's something in the buffer waiting, then process it", "function onwriteDrain(stream, state) {\n if (state.length === 0 && state.needDrain) {\n state.needDrain = false;\n stream.emit('drain');\n }\n} // if there's something in the buffer waiting, then process it", "function onwriteDrain(stream, state) {\n if (state.length === 0 && state.needDrain) {\n state.needDrain = false;\n stream.emit('drain');\n }\n} // if there's something in the buffer waiting, then process it", "function onwriteDrain(stream, state) {\n if (state.length === 0 && state.needDrain) {\n state.needDrain = false;\n stream.emit('drain');\n }\n} // if there's something in the buffer waiting, then process it", "function onwriteDrain(stream, state) {\n if (state.length === 0 && state.needDrain) {\n state.needDrain = false;\n stream.emit('drain');\n }\n} // if there's something in the buffer waiting, then process it", "function onwriteDrain(stream, state) {\n if (state.length === 0 && state.needDrain) {\n state.needDrain = false;\n stream.emit('drain');\n }\n} // if there's something in the buffer waiting, then process it", "function onwriteDrain(stream, state) {\n if (state.length === 0 && state.needDrain) {\n state.needDrain = false;\n stream.emit('drain');\n }\n} // if there's something in the buffer waiting, then process it", "function onwriteDrain(stream, state) {\n if (state.length === 0 && state.needDrain) {\n state.needDrain = false;\n stream.emit('drain');\n }\n} // if there's something in the buffer waiting, then process it", "function onwriteDrain(stream, state) {\n if (state.length === 0 && state.needDrain) {\n state.needDrain = false;\n stream.emit('drain');\n }\n} // if there's something in the buffer waiting, then process it", "function onwriteDrain(stream, state) {\n if (state.length === 0 && state.needDrain) {\n state.needDrain = false;\n stream.emit('drain');\n }\n} // if there's something in the buffer waiting, then process it", "function onwriteDrain(stream, state) {\n if (state.length === 0 && state.needDrain) {\n state.needDrain = false;\n stream.emit('drain');\n }\n} // if there's something in the buffer waiting, then process it", "function onwriteDrain(stream, state) {\n if (state.length === 0 && state.needDrain) {\n state.needDrain = false;\n stream.emit('drain');\n }\n} // if there's something in the buffer waiting, then process it", "function onwriteDrain(stream, state) {\n if (state.length === 0 && state.needDrain) {\n state.needDrain = false;\n stream.emit('drain');\n }\n} // if there's something in the buffer waiting, then process it", "function onwriteDrain(stream, state) {\n if (state.length === 0 && state.needDrain) {\n state.needDrain = false;\n stream.emit('drain');\n }\n} // if there's something in the buffer waiting, then process it", "function onwriteDrain(stream, state) {\n if (state.length === 0 && state.needDrain) {\n state.needDrain = false;\n stream.emit('drain');\n }\n} // if there's something in the buffer waiting, then process it", "function onwriteDrain(stream, state) {\n if (state.length === 0 && state.needDrain) {\n state.needDrain = false;\n stream.emit('drain');\n }\n} // if there's something in the buffer waiting, then process it", "function onwriteDrain(stream, state) {\n if (state.length === 0 && state.needDrain) {\n state.needDrain = false;\n stream.emit('drain');\n }\n} // if there's something in the buffer waiting, then process it", "function onwriteDrain(stream, state) {\n if (state.length === 0 && state.needDrain) {\n state.needDrain = false;\n stream.emit('drain');\n }\n} // if there's something in the buffer waiting, then process it", "function onwriteDrain(stream, state) {\n if (state.length === 0 && state.needDrain) {\n state.needDrain = false;\n stream.emit('drain');\n }\n} // if there's something in the buffer waiting, then process it", "function onwriteDrain(stream, state) {\n if (state.length === 0 && state.needDrain) {\n state.needDrain = false;\n stream.emit('drain');\n }\n} // if there's something in the buffer waiting, then process it", "function onwriteDrain(stream, state) {\n if (state.length === 0 && state.needDrain) {\n state.needDrain = false;\n stream.emit('drain');\n }\n} // if there's something in the buffer waiting, then process it", "function onwriteDrain(stream, state) {\n if (state.length === 0 && state.needDrain) {\n state.needDrain = false;\n stream.emit('drain');\n }\n} // if there's something in the buffer waiting, then process it", "function onwriteDrain(stream, state) {\n if (state.length === 0 && state.needDrain) {\n state.needDrain = false;\n stream.emit('drain');\n }\n} // if there's something in the buffer waiting, then process it", "function onwriteDrain(stream, state) {\n if (state.length === 0 && state.needDrain) {\n state.needDrain = false;\n stream.emit('drain');\n }\n} // if there's something in the buffer waiting, then process it", "function onwriteDrain(stream, state) {\n if (state.length === 0 && state.needDrain) {\n state.needDrain = false;\n stream.emit('drain');\n }\n} // if there's something in the buffer waiting, then process it", "function onwriteDrain(stream, state) {\n if (state.length === 0 && state.needDrain) {\n state.needDrain = false;\n stream.emit('drain');\n }\n} // if there's something in the buffer waiting, then process it", "function onwriteDrain(stream, state) {\n if (state.length === 0 && state.needDrain) {\n state.needDrain = false;\n stream.emit('drain');\n }\n} // if there's something in the buffer waiting, then process it", "function onwriteDrain(stream, state) {\n if (state.length === 0 && state.needDrain) {\n state.needDrain = false;\n stream.emit('drain');\n }\n} // if there's something in the buffer waiting, then process it", "function onwriteDrain(stream, state) {\n if (state.length === 0 && state.needDrain) {\n state.needDrain = false;\n stream.emit('drain');\n }\n} // if there's something in the buffer waiting, then process it", "function onwriteDrain(stream, state) {\n if (state.length === 0 && state.needDrain) {\n state.needDrain = false;\n stream.emit('drain');\n }\n} // if there's something in the buffer waiting, then process it", "function onwriteDrain(stream, state) {\n if (state.length === 0 && state.needDrain) {\n state.needDrain = false;\n stream.emit('drain');\n }\n} // if there's something in the buffer waiting, then process it", "function onwriteDrain(stream, state) {\n if (state.length === 0 && state.needDrain) {\n state.needDrain = false;\n stream.emit('drain');\n }\n} // if there's something in the buffer waiting, then process it", "function onwriteDrain(stream, state) {\n if (state.length === 0 && state.needDrain) {\n state.needDrain = false;\n stream.emit('drain');\n }\n} // if there's something in the buffer waiting, then process it", "function onwriteDrain(stream, state) {\n if (state.length === 0 && state.needDrain) {\n state.needDrain = false;\n stream.emit('drain');\n }\n} // if there's something in the buffer waiting, then process it", "function onwriteDrain(stream, state) {\n if (state.length === 0 && state.needDrain) {\n state.needDrain = false;\n stream.emit('drain');\n }\n} // if there's something in the buffer waiting, then process it", "function onwriteDrain(stream, state) {\n if (state.length === 0 && state.needDrain) {\n state.needDrain = false;\n stream.emit('drain');\n }\n} // if there's something in the buffer waiting, then process it", "function onwriteDrain(stream, state) {\n if (state.length === 0 && state.needDrain) {\n state.needDrain = false;\n stream.emit('drain');\n }\n} // if there's something in the buffer waiting, then process it", "function onwriteDrain(stream, state) {\n if (state.length === 0 && state.needDrain) {\n state.needDrain = false;\n stream.emit('drain');\n }\n} // if there's something in the buffer waiting, then process it", "function onwriteDrain(stream, state) {\n if (state.length === 0 && state.needDrain) {\n state.needDrain = false;\n stream.emit('drain');\n }\n} // if there's something in the buffer waiting, then process it", "function onwriteDrain(stream, state) {\n if (state.length === 0 && state.needDrain) {\n state.needDrain = false;\n stream.emit('drain');\n }\n} // if there's something in the buffer waiting, then process it", "function onwriteDrain(stream, state) {\n if (state.length === 0 && state.needDrain) {\n state.needDrain = false;\n stream.emit('drain');\n }\n} // if there's something in the buffer waiting, then process it", "function onwriteDrain(stream, state) {\n if (state.length === 0 && state.needDrain) {\n state.needDrain = false;\n stream.emit('drain');\n }\n} // if there's something in the buffer waiting, then process it", "function onwriteDrain(stream, state) {\n if (state.length === 0 && state.needDrain) {\n state.needDrain = false;\n stream.emit('drain');\n }\n} // if there's something in the buffer waiting, then process it", "function onwriteDrain(stream, state) {\n if (state.length === 0 && state.needDrain) {\n state.needDrain = false;\n stream.emit('drain');\n }\n} // if there's something in the buffer waiting, then process it", "function onwriteDrain(stream, state) {\n if (state.length === 0 && state.needDrain) {\n state.needDrain = false;\n stream.emit('drain');\n }\n} // if there's something in the buffer waiting, then process it", "function onwriteDrain(stream, state) {\n if (state.length === 0 && state.needDrain) {\n state.needDrain = false;\n stream.emit('drain');\n }\n} // if there's something in the buffer waiting, then process it", "function onwriteDrain(stream, state) {\n if (state.length === 0 && state.needDrain) {\n state.needDrain = false;\n stream.emit('drain');\n }\n } // if there's something in the buffer waiting, then process it", "function check_queue_write() {\n\tif (intf.intf.queue_write.length < 1) {\n\t\tintf.intf.writing = false;\n\t\treturn false;\n\t}\n\n\tintf.intf.writing = true;\n\treturn true;\n}", "function onwriteDrain$1(stream, state) {\n\t if (state.length === 0 && state.needDrain) {\n\t state.needDrain = false;\n\t stream.emit('drain');\n\t }\n\t} // if there's something in the buffer waiting, then process it", "function onwriteDrain(stream,state){if(state.length===0&&state.needDrain){state.needDrain=false;stream.emit(\"drain\")}}", "function write() {\n\t// Bail if the write queue is invalid\n\tif (!check_queue_write()) return;\n\n\t// Create message from buffer\n\tlet buffer = proto.proto.create(intf.intf.queue_write[intf.intf.queue_write.length - 1]);\n\n\tif (typeof buffer === 'undefined' || buffer === null || buffer === '') return;\n\n\tintf.intf.port.write(buffer, (error) => {\n\t\t// Bail and retry if there was a write error\n\t\tif (error) {\n\t\t\terror_out('writing', error);\n\n\t\t\t// Re-kick it\n\t\t\tsetImmediate(write);\n\n\t\t\treturn;\n\t\t}\n\n\t\tintf.intf.port.drain(() => {\n\t\t\t// After a successful write and drain, remove the last element from the write queue\n\t\t\tintf.intf.queue_write.pop();\n\n\t\t\t// Re-kick it\n\t\t\t// setImmediate(write);\n\t\t\tprocess.nextTick(write);\n\t\t});\n\t});\n}", "function onwriteDrain(stream, state) {\n if (state.length === 0 && state.needDrain) {\n state.needDrain = false;\n stream.emit('drain');\n }\n }", "async _write() {\n if (this._writing) return;\n\n // Loop because items may get pushed onto queue while we're writing\n while (this._queue) {\n let q = this._queue;\n const {resolve, reject} = q;\n delete this._queue;\n this._writing = true;\n try {\n // Slice to most recent CLEAR action\n const clearIndex = q.reduce ((a, b, i) => b[0] === CLEAR ? i : a, -1);\n if (clearIndex >= 0) q = q.slice(clearIndex + 1);\n\n // Compose JSON to write\n const json = q.map(action => JSON.stringify(action)).join('\\n');\n\n if (clearIndex >= 0) {\n // If CLEAR, start with new file\n this._nBytes = 0;\n if (!json) {\n await fs.unlink(this.filepath);\n } else {\n const tmpFile = `${this.filepath}.tmp`;\n await fs.writeFile(tmpFile, json + '\\n');\n await fs.rename(tmpFile, this.filepath);\n }\n } else if (json) {\n await fs.appendFile(this.filepath, json + '\\n');\n }\n\n this._nBytes += json.length;\n resolve();\n } catch (err) {\n if (err.code == 'ENOENT') {\n // unlinking non-existent file is okay\n resolve(err);\n } else {\n reject(err);\n }\n } finally {\n this._writing = false;\n }\n }\n }", "function onwriteDrain(stream, state) {\n if (state.length === 0 && state.needDrain) {\n state.needDrain = false;\n stream.emit('drain');\n }\n }", "function onwriteDrain(stream, state) {\n if (state.length === 0 && state.needDrain) {\n state.needDrain = false;\n stream.emit('drain');\n }\n }", "function onwriteDrain(stream, state) {\n if (state.length === 0 && state.needDrain) {\n state.needDrain = false;\n stream.emit('drain');\n }\n }", "function onwriteDrain(stream, state) {\n if (state.length === 0 && state.needDrain) {\n state.needDrain = false;\n stream.emit('drain');\n }\n }", "function onwriteDrain(stream, state) {\n\t if (state.length === 0 && state.needDrain) {\n\t state.needDrain = false;\n\t stream.emit('drain');\n\t }\n\t}", "function onwriteDrain(stream, state) {\n\t if (state.length === 0 && state.needDrain) {\n\t state.needDrain = false;\n\t stream.emit('drain');\n\t }\n\t}", "function onwriteDrain(stream, state) {\n\t if (state.length === 0 && state.needDrain) {\n\t state.needDrain = false;\n\t stream.emit('drain');\n\t }\n\t}", "function onwriteDrain(stream, state) {\n\t if (state.length === 0 && state.needDrain) {\n\t state.needDrain = false;\n\t stream.emit('drain');\n\t }\n\t}", "function onwriteDrain(stream, state) {\n\t if (state.length === 0 && state.needDrain) {\n\t state.needDrain = false;\n\t stream.emit('drain');\n\t }\n\t}", "function onwriteDrain(stream, state) {\n\t if (state.length === 0 && state.needDrain) {\n\t state.needDrain = false;\n\t stream.emit('drain');\n\t }\n\t}", "function onwriteDrain(stream, state) {\n\t if (state.length === 0 && state.needDrain) {\n\t state.needDrain = false;\n\t stream.emit('drain');\n\t }\n\t}", "function onwriteDrain(stream, state) {\n\t if (state.length === 0 && state.needDrain) {\n\t state.needDrain = false;\n\t stream.emit('drain');\n\t }\n\t}", "function onwriteDrain(stream, state) {\n\t if (state.length === 0 && state.needDrain) {\n\t state.needDrain = false;\n\t stream.emit('drain');\n\t }\n\t}", "function onwriteDrain(stream, state) {\n\t if (state.length === 0 && state.needDrain) {\n\t state.needDrain = false;\n\t stream.emit('drain');\n\t }\n\t}", "function onwriteDrain(stream, state) {\n\t if (state.length === 0 && state.needDrain) {\n\t state.needDrain = false;\n\t stream.emit('drain');\n\t }\n\t}", "function onwriteDrain(stream, state) {\n\t if (state.length === 0 && state.needDrain) {\n\t state.needDrain = false;\n\t stream.emit('drain');\n\t }\n\t}", "function onwriteDrain(stream, state) {\n\t if (state.length === 0 && state.needDrain) {\n\t state.needDrain = false;\n\t stream.emit('drain');\n\t }\n\t}", "function onwriteDrain(stream, state) {\n\t if (state.length === 0 && state.needDrain) {\n\t state.needDrain = false;\n\t stream.emit('drain');\n\t }\n\t}", "function onwriteDrain(stream, state) {\n\t if (state.length === 0 && state.needDrain) {\n\t state.needDrain = false;\n\t stream.emit('drain');\n\t }\n\t}", "function onwriteDrain(stream, state) {\n\t if (state.length === 0 && state.needDrain) {\n\t state.needDrain = false;\n\t stream.emit('drain');\n\t }\n\t}", "function onwriteDrain(stream, state) {\n\t if (state.length === 0 && state.needDrain) {\n\t state.needDrain = false;\n\t stream.emit('drain');\n\t }\n\t}", "function onwriteDrain(stream, state) {\n\t if (state.length === 0 && state.needDrain) {\n\t state.needDrain = false;\n\t stream.emit('drain');\n\t }\n\t}", "function onwriteDrain(stream, state) {\n\t if (state.length === 0 && state.needDrain) {\n\t state.needDrain = false;\n\t stream.emit('drain');\n\t }\n\t}", "function onwriteDrain(stream, state) {\n\t if (state.length === 0 && state.needDrain) {\n\t state.needDrain = false;\n\t stream.emit('drain');\n\t }\n\t}", "function onwriteDrain(stream, state) {\n\t if (state.length === 0 && state.needDrain) {\n\t state.needDrain = false;\n\t stream.emit('drain');\n\t }\n\t}", "function onwriteDrain(stream, state) {\n\t if (state.length === 0 && state.needDrain) {\n\t state.needDrain = false;\n\t stream.emit('drain');\n\t }\n\t}", "function onwriteDrain(stream, state) {\n\t if (state.length === 0 && state.needDrain) {\n\t state.needDrain = false;\n\t stream.emit('drain');\n\t }\n\t}" ]
[ "0.71454906", "0.71454906", "0.71454906", "0.71454906", "0.6974588", "0.69533527", "0.6890944", "0.6890944", "0.6890944", "0.6890944", "0.6890944", "0.6890944", "0.6890944", "0.6890944", "0.6890944", "0.6890944", "0.6890944", "0.6890944", "0.6890944", "0.6890944", "0.6890944", "0.6890944", "0.6890944", "0.6890944", "0.6890944", "0.6890944", "0.6890944", "0.6890944", "0.6890944", "0.6890944", "0.6890944", "0.6890944", "0.6890944", "0.6890944", "0.6890944", "0.6890944", "0.6890944", "0.6890944", "0.6890944", "0.6890944", "0.6890944", "0.6890944", "0.6890944", "0.6890944", "0.6890944", "0.6890944", "0.6890944", "0.6890944", "0.6890944", "0.6890944", "0.6890944", "0.6890944", "0.6890944", "0.6890944", "0.6890944", "0.6890944", "0.6890944", "0.6890944", "0.6890944", "0.6890944", "0.6890944", "0.6890944", "0.6890944", "0.6890944", "0.6890944", "0.6890944", "0.6890944", "0.6879352", "0.6795383", "0.67328125", "0.6432691", "0.6353226", "0.6175913", "0.61488473", "0.6148082", "0.61463255", "0.61463255", "0.61392176", "0.61172396", "0.61172396", "0.61172396", "0.61172396", "0.61172396", "0.61172396", "0.61172396", "0.61172396", "0.61172396", "0.61172396", "0.61172396", "0.61172396", "0.61172396", "0.61172396", "0.61172396", "0.61172396", "0.61172396", "0.61172396", "0.61172396", "0.61172396", "0.61172396", "0.61172396", "0.61172396" ]
0.0
-1
Must force callback to be called on nextTick, so that we don't emit 'drain' before the write() consumer gets the 'false' return value, and has a chance to attach a 'drain' listener.
function onwriteDrain(stream, state) { if (state.length === 0 && state.needDrain) { state.needDrain = false; stream.emit('drain'); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function onwriteDrain(stream,state){if(state.length===0&&state.needDrain){state.needDrain=false;stream.emit(\"drain\")}}", "onDrain() {\n this.writeBuffer.splice(0, this.prevBufferLen); // setting prevBufferLen = 0 is very important\n // for example, when upgrading, upgrade packet is sent over,\n // and a nonzero prevBufferLen could cause problems on `drain`\n\n this.prevBufferLen = 0;\n\n if (0 === this.writeBuffer.length) {\n this.emit(\"drain\");\n } else {\n this.flush();\n }\n }", "function onwriteDrain(stream,state){if(state.length===0&&state.needDrain){state.needDrain=false;stream.emit('drain');}}// if there's something in the buffer waiting, then process it", "function onwriteDrain(stream,state){if(state.length===0&&state.needDrain){state.needDrain=false;stream.emit('drain');}}// if there's something in the buffer waiting, then process it", "function onwriteDrain(stream,state){if(state.length===0&&state.needDrain){state.needDrain=false;stream.emit('drain');}}// if there's something in the buffer waiting, then process it", "function onwriteDrain(stream,state){if(state.length===0&&state.needDrain){state.needDrain=false;stream.emit('drain');}}// if there's something in the buffer waiting, then process it", "function $KNil$var$onwriteDrain(stream, state) {\n if (state.length === 0 && state.needDrain) {\n state.needDrain = false;\n stream.emit('drain');\n }\n} // if there's something in the buffer waiting, then process it", "onDrain() {\n this.writeBuffer.splice(0, this.prevBufferLen);\n\n // setting prevBufferLen = 0 is very important\n // for example, when upgrading, upgrade packet is sent over,\n // and a nonzero prevBufferLen could cause problems on `drain`\n this.prevBufferLen = 0;\n\n if (0 === this.writeBuffer.length) {\n this.emit(\"drain\");\n } else {\n this.flush();\n }\n }", "onDrain() {\n this.writeBuffer.splice(0, this.prevBufferLen);\n\n // setting prevBufferLen = 0 is very important\n // for example, when upgrading, upgrade packet is sent over,\n // and a nonzero prevBufferLen could cause problems on `drain`\n this.prevBufferLen = 0;\n\n if (0 === this.writeBuffer.length) {\n this.emit(\"drain\");\n } else {\n this.flush();\n }\n }", "function $rtWY$var$onwriteDrain(stream, state) {\n if (state.length === 0 && state.needDrain) {\n state.needDrain = false;\n stream.emit('drain');\n }\n} // if there's something in the buffer waiting, then process it", "function onwriteDrain(stream, state) {\n if (state.length === 0 && state.needDrain) {\n state.needDrain = false;\n stream.emit('drain');\n }\n} // if there's something in the buffer waiting, then process it", "function onwriteDrain(stream, state) {\n if (state.length === 0 && state.needDrain) {\n state.needDrain = false;\n stream.emit('drain');\n }\n} // if there's something in the buffer waiting, then process it", "function onwriteDrain(stream, state) {\n if (state.length === 0 && state.needDrain) {\n state.needDrain = false;\n stream.emit('drain');\n }\n} // if there's something in the buffer waiting, then process it", "function onwriteDrain(stream, state) {\n if (state.length === 0 && state.needDrain) {\n state.needDrain = false;\n stream.emit('drain');\n }\n} // if there's something in the buffer waiting, then process it", "function onwriteDrain(stream, state) {\n if (state.length === 0 && state.needDrain) {\n state.needDrain = false;\n stream.emit('drain');\n }\n} // if there's something in the buffer waiting, then process it", "function onwriteDrain(stream, state) {\n if (state.length === 0 && state.needDrain) {\n state.needDrain = false;\n stream.emit('drain');\n }\n} // if there's something in the buffer waiting, then process it", "function onwriteDrain(stream, state) {\n if (state.length === 0 && state.needDrain) {\n state.needDrain = false;\n stream.emit('drain');\n }\n} // if there's something in the buffer waiting, then process it", "function onwriteDrain(stream, state) {\n if (state.length === 0 && state.needDrain) {\n state.needDrain = false;\n stream.emit('drain');\n }\n} // if there's something in the buffer waiting, then process it", "function onwriteDrain(stream, state) {\n if (state.length === 0 && state.needDrain) {\n state.needDrain = false;\n stream.emit('drain');\n }\n} // if there's something in the buffer waiting, then process it", "function onwriteDrain(stream, state) {\n if (state.length === 0 && state.needDrain) {\n state.needDrain = false;\n stream.emit('drain');\n }\n} // if there's something in the buffer waiting, then process it", "function onwriteDrain(stream, state) {\n if (state.length === 0 && state.needDrain) {\n state.needDrain = false;\n stream.emit('drain');\n }\n} // if there's something in the buffer waiting, then process it", "function onwriteDrain(stream, state) {\n if (state.length === 0 && state.needDrain) {\n state.needDrain = false;\n stream.emit('drain');\n }\n} // if there's something in the buffer waiting, then process it", "function onwriteDrain(stream, state) {\n if (state.length === 0 && state.needDrain) {\n state.needDrain = false;\n stream.emit('drain');\n }\n} // if there's something in the buffer waiting, then process it", "function onwriteDrain(stream, state) {\n if (state.length === 0 && state.needDrain) {\n state.needDrain = false;\n stream.emit('drain');\n }\n} // if there's something in the buffer waiting, then process it", "function onwriteDrain(stream, state) {\n if (state.length === 0 && state.needDrain) {\n state.needDrain = false;\n stream.emit('drain');\n }\n} // if there's something in the buffer waiting, then process it", "function onwriteDrain(stream, state) {\n if (state.length === 0 && state.needDrain) {\n state.needDrain = false;\n stream.emit('drain');\n }\n} // if there's something in the buffer waiting, then process it", "function onwriteDrain(stream, state) {\n if (state.length === 0 && state.needDrain) {\n state.needDrain = false;\n stream.emit('drain');\n }\n} // if there's something in the buffer waiting, then process it", "function onwriteDrain(stream, state) {\n if (state.length === 0 && state.needDrain) {\n state.needDrain = false;\n stream.emit('drain');\n }\n} // if there's something in the buffer waiting, then process it", "function onwriteDrain(stream, state) {\n if (state.length === 0 && state.needDrain) {\n state.needDrain = false;\n stream.emit('drain');\n }\n} // if there's something in the buffer waiting, then process it", "function onwriteDrain(stream, state) {\n if (state.length === 0 && state.needDrain) {\n state.needDrain = false;\n stream.emit('drain');\n }\n} // if there's something in the buffer waiting, then process it", "function onwriteDrain(stream, state) {\n if (state.length === 0 && state.needDrain) {\n state.needDrain = false;\n stream.emit('drain');\n }\n} // if there's something in the buffer waiting, then process it", "function onwriteDrain(stream, state) {\n if (state.length === 0 && state.needDrain) {\n state.needDrain = false;\n stream.emit('drain');\n }\n} // if there's something in the buffer waiting, then process it", "function onwriteDrain(stream, state) {\n if (state.length === 0 && state.needDrain) {\n state.needDrain = false;\n stream.emit('drain');\n }\n} // if there's something in the buffer waiting, then process it", "function onwriteDrain(stream, state) {\n if (state.length === 0 && state.needDrain) {\n state.needDrain = false;\n stream.emit('drain');\n }\n} // if there's something in the buffer waiting, then process it", "function onwriteDrain(stream, state) {\n if (state.length === 0 && state.needDrain) {\n state.needDrain = false;\n stream.emit('drain');\n }\n} // if there's something in the buffer waiting, then process it", "function onwriteDrain(stream, state) {\n if (state.length === 0 && state.needDrain) {\n state.needDrain = false;\n stream.emit('drain');\n }\n} // if there's something in the buffer waiting, then process it", "function onwriteDrain(stream, state) {\n if (state.length === 0 && state.needDrain) {\n state.needDrain = false;\n stream.emit('drain');\n }\n} // if there's something in the buffer waiting, then process it", "function onwriteDrain(stream, state) {\n if (state.length === 0 && state.needDrain) {\n state.needDrain = false;\n stream.emit('drain');\n }\n} // if there's something in the buffer waiting, then process it", "function onwriteDrain(stream, state) {\n if (state.length === 0 && state.needDrain) {\n state.needDrain = false;\n stream.emit('drain');\n }\n} // if there's something in the buffer waiting, then process it", "function onwriteDrain(stream, state) {\n if (state.length === 0 && state.needDrain) {\n state.needDrain = false;\n stream.emit('drain');\n }\n} // if there's something in the buffer waiting, then process it", "function onwriteDrain(stream, state) {\n if (state.length === 0 && state.needDrain) {\n state.needDrain = false;\n stream.emit('drain');\n }\n} // if there's something in the buffer waiting, then process it", "function onwriteDrain(stream, state) {\n if (state.length === 0 && state.needDrain) {\n state.needDrain = false;\n stream.emit('drain');\n }\n} // if there's something in the buffer waiting, then process it", "function onwriteDrain(stream, state) {\n if (state.length === 0 && state.needDrain) {\n state.needDrain = false;\n stream.emit('drain');\n }\n} // if there's something in the buffer waiting, then process it", "function onwriteDrain(stream, state) {\n if (state.length === 0 && state.needDrain) {\n state.needDrain = false;\n stream.emit('drain');\n }\n} // if there's something in the buffer waiting, then process it", "function onwriteDrain(stream, state) {\n if (state.length === 0 && state.needDrain) {\n state.needDrain = false;\n stream.emit('drain');\n }\n} // if there's something in the buffer waiting, then process it", "function onwriteDrain(stream, state) {\n if (state.length === 0 && state.needDrain) {\n state.needDrain = false;\n stream.emit('drain');\n }\n} // if there's something in the buffer waiting, then process it", "function onwriteDrain(stream, state) {\n if (state.length === 0 && state.needDrain) {\n state.needDrain = false;\n stream.emit('drain');\n }\n} // if there's something in the buffer waiting, then process it", "function onwriteDrain(stream, state) {\n if (state.length === 0 && state.needDrain) {\n state.needDrain = false;\n stream.emit('drain');\n }\n} // if there's something in the buffer waiting, then process it", "function onwriteDrain(stream, state) {\n if (state.length === 0 && state.needDrain) {\n state.needDrain = false;\n stream.emit('drain');\n }\n} // if there's something in the buffer waiting, then process it", "function onwriteDrain(stream, state) {\n if (state.length === 0 && state.needDrain) {\n state.needDrain = false;\n stream.emit('drain');\n }\n} // if there's something in the buffer waiting, then process it", "function onwriteDrain(stream, state) {\n if (state.length === 0 && state.needDrain) {\n state.needDrain = false;\n stream.emit('drain');\n }\n} // if there's something in the buffer waiting, then process it", "function onwriteDrain(stream, state) {\n if (state.length === 0 && state.needDrain) {\n state.needDrain = false;\n stream.emit('drain');\n }\n} // if there's something in the buffer waiting, then process it", "function onwriteDrain(stream, state) {\n if (state.length === 0 && state.needDrain) {\n state.needDrain = false;\n stream.emit('drain');\n }\n} // if there's something in the buffer waiting, then process it", "function onwriteDrain(stream, state) {\n if (state.length === 0 && state.needDrain) {\n state.needDrain = false;\n stream.emit('drain');\n }\n} // if there's something in the buffer waiting, then process it", "function onwriteDrain(stream, state) {\n if (state.length === 0 && state.needDrain) {\n state.needDrain = false;\n stream.emit('drain');\n }\n} // if there's something in the buffer waiting, then process it", "function onwriteDrain(stream, state) {\n if (state.length === 0 && state.needDrain) {\n state.needDrain = false;\n stream.emit('drain');\n }\n} // if there's something in the buffer waiting, then process it", "function onwriteDrain(stream, state) {\n if (state.length === 0 && state.needDrain) {\n state.needDrain = false;\n stream.emit('drain');\n }\n} // if there's something in the buffer waiting, then process it", "function onwriteDrain(stream, state) {\n if (state.length === 0 && state.needDrain) {\n state.needDrain = false;\n stream.emit('drain');\n }\n} // if there's something in the buffer waiting, then process it", "function onwriteDrain(stream, state) {\n if (state.length === 0 && state.needDrain) {\n state.needDrain = false;\n stream.emit('drain');\n }\n} // if there's something in the buffer waiting, then process it", "function onwriteDrain(stream, state) {\n if (state.length === 0 && state.needDrain) {\n state.needDrain = false;\n stream.emit('drain');\n }\n} // if there's something in the buffer waiting, then process it", "function onwriteDrain(stream, state) {\n if (state.length === 0 && state.needDrain) {\n state.needDrain = false;\n stream.emit('drain');\n }\n} // if there's something in the buffer waiting, then process it", "function onwriteDrain(stream, state) {\n if (state.length === 0 && state.needDrain) {\n state.needDrain = false;\n stream.emit('drain');\n }\n} // if there's something in the buffer waiting, then process it", "function onwriteDrain(stream, state) {\n if (state.length === 0 && state.needDrain) {\n state.needDrain = false;\n stream.emit('drain');\n }\n} // if there's something in the buffer waiting, then process it", "function onwriteDrain(stream, state) {\n if (state.length === 0 && state.needDrain) {\n state.needDrain = false;\n stream.emit('drain');\n }\n} // if there's something in the buffer waiting, then process it", "function onwriteDrain(stream, state) {\n if (state.length === 0 && state.needDrain) {\n state.needDrain = false;\n stream.emit('drain');\n }\n} // if there's something in the buffer waiting, then process it", "function onwriteDrain(stream, state) {\n if (state.length === 0 && state.needDrain) {\n state.needDrain = false;\n stream.emit('drain');\n }\n} // if there's something in the buffer waiting, then process it", "function onwriteDrain(stream, state) {\n if (state.length === 0 && state.needDrain) {\n state.needDrain = false;\n stream.emit('drain');\n }\n} // if there's something in the buffer waiting, then process it", "function onwriteDrain(stream, state) {\n if (state.length === 0 && state.needDrain) {\n state.needDrain = false;\n stream.emit('drain');\n }\n} // if there's something in the buffer waiting, then process it", "function onwriteDrain(stream, state) {\n if (state.length === 0 && state.needDrain) {\n state.needDrain = false;\n stream.emit('drain');\n }\n} // if there's something in the buffer waiting, then process it", "function onwriteDrain(stream, state) {\n if (state.length === 0 && state.needDrain) {\n state.needDrain = false;\n stream.emit('drain');\n }\n} // if there's something in the buffer waiting, then process it", "function onwriteDrain(stream, state) {\n if (state.length === 0 && state.needDrain) {\n state.needDrain = false;\n stream.emit('drain');\n }\n} // if there's something in the buffer waiting, then process it", "onDrain() {\n this.writeBuffer.splice(0, this.prevBufferLen);\n\n // setting prevBufferLen = 0 is very important\n // for example, when upgrading, upgrade packet is sent over,\n // and a nonzero prevBufferLen could cause problems on `drain`\n this.prevBufferLen = 0;\n\n if (0 === this.writeBuffer.length) {\n this.emit(\"drain\");\n } else {\n this.flush();\n }\n }", "function drain() {\n if (!cb) return;\n if (abort) callback(abort);else if (!buffer.length && ended) callback(ended);else if (buffer.length) callback(null, buffer.shift());\n } // `callback` calls back to waiting sink,", "onDrain() {\n this.writeBuffer.splice(0, this.prevBufferLen);\n // setting prevBufferLen = 0 is very important\n // for example, when upgrading, upgrade packet is sent over,\n // and a nonzero prevBufferLen could cause problems on `drain`\n this.prevBufferLen = 0;\n if (0 === this.writeBuffer.length) {\n this.emitReserved(\"drain\");\n }\n else {\n this.flush();\n }\n }", "onDrain() {\n this.writeBuffer.splice(0, this.prevBufferLen);\n // setting prevBufferLen = 0 is very important\n // for example, when upgrading, upgrade packet is sent over,\n // and a nonzero prevBufferLen could cause problems on `drain`\n this.prevBufferLen = 0;\n if (0 === this.writeBuffer.length) {\n this.emitReserved(\"drain\");\n }\n else {\n this.flush();\n }\n }", "function onwriteDrain(stream, state) {\n if (state.length === 0 && state.needDrain) {\n state.needDrain = false;\n stream.emit('drain');\n }\n }", "function onwriteDrain(stream, state) {\n if (state.length === 0 && state.needDrain) {\n state.needDrain = false;\n stream.emit('drain');\n }\n } // if there's something in the buffer waiting, then process it", "function onwriteDrain(stream, state) {\n if (state.length === 0 && state.needDrain) {\n state.needDrain = false;\n stream.emit('drain');\n }\n }", "function onwriteDrain(stream, state) {\n if (state.length === 0 && state.needDrain) {\n state.needDrain = false;\n stream.emit('drain');\n }\n }", "function onwriteDrain$1(stream, state) {\n\t if (state.length === 0 && state.needDrain) {\n\t state.needDrain = false;\n\t stream.emit('drain');\n\t }\n\t} // if there's something in the buffer waiting, then process it" ]
[ "0.6865807", "0.68425786", "0.6840534", "0.6840534", "0.6840534", "0.6840534", "0.68187344", "0.6766642", "0.6766642", "0.6757269", "0.6720652", "0.6720652", "0.6720652", "0.6720652", "0.6720652", "0.6720652", "0.6720652", "0.6720652", "0.6720652", "0.6720652", "0.6720652", "0.6720652", "0.6720652", "0.6720652", "0.6720652", "0.6720652", "0.6720652", "0.6720652", "0.6720652", "0.6720652", "0.6720652", "0.6720652", "0.6720652", "0.6720652", "0.6720652", "0.6720652", "0.6720652", "0.6720652", "0.6720652", "0.6720652", "0.6720652", "0.6720652", "0.6720652", "0.6720652", "0.6720652", "0.6720652", "0.6720652", "0.6720652", "0.6720652", "0.6720652", "0.6720652", "0.6720652", "0.6720652", "0.6720652", "0.6720652", "0.6720652", "0.6720652", "0.6720652", "0.6720652", "0.6720652", "0.6720652", "0.6720652", "0.6720652", "0.6720652", "0.6720652", "0.6720652", "0.6720652", "0.6720652", "0.6720652", "0.6720652", "0.6720652", "0.66877633", "0.66772115", "0.6656007", "0.6656007", "0.6648094", "0.66354245", "0.66073954", "0.66073954", "0.6564184" ]
0.0
-1
if there's something in the buffer waiting, then process it
function clearBuffer(stream, state) { state.bufferProcessing = true; if (stream._writev && state.buffer.length > 1) { // Fast case, write everything using _writev() var cbs = []; for (var c = 0; c < state.buffer.length; c++) cbs.push(state.buffer[c].callback); // count the one we are adding, as well. // TODO(isaacs) clean this up state.pendingcb++; doWrite(stream, state, true, state.length, state.buffer, '', function(err) { for (var i = 0; i < cbs.length; i++) { state.pendingcb--; cbs[i](err); } }); // Clear buffer state.buffer = []; } else { // Slow case, write chunks one-by-one for (var c = 0; c < state.buffer.length; c++) { var entry = state.buffer[c]; var chunk = entry.chunk; var encoding = entry.encoding; var cb = entry.callback; var len = state.objectMode ? 1 : chunk.length; doWrite(stream, state, false, len, chunk, encoding, cb); // if we didn't call the onwrite immediately, then // it means that we need to wait until it does. // also, that means that the chunk and cb are currently // being processed, so move the buffer counter past them. if (state.writing) { c++; break; } } if (c < state.buffer.length) state.buffer = state.buffer.slice(c); else state.buffer.length = 0; } state.bufferProcessing = false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "processBuffer () {\n this.ready = true\n this._triggerBuffer()\n this.queue.waterfall(() => this.buffer.guardian)\n }", "function drainBuffer(cb) {\n if (!state.buffer.length)\n return cb()\n var done = multicb()\n var wait = false\n state.buffer.forEach(function(entry) {\n if (hasHandled(entry.depId, entry.seq)) {\n // dep has been handled, run it now\n applyMessage(entry.msg, done())\n wait = true\n }\n })\n if (!wait)\n return cb()\n done(cb)\n }", "waitForMessage_() {\n this.wait_(4, buffer => {\n this.wait_(buffer.readUInt32BE(0), buffer => {\n this.push(this.getMessage_(buffer));\n process.nextTick(() => this.waitForMessage_());\n });\n });\n }", "function wait(){}", "function handleFinished() {\n resolve(Buffer.concat(_this.buffers));\n cleanup();\n }", "processQueue_() {\n if (!this.queue_.length) return;\n const [size, callback] = this.queue_[0];\n\n if (this.getBufferSize_() < size) return;\n\n const chunk = this.consumeBuffer_(size);\n this.queue_.shift();\n callback(chunk);\n this.processQueue_();\n }", "function onwriteDrain(stream,state){if(state.length===0&&state.needDrain){state.needDrain=false;stream.emit('drain');}}// if there's something in the buffer waiting, then process it", "function onwriteDrain(stream,state){if(state.length===0&&state.needDrain){state.needDrain=false;stream.emit('drain');}}// if there's something in the buffer waiting, then process it", "function onwriteDrain(stream,state){if(state.length===0&&state.needDrain){state.needDrain=false;stream.emit('drain');}}// if there's something in the buffer waiting, then process it", "function onwriteDrain(stream,state){if(state.length===0&&state.needDrain){state.needDrain=false;stream.emit('drain');}}// if there's something in the buffer waiting, then process it", "tryPush() {\n\t\t// Get the total length of what would be pushed.\n\t\tconst amountToPush = Math.min(this.buffer.length, this.requestedSize);\n\n\t\t// Check if it's possible to push right now.\n\t\tif (this.canPush &&\n\t\t\tamountToPush > 0 &&\n\t\t\t(this.initialPass || this.finished || this.buffer.length >= this.initial)) {\n\t\t\tthis.initialPass = true;\n\n\t\t\t// Push the data.\n\t\t\tthis.requestedSize = -1;\n\t\t\tthis.canPush = this.push(Buffer.from(this.buffer.shift(amountToPush)));\n\t\t}\n\n\t\t// Append part of the waiting chunk if possible.\n\t\tif (this.waiting) {\n\t\t\tconst chunk = this.waiting.chunk;\n\t\t\tconst callback = this.waiting.callback;\n\n\t\t\t// Append the data to the buffer.\n\t\t\tconst toPush = Math.min(this.buffer.remaining, chunk.length);\n\t\t\tthis.buffer.push(chunk.slice(0, toPush));\n\n\t\t\t// Adjust the waiting chunk.\n\t\t\tthis.waiting.chunk = chunk.slice(toPush);\n\n\t\t\t// If the waiting chunk is gone, callback and reset.\n\t\t\tif (this.waiting.chunk.length == 0) {\n\t\t\t\tthis.waiting = null;\n\t\t\t\tcallback();\n\t\t\t}\n\n\t\t\t// Try pushing.\n\t\t\tif (toPush > 0) this.tryPush();\n\t\t}\n\t}", "function maybeFinish() {\n if (waiting) return;\n callback();\n }", "function Process_Recvq() {\n\tif (this.queue.length == 0)\n\t\treturn 1;\n\tvar timediff = system.timer - this.time_marker;\n\tif (timediff >= 2) {\n\t\tthis.num_sent = 0;\n\t\tthis.time_marker = system.timer;\n\t}\n\tif (this.throttled) {\n\t\tif (timediff < 2)\n\t\t\treturn 1;\n\t} else if ((timediff <= 2) && (this.num_sent >= 4)) {\n\t\tthis.throttled = true;\n\t\tthis.time_marker = system.timer;\n\t\tjs.setTimeout(Recvq_Unthrottle, 2000, this);\n\t\treturn 1;\n\t}\n\tthis.irc.work(this.queue.shift());\n\tthis.num_sent++;\n\tif (this.queue.length > 0) {\n\t\tjs.setImmediate(Process_Recvq, this);\n\t}\n\treturn 0;\n}", "function drain() {\n if (!cb) return;\n if (abort) callback(abort);else if (!buffer.length && ended) callback(ended);else if (buffer.length) callback(null, buffer.shift());\n } // `callback` calls back to waiting sink,", "function $rtWY$var$onwriteDrain(stream, state) {\n if (state.length === 0 && state.needDrain) {\n state.needDrain = false;\n stream.emit('drain');\n }\n} // if there's something in the buffer waiting, then process it", "function handler(buffer) {\n let chunks = buffer.toString().split(\"\\n\");\n\n for (let chunk of chunks) {\n chunk = chunk.replace(/(\\r\\n|\\n|\\r)/gm, \"\").trim();\n\n if (chunk == \"OK\") {\n // if end of message stop listner and return result\n this.removeListener(\"data\", handler);\n resolve(answer);\n\n // if line is busy or another but not error\n } else if (chunk == \"BUSY\" || chunk == \"NO DIAL TONE\" || chunk == \"NO CARRIER\") {\n resolve();\n\n } else if (chunk == \"ERROR\") {\n this.removeListener(\"data\", handler);\n reject(`ERROR result on command - ${command}. Answer - ${chunk}`);\n\n } else {\n // if message is not fully get add to result this chunk\n answer += chunk;\n };\n };\n }", "function Wait_IsWaiting()\n{\n\t//check the counter\n\treturn this.cCounter > 0;\n}", "function drain () {\n if (!cb) return\n\n if (abort) callback(abort)\n else if (!buffer.length && ended) callback(ended)\n else if (buffer.length) callback(null, buffer.shift())\n }", "function drain () {\n if (!cb) return\n\n if (abort) callback(abort)\n else if (!buffer.length && ended) callback(ended)\n else if (buffer.length) callback(null, buffer.shift())\n }", "function drain () {\n if (!cb) return\n\n if (abort) callback(abort)\n else if (!buffer.length && ended) callback(ended)\n else if (buffer.length) callback(null, buffer.shift())\n }", "function drain () {\n if (!cb) return\n\n if (abort) callback(abort)\n else if (!buffer.length && ended) callback(ended)\n else if (buffer.length) callback(null, buffer.shift())\n }", "function drain () {\n if (!cb) return\n\n if (abort) callback(abort)\n else if (!buffer.length && ended) callback(ended)\n else if (buffer.length) callback(null, buffer.shift())\n }", "function pollLineStuff() {\n\n var bufsz = 97, // maximum line length\n bufptr = 0x8046, // start at LINBF\n thrufl = 0x81de, // line input done flag\n len = 0;\n\n if (ccemu.rd(thrufl) === 0) { // buffer is in accepting state\n // leading zero\n ccemu.wr(bufptr, 0x00);\n // stuff until we run out message, or hit a carriage return,\n // or the buffer size limit\n while ((len < bufsz) &&\n (offset < text.length) &&\n (nextCharCode() !== 0x0D)\n ) {\n ccemu.wr(bufptr + 1 + len, nextCharCode());\n offset++; // skip carriage returns between lines\n len++;\n }\n // trailing zero\n ccemu.wr(bufptr + 1 + len, 0x00);\n // set THRUFL to indicate the line is complete\n ccemu.wr(thrufl, 0x0D);\n // check why we ended\n if ((len === bufsz) &&\n (offset < text.length) &&\n (nextCharCode() !== 0x0D)) {\n alert('Input line was too long and got split\\r\\n' +\n '(max length is ' + bufsz + ' characters)');\n }\n if (nextCharCode() === 0x0D) {\n offset++; // skip carriage returns between lines\n }\n if (offset === text.length) {\n offset = -1; // signal that we are done\n }\n }\n }", "function _checkBuffer(inst)\n{\n /* We need to have some kind of EOM signal to know when the ROV server\n * finished responding to a command. For now, we use \"<EOM>\" as a signal.\n */\n if (inst.buffer.indexOf(\"<EOM>\") != -1) {\n var first = inst.buffer.indexOf(\"<BOM>\");\n var last = inst.buffer.indexOf(\"<EOM>\");\n /* There should be <BOM> at the beginning and <EOM> at the end. If\n * something went wrong, we'll dump the buffer to the log file and\n * shutdown the ROV server.\n */\n if (first == -1 || first > last) {\n logger.info(\"ROV Module: invalid buffer content: \" + inst.buffer);\n _exit(inst);\n return (null);\n }\n var message = inst.buffer.slice(first + 5, last);\n inst.buffer = inst.buffer.substr(last + 5);\n return (message);\n }\n\n return (null);\n}", "function processBuffer(self) {\n var messages = self.buffer.split('\\n');\n self.buffer = \"\";\n _.each(messages, function(message){\n if (message.length > 0) {\n var parsed = JSON.parse(message);\n processMessage(self, parsed);\n }\n });\n}", "function waiting(){\n if(waitingFlag == true){\n setTimeout(waiting, 100);\n }\n else\n {\n }\n }", "function processQueue(cb){\n\n}", "function processQueue() {\n emptyQueue = true;\n drainQueue(true);\n }", "function insufficientBuffer(){\n\t\t\t\tif((videoPlayer.buffered.end(0) - videoPlayer.currentTime) < 20){\n\t\t\t\t\tconsole.log(\"need more buffer\");\n\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\treturn false;\n\t\t\t}", "function pollKeyStuff() {\n var thrufl = 0x81de; // line input done flag\n\n var ch = nextChar();\n if (phase < 0) {\n phase++;\n } else if ((phase === 0) &&\n (ccemu.rd(thrufl) === 0)) { // buffer accepting input\n keybrd.asciiKey(ch); // set it\n phase = 1;\n } else if (phase === 1) {\n keybrd.asciiKey(); // clear it\n // heuristic: delay to allow for line processing\n phase = (ch === '\\r') ? -key_at_a_time_eol_delay : 0;\n offset++;\n if (offset >= text.length) {\n phase = 0;\n offset = -1; // signal that we are done\n }\n }\n }", "function drainBuffer () {\n draining = true;\n\n return co(function* () {\n while (buffer.length >= bufferSize || (lastCallback && buffer.length > 0)) {\n const packet = yield getPacket();\n const res = onPacket(packet);\n if (res instanceof Promise) {\n yield res;\n }\n }\n\n draining = false;\n });\n }", "async triggerOutgoingHandler(buffer) {\n const bufferLength = buffer.size;\n this.executingOutgoingHandlers++;\n this.offset += bufferLength;\n try {\n await this.outgoingHandler(() => buffer.getReadableStream(), bufferLength, this.offset - bufferLength);\n }\n catch (err) {\n this.emitter.emit(\"error\", err);\n return;\n }\n this.executingOutgoingHandlers--;\n this.reuseBuffer(buffer);\n this.emitter.emit(\"checkEnd\");\n }", "async triggerOutgoingHandler(buffer) {\n const bufferLength = buffer.size;\n this.executingOutgoingHandlers++;\n this.offset += bufferLength;\n try {\n await this.outgoingHandler(() => buffer.getReadableStream(), bufferLength, this.offset - bufferLength);\n }\n catch (err) {\n this.emitter.emit(\"error\", err);\n return;\n }\n this.executingOutgoingHandlers--;\n this.reuseBuffer(buffer);\n this.emitter.emit(\"checkEnd\");\n }", "async readWait(length)\n {\n // Create buffer\n let buf = Buffer.alloc(length);\n let received = 0;\n\n while (received < length)\n {\n if (this.receivedBuffers.length > 0)\n {\n let src = this.receivedBuffers[0]\n if (src.length > length - received)\n {\n // Use part of the buffer...\n\n // Copy out the bit we want\n src.copy(buf, received, 0, length - received);\n\n // Split the buffer to extract the part we need\n let subBuf = Buffer.alloc(src.length - (length - received));\n src.copy(subBuf, 0, length - received, length - received + subBuf.length);\n this.receivedBuffers.shift();\n this.receivedBuffers.unshift(subBuf);\n\n // Finished\n received = length;\n }\n else\n {\n // Use the entire buffer\n src.copy(buf, received);\n received += this.receivedBuffers.shift().length;\n }\n }\n else\n {\n // Wait for more data\n await new Promise((resolve, reject) => {\n this.waiter = resolve;\n });\n this.waiter = null;\n }\n }\n return buf;\n }", "function $KNil$var$onwriteDrain(stream, state) {\n if (state.length === 0 && state.needDrain) {\n state.needDrain = false;\n stream.emit('drain');\n }\n} // if there's something in the buffer waiting, then process it", "_continueProcessing() {\n if (this._closed) {\n this.close();\n } else {\n setTimeout(() => this._processMessages(), 100);\n }\n }", "_continueProcessing() {\n if (this._closed) {\n this.close();\n } else {\n setTimeout(() => this._processMessages(), 100);\n }\n }", "_continueProcessing() {\n if (this._closed) {\n this.close();\n } else {\n setTimeout(() => this._processMessages(), 100);\n }\n }", "function eventBuffer() {\n clearTimer();\n setInput(event);\n\n buffer = true;\n timer = window.setTimeout(function () {\n buffer = false;\n }, 650);\n }", "function eventBuffer() {\n clearTimer();\n setInput(event);\n\n buffer = true;\n timer = window.setTimeout(function() {\n buffer = false;\n }, 650);\n }", "function waitCallback() {\n\tvar waitTime = Math.random() * 2 * AVERAGE_WAIT_TIME;\n\tif(waitTime < 1000) {\n\t\twaittime = 1000;\n\t}\n\tsetTimeout(process, waitTime);\n}", "_processQueue() {\n // eslint-disable-next-line no-empty\n while (this._tryToStartAnother()) {}\n }", "_processQueue() {\n // eslint-disable-next-line no-empty\n while (this._tryToStartAnother()) { }\n }", "_processQueue() {\n // eslint-disable-next-line no-empty\n while (this._tryToStartAnother()) { }\n }", "function isProcessing() {\n\t\treturn waitingOnInput || (codec && codec.processing);\n\t}", "function processQueue(){\n\t\trequestAnimFrame(processQueue);\n\t\tvar now = Date.now();\n\t\twhile (msgQueue.length > 0 && msgQueue[0].timetag < now){\n\t\t\tvar first = msgQueue.shift();\n\t\t\tif (first.address === \"_set\"){\n\t\t\t\tfirst.data();\n\t\t\t} else {\n\t\t\t\t_send(first);\n\t\t\t}\n\t\t}\n\t\t//send an update message to all the listeners\n\t\tupdateMessage.data = now - lastUpdate;\n\t\t_send(updateMessage);\n\t\tlastUpdate = now;\n\t}", "function onwriteDrain(stream, state) {\n if (state.length === 0 && state.needDrain) {\n state.needDrain = false;\n stream.emit('drain');\n }\n} // if there's something in the buffer waiting, then process it", "function onwriteDrain(stream, state) {\n if (state.length === 0 && state.needDrain) {\n state.needDrain = false;\n stream.emit('drain');\n }\n} // if there's something in the buffer waiting, then process it", "function onwriteDrain(stream, state) {\n if (state.length === 0 && state.needDrain) {\n state.needDrain = false;\n stream.emit('drain');\n }\n} // if there's something in the buffer waiting, then process it", "function onwriteDrain(stream, state) {\n if (state.length === 0 && state.needDrain) {\n state.needDrain = false;\n stream.emit('drain');\n }\n} // if there's something in the buffer waiting, then process it", "function onwriteDrain(stream, state) {\n if (state.length === 0 && state.needDrain) {\n state.needDrain = false;\n stream.emit('drain');\n }\n} // if there's something in the buffer waiting, then process it", "function onwriteDrain(stream, state) {\n if (state.length === 0 && state.needDrain) {\n state.needDrain = false;\n stream.emit('drain');\n }\n} // if there's something in the buffer waiting, then process it", "function onwriteDrain(stream, state) {\n if (state.length === 0 && state.needDrain) {\n state.needDrain = false;\n stream.emit('drain');\n }\n} // if there's something in the buffer waiting, then process it", "function onwriteDrain(stream, state) {\n if (state.length === 0 && state.needDrain) {\n state.needDrain = false;\n stream.emit('drain');\n }\n} // if there's something in the buffer waiting, then process it", "function onwriteDrain(stream, state) {\n if (state.length === 0 && state.needDrain) {\n state.needDrain = false;\n stream.emit('drain');\n }\n} // if there's something in the buffer waiting, then process it", "function onwriteDrain(stream, state) {\n if (state.length === 0 && state.needDrain) {\n state.needDrain = false;\n stream.emit('drain');\n }\n} // if there's something in the buffer waiting, then process it", "function onwriteDrain(stream, state) {\n if (state.length === 0 && state.needDrain) {\n state.needDrain = false;\n stream.emit('drain');\n }\n} // if there's something in the buffer waiting, then process it", "function onwriteDrain(stream, state) {\n if (state.length === 0 && state.needDrain) {\n state.needDrain = false;\n stream.emit('drain');\n }\n} // if there's something in the buffer waiting, then process it", "function onwriteDrain(stream, state) {\n if (state.length === 0 && state.needDrain) {\n state.needDrain = false;\n stream.emit('drain');\n }\n} // if there's something in the buffer waiting, then process it", "function onwriteDrain(stream, state) {\n if (state.length === 0 && state.needDrain) {\n state.needDrain = false;\n stream.emit('drain');\n }\n} // if there's something in the buffer waiting, then process it", "function onwriteDrain(stream, state) {\n if (state.length === 0 && state.needDrain) {\n state.needDrain = false;\n stream.emit('drain');\n }\n} // if there's something in the buffer waiting, then process it", "function onwriteDrain(stream, state) {\n if (state.length === 0 && state.needDrain) {\n state.needDrain = false;\n stream.emit('drain');\n }\n} // if there's something in the buffer waiting, then process it", "function onwriteDrain(stream, state) {\n if (state.length === 0 && state.needDrain) {\n state.needDrain = false;\n stream.emit('drain');\n }\n} // if there's something in the buffer waiting, then process it", "function onwriteDrain(stream, state) {\n if (state.length === 0 && state.needDrain) {\n state.needDrain = false;\n stream.emit('drain');\n }\n} // if there's something in the buffer waiting, then process it", "function onwriteDrain(stream, state) {\n if (state.length === 0 && state.needDrain) {\n state.needDrain = false;\n stream.emit('drain');\n }\n} // if there's something in the buffer waiting, then process it", "function onwriteDrain(stream, state) {\n if (state.length === 0 && state.needDrain) {\n state.needDrain = false;\n stream.emit('drain');\n }\n} // if there's something in the buffer waiting, then process it", "function onwriteDrain(stream, state) {\n if (state.length === 0 && state.needDrain) {\n state.needDrain = false;\n stream.emit('drain');\n }\n} // if there's something in the buffer waiting, then process it", "function onwriteDrain(stream, state) {\n if (state.length === 0 && state.needDrain) {\n state.needDrain = false;\n stream.emit('drain');\n }\n} // if there's something in the buffer waiting, then process it", "function onwriteDrain(stream, state) {\n if (state.length === 0 && state.needDrain) {\n state.needDrain = false;\n stream.emit('drain');\n }\n} // if there's something in the buffer waiting, then process it", "function onwriteDrain(stream, state) {\n if (state.length === 0 && state.needDrain) {\n state.needDrain = false;\n stream.emit('drain');\n }\n} // if there's something in the buffer waiting, then process it", "function onwriteDrain(stream, state) {\n if (state.length === 0 && state.needDrain) {\n state.needDrain = false;\n stream.emit('drain');\n }\n} // if there's something in the buffer waiting, then process it", "function onwriteDrain(stream, state) {\n if (state.length === 0 && state.needDrain) {\n state.needDrain = false;\n stream.emit('drain');\n }\n} // if there's something in the buffer waiting, then process it", "function onwriteDrain(stream, state) {\n if (state.length === 0 && state.needDrain) {\n state.needDrain = false;\n stream.emit('drain');\n }\n} // if there's something in the buffer waiting, then process it", "function onwriteDrain(stream, state) {\n if (state.length === 0 && state.needDrain) {\n state.needDrain = false;\n stream.emit('drain');\n }\n} // if there's something in the buffer waiting, then process it", "function onwriteDrain(stream, state) {\n if (state.length === 0 && state.needDrain) {\n state.needDrain = false;\n stream.emit('drain');\n }\n} // if there's something in the buffer waiting, then process it", "function onwriteDrain(stream, state) {\n if (state.length === 0 && state.needDrain) {\n state.needDrain = false;\n stream.emit('drain');\n }\n} // if there's something in the buffer waiting, then process it", "function onwriteDrain(stream, state) {\n if (state.length === 0 && state.needDrain) {\n state.needDrain = false;\n stream.emit('drain');\n }\n} // if there's something in the buffer waiting, then process it", "function onwriteDrain(stream, state) {\n if (state.length === 0 && state.needDrain) {\n state.needDrain = false;\n stream.emit('drain');\n }\n} // if there's something in the buffer waiting, then process it", "function onwriteDrain(stream, state) {\n if (state.length === 0 && state.needDrain) {\n state.needDrain = false;\n stream.emit('drain');\n }\n} // if there's something in the buffer waiting, then process it", "function onwriteDrain(stream, state) {\n if (state.length === 0 && state.needDrain) {\n state.needDrain = false;\n stream.emit('drain');\n }\n} // if there's something in the buffer waiting, then process it", "function onwriteDrain(stream, state) {\n if (state.length === 0 && state.needDrain) {\n state.needDrain = false;\n stream.emit('drain');\n }\n} // if there's something in the buffer waiting, then process it", "function onwriteDrain(stream, state) {\n if (state.length === 0 && state.needDrain) {\n state.needDrain = false;\n stream.emit('drain');\n }\n} // if there's something in the buffer waiting, then process it", "function onwriteDrain(stream, state) {\n if (state.length === 0 && state.needDrain) {\n state.needDrain = false;\n stream.emit('drain');\n }\n} // if there's something in the buffer waiting, then process it", "function onwriteDrain(stream, state) {\n if (state.length === 0 && state.needDrain) {\n state.needDrain = false;\n stream.emit('drain');\n }\n} // if there's something in the buffer waiting, then process it", "function onwriteDrain(stream, state) {\n if (state.length === 0 && state.needDrain) {\n state.needDrain = false;\n stream.emit('drain');\n }\n} // if there's something in the buffer waiting, then process it", "function onwriteDrain(stream, state) {\n if (state.length === 0 && state.needDrain) {\n state.needDrain = false;\n stream.emit('drain');\n }\n} // if there's something in the buffer waiting, then process it", "function onwriteDrain(stream, state) {\n if (state.length === 0 && state.needDrain) {\n state.needDrain = false;\n stream.emit('drain');\n }\n} // if there's something in the buffer waiting, then process it", "function onwriteDrain(stream, state) {\n if (state.length === 0 && state.needDrain) {\n state.needDrain = false;\n stream.emit('drain');\n }\n} // if there's something in the buffer waiting, then process it", "function onwriteDrain(stream, state) {\n if (state.length === 0 && state.needDrain) {\n state.needDrain = false;\n stream.emit('drain');\n }\n} // if there's something in the buffer waiting, then process it", "function onwriteDrain(stream, state) {\n if (state.length === 0 && state.needDrain) {\n state.needDrain = false;\n stream.emit('drain');\n }\n} // if there's something in the buffer waiting, then process it", "function onwriteDrain(stream, state) {\n if (state.length === 0 && state.needDrain) {\n state.needDrain = false;\n stream.emit('drain');\n }\n} // if there's something in the buffer waiting, then process it", "function onwriteDrain(stream, state) {\n if (state.length === 0 && state.needDrain) {\n state.needDrain = false;\n stream.emit('drain');\n }\n} // if there's something in the buffer waiting, then process it", "function onwriteDrain(stream, state) {\n if (state.length === 0 && state.needDrain) {\n state.needDrain = false;\n stream.emit('drain');\n }\n} // if there's something in the buffer waiting, then process it", "function onwriteDrain(stream, state) {\n if (state.length === 0 && state.needDrain) {\n state.needDrain = false;\n stream.emit('drain');\n }\n} // if there's something in the buffer waiting, then process it", "function onwriteDrain(stream, state) {\n if (state.length === 0 && state.needDrain) {\n state.needDrain = false;\n stream.emit('drain');\n }\n} // if there's something in the buffer waiting, then process it", "function onwriteDrain(stream, state) {\n if (state.length === 0 && state.needDrain) {\n state.needDrain = false;\n stream.emit('drain');\n }\n} // if there's something in the buffer waiting, then process it", "function onwriteDrain(stream, state) {\n if (state.length === 0 && state.needDrain) {\n state.needDrain = false;\n stream.emit('drain');\n }\n} // if there's something in the buffer waiting, then process it", "function onwriteDrain(stream, state) {\n if (state.length === 0 && state.needDrain) {\n state.needDrain = false;\n stream.emit('drain');\n }\n} // if there's something in the buffer waiting, then process it", "function onwriteDrain(stream, state) {\n if (state.length === 0 && state.needDrain) {\n state.needDrain = false;\n stream.emit('drain');\n }\n} // if there's something in the buffer waiting, then process it", "function onwriteDrain(stream, state) {\n if (state.length === 0 && state.needDrain) {\n state.needDrain = false;\n stream.emit('drain');\n }\n} // if there's something in the buffer waiting, then process it", "function onwriteDrain(stream, state) {\n if (state.length === 0 && state.needDrain) {\n state.needDrain = false;\n stream.emit('drain');\n }\n} // if there's something in the buffer waiting, then process it" ]
[ "0.6990183", "0.64056754", "0.6362058", "0.62108177", "0.6021966", "0.5951879", "0.59409624", "0.59409624", "0.59409624", "0.59409624", "0.59036124", "0.58677757", "0.58271325", "0.58195007", "0.58168125", "0.58045375", "0.57909423", "0.57630336", "0.57630336", "0.57630336", "0.57630336", "0.57630336", "0.5748686", "0.57449454", "0.57359326", "0.5687774", "0.5681255", "0.5659199", "0.56551456", "0.564339", "0.56307304", "0.56210107", "0.56210107", "0.5582184", "0.556684", "0.55571175", "0.55571175", "0.55571175", "0.553457", "0.55345464", "0.55131733", "0.5507715", "0.55001444", "0.55001444", "0.54915494", "0.5489783", "0.5483975", "0.5483975", "0.5483975", "0.5483975", "0.5483975", "0.5483975", "0.5483975", "0.5483975", "0.5483975", "0.5483975", "0.5483975", "0.5483975", "0.5483975", "0.5483975", "0.5483975", "0.5483975", "0.5483975", "0.5483975", "0.5483975", "0.5483975", "0.5483975", "0.5483975", "0.5483975", "0.5483975", "0.5483975", "0.5483975", "0.5483975", "0.5483975", "0.5483975", "0.5483975", "0.5483975", "0.5483975", "0.5483975", "0.5483975", "0.5483975", "0.5483975", "0.5483975", "0.5483975", "0.5483975", "0.5483975", "0.5483975", "0.5483975", "0.5483975", "0.5483975", "0.5483975", "0.5483975", "0.5483975", "0.5483975", "0.5483975", "0.5483975", "0.5483975", "0.5483975", "0.5483975", "0.5483975", "0.5483975" ]
0.0
-1
Binary search for an index in the interval [left, right]
function indexInRange(indices, left, right) { if (indices.length === 0) { return false } var minIndex = 0 var maxIndex = indices.length - 1 var currentIndex var currentItem while (minIndex <= maxIndex) { currentIndex = ((maxIndex + minIndex) / 2) >> 0 currentItem = indices[currentIndex] if (minIndex === maxIndex) { return currentItem >= left && currentItem <= right } else if (currentItem < left) { minIndex = currentIndex + 1 } else if (currentItem > right) { maxIndex = currentIndex - 1 } else { return true } } return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function binarySearch(arr, val, left=0, right=arr.length) {\n if (right<left) return -1;\n const idx = left+ Math.floor((right-left)/2);\n if (right===left && arr[left]===val) return left;\n if (right===left && arr[left]!==val) return -1;\n \n if (arr[idx] === val){\n return idx;\n }else if (arr[idx] > val){\n return binarySearch(arr, val, left, idx-1);\n }else if (arr[idx] < val){\n return binarySearch(arr, val, idx+1, right);\n }\n}", "function binarySearch(arr, val, left=0, right=arr.length - 1) {\n if(left > right) return -1;\n\n let mid = Math.floor((left + right) / 2)\n\n if(arr[mid] === val) return mid\n\n if(arr[mid] < val){\n return binarySearch(arr, val, mid + 1, right)\n }else {\n return binarySearch(arr, val, left, mid - 1)\n }\n}", "function binarySearch(arr, val, left=0, right=arr.length) {\n if(left>right)return -1;\n const mid = Math.floor((left+right)/2);\n if(arr[mid]===val){\n return mid;\n }else if(arr[mid]>val){\n return binarySearch(arr, val, left, mid-1)\n }else{\n return binarySearch(arr, val, mid+1, right )\n }\n}", "function binarySearchRecursive(arr, target, left = 0, right = arr.length - 1) {\n\tif (left > right) return -1;\n \n const middle = (Math.floor((left + right) / 2))\n const targetInt = arr[middle]\n if (target === targetInt) {\n return middle\n } else if (target < targetInt) {\n return binarySearchRecursive(arr, target, left, middle - 1)\n } else {\n return binarySearchRecursive(arr, target, middle + 1, right)\n }\n}", "function binarySearchIndex( list, target, low, high ) {}", "function binarySearch(arr, val) {\n let left = 0;\n let right = arr.length - 1;\n let middle = Math.floor((left + right) / 2);\n\n while(left < right) {\n if(arr[middle] === val) {\n return middle;\n }\n else if(arr[middle] < val) {\n left = middle;\n }\n else if(arr[middle] > val) {\n right = middle;\n };\n\n middle = Math.floor((left + right) / 2);\n };\n\n return -1;\n}", "function binarySearch(arr, val) {\n let left = 0;\n let right = arr.length - 1;\n let middle = Math.floor((left + right) / 2);\n\n while (arr[middle] !== val && left <= right) {\n if (val < arr[middle]) right = middle - 1\n\n else left = middle + 1;\n\n middle = Math.floor((left + right) / 2);\n }\n\n return arr[middle] === val ? middle: -1;\n}", "function binarySearch(arr, val) {\n let left = 0;\n let right = arr.length - 1;\n\n while (left <= right) {\n const middle = Math.floor((left + right) / 2);\n\n if (arr[middle] === val) return middle;\n\n if (arr[middle] > val) right = middle - 1;\n else left = middle + 1;\n }\n\n return -1;\n}", "function binarySearch(arr,val) {\n let start = 0\n let end = arr.length-1\n let mid = Math.floor((start+end)/2)\n\n while (arr[mid] !== val && start <= end) {\n\n if (arr[mid] < val) {\n start = mid + 1\n } else {\n end = mid - 1\n }\n mid = Math.floor((start+end)/2)\n }\n if (arr[mid] === val) {\n return mid\n }\n return -1\n}", "function binarySearch(a, start, end, target) {\n while (start <= end) {\n var mid = ~~((start + end) >> 1);\n if (a[mid] > target) end = mid - 1;\n else if (a[mid] < target) start = mid + 1;\n else return mid;\n }\n return start;\n}", "function binarySearch(arr, target) {\n let left = 0;\n let right = arr.length - 1;\n while (left <= right) {\n const mid = left + Math.floor((right - left) / 2);\n // Did we land on the target\n if (arr[mid] === target) {\n return mid;\n }\n\n if (arr[mid] < target) {\n left = mid + 1; // Move the start to the right one index\n } else {\n right = mid - 1; // Move the end to the left one index\n }\n }\n // Could not find target\n return -1;\n}", "function binarySearch(arr, val){\n var left = 0;\n var right = arr.length - 1;\n var middle = Math.floor((left + right)/2);\n while(arr[middle] !== val) {\n if(val < arr[middle]) {\n right = middle - 1;\n }\n else {\n left = middle + 1;\n }\n middle = Math.floor((left + right) / 2);\n }\n if(arr[middle] === elem){\n return middle;\n }\n return -1;\n}", "function binarySearch(haystack, needle, compareFn) {\n var min = 0;\n var max = haystack.length - 1;\n var index, delta;\n\n while (min <= max) {\n index = Math.floor((max - min) / 2) + min;\n delta = compareFn(needle, haystack[index]);\n\n if (delta === 0) {\n return index;\n } else if (delta < 0) {\n max = index - 1;\n } else {\n min = index + 1;\n }\n }\n\n return min;\n }", "function binarySearch2(arr, low, high, targetValue) {\n let left = low;\n let right = high;\n while(left < right) {\n let mid = Math.floor((left + right) / 2);\n if (arr[mid] === targetValue) {\n return mid;\n } else if(arr[mid] > targetValue) {\n right = mid - 1;\n } else if (arr[mid] < targetValue) {\n left = mid + 1;\n }\n }\n return -1;\n}", "function binarySearch(array, value, start, end) {\n var start = start === undefined ? 0 : start;\n var end = end === undefined ? array.length : end;\n\n if (start > end) {\n return -1;\n }\n\n const index = Math.floor((start + end) / 2);\n const item = array[index];\n\n console.log(start, end);\n if (item == value) {\n return index;\n } else if (item < value) {\n return binarySearch(array, value, index + 1, end);\n } else if (item > value) {\n return binarySearch(array, value, start, index - 1);\n }\n}", "function rBinSearch(arr,val,start,end) {\r\n\r\n if(start>=end || val<arr[start] || val > arr[end-1]) {\r\n return false;\r\n }//didnt't find it\r\n\r\n var mid = parseInt((start + end)/2);\r\n if(arr[mid] === val){\r\n return true;\r\n }//found it\r\n}", "function binarySearch(\n sortedNums,\n searchNum,\n leftIdx = 0,\n rightIdx = sortedNums.length - 1\n) {\n if (leftIdx > rightIdx) {\n return false;\n }\n\n const midIdx = Math.floor((rightIdx + leftIdx) / 2);\n\n if (sortedNums[midIdx] === searchNum) {\n return true;\n }\n\n if (searchNum < sortedNums[midIdx]) {\n return binarySearch(sortedNums, searchNum, 0, midIdx - 1);\n } else {\n return binarySearch(sortedNums, searchNum, midIdx + 1, rightIdx);\n }\n}", "function binarySearch(array, key) {\n var low = 0;\n var high = array.length - 1;\n var mid;\n var element;\n \n while (low <= high) {\n mid = Math.floor((low + high) / 2, 10);\n element = array[mid];\n if (element < key) {\n low = mid + 1;\n } else if (element > key) {\n high = mid - 1;\n } else {\n return mid;\n }\n }\n return -1;\n}", "function binarySearch(arr, l, r, x) {\n if (r >= l) {\n // find the middle element in the array\n let mid = l + Math.floor((r - l) / 2); // takes first and last element to determine mid\n\n // If the element is present at the middle, return the middle index\n if (arr[mid] == x) return mid;\n\n // If element is smaller than mid, then it can only be present in left subarray\n // r is then replaced by the middle element\n if (arr[mid] > x) return binarySearch(arr, l, mid - 1, x);\n\n // Else the element can only be present in right subarray\n // l is replaced by the middle element\n return binarySearch(arr, mid + 1, r, x);\n }\n\n return -1;\n}", "function binarySearch(arr, val) {\n var start = 0;\n var end = arr.length-1;\n while (start <= end) {\n var mid = Math.floor((start + end)/2);\n if (arr[mid] === val) {\n return mid;\n }\n else if (arr[mid] > val) {\n end = mid - 1;\n }\n else if (arr[mid] < val) {\n start = mid + 1;\n }\n }\n return -1;\n}", "function binarySearch(arr, item, start, end) {\n //IF ARRAY IS EMPTY, INSERT ITEM AT INDEX ZERO\n if(arr.length == 0) {\n return 0;\n }\n //IF NEW ITEM IS SMALLLER THAN ALL EXIXTING ELEMENTS THEN INSERT AT INDEX ZERO\n if (item <= arr[start]) { \n return start; \n }\n //IF NEW ITEM IS GREATER THAN ALL EXIXTING ELEMENTS THEN INSERT AT INDEX LAST\n if (arr[end] < item) { \n return end + 1;\n }\n //IF THERE IS ONLY TWO ELEMENT IN ARRAY\n if(end - start == 1){\n return end;\n }\n \n var index = start + Math.floor((end - start + 1) / 2);\n //BINARY SEARCH FOR INDEX AT LEFT SIDE\n if (item <= arr[index]) {\n return binarySearch(arr, item, start, index);\n }\n //BINARY SEARCH FOR INDEX AT RIGHT SIDE\n if (arr[index] < item) {\n return binarySearch(arr, item, index, end);\n }\n}", "function binarySearch(array, value, start, end) {\n start = start === undefined ? 0 : start;\n end = end === undefined ? array.length : end;\n\n if (start > end) {\n return -1;\n }\n\n const index = Math.floor((start + end) / 2);\n const item = array[index];\n\n\n if (item === value) {\n return index;\n }\n else if (item < value) {\n return binarySearch(array, value, index + 1, end);\n }\n else if (item > value) {\n return binarySearch(array, value, start, index - 1);\n }\n}", "function binarySearch(haystack, needle, low, high) {\n while (low <= high) {\n const mid = low + ((high - low) >> 1);\n const cmp = haystack[mid][COLUMN] - needle;\n if (cmp === 0) {\n found = true;\n return mid;\n }\n if (cmp < 0) {\n low = mid + 1;\n }\n else {\n high = mid - 1;\n }\n }\n found = false;\n return low - 1;\n }", "function binarySearch(haystack, needle, low, high) {\n while (low <= high) {\n const mid = low + ((high - low) >> 1);\n const cmp = haystack[mid][COLUMN] - needle;\n if (cmp === 0) {\n found = true;\n return mid;\n }\n if (cmp < 0) {\n low = mid + 1;\n }\n else {\n high = mid - 1;\n }\n }\n found = false;\n return low - 1;\n }", "function binarySearch(arr, val) {\n\n}", "function binarySearch(haystack, needle, low, high) {\n while (low <= high) {\n const mid = low + ((high - low) >> 1);\n const cmp = haystack[mid][COLUMN] - needle;\n if (cmp === 0) {\n found = true;\n return mid;\n }\n if (cmp < 0) {\n low = mid + 1;\n }\n else {\n high = mid - 1;\n }\n }\n found = false;\n return low - 1;\n}", "function binarySearch(arr, value, start=0, end=arr.length) {\n console.log(`${start}, ${end}`);\n if(start > end ) return null; \n \n let index = Math.floor((start + end) /2); \n\n if(arr[index] === value) {\n return index; \n }\n if(arr[index] > value) {\n return binarySearch(arr, value, start, index - 1); \n }\n if(arr[index] < value) {\n return binarySearch(arr, value, index + 1, end);\n }\n}", "function binarySearch(sortedNums, searchNum) {}", "function binarySearch(\n array = [3, 5, 6, 8, 11, 12, 14, 15, 17, 18],\n value = 16,\n start,\n end\n) {\n var start = start === undefined ? 0 : start;\n var end = end === undefined ? array.length : end;\n\n if (start > end) {\n return -1;\n }\n\n const index = Math.floor((start + end) / 2);\n const item = array[index];\n\n console.log(start, end);\n if (item == value) {\n return index;\n } else if (item < value) {\n return binarySearch(array, value, index + 1, end);\n } else if (item > value) {\n return binarySearch(array, value, start, index - 1);\n }\n}", "function binarySearch(array, key) {\n var low = 0;\n var high = array.length - 1;\n var mid;\n var element;\n\n while(low <= high) {\n mid = Math.floor((low + high) / 2, 10);\n element = array[mid];\n if (element < key) {\n high = mid - 1;\n }else if (element > key){\n high = mid - 1;\n }else{\n return mid;\n }\n }\n return - 1;\n}", "function binarySearch(min, max) {\n return Math.floor((max - min) / 2 + min);\n}", "function binarySearch(arr, val) {\n if (arr.length === 0) return -1;\n let leftpointer = 0, rightPointer = arr.length - 1, guessIndex = Math.floor((rightPointer) / 2);\n\n while (arr[guessIndex] !== val && leftpointer <= rightPointer) {\n console.log(leftpointer, guessIndex, rightPointer);\n if (arr[guessIndex] < val) leftpointer = guessIndex + 1;\n else rightPointer = guessIndex - 1;\n guessIndex = Math.floor((rightPointer - leftpointer) / 2) + leftpointer;\n }\n\n return arr[guessIndex] === val ? guessIndex : -1;\n}", "function binarySearch_2(arr, elem) {\n let start = 0;\n let end = arr.length - 1;\n let middle = Math.floor((start + end) / 2);\n\n while (arr[middle] !== elem && start <= end) {\n if (elem < arr[middle]) {\n end = middle - 1;\n } else {\n start = middle + 1;\n }\n\n middle = Math.floor((start + end) / 2);\n }\n\n if (arr[middle] === elem) {\n return middle;\n }\n\n return -1;\n}", "function binarySearch(arr, value) {\n var left = 0;\n var right = arr.length - 1;\n var middle = Math.floor((left + right) / 2);\n\n while (arr[middle] !== value && left <= right) {\n if (value < arr[middle]) right = middle - 1;\n else left = middle + 1;\n middle = Math.floor((left + right) / 2);\n }\n return arr[middle] === value ? middle : -1;\n}", "function binarySearch(arr, elem) {\n if (!Array.isArray(arr)) {\n return -1;\n }\n\n let left = 0;\n let right = arr.length - 1;\n\n while (left <= right) {\n const middle = Math.floor((right + left) / 2);\n\n if (elem === arr[middle]) {\n return middle;\n } else if (elem > arr[middle]) {\n left = middle + 1;\n } else {\n right = middle - 1;\n }\n }\n\n return -1;\n}", "function binarySearch(searchElement, array) {\n var currentElement;\n var minIndex = 0;\n var maxIndex = array.length - 1;\n while (minIndex <= maxIndex) {\n currentIndex = (minIndex + maxIndex) / 2 | 0;\n currentElement = array[currentIndex];\n \t\tconsole.log(\"currentIndex \" + currentIndex, \"currentElement \" + currentElement);\n if (currentElement < searchElement) {\n minIndex = currentIndex + 1;\n }\n else if (currentElement > searchElement) {\n maxIndex = currentIndex - 1;\n }\n else {\n return currentIndex;\n }\n }\n \n return -1;\n}", "function binarySearch(array, value, start, end){ //find the index\n var start = start === undefined ? 0 : start // if start is undefined define it at 0, otherwise it stakes the value provided to the fxn\n var end = end === undefined ? array.length : end // same logic for the end\n\n\n if(start > end){\n return -1\n }\n\n const index = Math.floor((start + end) / 2) //midpoint\n const item = array[index] //value at midpoint\n\n console.log(start,end)\n if(item == value){ //if item is the value you are looking for then you have found the index\n return index\n } else if (item < value){ //if item is less than the value you are looking for then search again but make the start your index number + 1, search left half\n return binarySearch(array, value, index + 1, end)\n } else if (item > value) { //otherwise make your end the index -1, search right half\n return binarySearch(array, value, start, index -1)\n }\n}", "function rBinarySearch(array, num ) {\n\n}", "function bisectRight(a, x, lo, hi) {\n\t while (lo < hi) {\n\t var mid = lo + hi >>> 1;\n\t if (x < f(a[mid])) hi = mid;\n\t else lo = mid + 1;\n\t }\n\t return lo;\n\t }", "function binarySearch(array, value, start, end) {\n //if start & end are omitted => function uses start & end of array by default \n var start = start === undefined ? 0 : start;\n var end = end === undefined ? array.length : end;\n\n //if array if start index is > than end index = value hasn't been found (because they're in sorted order)\n if (start > end) {\n return -1;\n }\n\n //pick an index in the middle of start & end indixies & check the item at that index \n const index = Math.floor((start + end) / 2);\n const item = array[index];\n\n //if item is = to the value then you have found the correct index\n console.log(start, end);\n if (item == value) {\n return index;\n }\n //Otherwise, recursively search in either left or right hald of sorted array\n //depending on whether the item was < or > than the value \n else if (item < value) {\n return binarySearch(array, value, index + 1, end);\n }\n else if (item > value) {\n return binarySearch(array, value, start, index - 1);\n }\n}", "binarySearchInteger(arr, search){\n var startIndex = 0,\n stopIndex = arr.length - 1,\n middle = Math.floor((stopIndex + startIndex) / 2);\n\n\n while (arr[middle] != search && startIndex < stopIndex) {\n\n //adjust search area\n if (search < arr[middle]) {\n stopIndex = middle - 1;\n } else if (search > arr[middle]) {\n startIndex = middle + 1;\n }\n\n //recalculate middle\n middle = Math.floor((stopIndex + startIndex) / 2);\n }\n\n //make sure it's the right value\n if(arr[middle]==search){\n return middle;\n }\n else{\n return -1;\n }\n \n }", "function binarySearch(arr, elem){\n let start = 0;\n let end = (arr.length - 1); \n let middle = Math.floor((start + end) / 2);\n while (start <= end) {\n if (arr[middle] > elem){\n end = middle - 1\n } else if (arr[middle] < elem) {\n start = middle + 1\n } else {\n return middle\n }\n middle = Math.floor((start + end) / 2);\n }\n return -1\n}", "function binarySearch(arr, searchValue) {\n function find(arr, searchValue, left, right) {\n if (right < left)\n return -1;\n\n /*\n int mid = mid = (left + right) / 2;\n There is a bug in the above line;\n Joshua Bloch suggests the following replacement:\n */\n var mid = Math.floor((left + right) >>> 1);\n if (searchValue > arr[mid])\n return find(arr, searchValue, mid + 1, right);\n\n if (searchValue < arr[mid])\n return find(arr, searchValue, left, mid - 1);\n\n return mid;\n }\n return find(arr, searchValue, 0, arr.length - 1);\n}", "function binarySearchPosition(arr, target){\r\n let start = 0, end = arr.length-1;\r\n let ans = -1;\r\n \r\n while(start <= end){\r\n let mid = Math.floor((start + end)/2);\r\n \r\n if(arr[mid] <= target){\r\n start = mid + 1;\r\n }else{\r\n ans = mid;\r\n end = mid - 1;\r\n }\r\n }\r\n \r\n return ans;\r\n}", "function binarySearch(arr, value) {\n let middle = 0;\n let left = 0;\n let right = arr.length - 1;\n while (left <= right) {\n if (arr[right] < value || arr[left] > value) return -1;\n middle = Math.ceil((left + right) / 2);\n if (arr[middle] === value) return middle;\n if (arr[middle] > value) {\n right = middle - 1;\n } else if (arr[middle] < value) {\n left = middle + 1;\n }\n }\n return -1;\n}", "function binarySearch(arr, searchValue) {\n function find(arr, searchValue, left, right) {\n if (right < left)\n return -1;\n\n /*\n int mid = mid = (left + right) / 2;\n There is a bug in the above line;\n Joshua Bloch suggests the following replacement:\n */\n var mid = Math.floor((left + right) >>> 1);\n if (searchValue > arr[mid])\n return find(arr, searchValue, mid + 1, right);\n\n if (searchValue < arr[mid])\n return find(arr, searchValue, left, mid - 1);\n\n return mid;\n };\n\n return find(arr, searchValue, 0, arr.length - 1);\n}", "function binarySearch(arr, elem) {\n var start = 0;\n var end = arr.length - 1;\n var middle = Math.floor((start + end) / 2);\n\n while(arr[middle] !== elem && start <= end) {\n if(elem < arr[middle]) {\n end = middle - 1;\n } else {\n start = middle + 1;\n };\n\n middle = Math.floor((start + end) / 2);\n };\n\n if(arr[middle] === elem) {\n return middle;\n };\n\n return -1;\n}", "function binarySearch(array, value) {\n let left = 0;\n let right = array.length - 1;\n let middle = Math.round((left + right) / 2);\n while (array[middle] !== value && left <= right) {\n middle = Math.round((left + right) / 2);\n if (array[middle] > value) {\n right = middle - 1;\n } else {\n left = middle + 1;\n } \n }\n \n if (array[middle] === value) {\n return middle\n }\n\n return -1\n}", "function binarySearch2(myArray, key) {\n let lowerPointer = 0;\n let upperPointer = myArray.length - 1;\n while (lowerPointer <= upperPointer) {\n // get the midpoint of the array,\n // check if midpoint is equal to the key, if so, return the midpoint index\n let midpoint = Math.floor(\n lowerPointer + (upperPointer - lowerPointer) / 2,\n );\n if (myArray[midpoint] === key) return midpoint;\n\n // check if key is less than midpoint value\n // take the array less than midpoint\n if (key < myArray[midpoint]) {\n upperPointer = midpoint - 1;\n }\n\n // check if key is greater than midpoint value\n // take the array greater than midpoint\n if (key > myArray[midpoint]) {\n lowerPointer = midpoint + 1;\n }\n }\n return -1;\n}", "function binSearch(nums, target){\r\n let first = 0;\r\n let last = nums.length;\r\n while(first < last){\r\n let mid = (first+last)/2;\r\n mid = Math.floor(mid);\r\n if(nums[mid] == target){\r\n //lowest index\r\n if(left == true){\r\n last = mid;\r\n }\r\n //highest index\r\n else{\r\n first = mid + 1;\r\n }\r\n }\r\n else if(nums[mid] < target){\r\n first = mid + 1;\r\n }\r\n else{\r\n last = mid;\r\n }\r\n }\r\n if(left == false){\r\n return first - 1;\r\n }\r\n return first;\r\n }", "function binarySearch(arr, target, i, j) {\n let s = i, e = j;\n while (s <= e) {\n const mid = Math.floor((s + e) / 2);\n if (arr[mid] === target) return mid;\n else if (arr[mid] < target) s = mid + 1;\n else e = mid - 1;\n }\n return -1;\n}", "function binarySearch(args) {\n var input = args[0].split('\\n').map(Number),\n\t\tx = input[input.length - 1],\n indexOfX,\n i;\n\n input.shift();\n input.pop();\n input.sort(function (a, b) {\n return a - b;\n });\n\n indexOfX = binSearch(input, x, 0, input.length - 1);\n return indexOfX;\n\n function binSearch(array, number, start, end) {\n if (array[start] > number || number > array[end]) {\n return (-1);\n }\n\n var middle = ((end + start) / 2) | 0;\n if (array[middle] === number) {\n return middle;\n } else {\n if (array[middle] > number) {\n return binSearch(array, number, start, (middle - 1));\n } else {\n return binSearch(array, number, (middle + 1), end);\n }\n }\n }\n}", "function binarySearch(arr, elem) {\n let start = 0;\n let end = arr.length - 1;\n let middle = Math.floor((start + end) / 2);\n while(arr[middle] !== elem && start <= end) {\n if(elem < arr[middle]) {\n end = middle - 1;\n } else {\n start = middle + 1;\n }\n middle = Math.floor((start + end) / 2);\n }\n return arr[middle] === elem ? middle : -1;\n}", "function binarySearch2(arry, n) {\n start = 0;\n end = arry.length - 1;\n middle = Math.floor(start + end / 2);\n while (arry[middle] !== n && middle < end && middle > start) {\n if (n > arry[middle]) start = middle + 1;\n else end = middle - 1;\n\n middle = Math.floor((start + end) / 2);\n }\n return arry[middle] === n ? middle : -1;\n}", "function bisectRight (a, x, lo = 0, hi = a.length) {\n if (lo < 0) throw new Error('lo must be non-negative')\n\n while (lo < hi) {\n const mid = (lo + hi) / 2 | 0\n\n if (x < a[mid]) hi = mid\n\n else lo = mid + 1\n }\n\n return lo\n}", "function rBinSearch(arr, val, low = 0, high = arr.length - 1){\n // establish mid point of given range\n let mid = Math.floor((low + high) / 2);\n // check if value is present at any variable index\n if(arr[low] == val || arr[high] == val || arr[mid] == val){\n return true;\n }\n // prevent infinite loop\n else if(mid == low || mid == high){\n return false;\n }\n // check high\n if(arr[mid] < val){\n // establish progress and recurse\n return rBinSearch(arr, val, mid + 1, high - 1);\n }\n // check low\n else{\n // establish progress and recurse\n return rBinSearch(arr, val, low + 1, mid - 1);\n }\n}", "function bisectRight(a, x, lo, hi) {\n while (lo < hi) {\n var mid = lo + hi >>> 1,\n y = f(a[mid]);\n if (x < y || !(y <= y)) hi = mid;\n else lo = mid + 1;\n }\n return lo;\n }", "function binarySearch(arr, value) {\n\n}", "function search(arr, val) {\n let left = 0;\n let right = arr.length - 1;\n\n while (left <= right) {\n const mid = Math.floor((left + right) / 2);\n if (arr[mid] === val) {\n return mid;\n } else if (arr[mid] < val) {\n left = mid + 1;\n } else {\n right = mid - 1;\n }\n }\n\n return -1;\n}", "function binarySearch (arr, target) {\n var n = arr.length,\n l = 0, r = n - 1;\n while(l < r) {\n var middle = (l+r) / 2\n if (target === arr[middle]) {\n return middle\n } else if (middle > target) {\n r = middle + 1\n } else {\n l = middle - 1\n }\n }\n return -1\n}", "function binarySearch(a, x, key, leftMost, lo, hi) {\n\tif (lo == null) {\n\t\tlo = 0;\n\t}\n\telse if (lo < 0) {\n\t\tthrow \"ERROR: lo must be non-negative\";\n\t}\n\t\t\n\tif (hi == null) {\n\t\thi = a.length;\n\t}\n\telse if (hi > a.length) {\n\t\tthrow \"Error: hi must be <= a.length\";\n\t}\n\t\n\tif (leftMost == null) {\n\t\tleftMost = false;\n\t}\n\t\n\tif (key != null) {\n\t\tx = x[key]; \n\t}\n\tif (leftMost) {\n\t\twhile (lo < hi) {\n\t\t\tmid = ~~((lo+hi)/2);\n\t\t\tif (key == null) {\n\t\t\t\tvalue = a[mid];\n\t\t\t}\n\t\t\telse {\n\t\t\t\tvalue = a[mid][key]; \n\t\t\t}\n\t\t\tif (x <= value) {\n\t\t\t\thi = mid;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tlo = mid+1;\n\t\t\t}\n\t\t}\n\t}\n\telse {\n\t\twhile (lo < hi) {\n\t\t\tmid = ~~((lo+hi)/2);\n\t\t\tif (key == null) {\n\t\t\t\tvalue = a[mid];\n\t\t\t}\n\t\t\telse {\n\t\t\t\tvalue = a[mid][key]; \n\t\t\t}\n\t\t\tif (x < value) {\n\t\t\t\thi = mid;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tlo = mid+1;\n\t\t\t}\n\t\t}\n\t}\n\t\n\treturn lo;\n}", "function binarySearch(array, start, end, target) {\n\tif (target === \"\" || !target) {\n\t\treturn -1;\n\t}\n\n\twhile (start <= end) {\n\t\tvar mid = findMiddle(array, start, end);\n\n\t\tif (mid === -1) {\n\t\t\treturn -1;\n\t\t}\n\n\t\tvar data = array[mid];\n\t\tif (data === target) {\n\t\t\treturn mid;\n\t\t} else if (data < target) {\n\t\t\tstart = mid + 1;\n\t\t} else {\n\t\t\tend = mid - 1;\n\t\t}\n\t}\n\n\treturn -1;\n}", "function binarySearch(a, target) {\n target += 1;\n var start = 0,\n end = a.length - 1;\n\n while (start <= end) {\n var mid = ~~((start + end) >> 1);\n if (a[mid] >= target) end = mid - 1;\n else start = mid + 1;\n }\n\n return start;\n}", "function binarysearch(array, element, comparator, from, to) {\n if (comparator === undefined)\n comparator = function(a, b) {\n if (a < b)\n return -1;\n if (a > b)\n return 1;\n return 0;\n };\n\n if (from === undefined)\n return binarysearch(array, element, comparator, 0, array.length);\n\n if (from === to)\n return from;\n\n var mid = Math.floor((from + to) / 2);\n\n var result = comparator(element, array[mid]);\n if (result < 0)\n return binarysearch(array, element, comparator, from, mid);\n else\n return binarysearch(array, element, comparator, mid + 1, to);\n}", "function binarySearch(arr, num) {\n\tvar start = 0;\n\tvar end = arr.length - 1;\n\tvar mid = Math.floor((start + end) / 2);\n\n\twhile (start <= end && arr[mid] !== num) {\n\t\tif (num < arr[mid]) end = mid - 1;\n\t\telse start = mid + 1;\n\t\tmid = Math.floor((start + end) / 2);\n\t}\n\treturn arr[mid] === num ? mid : -1; // ':' acts as the else\n}", "function binarySearch(arr, num) {\n let end = arr.length - 1;\n let start = 0;\n let middle = Math.floor((start + end) / 2);\n\n while (arr[middle] !== num && start <= end) {\n if (num < arr[middle]) end = middle - 1;\n else start = middle + 1;\n\n middle = Math.floor((start + end) / 2);\n }\n if (arr[middle] === num) return middle;\n return -1;\n}", "function binarySearch(ar, el, compare_fn) {\n var m = 0;\n var n = ar.length - 1;\n while (m <= n) {\n var k = (n + m) >> 1;\n var cmp = compare_fn(el, ar[k]);\n if (cmp > 0) {\n m = k + 1;\n } else if(cmp < 0) {\n n = k - 1;\n } else {\n return k;\n }\n }\n return -m - 1;\n}", "function binarySearch(arr,elem){\n let start = 0;\n let end = arr.length-1\n let middle = Math.floor((start+end)/2) //floor 3.5=3\n console.log(middle);\n while(arr[middle]!==elem && start<=end){\n \n if(elem < arr[middle]){\n end = middle-1\n }else{\n start = middle+1\n }\n middle = Math.floor((start+end)/2)\n }\n console.log(start,middle,end);\n \n if(arr[middle]===elem){\n return middle\n }\n return 'not found'\n \n\n}", "function recursiveBinarySearch(arr, element){\n console.log(arr.length);\n let mid = Math.floor(arr.length / 2);\n let end = arr.length - 1;\n function helper(){\n if (arr.length === 1 && arr[0] !== element) {\n console.log(\"value not found\");\n return -1;\n }\n if (arr[mid] === element) {\n console.log(\"value found!\");\n console.log(mid);\n return mid;\n } else if (arr[mid] > element) {\n console.log(\"to the left\");\n mid = Math.floor(mid / 2);\n return helper();\n } else if (arr[mid] < element) {\n console.log(\"to the right\");\n mid = mid + Math.floor((end - mid) / 2);\n return helper();\n }\n }\n helper();\n}", "function binarySearch(data, searchVal, start, stop, cmpFunction) {\n if (start >= stop) {\n return undefined;\n }\n const midpoint = Math.floor((start + stop) / 2);\n\n const value = cmpFunction(searchVal, data[midpoint]);\n if (value === 0) {\n return data[midpoint];\n } else if (value > 0) {\n return binarySearch(data, searchVal, midpoint + 1, stop, cmpFunction);\n }\n\n return binarySearch(data, searchVal, start, midpoint, cmpFunction);\n}", "function binarySearch(arr, startP, endP) {\n\tstartP = (startP == undefined) ? 0 : startP;\n\tendP = (endP == undefined) ? arr.length - 1 : endP;\n\n\tlet midP = Math.floor((startP + endP)/2);\n\n\t// if midP reached the end or midP is the first position\n\t// that means index 0 is the rotating point\n\tif (midP == arr.length-1 || arr[midP] == arr[0]) {return 0;}\n\n\t// if midP is less than the previous position, found the point\n\tif (midP !== 0) {\n\t\tif (arr[midP] < arr[midP - 1]) return midP;\n\t}\n\n\t//if midP > letter at first position, means rotating point is second half\n\t//vice versa\n\tif (arr[midP] > arr[0]) {\n\t\treturn binarySearch(arr, midP+1, endP);\n\t} else if (arr[midP] < arr[0]){\n\t\treturn binarySearch(arr, startP, midP-1);\n\t}\n}", "function rBinarySearch(arr,num){\n //arnolds\n// if(arr[Math.floor(arr.length/2)] == num){\n// return true;\n// }\n// else if (arr.length == 1 ){\n// return false\n// }\n// else if(arr[Math.floor(arr.length/2)] > num){\n// return rBinarySearch(arr.slice(0,Math.floor(arr.length/2)), num);\n// }\n// else if(arr[Math.floor(arr.length/2)] < num){\n// return rBinarySearch(arr.slice(Math.floor(arr.length/2),arr.length), val);\n// }\n// }\n\n\n var midpoint = Math.floor(arr.length/2)\n\n if (num === arr[midpoint]) {\n return true;\n }\n else if(arr[midpoint] > num){\n var newArr = arr.slice(0,midpoint);\n return rBinarySearch(newArr, num)\n }\n else if(arr[midpoint] < num ){\n var newArr = arr.slice(midpoint+1, arr.length);\n return rBinarySearch(newArr, num);\n }\n return false;\n}", "function binary_search (array, target) {\n let min = 0;\n let max = array.length-1;\n let half;\n\n while( min<=max ){\n half = Math.floor((min + max) / 2);\n if ( array[half] === target ){\n return half;\n }\n else{\n if( target > array[ half ] ){\n min = half+1;\n }\n else{\n max = half-1;\n }\n }\n }\n return -1;\n}", "function binarySearch(arr, num) {\n\n // setting left pointer to begining of array\n let left = 0;\n // length of array, -1 so we aren't out of bounds\n let right = arr.length - 1;\n // using math.floor to round down, finding the middle\n mid = Math.floor((left + right) / 2)\n // if the array length is zero, then return -1\n if (arr.length === 0) {\n return -1;\n }\n // if we pick the number when we figure the middle, then do not go through the while loop, run while loop as longs as left is less than right\n while (arr[mid] !== num && left <= right) {\n // if our number is less than the middle, we can adjust our middle and make our window smaller\n // so we move the end of to be the middle now, we know it has to be in that section\n // creating a smaller window by setting the right to be the middle now, cutting the window in half\n if (num < arr[mid]) {\n right = mid - 1;\n // if our number is greater than the middle we know that it cannot be in that window\n // so we need to adjust our window to the other half, move the left to be the middle plus one b/c we know it's not the nmiddle\n } else {\n left = mid + 1;\n }\n // since we have moved the left or right pointer, we need to adjust and figure out a new middle\n mid = Math.floor((left + right) / 2)\n }\n // ternary statement that if the num is the middle then return the middle, if it is not then return -1\n return arr[mid] === num ? mid : -1\n}", "function binarySearch(array, target) {\n console.log(target)\n let currentElement;\n let minIndex = 0;\n let maxIndex = array.length - 1;\n \n while (minIndex <= maxIndex) {\n let mid = Math.floor((maxIndex + minIndex) / 2);\n if (array[mid] === target) {\n console.log(\"target found at index: \" + mid)\n break;\n } else {\n if (target < array[mid]) {\n maxIndex = mid;\n } else {\n minIndex = mid;\n }\n }\n }\n}", "function binarySearch(arr, target){\n var minIndex = 0;\n var maxIndex = arr.length-1;\n var curIndex;\n var curValue;\n\n while (minIndex <= maxIndex) { // if these pass each other, the value is not here\n curIndex = Math.floor((minIndex + maxIndex) / 2); // get location in middle of current range\n \n curValue = arr[curIndex]; // get the value at the middle location\n if (target > curValue) { // is the desired value greater than the value at the middle?\n minIndex = curIndex + 1; // set the new range to upper half of current range\n }\n else if (target < curValue) { // is the desired value less than the value at the middle?\n maxIndex = curIndex - 1; // set the new range to lower half of current range\n }\n else {\n return curIndex; // otherwise - we found it!\n }\n }\n return -1; // the min and max indexes crossed each other, so the value was not here\n}", "findRight(x, start, end){ \n end = end || this.sorted.length\n start = start || 0\n if(end > start) {\n var a = start\n var b = end - 1\n if (this.order(x, this.sorted[a]) < 0) return start\n if (this.order(x, this.sorted[b]) >= 0) return end\n while (a + 1 < b) {\n var m = Math.floor((a + b) / 2)\n if (this.order(x, this.sorted[m]) < 0) b = m\n else a = m\n }\n return b\n }else return start\n }", "function binarySearch(arr, target) {\n\n\tarr = arr.sort(); // sort arr so its always ascending order\n\t// O(n logn)\n\n\tlet start = 0,\n\t\tend = arr.length - 1; \n\n\twhile(start <= end) {\n\n\t\tlet mid = Math.floor(start + (end-start) / 2); \n\n\t\tif(target === arr[mid]) {\n\t\t\treturn mid;\n\t\t}\n\n\t\tif(target < arr[mid]) {\n\t\t\tend = mid - 1; // update ceiling if key is left half\n\t\t} else if (target > arr[mid]) {\n\t\t\tstar = mid + 1; // update floor if key is right half\n\t\t}\n\t}\n\n\treturn -1 // we dont have the ele\n}", "function binarySearch(array, target) {\n\tvar mid = Math.floor((array.length - 1) / 2);\n\tvar start = 0;\n\tvar end = array.length - 1;\n\twhile (start <= end) {\n\t\tif (array[mid] === target) {\n\t\t\treturn mid;\n\t\t} if (array[mid] < target) {\n\t\t\tstart = mid + 1;\n\t\t} else {\n\t\t\tend = mid - 1;\n\t\t}\n\t\tmid = Math.floor((start + end) / 2);\n\t}\n\treturn -1;\n}", "function binarySearch (array, value) {\n var start = 0;\n var end = array.length - 1;\n var middle;\n\n while (start <= end) {\n middle = Math.floor((start + end) / 2);\n\n if (array[middle] === value) {\n return middle;\n }\n if (value < array[middle]) {\n end = middle - 1;\n } else {\n start = middle + 1;\n }\n }\n return -1;\n}", "function binary_Search(items, value){\n var firstIndex = 0,\n lastIndex = items.length - 1,\n middleIndex = Math.floor((lastIndex + firstIndex)/2);\n \n while(items[middleIndex] != value && firstIndex < lastIndex)\n {\n if (value < items[middleIndex])\n {\n lastIndex = middleIndex - 1;\n } \n else if (value > items[middleIndex])\n {\n firstIndex = middleIndex + 1;\n }\n middleIndex = Math.floor((lastIndex + firstIndex)/2);\n }\n \n return (items[middleIndex] != value) ? -1 : middleIndex;\n }", "function binarySearchBonus(arr, val) {\r\n var start = 0;\r\n var end = arr.length-1;\r\n var counter = 0;\r\n while (start <= end && counter == 0){\r\n var pointer = Math.floor((end-start)/2)+start;\r\n if (arr[pointer]==val){\r\n counter ++;\r\n break;\r\n }\r\n else if (arr[pointer]<val){\r\n start = pointer+1;\r\n }\r\n else if (arr[pointer]>val){\r\n end = pointer-1;\r\n }\r\n }\r\n if (counter>0){\r\n var x = 1\r\n while (arr[pointer+x]==val){\r\n counter++;\r\n x++;\r\n }\r\n x = 1\r\n while (arr[pointer-x]==val){\r\n counter++;\r\n x++;\r\n }\r\n }\r\n return counter\r\n }", "function binarySearch(arr, target) {\n let startIdx = 0,\n endIdx = arr.length - 1;\n\n while (startIdx < endIdx) {\n let midIdx = Math.floor((startIdx + endIdx) / 2);\n if (target === arr[midIdx]) {\n return midIdx;\n } else if (target > arr[midIdx]) {\n startIdx = midIdx;\n } else {\n endIdx = midIdx;\n }\n }\n return -1;\n}", "function binarySearch(arr, value){\n\n let start = 0;\n let end = arr.length;\n\n while(start < end){\n // console.log(`Looping: s=${start} & e=${end}`);\n\n const midpoint = Math.floor((start + end) / 2);\n if(arr[midpoint] === value) return true;\n\n if(arr[midpoint] < value){\n start = midpoint + 1;\n }\n else if(arr[midpoint] > value){\n end = midpoint - 1;\n }\n\n }\n \n return arr[start] === value;\n}", "function binarySearch(arr, val) {\r\n var start = 0;\r\n var end = arr.length-1;\r\n while (start <= end){\r\n var pointer = start + Math.floor((end-start)/2);\r\n if (arr[pointer]==val){\r\n return true;\r\n }\r\n else if (arr[pointer]<val){\r\n start = pointer+1;\r\n }\r\n else if (arr[pointer]>val){\r\n end = pointer-1;\r\n }\r\n }\r\n return false;\r\n }", "function binarySearch(arr, val) {\n let idx = -1;\n\n function _binarySearch(high, low) {\n if (low > high) return -1;\n\n let mid = Math.floor((high + low) / 2);\n\n if (val === arr[mid]) {\n return idx = mid;\n } else if (val > arr[mid]) {\n return _binarySearch(high, mid + 1);\n } else if (val < arr[mid]) {\n return _binarySearch(mid - 1, low);\n } \n }\n\n _binarySearch(arr.length, 0);\n return idx;\n}", "function BinarySearch(arr, key) {\n let low = 0;\n let high = arr.length - 1;\n\n for (let i = 0; i < arr.length; i++) {\n let mid = Math.floor((low + high) / 2);\n if (key === arr[mid]) {\n console.log(`Found ${key} in ${mid}th index.`);\n console.log(`Number of iterations = ${i + 1}`);\n break;\n }\n\n else if (key > arr[mid]) {\n low = mid + 1;\n mid = Math.floor((low + high / 2));\n }\n\n else if (key < arr[mid]) {\n high = mid - 1;\n mid = Math.floor((low + high / 2));\n }\n\n if (low > high) {\n console.log(`Didn't find ${key} in the list. Process iterated for ${i + 1} times.`);\n break;\n }\n }\n}", "function rBinarySearch(arr,val){\n if(arr[Math.floor(arr.length/2)] == val){return true}\n else if(arr.length == 1){return false}\n else if(arr[Math.floor(arr.length/2)] > val){\n return rBinarySearch(arr.slice(0,Math.floor(arr.length/2)),val);\n }\n else if(arr[Math.floor(arr.length/2)] < val){\n return rBinarySearch(arr.slice(Math.floor(arr.length/2),arr.length),val);\n }\n}", "function binarySearch(A, cmpVal, def, valfn, i, j){\n if(!A.length) return -1; \n var valfn = valfn || function(x){ return x; }\n var def = def || 0;\n if(i === undefined){ i = 0; }\n if(j === undefined){ j = A.length; }\n if(i >= j) {\n\tif(def === -1){\n\t if(i > 0) return i - 1;\n\t else return i;\n\t}\n\telse if(def === 0){\n\t var v0 = 999999999;\n\t var v2 = 999999999;\n\t if(i > 0) v0 = valfn(A[i-1])\n\t if(i + 1 < A.length) v2 = valfn(A[i+1]);\n\t var a = [Math.abs(v0 - cmpVal)\n\t\t ,Math.abs(valfn(A[i]) - cmpVal)\n\t\t ,Math.abs(v2 - cmpVal)]\n\t var closest = a.indexOf(Math.min.apply(Math, a));\n\t if(closest === 0) return i - 1; \n\t else if(closest === 2){ return i + 1; }\n\t else return i; \n\t}\n\telse if(def === 1){\n\t if(i + 1 < A.length) return i + 1;\n\t else return i; \n\t}\n\telse { throw \"Parameter 'def' must be -1, 0, or 1\"; }\n }\n\n var idx = i + Math.floor((j - i)/2);\n if (idx < 0 || idx + 1 > A.length){ throw \"Bad idx: \"+idx+\" not in [0, \"+A.length+\"]\"; }\n var v = valfn(A[idx]);\n\n if(v > cmpVal){ return binarySearch(A, cmpVal, def, valfn, i, idx); }\n if(v === cmpVal){ return idx; }\n if(v < cmpVal){ return binarySearch(A, cmpVal, def, valfn, idx+1, j); }\n}", "function binarySearch(arr, x) {\n let sortedArr = arr.sort(sortArr);\n let low = 0;\n let high = sortedArr.length - 1;\n while (low <= high) {\n let mid = Math.floor((low + high) / 2);\n if (x == sortedArr[mid]) {\n return true;\n } else if (x < sortedArr[mid]) {\n high = mid - 1;\n } else {\n low = mid + 1;\n }\n }\n return false;\n}", "function binaryLeftSearch(labelBounds, ary, coord, side, extractBounds) {\n var left = 0;\n var right = ary.length - 1;\n var bounds;\n\n while (left < right) {\n var m = Math.floor((left + right) / 2);\n bounds = extractBounds(ary[m]);\n\n if (bounds[coord] + bounds[side] < labelBounds[coord]) {\n // label is on right side\n left = m + 1;\n } else {\n // label is on the left side\n right = m;\n }\n }\n\n return left;\n}", "function rBinarySearch(arr, target){\n let leftIdx = 0;\n let rigthIdx = arr.length-1 \n\n\n while (leftIdx <= rightIdx) {\n let midpointIdx = leftIdx + Math.floor((rigthIdx - leftIdx) / 2 );\n let midpointVal = arr[midpointIdx];\n if (midpointVal === target) {\n return true;\n } else {\n\n }\n }\n \n while (num > 0) {\n totalSum += num;\n // console.log(totalSum)\n num--\n // console.log(num);\n rBinarySearch(num);\n }\n return totalSum;\n}", "function binarySearch(list, value)\r\n{\r\n\tlet start = 0;\r\n\tlet stop = list.length - 1;\r\n\tlet middle = Math.floor((start + stop) / 2);\r\n\t\r\n\twhile (list[middle][0] !== value && start < stop)\r\n\t{\r\n\t\tif (value < list[middle][0])\r\n\t\t{\r\n\t\t\tstop = middle - 1;\r\n\t\t} else\r\n\t\t{\r\n\t\t\tstart = middle + 1;\r\n\t\t}\r\n\t\t\r\n\t\tmiddle = Math.floor((start + stop) / 2);\r\n\t}\r\n\t\r\n\treturn (list[middle][0] !== value) ? -1 : middle;\r\n}", "function binarySearch(arr, key, insertIndex) {\n var len = arr.length;\n var sp = -1;\n var m;\n var retVal = -1;\n\n while (len - sp > 1) {\n var index = m = len + sp >> 1;\n if (arr[index] < key) {\n sp = m;\n } else {\n len = m;\n }\n }\n \n if (arr[len] == key || insertIndex ) {\n retVal = len; \n }\n return retVal;\n}", "function binarySearch(arr, numToSearch) {\n let min = 0;\n let max = arr.length - 1;\n\n while (min <= max) {\n // everytime keep middle element updated\n let middle = Math.floor((min + max) / 2);\n let currentElement = arr[middle];\n\n if (currentElement < numToSearch) {\n min = middle + 1;\n } else if (currentElement > numToSearch) {\n max = middle - 1;\n } else {\n // When we finally found the search element in the array :)\n return middle;\n }\n }\n return -1;\n}", "function bisectLeft(a, x, lo, hi) {\n\t while (lo < hi) {\n\t var mid = lo + hi >>> 1;\n\t if (f(a[mid]) < x) lo = mid + 1;\n\t else hi = mid;\n\t }\n\t return lo;\n\t }", "function binarySearchIndices( value ) {\r\n\r\n\t\tfunction binarySearch( start, end ) {\r\n\r\n\t\t\t// return closest larger index\r\n\t\t\t// if exact number is not found\r\n\r\n\t\t\tif ( end < start )\r\n\t\t\t\treturn start;\r\n\r\n\t\t\tvar mid = start + Math.floor( ( end - start ) / 2 );\r\n\r\n\t\t\tif ( cumulativeAreas[ mid ] > value ) {\r\n\r\n\t\t\t\treturn binarySearch( start, mid - 1 );\r\n\r\n\t\t\t} else if ( cumulativeAreas[ mid ] < value ) {\r\n\r\n\t\t\t\treturn binarySearch( mid + 1, end );\r\n\r\n\t\t\t} else {\r\n\r\n\t\t\t\treturn mid;\r\n\r\n\t\t\t}\r\n\r\n\t\t}\r\n\r\n\t\tvar result = binarySearch( 0, cumulativeAreas.length - 1 );\r\n\t\treturn result;\r\n\r\n\t}", "function rBinarySearch(sortedNums, searchNum, iStart, expectedResult) { \n if (iStart == sortedNums.length-1){\n return sortedNums[iStart]\n }\n if (sortedNums[iStart] == searchNum){\n expectedResult = true\n return expectedResult\n } \n else {\n rBinarySearch(nums1, searchNum1, iStart+1) \n }\n}", "function binarySearch(arr, val) {\n if(arr.length == 0){\n return -1\n } else if(arr[arr.length - 1] == val){\n return arr.length - 1;\n }\n return 0 + findIndex(arr.slice(0, arr.length - 1), val);\n}", "function binarySearch(t) {\n\t\tlet low = 0;\n\t\tlet high = records.length - 1;\n\t\tlet curr = Math.floor((high + low) / 2);\n\t\twhile(low < high) {\n\t\t\tif(t < records[curr]['to']) {\n\t\t\t\thigh = curr;\n\t\t\t}\n\t\t\telse if(t > records[curr]['to']) {\n\t\t\t\tlow = curr + 1;\n\t\t\t}\n\t\t\telse {\n\t\t\t\treturn curr;\n\t\t\t}\n\t\t\tcurr = Math.floor((high + low) / 2);\n\t\t}\n\t\treturn curr;\n\t}", "function binarySearch(arr, item) {\n arr = arr.sort((a,b) => a-b);\n let left = 0;\n let right = arr.length - 1;\n let middle = Math.floor((left + right) / 2);\n while (arr[middle] !== item && left <= right) {\n (arr[middle] > item) ? right = middle - 1 : left = middle + 1;\n middle = Math.floor((left + right) / 2);\n }\n\n return arr[middle] === item ? middle : -1;\n}" ]
[ "0.78708273", "0.7870765", "0.77890486", "0.73940617", "0.73660433", "0.7358538", "0.7341032", "0.733939", "0.7315747", "0.7310952", "0.72874826", "0.72815245", "0.72740304", "0.72613025", "0.7249253", "0.7243719", "0.7221648", "0.72086596", "0.7179292", "0.71790445", "0.7176173", "0.7165938", "0.7160745", "0.7160745", "0.71579134", "0.7134545", "0.7131367", "0.7123785", "0.7123385", "0.71219915", "0.71073556", "0.71053183", "0.7103494", "0.71025586", "0.7101084", "0.70992315", "0.7095144", "0.7066199", "0.70538247", "0.7050084", "0.70359933", "0.703296", "0.7029787", "0.7027745", "0.7023698", "0.70221186", "0.7010477", "0.70100754", "0.6996416", "0.6992682", "0.6992281", "0.69618285", "0.6959105", "0.6946714", "0.6938592", "0.69273555", "0.69151956", "0.68902475", "0.6878445", "0.6869843", "0.6869024", "0.6854727", "0.6847222", "0.6838459", "0.6837195", "0.6831763", "0.6830489", "0.6824916", "0.6812774", "0.6810827", "0.6810516", "0.6809685", "0.67989147", "0.67969704", "0.6795595", "0.6793998", "0.67906666", "0.67844886", "0.67794156", "0.6778109", "0.677058", "0.67680085", "0.6764249", "0.6752674", "0.6746943", "0.67468655", "0.6743122", "0.67416453", "0.6739203", "0.6724117", "0.67173487", "0.670948", "0.66870403", "0.66792625", "0.6678492", "0.6675422", "0.6672335", "0.66574097", "0.66571844", "0.6655816", "0.6654297" ]
0.0
-1
Bias adaptation function as per section 3.4 of RFC 3492.
function adapt(delta, numPoints, firstTime) { var k = 0; delta = firstTime ? floor(delta / damp) : delta >> 1; delta += floor(delta / numPoints); for (/* no initialization */; delta > baseMinusTMin * tMax >> 1; k += base) { delta = floor(delta / baseMinusTMin); } return floor(k + (baseMinusTMin + 1) * delta / (delta + skew)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function bias(alpha) {\n return function(d) {\n d.x += d.bias * alpha;\n };\n}", "function bias(alpha) {\n return function(d) {\n d.x += d.bias * alpha;\n };\n}", "function bias(alpha) {\n return function(d) {\n d.x += d.bias * alpha;\n };\n}", "function bias(alpha) {\n return function(d) {\n d.x += d.bias * alpha;\n };\n}", "function bias(alpha) {\n return function(d) {\n d.x += d.bias * alpha;\n };\n}", "function bias(alpha) {\n return function(d) {\n d.x += d.bias * alpha;\n };\n}", "function bias(alpha) {\n return function(d) {\n d.x += d.bias * alpha;\n };\n}", "function bias(alpha) {\n return function(d) {\n d.x += d.bias * alpha;\n };\n}", "function bias(alpha) {\n return function(d) {\n d.x += d.bias * alpha;\n };\n}", "function bias(alpha) {\n return function(d) {\n d.x += d.bias * alpha;\n };\n}", "function bias(alpha) {\n return function(d) {\n d.x += d.bias * alpha;\n };\n}", "function bias(alpha) {\n return function(d) {\n d.x += d.bias * alpha;\n };\n}", "function bias(alpha) {\n return function(d) {\n d.x += d.bias * alpha;\n };\n}", "function bias(alpha) {\n return function(d) {\n d.x += d.bias * alpha;\n };\n}", "function bias(alpha) {\n return function(d) {\n d.x += d.bias * alpha;\n };\n}", "function bias(alpha) {\n return function(d) {\n d.x += d.bias * alpha;\n };\n}", "function bias(alpha) {\n return function(d) {\n d.x += d.bias * alpha;\n };\n}", "function bias(alpha) {\n return function(d) {\n d.x += d.bias * alpha;\n };\n}", "function bias(alpha) {\n return function(d) {\n d.x += d.bias * alpha;\n };\n}", "function bias(alpha) {\n return function(d) {\n d.x += d.bias * alpha;\n };\n}", "function bias(alpha) {\n return function(d) {\n d.x += d.bias * alpha;\n };\n}", "function bias(alpha) {\n return function(d) {\n d.x += d.bias * alpha;\n };\n}", "function bias(alpha) {\n return function(d) {\n d.x += d.bias * alpha;\n };\n}", "function bias(alpha) {\n return function(d) {\n d.x += d.bias * alpha;\n };\n}", "function bias(alpha) {\n return function(d) {\n d.x += d.bias * alpha;\n };\n}", "function bias(alpha) {\n return function(d) {\n d.x += d.bias * alpha;\n };\n}", "function bias(alpha) {\n return function(d) {\n d.x += d.bias * alpha;\n };\n}", "function bias(alpha) {\n return function(d) {\n d.x += d.bias * alpha;\n };\n}", "function bias(alpha) {\n return function(d) {\n d.x += d.bias * alpha;\n };\n}", "function B0(u)\n{\n var tmp = 1.0 - u;\n return (tmp * tmp * tmp);\n}", "function lined_on( origin, base, bias){\n return origin + (base - origin) * bias;\n }", "function _setUpDamping() \n{\n/* var oneIn2 = this.scale >> 1;\n var oneIn4 = oneIn2 >> 1;\n var oneIn16 = oneIn4 >> 2;\n\n this._damping = function (distance) \n {\n var dis = Math.abs(distance);\n var result;\n\n if (dis < oneIn2) {\n result = dis >> 1;\n } else if (dis < oneIn2 + oneIn4) {\n result = oneIn4 + ((dis - oneIn2) >> 2);\n } else {\n result = oneIn4 + oneIn16 + ((dis - oneIn2 - oneIn4) >> 3);\n }\n\n return distance > 0 ? result : -result;\n };\n*/ \n}", "function drawBias() {\n\tctx.fillStyle = \"white\";\n\tctx.font = \"14px Monospace\";\n\tctx.fillText(\"BIASES\", 30, 180);\n\t\n\tif (network == null) return;\n\t\n\tlet biases = network.bias.matrix[0];\n\tfor (let i=0; i<biases.length; i++) {\n\t\tlet hue;\n\t\t// determine hue; red = negative value, blue = positive value\n\t\tif (biases[i] < 0) {\n\t\t\thue = 0;\n\t\t} else {\n\t\t\thue = 200;\n\t\t}\n\t\t// determine lightness; lighter = larger absolute value\n\t\tlet lightness = Math.abs(biases[i])*95 + 5;\n\t\tctx.fillStyle = \"hsl(\"+hue+\",100%,\"+lightness+\"%)\";\n\t\t\n\t\tctx.fillRect(30 + 5*i, 190, 4, 4);\n\t}\n}", "function bias(id) {\r\n\tvar random = Math.floor(Math.random() * 2);\r\n\t\r\n\tif (id < 9)\r\n\t\treturn id;\r\n\telse {\r\n\t\tswitch(id) {\r\n\t\t\tcase 9:\r\n\t\t\t\tif (random == 0)\r\n\t\t\t\t\treturn 0;\r\n\t\t\t\telse\r\n\t\t\t\t\treturn 6;\r\n\t\t\t\tbreak;\r\n\t\t\tcase 10:\r\n\t\t\t\tif (random == 0)\r\n\t\t\t\t\treturn 1;\r\n\t\t\t\telse\r\n\t\t\t\t\treturn 7;\r\n\t\t\t\tbreak;\r\n\t\t\tcase 11:\r\n\t\t\t\tif (random == 0)\r\n\t\t\t\t\treturn 2;\r\n\t\t\t\telse\r\n\t\t\t\t\treturn 8;\r\n\t\t\t\tbreak;\r\n\t\t\tcase 12:\r\n\t\t\t\tif (random == 0)\r\n\t\t\t\t\treturn 3;\r\n\t\t\t\telse\r\n\t\t\t\t\treturn 6;\r\n\t\t\t\tbreak;\r\n\t\t\tcase 13:\r\n\t\t\t\tif (random == 0)\r\n\t\t\t\t\treturn 4;\r\n\t\t\t\telse\r\n\t\t\t\t\treturn 7;\r\n\t\t\t\tbreak;\r\n\t\t\tcase 14:\r\n\t\t\t\tif (random == 0)\r\n\t\t\t\t\treturn 5;\r\n\t\t\t\telse\r\n\t\t\t\t\treturn 8;\r\n\t\t\t\tbreak;\r\n\t\t\tcase 15:\r\n\t\t\t\tif (random == 0)\r\n\t\t\t\t\treturn 0;\r\n\t\t\t\telse\r\n\t\t\t\t\treturn 3;\r\n\t\t\t\tbreak;\r\n\t\t\tcase 16:\r\n\t\t\t\tif (random == 0)\r\n\t\t\t\t\treturn 1;\r\n\t\t\t\telse\r\n\t\t\t\t\treturn 4;\r\n\t\t\t\tbreak;\r\n\t\t\tcase 17:\r\n\t\t\t\tif (random == 0)\r\n\t\t\t\t\treturn 2;\r\n\t\t\t\telse\r\n\t\t\t\t\treturn 5;\r\n\t\t\t\tbreak;\r\n\t\t}\r\n\t}\r\n}", "linearize() {\n const SCALE = 255;\n const value = this.value / SCALE;\n return value <= 0.03928 ? value / 12.92 : Math.pow((value + 0.055) / 1.055, 2.4);\n }", "function adapt(delta, numPoints, firstTime) {\n \t\t\t\tvar k = 0;\n \t\t\t\tdelta = firstTime ? floor(delta / damp) : delta >> 1;\n \t\t\t\tdelta += floor(delta / numPoints);\n \t\t\t\tfor (/* no initialization */; delta > baseMinusTMin * tMax >> 1; k += base) {\n \t\t\t\t\tdelta = floor(delta / baseMinusTMin);\n \t\t\t\t}\n \t\t\t\treturn floor(k + (baseMinusTMin + 1) * delta / (delta + skew));\n \t\t\t}", "function adapt(delta, numPoints, firstTime) {\n\t\t\tvar k = 0;\n\t\t\tdelta = firstTime ? floor(delta / damp) : delta >> 1;\n\t\t\tdelta += floor(delta / numPoints);\n\t\t\tfor (; /* no initialization */delta > baseMinusTMin * tMax >> 1; k += base) {\n\t\t\t\tdelta = floor(delta / baseMinusTMin);\n\t\t\t}\n\t\t\treturn floor(k + (baseMinusTMin + 1) * delta / (delta + skew));\n\t\t}", "function adapt(delta, numPoints, firstTime) {\n\t\t\tvar k = 0;\n\t\t\tdelta = firstTime ? floor(delta / damp) : delta >> 1;\n\t\t\tdelta += floor(delta / numPoints);\n\t\t\tfor (; /* no initialization */delta > baseMinusTMin * tMax >> 1; k += base) {\n\t\t\t\tdelta = floor(delta / baseMinusTMin);\n\t\t\t}\n\t\t\treturn floor(k + (baseMinusTMin + 1) * delta / (delta + skew));\n\t\t}", "function adapt(delta, numPoints, firstTime) {\n\t\t\tvar k = 0;\n\t\t\tdelta = firstTime ? floor(delta / damp) : delta >> 1;\n\t\t\tdelta += floor(delta / numPoints);\n\t\t\tfor (; /* no initialization */delta > baseMinusTMin * tMax >> 1; k += base) {\n\t\t\t\tdelta = floor(delta / baseMinusTMin);\n\t\t\t}\n\t\t\treturn floor(k + (baseMinusTMin + 1) * delta / (delta + skew));\n\t\t}", "function adapt(delta, numPoints, firstTime) {\n\t\t\tvar k = 0;\n\t\t\tdelta = firstTime ? floor(delta / damp) : delta >> 1;\n\t\t\tdelta += floor(delta / numPoints);\n\t\t\tfor (; /* no initialization */delta > baseMinusTMin * tMax >> 1; k += base) {\n\t\t\t\tdelta = floor(delta / baseMinusTMin);\n\t\t\t}\n\t\t\treturn floor(k + (baseMinusTMin + 1) * delta / (delta + skew));\n\t\t}", "function adapt(delta, numPoints, firstTime) {\n\t\tvar k = 0;\n\t\tdelta = firstTime ? floor(delta / damp) : delta >> 1;\n\t\tdelta += floor(delta / numPoints);\n\t\tfor (/* no initialization */; delta > baseMinusTMin * tMax >> 1; k += base) {\n\t\t\tdelta = floor(delta / baseMinusTMin);\n\t\t}\n\t\treturn floor(k + (baseMinusTMin + 1) * delta / (delta + skew));\n\t}", "function adapt(delta, numPoints, firstTime) {\n\t\tvar k = 0;\n\t\tdelta = firstTime ? floor(delta / damp) : delta >> 1;\n\t\tdelta += floor(delta / numPoints);\n\t\tfor (/* no initialization */; delta > baseMinusTMin * tMax >> 1; k += base) {\n\t\t\tdelta = floor(delta / baseMinusTMin);\n\t\t}\n\t\treturn floor(k + (baseMinusTMin + 1) * delta / (delta + skew));\n\t}", "function adapt(delta, numPoints, firstTime) {\n\t\tvar k = 0;\n\t\tdelta = firstTime ? floor(delta / damp) : delta >> 1;\n\t\tdelta += floor(delta / numPoints);\n\t\tfor (/* no initialization */; delta > baseMinusTMin * tMax >> 1; k += base) {\n\t\t\tdelta = floor(delta / baseMinusTMin);\n\t\t}\n\t\treturn floor(k + (baseMinusTMin + 1) * delta / (delta + skew));\n\t}", "function adapt(delta, numPoints, firstTime) {\n\t\tvar k = 0;\n\t\tdelta = firstTime ? floor(delta / damp) : delta >> 1;\n\t\tdelta += floor(delta / numPoints);\n\t\tfor (/* no initialization */; delta > baseMinusTMin * tMax >> 1; k += base) {\n\t\t\tdelta = floor(delta / baseMinusTMin);\n\t\t}\n\t\treturn floor(k + (baseMinusTMin + 1) * delta / (delta + skew));\n\t}", "function adapt(delta, numPoints, firstTime) {\n\t\tvar k = 0;\n\t\tdelta = firstTime ? floor(delta / damp) : delta >> 1;\n\t\tdelta += floor(delta / numPoints);\n\t\tfor (/* no initialization */; delta > baseMinusTMin * tMax >> 1; k += base) {\n\t\t\tdelta = floor(delta / baseMinusTMin);\n\t\t}\n\t\treturn floor(k + (baseMinusTMin + 1) * delta / (delta + skew));\n\t}", "function adapt(delta, numPoints, firstTime) {\n\t\tvar k = 0;\n\t\tdelta = firstTime ? floor(delta / damp) : delta >> 1;\n\t\tdelta += floor(delta / numPoints);\n\t\tfor (/* no initialization */; delta > baseMinusTMin * tMax >> 1; k += base) {\n\t\t\tdelta = floor(delta / baseMinusTMin);\n\t\t}\n\t\treturn floor(k + (baseMinusTMin + 1) * delta / (delta + skew));\n\t}", "function adapt(delta, numPoints, firstTime) {\n\t\tvar k = 0;\n\t\tdelta = firstTime ? floor(delta / damp) : delta >> 1;\n\t\tdelta += floor(delta / numPoints);\n\t\tfor (/* no initialization */; delta > baseMinusTMin * tMax >> 1; k += base) {\n\t\t\tdelta = floor(delta / baseMinusTMin);\n\t\t}\n\t\treturn floor(k + (baseMinusTMin + 1) * delta / (delta + skew));\n\t}", "function adapt(delta, numPoints, firstTime) {\n\t\tvar k = 0;\n\t\tdelta = firstTime ? floor(delta / damp) : delta >> 1;\n\t\tdelta += floor(delta / numPoints);\n\t\tfor (/* no initialization */; delta > baseMinusTMin * tMax >> 1; k += base) {\n\t\t\tdelta = floor(delta / baseMinusTMin);\n\t\t}\n\t\treturn floor(k + (baseMinusTMin + 1) * delta / (delta + skew));\n\t}", "function adapt(delta, numPoints, firstTime) {\n\t\tvar k = 0;\n\t\tdelta = firstTime ? floor(delta / damp) : delta >> 1;\n\t\tdelta += floor(delta / numPoints);\n\t\tfor (/* no initialization */; delta > baseMinusTMin * tMax >> 1; k += base) {\n\t\t\tdelta = floor(delta / baseMinusTMin);\n\t\t}\n\t\treturn floor(k + (baseMinusTMin + 1) * delta / (delta + skew));\n\t}", "function adapt(delta, numPoints, firstTime) {\n\t\tvar k = 0;\n\t\tdelta = firstTime ? floor(delta / damp) : delta >> 1;\n\t\tdelta += floor(delta / numPoints);\n\t\tfor (/* no initialization */; delta > baseMinusTMin * tMax >> 1; k += base) {\n\t\t\tdelta = floor(delta / baseMinusTMin);\n\t\t}\n\t\treturn floor(k + (baseMinusTMin + 1) * delta / (delta + skew));\n\t}", "function adapt(delta, numPoints, firstTime) {\n\t\tvar k = 0;\n\t\tdelta = firstTime ? floor(delta / damp) : delta >> 1;\n\t\tdelta += floor(delta / numPoints);\n\t\tfor (/* no initialization */; delta > baseMinusTMin * tMax >> 1; k += base) {\n\t\t\tdelta = floor(delta / baseMinusTMin);\n\t\t}\n\t\treturn floor(k + (baseMinusTMin + 1) * delta / (delta + skew));\n\t}", "function adapt(delta, numPoints, firstTime) {\n\t\tvar k = 0;\n\t\tdelta = firstTime ? floor(delta / damp) : delta >> 1;\n\t\tdelta += floor(delta / numPoints);\n\t\tfor (/* no initialization */; delta > baseMinusTMin * tMax >> 1; k += base) {\n\t\t\tdelta = floor(delta / baseMinusTMin);\n\t\t}\n\t\treturn floor(k + (baseMinusTMin + 1) * delta / (delta + skew));\n\t}", "function adapt(delta, numPoints, firstTime) {\n\t\tvar k = 0;\n\t\tdelta = firstTime ? floor(delta / damp) : delta >> 1;\n\t\tdelta += floor(delta / numPoints);\n\t\tfor (/* no initialization */; delta > baseMinusTMin * tMax >> 1; k += base) {\n\t\t\tdelta = floor(delta / baseMinusTMin);\n\t\t}\n\t\treturn floor(k + (baseMinusTMin + 1) * delta / (delta + skew));\n\t}", "function adapt(delta, numPoints, firstTime) {\n\t\tvar k = 0;\n\t\tdelta = firstTime ? floor(delta / damp) : delta >> 1;\n\t\tdelta += floor(delta / numPoints);\n\t\tfor (/* no initialization */; delta > baseMinusTMin * tMax >> 1; k += base) {\n\t\t\tdelta = floor(delta / baseMinusTMin);\n\t\t}\n\t\treturn floor(k + (baseMinusTMin + 1) * delta / (delta + skew));\n\t}", "function adapt(delta, numPoints, firstTime) {\n\t\tvar k = 0;\n\t\tdelta = firstTime ? floor(delta / damp) : delta >> 1;\n\t\tdelta += floor(delta / numPoints);\n\t\tfor (/* no initialization */; delta > baseMinusTMin * tMax >> 1; k += base) {\n\t\t\tdelta = floor(delta / baseMinusTMin);\n\t\t}\n\t\treturn floor(k + (baseMinusTMin + 1) * delta / (delta + skew));\n\t}", "function adapt(delta, numPoints, firstTime) {\n\t\tvar k = 0;\n\t\tdelta = firstTime ? floor(delta / damp) : delta >> 1;\n\t\tdelta += floor(delta / numPoints);\n\t\tfor (/* no initialization */; delta > baseMinusTMin * tMax >> 1; k += base) {\n\t\t\tdelta = floor(delta / baseMinusTMin);\n\t\t}\n\t\treturn floor(k + (baseMinusTMin + 1) * delta / (delta + skew));\n\t}", "function adapt(delta, numPoints, firstTime) {\n\t\tvar k = 0;\n\t\tdelta = firstTime ? floor(delta / damp) : delta >> 1;\n\t\tdelta += floor(delta / numPoints);\n\t\tfor (/* no initialization */; delta > baseMinusTMin * tMax >> 1; k += base) {\n\t\t\tdelta = floor(delta / baseMinusTMin);\n\t\t}\n\t\treturn floor(k + (baseMinusTMin + 1) * delta / (delta + skew));\n\t}", "function adapt(delta, numPoints, firstTime) {\n\t\tvar k = 0;\n\t\tdelta = firstTime ? floor(delta / damp) : delta >> 1;\n\t\tdelta += floor(delta / numPoints);\n\t\tfor (/* no initialization */; delta > baseMinusTMin * tMax >> 1; k += base) {\n\t\t\tdelta = floor(delta / baseMinusTMin);\n\t\t}\n\t\treturn floor(k + (baseMinusTMin + 1) * delta / (delta + skew));\n\t}", "function adapt(delta, numPoints, firstTime) {\n\t\tvar k = 0;\n\t\tdelta = firstTime ? floor(delta / damp) : delta >> 1;\n\t\tdelta += floor(delta / numPoints);\n\t\tfor (/* no initialization */; delta > baseMinusTMin * tMax >> 1; k += base) {\n\t\t\tdelta = floor(delta / baseMinusTMin);\n\t\t}\n\t\treturn floor(k + (baseMinusTMin + 1) * delta / (delta + skew));\n\t}", "function adapt(delta, numPoints, firstTime) {\n\t\tvar k = 0;\n\t\tdelta = firstTime ? floor(delta / damp) : delta >> 1;\n\t\tdelta += floor(delta / numPoints);\n\t\tfor (/* no initialization */; delta > baseMinusTMin * tMax >> 1; k += base) {\n\t\t\tdelta = floor(delta / baseMinusTMin);\n\t\t}\n\t\treturn floor(k + (baseMinusTMin + 1) * delta / (delta + skew));\n\t}", "function adapt(delta, numPoints, firstTime) {\n\t\tvar k = 0;\n\t\tdelta = firstTime ? floor(delta / damp) : delta >> 1;\n\t\tdelta += floor(delta / numPoints);\n\t\tfor (/* no initialization */; delta > baseMinusTMin * tMax >> 1; k += base) {\n\t\t\tdelta = floor(delta / baseMinusTMin);\n\t\t}\n\t\treturn floor(k + (baseMinusTMin + 1) * delta / (delta + skew));\n\t}", "function adapt(delta, numPoints, firstTime) {\n\t\tvar k = 0;\n\t\tdelta = firstTime ? floor(delta / damp) : delta >> 1;\n\t\tdelta += floor(delta / numPoints);\n\t\tfor (/* no initialization */; delta > baseMinusTMin * tMax >> 1; k += base) {\n\t\t\tdelta = floor(delta / baseMinusTMin);\n\t\t}\n\t\treturn floor(k + (baseMinusTMin + 1) * delta / (delta + skew));\n\t}", "function adapt(delta, numPoints, firstTime) {\n\t\tvar k = 0;\n\t\tdelta = firstTime ? floor(delta / damp) : delta >> 1;\n\t\tdelta += floor(delta / numPoints);\n\t\tfor (/* no initialization */; delta > baseMinusTMin * tMax >> 1; k += base) {\n\t\t\tdelta = floor(delta / baseMinusTMin);\n\t\t}\n\t\treturn floor(k + (baseMinusTMin + 1) * delta / (delta + skew));\n\t}", "function adapt(delta, numPoints, firstTime) {\n\t\tvar k = 0;\n\t\tdelta = firstTime ? floor(delta / damp) : delta >> 1;\n\t\tdelta += floor(delta / numPoints);\n\t\tfor (/* no initialization */; delta > baseMinusTMin * tMax >> 1; k += base) {\n\t\t\tdelta = floor(delta / baseMinusTMin);\n\t\t}\n\t\treturn floor(k + (baseMinusTMin + 1) * delta / (delta + skew));\n\t}", "function adapt(delta, numPoints, firstTime) {\n\t\tvar k = 0;\n\t\tdelta = firstTime ? floor(delta / damp) : delta >> 1;\n\t\tdelta += floor(delta / numPoints);\n\t\tfor (/* no initialization */; delta > baseMinusTMin * tMax >> 1; k += base) {\n\t\t\tdelta = floor(delta / baseMinusTMin);\n\t\t}\n\t\treturn floor(k + (baseMinusTMin + 1) * delta / (delta + skew));\n\t}", "function adapt(delta, numPoints, firstTime) {\n\t\tvar k = 0;\n\t\tdelta = firstTime ? floor(delta / damp) : delta >> 1;\n\t\tdelta += floor(delta / numPoints);\n\t\tfor (/* no initialization */; delta > baseMinusTMin * tMax >> 1; k += base) {\n\t\t\tdelta = floor(delta / baseMinusTMin);\n\t\t}\n\t\treturn floor(k + (baseMinusTMin + 1) * delta / (delta + skew));\n\t}", "function adapt(delta, numPoints, firstTime) {\n\t\tvar k = 0;\n\t\tdelta = firstTime ? floor(delta / damp) : delta >> 1;\n\t\tdelta += floor(delta / numPoints);\n\t\tfor (/* no initialization */; delta > baseMinusTMin * tMax >> 1; k += base) {\n\t\t\tdelta = floor(delta / baseMinusTMin);\n\t\t}\n\t\treturn floor(k + (baseMinusTMin + 1) * delta / (delta + skew));\n\t}", "function adapt(delta, numPoints, firstTime) {\n\t\tvar k = 0;\n\t\tdelta = firstTime ? floor(delta / damp) : delta >> 1;\n\t\tdelta += floor(delta / numPoints);\n\t\tfor (/* no initialization */; delta > baseMinusTMin * tMax >> 1; k += base) {\n\t\t\tdelta = floor(delta / baseMinusTMin);\n\t\t}\n\t\treturn floor(k + (baseMinusTMin + 1) * delta / (delta + skew));\n\t}", "function adapt(delta, numPoints, firstTime) {\n\t\tvar k = 0;\n\t\tdelta = firstTime ? floor(delta / damp) : delta >> 1;\n\t\tdelta += floor(delta / numPoints);\n\t\tfor (/* no initialization */; delta > baseMinusTMin * tMax >> 1; k += base) {\n\t\t\tdelta = floor(delta / baseMinusTMin);\n\t\t}\n\t\treturn floor(k + (baseMinusTMin + 1) * delta / (delta + skew));\n\t}", "function adapt(delta, numPoints, firstTime) {\n\t\tvar k = 0;\n\t\tdelta = firstTime ? floor(delta / damp) : delta >> 1;\n\t\tdelta += floor(delta / numPoints);\n\t\tfor (/* no initialization */; delta > baseMinusTMin * tMax >> 1; k += base) {\n\t\t\tdelta = floor(delta / baseMinusTMin);\n\t\t}\n\t\treturn floor(k + (baseMinusTMin + 1) * delta / (delta + skew));\n\t}", "function adapt(delta, numPoints, firstTime) {\n\t\tvar k = 0;\n\t\tdelta = firstTime ? floor(delta / damp) : delta >> 1;\n\t\tdelta += floor(delta / numPoints);\n\t\tfor (/* no initialization */; delta > baseMinusTMin * tMax >> 1; k += base) {\n\t\t\tdelta = floor(delta / baseMinusTMin);\n\t\t}\n\t\treturn floor(k + (baseMinusTMin + 1) * delta / (delta + skew));\n\t}", "function adapt(delta, numPoints, firstTime) {\n\t\tvar k = 0;\n\t\tdelta = firstTime ? floor(delta / damp) : delta >> 1;\n\t\tdelta += floor(delta / numPoints);\n\t\tfor (/* no initialization */; delta > baseMinusTMin * tMax >> 1; k += base) {\n\t\t\tdelta = floor(delta / baseMinusTMin);\n\t\t}\n\t\treturn floor(k + (baseMinusTMin + 1) * delta / (delta + skew));\n\t}", "function adapt(delta, numPoints, firstTime) {\n\t\tvar k = 0;\n\t\tdelta = firstTime ? floor(delta / damp) : delta >> 1;\n\t\tdelta += floor(delta / numPoints);\n\t\tfor (/* no initialization */; delta > baseMinusTMin * tMax >> 1; k += base) {\n\t\t\tdelta = floor(delta / baseMinusTMin);\n\t\t}\n\t\treturn floor(k + (baseMinusTMin + 1) * delta / (delta + skew));\n\t}", "function adapt(delta, numPoints, firstTime) {\n\t\tvar k = 0;\n\t\tdelta = firstTime ? floor(delta / damp) : delta >> 1;\n\t\tdelta += floor(delta / numPoints);\n\t\tfor (/* no initialization */; delta > baseMinusTMin * tMax >> 1; k += base) {\n\t\t\tdelta = floor(delta / baseMinusTMin);\n\t\t}\n\t\treturn floor(k + (baseMinusTMin + 1) * delta / (delta + skew));\n\t}" ]
[ "0.6332276", "0.6332276", "0.6332276", "0.6332276", "0.6332276", "0.6332276", "0.6332276", "0.6332276", "0.6332276", "0.6332276", "0.6332276", "0.6332276", "0.6332276", "0.6332276", "0.6332276", "0.6332276", "0.6332276", "0.6332276", "0.6332276", "0.6332276", "0.6332276", "0.6332276", "0.6332276", "0.6332276", "0.6332276", "0.6332276", "0.6332276", "0.6332276", "0.6332276", "0.6135634", "0.611446", "0.6052282", "0.6051523", "0.58438444", "0.5685431", "0.5685108", "0.56360203", "0.56360203", "0.56360203", "0.56360203", "0.5631501", "0.5631501", "0.5631501", "0.5631501", "0.5631501", "0.5631501", "0.5631501", "0.5631501", "0.5631501", "0.5631501", "0.5631501", "0.5631501", "0.5631501", "0.5631501", "0.5631501", "0.5631501", "0.5631501", "0.5631501", "0.5631501", "0.5631501", "0.5631501", "0.5631501", "0.5631501", "0.5631501", "0.5631501", "0.5631501", "0.5631501", "0.5631501", "0.5631501", "0.5631501", "0.5631501", "0.5631501", "0.5631501", "0.5631501" ]
0.5672093
60
TODO: make this a streamable handler
function FeedHandler(callback, options){ this.init(callback, options); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "stream(URL, handler) {\n console.log(`GET ${URL} stream`);\n oboe({\n method: \"GET\",\n url: this.baseURL + URL,\n headers: this.headers,\n })\n .node(\"!\", function(data) {\n console.log(\"STREAM data : \" + JSON.stringify(data));\n handler(data);\n })\n .fail(function(errorReport) {\n console.error(JSON.stringify(errorReport));\n });\n }", "handle() {}", "_read() {}", "_read() {}", "_read () {}", "_read () {}", "_read () {}", "function Handler() {}", "function Handler() {}", "function Handler() {}", "function Handler() {}", "function Handler() {}", "function Handler() {}", "function Handler() {}", "function Handler() {}", "function Handler() {}", "function Handler() {}", "function Handler() {}", "_esWait() {\n // Create through stream.....\n return es( function(err, data) {\n if (err) {\n log(err, 'red')\n }\n })\n }", "_read() {\n\n }", "function stream() {\n const ioredis = new require('ioredis')\n ioredis.monitor((err, monitor) => {\n monitor.on('monitor', (time, args) => {\n if (args[0].match(/hm?set/)) {\n // catch hset and hmset\n var [_, bucket, id, rawJson] = args\n\n // see above for 'now what?' question pass this data on for processing\n console.info({ bucket, id, rawJson })\n }\n })\n })\n}", "createStream () {\n\n }", "parseRequest(req, res) {\r\n let data = [];\r\n req.on('data', (chunk) => {\r\n data.push(chunk);\r\n }).on('end', () => {\r\n const body = Buffer.concat(data).toString();\r\n this.handleRequest(body, res);\r\n });\r\n }", "function handleStreamProtocol(request, callback) {\n\n callback({\n statusCode: 200,\n headers: {\n 'content-type': 'text/html'\n },\n data: createStream('<h1>This is a perfectly cromulent response.</h1>')\n })\n\n}", "_read() {\n }", "read() {}", "_handleRead (request, response) {\n this.emit('download', request.resource, request.mode || 'r')\n this._store.createReadStream(request.resource, request.mode || 'r').then(({ stream, stats }) => {\n response.original.writeHead(200, { 'Content-Length': stats.size, 'Last-Modified': stats.ctime.toUTCString() })\n stream.pipe(response.original)\n }).catch(err => {\n if (!(err instanceof Request.Error)) {\n err = Request.Error.wrap(err, 404, 'Resource Not Accessible')\n }\n debug(`_handleRead('${request.resource}', '${request.mode}') error: ${err.original ? err.original.message : err.message}`)\n response.writeError(err)\n })\n }", "read({ block }, res) {\n res.json(block);\n }", "_write() {}", "obtain(){}", "async write() { }", "function takeShurikenHandler() {\n \ttakeShurikens(1);\n }", "function handlerStart (request, response) {\n console.log(\"at handlerStart\");\n\n // define callback function for end of request data stream\n function handlerEnd() {\n\tconsole.log(\"at handlerEnd\");\n\t// use the static file server \n\tfile.serve(request, response);\n\t// notice it takes request and response from closure\n }\n // set up callback function for end of data stream\n request.addListener('end',handlerEnd); \n request.resume(); // paused by default; this actually means start \n}", "function emitBuffer (e) {\n let arraybuffer = req.response\n emitter.emit('buffer', arraybuffer)\n }", "function onOpen() {\n file.pipe(res);\n\n onFinished(res, onResFinished);\n }", "process(req, res){}", "function handler (err, reply) {\n console.log(err, reply)\n}", "function doStream(self, hashname, callback)\n{\n var stream = getStream(self, seen(self, hashname));\n stream.handler = function(self, packet, cbHandler) { callback(null, packet, cbHandler); }\n return stream;\n}", "_read(size) {\n /*\n console.log(`read called with size ${size}`);\n for (let i = 0; i < this.streams.length; i++) {\n const currentStream = this.streams[i];\n let chunk = currentStream.read();\n if (Buffer.isBuffer(chunk)) {\n chunk = chunk.toString();\n console.log(`chunk for stream ${i}: ${chunk}`);\n }\n }\n */\n /*\n //this[kSource].fetchSomeData(size, (data, encoding) => {\n this.push(Buffer.from(data, encoding));\n console.log(`reading buffer: ${Buffer.from(data, encoding)}`);\n });\n */\n }", "function getStream(req, res) {\n var track = Track.create({id: req.params.id}),\n converter = Converter.create();\n\n res.contentType('application/ogg');\n\n track.stream(function (err, steam) {\n if (err) {\n console.log(err);\n res.send(503, err);\n return;\n }\n steam.pipe(converter.process.stdin);\n converter.process.stdout.pipe(res);\n });\n\n res.header('Access-Control-Allow-Origin', '*');\n\n // may need long polling here ?\n // https://devcenter.heroku.com/articles/request-timeout\n // res.header('transports', ['xhr-polling']);\n\n req.on('close', function () {\n track.stopStream();\n converter.kill();\n });\n }", "function Stream(){EE.call(this);}", "function Stream(){EE.call(this);}", "function Stream(){EE.call(this);}", "function Stream(){EE.call(this);}", "_transform(chunk, encoding, callback) {\n this.requestBuffer += chunk.toString();\n const headersEndFlag = '\\r\\n\\r\\n';\n\n let foundIndex;\n\n while((foundIndex = this.requestBuffer.indexOf(headersEndFlag)) !== -1) {\n const requestString = this.requestBuffer.slice(0, foundIndex + headersEndFlag.length);\n this.requestBuffer = this.requestBuffer.slice(foundIndex + headersEndFlag.length);\n this.requestHandler(requestString, this);\n }\n\n callback();\n }", "function SimpleStream(){\n EventHandler.call(this);\n }", "route(req, res) {\n const parsedURL = url.parse(req.url, true)\n const route = parsedURL.pathname.replace(/^\\/+|\\/+$/g, '')\n\n const queryString = parsedURL.query\n const headers = req.headers\n const decoder = new StringDecoder('utf-8')\n\n let buffer = ''\n req.on('data', (data) => {\n buffer += decoder.write(data)\n })\n\n req.on('end', async () => {\n try {\n buffer += decoder.end()\n const request = new Request({ \n route: route,\n queryString: queryString,\n method: req.method,\n headers, headers,\n payload: buffer\n })\n\n let handler = this._router.handler(route, req.method)\n const response = await handler(request)\n let statusCode = response.statusCode()\n let payload = response.payload()\n\n statusCode = typeof(statusCode) == 'number' ? statusCode : 200\n payload = typeof(payload) == 'object' ? payload : {}\n \n res.setHeader('Content-Type', 'application/json')\n res.writeHead(statusCode)\n res.end(JSON.stringify(payload))\n } catch (err) {\n console.dir(err)\n res.writeHead(500)\n res.end(JSON.stringify({\n err: err,\n msg: 'internal server error'\n }))\n }\n })\n }", "_onEnd() {}", "_handleWrite (request, response) {\n this.emit('upload', request.resource, request.mode || 'w')\n this._store.createWriteStream(request.resource, request.mode || 'w').then(stream => {\n debug(`createWriteStream('${request.resource}', '${request.mode}'): writing 100 Continue and piping`)\n response.original.writeContinue()\n request.original.pipe(stream)\n }).catch(err => {\n if (!(err instanceof Request.Error)) {\n err = Request.Error.wrap(err, 404, 'Resouce Not Accessible')\n }\n debug(`_handleWrite('${request.resource}', '${request.mode}') error: ${err.original ? err.original.message : err.message}`)\n response.writeError(err)\n })\n }", "function doProxyStream(self, args, callback)\n{\n if(!args || !args.path ||!args.hashname) return callback(\"no path or hashname\");\n // create stream and a req json\n var stream = getStream(self, seen(self, args.hashname));\n var js = {req:{}};\n js.req.p = args.path;\n js.req.m = args.method || \"GET\";\n if(args.headers) js.req.h = args.headers;\n\n // give back node streaming interface\n var x = wrapStream(self, stream, function(packet){\n // when the headers show up pass them along\n if(packet.js.res)\n {\n var res = {};\n res.statusCode = packet.js.res.s || 500;\n res.headers = packet.js.res.h || {};\n callback(res);\n }\n });\n x.js(js); // send headers\n return x;\n}", "function responseHandler(srcResponse, numer)\n{\n camz[numer].headers = srcResponse.headers;\n srcResponse.on('data', function(chunk) {dataHandler(chunk, numer)});\n}", "function handler( req, res) {\n\tlet archivo = fs.createReadStream( __dirname + \"index-ws.html\")\n\tres.writeHead(200, {\"content-type\": \"text/html\"})\n\tarchivo.pipe(res)\n}", "parseChunk(chunk) {\n this.write(chunk);\n }", "function handler(request, response)\n{\n let urlObj = url.parse(request.url, true, false)\n \n\n let receivedData = \"\"\n\n //attached event handlers to collect the message data\n request.on(\"data\", function(chunk) {\n receivedData += chunk\n })\n\n //event handler for the end of the message\n request.on(\"end\", function() {\n \n\n if (request.method == \"GET\") {\n //handle GET requests as static file requests\n fs.readFile(ROOT_DIR + urlObj.pathname, (err, data)=> {\n if (err) {\n //report error to console\n console.log(\"ERROR: \" + JSON.stringify(err))\n //respond with not found 404 to client\n response.writeHead(404)\n response.end(JSON.stringify(err))\n return\n }\n response.writeHead(200, {\n \"Content-Type\": get_mime(urlObj.pathname)\n })\n response.end(data)\n })\n }\n })\n }", "function image_process_streamization() { \r\n\r\n}", "function streamNeeded (startByte, endByte, cb) {\n console.info(\"streamNeeded\", startByte, endByte);\n cb(fs.createReadStream(activeFile, {\n start: startByte,\n end: endByte\n }));\n }", "GetResponseStream() {\n\n }", "on({content, event}) {\n const stream = content();\n if (!this.handlers[event]){\n this.handlers[event] = stream.onValue(e => this.handle(event, e));\n }\n }", "getOriginalStream() {\n return this.stream;\n }", "async function middleware (ctx, next) {\n\n}", "function handlerEnd() {\n\tconsole.log(\"at handlerEnd\");\n\t// use the static file server \n\tfile.serve(request, response);\n\t// notice it takes request and response from closure\n }", "async function handleStream() {\n const signal = controller.signal;\n for await (const chunk of ipfs.cat(image.cid, { signal })) {\n setImgBuffer((oldBuff) => [...oldBuff, chunk]);\n }\n\n if (mode === modeType.scanlation) {\n let textBuffer = [];\n //will only begin loading translation data if component isn't unloading\n for await (const chunk of ipfs.cat(data.cid, { signal })) {\n textBuffer = [...textBuffer, chunk];\n }\n setTranslation(JSON.parse(Buffer.concat(textBuffer).toString()));\n }\n }", "function handlePUTrequest(state) {\n // const hash = createHash('sha256').update(fullpath).digest('base64');\n const first = (header) => Array.isArray(header) ? header[0] : header;\n const fullpath = state.statPath.statpath;\n const statItem = state.statPath.stat;\n const mtime = Date.parse(state.statPath.stat.mtime);\n const etag = JSON.stringify([statItem.ino, statItem.size, mtime].join('-'));\n const ifmatchStr = first(state.req.headers['if-match']) || '';\n if (settings.putsaver.etag !== \"disabled\" && (ifmatchStr || settings.putsaver.etag === \"required\") && (ifmatchStr !== etag)) {\n const ifmatch = JSON.parse(ifmatchStr).split('-');\n const _etag = JSON.parse(etag).split('-');\n console.log('412 ifmatch %s', ifmatchStr);\n console.log('412 etag %s', etag);\n ifmatch.forEach((e, i) => {\n if (_etag[i] !== e)\n console.log(\"412 caused by difference in %s\", ['inode', 'size', 'modified'][i]);\n });\n let headTime = +ifmatch[2];\n let diskTime = mtime;\n // console.log(settings.etagWindow, diskTime, headTime);\n if (!settings.putsaver.etagWindow || diskTime - (settings.putsaver.etagWindow * 1000) > headTime)\n return state.throw(412);\n console.log('412 prevented by etagWindow of %s seconds', settings.putsaver.etagWindow);\n }\n new rx_1.Observable((subscriber) => {\n if (settings.putsaver.backupDirectory) {\n const backupFile = state.url.pathname.replace(/[^A-Za-z0-9_\\-+()\\%]/gi, \"_\");\n const ext = path.extname(backupFile);\n const backupWrite = fs.createWriteStream(path.join(settings.putsaver.backupDirectory, backupFile + \"-\" + mtime + ext + \".gz\"));\n const fileRead = fs.createReadStream(fullpath);\n const gzip = zlib.createGzip();\n const pipeError = (err) => {\n debug(3, 'Error saving backup file for %s: %s\\r\\n%s', state.url.pathname, err.message, \"Please make sure the backup directory actually exists or else make the \" +\n \"backupDirectory key falsy in your settings file (e.g. set it to a \" +\n \"zero length string or false, or remove it completely)\");\n state.log(3, \"Backup could not be saved, see server output\").throw(500);\n fileRead.close();\n gzip.end();\n backupWrite.end();\n subscriber.complete();\n };\n fileRead.on('error', pipeError);\n gzip.on('error', pipeError);\n backupWrite.on('error', pipeError);\n fileRead.pipe(gzip).pipe(backupWrite).on('close', () => {\n subscriber.next();\n subscriber.complete();\n });\n }\n else {\n subscriber.next();\n subscriber.complete();\n }\n }).switchMap(() => {\n // let stream: Stream = state.req;\n const write = state.req.pipe(fs.createWriteStream(fullpath));\n const finish = rx_1.Observable.fromEvent(write, 'finish').take(1);\n return rx_1.Observable.merge(finish, rx_1.Observable.fromEvent(write, 'error').takeUntil(finish)).switchMap((err) => {\n if (err) {\n return state\n .log(2, \"Error writing the updated file to disk\")\n .log(2, err.stack || [err.name, err.message].join(': '))\n .throw(500);\n }\n else {\n return server_types_1.obs_stat(false)(fullpath);\n }\n }).map(([err, statNew]) => {\n const mtimeNew = Date.parse(statNew.mtime);\n const etagNew = JSON.stringify([statNew.ino, statNew.size, mtimeNew].join('-'));\n state.respond(200, \"\", {\n 'x-api-access-type': 'file',\n 'etag': etagNew\n });\n });\n }).subscribe();\n}", "function onStream(request, response) {\n Game\n .findAll()\n .then(games => {\n const json = JSON.stringify(games)\n stream.updateInit(json)\n stream.init(request, response)\n console.log('ONSTREAM', stream)\n })\n .catch(error => next(error))\n}", "function processGetRequest(req, res) {\n console.log(\"incoming get request, serving...\");\n res.writeHead(200, {\n 'Access-Control-Allow-Origin': 'http://localhost:63342',\n 'Content-Type': 'text/event-stream',\n 'cache-control': \"no-cache\"\n });\n let currTime = new Date().getTime();\n\n // 'loop' using recursion (cannot use while loop with sleep in node.js)\n sendEvent(res, currTime);\n }", "function handleNotify(req, ctxObjects, res) \n{\t\n\tconsole.log('handle notify');\n\n\tfor(var i = 0; i < ctxObjects.length; i++) {\n\t\tconsole.log(ctxObjects[i]);\n processInputStreamData(ctxObjects[i]);\n\t}\n}", "static handler0() {\n return\n }", "updateStream(html) {\r\n\t\tthis.res.messages.write(html)\r\n\t}", "function handleRequest(req, res){\n //request.pipe(response);\n let fileStream = fs.createReadStream('./src/node/streams/data.txt');\n fileStream.pipe(res)\n}", "sub(streams){\n this.socket.on('open',async ()=>{\n await this.checkGrantAccessAndQuerySessionInfo()\n this.subRequest(streams, this.authToken, this.sessionId)\n this.socket.on('message', (data)=>{\n // log stream data to file or console here\n // console.log(JSON.parse(data))\n // console.log(this.data.length)\n this.data.push(JSON.parse(data))\n })\n })\n }", "function handleDone(req, res) {\n \n res.writeHead(200, {'Content-Type': 'text/html'})\n \n var fullBody = '';\n req.on('data', function(chunk) {\n fullBody += chunk.toString();\n });\n \n req.on('end', function() {\n var parsedBody = querystring.parse(fullBody);\n var fullPathFileName = path.join(__dirname, 'uploads', clientMap[req.parsedUrl.parsedQuery.upload_uuid].id, 'description.txt');\n var fileStream = fs.createWriteStream(fullPathFileName);\n fileStream.addListener('error', function(err) {\n logger.error('Could not write to description file: ' + err);\n res.write('Could not create description file, please try again!');\n res.end();\n });\n fileStream.write(parsedBody.descriptionText, 'utf-8');\n fileStream.end();\n \n // notify end state\n clientMap[req.parsedUrl.parsedQuery.upload_uuid].state = 'done';\n \n // output the decoded data to the HTTP response \n res.write('<br><br>Thank you for using SuperUpload! Your file has been stored at: <br><br>');\n res.write(clientMap[req.parsedUrl.parsedQuery.upload_uuid].url);\n res.write('<br><br>Along with the description:<br>\"');\n res.write(parsedBody.descriptionText + '\"');\n res.end();\n });\n}", "function sink() {}", "function sink() {}", "function testGet(sender) {\n return http.get({\n // host: 'jsonplaceholder.typicode.com',\n // path: '/posts'\n\t \n\t host: 'api.myjson.com',\n path: '/bins/2gmu8'\n },\n\n function(response) {\n // Continuously update stream with data\n var body = '';\n response.on('data', function(d) {\n body += d;\n });\n \n response.on('end', function() {\n\t\t//console.log(body[0].fName)\n\t\tconsole.log(body)\n\t\t//console.log(body.no)\n\t\tget_object = JSON.stringify(body)\n\t\t//var print = body[0].fName // ERROR : undifined \n\t\tvar print = body.fName\n\t\tconsole.log(print)\n\t\tsendTextMessage(sender, get_object)\n\t\tsendTextMessage(sender, body)\n\t\t//sendTextMessage(sender, print) ERROR : Invalid data\n // Data reception is done, do whatever with it!\n var parsed = JSON.parse(body);\n \n });\n \n });\n}", "function NodeFsHandler() {}", "function NodeFsHandler() {}", "async pull (ctrl) {\n\n const { value, done } = iterator.next()\n const pandoraBoxStream = value;\n\n if (done) return ctrl.close()\n\n // do something with value\n\n if (pandoraBoxStream.type === PandoraStreamType.PANDORA_LOCATION_TYPE_DIRECTORY){\n\n if (pandoraBoxStream.path !== '/')\n ctrl.enqueue({\n name: pandoraBoxStream.path,\n lastModified: new Date(0),\n folder: true\n });\n\n } else if (pandoraBoxStream.type === PandoraStreamType.PANDORA_LOCATION_TYPE_STREAM){\n\n const {chunksCount} = pandoraBoxStream\n let i = 0\n\n const mystream = new ReadableStream({\n start (ctrl) {\n // return a promise if you have to wait for something\n // or remove this altogether\n },\n async pull (ctrl) {\n\n const buffer = await self.getLocationStreamChunk( pandoraBoxStream, i);\n if (stopped) throw 'stopped';\n\n ctrl.enqueue(buffer)\n if (++i === chunksCount) ctrl.close() // done writing this file now\n },\n cancel() {\n // something cancel\n // user could have cancel from browser UI\n // You could remove this also...\n }\n })\n\n ctrl.enqueue({\n name: pandoraBoxStream.path,\n lastModified: new Date(0),\n stream () {\n // You could also move all of the above in here too.\n // (thought it created too much indentation)\n return mystream\n },\n });\n\n }\n\n }", "static applyStream(stream) {\n\t\tif (!this.stream)\n\t\t\tthis.stream = stream\n\t\tthis._resHeaders = {}\n\t}", "function index(req,res){\n const stat = fs.statSync('./index.html')\n res.writeHead(200,{\n \"Content-Type\":\"text/html\",\n \"Content-Lenght\":stat.size\n })\n const readStream = fs.createReadStream('./index.html');\n readStream.pipe(res)\n //res.write(\"index\");\n //res.end();\n}", "consume() {}", "function receive(data) {\n console.log('response:', Object.keys(data));\n // extract stats property\n // transform Object to text\n // call writeFile function\n writeFile(JSON.stringify(data.stats));\n}", "function returnHandler(data){\n allHandle(data);\n }", "async index({request, response}) {\r\n\r\n\t\t\r\n\t}", "async toStream() {\n return {\n url: await this.getStreamUrl(),\n id: this.getId(),\n name: await this.getName(),\n status: await this.getStatus()\n }\n }", "_onResponse(msg) {\n let _this = this;\n\n let event = {\n type: msg.type,\n url: msg.body.source,\n code: msg.body.code\n };\n\n if (_this._onResponseHandler) {\n _this._onResponseHandler(event);\n }\n }", "function processResponse(){\n //\n }", "responseHandler(res, retObj) {\n const outString = JSON.stringify(retObj)\n res.writeHead(retObj.error? 500:200, {\n 'Access-Control-Allow-Origin': this.acao,\n 'Content-Length': Buffer.byteLength(outString, 'utf8'),\n 'Content-Type': 'application/json;charset=utf-8'\n })\n res.end(outString)\n }", "function createDocumentStream(id_prefix, stats) {\n\n return through.obj(\n function write(record, enc, next) {\n const transform = transformation('EPSG:3301', 'EPSG:4326');\n\n const maakond = record.TASE1_NIMETUS_LIIGIGA.trim();\n /*\n omavalitsus (vald või omavalitsuslik linn).\n */\n const omavalitsus = record.TASE2_NIMETUS_LIIGIGA.trim();\n /*\n asula (küla, alevik, alev, omavalitsuse sisene linn) ja linnaosa.\n */\n const asula = record.TASE3_NIMETUS_LIIGIGA.trim();\n /*\n liikluspind (nt tänav, puiestee, tee).\n */\n const street = record.TASE5_NIMETUS_LIIGIGA.trim();\n /*\n maaüksuse nimi (võib olla kohanimi).\n */\n const place = record.TASE6_NIMETUS_LIIGIGA.trim();\n /*\n aadressinumber\n (maaüksuse või hoone number vajaduse korral koos eristava numbri või tähega e tähtlisandiga).\n */\n const number = record.TASE7_NIMETUS_LIIGIGA.trim();\n\n let name;\n let venue = false;\n let locality = false;\n const getStreetWithOrWithoutNumber = (str, num) => num ? str + ' ' + num : str;\n\n name = place || getStreetWithOrWithoutNumber(street, number) || asula || omavalitsus || maakond;\n if (isBlank(street) && isBlank(place) && isBlank(number)) {\n venue = true;\n }\n\n const addrId = record.ADR_ID.trim();\n //addr fields 'name', 'number', 'unit', 'street', 'cross_street', 'zip'\n try {\n // console.log('before try - record: 1-' + record.TASE1_NIMETUS_LIIGIGA,\n // ' 2-', record.TASE2_NIMETUS_LIIGIGA, ' 5-', record.TASE5_NIMETUS_LIIGIGA,\n // ' 6-', record.TASE6_NIMETUS_LIIGIGA,' 7-', record.TASE7_NIMETUS_LIIGIGA,\n // ' x-', record.VIITEPUNKT_X,' y-', record.VIITEPUNKT_Y);\n const coordinates = transform.forward(\n {x: parseFloat(record.VIITEPUNKT_X), y: parseFloat(record.VIITEPUNKT_Y)}\n );\n const addrDoc = new peliasModel.Document('openaddresses',\n (venue ? 'venue' : locality ? 'locality' : 'address'), addrId)\n .setName('default', name)\n .setCentroid({lon: coordinates.x, lat: coordinates.y});\n\n if (number && number.length > 0) {\n addrDoc.setAddress('number', number);\n }\n if (street && street.length > 0) {\n addrDoc.setAddress('street', street);\n }\n\n //add region, county, localadmin, locality\n if (maakond && maakond.length > 0) {\n addrDoc.addParent('region', maakond, 'r:' + addrId);\n }\n if (omavalitsus && omavalitsus.length > 0) {\n addrDoc.addParent('county', omavalitsus, 'c:' + addrId);\n }\n if (place && place.length > 0) {\n addrDoc.addParent('localadmin', place, 'la:' + addrId);\n }\n if (asula && asula.length > 0) {\n addrDoc.addParent('locality', asula, 'l:' + addrId);\n }\n\n this.push(addrDoc);\n } catch (ex) {\n console.log(ex.message);\n console.log('record: 1-' + record.TASE1_NIMETUS_LIIGIGA,\n ' 2-' + record.TASE2_NIMETUS_LIIGIGA, ' 3-' + record.TASE3_NIMETUS_LIIGIGA,\n ' 5-' + record.TASE5_NIMETUS_LIIGIGA, ' 6-' + record.TASE6_NIMETUS_LIIGIGA,\n ' 7-' + record.TASE7_NIMETUS_LIIGIGA,\n ' x-' + record.VIITEPUNKT_X, ' y-' + record.VIITEPUNKT_Y);\n stats.badRecordCount++;\n }\n\n next();\n }\n );\n}", "function dataHandler(data) { console.log(data); }", "function debugObjectReadStream(rs, name) {\n rs.pipe(new Transform({\n objectMode: true,\n transform: (chunk, enc, next) => {\n const s = JSON.stringify(chunk, null, 2)\n console.log(`Some data from ${name} rs: `)\n next(null, `${s}\\r\\n`)\n },\n })).pipe(process.stdout)\n}", "function handleRequest(req, res){\n try {\n // if the request is POST and has the right URL pass to next function to process further\n if(req.method === 'POST' && req.url === '/allocatestream') {\n var buffer = '';\n var requestBody;\n //as data comes read the buffer and store to jsonString\n req.on('data', function(data) {\n buffer += data;\n });\n\n req.on('end', function () {\n try {\n requestBody = JSON.parse(buffer);\n }\n catch (ex) {\n requestBody = \"\";\n }\n //response will always be encoded as json\n res.setHeader('Content-Type', 'application/json');\n // first check if request is parsed correctly\n if(requestBody != \"\") {\n //passRequest takes request body and the response\n passRequest(requestBody, res);\n }\n // return 400 and error message for malformed or null request body\n else {\n res.statusCode = 400;\n res.end(JSON.stringify(inValidRequestErrorMessage));\n }\n });\n }\n } catch (error) {\n console.log(error);\n }\n}", "function Sread() {\r\n}", "function handler (request, response) {\n\n\trequest.addListener('end', function () {\n fileServer.serve(request, response); // this will return the correct file\n });\n}", "function customHandling() { }", "getHandle() {\nreturn this._buffer;\n}", "function dataHandler(chunk, numer)\n{\n var i;\n for (i = camz[numer].clients.length; i--;) {\n camz[numer].clients[i].write(chunk, 'binary');\n }\n}", "requestRemoteData(handler) {\n }", "function handler(req, res) {\n // If we get our custom header, do streaming, if not; return the html file.\n if (req.headers['x-stream'] === 'rockon') {\n return handleStream(req, res);\n }\n handleStatic(req, res);\n}", "pushFromBuffer() {\n let stream = this.stream;\n let chunk = this.buffer.shift();\n // Stream the data\n try {\n this.shouldRead = stream.push(chunk.data);\n }\n catch (err) {\n this.emit(\"error\", err);\n }\n if (this.options.emit) {\n // Also emit specific events, based on the type of chunk\n chunk.file && this.emit(\"file\", chunk.data);\n chunk.symlink && this.emit(\"symlink\", chunk.data);\n chunk.directory && this.emit(\"directory\", chunk.data);\n }\n }", "function middleware(request, response, next) {}", "ohlcv() {\n const self = this\n const stream = new Transform({\n objectMode: true,\n transform(chunk, encoding, callback) {\n self.analyze(chunk, callback)\n }\n })\n return stream\n }" ]
[ "0.59518236", "0.5901846", "0.5779123", "0.5779123", "0.568068", "0.568068", "0.568068", "0.56542563", "0.56542563", "0.56542563", "0.56542563", "0.56542563", "0.56542563", "0.56542563", "0.56542563", "0.56542563", "0.56542563", "0.56542563", "0.55586964", "0.55520046", "0.5525887", "0.5497064", "0.547289", "0.54664445", "0.542992", "0.5417456", "0.54070884", "0.5351757", "0.5348741", "0.531418", "0.5302747", "0.5289435", "0.52829826", "0.5275907", "0.5272937", "0.5250119", "0.5239939", "0.52386284", "0.52218205", "0.5208978", "0.52027357", "0.52027357", "0.52027357", "0.52027357", "0.5197749", "0.51823336", "0.5181445", "0.5168815", "0.51539505", "0.51529753", "0.5137005", "0.51364225", "0.5121614", "0.5117623", "0.51139474", "0.51096827", "0.51010066", "0.50986665", "0.509851", "0.50961876", "0.50959843", "0.5094862", "0.5079278", "0.5074957", "0.5067293", "0.50548244", "0.50546867", "0.5052557", "0.50516176", "0.504742", "0.5020771", "0.50205934", "0.50205934", "0.5018306", "0.49967465", "0.49967465", "0.49957922", "0.4993134", "0.49903545", "0.4986597", "0.4986243", "0.49819347", "0.49748826", "0.49722147", "0.496822", "0.4957407", "0.49524164", "0.4951919", "0.49380687", "0.4936016", "0.4934594", "0.49336287", "0.4929055", "0.49280548", "0.49249482", "0.49236962", "0.49185297", "0.49178192", "0.49069333", "0.4906846", "0.49019718" ]
0.0
-1
Uses a const keyword for ensuring that the value remains the same. This will give an error if there is an attempt to change it. Adding const variables using all capitalization and undersores for spaces is good practice.
function printManyTimes(str) { "use strict"; // change code below this line const SENTENCE = str + " is cool!"; for(let i = 0; i < str.length; i+=2) { console.log(SENTENCE); } // change code above this line }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function CONST(){\n const a=100; //cannot be changed\n x=\"abcd\"\n //const x; not allowed**\n document.getElementById('i').innerHTML=x; //dont output anything\n}", "function exampleConst(){\n\tconst sample = 2\n\tconsole.log(sample)\n\tsample = 10 \n\tconsole.log(sample)\n}", "function testconstant(){\n\t//d=\"test1\" error assignment to constant variable\n\tconst d=\"test1\";\n\tconsole.log(d);\n}", "function sample() {\r\n var a = 5;\r\n \r\n if (true) {\r\n const a = 10; \r\n console.log(\"var with Const : \"+ a); // Output: var with Const : 10\r\n }\r\n}", "function sample() {\r\n const a = 5;\r\n \r\n if (true) {\r\n let a = 10; \r\n console.log(\"const with let: \" + a); // Output: const with let: 10\r\n }\r\n}", "function constScope(){\n const thisIsConst = \"blockScoped\"; // the const variable is only accesible within this function scope.\n return \"const variables are\" + \" \" + constScope + \" \" + \"and cannot be redclared nor updated.\";\n}", "function Constants() {}", "function Constants() {}", "function constObjects() {\n const name = {\n person: \"reefath\"\n }\n \n name.person = \"tesla\"\n \n return name.person;\n}", "function lol() {\n let person = 'Tom';\n const age = 45;\n var color = 'teal';\n console.log(age);\n}", "function Constants() {\n throw new Error('Constants should not be instantiated!');\n}", "function constantobjects() {\n const user = {\n name: \"John\"\n };\n\n console.log(user.name);\n\n // does it work? // yes\n user.name = \"Pete\";\n console.log(user.name);\n}", "function describeConst(val) {\n return {\n writable: false,\n enumerable: false,\n configurable: false,\n value: val\n };\n}", "function $const_set(cref, name, value) {\n var new_const = true;\n\n if (cref == null || cref === '::') cref = _Object;\n\n if (value.$$is_a_module) {\n if (value.$$name == null || value.$$name === nil) value.$$name = name;\n if (value.$$base_module == null) value.$$base_module = cref;\n }\n\n cref.$$const = (cref.$$const || Object.create(null));\n\n if (name in cref.$$const || (\"$$autoload\" in cref && name in cref.$$autoload)) {\n new_const = false;\n }\n\n cref.$$const[name] = value;\n\n // Add a short helper to navigate constants manually.\n // @example\n // Opal.$$.Regexp.$$.IGNORECASE\n cref.$$ = cref.$$const;\n\n Opal.const_cache_version++;\n\n // Expose top level constants onto the Opal object\n if (cref === _Object) Opal[name] = value;\n\n // Name new class directly onto current scope (Opal.Foo.Baz = klass)\n $prop(cref, name, value);\n\n if (new_const && cref.$const_added && !cref.$const_added.$$pristine) {\n cref.$const_added(name);\n }\n\n return value;\n }", "function doSomething(val) {\n \"use strict\";\n x = val + 10; // let x = val + 10;\n}", "function varOrConst() {\n console.log(varone);\n console.log(vartwo);\n\n var varone = 1;\n const vartwo = 2;\n}", "function replace_const_with_let(src) {\n\t// This is a poor man's version of a parser:\n\t// we want to replace all `const` declarations\n\t// with `let`, in order to be able to __set__ them.\n\t// This method with a regex is not perfect, but works well enough,\n\t// although it doesn't cover one use case: the reassignment of a\n\t// variable that has been declared with `const`.\n\treturn src.replace(matchConst, \"$1let $2\") // replace const with let, while maintaining the column width\n}", "function constant_function() {\n const Stones = {type:\"metamorphic\", name:\"Quartzite\", color:\"white\"};\n Stones.density = \"2.7 g/cm^3\"; //added new property and value\n document.getElementById(\"Constant\").innerHTML = Stones.name + \" is a \" + Stones.type + \" rock. Its color is typically \" + Stones.color + \" and has a density of \" + Stones.density;\n}", "function myfun(){\r\n var b=20;\r\n console.log(a);\r\n console.log(b);\r\n console.log(aa);\r\n const myconst = [4,5,6];\r\n\r\n let ab = \"outside\";\r\n var ac = \"outside\";\r\n if (true){\r\n var c =45;\r\n // const myconst = [8,5,6];\r\n let ab = \"inside\";\r\n var ac = \"inside\"\r\n console.log(myconst);\r\n console.log(c);\r\n console.log(ab);\r\n }\r\n // console.log(myconst);\r\n console.log(ab);\r\n console.log(ac);\r\n}", "const(nameOrPrefix, rhs, _constant) {\n return this._def(scope_1.varKinds.const, nameOrPrefix, rhs, _constant);\n }", "function main(input) {\n const a = input;\n\n // This will throw \"SyntaxError: Missing initializer in const declaration\"\n // const b;\n\n console.log(a);\n}", "function freezeObj() {\n 'use strict';\n const MATH_CONSTANTS = {\n PI: 3.14\n };\n // Only change code below this line\nObject.freeze(MATH_CONSTANTS);\n\n // Only change code above this line\n try {\n MATH_CONSTANTS.PI = 99;\n } catch(ex) {\n console.log(ex);\n }\n return MATH_CONSTANTS.PI;\n}", "function exaqmple5() {\n var b = 1;\n // b = 10 // * Error:e b is read-only\n}", "function constant_function() {\n const Fruit = {smell:\"ripe\", color:\"brown\", taste:\"sweet and seedy\"};\n Fruit.color = \"green\";\n Fruit.price = \"$1\";\n document.getElementById(\"Constant\").innerHTML = \"Kiwis that smell \" + Fruit.smell + \" should cost \" + Fruit.price + \" and they will taste \" + Fruit.taste +\".\" \n + \"<br>\" + \"Kiwis that are \" + Fruit.color + \" should be fine. \";\n}", "function check1() {\n return x + y;\n let x = 10;\n const y = 1;\n}", "function check1() {\n return x + y;\n let x = 10;\n const y = 1;\n}", "function freezeObj() {\n \"use strict\";\n const MATH_CONSTANTS = {\n PI: 3.14\n };\n // change code below this line\n Object.freeze(MATH_CONSTANTS);\n\n // change code above this line\n try {\n MATH_CONSTANTS.PI = 99;\n } catch( ex ) {\n console.log(ex);\n }\n return MATH_CONSTANTS.PI;\n}", "function unaFuncion(){\n const unValorConstante = 200;\n console.log(unValorConstante);\n}", "function freezeObj() {\n \"use strict\";\n const MATH_CONSTANTS = {\n PI: 3.14\n };\nObject.freeze(MATH_CONSTANTS);\n try {\n MATH_CONSTANTS.PI = 99;\n } catch( ex ) {\n console.log(ex);\n }\n return MATH_CONSTANTS.PI;\n}", "function constant_function() {\n const dog = {breed:\"labrador retriever\", cost:\"$500\", age:\"9 weeks\"};\n dog.sex = \"female\";\n dog.name = \"Lady\";\n dog.name = \"Charlie\";\n dog.toy = \"tennis ball\";\n document.getElementById(\"Constant\").innerHTML = \"The name of the \" + dog.breed + \" was \" + dog.name + \", and their favorite toy was a \" + dog.toy + \".\";\n}", "function foo() {\n const name = 'test';\n}", "function freezeObj() {\n 'use strict';\n const MATH_CONSTANTS = {\n PI: 3.14\n };\n // change code below this line\n Object.freeze(MATH_CONSTANTS);\n \n // change code above this line\n try {\n MATH_CONSTANTS.PI = 99;\n } catch(ex) {\n console.log(ex);\n }\n return MATH_CONSTANTS.PI;\n }", "function test_const() {\n let st: string = 'abc';\n\n for (let i = 1; i < 100; i++) {\n const fooRes: ?string = \"HEY\";\n if (!fooRes) {\n break;\n }\n\n st = fooRes; // no error\n }\n\n return st;\n}", "function freezeObj(){\n \"use strict\";\n const MATH_CONSTANTS={\n PI:3.14\n };\n \n Object.freeze(MATH_CONSTANTS);\n \n try{\n MATH_CONSTANTS.PI=99;\n }catch(ex){\n console.log(ex);\n }\n return MATH_CONSTANTS.PI;\n}", "function constant_Function() {\n const greeting = {beginning:\"Hello \", honorific:\"Sir\", end:\", how are you today? \"}; //sets up greeting constant with 3 parts\n greeting.honorific = \"Friend\"; //changes the honorific of greeting\n greeting.next_line = \"What are you up to?\" //adds another line to the constant\n document.getElementById(\"Constant\").innerHTML = greeting.beginning + greeting.honorific + greeting.end + greeting.next_line; //displays the sentance using the constant strings\n}", "function freezeObj() {\n \"use strict\";\n const MATH_CONSTANTS = {\n PI: 3.14\n };\n\n Object.freeze(MATH_CONSTANTS);\n\n try {\n MATH_CONSTANTS.PI = 99;\n } catch (ex) {\n console.log(ex);\n }\n return MATH_CONSTANTS.PI;\n}", "function attrConstant() {\n this.setAttribute(name, value);\n }", "function attrConstant() {\n this.setAttribute(name, value);\n }", "function secondFunction(){\r\n\tlet numLet = 100;\r\n\tvar numVar = 200;\r\n\tlet NUM_CONST = 300;\r\n\r\n\tconsole.log(\"Redeclared numLet from inside secondFunction\",numLet);\r\n\tconsole.log(\"Redeclared numVar fron inside secondFunction\",numVar);\r\n\r\n}", "constHandler() {\n\t\tlet constant = this.m_constMenu.value;\n\t\tlet constUnit = this.m_constUnitMenu.value;\n\t\tif(constant != \"\" && constUnit != \"\") {\n\t\t\tlet value = this.CALCULATOR.getConst(constant, constUnit);\n\t\t\tthis.m_constOutput.value = value;\n\t\t}\n\t\telse {\n\t\t\tconsole.log(\"constHandler received an empty value\");\n\t\t}\n\t}", "function sayHi() {\n if (true) {\n let firstname = 'Marv';\n const lastname = 'cc';\n }\n\n //console.log(firstname, lastname); //firstname and lastname is not defined\n}", "rmFaveConst() {\n\t\tthis.m_faves.constant = \"\";\n\t\tthis.m_faves.constUnit = \"\";\n\t\tthis.updateStar(1);\n\t}", "function constant(name) {\n\t\treturn getProperty(CONST, name);\n\t}", "function attrConstant() {\n this.setAttribute(name, value);\n }", "function propertyConstant() {\n this[name] = value;\n }", "function propertyConstant() {\n this[name] = value;\n }", "function sayHi() {\n const name = 'max'\n}", "function changeSecretNumber() {\n function resetScore() {\n _score = 20;\n _highScore = 0;\n }\n\n let _secretNumber = 0;\n let _score = 20;\n let _highScore = 0;\n}", "function ConstantSet(overrides){\r\n \"use strict\";\r\n if (overrides) {\r\n ChangeValues(this, overrides);\r\n }\r\n}", "function freezeObj() {\n \"use strict\";\n const MATH_CONSTANTS = {\n PI: 3.14\n };\n Object.freeze(MATH_CONSTANTS);\n try {\n MATH_CONSTANTS.PI = 99;\n } catch (ex) {\n console.log(\"Phew\");\n }\n return MATH_CONSTANTS.PI;\n}", "function noConst(x) {\n return x * x;\n}", "function local() {\n let localNumber = 4\n const localConst = 5\n console.log(localNumber, localConst)\n}", "function ApplicationEditPageConstants() {\n }", "beConstantValueOf() {\n this._processArguments(arguments);\n this._printActualForFailure = false;\n\n let passed = true;\n let passDetail, failDetail;\n let errors = {};\n\n let actual = this._actual;\n let expected = this._expected;\n for (let index = 0; index < actual.length; ++index) {\n if (actual[index] !== expected)\n errors[index] = actual[index];\n }\n\n let numberOfErrors = Object.keys(errors).length;\n passed = numberOfErrors === 0;\n\n if (passed) {\n passDetail = '${actual} contains only the constant ${expected}.';\n } else {\n let counter = 0;\n failDetail =\n '${actual}: Expected ${expected} for all values but found ' +\n numberOfErrors + ' unexpected values: ';\n failDetail += '\\n\\tIndex\\tActual';\n for (let errorIndex in errors) {\n failDetail += '\\n\\t[' + errorIndex + ']' +\n '\\t' + errors[errorIndex];\n if (++counter >= this._options.numberOfErrors) {\n failDetail +=\n '\\n\\t...and ' + (numberOfErrors - counter) + ' more errors.';\n break;\n }\n }\n }\n\n return this._assert(passed, passDetail, failDetail);\n }", "function Constants() {\n if (currentToken() == \"constantes\") {\n nextToken();\n if (currentToken() == \"{\") {\n nextToken();\n ConstBody();\n if (currentToken() == \"}\") {\n nextToken();\n return;\n }\n }\n } else {\n let errorMessage = \"Bloco obrigatório de constantes não encontrado\";\n handleError(errorMessage);\n }\n }", "function propertyConstant() {\n this[name] = value;\n }", "function freezeObject() {\n const MATH_CONSTANT = {\n PI: 3.14,\n };\n\n Object.freeze(MATH_CONSTANT);\n\n try {\n MATH_CONSTANT.PI = 99;\n } catch (ex) {\n console.log(ex);\n }\n return MATH_CONSTANT.PI;\n}", "function freezeObj() {\n const MATH_CONSTANTS = {\n PI: 3.14\n };\n\n Object.freeze(MATH_CONSTANTS);\n\n try {\n MATH_CONSTANTS.PI = 99;\n } catch( ex ) {\n console.log(ex);\n }\n return MATH_CONSTANTS.PI;\n}", "function h() {\n console.log(CONST_VAR);\n}", "function setProperty(objConstantParent, strConstantProperty, varConstantValue) {\n\t\tvar blnChanged = false;\n\n\t\tstrAction= \"getting the current value of the property\";\n\t\tvar varCurValue = objConstantParent[strConstantProperty];\n\n\t\tstrAction = \"checking if current value of property is different from the input value\";\n\t\tif (varCurValue != varConstantValue) {\n\t\t\tstrAction = \"setting the format constant to the input value \" + varConstantValue;\n\t\t\tobjConstantParent[strConstantProperty] = varConstantValue;\n\t\t\tblnChanged = true;\n\t\t} //end if\n\n\t\treturn blnChanged;\n} //end setProperty", "function changeValue(name) {\n name = \"Thang\";\n // var name = \"TEST\";\n console.log(\"name: \", name);\n // var number = 1;\n}", "function styleConstant() {\n this.style.setProperty(name, value, priority);\n }", "function styleConstant() {\n this.style.setProperty(name, value, priority);\n }", "function returnTwo() {\n return 2; // otherwise it should rather just be a constant.\n}", "notBeConstantValueOf() {\n this._processArguments(arguments);\n this._printActualForFailure = false;\n\n let passed = true;\n let passDetail;\n let failDetail;\n let differences = {};\n\n let actual = this._actual;\n let expected = this._expected;\n for (let index = 0; index < actual.length; ++index) {\n if (actual[index] !== expected)\n differences[index] = actual[index];\n }\n\n let numberOfDifferences = Object.keys(differences).length;\n passed = numberOfDifferences > 0;\n\n if (passed) {\n let valueString = numberOfDifferences > 1 ? 'values' : 'value';\n passDetail = '${actual} is not constantly ${expected} (contains ' +\n numberOfDifferences + ' different ' + valueString + ').';\n } else {\n failDetail = '${actual} should have contain at least one value ' +\n 'different from ${expected}.';\n }\n\n return this._assert(passed, passDetail, failDetail);\n }", "function renderVaraibles() {\n var test = 20;\n let test1 = 30;\n if (test == 20) {\n var test4 = 40;\n const test5 = 60;\n hello = \"hello\";\n\n // console.log(hello);\n }\n // console.log(hello);\n}", "_optimizeConstants(start, end) {\n let n = start;\n for (; n && n != end;) {\n if (n.kind == \"if\") {\n if (n.next.length > 1) {\n this._optimizeConstants(n.next[1], n.blockPartner);\n }\n }\n if (n.kind == \"const\" && n.assign.writeCount == 1 && !n.assign.addressable) {\n n.assign.isConstant = true;\n n.assign.constantValue = n.args[0];\n let n2 = n.next[0];\n Node.removeNode(n);\n n = n2;\n }\n else {\n /* for(let i = 0; i < n.args.length; i++) {\n let a = n.args[i];\n if (a instanceof Variable && a.isConstant && typeof(a.constantValue) == \"number\") {\n n.args[i] = a.constantValue;\n }\n } */\n n = n.next[0];\n }\n // TODO: Computations on constants can be optimized\n }\n }", "function constant(value) {\n return new Constant(value)\n}", "function constant_function() {\n const breadType = {type:\"sandwich\", shape:\"loaf\", flavor:\"whole wheat\"}\n breadType.price = \"$2.50\";\n breadType.topping = \"mustard\";\n breadType.flavor = \"multigrain\"\n console.log(breadType.topping);\n document.getElementById(\"Constant\").innerHTML = \"I had a good \" + breadType.type + \" on a \"\n + breadType.flavor + \" \" + breadType.shape + \" with \" + breadType.topping + \". \"\n + \"It cost \" + breadType.price;\n}", "function constant_function() {\r\n dog.Breed = \"terrier\";\r\n dog.activity = \"lazy\";\r\n document.getElementById(\"Constant\").innerHTML = \"My dogs name is \" + dog.Name +\r\n \", he is a \" + dog.Breed + \" and 2 years old. He is a \" + dog.Gender + \", with \" +\r\n dog.Color + \" coloring. He is very \" + dog.activity + \".\";\r\n}", "constant(name, value) {\n return this.singleton(name, () => value);\n }", "function _const() {\n return function() {\n this.__init(arguments);\n return this;\n };\n}", "function $Const(strConstant)\n{\n\tif (Vixen.Constants[strConstant] == undefined)\n\t{\n\t\tthrow(\"ERROR: constant: '\"+ strConstant +\"' is undefined\");\n\t\treturn;\n\t}\n\t\n\treturn Vixen.Constants[strConstant];\n}", "parseMaybeConst () {\n const constToken = this.getToken();\n if(constToken.type === this.lexerClass.RK_CONST) {\n this.pos++;\n const typeString = this.parseType();\n return this.parseDeclaration(typeString, true);\n } else if(this.isVariableType(constToken)) {\n const typeString = this.parseType();\n return this.parseDeclaration(typeString);\n } else {\n throw SyntaxErrorFactory.token_missing_list(\n [this.lexer.literalNames[this.lexerClass.RK_CONST]].concat(this.getTypeArray()), constToken);\n }\n\n }", "function testStrictNotEqual(val) {\n // Only Change Code Below this Line\n\n if (val !== 17) {\n\n // Only Change Code Above this Line\n\n return \"Not Equal\";\n }\n return \"Equal\";\n}", "function func1(){\n var hey = 10;\n var hey = 20; // BAD PRACTICE!\n console.log(hey);\n }", "addConstants(...constants) {\n constants.forEach(constant => {\n // allow functions, we pass in current constants\n if (typeof constant === 'function')\n constant = constant(UI.constants);\n\n Object.assign(UI.constants, constant);\n });\n }", "function BaseConstant(value) {\n return {\n type: \"constant\",\n value: () => value\n }\n}", "function styleConstant() {\n this.style.setProperty(name, value, priority);\n }", "function add() {\n // number2 = 10; //nie nadpisze wartości stałej const ;p\n // const number2 = 10;\n // console.log(number1 + number2);\n }", "switchToFaveConst() {\n\t\tif(this.m_faves.constant !== \"\") {\n\t\t\tthis.m_constMenu.value = this.m_faves.constant;\n\t\t\tthis.constChange();\n\t\t\tthis.m_constUnitMenu.value = this.m_faves.constUnit;\n\t\t\tthis.constHandler();\n\t\t\tthis.updateStar(1);\n\t\t}\n\t}", "_constants()\n {\n this.CREATED_AT = CREATED_AT;\n this.UPDATED_AT = UPDATED_AT;\n this.PRIMARY_KEY = PRIMARY_KEY;\n }", "function setConstants() {\n squareConfigs.constantValues = {\n x: squareConfigs.dimensions.x,\n y: squareConfigs.dimensions.y,\n w: squareConfigs.dimensions.w,\n h: squareConfigs.dimensions.h,\n\n actuallyConstantX: squareConfigs.dimensions.x,\n actuallyConstantY: squareConfigs.dimensions.y,\n actuallyConstantW: squareConfigs.dimensions.w,\n actuallyConstantH: squareConfigs.dimensions.h,\n colors: {r: squareConfigs.colors.r, g: squareConfigs.colors.g, b: squareConfigs.colors.b},\n transformationColor: {r: squareConfigs.transformationColor.r, g: squareConfigs.transformationColor.g, b: squareConfigs.transformationColor.b, special: squareConfigs.transformationColor.special}\n }\n}", "function CONST(key) {\n return exports.constants[key];\n}", "function testStrictNotEqual(val) {\n // Only Change Code Below this Line\n if (val !== 22) {\n // Only Change Code Above this Line\n return \"Not Equal\";\n }\n return \"Equal\";\n}", "function testStrictNotEqual(val) {\n // Only Change Code Below this Line\n if (val !== 17) {\n // Only Change Code Above this Line\n return \"Not Equal\";\n }\n return \"Equal\";\n}", "function f2 ()\r\n{\t\r\n\tif( true === true ) \r\n{\r\n\tconst con3 = \"variable3\"; // have scope in only IF block \r\n\tconsole.log(\"=====IF Block=====\");\r\n\tconsole.log(\"constant : \" + con1); \r\n \tcon1 = \"updated_variable \"; // it will throw an error as we cant reassign the const variable\r\n\tconsole.log(\"constant : \" + con1); // it will not work \r\n\tconsole.log(\"constant : \" + con2); // it will work , con2 is in scope\r\n\tconsole.log(\"constant : \" + con3); // it will work , con3 is in scope;\r\n}\r\n\tconsole.log(\"====Main Block====\");\r\n\tconsole.log(\"constant : \" + con1); // it will not work \r\n\tconsole.log(\"constant : \" + con2); // it will work , con2 is in scope\r\n\tconsole.log(\"constant : \" + con3); // it will not work , con3 is out of scope;\r\n}", "function testShadow(){\n const a = 5;\n if(true){\n const a = 10;\n console.log(a);\n }\n console.log(a);\n}", "function myFnc() {\n let name = 'user1';\n var age = 10;\n console.log(name, age)\n if(name == 'user1') {\n let age = 20;\n }\n console.log(name, age)\n}", "function example3() {\n var a = 1;\n // let a = 2 // * Error\n}", "function useConst(initialValue) {\n // Use useRef to store the value because it's the least expensive built-in hook that works here\n // (we could also use `const [value] = React.useState(initialValue)` but that's more expensive\n // internally due to reducer handling which we don't need)\n var ref = react__WEBPACK_IMPORTED_MODULE_0__.useRef();\n if (ref.current === undefined) {\n // Box the value in an object so we can tell if it's initialized even if the initializer\n // returns/is undefined\n ref.current = {\n value: typeof initialValue === 'function' ? initialValue() : initialValue,\n };\n }\n return ref.current.value;\n}", "function useConst(initialValue) {\n // Use useRef to store the value because it's the least expensive built-in hook that works here\n // (we could also use `const [value] = React.useState(initialValue)` but that's more expensive\n // internally due to reducer handling which we don't need)\n var ref = react__WEBPACK_IMPORTED_MODULE_0__.useRef();\n if (ref.current === undefined) {\n // Box the value in an object so we can tell if it's initialized even if the initializer\n // returns/is undefined\n ref.current = {\n value: typeof initialValue === 'function' ? initialValue() : initialValue,\n };\n }\n return ref.current.value;\n}", "function CONSTANT() {\n var _this = this;\n if (instance) {\n return instance;\n }\n _this = _super.call(this) || this;\n instance = _this;\n return instance;\n }", "function logScope(){\n var localVar = 2;\n const PI = 3.14; // once assigned don't change value.\n console.log(PI);\n //PI = 3; // it will throw Uncaught TypeError\n\n if (localVar){\n let localVar = \"This is different!\"; // when we use this variable belongs to this if scope only\n console.log(localVar);\n }\n\n console.log(localVar);\n}", "function changeVarName(ev) {\n if ($(this).val() === $(this).data('old-value')) { return; }\n if (appState.changeVarName($(this).val())) { return; }\n // failure in changing value\n $(this).val($(this).data('old-value'));\n alert('A variable with that name already exists!');\n}", "function constAllowed(path, options) {\n var disableConst = options.disableConst;\n\n if (typeof disableConst === 'function') {\n return !disableConst(path);\n } else {\n return !disableConst;\n }\n }", "function printFavoriteFruit() {\n // Stub function \n // REASSIGNMENT name = value; \n favoriteFruit = 'ananas'; // Reassignment name = value\n console.log('My favorite fruit is: ' + favoriteFruit);\n}", "function tp_const_string(constant)\n{\n\tswitch (constant) {\n\t\tcase ROW:\n\t\t\treturn 'row';\n\n\t\tcase COLUMN:\n\t\t\treturn 'column';\n\n\t\tcase TOP:\n\t\t\treturn 'top';\n\n\t\tcase RIGHT:\n\t\t\treturn 'right';\n\n\t\tcase BOTTOM:\n\t\t\treturn 'bottom';\n\n\t\tcase LEFT:\n\t\t\treturn 'left';\n\n\t\tcase TOP_LEFT:\n\t\t\treturn 'top left';\n\n\t\tcase TOP_RIGHT:\n\t\t\treturn 'top right';\n\n\t\tcase BOTTOM_RIGHT:\n\t\t\treturn 'bottom right';\n\n\t\tcase BOTTOM_LEFT:\n\t\t\treturn 'bottom left';\n\t}\n}", "function example4() {\n let alice = 1;\n const bob = 2;\n var carol = 3;\n {\n alice = \"a\";\n carol = \"c\";\n }\n console.log(\"example4 alice\" , alice);\n // output -> a\n console.log(\"example4 bob\" , bob);\n // output -> 2\n console.log(\"example4 carol\" , carol);\n // output -> c\n}", "function part_one_exercise_one(){\n const maxCapacity = 14\n let surfTime = true\n let bestStudent\n // const purposeInLife\n \n console.log(maxCapacity)\n console.log(surfTime)\n console.log(bestStudent)\n console.log(\"------\")\n // console.log(purposeInLife)\n}", "function stringsLiteral(){\n const x = \"todos\";\n const y = \"clase\";\n console.log(`Hola a ${x} los de la ${y}`);\n}" ]
[ "0.7078014", "0.67959726", "0.67059547", "0.64924973", "0.64003915", "0.6224799", "0.5992301", "0.5992301", "0.5979308", "0.5966982", "0.58742523", "0.58676326", "0.58656394", "0.58181554", "0.57870847", "0.5773419", "0.5749189", "0.57136905", "0.57128775", "0.56913376", "0.56711745", "0.5664208", "0.5645609", "0.5639421", "0.5627021", "0.5627021", "0.56038964", "0.5603749", "0.55584145", "0.5554414", "0.5552428", "0.5546349", "0.550116", "0.54945016", "0.54898465", "0.5458946", "0.5435058", "0.5435058", "0.5402326", "0.54021716", "0.53894293", "0.5372906", "0.53564155", "0.53549343", "0.53544754", "0.53544754", "0.53345156", "0.533049", "0.532989", "0.53246915", "0.5298645", "0.52888477", "0.5287048", "0.52849", "0.52833784", "0.52776045", "0.5261534", "0.52508473", "0.52366114", "0.5227651", "0.52275115", "0.5220489", "0.5220489", "0.5218927", "0.5210584", "0.51685077", "0.5156102", "0.5156009", "0.51508033", "0.5144912", "0.51392394", "0.5138944", "0.51324195", "0.51132554", "0.50830823", "0.50801057", "0.50756395", "0.5067804", "0.5061121", "0.5060379", "0.5051206", "0.50460804", "0.50449014", "0.5035467", "0.5034199", "0.5025039", "0.5017679", "0.5014487", "0.5006898", "0.5006474", "0.4995653", "0.4995653", "0.49872473", "0.4981102", "0.49679306", "0.49657267", "0.4957333", "0.49522132", "0.49411425", "0.49292052", "0.49265832" ]
0.0
-1
Append div1 and div2 to the outer div, hiddenInput
function addInput(linkDiv, TNDiv, descDiv) { var hiddenInput = document.createElement("div"); hiddenInput.appendChild(linkDiv); hiddenInput.appendChild(TNDiv); hiddenInput.appendChild(descDiv); document.getElementById("main__container").appendChild(hiddenInput); hiddenInput.setAttribute("type", "visible"); hiddenInput.setAttribute("class", "hiddenDivs"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "_attachHiddenDiv(ast, hiddenDiv) {\n const firstHtmlImport = dom5.query(ast, matchers.eagerHtmlImport);\n const body = dom5.query(ast, matchers.body);\n if (body) {\n if (firstHtmlImport &&\n dom5.predicates.parentMatches(matchers.body)(firstHtmlImport)) {\n parse5_utils_1.insertAfter(firstHtmlImport, hiddenDiv);\n }\n else {\n parse5_utils_1.prepend(body, hiddenDiv);\n }\n }\n else {\n dom5.append(ast, hiddenDiv);\n }\n }", "function AppendToDiv() {\n //must reset every time to make sure that there is no brake in name numbers, we need the numbers to send the list to controler\n TagContainer.empty();\n for (var i = 0; i < tagArray.length; i++) {\n var TagToAppend = \"<div class='addedTag \" + i + \"' name='Tag[\" + i + \"]' id = '\" + i + \"'>\" + tagArray[i] + \"</div>\";\n var hiddenInput = \"<input class='hiddenInput \" + i + \"' name='Tag[\" + i + \"]' value='\" + tagArray[i] + \"'/>\"\n TagContainer.append(TagToAppend);\n TagContainer.append(hiddenInput);\n var btn = $(\"#\" + i + \"\");\n btn.click(removeTag);\n }\n }", "function createInvisibleInputDiv(invisibleInputObj){\n // Exceptions\n var func = arguments.callee.toString().match(/function ([^\\(]+)/)[1];\n if (typeof invisibleInputObj!='object' || invisibleInputObj['objClass']!='Input'){\n throw `${func}: invisibleInputObj must be an input object.`;\n }\n if (invisibleInputObj['type']!='invisible'){\n throw `${func}: invisibleInputObj must be of type \"invisible\".`;\n }\n var id = invisibleInputObj['id'];\n var value = invisibleInputObj['defaultVal'];\n var returnStr = `\n <div id=\"${id}\" style=\"display:none;\">\n <input id=\"${id}Value\" value=\"${value}\">\n </div>\n `;\n return returnStr;\n }", "function addDiv() {\n const newDiv = document.createElement(\"div\");\n console.log(newDiv);\n const newInput = document.createElement(\"input\");\n newDiv.append(newInput);\n console.log(newInput);\n const root = document.getElementById(\"root\");\n console.log(root);\n root.append(newDiv);\n}", "appendInputs() {\n const that = this,\n firstInput = document.createElement('jqx-numeric-text-box'),\n secondInput = document.createElement('jqx-numeric-text-box');\n\n firstInput.inputFormat = 'floatingPoint';\n firstInput.nullable = true;\n firstInput.spinButtons = true;\n firstInput.value = null;\n secondInput.inputFormat = 'floatingPoint';\n secondInput.nullable = true;\n secondInput.spinButtons = true;\n secondInput.value = null;\n\n that.firstInput = firstInput;\n that.secondInput = secondInput;\n }", "function add()\r\n{\r\n\tvar instrucoes = document.getElementById('instrucoes');\r\n\tvar divs = instrucoes.getElementsByTagName('div');\r\n\tinstrucoes.appendChild(divs[0].cloneNode(true));\r\n\t// limpar input clonado\r\n\tvar last = divs[divs.length-1];\r\n\tlast.getElementsByTagName('input')[0].value = '';\r\n}", "appendInputs() {\n const that = this,\n firstInput = document.createElement('input'),\n secondInput = document.createElement('input');\n\n firstInput.classList.add('jqx-input');\n secondInput.classList.add('jqx-input');\n\n that.firstInput = firstInput;\n that.secondInput = secondInput;\n }", "function addHobbyInput() {\n addHobbyContainer.innerHTML = \"<hr\";\n addHobbyContainer.innerHTML += \"<b>add hobby</b>\";\n addHobbyContainer.innerHTML += \"<input type='text' id='add-hoby-name' class='hobby-name form-control' placeholder='name'>\";\n addHobbyContainer.innerHTML += \"<input type='text' id='add-hoby-desc' class='hobby-desciption form-control' placeholder='desciption'>\";\n $('#save-hobby').removeClass('hidden');\n $('#add-hobby').addClass('hidden');\n}", "appendHiddenDomNode(divId) {\n const div = `#${divId}`;\n\n if ($(div).length === 0) {\n $('body').append(`<span id=\"${divId}\">${this.SAMPLE_STR}</span>`);\n }\n\n $(div).css('position', 'relative');\n $(div).css('float', 'right');\n $(div).css('visibility', 'hidden');\n $(div).css('margin', '0');\n $(div).css('padding', '0');\n }", "appendInputs() {\n const that = this,\n firstInput = document.createElement('input'),\n secondInput = document.createElement('input');\n\n firstInput.placeholder = that.context.localize('placeholderValue');\n firstInput.setAttribute('aria-label', firstInput.placeholder);\n secondInput.placeholder = that.context.localize('placeholderValue');\n secondInput.setAttribute('aria-label', secondInput.placeholder);\n\n firstInput.classList.add('smart-input');\n secondInput.classList.add('smart-input');\n\n that.firstInput = firstInput;\n that.secondInput = secondInput;\n }", "function showDiv() {\n // template\n var f = $('#booking-form').clone();\n \n // add to list\n $('#others').append(f.fadeIn());\n}", "appendInputs() {\n const that = this,\n firstInput = document.createElement('smart-drop-down-list'),\n secondInput = document.createElement('smart-drop-down-list');\n\n firstInput.dataSource = [{ value: true, label: 'true' }, { value: false, label: 'false' }];\n firstInput.placeholder = that.context.localize('placeholderBoolean');\n firstInput.selectedIndexes = [];\n firstInput.selectionMode = 'zeroOrOne';\n secondInput.dataSource = [{ value: true, label: 'true' }, { value: false, label: 'false' }];\n secondInput.placeholder = that.context.localize('placeholderBoolean');\n secondInput.selectedIndexes = [];\n secondInput.selectionMode = 'zeroOrOne';\n\n that.firstInput = firstInput;\n that.secondInput = secondInput;\n }", "function addElement2(divName, fieldValue1, fieldValue2) {\n if (ElementCounter2 === ElementLimit2) {\n alert(\"You have reached the limit of adding \" + ElementCounter2 + \" \" + divName);\n } else {\n \n var tableRow = document.createElement('div');\n tableRow.id = \"RowElement\" + divName + ElementCounter2;\n tableRow.className = \"row\";\n\n var cell1 = document.createElement('div');\n cell1.id = \"cell1\";\n cell1.className = 'col-lg-5';\n \n var cell2 = document.createElement('div');\n cell2.id = \"cell2\";\n cell2.className = 'col-lg-5';\n\n var cell3 = document.createElement('div');\n cell3.id = \"cell3\";\n cell3.className = 'col-lg-1';\n\n /*-------------------------------------------*/\n var deleteButton = document.createElement('button');\n deleteButton.id = \"removeButton\" + ElementCounter2;\n deleteButton.className = 'btn btn-danger btn-xs';\n deleteButton.innerHTML = \"-\";\n deleteButton.setAttribute(\"onClick\", \"removeElement('\" + tableRow.id + \"');\");\n /*-------------------------------------------*/\n\n var newdiv = document.createElement('input');\n newdiv.id = divName + \"Name\" + ElementCounter2;\n newdiv.setAttribute(\"type\", \"text\");\n newdiv.name = divName + \"Name\";\n newdiv.className = \"form-control\";\n newdiv.value = fieldValue1;\n \n var newdiv2 = document.createElement('input');\n newdiv2.id = divName + \"Value\" + ElementCounter2;\n newdiv2.setAttribute(\"type\", \"text\");\n newdiv2.name = divName + \"Value\";\n newdiv2.className = \"form-control\";\n newdiv2.value = fieldValue2;\n\n cell1.appendChild(newdiv);\n cell2.appendChild(newdiv2);\n cell3.appendChild(deleteButton);\n tableRow.appendChild(cell1);\n tableRow.appendChild(cell2);\n tableRow.appendChild(cell3);\n \n document.getElementById(divName).appendChild(tableRow);\n \n $(\"#\" + newdiv.id).autocomplete(searchParameters(newdiv.name), \"\").focus(function() {\n $(this).autocomplete(searchConditionalParameters(newdiv.name,$(\"#host\").val()));\n $(this).autocomplete('search', $(this).val());\n });\n \n $(\"#\" + newdiv2.id).autocomplete(searchParameters(newdiv2.name), \"\").focus(function() {\n $(this).autocomplete(searchConditionalParameters(newdiv2.name,newdiv.value));\n $(this).autocomplete('search', $(this).val());\n });\n ElementCounter2++;\n }\n}", "appendInputs() {\n let that = this,\n firstInput = document.createElement('smart-numeric-text-box'),\n secondInput = document.createElement('smart-numeric-text-box');\n\n firstInput.placeholder = that.context.localize('placeholderNumber');\n secondInput.placeholder = that.context.localize('placeholderNumber');\n\n if (!Smart.NumericTextBox) {\n firstInput = document.createElement('input');\n secondInput = document.createElement('input');\n\n firstInput.setAttribute('aria-label', firstInput.placeholder);\n firstInput.classList.add('smart-input');\n secondInput.setAttribute('aria-label', secondInput.placeholder);\n secondInput.classList.add('smart-input');\n\n that.firstInput = firstInput;\n that.secondInput = secondInput;\n return;\n }\n\n firstInput.inputFormat = 'floatingPoint';\n firstInput.nullable = true;\n firstInput.spinButtons = true;\n firstInput.value = null;\n secondInput.inputFormat = 'floatingPoint';\n secondInput.nullable = true;\n secondInput.spinButtons = true;\n secondInput.value = null;\n\n that.firstInput = firstInput;\n that.secondInput = secondInput;\n }", "function appendDivs(value) {\n form.append(eval(`div${value}`));\n }", "function addInput2 () {\n //eliminar todos los elementos hijos del padre;\n var elemento = document.getElementById(\"addInputs2\");\n while (elemento.firstChild) {\n elemento.removeChild(elemento.firstChild);\n };\n //colocar los imput\n let valorNumeroDatos = numeroDatos2();\n\n for(let i = 1; i < (valorNumeroDatos + 1); i++ ) { \n var inputs = `<input id=\"${i}\" type=\"number\" placeholder = \"Dato # ${i}\"></input>`;\n let input = document.getElementById(\"addInputs2\");\n input.insertAdjacentHTML('beforeend', inputs);\n } \n}", "function duplicarTexto(inputId, divId) {\n document.getElementById(divId).innerHTML = \n document.getElementById(inputId).value;\n}", "function buildHiddenInput(name, value) {\n return $(\"<input>\").attr(\"type\", \"hidden\").attr(\"name\", name).val(value);\n }", "function createHiddenInputElement() {\n const form = document.getElementById(\"single-conversation-topic-form\");\n console.log(form);\n const conversationTopicIdInput = document.createElement(\"input\");\n conversationTopicIdInput.classList.add(\"hidden\");\n conversationTopicIdInput.name = \"conversationTopicId\";\n conversationTopicIdInput.value = parameterConversationTopicId;\n console.log(conversationTopicIdInput.value);\n form.appendChild(conversationTopicIdInput);\n\n const conversationTopicTitleInput = document.createElement(\"input\");\n conversationTopicTitleInput.classList.add(\"hidden\");\n conversationTopicTitleInput.name = \"conversationTopicTitle\";\n conversationTopicTitleInput.value = parameterConversationTopicTitle;\n console.log(conversationTopicTitleInput.value);\n form.appendChild(conversationTopicTitleInput);\n\n console.log(form);\n}", "function createNewElement() {\n const newInputBox = document.getElementById(\"newPetInfo\").innerHTML.toString();\n document.getElementById(\"Pet\").innerHTML += newInputBox;\n\n document.getElementById(\"addPet\").style.display = \"none\";\n document.getElementById(\"updatePets\").style.display = \"none\";\n document.getElementById(\"Edit\").style.display=\"block\";\n\n}", "appendInputs() {\n const that = this,\n firstInput = document.createElement('jqx-drop-down-list'),\n secondInput = document.createElement('jqx-drop-down-list');\n\n firstInput.dataSource = [{ value: true, label: 'true' }, { value: false, label: 'false' }];\n firstInput.selectedIndexes = [];\n firstInput.selectionMode = 'zeroOrOne';\n secondInput.dataSource = [{ value: true, label: 'true' }, { value: false, label: 'false' }];\n secondInput.selectedIndexes = [];\n secondInput.selectionMode = 'zeroOrOne';\n\n that.firstInput = firstInput;\n that.secondInput = secondInput;\n }", "function addMetal() {\n var div = document.getElementById(\"mainDiv3\");\n if (div.innerHTML === \"\") {\n div.innerHTML += `\n <form>\n <div class=\"form-group\">\n <label for=\"exampleInputEmail1\">Item Name</label>\n <input type=\"name\" class=\"form-control input\" id=\"exampleInputEmail2\" aria-describedby=\"emailHelp\" placeholder=\"Enter ITem\">\n <label for=\"exampleInputEmail1\">Item Code</label>\n <input type=\"name\" class=\"form-control input\" id=\"exampleInputEmail1\" aria-describedby=\"emailHelp\" placeholder=\"Enter Code\">\n </div>\n <button type=\"button\" class=\"btn btn-info\" onclick = \"addvalue()\" >Add Metal</button>\n <button type=\"button\" class=\"btn btn-info\" onclick = \"cancel()\" >Cancel</button>\n </form>\n `\n }\n div.style.display = \"block\";\n}", "function makeEditable(div,div1){\n\t\tif (div.style.display == \"none\") {\n\t\t\tdiv.style.display = \"block\";\n\t\t\tdiv1.style.display = \"none\";\n\t\t} else {\n\t\t\tdiv.style.display = \"none\";\n\t\t\tdiv1.style.display = \"block\";\n\t}\n}", "function add_hidden_photo_counter_input() {\n const avistamiento_div = document.getElementById(\"nuevos_avistamientos\")\n let n = avistamiento_div.children[0].children.length; // number of avistamientos to check\n for (let k=0; k<n; k++) { // for each avistamiento, we add the hidden counter input\n\n let row_of_photo = document.getElementById(\"row_of_photo_divs\"+k);\n const j = row_of_photo.children.length; // number of photo inputs that will be sent\n\n let hidden_counter = document.createElement(\"input\"); // the hidden input\n hidden_counter.type = \"hidden\";\n hidden_counter.value = j.toString();\n hidden_counter.id = \"hidden-photo-counter\"+k;\n hidden_counter.name = \"hidden-photo-counter\";\n row_of_photo.append(hidden_counter);\n }\n\n}", "function buildCard() {\n\n for(let p = 1; p <= numplayers; p++){\n $('.playerMain').append(\n '<div id=\"playerRow'+ p +'\" class=\"playerLabel player'+ p +'\">' +\n '<span class=\"playersName\" contenteditable=\"true\">Player '+ p +'</span>' +\n '<span onclick=\"removePlayer(this)\" class=\"fa fa-trash player'+ p +'\"></span>' +\n '</div>');\n $('#totalIn').append('<div class=\"scoreBox\">'+'<div id=\"player'+ p +'scoreIn\"></div>'+'</div>');\n $('#totalOut').append('<div class=\"scoreBox\">'+'<div id=\"player'+ p +'scoreOut\"></div>'+'</div>');\n $('#totalScore').append('<div class=\"scoreBox\">'+'<div id=\"player'+ p +'totalScore\"></div>'+'</div>');\n\n for(let h = 0; h < selcourse.data.holes.length; h++){\n $('#c'+h).append('<input type=\"number\" class=\"holeInput player'+p+'\" id=\"p'+p+'h'+h+'\" type=\"text\">');\n }\n }\n}", "_createHiddenDiv() {\n const hidden = dom5.constructors.element('div');\n dom5.setAttribute(hidden, 'hidden', '');\n dom5.setAttribute(hidden, 'by-polymer-bundler', '');\n return hidden;\n }", "function append_hidden_node(node_name,node_value,form_index)\n{\t//alert(\"node_name:\\t\"\t + node_name + \"\\nnode_value:\\t\" + node_value + \"\\nform_name:\\t\" + form_index);\n\tvar oParent = null, new_element = null;\t\n\t\n\t//alert(\"sto creando il nuovo elemento\");\n\t\t\t\n\t//acquisisco il riferimento alla form da aggiornare\n\tif ((oParent = document.forms(form_index)) != null)\n\t{\t//alert(\"nome form:\\t\" + oParent.name);\n\t\t//creo il nuovo tag e ne setto gli attributi name e value come stringa\n\t\t//vedi le specifiche per creare i tag input con il metodo createElement\n\t\tstrTag = \"<input \" + \"name='\" + node_name + \"' value='\" + node_value + \"' />\";\n\t\t\n\t\t//alert(\"strTag:\\t\" + strTag);\n\t\t\n\t\tif ((new_element = document.createElement(strTag)) != null)\n\t\t{\t//voglio che il nuovo elemento sia hidden\n\t\t\tnew_element.setAttribute(\"type\",\"hidden\");\n\t\t\t//inserisco come ultimo elemento della form l'oggetto appena creato\t\t\n\t\t\toParent.insertBefore(new_element);\n\t\t\treturn 0;\n\t\t}\t\t\n\t}\n\t\n\t//qualcosa � andato storto\n\treturn 1;\n}", "function addDiv(){\n count++;\n var $div = $('<div class=\"generatedDiv\"></div>');\n var $counter = $('<p>'+ count +'</p>');\n var $swapBtn = $('<button class=\"swapBtn\">Swap</button>');\n var $deleteBtn = $('<button class=\"deleteBtn\">Delete</button>');\n $div.append($counter,$swapBtn,$deleteBtn);\n $('#output').append($div);\n}", "function toogleSelectionDiv(selection) {\r\n\tif (selection == \"E\") {\r\n\t\tdocument.getElementById(\"newUserDiv\").style.display = \"none\";\r\n\t\tdocument.getElementById(\"newUserAddDiv\").style.display = \"none\";\t\r\n\t\tdocument.getElementById(\"existingUserDiv\").style.display = \"block\";\t\r\n\t\tdocument.getElementById(\"existingUserAddDiv\").style.display = \"block\";\t\r\n\t\tdocument.getElementById(\"existingUserInputId\").value = \"\";\r\n\t} else {\r\n\t\tdocument.getElementById(\"existingUserDiv\").style.display = \"none\";\t\r\n\t\tdocument.getElementById(\"existingUserAddDiv\").style.display = \"none\";\t\r\n\t\tdocument.getElementById(\"newUserDiv\").style.display = \"block\";\t\t\r\n\t\tdocument.getElementById(\"newUserAddDiv\").style.display = \"block\";\t\r\n\t}\r\n}", "function createHoursDiv(){\n for(i = 0; i < generalInfo.length; i++){\n $('#container').append(\"<div class= 'row mainHours d-flex justify-content-between' id='mainHours\" + generalInfo[i].display + \"'></div>\");\n $('#container').children().last().append('<div class= \"col-1 hoursNum\" id=\"hoursNum\"><p id=\"hour\">'+ generalInfo[i].display + '</p>');\n $('#container').children().last().append(\"<div class= 'col-10 hoursText' id='hoursText\"+generalInfo[i].display+\"'><input type='text' class='inputEvent' id='inputEvent\"+generalInfo[i].display+\"'></div>\");\n $('#container').children().last().append(\"<div class= 'col-1 hoursSaveBtn' id='hoursSaveBtn'><button class='btn btn-primary' id='btnSave'>Save</button></div>\");\n }\n }", "_findOrCreateHiddenDiv(ast) {\n const hiddenDiv = dom5.query(ast, matchers.hiddenDiv) || this._createHiddenDiv();\n if (!hiddenDiv.parentNode) {\n this._attachHiddenDiv(ast, hiddenDiv);\n }\n return hiddenDiv;\n }", "function originResult() {\r\n var input = document.getElementById(\"originSel\")\r\n var div = document.getElementById(\"originResult\");\r\n div.innerHTML = div.innerHTML + input.value;\r\n //console.log(div);\r\n}", "function display2(s1, s2) {\n var selects = document.getElementsByTagName(\"select\");\n var inputs = document.getElementsByTagName(\"input\");\n\n for (x of selects) {\n x.style.display = 'none';\n }\n for (x of inputs) {\n if(!x.type===\"hidden\"){\n x.style.display = 'none';\n x.value = '';}\n }\n document.getElementById(s1).style.display = 'block';\n document.getElementById(s2).style.display = 'block';\n\n }", "function wrap2(inputArray2) {\n //if (inputArray2)\n //length2 = inputArray2.value.length;\n //test.innerHTML += \" A:\" + length + \" B:\" + length2;\n //if (length !== length2 || (getQueryVariable(player.getVideoUrl(), 'v') !== videoId)) {\n videoId = getQueryVariable(player.getVideoUrl(), 'v');\n //length = length2;\n setList({\n valueArray: inputArray2.value,\n nameArray: inputArray2.name,\n listDiv: div,\n defaultValue: defaultValue,\n actionChange: change,\n actionNull: actionNull,\n actionExist: actionExist,\n stylingFunct: stylingFunctions\n });\n //test3.innerHTML+=\" ex:\"+div.id;\n //}\n }", "displayLastInputBreak() {\n document.querySelector(\".inputs__break--2\").style.visibility = \"hidden\";\n }", "function setHiddenVal() {\n for (i = 1; i <= 9; i++) {\n// console.log(\"HI\"),\n document.getElementById(\"input\" + i).value = document.getElementById(\"box\" + i).innerHTML;\n }\n}", "function addControlElements(parent, title, closedown, active) {\n const controlElements = document.createElement('div');\n controlElements.classList.add('controlElements');\n controlElements.classList.add('controlElementsShown');\n\n parent.appendChild(controlElements);\n\n const name = document.createElement('span');\n name.setAttribute('class', 'title');\n addText(name, title);\n controlElements.appendChild(name);\n\n const mainDiv = mkDiv('main');\n\n controlElements.appendChild(addCloseButton(closedown, active));\n controlElements.appendChild(addHideShowButton(mainDiv, controlElements, active));\n\n parent.appendChild(mainDiv);\n return mainDiv;\n }", "function array_to_hidden_divs(parent_id, array) {\n\t// For each line, add a div.\n\t// If answer is required, have an answer button there\n\t\n\t// Empty out the current parent_id\n\t$('#'+parent_id).empty()\n\n\t// First convert <inputs> into HTML\n\tvar array = array_to_html_array(array)\n\n\t// Loop through lines\n\tfor (var i=0; i<array.length; i++) {\n\n\t\t// Add a div\n\t\t$('<div/>', {\n\t\t id: 'line_'+i,\n\t\t hidden: \"hidden\"\n\t\t}).appendTo('#'+parent_id);\t\n\n\t\t// Within the div, add text in a div\n\t\t$('<div/>', {\n\t\t id: 'line_'+i+'_text'\n\t\t}).appendTo('#line_'+i);\n\t\t$('#line_'+i+'_text').append(array[i])\n\n\t\t// Within the div, also add another div (currently unused)\n\t\t// $('<div/>', {\n\t\t// id: 'line_'+i+'_somethingelse'\n\t\t// }).appendTo('#line_'+i);\t\t\n\t}\n}", "function createLookupDiv() {\n var TMPL_DIV = '<div id=\"{Id}\" class=\"ds-nav-lu ds-nav-lu-custom\" style=\"display:none\">\\\n<input id=\"{idSearchBox}\" class=\"ds-nav-lu-search ds-nav-lu-search-custom\" type=\"text\" />\\\n<div id=\"{idDivLookupItems}\" class=\"ds-nav-lu-results\" style=\"display:none\"></div>\\\n<div id=\"{idDivLookupItemsLoading}\" class=\"ds-nav-lu-results ds-nav-lu-results-loading\" style=\"display:block\">\\\n<span class=\"center-block ds-nav-lu-results-loading-container\"><i class=\"fa fa-spinner fa-spin ds-nav-lu-results-loading-icon\"></i></span></div></div>'\n\n var div = TMPL_DIV.replace(\"{Id}\", idDivLookup).replace(\"{idSearchBox}\", idSearchBox).replace(\"{idDivLookupItems}\", idDivLookupItems).replace(\"{idDivLookupItemsLoading}\", idDivLookupItemsLoading)\n\n $(sourceCtrl).after(div);\n\n if (displaySearchBox===false) {\n $(\".ds-nav-lu-search\").hide();\n }\n }", "function init(tags){\n tags.wrapper.append(tags.input);\n tags.wrapper.classList.add(tags.options.wrapperClass);\n tags.orignal_input.setAttribute('hidden' , 'true');\n tags.orignal_input.parentNode.insertBefore(tags.wrapper , tags.orignal_input);\n }", "function splitOutputCreate() {\n\n // pulls the number from selection of how many inputs wanted\n var num = document.getElementById('splitAmount').value;\n\n var container = document.getElementById('splitInput');\n\n // handles if the number is changed to a lower number than was previously selected\n while (container.hasChildNodes()) {\n container.removeChild(container.lastChild);\n }\n\n // creates the output entries based on number selected with # of outputs\n for (i = 0; i < num; i++) {\n\n // creates the output entries\n container.appendChild((document.createTextNode(\" Output: \" )));\n var splitOut = document.createElement('input');\n splitOut.type = \"text\";\n splitOut.id = \"splitOut\" + i;\n splitOut.className = \"splitOut\";\n container.appendChild(splitOut);\n\n container.appendChild(document.createElement('br'));\n }\n}", "function addInput(input){\r\n var newDiv = document.createElement('newInput')\r\n newDiv.innerHTML = \"<input type='text' name='inputs[]'>\";\r\n document.getElementById('input').appendChild(newInput);\r\n }", "function buildForm() {\n\tdocument.querySelector('h3').after(form);\n\tform.append(containerDivOne);\n\tform.append(containerDivTwo);\n\tform.append(multiplicationBtn);\n\tform.append(divisionBtn);\n\tform.append(clearBtn);\n\tform.append(resultParagraph);\n\tcontainerDivOne.append(inputLabelOne);\n\tcontainerDivTwo.append(inputLabelTwo);\n\tinputLabelOne.after(inputTextOne);\n\tinputLabelTwo.after(inputTextTwo);\n}", "function insertOtherInput(ele) {\n const fieldset1 = document.querySelector('fieldset');\n fieldset1.appendChild(ele)\n}", "show(parent) {\n parent.appendChild(this.backgroundDiv);\n parent.appendChild(this.MiscDiv);\n }", "function appendHiddenInputFieldContainingSelectedValue($select){\n var number = findNumber($select)\n var moduleNumber = getModuleNumber($select)\n $select.after(\"<input class='hiddenInput' name='field_type-\"+moduleNumber+\"-\"+number+\"'type='text' value=\"+$select.val()+\" />\")\n}", "function createDiv(parentID, childID) {\n var d = $(document.createElement('div')).attr('id', childID);\n var container = document.getElementById(parentID);\n d.appendTo(container);\n }", "function createDiv(parentID, childID) {\n var d = $(document.createElement('div')).attr('id', childID);\n var container = document.getElementById(parentID);\n d.appendTo(container);\n }", "function addTagEdit(elm){\r\n\tvar tagInsert = $('<div><input type=\"text\" placeholder=\"enter tag name...\"></input></div>').attr(\"class\", \"new_tag\");\r\n\tif($(elm).children(\".shelf_content\").css(\"display\") == \"none\"){\r\n\t\t$(tagInsert).toggle();\t\t\t\r\n\t}\r\n\t$(elm).append(tagInsert);\r\n}", "function addPersonPhoneInput() {\n personPhoneContainer.innerHTML += \"<hr>\";\n personPhoneContainer.innerHTML += \"<input type='text' class='form-control phone' placeholder='phone number'>\";\n personPhoneContainer.innerHTML += \"<input type='text' class='phone-description form-control' placeholder='phone description'>\";\n}", "function prepareElementHidden() {\n\n var name\n\n if ( SETTINGS.hiddenName === true ) {\n name = ELEMENT.name\n ELEMENT.name = ''\n }\n else {\n name = [\n typeof SETTINGS.hiddenPrefix == 'string' ? SETTINGS.hiddenPrefix : '',\n typeof SETTINGS.hiddenSuffix == 'string' ? SETTINGS.hiddenSuffix : '_submit'\n ]\n name = name[0] + ELEMENT.name + name[1]\n }\n\n P._hidden = $(\n '<input ' +\n 'type=hidden ' +\n\n // Create the name using the original input’s with a prefix and suffix.\n 'name=\"' + name + '\"' +\n\n // If the element has a value, set the hidden value as well.\n (\n $ELEMENT.data('value') || ELEMENT.value ?\n ' value=\"' + P.get('select', SETTINGS.formatSubmit) + '\"' :\n ''\n ) +\n '>'\n )[0]\n\n $ELEMENT.\n\n // If the value changes, update the hidden input with the correct format.\n on('change.' + STATE.id, function() {\n P._hidden.value = ELEMENT.value ?\n P.get('select', SETTINGS.formatSubmit) :\n ''\n })\n\n\n // Insert the hidden input as specified in the settings.\n if ( SETTINGS.container ) $( SETTINGS.container ).append( P._hidden )\n else $ELEMENT.after( P._hidden )\n }", "function prepareElementHidden() {\n\n var name\n\n if ( SETTINGS.hiddenName === true ) {\n name = ELEMENT.name\n ELEMENT.name = ''\n }\n else {\n name = [\n typeof SETTINGS.hiddenPrefix == 'string' ? SETTINGS.hiddenPrefix : '',\n typeof SETTINGS.hiddenSuffix == 'string' ? SETTINGS.hiddenSuffix : '_submit'\n ]\n name = name[0] + ELEMENT.name + name[1]\n }\n\n P._hidden = $(\n '<input ' +\n 'type=hidden ' +\n\n // Create the name using the original input’s with a prefix and suffix.\n 'name=\"' + name + '\"' +\n\n // If the element has a value, set the hidden value as well.\n (\n $ELEMENT.data('value') || ELEMENT.value ?\n ' value=\"' + P.get('select', SETTINGS.formatSubmit) + '\"' :\n ''\n ) +\n '>'\n )[0]\n\n $ELEMENT.\n\n // If the value changes, update the hidden input with the correct format.\n on('change.' + STATE.id, function() {\n P._hidden.value = ELEMENT.value ?\n P.get('select', SETTINGS.formatSubmit) :\n ''\n })\n\n\n // Insert the hidden input as specified in the settings.\n if ( SETTINGS.container ) $( SETTINGS.container ).append( P._hidden )\n else $ELEMENT.after( P._hidden )\n }", "function prepareElementHidden() {\n\n var name\n\n if ( SETTINGS.hiddenName === true ) {\n name = ELEMENT.name\n ELEMENT.name = ''\n }\n else {\n name = [\n typeof SETTINGS.hiddenPrefix == 'string' ? SETTINGS.hiddenPrefix : '',\n typeof SETTINGS.hiddenSuffix == 'string' ? SETTINGS.hiddenSuffix : '_submit'\n ]\n name = name[0] + ELEMENT.name + name[1]\n }\n\n P._hidden = $(\n '<input ' +\n 'type=hidden ' +\n\n // Create the name using the original input’s with a prefix and suffix.\n 'name=\"' + name + '\"' +\n\n // If the element has a value, set the hidden value as well.\n (\n $ELEMENT.data('value') || ELEMENT.value ?\n ' value=\"' + P.get('select', SETTINGS.formatSubmit) + '\"' :\n ''\n ) +\n '>'\n )[0]\n\n $ELEMENT.\n\n // If the value changes, update the hidden input with the correct format.\n on('change.' + STATE.id, function() {\n P._hidden.value = ELEMENT.value ?\n P.get('select', SETTINGS.formatSubmit) :\n ''\n })\n\n\n // Insert the hidden input as specified in the settings.\n if ( SETTINGS.container ) $( SETTINGS.container ).append( P._hidden )\n else $ELEMENT.after( P._hidden )\n }", "function prepareElementHidden() {\n\n var name\n\n if ( SETTINGS.hiddenName === true ) {\n name = ELEMENT.name\n ELEMENT.name = ''\n }\n else {\n name = [\n typeof SETTINGS.hiddenPrefix == 'string' ? SETTINGS.hiddenPrefix : '',\n typeof SETTINGS.hiddenSuffix == 'string' ? SETTINGS.hiddenSuffix : '_submit'\n ]\n name = name[0] + ELEMENT.name + name[1]\n }\n\n P._hidden = $(\n '<input ' +\n 'type=hidden ' +\n\n // Create the name using the original input’s with a prefix and suffix.\n 'name=\"' + name + '\"' +\n\n // If the element has a value, set the hidden value as well.\n (\n $ELEMENT.data('value') || ELEMENT.value ?\n ' value=\"' + P.get('select', SETTINGS.formatSubmit) + '\"' :\n ''\n ) +\n '>'\n )[0]\n\n $ELEMENT.\n\n // If the value changes, update the hidden input with the correct format.\n on('change.' + STATE.id, function() {\n P._hidden.value = ELEMENT.value ?\n P.get('select', SETTINGS.formatSubmit) :\n ''\n })\n\n\n // Insert the hidden input as specified in the settings.\n if ( SETTINGS.container ) $( SETTINGS.container ).append( P._hidden )\n else $ELEMENT.after( P._hidden )\n }", "function prepareElementHidden() {\n\n var name\n\n if ( SETTINGS.hiddenName === true ) {\n name = ELEMENT.name\n ELEMENT.name = ''\n }\n else {\n name = [\n typeof SETTINGS.hiddenPrefix == 'string' ? SETTINGS.hiddenPrefix : '',\n typeof SETTINGS.hiddenSuffix == 'string' ? SETTINGS.hiddenSuffix : '_submit'\n ]\n name = name[0] + ELEMENT.name + name[1]\n }\n\n P._hidden = $(\n '<input ' +\n 'type=hidden ' +\n\n // Create the name using the original input’s with a prefix and suffix.\n 'name=\"' + name + '\"' +\n\n // If the element has a value, set the hidden value as well.\n (\n $ELEMENT.data('value') || ELEMENT.value ?\n ' value=\"' + P.get('select', SETTINGS.formatSubmit) + '\"' :\n ''\n ) +\n '>'\n )[0]\n\n $ELEMENT.\n\n // If the value changes, update the hidden input with the correct format.\n on('change.' + STATE.id, function() {\n P._hidden.value = ELEMENT.value ?\n P.get('select', SETTINGS.formatSubmit) :\n ''\n })\n\n\n // Insert the hidden input as specified in the settings.\n if ( SETTINGS.container ) $( SETTINGS.container ).append( P._hidden )\n else $ELEMENT.after( P._hidden )\n }", "createInputSection() {\n let parent = document.getElementById('comparison-selector-container');\n\n // Clear previously created inputs\n this.clearChildNodes(parent);\n\n // Create container div\n let div = document.createElement('div');\n div.className = 'container';\n\n // Create autocomplete div\n let autocompleteContainer = document.createElement('div');\n autocompleteContainer.className = 'autocomplete';\n \n // Create input field & submit button\n let input = this.createInputElem();\n let submitButton = this.createSubmitButton();\n\n autocompleteContainer.appendChild(input);\n \n // Autocomplete dropdown functionality\n this.autocompleteCreator.setInputOrSubmit({inputElem: input, submitButton});\n this.autocompleteCreator.autocomplete(this.regionMapper.getCountriesOfRegion(this.regions.WORLD))\n\n\n div.appendChild(autocompleteContainer);\n div.appendChild(submitButton);\n\n parent.appendChild(div);\n }", "function prepareElementHidden() { // 4683\n // 4684\n var name // 4685\n // 4686\n if ( SETTINGS.hiddenName === true ) { // 4687\n name = ELEMENT.name // 4688\n ELEMENT.name = '' // 4689\n } // 4690\n else { // 4691\n name = [ // 4692\n typeof SETTINGS.hiddenPrefix == 'string' ? SETTINGS.hiddenPrefix : '', // 4693\n typeof SETTINGS.hiddenSuffix == 'string' ? SETTINGS.hiddenSuffix : '_submit' // 4694\n ] // 4695\n name = name[0] + ELEMENT.name + name[1] // 4696\n } // 4697\n // 4698\n P._hidden = $( // 4699\n '<input ' + // 4700\n 'type=hidden ' + // 4701\n // 4702\n // Create the name using the original input’s with a prefix and suffix. // 4703\n 'name=\"' + name + '\"' + // 4704\n // 4705\n // If the element has a value, set the hidden value as well. // 4706\n ( // 4707\n $ELEMENT.data('value') || ELEMENT.value ? // 4708\n ' value=\"' + P.get('select', SETTINGS.formatSubmit) + '\"' : // 4709\n '' // 4710\n ) + // 4711\n '>' // 4712\n )[0] // 4713\n // 4714\n $ELEMENT. // 4715\n // 4716\n // If the value changes, update the hidden input with the correct format. // 4717\n on('change.' + STATE.id, function() { // 4718\n P._hidden.value = ELEMENT.value ? // 4719\n P.get('select', SETTINGS.formatSubmit) : // 4720\n '' // 4721\n }) // 4722\n // 4723\n // 4724\n // Insert the hidden input as specified in the settings. // 4725\n if ( SETTINGS.container ) $( SETTINGS.container ).append( P._hidden ) // 4726\n else $ELEMENT.after( P._hidden ) // 4727\n } // 4728", "function append_field(parent_name, element_name, element_value) { \r\n var element = document.createElement(\"input\");\r\n element.id = element_name;\r\n\telement.value = element_value;\r\n\t\r\n var parent = document.getElementById(parent_name); \r\n parent.appendChild(element);\r\n}", "function toggleInput(parentDivID) {\n console.log(\"parentDivID = \" + parentDivID);\n\n let inputID = parentDivID + \"Input\";\n let inputElement = document.getElementById(inputID);\n closeInputs();\n inputElement.style.display = 'block';\n}", "appendDivToOverlay() {\n const panes = this.getPanes();\n panes.overlayLayer.appendChild(this.div);\n panes.overlayMouseTarget.appendChild(this.div);\n }", "function hideInputsDiv() {\n\tdocument.getElementById(\"inputs\").hidden = true;\n}", "function addInput()\n {\n var element = $('<input/>', {\n 'style' : 'display:none;',\n 'name': settings.name + '-input',\n blur: function() {\n hideIfUndefined($(this));\n }\n });\n component.append(element);\n input = component.find('input');\n }", "function popHiddenField() {\n var x = document.getElementById(\"input_2_2\").value;\n document.getElementById(\"input_2_8\").value = x;\n clearField();\n initialize();\n}", "function addIngredient (){\n\n var fragment = createFrag('<div class=\"stack\">'+\n '<input type=\"text\" class=\"ingredient\" name=\"ingredients\" placeholder=\"Ingredient:\">'+\n '<input type=\"number\" class=\"amount\" name=\"ingredient-amount\" placeholder=\"Amount:\" onchange=\"checkVal(this);\">'+\n '<div class=\"del-container\">'+\n '<button type=\"button\" class=\"btn remove\" onclick =\"delIngredient(this)\">Remove Ingredient</button>'+\n '</div>'+\n '</div>');\n \n var div = document.createElement(\"div\")\n div.classList.add(\"ingredient-input\")\n div.appendChild(fragment)\n document.getElementsByClassName('ingredients')[0].appendChild(div);\n}", "function addressBoxes(num) {\n if (num === 2) {\n $(\"#address-inputs\").empty();\n $(\"#address-inputs\").append('<div class=\"col-lg-6\"><input type=\"text\" id=\"address\" class=\"form-control\" placeholder=\"Source IP\"></div>');\n $(\"#address-inputs\").append('<div class=\"col-lg-6\"><input type=\"text\" id=\"address2\" class=\"form-control\" placeholder=\"Destination IP\"></div>');\n } else {\n $(\"#address-inputs\").empty();\n $(\"#address-inputs\").append('<input type=\"text\" id=\"address\" class=\"form-control\" placeholder=\"IP address\">');\n }\n}", "function appendOutputCell(domObj) {\n // This will take input and write it to the display\n outputField = document.getElementById(\"calcOutput\")\n input = domObj.innerHTML\n\n\n currentInfo = outputField.value\n\n currentInfo = currentInfo + input\n \n // Set the output field\n document.getElementById(\"calcOutput\").value = currentInfo\n}", "function addCompanyPhoneInput() {\n companyPhoneContainer.innerHTML += \"<hr>\";\n companyPhoneContainer.innerHTML += \"<input type='text' class='form-control phone' placeholder='phone number'>\";\n companyPhoneContainer.innerHTML += \"<input type='text' class='phone-description form-control' placeholder='phone description'>\";\n}", "function appendOdds(){\n newDiv.attr(\"id\", \"homeTeam1\");\n newRow.append(homeTeam);\n newDiv.append(newRow);\n $(\"#homeBet\").append(newDiv);\n\n newDiv2.attr(\"id\", \"visitorTeam1\");\n newRow2.append(visitorTeam);\n newDiv2.append(newRow2)\n $(\"#awayBet\").append(newDiv2);\n\n newDiv3.attr(\"id\", \"hSpread\");\n newRow3.append(getHSpread);\n newDiv3.append(newRow3)\n $(\"#homeSpread\").append(newDiv3);\n\n newDiv4.attr(\"id\", \"hOdds\");\n newRow4.append(fetchHOdds);\n newDiv4.append(newRow4);\n $(\"#homeOdds\").append(newDiv4);\n\n newDiv5.attr(\"id\", \"vSpread\");\n newRow5.append(getVSpread);\n newDiv5.append(newRow5);\n $(\"#awaySpread\").append(newDiv5);\n\n newDiv6.attr(\"id\", \"vOdds\");\n newRow6.append(fetchVOdds);\n newDiv6.append(newRow6);\n $(\"#awayOdds\").append(newDiv6);\n\n newDiv7.attr(\"id\", \"sites\");\n newRow7.append(fetchSites);\n newDiv7.append(newRow7);\n $(\"betSource\").html(newDiv7);\n \n console.log(\"test!!\");\n }", "onAdd() {\n this.getPanes().floatPane.appendChild(this.containerDiv);\n }", "function showAddDiv() {\n\tshowActionDiv('add');\n}", "function ShowHide(divId, divId2)\n{\n\tif(document.getElementById(divId).style.display == 'none')\n\t{\n\t\tdocument.getElementById(divId).style.display='block';\n\t\tenlace = true;\n\t\tdocument.getElementById(\"enlace_tbox\").value='';\n\t\tdocument.getElementById(divId2).style.display='none';\n\t}\n\telse\n\t{\n\t\tdocument.getElementById(divId).style.display = 'none';\n\t\tenlace = false;\n\t\tdocument.getElementById(\"enlace_tbox\").value='';\n\t\tdocument.getElementById(divId2).style.display='block';\n\t}\n}", "function prepareElementHidden() {\n\t\n\t var name\n\t\n\t if ( SETTINGS.hiddenName === true ) {\n\t name = ELEMENT.name\n\t ELEMENT.name = ''\n\t }\n\t else {\n\t name = [\n\t typeof SETTINGS.hiddenPrefix == 'string' ? SETTINGS.hiddenPrefix : '',\n\t typeof SETTINGS.hiddenSuffix == 'string' ? SETTINGS.hiddenSuffix : '_submit'\n\t ]\n\t name = name[0] + ELEMENT.name + name[1]\n\t }\n\t\n\t P._hidden = $(\n\t '<input ' +\n\t 'type=hidden ' +\n\t\n\t // Create the name using the original input’s with a prefix and suffix.\n\t 'name=\"' + name + '\"' +\n\t\n\t // If the element has a value, set the hidden value as well.\n\t (\n\t $ELEMENT.data('value') || ELEMENT.value ?\n\t ' value=\"' + P.get('select', SETTINGS.formatSubmit) + '\"' :\n\t ''\n\t ) +\n\t '>'\n\t )[0]\n\t\n\t $ELEMENT.\n\t\n\t // If the value changes, update the hidden input with the correct format.\n\t on('change.' + STATE.id, function() {\n\t P._hidden.value = ELEMENT.value ?\n\t P.get('select', SETTINGS.formatSubmit) :\n\t ''\n\t })\n\t\n\t\n\t // Insert the hidden input as specified in the settings.\n\t if ( SETTINGS.container ) $( SETTINGS.container ).append( P._hidden )\n\t else $ELEMENT.after( P._hidden )\n\t }", "function appendDetails() {\n document.getElementById(\"container\").style.display = \"none\";\n document.getElementById(\"detailsContainer\").style.display = \"block\";\n}", "function createDiv(thisID, options){\n var pinCount = options.pinCount;\n var divStr='';\n \n //make sure we should have our view password button\n if(options.allowPasswordPeek == true || options.allowPasswordToggle == true){\n divStr+= '<input type=\"text\" value=\"tempPass\" autocomplete=\"off\" id=\"' + thisID+ '_passToggleText\" style=\"display:none\"/>';\n }\n divStr+= '<div id=\"' + thisID + '_pinPassBox\" class=\"pinPassBox\">'; \n\n for(i=1; i<=pinCount; i++){\n divStr+= '<div class=\"staticPin\" id=\"' + thisID + '_staticPin_' + i + '\"><div class=\"pin\" id=\"' + thisID + '_pin_' + i + '\"></div></div>';\n }\n //make sure we should have our view password button\n if(options.allowPasswordPeek == true || options.allowPasswordToggle == true){\n divStr+= '<div id=\"' + thisID+ '_passToggle\" class=\"passToggle\">View Password</div>';\n }\n divStr+= '</div>';\n return divStr; \n}", "function div_show(index) {\ndocument.getElementById('abc').style.display = \"block\";\n\ndocument.getElementById(\"id1\").value=index;\n\n}", "function addForm(){\r\n\teditDIV.style.display = \"none\";\r\n\tdeleteDIV.style.display = \"none\";\r\n\taddDIV.style.display = \"block\";\r\n\t//update div to display form\r\n}", "function buildMoviePage() {\n $(\"#mainContainer\").append($(\"<div>\").addClass(\"d-flex justify-content-center h-100\").attr(\"id\", \"secondContainer\"));\n $(\"#secondContainer\").append($(\"<div>\").addClass(\"searchbar\").attr(\"id\", \"searchBarDiv\"));\n $(\"#searchBarDiv\").append($(\"<input>\").addClass(\"search_input\").attr({ type: \"text\", name: \"\", placeholder: \"search a movie\", id: \"user-movie-search\" }));\n $(\"#searchBarDiv\").append($(\"<a>\").addClass(\"search_icon\").attr(\"id\", \"addStuff\"));\n $(\"#addStuff\").append($(\"<i>\").addClass(\"fas fa-search\"));\n }", "function displaytheresumewitheditboxes(result)\n{\n var logopener=\"----entering displaytheresumewitheditboxes----\";\n console.log(logopener); \n\n //lets display the name and email address\n //pick the div meant for this item\n var currentDiv = document.getElementById(\"namedisplay\");\n var namep = document.createElement(\"p\"); \n namep.innerText = result.FirstName + \" \" +\n result.MiddleName + \" \" +\n result.LastName;\n currentDiv.appendChild(namep); \n var emailp = document.createElement(\"p\"); \n emailp.innerText = result.UserEmail;\n currentDiv.appendChild(emailp); \n var emailp = document.createElement(\"p\"); \n emailp.innerText = \"(alternate email - \" + result.Email + \")\";\n currentDiv.appendChild(emailp); \n\n var currentDivphonenumberdisplay = document.getElementById(\"phonenumberdisplay\");\n //this is to add new item\n //creating an DOM item\n var tempp = document.createElement(\"input\"); \n //lets add the attributes.\n var atttype = document.createAttribute(\"type\");\n atttype.value = \"text\";\n var attplaceholder = document.createAttribute(\"placeholder\");\n attplaceholder.value = \"enter new number\"; \n var attrequired = document.createAttribute(\"required\");\n var attid = document.createAttribute(\"id\");\n attid.value = \"newitem\" + \"PhoneNumber\";\n var attclass = document.createAttribute(\"class\");\n attclass.value = \"form-control\";\n //lets attach the attributes to the DOM element in question\n tempp.setAttributeNode(atttype);\n tempp.setAttributeNode(attplaceholder);\n tempp.setAttributeNode(attrequired);\n tempp.setAttributeNode(attid);\n tempp.setAttributeNode(attclass); \n currentDivphonenumberdisplay.appendChild(tempp);\n\n //we need a button to update.\n\n //creating an DOM item\n var tempbutton = document.createElement(\"button\"); \n //lets add the attributes. \n var attclass = document.createAttribute(\"class\");\n attclass.value = \"btn btn-lg btn-primary btn-block\"; \n //for the button I want to keep the GUID directly as the ID\n var attid = document.createAttribute(\"id\");\n attid.value = \"newitem\" + \"PhoneNumberButton\";\n //want to display for the button as well.\n tempbutton.innerText = \"add phone number\";\n //lets attach the attributes to the DOM element in question\n tempbutton.setAttributeNode(attid); \n tempbutton.setAttributeNode(attclass); \n \n //lets setup the click function.\n tempbutton.addEventListener('click', function(){\n addphonenumber();\n }); \n currentDivphonenumberdisplay.appendChild(tempbutton); \n\n\n //add a divider line\n var temphr = document.createElement(\"hr\");\n currentDivphonenumberdisplay.appendChild(temphr); \n \n if(result.PhoneNumber == true)\n {\n //if this is true, then items related to this topic are available\n //try and display them.\n var itemsarray = result.phoneNumberViewModels;\n //pick the div meant for this item\n var currentDiv = document.getElementById(\"phonenumberdisplay\");\n //start adding the elements.\n //add title.\n var titlep = document.createElement(\"p\"); \n titlep.innerText = \"phone number\";\n currentDiv.appendChild(titlep);\n //add the numbers from the collection.\n for(var i=0;i<itemsarray.length;i++)\n {\n var tempitem = itemsarray[i];\n //TODO007 - country code is currently bool. once its changed, need to display it.\n //creating an DOM item\n var tempp = document.createElement(\"input\"); \n //lets add the attributes.\n var atttype = document.createAttribute(\"type\");\n atttype.value = \"text\";\n var attplaceholder = document.createAttribute(\"placeholder\");\n attplaceholder.value = tempitem.PhoneNumber; \n var attrequired = document.createAttribute(\"required\");\n var attid = document.createAttribute(\"id\");\n attid.value = tempitem.UniqueGuid + \"PhoneNumber\";\n var attclass = document.createAttribute(\"class\");\n attclass.value = \"form-control\";\n //lets attach the attributes to the DOM element in question\n tempp.setAttributeNode(atttype);\n tempp.setAttributeNode(attplaceholder);\n tempp.setAttributeNode(attrequired);\n tempp.setAttributeNode(attid);\n tempp.setAttributeNode(attclass); \n currentDiv.appendChild(tempp);\n\n //we need a button to update.\n\n //creating an DOM item\n var tempbutton = document.createElement(\"button\"); \n //lets add the attributes.\n var attplaceholder = document.createAttribute(\"placeholder\");\n attplaceholder.value = tempitem.PhoneNumber; \n var attclass = document.createAttribute(\"class\");\n attclass.value = \"btn btn-lg btn-primary btn-block\"; \n //for the button I want to keep the GUID directly as the ID\n var attid = document.createAttribute(\"id\");\n attid.value = tempitem.UniqueGuid;\n //want to display for the button as well.\n tempbutton.innerText = \"update phone number\"\n //lets attach the attributes to the DOM element in question\n tempbutton.setAttributeNode(attid); \n tempbutton.setAttributeNode(attclass); \n \n //lets setup the click function.\n tempbutton.addEventListener('click', function(){\n updatephonenumber();\n }); \n currentDiv.appendChild(tempbutton); \n\n\n //add a divider line\n var temphr = document.createElement(\"hr\");\n currentDiv.appendChild(temphr);\n }\n\n }\n\n //the new add option.\n var currentDivaddressdisplay = document.getElementById(\"addressdisplay\");\n //AddressLineOne\n var tempp = document.createElement(\"input\"); \n //lets add the attributes.\n var atttype = document.createAttribute(\"type\");\n atttype.value = \"text\";\n var attplaceholder = document.createAttribute(\"placeholder\");\n attplaceholder.value = \"enter address line one\"; \n var attrequired = document.createAttribute(\"required\");\n var attid = document.createAttribute(\"id\");\n attid.value = \"newitem\" + \"AddressLineOne\";\n var attclass = document.createAttribute(\"class\");\n attclass.value = \"form-control\";\n //lets attach the attributes to the DOM element in question\n tempp.setAttributeNode(atttype);\n tempp.setAttributeNode(attplaceholder);\n tempp.setAttributeNode(attrequired);\n tempp.setAttributeNode(attid);\n tempp.setAttributeNode(attclass); \n currentDivaddressdisplay.appendChild(tempp); \n\n //AddressLineTwo\n\n var tempp2 = document.createElement(\"input\"); \n //lets add the attributes.\n var atttype = document.createAttribute(\"type\");\n atttype.value = \"text\";\n var attplaceholder = document.createAttribute(\"placeholder\");\n attplaceholder.value = \"enter address line two\"; \n var attrequired = document.createAttribute(\"required\");\n var attid = document.createAttribute(\"id\");\n attid.value = \"newitem\" + \"AddressLineTwo\";\n var attclass = document.createAttribute(\"class\");\n attclass.value = \"form-control\";\n //lets attach the attributes to the DOM element in question\n tempp2.setAttributeNode(atttype);\n tempp2.setAttributeNode(attplaceholder);\n tempp2.setAttributeNode(attrequired);\n tempp2.setAttributeNode(attid);\n tempp2.setAttributeNode(attclass); \n currentDivaddressdisplay.appendChild(tempp2); \n\n //City\n\n var tempp3 = document.createElement(\"input\"); \n //lets add the attributes.\n var atttype = document.createAttribute(\"type\");\n atttype.value = \"text\";\n var attplaceholder = document.createAttribute(\"placeholder\");\n attplaceholder.value = \"enter City\"; \n var attrequired = document.createAttribute(\"required\");\n var attid = document.createAttribute(\"id\");\n attid.value = \"newitem\" + \"City\";\n var attclass = document.createAttribute(\"class\");\n attclass.value = \"form-control\";\n //lets attach the attributes to the DOM element in question\n tempp3.setAttributeNode(atttype);\n tempp3.setAttributeNode(attplaceholder);\n tempp3.setAttributeNode(attrequired);\n tempp3.setAttributeNode(attid);\n tempp3.setAttributeNode(attclass); \n currentDivaddressdisplay.appendChild(tempp3); \n\n //State\n\n var tempp4 = document.createElement(\"input\"); \n //lets add the attributes.\n var atttype = document.createAttribute(\"type\");\n atttype.value = \"text\";\n var attplaceholder = document.createAttribute(\"placeholder\");\n attplaceholder.value = \"enter State\"; \n var attrequired = document.createAttribute(\"required\");\n var attid = document.createAttribute(\"id\");\n attid.value = \"newitem\" + \"State\";\n var attclass = document.createAttribute(\"class\");\n attclass.value = \"form-control\";\n //lets attach the attributes to the DOM element in question\n tempp4.setAttributeNode(atttype);\n tempp4.setAttributeNode(attplaceholder);\n tempp4.setAttributeNode(attrequired);\n tempp4.setAttributeNode(attid);\n tempp4.setAttributeNode(attclass); \n currentDivaddressdisplay.appendChild(tempp4); \n\n //Pincode\n\n var tempp5 = document.createElement(\"input\"); \n //lets add the attributes.\n var atttype = document.createAttribute(\"type\");\n atttype.value = \"text\";\n var attplaceholder = document.createAttribute(\"placeholder\");\n attplaceholder.value = \"enter Pincode\"; \n var attrequired = document.createAttribute(\"required\");\n var attid = document.createAttribute(\"id\");\n attid.value = \"newitem\" + \"Pincode\";\n var attclass = document.createAttribute(\"class\");\n attclass.value = \"form-control\";\n //lets attach the attributes to the DOM element in question\n tempp5.setAttributeNode(atttype);\n tempp5.setAttributeNode(attplaceholder);\n tempp5.setAttributeNode(attrequired);\n tempp5.setAttributeNode(attid);\n tempp5.setAttributeNode(attclass); \n currentDivaddressdisplay.appendChild(tempp5); \n\n //Landmark\n\n var tempp6 = document.createElement(\"input\"); \n //lets add the attributes.\n var atttype = document.createAttribute(\"type\");\n atttype.value = \"text\";\n var attplaceholder = document.createAttribute(\"placeholder\");\n attplaceholder.value = \"enter landmark\"; \n var attrequired = document.createAttribute(\"required\");\n var attid = document.createAttribute(\"id\");\n attid.value = \"newitem\" + \"Landmark\";\n var attclass = document.createAttribute(\"class\");\n attclass.value = \"form-control\";\n //lets attach the attributes to the DOM element in question\n tempp6.setAttributeNode(atttype);\n tempp6.setAttributeNode(attplaceholder);\n tempp6.setAttributeNode(attrequired);\n tempp6.setAttributeNode(attid);\n tempp6.setAttributeNode(attclass); \n currentDivaddressdisplay.appendChild(tempp6); \n\n //AddressExtraNotes\n\n var tempp7 = document.createElement(\"input\"); \n //lets add the attributes.\n var atttype = document.createAttribute(\"type\");\n atttype.value = \"text\";\n var attplaceholder = document.createAttribute(\"placeholder\");\n attplaceholder.value = \"enter address extra notes\"; \n var attrequired = document.createAttribute(\"required\");\n var attid = document.createAttribute(\"id\");\n attid.value = \"newitem\" + \"AddressExtraNotes\";\n var attclass = document.createAttribute(\"class\");\n attclass.value = \"form-control\";\n //lets attach the attributes to the DOM element in question\n tempp7.setAttributeNode(atttype);\n tempp7.setAttributeNode(attplaceholder);\n tempp7.setAttributeNode(attrequired);\n tempp7.setAttributeNode(attid);\n tempp7.setAttributeNode(attclass); \n currentDivaddressdisplay.appendChild(tempp7); \n\n\n //we need a button to update.\n var tempbutton = document.createElement(\"button\"); \n //lets add the attributes. \n var attclass = document.createAttribute(\"class\");\n attclass.value = \"btn btn-lg btn-primary btn-block\"; \n //for the button I want to keep the GUID directly as the ID\n var attid = document.createAttribute(\"id\");\n attid.value = \"newitem\" + \"AddressButton\";\n //want to display for the button as well.\n tempbutton.innerText = \"add address\"\n //lets attach the attributes to the DOM element in question\n tempbutton.setAttributeNode(attid); \n tempbutton.setAttributeNode(attclass); \n \n //lets setup the click function.\n tempbutton.addEventListener('click', function(){\n addaddress();\n }); \n currentDivaddressdisplay.appendChild(tempbutton); \n\n if(result.Address == true)\n {\n //if this is true, then items related to this topic are available\n var itemsarray = result.addressViewModels;\n //pick the div meant for this item\n var currentDiv = document.getElementById(\"addressdisplay\");\n //start adding the elements.\n //add title.\n var titlep = document.createElement(\"p\"); \n titlep.innerText = \"address\";\n currentDiv.appendChild(titlep); \n \n //add the numbers from the collection.\n for(var i=0;i<itemsarray.length;i++)\n {\n var tempitem = itemsarray[i];\n\n //AddressLineOne\n var tempp = document.createElement(\"input\"); \n //lets add the attributes.\n var atttype = document.createAttribute(\"type\");\n atttype.value = \"text\";\n var attplaceholder = document.createAttribute(\"placeholder\");\n attplaceholder.value = tempitem.AddressLineOne; \n var attrequired = document.createAttribute(\"required\");\n var attid = document.createAttribute(\"id\");\n attid.value = tempitem.UniqueGuid + \"AddressLineOne\";\n var attclass = document.createAttribute(\"class\");\n attclass.value = \"form-control\";\n //lets attach the attributes to the DOM element in question\n tempp.setAttributeNode(atttype);\n tempp.setAttributeNode(attplaceholder);\n tempp.setAttributeNode(attrequired);\n tempp.setAttributeNode(attid);\n tempp.setAttributeNode(attclass); \n currentDiv.appendChild(tempp); \n\n //AddressLineTwo\n\n var tempp2 = document.createElement(\"input\"); \n //lets add the attributes.\n var atttype = document.createAttribute(\"type\");\n atttype.value = \"text\";\n var attplaceholder = document.createAttribute(\"placeholder\");\n attplaceholder.value = tempitem.AddressLineTwo; \n var attrequired = document.createAttribute(\"required\");\n var attid = document.createAttribute(\"id\");\n attid.value = tempitem.UniqueGuid + \"AddressLineTwo\";\n var attclass = document.createAttribute(\"class\");\n attclass.value = \"form-control\";\n //lets attach the attributes to the DOM element in question\n tempp2.setAttributeNode(atttype);\n tempp2.setAttributeNode(attplaceholder);\n tempp2.setAttributeNode(attrequired);\n tempp2.setAttributeNode(attid);\n tempp2.setAttributeNode(attclass); \n currentDiv.appendChild(tempp2); \n\n //City\n\n var tempp3 = document.createElement(\"input\"); \n //lets add the attributes.\n var atttype = document.createAttribute(\"type\");\n atttype.value = \"text\";\n var attplaceholder = document.createAttribute(\"placeholder\");\n attplaceholder.value = tempitem.City; \n var attrequired = document.createAttribute(\"required\");\n var attid = document.createAttribute(\"id\");\n attid.value = tempitem.UniqueGuid + \"City\";\n var attclass = document.createAttribute(\"class\");\n attclass.value = \"form-control\";\n //lets attach the attributes to the DOM element in question\n tempp3.setAttributeNode(atttype);\n tempp3.setAttributeNode(attplaceholder);\n tempp3.setAttributeNode(attrequired);\n tempp3.setAttributeNode(attid);\n tempp3.setAttributeNode(attclass); \n currentDiv.appendChild(tempp3); \n\n //State\n\n var tempp4 = document.createElement(\"input\"); \n //lets add the attributes.\n var atttype = document.createAttribute(\"type\");\n atttype.value = \"text\";\n var attplaceholder = document.createAttribute(\"placeholder\");\n attplaceholder.value = tempitem.State; \n var attrequired = document.createAttribute(\"required\");\n var attid = document.createAttribute(\"id\");\n attid.value = tempitem.UniqueGuid + \"State\";\n var attclass = document.createAttribute(\"class\");\n attclass.value = \"form-control\";\n //lets attach the attributes to the DOM element in question\n tempp4.setAttributeNode(atttype);\n tempp4.setAttributeNode(attplaceholder);\n tempp4.setAttributeNode(attrequired);\n tempp4.setAttributeNode(attid);\n tempp4.setAttributeNode(attclass); \n currentDiv.appendChild(tempp4); \n\n //Pincode\n\n var tempp5 = document.createElement(\"input\"); \n //lets add the attributes.\n var atttype = document.createAttribute(\"type\");\n atttype.value = \"text\";\n var attplaceholder = document.createAttribute(\"placeholder\");\n attplaceholder.value = tempitem.Pincode; \n var attrequired = document.createAttribute(\"required\");\n var attid = document.createAttribute(\"id\");\n attid.value = tempitem.UniqueGuid + \"Pincode\";\n var attclass = document.createAttribute(\"class\");\n attclass.value = \"form-control\";\n //lets attach the attributes to the DOM element in question\n tempp5.setAttributeNode(atttype);\n tempp5.setAttributeNode(attplaceholder);\n tempp5.setAttributeNode(attrequired);\n tempp5.setAttributeNode(attid);\n tempp5.setAttributeNode(attclass); \n currentDiv.appendChild(tempp5); \n\n //Landmark\n\n var tempp6 = document.createElement(\"input\"); \n //lets add the attributes.\n var atttype = document.createAttribute(\"type\");\n atttype.value = \"text\";\n var attplaceholder = document.createAttribute(\"placeholder\");\n attplaceholder.value = tempitem.Landmark; \n var attrequired = document.createAttribute(\"required\");\n var attid = document.createAttribute(\"id\");\n attid.value = tempitem.UniqueGuid + \"Landmark\";\n var attclass = document.createAttribute(\"class\");\n attclass.value = \"form-control\";\n //lets attach the attributes to the DOM element in question\n tempp6.setAttributeNode(atttype);\n tempp6.setAttributeNode(attplaceholder);\n tempp6.setAttributeNode(attrequired);\n tempp6.setAttributeNode(attid);\n tempp6.setAttributeNode(attclass); \n currentDiv.appendChild(tempp6); \n\n //AddressExtraNotes\n\n var tempp7 = document.createElement(\"input\"); \n //lets add the attributes.\n var atttype = document.createAttribute(\"type\");\n atttype.value = \"text\";\n var attplaceholder = document.createAttribute(\"placeholder\");\n attplaceholder.value = tempitem.AddressExtraNotes; \n var attrequired = document.createAttribute(\"required\");\n var attid = document.createAttribute(\"id\");\n attid.value = tempitem.UniqueGuid + \"AddressExtraNotes\";\n var attclass = document.createAttribute(\"class\");\n attclass.value = \"form-control\";\n //lets attach the attributes to the DOM element in question\n tempp7.setAttributeNode(atttype);\n tempp7.setAttributeNode(attplaceholder);\n tempp7.setAttributeNode(attrequired);\n tempp7.setAttributeNode(attid);\n tempp7.setAttributeNode(attclass); \n currentDiv.appendChild(tempp7); \n\n\n //we need a button to update.\n var tempbutton = document.createElement(\"button\"); \n //lets add the attributes. \n var attclass = document.createAttribute(\"class\");\n attclass.value = \"btn btn-lg btn-primary btn-block\"; \n //for the button I want to keep the GUID directly as the ID\n var attid = document.createAttribute(\"id\");\n attid.value = tempitem.UniqueGuid;\n //want to display for the button as well.\n tempbutton.innerText = \"update address\"\n //lets attach the attributes to the DOM element in question\n tempbutton.setAttributeNode(attid); \n tempbutton.setAttributeNode(attclass); \n \n //lets setup the click function.\n tempbutton.addEventListener('click', function(){\n updateaddress();\n }); \n currentDiv.appendChild(tempbutton); \n\n //add a divider line\n var temphr = document.createElement(\"hr\");\n currentDiv.appendChild(temphr);\n } \n \n\n }\n\n var currentDiveducationdisplay = document.getElementById(\"educationdisplay\");\n\n //the new add option.\n //EducationTitle \n var tempp = document.createElement(\"input\"); \n //lets add the attributes.\n var atttype = document.createAttribute(\"type\");\n atttype.value = \"text\";\n var attplaceholder = document.createAttribute(\"placeholder\");\n attplaceholder.value = \"enter education title\"; \n var attrequired = document.createAttribute(\"required\");\n var attid = document.createAttribute(\"id\");\n attid.value = \"newitem\" + \"EducationTitle\";\n var attclass = document.createAttribute(\"class\");\n attclass.value = \"form-control\";\n //lets attach the attributes to the DOM element in question\n tempp.setAttributeNode(atttype);\n tempp.setAttributeNode(attplaceholder);\n tempp.setAttributeNode(attrequired);\n tempp.setAttributeNode(attid);\n tempp.setAttributeNode(attclass); \n currentDiveducationdisplay.appendChild(tempp); \n\n //InstituationName\n\n var tempp2 = document.createElement(\"input\"); \n //lets add the attributes.\n var atttype = document.createAttribute(\"type\");\n atttype.value = \"text\";\n var attplaceholder = document.createAttribute(\"placeholder\");\n attplaceholder.value = \"college/institute name\"; \n var attrequired = document.createAttribute(\"required\");\n var attid = document.createAttribute(\"id\");\n attid.value = \"newitem\" + \"InstituationName\";\n var attclass = document.createAttribute(\"class\");\n attclass.value = \"form-control\";\n //lets attach the attributes to the DOM element in question\n tempp2.setAttributeNode(atttype);\n tempp2.setAttributeNode(attplaceholder);\n tempp2.setAttributeNode(attrequired);\n tempp2.setAttributeNode(attid);\n tempp2.setAttributeNode(attclass); \n currentDiveducationdisplay.appendChild(tempp2); \n\n //YearOfGraduation\n\n var tempp3 = document.createElement(\"input\"); \n //lets add the attributes.\n var atttype = document.createAttribute(\"type\");\n atttype.value = \"text\";\n var attplaceholder = document.createAttribute(\"placeholder\");\n attplaceholder.value = \"year of graduation\"; \n var attrequired = document.createAttribute(\"required\");\n var attid = document.createAttribute(\"id\");\n attid.value = \"newitem\" + \"YearOfGraduation\";\n var attclass = document.createAttribute(\"class\");\n attclass.value = \"form-control\";\n //lets attach the attributes to the DOM element in question\n tempp3.setAttributeNode(atttype);\n tempp3.setAttributeNode(attplaceholder);\n tempp3.setAttributeNode(attrequired);\n tempp3.setAttributeNode(attid);\n tempp3.setAttributeNode(attclass); \n currentDiveducationdisplay.appendChild(tempp3); \n\n //PassGrade\n\n var tempp4 = document.createElement(\"input\"); \n //lets add the attributes.\n var atttype = document.createAttribute(\"type\");\n atttype.value = \"text\";\n var attplaceholder = document.createAttribute(\"placeholder\");\n attplaceholder.value = \"pass grade\"; \n var attrequired = document.createAttribute(\"required\");\n var attid = document.createAttribute(\"id\");\n attid.value = \"newitem\" + \"PassGrade\";\n var attclass = document.createAttribute(\"class\");\n attclass.value = \"form-control\";\n //lets attach the attributes to the DOM element in question\n tempp4.setAttributeNode(atttype);\n tempp4.setAttributeNode(attplaceholder);\n tempp4.setAttributeNode(attrequired);\n tempp4.setAttributeNode(attid);\n tempp4.setAttributeNode(attclass); \n currentDiveducationdisplay.appendChild(tempp4); \n\n //EducationOtherNotes1\n\n var tempp5 = document.createElement(\"input\"); \n //lets add the attributes.\n var atttype = document.createAttribute(\"type\");\n atttype.value = \"text\";\n var attplaceholder = document.createAttribute(\"placeholder\");\n attplaceholder.value = \"other notes\"; \n var attrequired = document.createAttribute(\"required\");\n var attid = document.createAttribute(\"id\");\n attid.value = \"newitem\" + \"EducationOtherNotes1\";\n var attclass = document.createAttribute(\"class\");\n attclass.value = \"form-control\";\n //lets attach the attributes to the DOM element in question\n tempp5.setAttributeNode(atttype);\n tempp5.setAttributeNode(attplaceholder);\n tempp5.setAttributeNode(attrequired);\n tempp5.setAttributeNode(attid);\n tempp5.setAttributeNode(attclass); \n currentDiveducationdisplay.appendChild(tempp5); \n\n //EducationOtherNotes2\n\n var tempp6 = document.createElement(\"input\"); \n //lets add the attributes.\n var atttype = document.createAttribute(\"type\");\n atttype.value = \"text\";\n var attplaceholder = document.createAttribute(\"placeholder\");\n attplaceholder.value = \"other notes\"; \n var attrequired = document.createAttribute(\"required\");\n var attid = document.createAttribute(\"id\");\n attid.value = \"newitem\" + \"EducationOtherNotes2\";\n var attclass = document.createAttribute(\"class\");\n attclass.value = \"form-control\";\n //lets attach the attributes to the DOM element in question\n tempp6.setAttributeNode(atttype);\n tempp6.setAttributeNode(attplaceholder);\n tempp6.setAttributeNode(attrequired);\n tempp6.setAttributeNode(attid);\n tempp6.setAttributeNode(attclass); \n currentDiveducationdisplay.appendChild(tempp6); \n\n //we need a button to update.\n var tempbutton = document.createElement(\"button\"); \n //lets add the attributes. \n var attclass = document.createAttribute(\"class\");\n attclass.value = \"btn btn-lg btn-primary btn-block\"; \n //for the button I want to keep the GUID directly as the ID\n var attid = document.createAttribute(\"id\");\n attid.value = \"newitem\" + \"EducationButton\";\n //want to display for the button as well.\n tempbutton.innerText = \"add education\"\n //lets attach the attributes to the DOM element in question\n tempbutton.setAttributeNode(attid); \n tempbutton.setAttributeNode(attclass); \n \n //lets setup the click function.\n tempbutton.addEventListener('click', function(){\n addeducation();\n }); \n currentDiveducationdisplay.appendChild(tempbutton); \n\n if(result.EducationalDetailsSummary == true)\n {\n //if this is true, then items related to this topic are available\n //try and display them.\n var itemsarray = result.educationalDetailViewModels;\n //pick the div meant for this item\n var currentDiv = document.getElementById(\"educationdisplay\");\n //start adding the elements.\n //add title.\n var titlep = document.createElement(\"p\"); \n titlep.innerText = \"education\";\n currentDiv.appendChild(titlep);\n //add the numbers from the collection.\n for(var i=0;i<itemsarray.length;i++)\n {\n var tempitem = itemsarray[i];\n\n //EducationTitle \n var tempp = document.createElement(\"input\"); \n //lets add the attributes.\n var atttype = document.createAttribute(\"type\");\n atttype.value = \"text\";\n var attplaceholder = document.createAttribute(\"placeholder\");\n attplaceholder.value = tempitem.EducationTitle; \n var attrequired = document.createAttribute(\"required\");\n var attid = document.createAttribute(\"id\");\n attid.value = tempitem.UniqueGuid + \"EducationTitle\";\n var attclass = document.createAttribute(\"class\");\n attclass.value = \"form-control\";\n //lets attach the attributes to the DOM element in question\n tempp.setAttributeNode(atttype);\n tempp.setAttributeNode(attplaceholder);\n tempp.setAttributeNode(attrequired);\n tempp.setAttributeNode(attid);\n tempp.setAttributeNode(attclass); \n currentDiv.appendChild(tempp); \n\n //InstituationName\n\n var tempp2 = document.createElement(\"input\"); \n //lets add the attributes.\n var atttype = document.createAttribute(\"type\");\n atttype.value = \"text\";\n var attplaceholder = document.createAttribute(\"placeholder\");\n attplaceholder.value = tempitem.InstituationName; \n var attrequired = document.createAttribute(\"required\");\n var attid = document.createAttribute(\"id\");\n attid.value = tempitem.UniqueGuid + \"InstituationName\";\n var attclass = document.createAttribute(\"class\");\n attclass.value = \"form-control\";\n //lets attach the attributes to the DOM element in question\n tempp2.setAttributeNode(atttype);\n tempp2.setAttributeNode(attplaceholder);\n tempp2.setAttributeNode(attrequired);\n tempp2.setAttributeNode(attid);\n tempp2.setAttributeNode(attclass); \n currentDiv.appendChild(tempp2); \n\n //YearOfGraduation\n\n var tempp3 = document.createElement(\"input\"); \n //lets add the attributes.\n var atttype = document.createAttribute(\"type\");\n atttype.value = \"text\";\n var attplaceholder = document.createAttribute(\"placeholder\");\n attplaceholder.value = tempitem.YearOfGraduation; \n var attrequired = document.createAttribute(\"required\");\n var attid = document.createAttribute(\"id\");\n attid.value = tempitem.UniqueGuid + \"YearOfGraduation\";\n var attclass = document.createAttribute(\"class\");\n attclass.value = \"form-control\";\n //lets attach the attributes to the DOM element in question\n tempp3.setAttributeNode(atttype);\n tempp3.setAttributeNode(attplaceholder);\n tempp3.setAttributeNode(attrequired);\n tempp3.setAttributeNode(attid);\n tempp3.setAttributeNode(attclass); \n currentDiv.appendChild(tempp3); \n\n //PassGrade\n\n var tempp4 = document.createElement(\"input\"); \n //lets add the attributes.\n var atttype = document.createAttribute(\"type\");\n atttype.value = \"text\";\n var attplaceholder = document.createAttribute(\"placeholder\");\n attplaceholder.value = tempitem.PassGrade; \n var attrequired = document.createAttribute(\"required\");\n var attid = document.createAttribute(\"id\");\n attid.value = tempitem.UniqueGuid + \"PassGrade\";\n var attclass = document.createAttribute(\"class\");\n attclass.value = \"form-control\";\n //lets attach the attributes to the DOM element in question\n tempp4.setAttributeNode(atttype);\n tempp4.setAttributeNode(attplaceholder);\n tempp4.setAttributeNode(attrequired);\n tempp4.setAttributeNode(attid);\n tempp4.setAttributeNode(attclass); \n currentDiv.appendChild(tempp4); \n\n //EducationOtherNotes1\n\n var tempp5 = document.createElement(\"input\"); \n //lets add the attributes.\n var atttype = document.createAttribute(\"type\");\n atttype.value = \"text\";\n var attplaceholder = document.createAttribute(\"placeholder\");\n attplaceholder.value = tempitem.EducationOtherNotes1; \n var attrequired = document.createAttribute(\"required\");\n var attid = document.createAttribute(\"id\");\n attid.value = tempitem.UniqueGuid + \"EducationOtherNotes1\";\n var attclass = document.createAttribute(\"class\");\n attclass.value = \"form-control\";\n //lets attach the attributes to the DOM element in question\n tempp5.setAttributeNode(atttype);\n tempp5.setAttributeNode(attplaceholder);\n tempp5.setAttributeNode(attrequired);\n tempp5.setAttributeNode(attid);\n tempp5.setAttributeNode(attclass); \n currentDiv.appendChild(tempp5); \n\n //EducationOtherNotes2\n\n var tempp6 = document.createElement(\"input\"); \n //lets add the attributes.\n var atttype = document.createAttribute(\"type\");\n atttype.value = \"text\";\n var attplaceholder = document.createAttribute(\"placeholder\");\n attplaceholder.value = tempitem.EducationOtherNotes2; \n var attrequired = document.createAttribute(\"required\");\n var attid = document.createAttribute(\"id\");\n attid.value = tempitem.UniqueGuid + \"EducationOtherNotes2\";\n var attclass = document.createAttribute(\"class\");\n attclass.value = \"form-control\";\n //lets attach the attributes to the DOM element in question\n tempp6.setAttributeNode(atttype);\n tempp6.setAttributeNode(attplaceholder);\n tempp6.setAttributeNode(attrequired);\n tempp6.setAttributeNode(attid);\n tempp6.setAttributeNode(attclass); \n currentDiv.appendChild(tempp6); \n\n //we need a button to update.\n var tempbutton = document.createElement(\"button\"); \n //lets add the attributes. \n var attclass = document.createAttribute(\"class\");\n attclass.value = \"btn btn-lg btn-primary btn-block\"; \n //for the button I want to keep the GUID directly as the ID\n var attid = document.createAttribute(\"id\");\n attid.value = tempitem.UniqueGuid;\n //want to display for the button as well.\n tempbutton.innerText = \"update education\"\n //lets attach the attributes to the DOM element in question\n tempbutton.setAttributeNode(attid); \n tempbutton.setAttributeNode(attclass); \n \n //lets setup the click function.\n tempbutton.addEventListener('click', function(){\n updateeducation();\n }); \n currentDiv.appendChild(tempbutton); \n\n //add a divider line\n var temphr = document.createElement(\"hr\");\n currentDiv.appendChild(temphr);\n }\n \n } \n\n var currentDivskilldisplay = document.getElementById(\"skilldisplay\"); \n\n //add new item\n var tempp = document.createElement(\"input\"); \n //lets add the attributes.\n var atttype = document.createAttribute(\"type\");\n atttype.value = \"text\";\n var attplaceholder = document.createAttribute(\"placeholder\");\n attplaceholder.value = \"add new skill\"; \n var attrequired = document.createAttribute(\"required\");\n var attid = document.createAttribute(\"id\");\n attid.value = \"newitem\" + \"SkillTitle\";\n var attclass = document.createAttribute(\"class\");\n attclass.value = \"form-control\";\n //lets attach the attributes to the DOM element in question\n tempp.setAttributeNode(atttype);\n tempp.setAttributeNode(attplaceholder);\n tempp.setAttributeNode(attrequired);\n tempp.setAttributeNode(attid);\n tempp.setAttributeNode(attclass); \n currentDivskilldisplay.appendChild(tempp); \n\n //SkillDescription\n\n var tempp = document.createElement(\"input\"); \n //lets add the attributes.\n var atttype = document.createAttribute(\"type\");\n atttype.value = \"text\";\n var attplaceholder = document.createAttribute(\"placeholder\");\n attplaceholder.value = \"describe the skill\"; \n var attrequired = document.createAttribute(\"required\");\n var attid = document.createAttribute(\"id\");\n attid.value = \"newitem\" + \"SkillDescription\";\n var attclass = document.createAttribute(\"class\");\n attclass.value = \"form-control\";\n //lets attach the attributes to the DOM element in question\n tempp.setAttributeNode(atttype);\n tempp.setAttributeNode(attplaceholder);\n tempp.setAttributeNode(attrequired);\n tempp.setAttributeNode(attid);\n tempp.setAttributeNode(attclass); \n currentDivskilldisplay.appendChild(tempp); \n\n //SkillExperience\n\n var tempp = document.createElement(\"input\"); \n //lets add the attributes.\n var atttype = document.createAttribute(\"type\");\n atttype.value = \"text\";\n var attplaceholder = document.createAttribute(\"placeholder\");\n attplaceholder.value = \"skill experience\"; \n var attrequired = document.createAttribute(\"required\");\n var attid = document.createAttribute(\"id\");\n attid.value = \"newitem\" + \"SkillExperience\";\n var attclass = document.createAttribute(\"class\");\n attclass.value = \"form-control\";\n //lets attach the attributes to the DOM element in question\n tempp.setAttributeNode(atttype);\n tempp.setAttributeNode(attplaceholder);\n tempp.setAttributeNode(attrequired);\n tempp.setAttributeNode(attid);\n tempp.setAttributeNode(attclass); \n currentDivskilldisplay.appendChild(tempp); \n\n //SkillOtherNotes1\n\n var tempp = document.createElement(\"input\"); \n //lets add the attributes.\n var atttype = document.createAttribute(\"type\");\n atttype.value = \"text\";\n var attplaceholder = document.createAttribute(\"placeholder\");\n attplaceholder.value = \"other notes\"; \n var attrequired = document.createAttribute(\"required\");\n var attid = document.createAttribute(\"id\");\n attid.value = \"newitem\" + \"SkillOtherNotes1\";\n var attclass = document.createAttribute(\"class\");\n attclass.value = \"form-control\";\n //lets attach the attributes to the DOM element in question\n tempp.setAttributeNode(atttype);\n tempp.setAttributeNode(attplaceholder);\n tempp.setAttributeNode(attrequired);\n tempp.setAttributeNode(attid);\n tempp.setAttributeNode(attclass); \n currentDivskilldisplay.appendChild(tempp); \n\n //SkillOtherNotes2\n\n var tempp = document.createElement(\"input\"); \n //lets add the attributes.\n var atttype = document.createAttribute(\"type\");\n atttype.value = \"text\";\n var attplaceholder = document.createAttribute(\"placeholder\");\n attplaceholder.value = \"other notes\"; \n var attrequired = document.createAttribute(\"required\");\n var attid = document.createAttribute(\"id\");\n attid.value = \"newitem\" + \"SkillOtherNotes2\";\n var attclass = document.createAttribute(\"class\");\n attclass.value = \"form-control\";\n //lets attach the attributes to the DOM element in question\n tempp.setAttributeNode(atttype);\n tempp.setAttributeNode(attplaceholder);\n tempp.setAttributeNode(attrequired);\n tempp.setAttributeNode(attid);\n tempp.setAttributeNode(attclass); \n currentDivskilldisplay.appendChild(tempp);\n \n var tempbutton = document.createElement(\"button\"); \n //lets add the attributes. \n var attclass = document.createAttribute(\"class\");\n attclass.value = \"btn btn-lg btn-primary btn-block\"; \n //for the button I want to keep the GUID directly as the ID\n var attid = document.createAttribute(\"id\");\n attid.value = \"newitem\" + \"SkillButton\";\n //want to display for the button as well.\n tempbutton.innerText = \"add skills\"\n //lets attach the attributes to the DOM element in question\n tempbutton.setAttributeNode(attid); \n tempbutton.setAttributeNode(attclass); \n \n //lets setup the click function.\n tempbutton.addEventListener('click', function(){\n addskill();\n }); \n currentDivskilldisplay.appendChild(tempbutton); \n \n if(result.SkillsSummary == true)\n {\n //if this is true, then items related to this topic are available\n //try and display them.\n var itemsarray = result.skillsTableViewModels;\n //pick the div meant for this item\n var currentDiv = document.getElementById(\"skilldisplay\");\n //start adding the elements.\n //add title.\n var titlep = document.createElement(\"p\"); \n titlep.innerText = \"skills\";\n currentDiv.appendChild(titlep);\n //add the numbers from the collection.\n for(var i=0;i<itemsarray.length;i++)\n {\n var tempitem = itemsarray[i];\n \n //SkillTitle\n\n var tempp = document.createElement(\"input\"); \n //lets add the attributes.\n var atttype = document.createAttribute(\"type\");\n atttype.value = \"text\";\n var attplaceholder = document.createAttribute(\"placeholder\");\n attplaceholder.value = tempitem.SkillTitle; \n var attrequired = document.createAttribute(\"required\");\n var attid = document.createAttribute(\"id\");\n attid.value = tempitem.UniqueGuid + \"SkillTitle\";\n var attclass = document.createAttribute(\"class\");\n attclass.value = \"form-control\";\n //lets attach the attributes to the DOM element in question\n tempp.setAttributeNode(atttype);\n tempp.setAttributeNode(attplaceholder);\n tempp.setAttributeNode(attrequired);\n tempp.setAttributeNode(attid);\n tempp.setAttributeNode(attclass); \n currentDiv.appendChild(tempp); \n\n //SkillDescription\n\n var tempp = document.createElement(\"input\"); \n //lets add the attributes.\n var atttype = document.createAttribute(\"type\");\n atttype.value = \"text\";\n var attplaceholder = document.createAttribute(\"placeholder\");\n attplaceholder.value = tempitem.SkillDescription; \n var attrequired = document.createAttribute(\"required\");\n var attid = document.createAttribute(\"id\");\n attid.value = tempitem.UniqueGuid + \"SkillDescription\";\n var attclass = document.createAttribute(\"class\");\n attclass.value = \"form-control\";\n //lets attach the attributes to the DOM element in question\n tempp.setAttributeNode(atttype);\n tempp.setAttributeNode(attplaceholder);\n tempp.setAttributeNode(attrequired);\n tempp.setAttributeNode(attid);\n tempp.setAttributeNode(attclass); \n currentDiv.appendChild(tempp); \n\n //SkillExperience\n\n var tempp = document.createElement(\"input\"); \n //lets add the attributes.\n var atttype = document.createAttribute(\"type\");\n atttype.value = \"text\";\n var attplaceholder = document.createAttribute(\"placeholder\");\n attplaceholder.value = tempitem.SkillExperience; \n var attrequired = document.createAttribute(\"required\");\n var attid = document.createAttribute(\"id\");\n attid.value = tempitem.UniqueGuid + \"SkillExperience\";\n var attclass = document.createAttribute(\"class\");\n attclass.value = \"form-control\";\n //lets attach the attributes to the DOM element in question\n tempp.setAttributeNode(atttype);\n tempp.setAttributeNode(attplaceholder);\n tempp.setAttributeNode(attrequired);\n tempp.setAttributeNode(attid);\n tempp.setAttributeNode(attclass); \n currentDiv.appendChild(tempp); \n\n //SkillOtherNotes1\n\n var tempp = document.createElement(\"input\"); \n //lets add the attributes.\n var atttype = document.createAttribute(\"type\");\n atttype.value = \"text\";\n var attplaceholder = document.createAttribute(\"placeholder\");\n attplaceholder.value = tempitem.SkillOtherNotes1; \n var attrequired = document.createAttribute(\"required\");\n var attid = document.createAttribute(\"id\");\n attid.value = tempitem.UniqueGuid + \"SkillOtherNotes1\";\n var attclass = document.createAttribute(\"class\");\n attclass.value = \"form-control\";\n //lets attach the attributes to the DOM element in question\n tempp.setAttributeNode(atttype);\n tempp.setAttributeNode(attplaceholder);\n tempp.setAttributeNode(attrequired);\n tempp.setAttributeNode(attid);\n tempp.setAttributeNode(attclass); \n currentDiv.appendChild(tempp); \n\n //SkillOtherNotes2\n\n var tempp = document.createElement(\"input\"); \n //lets add the attributes.\n var atttype = document.createAttribute(\"type\");\n atttype.value = \"text\";\n var attplaceholder = document.createAttribute(\"placeholder\");\n attplaceholder.value = tempitem.SkillOtherNotes2; \n var attrequired = document.createAttribute(\"required\");\n var attid = document.createAttribute(\"id\");\n attid.value = tempitem.UniqueGuid + \"SkillOtherNotes2\";\n var attclass = document.createAttribute(\"class\");\n attclass.value = \"form-control\";\n //lets attach the attributes to the DOM element in question\n tempp.setAttributeNode(atttype);\n tempp.setAttributeNode(attplaceholder);\n tempp.setAttributeNode(attrequired);\n tempp.setAttributeNode(attid);\n tempp.setAttributeNode(attclass); \n currentDiv.appendChild(tempp); \n \n //we need a button to update.\n var tempbutton = document.createElement(\"button\"); \n //lets add the attributes. \n var attclass = document.createAttribute(\"class\");\n attclass.value = \"btn btn-lg btn-primary btn-block\"; \n //for the button I want to keep the GUID directly as the ID\n var attid = document.createAttribute(\"id\");\n attid.value = tempitem.UniqueGuid;\n //want to display for the button as well.\n tempbutton.innerText = \"update skills\"\n //lets attach the attributes to the DOM element in question\n tempbutton.setAttributeNode(attid); \n tempbutton.setAttributeNode(attclass); \n \n //lets setup the click function.\n tempbutton.addEventListener('click', function(){\n updateskill();\n }); \n currentDiv.appendChild(tempbutton); \n\n //add a divider line\n var temphr = document.createElement(\"hr\");\n currentDiv.appendChild(temphr); \n }\n } \n \n var currentDivprojectdisplay = document.getElementById(\"projectdisplay\");\n\n //add stuff\n\n //ProjectTitle\n\n var tempp = document.createElement(\"input\"); \n //lets add the attributes.\n var atttype = document.createAttribute(\"type\");\n atttype.value = \"text\";\n var attplaceholder = document.createAttribute(\"placeholder\");\n attplaceholder.value = \"enter project title\"; \n var attrequired = document.createAttribute(\"required\");\n var attid = document.createAttribute(\"id\");\n attid.value = \"newitem\" + \"ProjectTitle\";\n var attclass = document.createAttribute(\"class\");\n attclass.value = \"form-control\";\n //lets attach the attributes to the DOM element in question\n tempp.setAttributeNode(atttype);\n tempp.setAttributeNode(attplaceholder);\n tempp.setAttributeNode(attrequired);\n tempp.setAttributeNode(attid);\n tempp.setAttributeNode(attclass); \n currentDivprojectdisplay.appendChild(tempp); \n\n //ProjectDescription\n\n var tempp = document.createElement(\"input\"); \n //lets add the attributes.\n var atttype = document.createAttribute(\"type\");\n atttype.value = \"text\";\n var attplaceholder = document.createAttribute(\"placeholder\");\n attplaceholder.value = \"enter project description\"; \n var attrequired = document.createAttribute(\"required\");\n var attid = document.createAttribute(\"id\");\n attid.value = \"newitem\" + \"ProjectDescription\";\n var attclass = document.createAttribute(\"class\");\n attclass.value = \"form-control\";\n //lets attach the attributes to the DOM element in question\n tempp.setAttributeNode(atttype);\n tempp.setAttributeNode(attplaceholder);\n tempp.setAttributeNode(attrequired);\n tempp.setAttributeNode(attid);\n tempp.setAttributeNode(attclass); \n currentDivprojectdisplay.appendChild(tempp); \n\n //YearOfProject\n\n var tempp = document.createElement(\"input\"); \n //lets add the attributes.\n var atttype = document.createAttribute(\"type\");\n atttype.value = \"text\";\n var attplaceholder = document.createAttribute(\"placeholder\");\n attplaceholder.value = \"enter project year\"; \n var attrequired = document.createAttribute(\"required\");\n var attid = document.createAttribute(\"id\");\n attid.value = \"newitem\" + \"YearOfProject\";\n var attclass = document.createAttribute(\"class\");\n attclass.value = \"form-control\";\n //lets attach the attributes to the DOM element in question\n tempp.setAttributeNode(atttype);\n tempp.setAttributeNode(attplaceholder);\n tempp.setAttributeNode(attrequired);\n tempp.setAttributeNode(attid);\n tempp.setAttributeNode(attclass); \n currentDivprojectdisplay.appendChild(tempp); \n\n //ProjectNotes1\n\n var tempp = document.createElement(\"input\"); \n //lets add the attributes.\n var atttype = document.createAttribute(\"type\");\n atttype.value = \"text\";\n var attplaceholder = document.createAttribute(\"placeholder\");\n attplaceholder.value = \"enter project details\"; \n var attrequired = document.createAttribute(\"required\");\n var attid = document.createAttribute(\"id\");\n attid.value = \"newitem\" + \"ProjectNotes1\";\n var attclass = document.createAttribute(\"class\");\n attclass.value = \"form-control\";\n //lets attach the attributes to the DOM element in question\n tempp.setAttributeNode(atttype);\n tempp.setAttributeNode(attplaceholder);\n tempp.setAttributeNode(attrequired);\n tempp.setAttributeNode(attid);\n tempp.setAttributeNode(attclass); \n currentDivprojectdisplay.appendChild(tempp); \n\n //ProjectNotes2\n\n var tempp = document.createElement(\"input\"); \n //lets add the attributes.\n var atttype = document.createAttribute(\"type\");\n atttype.value = \"text\";\n var attplaceholder = document.createAttribute(\"placeholder\");\n attplaceholder.value = \"enter project details\"; \n var attrequired = document.createAttribute(\"required\");\n var attid = document.createAttribute(\"id\");\n attid.value = \"newitem\" + \"ProjectNotes2\";\n var attclass = document.createAttribute(\"class\");\n attclass.value = \"form-control\";\n //lets attach the attributes to the DOM element in question\n tempp.setAttributeNode(atttype);\n tempp.setAttributeNode(attplaceholder);\n tempp.setAttributeNode(attrequired);\n tempp.setAttributeNode(attid);\n tempp.setAttributeNode(attclass); \n currentDivprojectdisplay.appendChild(tempp); \n\n var tempbutton = document.createElement(\"button\"); \n //lets add the attributes. \n var attclass = document.createAttribute(\"class\");\n attclass.value = \"btn btn-lg btn-primary btn-block\"; \n //for the button I want to keep the GUID directly as the ID\n var attid = document.createAttribute(\"id\");\n attid.value = \"newitem\" + \"SkillButton\";\n //want to display for the button as well.\n tempbutton.innerText = \"add project details\"\n //lets attach the attributes to the DOM element in question\n tempbutton.setAttributeNode(attid); \n tempbutton.setAttributeNode(attclass); \n \n //lets setup the click function.\n tempbutton.addEventListener('click', function(){\n addproject();\n }); \n currentDivprojectdisplay.appendChild(tempbutton); \n\n if(result.ProjectDetails == true)\n {\n //if this is true, then items related to this topic are available\n //try and display them.\n var itemsarray = result.projectDetailViewModels;\n //pick the div meant for this item\n var currentDiv = document.getElementById(\"projectdisplay\");\n //start adding the elements.\n //add title.\n var titlep = document.createElement(\"p\"); \n titlep.innerText = \"project experience\";\n currentDiv.appendChild(titlep);\n //add the numbers from the collection.\n for(var i=0;i<itemsarray.length;i++)\n {\n var tempitem = itemsarray[i];\n\n //ProjectTitle\n\n var tempp = document.createElement(\"input\"); \n //lets add the attributes.\n var atttype = document.createAttribute(\"type\");\n atttype.value = \"text\";\n var attplaceholder = document.createAttribute(\"placeholder\");\n attplaceholder.value = tempitem.ProjectTitle; \n var attrequired = document.createAttribute(\"required\");\n var attid = document.createAttribute(\"id\");\n attid.value = tempitem.UniqueGuid + \"ProjectTitle\";\n var attclass = document.createAttribute(\"class\");\n attclass.value = \"form-control\";\n //lets attach the attributes to the DOM element in question\n tempp.setAttributeNode(atttype);\n tempp.setAttributeNode(attplaceholder);\n tempp.setAttributeNode(attrequired);\n tempp.setAttributeNode(attid);\n tempp.setAttributeNode(attclass); \n currentDiv.appendChild(tempp); \n\n //ProjectDescription\n\n var tempp = document.createElement(\"input\"); \n //lets add the attributes.\n var atttype = document.createAttribute(\"type\");\n atttype.value = \"text\";\n var attplaceholder = document.createAttribute(\"placeholder\");\n attplaceholder.value = tempitem.ProjectDescription; \n var attrequired = document.createAttribute(\"required\");\n var attid = document.createAttribute(\"id\");\n attid.value = tempitem.UniqueGuid + \"ProjectDescription\";\n var attclass = document.createAttribute(\"class\");\n attclass.value = \"form-control\";\n //lets attach the attributes to the DOM element in question\n tempp.setAttributeNode(atttype);\n tempp.setAttributeNode(attplaceholder);\n tempp.setAttributeNode(attrequired);\n tempp.setAttributeNode(attid);\n tempp.setAttributeNode(attclass); \n currentDiv.appendChild(tempp); \n\n //YearOfProject\n\n var tempp = document.createElement(\"input\"); \n //lets add the attributes.\n var atttype = document.createAttribute(\"type\");\n atttype.value = \"text\";\n var attplaceholder = document.createAttribute(\"placeholder\");\n attplaceholder.value = tempitem.YearOfProject; \n var attrequired = document.createAttribute(\"required\");\n var attid = document.createAttribute(\"id\");\n attid.value = tempitem.UniqueGuid + \"YearOfProject\";\n var attclass = document.createAttribute(\"class\");\n attclass.value = \"form-control\";\n //lets attach the attributes to the DOM element in question\n tempp.setAttributeNode(atttype);\n tempp.setAttributeNode(attplaceholder);\n tempp.setAttributeNode(attrequired);\n tempp.setAttributeNode(attid);\n tempp.setAttributeNode(attclass); \n currentDiv.appendChild(tempp); \n\n //ProjectNotes1\n\n var tempp = document.createElement(\"input\"); \n //lets add the attributes.\n var atttype = document.createAttribute(\"type\");\n atttype.value = \"text\";\n var attplaceholder = document.createAttribute(\"placeholder\");\n attplaceholder.value = tempitem.ProjectNotes1; \n var attrequired = document.createAttribute(\"required\");\n var attid = document.createAttribute(\"id\");\n attid.value = tempitem.UniqueGuid + \"ProjectNotes1\";\n var attclass = document.createAttribute(\"class\");\n attclass.value = \"form-control\";\n //lets attach the attributes to the DOM element in question\n tempp.setAttributeNode(atttype);\n tempp.setAttributeNode(attplaceholder);\n tempp.setAttributeNode(attrequired);\n tempp.setAttributeNode(attid);\n tempp.setAttributeNode(attclass); \n currentDiv.appendChild(tempp); \n\n //ProjectNotes2\n\n var tempp = document.createElement(\"input\"); \n //lets add the attributes.\n var atttype = document.createAttribute(\"type\");\n atttype.value = \"text\";\n var attplaceholder = document.createAttribute(\"placeholder\");\n attplaceholder.value = tempitem.ProjectNotes2; \n var attrequired = document.createAttribute(\"required\");\n var attid = document.createAttribute(\"id\");\n attid.value = tempitem.UniqueGuid + \"ProjectNotes2\";\n var attclass = document.createAttribute(\"class\");\n attclass.value = \"form-control\";\n //lets attach the attributes to the DOM element in question\n tempp.setAttributeNode(atttype);\n tempp.setAttributeNode(attplaceholder);\n tempp.setAttributeNode(attrequired);\n tempp.setAttributeNode(attid);\n tempp.setAttributeNode(attclass); \n currentDiv.appendChild(tempp); \n \n //we need a button to update.\n var tempbutton = document.createElement(\"button\"); \n //lets add the attributes. \n var attclass = document.createAttribute(\"class\");\n attclass.value = \"btn btn-lg btn-primary btn-block\"; \n //for the button I want to keep the GUID directly as the ID\n var attid = document.createAttribute(\"id\");\n attid.value = tempitem.UniqueGuid;\n //want to display for the button as well.\n tempbutton.innerText = \"update project details\"\n //lets attach the attributes to the DOM element in question\n tempbutton.setAttributeNode(attid); \n tempbutton.setAttributeNode(attclass); \n \n //lets setup the click function.\n tempbutton.addEventListener('click', function(){\n updateproject();\n }); \n currentDiv.appendChild(tempbutton); \n\n //add a divider line\n var temphr = document.createElement(\"hr\");\n currentDiv.appendChild(temphr); \n }\n } \n\n var currentDivextracurriculardisplay = document.getElementById(\"extracurriculardisplay\"); \n \n //add stuff\n\n //ExtraCurricularOtherNotes1\n var tempp = document.createElement(\"input\"); \n //lets add the attributes.\n var atttype = document.createAttribute(\"type\");\n atttype.value = \"text\";\n var attplaceholder = document.createAttribute(\"placeholder\");\n attplaceholder.value = \"enter extra curricular details\"; \n var attrequired = document.createAttribute(\"required\");\n var attid = document.createAttribute(\"id\");\n attid.value = \"newitem\" + \"ExtraCurricularOtherNotes1\";\n var attclass = document.createAttribute(\"class\");\n attclass.value = \"form-control\";\n //lets attach the attributes to the DOM element in question\n tempp.setAttributeNode(atttype);\n tempp.setAttributeNode(attplaceholder);\n tempp.setAttributeNode(attrequired);\n tempp.setAttributeNode(attid);\n tempp.setAttributeNode(attclass); \n currentDivextracurriculardisplay.appendChild(tempp); \n\n //ExtraCurricularNotes2\n\n var tempp = document.createElement(\"input\"); \n //lets add the attributes.\n var atttype = document.createAttribute(\"type\");\n atttype.value = \"text\";\n var attplaceholder = document.createAttribute(\"placeholder\");\n attplaceholder.value = \"enter extra curricular details\"; \n var attrequired = document.createAttribute(\"required\");\n var attid = document.createAttribute(\"id\");\n attid.value = \"newitem\" + \"ExtraCurricularNotes2\";\n var attclass = document.createAttribute(\"class\");\n attclass.value = \"form-control\";\n //lets attach the attributes to the DOM element in question\n tempp.setAttributeNode(atttype);\n tempp.setAttributeNode(attplaceholder);\n tempp.setAttributeNode(attrequired);\n tempp.setAttributeNode(attid);\n tempp.setAttributeNode(attclass); \n currentDivextracurriculardisplay.appendChild(tempp); \n\n var tempbutton = document.createElement(\"button\"); \n //lets add the attributes. \n var attclass = document.createAttribute(\"class\");\n attclass.value = \"btn btn-lg btn-primary btn-block\"; \n //for the button I want to keep the GUID directly as the ID\n var attid = document.createAttribute(\"id\");\n attid.value = \"newitem\" + \"SkillButton\";\n //want to display for the button as well.\n tempbutton.innerText = \"add extra curricurals\"\n //lets attach the attributes to the DOM element in question\n tempbutton.setAttributeNode(attid); \n tempbutton.setAttributeNode(attclass); \n \n //lets setup the click function.\n tempbutton.addEventListener('click', function(){\n addextracurricural();\n }); \n currentDivextracurriculardisplay.appendChild(tempbutton); \n \n if(result.ExtraCurricularActivitiesSummary == true)\n {\n //if this is true, then items related to this topic are available\n //try and display them.\n var itemsarray = result.extraCurricularViewModels;\n //pick the div meant for this item\n var currentDiv = document.getElementById(\"extracurriculardisplay\");\n //start adding the elements.\n //add title.\n var titlep = document.createElement(\"p\"); \n titlep.innerText = \"extra curriculars\";\n currentDiv.appendChild(titlep);\n //add the numbers from the collection.\n for(var i=0;i<itemsarray.length;i++)\n {\n var tempitem = itemsarray[i];\n\n //ExtraCurricularOtherNotes1\n var tempp = document.createElement(\"input\"); \n //lets add the attributes.\n var atttype = document.createAttribute(\"type\");\n atttype.value = \"text\";\n var attplaceholder = document.createAttribute(\"placeholder\");\n attplaceholder.value = tempitem.ExtraCurricularOtherNotes1; \n var attrequired = document.createAttribute(\"required\");\n var attid = document.createAttribute(\"id\");\n attid.value = tempitem.UniqueGuid + \"ExtraCurricularOtherNotes1\";\n var attclass = document.createAttribute(\"class\");\n attclass.value = \"form-control\";\n //lets attach the attributes to the DOM element in question\n tempp.setAttributeNode(atttype);\n tempp.setAttributeNode(attplaceholder);\n tempp.setAttributeNode(attrequired);\n tempp.setAttributeNode(attid);\n tempp.setAttributeNode(attclass); \n currentDiv.appendChild(tempp); \n\n //ExtraCurricularNotes2\n\n var tempp = document.createElement(\"input\"); \n //lets add the attributes.\n var atttype = document.createAttribute(\"type\");\n atttype.value = \"text\";\n var attplaceholder = document.createAttribute(\"placeholder\");\n attplaceholder.value = tempitem.ExtraCurricularNotes2; \n var attrequired = document.createAttribute(\"required\");\n var attid = document.createAttribute(\"id\");\n attid.value = tempitem.UniqueGuid + \"ExtraCurricularNotes2\";\n var attclass = document.createAttribute(\"class\");\n attclass.value = \"form-control\";\n //lets attach the attributes to the DOM element in question\n tempp.setAttributeNode(atttype);\n tempp.setAttributeNode(attplaceholder);\n tempp.setAttributeNode(attrequired);\n tempp.setAttributeNode(attid);\n tempp.setAttributeNode(attclass); \n currentDiv.appendChild(tempp); \n \n //we need a button to update.\n var tempbutton = document.createElement(\"button\"); \n //lets add the attributes. \n var attclass = document.createAttribute(\"class\");\n attclass.value = \"btn btn-lg btn-primary btn-block\"; \n //for the button I want to keep the GUID directly as the ID\n var attid = document.createAttribute(\"id\");\n attid.value = tempitem.UniqueGuid;\n //want to display for the button as well.\n tempbutton.innerText = \"update extra curricurals\"\n //lets attach the attributes to the DOM element in question\n tempbutton.setAttributeNode(attid); \n tempbutton.setAttributeNode(attclass); \n \n //lets setup the click function.\n tempbutton.addEventListener('click', function(){\n updateextracurricural();\n }); \n currentDiv.appendChild(tempbutton); \n\n //add a divider line\n var temphr = document.createElement(\"hr\");\n currentDiv.appendChild(temphr); \n }\n } \n\n var currentDivotherstuffdisplay = document.getElementById(\"otherstuffdisplay\");\n\n //add stuff\n\n //OtherStuffNotes1\n\n var tempp = document.createElement(\"input\"); \n //lets add the attributes.\n var atttype = document.createAttribute(\"type\");\n atttype.value = \"text\";\n var attplaceholder = document.createAttribute(\"placeholder\");\n attplaceholder.value = \"enter other notes\"; \n var attrequired = document.createAttribute(\"required\");\n var attid = document.createAttribute(\"id\");\n attid.value = \"newitem\" + \"OtherStuffNotes1\";\n var attclass = document.createAttribute(\"class\");\n attclass.value = \"form-control\";\n //lets attach the attributes to the DOM element in question\n tempp.setAttributeNode(atttype);\n tempp.setAttributeNode(attplaceholder);\n tempp.setAttributeNode(attrequired);\n tempp.setAttributeNode(attid);\n tempp.setAttributeNode(attclass); \n currentDivotherstuffdisplay.appendChild(tempp); \n\n //OtherStuffNotes2\n\n var tempp = document.createElement(\"input\"); \n //lets add the attributes.\n var atttype = document.createAttribute(\"type\");\n atttype.value = \"text\";\n var attplaceholder = document.createAttribute(\"placeholder\");\n attplaceholder.value = \"enter other notes\"; \n var attrequired = document.createAttribute(\"required\");\n var attid = document.createAttribute(\"id\");\n attid.value = \"newitem\" + \"OtherStuffNotes2\";\n var attclass = document.createAttribute(\"class\");\n attclass.value = \"form-control\";\n //lets attach the attributes to the DOM element in question\n tempp.setAttributeNode(atttype);\n tempp.setAttributeNode(attplaceholder);\n tempp.setAttributeNode(attrequired);\n tempp.setAttributeNode(attid);\n tempp.setAttributeNode(attclass); \n currentDivotherstuffdisplay.appendChild(tempp); \n\n //OtherStuffNotes3\n\n var tempp = document.createElement(\"input\"); \n //lets add the attributes.\n var atttype = document.createAttribute(\"type\");\n atttype.value = \"text\";\n var attplaceholder = document.createAttribute(\"placeholder\");\n attplaceholder.value = \"enter other notes\"; \n var attrequired = document.createAttribute(\"required\");\n var attid = document.createAttribute(\"id\");\n attid.value = \"newitem\" + \"OtherStuffNotes3\";\n var attclass = document.createAttribute(\"class\");\n attclass.value = \"form-control\";\n //lets attach the attributes to the DOM element in question\n tempp.setAttributeNode(atttype);\n tempp.setAttributeNode(attplaceholder);\n tempp.setAttributeNode(attrequired);\n tempp.setAttributeNode(attid);\n tempp.setAttributeNode(attclass); \n currentDivotherstuffdisplay.appendChild(tempp); \n\n //OtherStuffNotes4\n\n var tempp = document.createElement(\"input\"); \n //lets add the attributes.\n var atttype = document.createAttribute(\"type\");\n atttype.value = \"text\";\n var attplaceholder = document.createAttribute(\"placeholder\");\n attplaceholder.value = \"enter other notes\"; \n var attrequired = document.createAttribute(\"required\");\n var attid = document.createAttribute(\"id\");\n attid.value = \"newitem\" + \"OtherStuffNotes4\";\n var attclass = document.createAttribute(\"class\");\n attclass.value = \"form-control\";\n //lets attach the attributes to the DOM element in question\n tempp.setAttributeNode(atttype);\n tempp.setAttributeNode(attplaceholder);\n tempp.setAttributeNode(attrequired);\n tempp.setAttributeNode(attid);\n tempp.setAttributeNode(attclass); \n currentDivotherstuffdisplay.appendChild(tempp); \n\n //OtherStuffNotes5\n\n var tempp = document.createElement(\"input\"); \n //lets add the attributes.\n var atttype = document.createAttribute(\"type\");\n atttype.value = \"text\";\n var attplaceholder = document.createAttribute(\"placeholder\");\n attplaceholder.value = \"enter other notes\"; \n var attrequired = document.createAttribute(\"required\");\n var attid = document.createAttribute(\"id\");\n attid.value = \"newitem\"+ \"OtherStuffNotes5\";\n var attclass = document.createAttribute(\"class\");\n attclass.value = \"form-control\";\n //lets attach the attributes to the DOM element in question\n tempp.setAttributeNode(atttype);\n tempp.setAttributeNode(attplaceholder);\n tempp.setAttributeNode(attrequired);\n tempp.setAttributeNode(attid);\n tempp.setAttributeNode(attclass); \n currentDivotherstuffdisplay.appendChild(tempp); \n\n var tempbutton = document.createElement(\"button\"); \n //lets add the attributes. \n var attclass = document.createAttribute(\"class\");\n attclass.value = \"btn btn-lg btn-primary btn-block\"; \n //for the button I want to keep the GUID directly as the ID\n var attid = document.createAttribute(\"id\");\n attid.value = \"newitem\" + \"SkillButton\";\n //want to display for the button as well.\n tempbutton.innerText = \"add other notes\"\n //lets attach the attributes to the DOM element in question\n tempbutton.setAttributeNode(attid); \n tempbutton.setAttributeNode(attclass); \n \n //lets setup the click function.\n tempbutton.addEventListener('click', function(){\n addothernote();\n }); \n currentDivotherstuffdisplay.appendChild(tempbutton); \n\n if(result.GetOtherStuff == true)\n {\n //if this is true, then items related to this topic are available\n //try and display them.\n var itemsarray = result.otherStuffViewModels;\n //pick the div meant for this item\n var currentDiv = document.getElementById(\"otherstuffdisplay\");\n //start adding the elements.\n //add title.\n var titlep = document.createElement(\"p\"); \n titlep.innerText = \"other notes\";\n currentDiv.appendChild(titlep);\n //add the numbers from the collection.\n for(var i=0;i<itemsarray.length;i++)\n {\n var tempitem = itemsarray[i];\n\n //OtherStuffNotes1\n\n var tempp = document.createElement(\"input\"); \n //lets add the attributes.\n var atttype = document.createAttribute(\"type\");\n atttype.value = \"text\";\n var attplaceholder = document.createAttribute(\"placeholder\");\n attplaceholder.value = tempitem.OtherStuffNotes1; \n var attrequired = document.createAttribute(\"required\");\n var attid = document.createAttribute(\"id\");\n attid.value = tempitem.UniqueGuid + \"OtherStuffNotes1\";\n var attclass = document.createAttribute(\"class\");\n attclass.value = \"form-control\";\n //lets attach the attributes to the DOM element in question\n tempp.setAttributeNode(atttype);\n tempp.setAttributeNode(attplaceholder);\n tempp.setAttributeNode(attrequired);\n tempp.setAttributeNode(attid);\n tempp.setAttributeNode(attclass); \n currentDiv.appendChild(tempp); \n\n //OtherStuffNotes2\n\n var tempp = document.createElement(\"input\"); \n //lets add the attributes.\n var atttype = document.createAttribute(\"type\");\n atttype.value = \"text\";\n var attplaceholder = document.createAttribute(\"placeholder\");\n attplaceholder.value = tempitem.OtherStuffNotes2; \n var attrequired = document.createAttribute(\"required\");\n var attid = document.createAttribute(\"id\");\n attid.value = tempitem.UniqueGuid + \"OtherStuffNotes2\";\n var attclass = document.createAttribute(\"class\");\n attclass.value = \"form-control\";\n //lets attach the attributes to the DOM element in question\n tempp.setAttributeNode(atttype);\n tempp.setAttributeNode(attplaceholder);\n tempp.setAttributeNode(attrequired);\n tempp.setAttributeNode(attid);\n tempp.setAttributeNode(attclass); \n currentDiv.appendChild(tempp); \n\n //OtherStuffNotes3\n\n var tempp = document.createElement(\"input\"); \n //lets add the attributes.\n var atttype = document.createAttribute(\"type\");\n atttype.value = \"text\";\n var attplaceholder = document.createAttribute(\"placeholder\");\n attplaceholder.value = tempitem.OtherStuffNotes3; \n var attrequired = document.createAttribute(\"required\");\n var attid = document.createAttribute(\"id\");\n attid.value = tempitem.UniqueGuid + \"OtherStuffNotes3\";\n var attclass = document.createAttribute(\"class\");\n attclass.value = \"form-control\";\n //lets attach the attributes to the DOM element in question\n tempp.setAttributeNode(atttype);\n tempp.setAttributeNode(attplaceholder);\n tempp.setAttributeNode(attrequired);\n tempp.setAttributeNode(attid);\n tempp.setAttributeNode(attclass); \n currentDiv.appendChild(tempp); \n\n //OtherStuffNotes4\n\n var tempp = document.createElement(\"input\"); \n //lets add the attributes.\n var atttype = document.createAttribute(\"type\");\n atttype.value = \"text\";\n var attplaceholder = document.createAttribute(\"placeholder\");\n attplaceholder.value = tempitem.OtherStuffNotes4; \n var attrequired = document.createAttribute(\"required\");\n var attid = document.createAttribute(\"id\");\n attid.value = tempitem.UniqueGuid + \"OtherStuffNotes4\";\n var attclass = document.createAttribute(\"class\");\n attclass.value = \"form-control\";\n //lets attach the attributes to the DOM element in question\n tempp.setAttributeNode(atttype);\n tempp.setAttributeNode(attplaceholder);\n tempp.setAttributeNode(attrequired);\n tempp.setAttributeNode(attid);\n tempp.setAttributeNode(attclass); \n currentDiv.appendChild(tempp); \n\n //OtherStuffNotes5\n\n var tempp = document.createElement(\"input\"); \n //lets add the attributes.\n var atttype = document.createAttribute(\"type\");\n atttype.value = \"text\";\n var attplaceholder = document.createAttribute(\"placeholder\");\n attplaceholder.value = tempitem.OtherStuffNotes5; \n var attrequired = document.createAttribute(\"required\");\n var attid = document.createAttribute(\"id\");\n attid.value = tempitem.UniqueGuid + \"OtherStuffNotes5\";\n var attclass = document.createAttribute(\"class\");\n attclass.value = \"form-control\";\n //lets attach the attributes to the DOM element in question\n tempp.setAttributeNode(atttype);\n tempp.setAttributeNode(attplaceholder);\n tempp.setAttributeNode(attrequired);\n tempp.setAttributeNode(attid);\n tempp.setAttributeNode(attclass); \n currentDiv.appendChild(tempp); \n \n //we need a button to update.\n var tempbutton = document.createElement(\"button\"); \n //lets add the attributes. \n var attclass = document.createAttribute(\"class\");\n attclass.value = \"btn btn-lg btn-primary btn-block\"; \n //for the button I want to keep the GUID directly as the ID\n var attid = document.createAttribute(\"id\");\n attid.value = tempitem.UniqueGuid;\n //want to display for the button as well.\n tempbutton.innerText = \"update other notes\"\n //lets attach the attributes to the DOM element in question\n tempbutton.setAttributeNode(attid); \n tempbutton.setAttributeNode(attclass); \n \n //lets setup the click function.\n tempbutton.addEventListener('click', function(){\n updateothernote();\n }); \n currentDiv.appendChild(tempbutton); \n\n //add a divider line\n var temphr = document.createElement(\"hr\");\n currentDiv.appendChild(temphr); \n }\n } \n \n hidetheloading();\n var logcloser=\"----leaving displaytheresumewitheditboxes----\";\n console.log(logcloser);\n}", "function makeHiddenIdUser(nilai) {\n if ($(\"#id_user\").length > 0) {\n $(\"#id_user\").attr('value',nilai);\n } else {\n str = '<input type=\"hidden\" id=\"id-user\" name=\"id_user\" value=\"'+nilai+'\" />';\n $(\"#form-peminjaman\").append(str);\n }\n}", "function prepareElementHidden() {\n\n var name;\n\n if (SETTINGS.hiddenName === true) {\n name = ELEMENT.name;\n ELEMENT.name = '';\n } else {\n name = [typeof SETTINGS.hiddenPrefix == 'string' ? SETTINGS.hiddenPrefix : '', typeof SETTINGS.hiddenSuffix == 'string' ? SETTINGS.hiddenSuffix : '_submit'];\n name = name[0] + ELEMENT.name + name[1];\n }\n\n P._hidden = $('<input ' + 'type=hidden ' +\n\n // Create the name using the original input’s with a prefix and suffix.\n 'name=\"' + name + '\"' + (\n\n // If the element has a value, set the hidden value as well.\n $ELEMENT.data('value') || ELEMENT.value ? ' value=\"' + P.get('select', SETTINGS.formatSubmit) + '\"' : '') + '>')[0];\n\n $ELEMENT.\n\n // If the value changes, update the hidden input with the correct format.\n on('change.' + STATE.id, function () {\n P._hidden.value = ELEMENT.value ? P.get('select', SETTINGS.formatSubmit) : '';\n });\n\n // Insert the hidden input as specified in the settings.\n if (SETTINGS.container) $(SETTINGS.container).append(P._hidden);else $ELEMENT.before(P._hidden);\n }", "function prepareElementHidden() {\n\n var name;\n\n if (SETTINGS.hiddenName === true) {\n name = ELEMENT.name;\n ELEMENT.name = '';\n } else {\n name = [typeof SETTINGS.hiddenPrefix == 'string' ? SETTINGS.hiddenPrefix : '', typeof SETTINGS.hiddenSuffix == 'string' ? SETTINGS.hiddenSuffix : '_submit'];\n name = name[0] + ELEMENT.name + name[1];\n }\n\n P._hidden = $('<input ' + 'type=hidden ' +\n\n // Create the name using the original input’s with a prefix and suffix.\n 'name=\"' + name + '\"' + (\n\n // If the element has a value, set the hidden value as well.\n $ELEMENT.data('value') || ELEMENT.value ? ' value=\"' + P.get('select', SETTINGS.formatSubmit) + '\"' : '') + '>')[0];\n\n $ELEMENT.\n\n // If the value changes, update the hidden input with the correct format.\n on('change.' + STATE.id, function () {\n P._hidden.value = ELEMENT.value ? P.get('select', SETTINGS.formatSubmit) : '';\n });\n\n // Insert the hidden input as specified in the settings.\n if (SETTINGS.container) $(SETTINGS.container).append(P._hidden);else $ELEMENT.before(P._hidden);\n }", "function prepareElementHidden() {\n\n var name;\n\n if (SETTINGS.hiddenName === true) {\n name = ELEMENT.name;\n ELEMENT.name = '';\n } else {\n name = [typeof SETTINGS.hiddenPrefix == 'string' ? SETTINGS.hiddenPrefix : '', typeof SETTINGS.hiddenSuffix == 'string' ? SETTINGS.hiddenSuffix : '_submit'];\n name = name[0] + ELEMENT.name + name[1];\n }\n\n P._hidden = $('<input ' + 'type=hidden ' +\n\n // Create the name using the original input’s with a prefix and suffix.\n 'name=\"' + name + '\"' + (\n\n // If the element has a value, set the hidden value as well.\n $ELEMENT.data('value') || ELEMENT.value ? ' value=\"' + P.get('select', SETTINGS.formatSubmit) + '\"' : '') + '>')[0];\n\n $ELEMENT.\n\n // If the value changes, update the hidden input with the correct format.\n on('change.' + STATE.id, function () {\n P._hidden.value = ELEMENT.value ? P.get('select', SETTINGS.formatSubmit) : '';\n });\n\n // Insert the hidden input as specified in the settings.\n if (SETTINGS.container) $(SETTINGS.container).append(P._hidden);else $ELEMENT.before(P._hidden);\n }", "add(visible = true) {\n\t\tthis.classes = \" \" + this.classes + \" \";\n\t\tlet createOuter = false;\n\t\tif (!this.added) {\n\t\t\tthis.wrapper = this.wrap();\n\t\t\tthis.element = document.createElement(\"input\");\n\t\t\tthis.outerElement = document.createElement(\"div\");\n\t\t\tthis.outerElement.id = this.hiddenId + \"Outer\";\n\t\t\tif (visible) body.appendChild(this.wrapper);\n\t\t\tcreateOuter = true;\n\t\t\tthis.added = true;\n\t\t} else {\n\t\t\tthis.outerElement.style.display = \"block\";\n\t\t}\n\t\tthis.removed = false;\n\n\t\tthis.outerElement.className = \"form-outline\" + (!this.width ? \" short-input \" : \"\");\n\t\tif (this.position === \"center\")\n\t\t\tthis.outerElement.style.margin = \"auto\";\n\t\telse if (this.position === \"right\") {\n\t\t\tthis.outerElement.style.marginRight = \"0\";\n\t\t\tthis.outerElement.style.marginLeft = \"auto\";\n\t\t}\n\t\tthis.outerElement.className += \" \" + this.classes;\n\n\t\tthis.element.id = this.id + \" \" + this.hiddenId + \"forLabel for\"\n\t\t\t+ this.type[0].toUpperCase() + this.type.slice(1);\n\t\tthis.element.type = this.type;\n\t\tthis.element.value = this.value;\n\t\tif (!this.width) {\n\t\t\tthis.element.className += \" short-input\";\n\t\t} else {\n\t\t\tthis.element.style.width = this.width;\n\t\t}\n\t\tthis.element.className += \" form-control \" + this.classes;\n\n\t\tthis.label = document.createElement(\"label\");\n\t\tthis.label.className = \"form-label\";\n\t\tthis.label.htmlFor = this.hiddenId + \"forLabel\";\n\t\tthis.label.innerHTML = this.placeholder;\n\n\t\tif (createOuter) {\n\t\t\tthis.outerElement.appendChild(this.element);\n\t\t\tthis.outerElement.appendChild(this.label);\n\t\t\tthis.wrapper.appendChild(this.outerElement);\n\t\t}\n\n\t\tmanageTheme(this.outerElement, this.theme);\n\t\tif (this.theme === \"light\") {\n\t\t\tthis.outerElement.removeChild(this.outerElement.getElementsByTagName(\"label\")[0]);\n\t\t\tthis.label.className += \" text-dark\";\n\t\t\tthis.outerElement.appendChild(this.label);\n\t\t\tthis.element.className += \" text-dark\";\n\t\t} else {\n\t\t\tthis.outerElement.removeChild(this.outerElement.getElementsByTagName(\"label\")[0]);\n\t\t\tthis.label.className += \" text-light\";\n\t\t\tthis.outerElement.appendChild(this.label);\n\t\t\tthis.element.className += \" text-light\";\n\t\t}\n\n\t\tthis.setStyle(this.style);\n\t}", "function createUploadContainerDiv(uploadInputId) {\n if (!elementExist(uploadContainerDivSelector)) {\n $(uploadInputSelector).wrap(`<div class=\"${uploadContainerDivId}\" id=\"${uploadContainerDivId}\"></div>`);\n $(uploadContainerDivSelector).addClass(settings.outerClass);\n }\n }", "function addSearcElem(){\n\tlet inputElem = $('.form__input_search').children();\n\tlet searchElem = \t`<span class=\"form__inputTarget\"></span>\n\t\t\t\t\t\t<span class=\"form__input_searchEl\"></span>`;\n\t$(inputElem).append(searchElem);\n}", "function prepareElementHidden() {\r\n\r\n var name;\r\n\r\n if (SETTINGS.hiddenName === true) {\r\n name = ELEMENT.name;\r\n ELEMENT.name = '';\r\n } else {\r\n name = [typeof SETTINGS.hiddenPrefix == 'string' ? SETTINGS.hiddenPrefix : '', typeof SETTINGS.hiddenSuffix == 'string' ? SETTINGS.hiddenSuffix : '_submit'];\r\n name = name[0] + ELEMENT.name + name[1];\r\n }\r\n\r\n P._hidden = $('<input ' + 'type=hidden ' +\r\n\r\n // Create the name using the original input’s with a prefix and suffix.\r\n 'name=\"' + name + '\"' + (\r\n\r\n // If the element has a value, set the hidden value as well.\r\n $ELEMENT.data('value') || ELEMENT.value ? ' value=\"' + P.get('select', SETTINGS.formatSubmit) + '\"' : '') + '>')[0];\r\n\r\n $ELEMENT.\r\n\r\n // If the value changes, update the hidden input with the correct format.\r\n on('change.' + STATE.id, function () {\r\n P._hidden.value = ELEMENT.value ? P.get('select', SETTINGS.formatSubmit) : '';\r\n });\r\n\r\n // Insert the hidden input as specified in the settings.\r\n if (SETTINGS.container) $(SETTINGS.container).append(P._hidden);else $ELEMENT.before(P._hidden);\r\n }", "displayLastInputBreak() {\n document.querySelector(\".inputs__break--2\").style.visibility = \"\";\n }", "function showAddSub() {\n $('#addSub').insertAfter(\"#newSubList\");\n $('#addSub').show();\n}", "function generate_new_form(){\n\t$('.form_div:first').clone().insertAfter('.form_div:last')\n}", "function launchCalc() {\n $('#inputs').empty();\n $('#calculator').prepend('<div id=\"inputs\"><div id= \"calcLine\"><input type=\"number\" placeholder=\"Enter Number Here\" id=\"x\"><input type=\"number\" placeholder=\"Enter Number Here\" id=\"y\"></div><div id=\"operators\" ><button class=\"opBut\" id=\"add\">+</button><button class=\"opBut\" id=\"subtract\">-</button><button class=\"opBut\" id=\"multiply\">*</button><button class=\"opBut\" id=\"divide\">/</button></div></div>');\n}", "function setInnerInput(value){\n\t$(\"input\")[0].value=`${value}`;\n}", "function createHiddenIntoRepository(mixRepositoryElement, strId, strName, strValue)\n{\n\tvar repositoryElement;\n if (!empty(mixRepositoryElement)) {\n repositoryElement = getObject(mixRepositoryElement);\n if (empty(repositoryElement))\n return;\n }\n var inputHidden = document.createElement('INPUT');\n inputHidden.setAttribute('type', 'hidden');\n if (!empty(strId))\n inputHidden.id = strId;\n if (!empty(strName))\n inputHidden.name = strName;\n if (!empty(strValue))\n inputHidden.value = strValue;\n if (!empty(mixRepositoryElement))\n repositoryElement.appendChild(inputHidden);\n return inputHidden;\n}", "function addTag() {\n idIndex = idUpdate();\n let tagpointId = \"tag\" + idIndex;\n var tagpoint = jQuery(\"<div/>\", {\n id: tagpointId,\n class: \"all tagshared tagcont\",\n });\n\n let inputId = \"i\" + idIndex;\n var inputpoint = jQuery(\"<input/>\", {\n id: inputId,\n class: \"all ibox\",\n value: \"...\",\n });\n\n var buttonpoint = jQuery(\"<span/>\", {\n id: \"b\" + idIndex,\n class: \"all\",\n html: \"&otimes;\",\n });\n\n $(this).parent().prepend(tagpoint);\n\n $(\"#\" + tagpointId).append(inputpoint);\n $(\"#\" + tagpointId).append(buttonpoint);\n $(\"#\" + inputId).on(\"blur\", processTagInput);\n}", "function valueFilter(column){\n var operator = column.parent('div').next();\n var value = operator.next();\n \n value.empty().append($('<input />').attr('type', 'text').addClass('textfield_value form-control no_radius') \n .attr('name','textfield_value[]')\n .attr('id', 'textfield_value') \n );\n \n operator.children().empty().html($(\"#Operadores\").html());\n}", "function new_div() {\n $(\"#new\").append(\"<div>Test</div>\");\n}", "function from1to2(){\n \t$(\"#hostJoin\").attr(\"hidden\",\"true\");\n \t$(\"#namePassword\").removeAttr(\"hidden\");\n }", "function createButtonInputDiv(buttonInputObj){\n // Exceptions\n if (typeof buttonInputObj!='object' || buttonInputObj['objClass']!='Input'){\n throw \"createButtonInputDiv: createButtonInputDiv must be an Input object.\";\n }\n if (buttonInputObj['type']!='button'){\n throw \"createButtonInputDiv: createButtonInputDiv must be of type \\\"button\\\".\";\n }\n\n var id = buttonInputObj['id'] ;\n var label = buttonInputObj['label'];\n var button = buttonHtml(`${id}Label`,label) ;\n var returnStr = `\n <div id=\"${id}\" class=\"formItem buttonFormItem\">\n <div class=\"formSidePadding\"></div>\n <div class=\"formLabel\"></div>\n <div class=\"formValue buttonFormValue\">${button}</div>\n <div class=\"formSidePadding\"></div>\n </div>\n `;\n return returnStr;\n }", "function addInput () {\n //eliminar todos los elementos hijos del padre;\n var elemento = document.getElementById(\"addInputs\");\n while (elemento.firstChild) {\n elemento.removeChild(elemento.firstChild);\n };\n //colocar los imput\n let valorNumeroDatos = numeroDatos();\n\n for(let i = 1; i < (valorNumeroDatos + 1); i++ ) { \n var inputs = `<input id=\"${i}\" type=\"number\" placeholder = \"Dato # ${i}\"></input>`;\n let input = document.getElementById(\"addInputs\");\n input.insertAdjacentHTML('beforeend', inputs);\n } \n}", "function agregar(){\n $('#MyP').append('<div></div>');\n $('#MyP').append('<span>'+$('#nombre').val()+' </span>');\n $('#MyP').append('<span>'+$('#apellido').val()+' </span>');\n $('#MyP').append('<span>'+$('#direccion').val()+' </span>');\n\n $('#nombre').val(\"\");\n $('#apellido').val(\"\");\n $('#direccion').val(\"\");\n }", "function addRow() {\r\n const div = document.createElement('div');\r\n \r\n div.className = 'row';\r\n var title = document.getElementById('title').textContent;\r\n var description = document.getElementById('description').textContent;\r\n if((title===\"\" && description===\"\") || (title===\"Title\" && description===\" \"))\r\n {}\r\n else\r\n {\r\n if(document.getElementById(\"pin\").style.display == \"none\")\r\n {\r\n div.innerHTML = `\r\n <div class=\"pinned border\" draggable=\"true\">\r\n <div></div>\r\n <div style=\"width:100%;overflow: auto;\">`+title+`</div>\r\n <div style=\"width:100%;height:auto;overflow: auto;\"><p>`+description+`</p></div>\r\n </div>\r\n `;\r\n document.getElementById('pinned').appendChild(div);\r\n }\r\n else\r\n {\r\n div.innerHTML = `\r\n <div class=\"pinned border\" draggable=\"true\">\r\n <div></div>\r\n <div><p>`+title+`</p></div>\r\n <div style=\"width:100%;height:auto\"><p>`+description+`</p></div>\r\n </div>\r\n `;\r\n document.getElementById('other').appendChild(div);\r\n }\r\n }\r\n document.getElementById(\"title\").innerHTML = \"\"; \r\n document.getElementById(\"description\").innerHTML = \"\"; \r\n document.getElementById('input-note-second').style.display ='none';\r\n document.getElementById('input-note').style.display ='block';\r\n }" ]
[ "0.5822297", "0.5798323", "0.57717615", "0.576141", "0.56938076", "0.568108", "0.5676289", "0.56485295", "0.5610389", "0.5597617", "0.55139256", "0.54568803", "0.5451272", "0.5418444", "0.5408009", "0.54036164", "0.5305218", "0.52962327", "0.5272188", "0.5261027", "0.52302116", "0.52057046", "0.5196581", "0.51850456", "0.51734203", "0.5166987", "0.51399696", "0.5128987", "0.51255596", "0.5122117", "0.5121701", "0.50985783", "0.50878894", "0.50841683", "0.5078449", "0.5064413", "0.50632066", "0.5040593", "0.5036054", "0.50204915", "0.5019972", "0.5018885", "0.50185406", "0.50119644", "0.5010849", "0.5010014", "0.49990237", "0.49990237", "0.49950013", "0.49949166", "0.49938568", "0.49938568", "0.49938568", "0.49938568", "0.49938568", "0.49803865", "0.4974479", "0.4971611", "0.49680758", "0.49673507", "0.49639562", "0.4962426", "0.49593827", "0.49555588", "0.49492642", "0.49480012", "0.49478874", "0.49405724", "0.49339253", "0.49272886", "0.4927144", "0.49239695", "0.4919014", "0.49160644", "0.4912094", "0.48991814", "0.4889561", "0.48876175", "0.48855647", "0.48850185", "0.48850185", "0.48850185", "0.48821503", "0.4881468", "0.48761132", "0.4874837", "0.48741668", "0.48673356", "0.48557335", "0.484575", "0.4841187", "0.48300233", "0.4829409", "0.482889", "0.48203996", "0.48178333", "0.48150018", "0.4812272", "0.48121497", "0.48093218" ]
0.6617759
0
.style("fill", ".style("fill", "url(radialgradient)")"); Animation functions
function startAnimation() { waited += new Date().getTime() - stopTime stopAnim = false; Animation(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function setGradient() {\n body.style.backgroundImage =\n \"linear-gradient(to right,\" + cor1.value + \",\" + cor2.value + \")\";\n //mostrar o css do degrade\n css.textContent = body.style.backgroundImage + \";\";\n}", "function pantallaJugar(){\n\n document.getElementById(\"marcadorpadre\").style.display=\"none\";\n var grd = ctx.createRadialGradient(75,50,5,90,60,100);\n grd.addColorStop(0,\"transparent\");\n grd.addColorStop(1,\"black\");\n ctx.fillStyle = grd;\n ctx.fillRect(0,0,1000,500);\n}", "function gradient (){\n\t\t$('.one').mouseenter(function(){\n\t\t\t$(this).addClass('grad')\n\t\t\t$(this).fadeTo('fast','-=0.1');\n\t\t});\n\t}", "function colorCircles(id, color1, color2){\n var grad = svg.append(\"defs\")\n .append(\"linearGradient\").attr(\"id\", \"grad\" + id)\n .attr(\"x1\", \"100%\").attr(\"x2\", \"0%\").attr(\"y1\", \"0%\").attr(\"y2\", \"0%\");\n grad.append(\"stop\").attr(\"offset\", \"50%\").style(\"stop-color\", color1);\n grad.append(\"stop\").attr(\"offset\", \"50%\").style(\"stop-color\", color2);\n}", "function toggleRace() \n{\n isRacing = !isRacing;\n\n if (isRacing) \n {\n go.style.background = 'radial-gradient(greenyellow,green)';\n go.src = 'images/photoFinish.png';\n } \n else \n {\n go.style.background = 'radial-gradient(lightcoral,red)';\n go.src = 'images/photoFinish1.png';\n }\n}", "function setGradient(){\r\n body.style.background = \r\n \"linear-gradient(to right, \"\r\n +color1.value \r\n + \", \"\r\n + color2.value\r\n + \")\";\r\n btn.style.background = \r\n \"linear-gradient(to right, \"\r\n +color1.value \r\n + \", \"\r\n + color2.value\r\n + \")\";\r\n\r\n css.textContent = body.style.background + \";\";\r\n}", "function setGradient(x, y, w, h, c1, c2, c3, c4) {\n strokeWeight(1);\n print(\"Generating gradient..\")\n noFill();\n //Left to right gradient from 1st to 2nd color\n for (let i = x; i <= x + w / 3; i++) {\n let inter = map(i, x, x + w/3, 0, 1);\n let c = lerpColor(c1, c2, inter);\n stroke(c);\n line(i, y, i, y + h);\n }\n\n //Left to right gradient from 2nd to 3rd color\n x += w / 3;\n for (let i = x; i <= x + w / 3; i++) {\n let inter = map(i, x, x + w / 3, 0, 1);\n let c = lerpColor(c2, c3, inter);\n stroke(c);\n line(i, y, i, y + h);\n }\n\n //Left to right gradient from 3rd to 4th color\n x += w / 3;\n for (let i = x; i <= x + w / 3; i++) {\n let inter = map(i, x, x + w / 3, 0, 1);\n let c = lerpColor(c3, c4, inter);\n stroke(c);\n line(i, y, i, y + h);\n }\n}", "function setGradient() {\n\tbody.style.background = \"linear-gradient(to right, \" \n\t+ color1.value \n\t+ \", \" \n\t+ color2.value \n\t+ \")\";\n\tcss.innerText=body.style.background;\n}", "function setGradient() {\n\tvar gradientBackground = \"linear-gradient(\"+ direction.value +\"deg, \" + color1.value + \", \" + color2.value + \")\";\n body.style.background = gradientBackground;\n generator.style.background = gradientBackground;\n\tchangeDirection.style.background = gradientBackground;\n displayCSS();\n}", "function setGradient() {\r\n body.style.background = \"linear-gradient(to right, \" + color1.value + \", \" + color2.value + \")\";\r\n css.textContent = body.style.background + \";\";\r\n}", "function setGradient() {\n\tlet xyGradient = `linear-gradient(to right, ${color1.value}, ${color2.value})`;\n\n\tbody.style.background = xyGradient;\n\trandomBtn.style.background = xyGradient;\n\tcss.style.background = xyGradient;\n\n\tcss.textContent = `linear-gradient(to right, ${color1.value}, ${color2.value});`.toUpperCase();\n}", "function createBackgroundGradiant(){\n backgroundRadialGradient = ctx.createRadialGradient(canvas.width / 2, canvas.height / 2, 0, canvas.width / 2, canvas.height / 2, 500);\n backgroundRadialGradient.addColorStop(0, \"#323232\");\n // backgroundRadialGradient.addColorStop(.8, \"red\");\n backgroundRadialGradient.addColorStop(1, \"black\");\n}", "function setGradient() {\r\n body.style.background = 'linear-gradient(to right, ' + color1.value + ',' + color2.value + ')';\r\n css.textContent = body.style.background + ';'\r\n}", "function setGradient () {\n body.style.background = \n\t\"linear-gradient(to right, \" \n\t+ color1.value \n\t+ \", \" \n\t+ color2.value \n\t+ \")\";\n\n\tcss.textContent = body.style.background + \";\";\n}", "function _radialGradientFill(ctx, obj, path, fill, zindex) {\r\n var rv = [], prop = fill ? \"Fill\" : \"Stroke\",\r\n fp = obj.param,\r\n zindex2 = 0,\r\n rr = fp.r1 * 2,\r\n x = fp.x1 - fp.r1,\r\n y = fp.y1 - fp.r1,\r\n gx = (fp.x0 - (fp.x1 - fp.r1)) / rr,\r\n gy = (fp.y0 - (fp.y1 - fp.r1)) / rr,\r\n m = uu.matrix2d.translate(x, y, ctx._matrix),\r\n tmpmtx = _matrix('Ellipse', m),\r\n v, bari = \"\";\r\n\r\n rv.push('<Canvas Canvas.ZIndex=\"', zindex, '\">');\r\n\r\n if (fill) {\r\n // fill outside\r\n if (obj.color.length) {\r\n v = obj.color[obj.color.length - 1];\r\n if (v.color.a > 0.001) {\r\n if (ctx.__mix === 4) {\r\n zindex2 = --ctx._zindex;\r\n }\r\n bari = [ '<Path Opacity=\"', ctx.globalAlpha,\r\n '\" Canvas.ZIndex=\"', zindex2,\r\n '\" Data=\"', path, '\" Fill=\"', v.color.argb(), '\" />'].join(\"\");\r\n !ctx.xFlyweight &&\r\n ctx._history.push(ctx._clipPath ? (bari = _clippy(ctx, bari)) : bari);\r\n ctx._state !== 0x1 ? ctx._stock.push(bari)\r\n : ctx._view.add(ctx._content.createFromXaml(bari));\r\n }\r\n }\r\n }\r\n\r\n rv.push('<Ellipse Opacity=\"', ctx.globalAlpha,\r\n '\" Width=\"', rr, '\" Height=\"', rr,\r\n fill ? \"\" : _stroke(ctx),\r\n '\"><Ellipse.', prop, '><RadialGradientBrush GradientOrigin=\"',\r\n gx, ',', gy,\r\n '\" Center=\"0.5,0.5\" RadiusX=\"0.5\" RadiusY=\"0.5\">',\r\n obj.colors || _radialColor(obj),\r\n '</RadialGradientBrush></Ellipse.', prop, '>',\r\n tmpmtx,\r\n (ctx.__shadowColor.a && ctx.shadowBlur) ? _dropShadow(ctx, \"Ellipse\", ctx.__shadowColor) : \"\",\r\n '</Ellipse></Canvas>');\r\n return rv.join(\"\");\r\n}", "function setGradient(){\n body.style.background=\n \"Gradient(left, \"\n + color1.value\n + \", right \"\n + color2.value\n + \")\";\n\n // textContent adds a text content to the DOM\n css.textContent = body.style.background+ \";\";\n}", "function setGradient(){\r\n gradient.style.background = `linear-gradient(to right, ${color1.value} , ${color2.value})`;\r\n h3.textContent = gradient.style.background;\r\n}", "function setGradient(){\n\tbody.style.background=\n\t\"linear-gradient(to right,\"\n\t+color1.value\n\t+\",\"\n\t+color2.value\n\t+\")\";\n\th3.textContent=\"background:\"+body.style.background+\";\";\n\tflag===1;\n}", "radomGradients(){\n let currentPalette = defineLanguage().ColorPalettes.randomArray(); \n\n this.setState({\n firstColor: currentPalette.firstColor,\n secondColor: currentPalette.secondColor,\n thirdColor: currentPalette.thirdColor,\n fourthColor: currentPalette.fourthColor,\n });\n\n }", "function makeGradient(){\n var gradX = Math.random()*20+1;\n var gradY = Math.random()*20+1;\n var grd = ctx.createRadialGradient(gradX, gradY, 0,gradX,gradY, Math.random()*5+50);\n var rgba = random_rgba();\n var strRgba = 'rgba(' + rgba[0] + ',' + rgba[1] + ',' + rgba[2] + ',' + rgba[3] + ')';\n grd.addColorStop(0, strRgba);\n rgba[3]-=0.02;\n // strRgba = 'rgba(' + rgba[0] + ',' + rgba[1] + ',' + rgba[2] + ',' + rgba[3] + ')';\n // grd.addColorStop(.1, strRgba);\n // rgba[3]-=0.02;\n // strRgba = 'rgba(' + rgba[0] + ',' + rgba[1] + ',' + rgba[2] + ',' + rgba[3] + ')';\n // grd.addColorStop(.5, strRgba);\n // rgba[3]-=0.02;\n // strRgba = 'rgba(' + rgba[0] + ',' + rgba[1] + ',' + rgba[2] + ',' + rgba[3] + ')';\n // grd.addColorStop(.7, strRgba);\n rgba[3]-=0.7;\n strRgba = 'rgba(' + rgba[0] + ',' + rgba[1] + ',' + rgba[2] + ',' + rgba[3] + ')';\n grd.addColorStop(1, strRgba);\n return grd;\n}", "function setGradient() {\n\tbody.style.background = \n\t\"linear-gradient(to right, \"\n\t+ color1.value \n\t+ \", \"\n\t+ color2.value\n\t+ \")\";\n\tcss.textContent = body.style.background + \";\";\n}", "function setGradient(){\n\tbody.style.background = \n\t\"linear-gradient(to right, \" \n\t+ color1.value \n\t+ \", \" \n\t+ color2.value \n\t+ \")\";\n\n\tcss.textContent = body.style.background + \";\"\n}", "function setRandomGradient(){\r\n color1.value = getRandomColor();\r\n color2.value = getRandomColor();\r\n body.style.background = \r\n \"linear-gradient(to right, \"\r\n +color1.value\r\n + \", \"\r\n +color2.value\r\n + \")\";\r\n btn.style.background = \r\n \"linear-gradient(to right, \"\r\n +color1.value\r\n + \", \"\r\n +color2.value\r\n + \")\";\r\n css.textContent = body.style.background + \";\";\r\n}", "function setGradient() {\n\tbody.style.background = \n\t\"linear-gradient(to right, \" \n\t+ color1.value \n\t+ \", \" \n\t+ color2.value \n\t+ \")\";\n\n\tcss.textContent = body.style.background + \";\";\n}", "function Gradient( options ){\n\tthis.pos = (options.pos) ? new Haze.meta.M.Vec(options.pos.x, options.pos.y) : Haze.meta.M.Vec(0, 0);\n\tthis.size = (options.size) ? new Haze.meta.M.Vec(options.size.x, options.size.y) : Haze.meta.M.Vec(1,1);\n\t\n\tif(options.r1) this.r1 = options.r1;\n\tif(options.r2) this.r2 = options.r2;\n\t\n\tthis.colorStops = [];\n\t\n\tthis.type = options.type || this.Types.radial;\n\t\n\t//TODO implement static\n\t\n\tthis.static = (options.static) ? true : false;\n}", "function setGredient(){\n\tbody.style.background = \"linear-gradient(to right, \" \n\t+ color1.value \n\t+ \", \" \n\t+ color2.value\n\t+ \")\";\n\n\t//substitute for innerHTML\n\tcss.textContent = body.style.background + \";\";\n}", "function setRandoColors(){\n\tc1 = makeHex(); // execute function twice for right and left gradients\n\tc2 = makeHex();\n\tconsole.log(c1, c2)\n\tcolor1.value = c1; // set values for backgrounds\n\tcolor2.value = c2;\n\tsetGradient() // call function to set background color\n}", "function gradient(opt, i) {\n return '#' + (155 + i*20);\n }", "function setGradient() {\n container.style.background = \"linear-gradient(to right, \" + color1.value + \", \" + color2.value + \")\";\n h4.textContent = container.style.background;\n}", "function rainbowColor() {\n updatePenMode(\"random\");\n}", "function colorGradient() {\n body.style.background = \n \"linear-gradient(to right, \" \n + color1.value \n + \", \" \n + color2.value \n + \")\";\n\n css.textContent = body.style.background + \";\";\n}", "function morning(){\n\tTweenMax.to('#clock', 1, {color:\"#000000\", ease:Power3.easeOut});\n\tTweenMax.to(\"body\", 3, {backgroundImage:\"linear-gradient(to top, #FBD63F, #FB903F)\"});\n}", "function make_temp_gradient_new(x_pos, y_pos, height, width){\nvar gradient_temp = svg_2.append(\"defs\")\n .append(\"linearGradient\")\n .attr(\"id\", \"gradient_temp\")\n .attr(\"x1\", \"0%\")\n .attr(\"y1\", \"0%\")\n .attr(\"x2\", \"0%\")\n .attr(\"y2\", \"100%\")\n .attr(\"spreadMethod\", \"pad\");\n\n gradient_temp.append(\"stop\")\n .attr(\"offset\", temp_grad_offset)\n .attr(\"stop-color\", c2_temp_background)\n .attr(\"stop-opacity\", opacity2_temp_background);\n\n gradient_temp.append(\"stop\")\n .attr(\"offset\", \"100%\")\n .attr(\"stop-color\", c1_temp_background)\n .attr(\"stop-opacity\", opacity1_temp_background);\n\n\n svg_2.append(\"rect\")\n .attr(\"width\", width)\n .attr(\"height\", height)\n .attr(\"x\", x_pos)\n .attr(\"y\",y_pos)\n .attr(\"rx\", slider_2D_rx)\n .style(\"fill\", \"url(#gradient_temp)\");\n}", "function setGrad() {\n\tbody.style.background = \"linear-gradient(to right, \" + color1.value\t+ \", \" + color2.value + \")\";\n\n\th4.textContent = body.style.background + \";\";\n\th5.textContent = \"\";\n}", "function change_color() {\n\tcol[1] = \"#8c4646 100%, #052afc 100%\"\n\tcol[2] = \"#8c4646 90%, #052afc 100%\"\n\tcol[3] = \"#8c4646 80%, #052afc 100%\"\n\tcol[4] = \"#8c4646 70%, #052afc 100%\"\n\tcol[5] = \"#8c4646 60%, #052afc 100%\"\n\tcol[6] = \"#8c4646 50%, #052afc 100%\"\n\tcol[7] = \"#8c4646 40%, #052afc 100%\"\n\tcol[8] = \"#8c4646 30%, #052afc 100%\"\n\tcol[9] = \"#8c4646 20%, #052afc 100%\"\n\tcol[10] = \"#8c4646 10%, #052afc 100%\"\n\tcol[11] = \"#8c4646 0%, #052afc 100%\"\n\tcol[12] = \"#052afc, #052afc\"\n\tcol[13] = \"#8c4646, #8c4646\"\n\n\n//pos++ is saying pos = pos + 1......so we are\n//incrementing through our array of color indicies\nindex++;\n//if the index in the array is less or greater than\n//our array parameters, we catch this and set it back\n//to 0, to prevent an error from occuring\nif (index < 0 || index 13) {\n\tindex = 0;\n}\n\n//target css style property: linear-gradient\n//syntax varies for the browsers being used\n\ndom.style.background = 'linear-gradient(' + col[index] + ')';\ndom.style.background = '-moz-linear-gradient(' + col[index] + ')';\ndom.style.background = '-o-linear-gradient(' + col[index] + ')';\ndom.style.background = 'webkit-linear-gradient(' + col[index] + ')';\n\n//setTimeout defines the delay\n\nloopID = setTimeout(\"change_color()\",200); //1000 ms = 1 second\n\n}", "function setGradient() {\n\tbody.style.background //setting the style of bacgound\n\t\t= \"linear-gradient(to right, \"\n\t\t+ color1.value \n\t\t+ \", \" \n\t\t+ color2.value\n\t\t+ \")\";\n\t\tcss.textContent=body.style.background +\";\"; //alternatywna metoda dodawania tekstu\n}", "function assignRandomColor1(){\r\n color1.value = getRandomColor();\r\n setGradient();\r\n}", "function setGradient() {\n\t// set the graident color of the body \n\tbody.style.background = \n\t\"linear-gradient(to right, \" \n\t+ color1.value \n\t+ \",\" \n\t+ color2.value \n\t+ \")\";\n\th3.textContent = body.style.background + \";\";\n}", "makeGradient(name, color1, color2, color3) {\n const gradient = this.defs.append('linearGradient')\n .attr('id', name)\n .attr('x1', '0%')\n .attr('x2', '100%')\n .attr('y1', '0%')\n .attr('y2', '100%');\n\n gradient.append('stop')\n .attr('offset', '0%')\n .attr('stop-color', color1);\n\n gradient.append('stop')\n .attr('offset', '50%')\n .attr('stop-color', color2);\n\n gradient.append('stop')\n .attr('offset', '100%')\n .attr('stop-color', color3);\n }", "_addEffect(effect, color)\n {\n // SVG can define an effect once and just keep linking to it per use\n // If for this color and effect that is already the case return its id\n // Otherwise create it, keep it in mind and return the new id\n if( this.knownEffects[effect+\"_\"+color] )\n return this.knownEffects[effect+\"_\"+color];\n\n var id = Math.random();\n\n if( effect==\"linearGradient\" ) {\n var def = this._createElementNS(\"defs\");\n var rg = this._createElementNS(\"linearGradient\");\n def.appendChild(rg);\n rg.setAttribute(\"id\",id);\n rg.setAttribute(\"r\",\"0.495\");\n rg.setAttribute(\"x1\",0);\n rg.setAttribute(\"x2\",0.75);\n rg.setAttribute(\"y1\",1);\n rg.setAttribute(\"y2\",0.75);\n var stop = this._createElementNS(\"stop\");\n stop.setAttribute(\"offset\",\"75%\");\n stop.setAttribute(this.styleAttName,\"stop-color:\"+color+\";stop-opacity:1\");\n rg.appendChild(stop);\n stop = this._createElementNS(\"stop\");\n stop.setAttribute(\"offset\",\"100%\");\n var lightNess = jQuery.Color(color).lightness();\n var lighterColor = jQuery.Color(color).lightness(lightNess*1.4).toRgbaString();\n stop.setAttribute(this.styleAttName,\"stop-color:\"+lighterColor+\";stop-opacity:1\");\n rg.appendChild(stop);\n this.rootElem.appendChild(def);\n }\n else if ( effect==\"radialPlate\" ) {\n var def = this._createElementNS(\"defs\");\n var rg = this._createElementNS(\"radialGradient\");\n def.appendChild(rg);\n rg.setAttribute(\"id\",id);\n rg.setAttribute(\"cx\",0.2);\n rg.setAttribute(\"cy\",1);\n rg.setAttribute(\"fx\",0);\n rg.setAttribute(\"fy\",1);\n rg.setAttribute(\"r\",\"1\");\n var stop = this._createElementNS(\"stop\");\n stop.setAttribute(\"offset\",\"90%\");\n var lightNess = jQuery.Color(color).lightness();\n var lighterColor = jQuery.Color(color).lightness(lightNess*1.4).toRgbaString();\n stop.setAttribute(this.styleAttName,\"stop-color:\"+lighterColor+\";stop-opacity:1\");\n rg.appendChild(stop);\n stop = this._createElementNS(\"stop\");\n stop.setAttribute(\"offset\",\"100%\");\n stop.setAttribute(this.styleAttName,\"stop-color:\"+color+\";stop-opacity:1\");\n rg.appendChild(stop);\n this.rootElem.appendChild(def);\n }\n else if ( effect==\"linearRound\" ) {\n var def = this._createElementNS(\"defs\");\n var rg = this._createElementNS(\"linearGradient\");\n def.appendChild(rg);\n rg.setAttribute(\"id\",id);\n rg.setAttribute(\"x1\",0);\n rg.setAttribute(\"x2\",1);\n rg.setAttribute(\"y1\",1);\n rg.setAttribute(\"y2\",1);\n var stop = this._createElementNS(\"stop\");\n stop.setAttribute(\"offset\",\"0%\");\n stop.setAttribute(this.styleAttName,\"stop-color:\"+color+\";stop-opacity:1\");\n rg.appendChild(stop);\n stop = this._createElementNS(\"stop\");\n stop.setAttribute(\"offset\",\"50%\");\n var lightNess = jQuery.Color(color).lightness();\n var lighterColor = jQuery.Color(color).lightness(lightNess*1.4).toRgbaString();\n stop.setAttribute(this.styleAttName,\"stop-color:\"+lighterColor+\";stop-opacity:1\");\n rg.appendChild(stop);\n stop = this._createElementNS(\"stop\");\n stop.setAttribute(\"offset\",\"100%\");\n stop.setAttribute(this.styleAttName,\"stop-color:\"+color+\";stop-opacity:1\");\n rg.appendChild(stop);\n this.rootElem.appendChild(def);\n }\n else if ( effect==\"linearPlate\" ) {\n var def = this._createElementNS(\"defs\");\n var rg = this._createElementNS(\"linearGradient\");\n def.appendChild(rg);\n rg.setAttribute(\"id\",id);\n rg.setAttribute(\"x1\",0);\n rg.setAttribute(\"x2\",0.8);\n rg.setAttribute(\"y1\",0.8);\n rg.setAttribute(\"y2\",0);\n var stop = this._createElementNS(\"stop\");\n stop.setAttribute(\"offset\",\"50%\");\n stop.setAttribute(this.styleAttName,\"stop-color:\"+color+\";stop-opacity:1\");\n rg.appendChild(stop);\n stop = this._createElementNS(\"stop\");\n stop.setAttribute(\"offset\",\"100%\");\n var lightNess = jQuery.Color(color).lightness();\n var lighterColor = jQuery.Color(color).lightness(lightNess*1.1).toRgbaString();\n stop.setAttribute(this.styleAttName,\"stop-color:\"+lighterColor+\";stop-opacity:1\");\n rg.appendChild(stop);\n this.rootElem.appendChild(def);\n }\n else {\n var def = this._createElementNS(\"defs\");\n var rg = this._createElementNS(\"linearGradient\");\n def.appendChild(rg);\n rg.setAttribute(\"id\",id);\n var stop = this._createElementNS(\"stop\");\n stop.setAttribute(\"offset\",\"100%\");\n stop.setAttribute(this.styleAttName,\"stop-color:\"+color+\";stop-opacity:1\");\n rg.appendChild(stop);\n this.rootElem.appendChild(def);\n }\n\n this.knownEffects[effect+\"_\"+color] = id;\n return id;\n }", "function gradient(colorG, gradID) {\n var grad = svg.append(\"defs\")\n .append(\"linearGradient\")\n .attr(\"id\", gradID)\n .attr(\"x1\", \"0%\")\n .attr(\"y1\", \"0%\")\n .attr(\"x2\", \"100%\")\n .attr(\"y2\", \"100%\")\n .attr(\"spreadMethod\", \"reflect\");\n\n grad.append(\"stop\")\n .attr(\"offset\", \"0%\")\n .attr(\"stop-color\", \"white\")\n .attr(\"stop-opacity\", 1);\n\n grad.append(\"stop\")\n .attr(\"offset\", \"100%\")\n .attr(\"stop-color\", colorG)\n .attr(\"stop-opacity\", 1);\n return 'url(#'+gradID+')'}", "function updateRainbow() {\n\t//Fill the legend rectangle\n\tsvg.select(\".legendRect\")\n\t\t.style(\"fill\", \"url(#gradient-rainbow-colors)\");\n\t//Transition the hexagon colors\n\tsvg.selectAll(\".hexagon\")\n\t\t.transition().duration(1000)\n\t\t.style(\"fill\", function (d,i) { return colorScaleRainbow(colorInterpolateRainbow(somData[i])); })\n}//updateRainbow", "function updatePie (time) {\n var deg;\n if (time < (totalTime / 2)) {\n deg = 90 + (360 * time / totalTime);\n $('.timer').css('background-image', 'linear-gradient('+deg+'deg, transparent 50%, #111 50%),linear-gradient(90deg, #111 50%, transparent 50%)');\n } else if (time >= (totalTime / 2)) {\n deg = -90 + (360 * time / totalTime);\n $('.timer').css('background-image', 'linear-gradient('+deg+'deg, transparent 50%, ' + color + ' 50%),linear-gradient(90deg, #111 50%, transparent 50%)');\n }\n}", "function onFrame(event) {\n\tfor(var i = 0; i < circles.length; i++){\n\tcircles[i].fillColor.hue +=3;\n\tcircles[i].scale(.93);\n\t}\n\t// animatedCircle.fillColor.hue += 1;\n\t}", "addColorToGradient(){\n this.colorCount++\n this.addColorToObject()\n this.updateGradientString()\n }", "function PdfGradientBrush(shading){var _this=_super.call(this)||this;// Fields\n/**\n * Local variable to store the background color.\n * @private\n */_this.mbackground=new PdfColor(255,255,255);/**\n * Local variable to store the stroking color.\n * @private\n */_this.mbStroking=false;/**\n * Local variable to store the function.\n * @private\n */_this.mfunction=null;/**\n * Local variable to store the DictionaryProperties.\n * @private\n */_this.dictionaryProperties=new DictionaryProperties();_this.mpatternDictionary=new PdfDictionary();_this.mpatternDictionary.items.setValue(_this.dictionaryProperties.type,new PdfName(_this.dictionaryProperties.pattern));_this.mpatternDictionary.items.setValue(_this.dictionaryProperties.patternType,new PdfNumber(2));_this.shading=shading;_this.colorSpace=exports.PdfColorSpace.Rgb;return _this;}", "function createGradient(ctx) {\n var num = threat_metadata.length - 1;\n var grd = ctx.createLinearGradient(-radius_elements_title, 0, radius_elements_title, 0);\n\n for (var i = 0; i <= num; i++) {\n grd.addColorStop(i / num, threat_metadata[i].color);\n }\n\n return grd;\n } //function createGradient", "function createGradient(ctx) {\n var num = threat_metadata.length - 1;\n var grd = ctx.createLinearGradient(-radius_elements_title, 0, radius_elements_title, 0);\n\n for (var i = 0; i <= num; i++) {\n grd.addColorStop(i / num, threat_metadata[i].color);\n }\n\n return grd;\n } //function createGradient", "function innergradient() {\n\n push();\n\n translate(0, faceHeight);\n\n fill(242, 76, 61);\n stroke(242, 76, 61, 250);\n ellipse(0, 0, 4, 4);\n strokeWeight(.1)\n noFill();\n\n // Draws circles with stroke opacity decreasing to create a gradient\n for (let i = 0; i <= 5; i++) {\n stroke(242, 76, 61, 250 - (i * 50));\n ellipse(0, 0, 4 + (i / 5), 4 + (i / 5));\n }\n pop();\n }", "function gradient() {\n /** Gradient\n * Holds the gradient css statement.\n *\n * @type {string}\n */\n var gradient = \"\";\n /* Configure Gradient to Options */\n\n switch (options) {\n case 'radial':\n gradient = \"radial-gradient(\" + value + \")\";\n break;\n\n case 'conic':\n gradient = \"conic-gradient(\" + value + \")\";\n break;\n\n case 'repeating-linear':\n gradient = \"repeating-linear-gradient(\" + value + \")\";\n break;\n\n case 'repeating-radial':\n gradient = \"repeating-radial-gradient(\" + value + \")\";\n break;\n\n case 'linear':\n default:\n gradient = \"linear-gradient(\" + value + \")\";\n }\n /* Set Gradient Dom Style */\n\n\n canvas.style.backgroundImage = gradient;\n }", "function setGradient(x, y, w, h, c1, c2) {\n noFill();\n for (let i = y; i <= y+h; i++) {\n var inter = map(i, y, y+h, 0, 1);\n var c = lerpColor(c1, c2, inter);\n stroke(c);\n line(x, i, x+w, i);\n }\n}", "function initializeGradients() {\n const svgDefs = svg.append(\"defs\");\n\n const seqGradient = svgDefs.append(\"linearGradient\")\n .attr(\"id\", \"seqScale\")\n .attr(\"x1\", \"0%\")\n .attr(\"y1\", \"0%\")\n .attr(\"x2\", \"100%\")\n .attr(\"y2\", \"0%\")\n seqGradient.append(\"stop\")\n .attr(\"offset\", \"0%\")\n .attr(\"style\", \"stop-color:\" + color(0) + \";stop-opacity:1\");\n seqGradient.append(\"stop\")\n .attr(\"offset\", \"50%\")\n .attr(\"style\", \"stop-color:\" + color(25) + \";stop-opacity:1\");\n seqGradient.append(\"stop\")\n .attr(\"offset\", \"100%\")\n .attr(\"style\", \"stop-color:\" + color(50) + \";stop-opacity:1\");\n\n const divGradient = svgDefs.append(\"linearGradient\")\n .attr(\"id\", \"divScale\")\n .attr(\"x1\", \"0%\")\n .attr(\"y1\", \"0%\")\n .attr(\"x2\", \"100%\")\n .attr(\"y2\", \"0%\")\n divGradient.append(\"stop\")\n .attr(\"offset\", \"0%\")\n .attr(\"style\", \"stop-color:\" + hiLoColor(0) + \";stop-opacity:1\");\n divGradient.append(\"stop\")\n .attr(\"offset\", \"28%\")\n .attr(\"style\", \"stop-color:\" + hiLoColor(14) + \";stop-opacity:1\");\n divGradient.append(\"stop\")\n .attr(\"offset\", \"100%\")\n .attr(\"style\", \"stop-color:\" + hiLoColor(50) + \";stop-opacity:1\");\n}", "function set_gradient(json_gradient) {\r\n var obj = canvas.getActiveObject();\r\n if (obj) {\r\n if (obj.type == 'i-text') {\r\n obj.set('fill', new fabric.Gradient({\r\n type: 'linear',\r\n coords: {\r\n x1: 0,\r\n y1: 0,\r\n x2: obj.width,\r\n y2: obj.height,\r\n },\r\n colorStops: json_gradient\r\n }));\r\n canvas.renderAll();\r\n }\r\n }\r\n}", "function set_gradient(json_gradient) {\r\n var obj = canvas.getActiveObject();\r\n if (obj) {\r\n if (obj.type == 'i-text') {\r\n obj.set('fill', new fabric.Gradient({\r\n type: 'linear',\r\n coords: {\r\n x1: 0,\r\n y1: 0,\r\n x2: obj.width,\r\n y2: obj.height,\r\n },\r\n colorStops: json_gradient\r\n }));\r\n canvas.renderAll();\r\n }\r\n }\r\n}", "function set_gradient(json_gradient) {\r\n var obj = canvas.getActiveObject();\r\n if (obj) {\r\n if (obj.type == 'i-text') {\r\n obj.set('fill', new fabric.Gradient({\r\n type: 'linear',\r\n coords: {\r\n x1: 0,\r\n y1: 0,\r\n x2: obj.width,\r\n y2: obj.height,\r\n },\r\n colorStops: json_gradient\r\n }));\r\n canvas.renderAll();\r\n }\r\n }\r\n}", "function setGradientColor(){\n//String should be written in \"\" while variable like color.value should not \n\tbody.style.background=\"linear-gradient(to right, \"\n\t\t\t\t\t\t\t+ color1.value\n\t\t\t\t\t\t\t+ \",\"\n\t\t\t\t\t\t\t+ color2.value\n\t\t\t\t\t\t\t+ \")\"; \t\n\t// assiging linear-gradient to the css class to automatically read the (R,G,B) color picked by the user \n\tcss.textContent=body.style.background;\t\t\t\t\t\t\n}", "function setGradient(c1, c2) {\n\tfor (var i = 0; i <= height; i++) {\n\t\tvar inter = map(i, 0, height, 0, 1);\n\t\tvar c = lerpColor(c1, c2, inter);\n\t\tstroke(c);\n\t\tline(0, i, width, i);\n\t}\n}", "function anm_color (el, attrib, start, end, begin, dur, freeze) {\r\n\tvar a;\r\n\ta = doc.createElement(\"animateColor\");\r\n\ta.setAttribute(\"attributeType\",\"CSS\");\r\n\ta.setAttribute(\"attributeName\",attrib);\r\n\tif (start != \"UNKNOWN\") a.setAttribute(\"from\",start);\r\n\ta.setAttribute(\"to\",end);\r\n\ta.setAttribute(\"begin\",begin.toString(10));\r\n\ta.setAttribute(\"dur\",dur.toString(10));\r\n\tif (freeze) a.setAttribute(\"fill\",\"freeze\");\r\n\tel.appendChild(a);\r\n\tanim.push(a);\t\r\n}", "sceneFunc (context, shape) {\n if(self.attr.typeid==0){\n context.fillStyle=self.attr.data.sc;\n }else if(self.attr.typeid==1){\n var gradientBar = context.createLinearGradient(\n 25*self.attr.data.sw,\n 25*self.attr.data.sh,\n 25*self.attr.data.ew,\n 25*self.attr.data.eh\n );\n gradientBar.addColorStop(0, self.attr.data.sc);\n gradientBar.addColorStop(1, self.attr.data.ec);\n context.fillStyle = gradientBar;\n }else if(self.attr.typeid==2){\n var gradientBar = context.createRadialGradient(\n 25*self.attr.data.sw,\n 25*self.attr.data.sh,\n 25*self.attr.data.sr,\n 25*self.attr.data.ew,\n 25*self.attr.data.eh,\n 25*self.attr.data.er,\n );\n gradientBar.addColorStop(0, self.attr.data.sc);\n gradientBar.addColorStop(1, self.attr.data.ec);\n context.fillStyle = gradientBar;\n }\n\n context.fillRect(0, 0, 25, 25);\n context.strokeStyle=\"#808080\";\n context.lineWidth=1;\n context.strokeRect(0, 0, 25, 25);\n context.fillStrokeShape(shape);\n }", "function createGradient(ctx) {\n let num = threat_metadata.length - 1;\n let grd = ctx.createLinearGradient(\n -radius_elements_title,\n 0,\n radius_elements_title,\n 0\n );\n for (let i = 0; i <= num; i++)\n grd.addColorStop(i / num, threat_metadata[i].color);\n return grd;\n } //function createGradient", "function repeat(){\n blinkingPartners\n .attr('r',\".1vh\")\n .style('opacity',1)\n .transition()\n .duration(2000)\n .ease(d3.easeLinear)\n .attr('r',\"2.5vh\")\n .style('opacity',0)\n .on(\"end\", repeat)\n \n }", "function setBackground()\n{\n var gradient = GameEngine.context.createLinearGradient(150.000, 0.000, 150.000, 500.000);\n var stops = [0.000, 0.720, 0.796, 1.000];\n var colors = [\"#AAAAFF\", \"#AAAAFF\", \"#7F7F00\", \"#7F7F00\"];\n for (var i = 0; i < stops.length; i++)\n {\n gradient.addColorStop(stops[i], colors[i]);\n }\n GameEngine.context.fillStyle = gradient;\n}", "function setGradient() {\n body.style.background =\n \"linear-gradient(to right, \" + color1.value + \", \" + color2.value + \")\";\n h2tag.innerHTML =\n \" Current CSS background is \" + color1.value + \" \" + color2.value;\n css.textContent = body.style.background + \";\";\n}", "function gradient(){\n var element = document.getElementById(\"gradient_element\");\n var x = element.getContext(\"2d\");\n var gradient = x.createLinearGradient(0, 0, 0, 170);\n gradient.addColorStop(0, \"black\");\n gradient.addColorStop(1, \"white\");\n x.fillStyle = gradient;\n x.fillRect(20, 20, 150, 150);\n}", "function updateGradient() {\n\t\trainbow.setNumberRange(0, rectNum); \n\t\tvar res = [];\n\t\tfor(var i = 0; i < rectNum; ++i) {\n\t\t\tres.push(\"#\" + rainbow.colourAt(i));\n\t\t}\n\t\treturn res;\n\t}", "animateFill () {\n TweenMax.to(this, 1, {\n fillingProgress: 1,\n onComplete: event => {\n const tl = new TimelineMax({ delay: 2 })\n tl.to(this.fillingDotToLine, 1, { strokeWidth: 0 })\n tl.set(this, { fillingProgress: 0 })\n tl.set(this.fillingDotToLine, { strokeWidth: this.thickness })\n }\n })\n }", "function PdfRadialGradientBrush(centerStart,radiusStart,centerEnd,radiusEnd,colorStart,colorEnd){var _this=_super.call(this,new PdfDictionary())||this;/**\n * Local varaible to store the dictionary properties.\n */_this.mDictionaryProperties=new DictionaryProperties();_this.initialize(colorStart,colorEnd);if(radiusStart<0){throw new Error('ArgumentOutOfRangeException : radiusStart - The radius cannot be less then zero.');}if(radiusEnd<0){throw new Error('ArgumentOutOfRangeException : radiusEnd - The radius cannpt be less then zero.');}_this.mPointEnd=centerEnd;_this.mPointStart=centerStart;_this.mRadiusStart=radiusStart;_this.mRadiusEnd=radiusEnd;_this.setPoints(_this.mPointStart,_this.mPointEnd,_this.mRadiusStart,_this.mRadiusEnd);return _this;}", "function _radialColor(obj) { // @param CanvasGradient:\r\n // @return String:\r\n var rv = [], ary = obj.color, v, i = 0, iz = ary.length,\r\n fp = obj.param,\r\n r0 = fp.r0 / fp.r1,\r\n remain = 1 - r0;\r\n\r\n if (!iz) {\r\n return obj.colors = \" \";\r\n }\r\n rv.push('<GradientStop Color=\"', ary[0].color.argb(), '\" Offset=\"0\" />');\r\n for (i = 0; i < iz; ++i) {\r\n v = ary[i];\r\n rv.push('<GradientStop Color=\"' + v.color.argb() +\r\n '\" Offset=\"' + (v.offset * remain + r0) + '\" />');\r\n }\r\n return obj.colors = rv.join(\"\"); // bond\r\n}", "background(lib){\n lib.moveTo(lib.width/2,lib.height/2);\n lib.penColor(\"black\");\n lib.dot(500);\n }", "animateDrum() {\n if (this._tweenTargets.drum.animating) {\n this.drum.position.z = this._tweenTargets.drum.props.zPosition;\n this.drum.material.bumpScale = this._tweenTargets.drum.props.bumpscale;\n this.drum.material.color.setRGB(\n this._tweenTargets.drum.props.r/100,\n this._tweenTargets.drum.props.g/100,\n this._tweenTargets.drum.props.b/100 );\n }\n }", "updateGradientString(){\n let gradient = \"linear-gradient(\"\n let nrItems = 1\n for (const [key, color] of Object.entries(this.colors)) {\n gradient += color.rgb\n\n if(nrItems == Object.keys(this.colors).length){\n gradient += \")\"\n } else {\n gradient += \", \"\n nrItems++\n }\n }\n this.gradient = gradient\n }", "function changeBgColor() {\n // *setting first gradient color\n let randHexR = Math.floor(Math.random()*255);\n let randHexG = Math.floor(Math.random()*255);\n let randHexB = Math.floor(Math.random()*255);\n let randColor = \"linear-gradient(to right, rgb(\";\n randColor+=randHexR+\",\"+randHexG+\",\"+randHexB+\"), rgb(\";\n // *setting second gradient color\n randHexR = Math.floor(Math.random()*255);\n randHexG = Math.floor(Math.random()*255);\n randHexB = Math.floor(Math.random()*255);\n randColor+=randHexR+\",\"+randHexG+\",\"+randHexB+\") )\";\n console.log(randColor);\n let body = document.getElementById(\"body\");\n return body.style.background = randColor;\n}", "function backgroundGradient() {\n if (ball.x < width) {\n push();\n colorMode(HSB,255);\n background(map(ball.x,0,width,0,255),180,200);\n pop();\n }\n}", "function onBeat() {\n\t\n\tvar colourArray = [color(84,172,71), \n\t\t\t\t\t\t color(19,48,40,110),\n\t\t\t\t\t\t color(113,94,133,150),\n\t\t\t\t\t\t color(214,31,52,150),\n\t\t\t\t\t\t color(233,93,37,110),\n\t\t\t\t\t\t color(149,86,54,150),\n\t\t\t\t\t\t color(68,72,158,110),\n\t\t\t\t\t\t color(107,38,111,150),\n\t\t\t\t\t\t color(157,71,70,150),\n\t\t\t\t\t \t\tcolor(237, 230,229,200),\n\t\t\t\t\t \t\tcolor(254,251,250, 200)\n\t\t\t\t\t\t ]\n\tvar randomizer = int(random(1,11));\n\tvar randomizer2 = int(random(1,11));\n\t\n\tgradientcolour1 = colourArray[randomizer];\n\tgradientcolour2 = colourArray[randomizer2];\n\n\t\n //backgroundColor = colourArray[randomizer];\n rectRotate = !rectRotate;\n}", "gradient() {\n return {\n WebkitAppearance: 'none',\n backgroundImage: `linear-gradient(to right, ${this.props.stops[0].stopcolor}, ${this.props.stops[1].stopcolor})`,\n width: '300px',\n height: '15px',\n borderRadius: '30px',\n }\n }", "function _linearGradientFill(ctx, obj, path, fill, zindex) {\r\n var rv = [],\r\n fp = obj.param,\r\n m = ctx._matrix,\r\n x0 = fp.x0,\r\n y0 = fp.y0,\r\n x1 = fp.x1,\r\n y1 = fp.y1,\r\n prop = fill ? \"Fill\" : \"Stroke\";\r\n\r\n if (ctx._matrixEffected) {\r\n x0 = fp.x0 * m[0] + fp.y0 * m[3] + m[6], // x * m11 + y * m21 + dx\r\n y0 = fp.x0 * m[1] + fp.y0 * m[4] + m[7] // x * m12 + y * m22 + dy\r\n x1 = fp.x1 * m[0] + fp.y1 * m[3] + m[6], // x * m11 + y * m21 + dx\r\n y1 = fp.x1 * m[1] + fp.y1 * m[4] + m[7] // x * m12 + y * m22 + dy\r\n }\r\n\r\n rv.push('<Canvas Canvas.ZIndex=\"', zindex,\r\n '\"><Path Opacity=\"', ctx.globalAlpha,\r\n '\" Data=\"', path,\r\n fill ? \"\" : _stroke(ctx), '\"><Path.', prop,\r\n '><LinearGradientBrush MappingMode=\"Absolute\" StartPoint=\"',\r\n x0, \",\", y0, '\" EndPoint=\"', x1, \",\", y1, '\">',\r\n obj.colors || _linearColor(obj),\r\n '</LinearGradientBrush></Path.', prop, '>',\r\n (ctx.__shadowColor.a && ctx.shadowBlur) ? _dropShadow(ctx, \"Path\", ctx.__shadowColor) : \"\",\r\n '</Path></Canvas>');\r\n return rv.join(\"\");\r\n}", "function changeColor(color){\n color = color;\n d3.selectAll(\"circle\")\n .transition()\n .duration(2000)\n .style(\"fill\", color)\n}", "function intercalit(){\n var timer = setInterval(function(){\n var sec = angleCalculation();\n //console.log('seconds problem',masterClock[0].seconds, masterClock[0].seconds * (Math.PI/180), 180 * (Math.PI/180) );\n\n theSecond.transition().duration(400).style('fill','hsl('+random+','+colorSec(sec)+'%,'+colorSec(sec)+'%)').transition().ease('elastic').duration(500).attr('d',arcS);\n theMin.transition().ease('elastic').duration(500).attr('d',arcM);\n theHour.transition().ease('elastic').duration(500).attr('d',arcH);\n theDay.transition().ease('elastic').duration(500).attr('d',arcD);\n theMon.transition().ease('elastic').duration(500).attr('d',arcMt);\n },1000);\n }", "function setGradient(canvas, canvasOuter, circle, color1, color2) {\r\n if (circle == \"inner\") {\r\n var circleInner = canvas.getContext('2d');\r\n } else {\r\n var circleOuter = canvasOuter.getContext('2d');\r\n }\r\n\r\n var x = 150,\r\n y = 75,\r\n // Radii of the black glow.\r\n innerRadius = 0,\r\n outerRadius = 200,\r\n // Radius of the entire circle.\r\n radius = 200;\r\n\r\n if (circle == \"inner\") {\r\n var gradient = circleInner.createRadialGradient(x, y, innerRadius, x, y, outerRadius);\r\n } else {\r\n var gradient = circleOuter.createRadialGradient(x, y, innerRadius, x, y, outerRadius);\r\n }\r\n\r\n gradient.addColorStop(0, color1);\r\n gradient.addColorStop(1, color2);\r\n\r\n if (circle == \"inner\") {\r\n circleInner.arc(x, y, radius, 0, 2 * Math.PI);\r\n\r\n circleInner.fillStyle = gradient;\r\n circleInner.fill();\r\n\r\n return circleInner;\r\n } else {\r\n circleOuter.arc(x, y, radius, 0, 2 * Math.PI);\r\n\r\n circleOuter.fillStyle = gradient;\r\n circleOuter.fill();\r\n\r\n return circleOuter;\r\n }\r\n\r\n}", "function limpiarGrilla(){\n $(document).ready(function(){\n $(\"#grilla-pixeles\").children().animate({\"backgroundColor\":\"white\"}, 1500);\n });\n}", "function changeColor (){\t\t\t\n\t\t\t$pageColor = pagecolors[$index];\n\t\t\t// Darken a color\n\t\t\t$gradiantcolor = alterColorIntensity($pageColor,$colorChangePercantage);\n\n\t\t\t//Resetting the index if it hits the end\n\t\t\tif ($index < pagecolors.length -1 ) {\n\t\t\t\t$index += 1;\n\t\t\t}\n\t\t\telse{\n\t\t\t\t$index = 0;\n\t\t\t}\t\t\t\n\t\t\tif ($('#Laag_1').length) {\n\t\t\t\t//background color of svg\n \t\t\t\t$('#background').fadeTo('slow', 0, function()\n\t\t\t\t\t{\n\t\t\t\t\t $(this).css('fill', $pageColor);\n\t\t\t\t\t}).fadeTo(fadeTimeItems, 1 , 'linear');\t \t\t\t\n\t \t\t\t//Color for gradient, adding the html code for the gradient inside the svg html code\n \t\t\t\t$('.st0').fadeTo('slow', 0, function()\n\t\t\t\t\t{\n\t\t\t\t\t\t$( \"#svgGradient\" ).html( '<stop offset=\"0\" style=\"stop-color:#FFFFFF;stop-opacity:0\"/> <stop offset=\"'+$index+'\" style=\"stop-color:'+$gradiantcolor+'\"/>' );\n\n\t\t\t\t\t}).fadeTo(fadeTimeItems, 1 , 'linear');\t \t\t\t\n\t \t\t}\n\t\t}", "function circleMoreRed(){\n r = r + 40;\n}", "function recolorfg(delay){\n dur = (delay) ? 750 : 0;\n \n svg3.selectAll(\"circle\")\n .transition()\n .duration(dur)\n .attr(\"fill\", function(d) { return (coloring.value == \"group\") ? c(d.group) : c(d.count); })\n }", "function initialize() {\n\tvar canvas = document.getElementById(\"gradientShapeCanvas\"); //get a reference to the canvas\n\tvar context = canvas.getContext(\"2d\"); //get the context of the canvas\n\tvar gradient = context.createLinearGradient(0, 50, 0, 250); //create a linear gradient\n\tcontext.beginPath(); //begin drawing the shape/path\n\tcontext.moveTo(50, 50); //move the origin to 50, 50\n\tcontext.lineTo(400, 200); //move the line\n\tcontext.lineTo(200, 250); //move the line\n\tcontext.lineTo(50, 250); //move the line\n\tcontext.closePath(); //close the path/shape\n\tcontext.lineWidth = 8; //set the line width to 8px\n\tcontext.lineJoin = \"round\"; //make the joins round\n\tcontext.stroke(); //actually draw the shape/path\n\tgradient.addColorStop(\"0\", \"green\"); //set the starting gradient color to green\n\tgradient.addColorStop(\"0.75\", \"blue\"); //set the middle gradient color to blue\n\tgradient.addColorStop(\"0.85\", \"violet\"); //set the end gradient color to violet\n\tcontext.fillStyle = gradient; //set the fill style to the gradient\n\tcontext.fill(); //actually add the fill style\n}", "function Gradient(grad_color_at)\n{\n if (\n !(this instanceof Gradient) ||\n ('function' !== typeof grad_color_at) ||\n (5 > grad_color_at.length)\n )\n {\n throw new Error('Gradient: invalid gradient');\n }\n\n var self = this, transform = new Transform(),\n stops = {'0': [0, [0,0,0,0]], '1': [1, [0,0,0,0]]},\n _stops = null, colorStops\n ;\n colorStops = function() {\n if (null == _stops)\n {\n var o = Object.keys(stops);\n o.sort(function(a, b) {return parseFloat(a) - parseFloat(b);});\n _stops = o.map(function(o) {return stops[o];}).filter(function(s) {return 0 <= s[0] && s[0] <= 1;});\n }\n return _stops;\n };\n\n def(self, 'transform', {\n get: function() {\n return transform;\n },\n set: function(transform) {\n },\n enumerable: true,\n configurable: false\n });\n self.addColorStop = function(offset, color) {\n _stops = null;\n stops[String(offset)] = [+offset, parseColor(color) || BLANK];\n };\n self.getColorAt = function(x, y) {\n var im = transform.imatrix(true),\n p = im ? im.transform(x, y) : null,\n rgba = [0, 0, 0, 0];\n return p ? grad_color_at(p[0], p[1], colorStops(), rgba, 0) : rgba;\n };\n}", "function setRandomColor() {\n $(\"#circle2\").css(\"background-color\", getRandomColor());\n}", "function set_gradient_slider(json_gradient) {\r\n const gp = new Grapick({\r\n el: '#gp',\r\n min: 1,\r\n max: 99,\r\n colorEl: '<div class=\"colorpicker grp-handler-cp-wrap cp\"></div>', // Custom color picker from colorpicker.min.js -- class is from original grapick.min.css\r\n width: 25\r\n });\r\n gp.setColorPicker(handler => {\r\n const el = handler.getEl().querySelector('.colorpicker.grp-handler-cp-wrap.cp');\r\n var picker = CP(el);\r\n // Add colorpicker change event to dynamically add color to the gradient\r\n picker.on('change', function (r, g, b, a) {\r\n if (1 === a) {\r\n var color = 'rgb(' + r + ', ' + g + ', ' + b + ')';\r\n /* Checks if given handler is selected or not\r\n If this if-statement is not written, When a new handler is added via programatically (using gp.addHandler()) colorpicker.js overwrites that color to black\r\n Or to the the color defined as data-color attribute on gp.colorEl */\r\n if (handler.isSelected()) {\r\n var handlerColor = handler.getColor().substring(5, handler.getColor().length - 1).replace(/\\s/g, '').split(\",\");\r\n handlerColor = CP.HEX([Number(handlerColor[0]), Number(handlerColor[1]), Number(handlerColor[2]), Number(handlerColor[3])]);\r\n this.source.style.backgroundColor = handler.getColor();\r\n this.source.setAttribute(\"data-color\", handlerColor);\r\n handler.setColor(color);\r\n }\r\n }\r\n else {\r\n var color = 'rgba(' + r + ', ' + g + ', ' + b + ',' + a + ')';\r\n if (handler.isSelected()) {\r\n var handlerColor = handler.getColor().substring(4, handler.getColor().length - 1).replace(/\\s/g, '').split(\",\");\r\n handlerColor = CP.HEX([Number(handlerColor[0]), Number(handlerColor[1]), Number(handlerColor[2])]);\r\n this.source.style.backgroundColor = handler.getColor();\r\n this.source.setAttribute(\"data-color\", handlerColor);\r\n handler.setColor(color);\r\n }\r\n }\r\n /* Select the handler anyway after the color is added otherwise when handler is added via click the right color will not render to the \r\n gradient slider.. To prevent that click event is added to the gradient slider... when a click is occured a new handler will be added and it will be \r\n deselected automatically (preventing [black color/or data-color value] from overwriting the neccessary color)... \r\n Since it is not possible to prevent that event from firing this(colorpicker change event) event... that handler (the one that a change has occured) will be automatically selected\r\n */\r\n handler.select();\r\n // handler.deselect();\r\n });\r\n });\r\n gp.on('handler:select', function () {\r\n var handler = gp.getSelected();\r\n\r\n var selectedPicker = document.getElementsByClassName('grp-handler grp-handler-selected')[0].getElementsByClassName('colorpicker grp-handler-cp-wrap cp')[0];\r\n if (handler.getColor()[3] == '(') {\r\n var selectedColorHEX = handler.getColor().substring(4, handler.getColor().length - 1).replace(/\\s/g, '').split(\",\");\r\n selectedColorHEX = CP.HEX([Number(selectedColorHEX[0]), Number(selectedColorHEX[1]), Number(selectedColorHEX[2])]);\r\n }\r\n else if (handler.getColor()[3] == 'a') {\r\n var selectedColorHEX = handler.getColor().substring(5, handler.getColor().length - 1).replace(/\\s/g, '').split(\",\");\r\n selectedColorHEX = CP.HEX([Number(selectedColorHEX[0]), Number(selectedColorHEX[1]), Number(selectedColorHEX[2]), Number(selectedColorHEX[3])]);\r\n }\r\n // Set selected handler's value to the handler selection circle (div tag) and to the colocpicker's value (data-color)\r\n selectedPicker.style.backgroundColor = handler.color;\r\n selectedPicker.setAttribute(\"data-color\", selectedColorHEX);\r\n })\r\n document.getElementsByClassName('grp-preview')[0].onclick = function () {\r\n // This event is to fire whenever a new handler is added to the slider via click event.. handler:add will not work because it'll fire when a new handler is added via programatically. \r\n // Get the index of the newly added handler\r\n var handler_index = gp.getHandlers().indexOf(gp.getSelected())\r\n // Deselect that handler\r\n gp.getHandler(handler_index).deselect();\r\n // Then this event will fire picker.on('change') event above.\r\n }\r\n // Handlers are color stops\r\n // in format : gp.addHandler(25, 'rgb(255, 0, 0)'); If the given offset is 0.25 then the handler format offset will be 25 (0.25*100)\r\n for (var i = 0; i < json_gradient.length; i++) {\r\n if (json_gradient[i].color[0] == \"#\") {\r\n json_gradient[i].color = hexToRgb(json_gradient[i].color);\r\n }\r\n gp.addHandler(json_gradient[i].offset * 100, json_gradient[i].color, 0);\r\n }\r\n\r\n // Updates the corresponding object according to the changes made to the slider... An event on the slider\r\n gp.on('change', complete => {\r\n var gradient = gp.getSafeValue();\r\n var json_gradient = parse_gradient(gradient);\r\n set_gradient(json_gradient);\r\n });\r\n}", "function animation_flag_with_saturation (direction){\n var index = '#filaIndice'+direction;\n $(index).html(\"<img src='js/css/cross.png' border='0' />\");\n $(index).effect(\"pulsate\",{times:3},500);\t\n}", "function homeAnim() { //homepage animation on load \n qsCl(\"home__logo-fill\").left = '-177px';\n qsCl(\"home__logo-dolya\").color = 'black';\n qsCl(\"home__logo-consulting\").color = 'black';\n qsCl(\"home__logo-frame\").opacity = '1';\n qsCl(\"home__tagline-line\").width = '60px';\n qsCl(\"home__mission-statement\").color = '#303030';\n qsCl(\"home__tagline\").color = '#303030';\n qsCl(\"home__golden-thread\").color = 'var(--gold)';\n qsCl(\"path-logo\").animation = 'dash 3s ease-in forwards 1s'\n qsCl(\"path-home\").animation = 'dash 5s ease-in-out forwards 4s';\n drawn.home = true;\n}", "function tweenPie(finish) {\n var start = {\n startAngle: 0,\n endAngle: 0\n };\n var i = d3.interpolate(start, finish);\n return function(d) { return arc(i(d)); };\n }", "sceneFunc (context, shape) {\n var gradientBar = context.createLinearGradient(\n 25*that.fthat.parent.head_canvas.attr.project.backgroundType.data.sw,\n 25*that.fthat.parent.head_canvas.attr.project.backgroundType.data.sh,\n 25*that.fthat.parent.head_canvas.attr.project.backgroundType.data.ew,\n 25*that.fthat.parent.head_canvas.attr.project.backgroundType.data.eh\n );\n gradientBar.addColorStop(0, that.fthat.parent.head_canvas.attr.project.backgroundType.data.sc);\n gradientBar.addColorStop(1, that.fthat.parent.head_canvas.attr.project.backgroundType.data.ec);\n context.fillStyle = gradientBar;\n context.fillRect(0, 0, 25, 25);\n context.fillStrokeShape(shape);\n }", "function changeColors() {\r\n setTimeout(() => {\r\n if (cancel_changing_colors) requestAnimationFrame(() => changeColors());\r\n }, 100); \r\n\r\n logo.forEach(element => {\r\n let index = Math.floor(Math.random() * (arrayColors.length));\r\n element.style.fill = \"#\" + arrayColors[index - 1];\r\n }); \r\n}", "fill(color) {\n this.addEffect(new Effects.Fill(color));\n }", "function Gradient() {\n this.defaultColor = null;\n this.points = [];\n}", "function fillNET(color){\n // console.log($('._NET_').length);\n $('._NET_').css('fill',color);\n}", "function randomColor(){\r\n r = Math.floor(Math.random() * (230));\r\n g = Math.floor(Math.random() * (230));\r\n b = Math.floor(Math.random() * (230));\r\n jQuery(\".cls-2,.cls-4\").css('fill','rgb('+r+','+g+','+b+')');\r\n\r\n}", "sceneFunc (context, shape) {\n //context.beginPath();\n // 底色填充,也就是(举例红色)到白色\n //var gradientBase = context.createLinearGradient(30, that.topheight, that.width + 30, that.topheight);\n var gradientBase = context.createLinearGradient(0, 0,self.width,0);\n gradientBase.addColorStop(1, color);\n gradientBase.addColorStop(0, 'rgba(255,255,255,1)');\n //gradientBase.addColorStop(0, 'rgba(0,0,0,0)');\n context.fillStyle = gradientBase;\n //context.fillRect(30, that.topheight, that.width, that.width);\n context.fillRect(0, 0, self.width, self.height);\n // 第二次填充,黑色到透明\n //var my_gradient1 = context.createLinearGradient(30, that.topheight, 0, that.width);\n var my_gradient1 = context.createLinearGradient(0, 0, 0, self.height);\n my_gradient1.addColorStop(0, 'rgba(0,0,0,0)');\n my_gradient1.addColorStop(1, 'rgba(0,0,0,1)');\n context.fillStyle = my_gradient1;\n //context.fillStyle = gradientBase;\n //context.fillRect(30, that.topheight, that.width, that.width);\n context.fillRect(0, 0, self.width, self.height);\n context.fillStrokeShape(shape);\n }", "function Gradient(){\n this.name = \"Gradient\"\n\n this.config = {\n color1: {\n type: 'color',\n value: {\n r: 255,\n g: 233,\n b: 61\n }\n },\n color2: {\n type: 'color',\n value: {\n r: 0,\n g: 16,\n b: 94\n }\n },\n speed: {\n name: 'Speed',\n type: 'range',\n value: 300,\n min: 100,\n max: 50000\n }\n }\n\n this.frame = 0;\n this.duration = -1;\n this.complete = false;\n this.rgb = false;\n this.color3 = null;\n}", "function radialGradient(width, height) {\n\n var texture = document.querySelector('#canvas');\n\n if ( texture && texture.getContext ) {\n\n texture.width = width;\n texture.height = height;\n\n var textureCtx = texture.getContext('2d');\n\n if ( textureCtx ) {\n var gradient = textureCtx.createRadialGradient(width/2, height/2, 0, width/2, height/2, width * .6);\n\n gradient.addColorStop(0, sColor);\n gradient.addColorStop(1, eColor);\n\n textureCtx.fillStyle = gradient;\n textureCtx.fillRect(0, 0, textureCtx.canvas.width, textureCtx.canvas.height);\n\n return textureCtx;\n }\n\n }\n\n }", "function update_background() {\r\n if (angle > 360) angle = 0;\r\n background.css(\"background\", \"linear-gradient(\" + angle + \"deg,\" +\r\n \"rgba(\" + local_track.palette[0][0] + \",\" + local_track.palette[0][1] + \",\" + local_track.palette[0][2] + \",\" + background_opacity + \"),\" +\r\n \"rgba(\" + local_track.palette[1][0] + \",\" + local_track.palette[1][1] + \",\" + local_track.palette[1][2] + \",\" + background_opacity + \"),\" +\r\n \"rgba(\" + local_track.palette[2][0] + \",\" + local_track.palette[2][1] + \",\" + local_track.palette[2][2] + \",\" + background_opacity + \"),\" +\r\n \"rgba(\" + local_track.palette[3][0] + \",\" + local_track.palette[3][1] + \",\" + local_track.palette[3][2] + \",\" + background_opacity + \"),\" +\r\n \"rgba(\" + local_track.palette[4][0] + \",\" + local_track.palette[4][1] + \",\" + local_track.palette[4][2] + \",\" + background_opacity + \"),\" +\r\n \"rgba(\" + local_track.palette[5][0] + \",\" + local_track.palette[5][1] + \",\" + local_track.palette[5][2] + \",\" + background_opacity + \")\");\r\n angle += (rotation_velocity);\r\n }", "function flowerGradClr(flowerShape, color, shp, mo) {\n \n if(!svgPlace.querySelector(\"defs\").querySelector(\"#\"+camelCase(color))) {\n addGradient({\n tp:'radial', \n id:color\n });\n }\n flowerShape.setAttribute(\"fill\",` url(#${camelCase(color)})`);\n}" ]
[ "0.6523955", "0.6468817", "0.64328617", "0.6427624", "0.64102894", "0.6392225", "0.6378216", "0.637718", "0.6370009", "0.63696384", "0.6362088", "0.6357611", "0.63340294", "0.6316237", "0.63106066", "0.6290579", "0.62883735", "0.6264697", "0.6219667", "0.62095654", "0.6202643", "0.61900496", "0.617269", "0.61415327", "0.6133385", "0.6130479", "0.6089664", "0.60860145", "0.608227", "0.607454", "0.60485303", "0.6025095", "0.60244024", "0.60224307", "0.6018189", "0.5995608", "0.5989195", "0.59822655", "0.5948567", "0.59437084", "0.59427685", "0.593526", "0.5926623", "0.59168303", "0.5916568", "0.5899824", "0.58956504", "0.58956504", "0.58944774", "0.58890307", "0.58753586", "0.5863576", "0.5855365", "0.5855365", "0.5855365", "0.5851917", "0.5846897", "0.5844933", "0.5839708", "0.57944274", "0.579318", "0.57858485", "0.57701826", "0.57658404", "0.5758815", "0.57470053", "0.5724955", "0.572236", "0.57158816", "0.5714221", "0.57044923", "0.5701893", "0.56968546", "0.5694138", "0.5692474", "0.5692304", "0.56916267", "0.5686858", "0.56685466", "0.56666124", "0.56646866", "0.56626", "0.5655307", "0.56537235", "0.5640724", "0.5625612", "0.56223065", "0.56205547", "0.5610477", "0.5608817", "0.5602223", "0.56005245", "0.55778134", "0.55646145", "0.5564153", "0.55629545", "0.5557745", "0.5552564", "0.55504376", "0.55487996", "0.55487835" ]
0.0
-1
The model is ready
function modelReady() { canvas.show(); // sketchRNN will begin when the mouse is released canvas.mouseReleased(startSketchRNN); select('#status').html('model ready - sketchRNN will begin after you draw with the mouse'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function modelReady() {\n console.log(\"model ready\");\n}", "function modelReady() {\n // model is ready\n console.log('Model Loaded!');\n modelIsReady = true;\n}", "function modelReady() {\n console.log(\"model Ready!\")\n}", "function modelReady() \n{\n print(\"Model REady\");\n loadData(); \n}", "function modelReady() {\n console.log(\"Model Loaded!\");\n}", "function modelLoaded() {\n console.log('Model Loaded!');\n }", "function modelReady() {\n\tconsole.log('Model is ready to go.');\n\tclassifier.classify(gotResult);\n}", "function modelLoaded() {\n console.log('Model Loaded!');\n }", "function modelLoaded() {\n console.log(\"Model Loaded!\");\n }", "function modelLoaded() {\r\n console.log(\"Model loaded\");\r\n}", "ready() {\r\n\t\tsuper.ready();\r\n\t}", "function modelLoaded() {\n\tconsole.log('Model Loaded!');\n}", "function modelIsReady() {\n modelStatus = \"ready\"\n console.log('Classificação de libras carregada!');\n console.log(\"Modelo pronto!\") \n}", "function modelReady() {\n select('#modelStatus').html('Model loaded!');\n}", "function modelLoaded() {\n\tconsole.log(\"Model Loaded!\");\n}", "function modelLoaded() {\n\tconsole.log(\"Model Loaded!\");\n}", "function modelLoaded() {\n\tconsole.log(\"Model Loaded!\");\n}", "function modelReady() {\n createDiv(\"Model ist geladen\")\n console.log(\"Model Geladen\");\n}", "function modelLoaded() {\r\n console.log(\"Model loaded successfully!\")\r\n}", "function modelReady() {\n console.log('Model is ready!!!');\n classifier.load('model.json', customModelReady);\n}", "setAsReady() {\n this.logger.debug('Page is ready to use');\n this.controller.store();\n }", "function modelReady(){\n\tconsole.log('Model is ready');\n\t// predict the image, takes time, select callback\n\tmobileNet.predict(image, gotResults);\n}", "ready() {\n super.ready();\n }", "ready() {\n super.ready();\n }", "ready() {\n super.ready();\n }", "ready() {\n super.ready();\n }", "ready() {\n super.ready();\n }", "ready() {\n super.ready();\n }", "ready() {\n super.ready();\n }", "ready() {\n super.ready();\n }", "ready() {\n super.ready();\n }", "ready() {\n super.ready();\n }", "ready() {\n super.ready();\n }", "ready() {\n super.ready();\n }", "function modelLoaded() {\n console.log('model loaded!');\n}", "function modelReady() {\n console.log('Model is ready..!!');\n mobilenet.predict(gotResults);\n}", "function modelReady() {\n\tselect('#status').html('Model Loaded');\n\n\t// When the model is ready, run the singlePose() function...\n\t// If/When a pose is detected, poseNet.on('pose', ...) will be listening for the detection results\n\t// in the draw() loop, if there are any poses, then carry out the draw commands\n\tposeNet.singlePose(img);\n}", "function modelLoaded() {\n select('#status').html('Model Loaded');\n getPitch();\n}", "function posesModelLoaded() {\n console.log(\"Poses data DA loaded\");\n state = STATES.READY;\n}", "ready() {\n if (this.model.time.splash) return;\n\n if (!this.model.time._ready) return utils.warn(\"TODO timeslider is fired ready event while time model is not ready yet! how come?\");\n\n const _this = this;\n\n this.element.classed(class_loading, false);\n\n this.changeLimits();\n this.changeTime();\n this.updateSize();\n\n _this._updateProgressBar();\n _this.model.marker.listenFramesQueue(null, time => {\n _this._updateProgressBar(time);\n });\n _this.setSelectedLimits(true);\n }", "function modelReady() {\n select('#modelStatus').html('Base Model (MobileNet) loaded!');\n}", "function modelReady() {\r\n console.log('Model is ready!!!');\r\n mobilenet.predict(gotResults);\r\n}", "ready() {\n this.isReady = true;\n if (this.onLoad) {\n this.onLoad.call();\n }\n }", "function customModelReady() {\n console.log('Custom Model is ready!!!');\n label = 'model ready';\n classifier.classify(gotResults);\n}", "function finishInit(){\n \n // Prepare to receive any changes \n function prep(m){\n // Merge in the data received\n m=_.extend(m,datain.model);\n \n // No listeners\n self.model.off();\n \n // Set the model\n self.model.set(m); \n \n // Observe changes in the attributes\n _.forEach(m,function(val,attr){\n self.model.on(\"change:\"+attr,function(model,value,options){\n //sails.log.debug(attr+\" has changed to '\"+value+\"'\")\n self.d[attr]=value;\n })\n })\n // Callback\n cb() \n }\n \n // If we are using model locking, get the existing model \n // from the session otherwise start afresh\n var m={};\n if (self.modelLocking) { \n self.SES.get(self.context+\"_model\",function(err,m){\n if (!m) m={} \n prep(m); \n }); \n }\n else {\n prep(m);\n }\n }", "static ready() { }", "ready() {\n super.ready();\n\n\n }", "function isReady() {\n\t\tvar ready = false;\n\t\tif(this.model !== null) {\n\t\t\tready = this.model.isReady();\n\t\t} else {\n\t\t\t// The model may not have finished loading.\n\t\t\t//console.log(\"this.node.isReady: this.model==null\");\n\t\t}\n\t\treturn ready;\n\t}", "_processModel(model) {\n if (model.onReady !== null) {\n model.onReady.then(this._processModelCallback); \n } else {\n setTimeout(this._processModelCallback, 0, model);\n }\n }", "function modelReady() {\n\n sketchrnn_model.reset();\n sketchrnn_model.generate(gotSketch);\n}", "function ready () {\n\t\t this._isAttached = true\n\t\t this._isReady = true\n\t\t this._callHook('ready')\n\t\t}", "ready() {\n if (this._prepareIx === this._prepare.length-1) {\n this._state = 1;\n this.emit('ready');\n } else {\n this.prepare();\n }\n }", "function modelReady() {\n //select('#modelStatus').html('MobileNet Loaded!')\n console.log('Model loaded');\n select('.progress-bar').hide();\n}", "ready() {\n const that = this;\n\n super.ready();\n that._handleMultipleCheckedInstances();\n that._updateHidenInputNameAndValue();\n }", "ready() {\n const that = this;\n\n super.ready();\n that._handleMultipleCheckedInstances();\n that._updateHidenInputNameAndValue();\n }", "function modelReady() {\n classifier.load(\"model.json\", function() {\n console.log(\"custom model loaded\");\n });\n // If you want to load a pre-trained model at the start\n // classifier.load('./model/model.json', function() {\n // select('#modelStatus').html('Custom Model Loaded!');\n // });\n}", "function modelReady(){\n select('#status').html('Model Loaded')\n}", "ready() {\n super.ready();\n }", "ready() {\n super.ready();\n }", "ready() {\n super.ready();\n }", "ready() {\n super.ready();\n\n const that = this;\n\n //a flag used to avoid animations on startup\n that._isInitializing = true;\n\n that._createLayout();\n that._setFocusable();\n\n delete that._isInitializing;\n }", "function modelLoaded()\n{\n console.log('model loaded');\n pitch.getPitch(gotPitch);\n}", "function ready () {\n\t this._isAttached = true\n\t this._isReady = true\n\t this._callHook('ready')\n\t}", "function ready () {\n\t this._isAttached = true\n\t this._isReady = true\n\t this._callHook('ready')\n\t}", "function ready() {\n this._isAttached = true;\n this._isReady = true;\n this._callHook('ready');\n }", "function ready() {\n this._isAttached = true;\n this._isReady = true;\n this._callHook('ready');\n }", "function ready() {\n this._isAttached = true;\n this._isReady = true;\n this._callHook('ready');\n }", "function ready() {\n\t this._isAttached = true;\n\t this._isReady = true;\n\t this._callHook('ready');\n\t }", "function ready() {\n\t this._isAttached = true;\n\t this._isReady = true;\n\t this._callHook('ready');\n\t }", "function ready() {\n\t this._isAttached = true;\n\t this._isReady = true;\n\t this._callHook('ready');\n\t }", "function ready() {\n\t this._isAttached = true;\n\t this._isReady = true;\n\t this._callHook('ready');\n\t }", "function ready() {\n\t this._isAttached = true;\n\t this._isReady = true;\n\t this._callHook('ready');\n\t }", "function ready() {\n\t this._isAttached = true;\n\t this._isReady = true;\n\t this._callHook('ready');\n\t }", "function ready() {\n\t this._isAttached = true;\n\t this._isReady = true;\n\t this._callHook('ready');\n\t }", "ready() {\n super.ready();\n\n const that = this;\n\n that._render();\n }", "ready() { }", "ready() { }", "ready() { }", "ready() { }", "ready() { }", "ready() { }", "ready() { }", "ready() { }", "function modelLoaded() {\n console.log(\"ML5 model loaded. Ready to detect body\");\n}", "function modelLoaded() {\n console.log(\"ML5 model loaded. Ready to detect body\");\n}", "setReady() {\n this.set(\"ready\", true);\n }", "ready() {\n const that = this;\n\n super.ready();\n that._updateHidenInputNameAndValue();\n }", "function ready() {\n this._isAttached = true;\n this._isReady = true;\n this._callHook('ready');\n }", "function ready() {\n this._isAttached = true;\n this._isReady = true;\n this._callHook('ready');\n }", "function ready() {\n this._isAttached = true;\n this._isReady = true;\n this._callHook('ready');\n }", "function ready() {\n this._isAttached = true;\n this._isReady = true;\n this._callHook('ready');\n }", "function ready() {\n this._isAttached = true;\n this._isReady = true;\n this._callHook('ready');\n }", "function ready() {\n this._isAttached = true;\n this._isReady = true;\n this._callHook('ready');\n }", "function ready() {\n this._isAttached = true;\n this._isReady = true;\n this._callHook('ready');\n }", "ready() {\n this._root = this._createRoot();\n super.ready();\n this._firstRendered();\n }", "function modelLoaded(){\n console.log(\"ml5 ready\")\n}", "async _onReady() {\n // Make the editor \"complex.\" This \"fluffs\" out the DOM and makes the\n // salient controller objects.\n this._editorComplex =\n new EditorComplex(this._sessionInfo, this._window, this._editorNode);\n\n await this._editorComplex.whenReady();\n this._recoverySetup();\n }", "init() {\r\n this.readyCount = 0;\r\n }", "function modelLoaded(){\n console.log('Model Loaded');\n loadingText.html('')\n // call to classifyIngredient once model is loaded\n detectIngredient();\n}", "async _onReady() {\n // Make the editor \"complex.\" This \"fluffs\" out the DOM and makes the\n // salient controller objects.\n this._editorComplex =\n new EditorComplex(this._sessionKey, this._window, this._editorNode);\n\n await this._editorComplex.whenReady();\n this._recoverySetup();\n }" ]
[ "0.8113265", "0.81117064", "0.7943331", "0.7935126", "0.77899736", "0.77771604", "0.7715138", "0.7604998", "0.75791126", "0.7464265", "0.73969203", "0.73880315", "0.73568463", "0.73484284", "0.73463", "0.73463", "0.73463", "0.7285477", "0.72667325", "0.72665656", "0.7266096", "0.7198249", "0.71653265", "0.71653265", "0.71653265", "0.71653265", "0.71653265", "0.71653265", "0.71653265", "0.71653265", "0.71653265", "0.71653265", "0.71653265", "0.71653265", "0.7153075", "0.71438235", "0.7137304", "0.7096174", "0.7028216", "0.7005558", "0.6991526", "0.6987125", "0.697398", "0.696764", "0.6949012", "0.69197273", "0.6862371", "0.68272734", "0.6806961", "0.6801787", "0.6799735", "0.67989767", "0.67800933", "0.6730883", "0.6730883", "0.6730541", "0.6725095", "0.668463", "0.668463", "0.668463", "0.66822964", "0.66666996", "0.6654864", "0.6654864", "0.6647284", "0.6647284", "0.6647284", "0.66447645", "0.66447645", "0.66447645", "0.66447645", "0.66447645", "0.66447645", "0.66447645", "0.6634212", "0.66276187", "0.66276187", "0.66276187", "0.66276187", "0.66276187", "0.66276187", "0.66276187", "0.66276187", "0.6618327", "0.6618327", "0.660312", "0.6602898", "0.6549868", "0.6549868", "0.6549868", "0.6549868", "0.6549868", "0.6549868", "0.6549868", "0.65421206", "0.6499015", "0.6483198", "0.64739186", "0.6473717", "0.6464101" ]
0.6766144
53
A new stroke path
function gotStroke(err, s) { strokePath = s; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function newPath () {\r\n ctx.beginPath(); // Neuer Grafikpfad\r\n ctx.strokeStyle = \"#000000\"; // Linienfarbe schwarz\r\n ctx.lineWidth = 1; // Liniendicke 1\r\n }", "function newPath () {\r\n ctx.beginPath(); // Neuer Grafikpfad\r\n ctx.strokeStyle = \"#000000\"; // Linienfarbe schwarz\r\n ctx.lineWidth = 1; // Liniendicke 1\r\n }", "function newPath () {\n ctx.beginPath(); // Neuer Pfad\n ctx.strokeStyle = \"#000000\"; // Linienfarbe schwarz\n ctx.lineWidth = 1; // Liniendicke 1\n }", "function newPath () {\n ctx.beginPath(); // Neuer Pfad\n ctx.strokeStyle = \"#000000\"; // Linienfarbe schwarz\n ctx.lineWidth = 1; // Liniendicke 1\n }", "function createPath() {\n\n path.lineTo(64, 128);\n path.lineTo(224, 128);\n path.lineTo(224, 320);\n\n graphics.lineStyle(2, 0xff0000, 0);\n path.draw(graphics);\n}", "function createPath() {\n\n \n \n path.lineTo(64, 128);\n path.lineTo(224, 128);\n path.lineTo(224, 320);\n\n graphics.lineStyle(2, 0xff0000, 0);\n path.draw(graphics);\n}", "function newPath(w) {\n ctx.beginPath(); // Neuer Pfad\n ctx.strokeStyle = \"#000000\"; // Linienfarbe schwarz\n ctx.lineWidth = 1; // Liniendicke\n }", "function newPath (w) {\n ctx.beginPath(); // Neuer Pfad\n ctx.strokeStyle = \"#000000\"; // Linienfarbe schwarz\n ctx.lineWidth = (w ? w : 1); // Liniendicke\n }", "drawPath() {\n this.ctx.stroke();\n this.begin();\n }", "function makePath() {\n var obj = new Graphics();\n obj.lineStyle(2, 0xffffff, 1);\n obj.moveTo(0, 0);\n obj.lineTo(pathProp.pathLenght, 0);\n\n obj.pivot.set(pathProp.pathLenght / 2, 0);\n obj.x = app.renderer.view.width / 2;\n obj.y = pathProp.pathY;\n return obj;\n}", "function path(type){\n var att = ['opacity', 'stroke-width', 'd'];\n var object = shape('path', att);\n // The group is created here (once for all strokes) for mutipaths,\n // and into onmousedown for single paths\n if(type=='multipath'){\n object.create_group();\n object.single = false;\n }\n else\n object.single = true;\n\n object.mousedown = function(x, y){\n if (this.open)\n return;\n this.d = 'M'+x+','+y;\n this.fill = 'none';\n // This is like a start_shape function, but create the group\n // just if this isn't a multipath\n this.open_shape();\n if(this.single)\n this.create_group();\n this.create_element();\n };\n object.mousemove = function(x, y){\n if (!this.open)\n return;\n var d = this.element.getAttribute('d');\n d += ' L '+x+','+y;\n this.element.setAttribute('d', d);\n // firefox/native truncates the received updates, so don't let\n // this field become too long. This way, at least the user\n // knows what can be seen by everyone. I measured that the\n // field was truncated to 4096 chars. The final size of the\n // field also depends by the conversions made by the\n // size_adapter object (application.js), so even with this\n // check the final path could lose some of his last points,\n // but this is not a big problem\n if (d.length>4000)\n this.mouseup();\n };\n object.mouseup = function(){\n if (!this.open)\n return;\n this.end_shape();\n };\n return object;\n}", "function sub_curve_path_up() {\n sub_curve_path.setAttribute(\"d\", \"M 0 300 Q 50 50 150 120 Q 200 150 250 50\");\n}", "createPath(color, width) {\n const p = document.createElementNS(this.svgNS, \"path\");\n p.setAttributeNS(null, \"stroke-width\", width);\n p.setAttributeNS(null, \"stroke\", color);\n p.setAttributeNS(null, \"fill\", \"transparent\");\n return p;\n }", "function drawPath() {\n canvasContext.setLineDash([5, 3])\n canvasContext.lineWidth = 2;\n canvasContext.strokeStyle = 'orange';\n canvasContext.beginPath();\n canvasContext.moveTo(\n bowLocation[0] + imgBow.width / 2,\n bowLocation[1] + imgBow.height / 2);\n canvasContext.lineTo(\n targetLocation[0] + imgTarget.width / 2,\n targetLocation[1] + imgTarget.height / 2);\n canvasContext.stroke();\n}", "function drawPath( svg, X, Y, i, j, form, path, sX, sY ){\n\t\t//take care of the pattern part\n\t\tvar command1 = '';\n\t\tvar points1 = path.array();\n\t\tfor( var k in points1.value ){\n\t\t\tif( points1.value[k][0] == \"M\" ){\n\t\t\t\tvar text = 'M '+( ( ( points1.value[k][1] )+( sX*1 ) )+( X*i ) )+' '+( ( ( points1.value[k][2] )+( sY*1 ) )+( Y*j ) );\n\t\t\t\tvar command1 = command1.concat( text );\n\n\t\t\t}else if( points1.value[k][0] == \"C\" ){\n\t\t\t\tvar text = ' C '+( ( ( points1.value[k][1] )+( sX*1 ) )+( X*i ) )+' '+( ( ( points1.value[k][2] )+( sY*1 ) )+( Y*j ) )+' '+\n\t\t\t\t\t\t\t\t\t\t\t\t ( ( ( points1.value[k][3] )+( sX*1 ) )+( X*i ) )+' '+( ( ( points1.value[k][4] )+( sY*1 ) )+( Y*j ) )+' '+\n\t\t\t\t\t\t\t\t\t\t\t\t ( ( ( points1.value[k][5] )+( sX*1 ) )+( X*i ) )+' '+( ( ( points1.value[k][6] )+( sY*1 ) )+( Y*j ) );\n\t\t\t\tvar command1 = command1.concat( text );\n\n\t\t\t}else if( points1.value[k][0] == \"L\" ){\n\t\t\t\tvar text = ' L '+( ( ( points1.value[k][1] )+( sX*1 ) )+( X*i ) )+' '+( ( ( points1.value[k][2] )+( sY*1 ) )+( Y*j ) );\n\t\t\t\tvar command1 = command1.concat( text );\n\n\t\t\t}else if( points1.value[k][0] == \"Z\" ){\n\t\t\t\tvar element1 = svgOut.path( command1 ).stroke( { width : 0 } ).fill( \"none\" );\n\t\t\t\t//take care of the shape part that can be an ellipse form\n\t\t\t\tif( form.type == \"path\" ){\n\t\t\t\t\tvar command2 = '';\n\t\t\t\t\tvar points2 = form.array();\n\t\t\t\t\tfor( var k in points2.value ){\n\t\t\t\t\t\tif( points2.value[k][0] == \"M\" ){\n\t\t\t\t\t\t\tvar text = 'M '+( points2.value[k][1] )+' '+( points2.value[k][2] );\n\t\t\t\t\t\t\tvar command2 = command2.concat( text );\n\n\t\t\t\t\t\t}else if( points2.value[k][0] == \"C\" ){\n\t\t\t\t\t\t\tvar text = ' C '+( points2.value[k][1] )+' '+( points2.value[k][2] )+' '+\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t ( points2.value[k][3] )+' '+( points2.value[k][4] )+' '+\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t ( points2.value[k][5] )+' '+( points2.value[k][6] );\n\t\t\t\t\t\t\tvar command2 = command2.concat( text );\n\n\t\t\t\t\t\t}else if( points2.value[k][0] == \"L\" ){\n\t\t\t\t\t\t\tvar text = ' L '+( points2.value[k][1] )+' '+( points2.value[k][2] );\n\t\t\t\t\t\t\tvar command2 = command2.concat( text );\n\n\t\t\t\t\t\t}else if( points2.value[k][0] == \"Z\" ){\n\t\t\t\t\t\t\tbreak\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tvar element2 = svgOut.path( command2 ).stroke( { width : 0 } ).fill( \"none\" );\n\t\t\t\t} else{\n\t\t\t\t\tvar element2 = form;\n\t\t\t\t}\n\t\t\t drawSplittedData( element1, element2 );\n\t\t\t command1='';\n\t\t\t}\n\t\t\t//if the pattern element is not closed then run the script one more time\n\t\t\tif( points1.value[points1.value.length-1][0] != \"Z\" ){\n\t\t\t\tvar element1 = svgOut.path( command1 ).stroke( { width : 0 } ).fill( \"none\" );\n\t\t\t\t//take care of the shape part that can be an ellipse form\n\t\t\t\tif( form.type == \"path\" ){\n\t\t\t\t\tvar command2 = '';\n\t\t\t\t\tvar points2 = form.array();\n\t\t\t\t\tfor( var k in points2.value ){\n\t\t\t\t\t\tif( points2.value[k][0] == \"M\" ){\n\t\t\t\t\t\t\tvar text = 'M '+( points2.value[k][1] )+' '+( points2.value[k][2] );\n\t\t\t\t\t\t\tvar command2 = command2.concat( text );\n\n\t\t\t\t\t\t}else if( points2.value[k][0] == \"C\" ){\n\t\t\t\t\t\t\tvar text = ' C '+( points2.value[k][1] )+' '+( points2.value[k][2] )+' '+\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t ( points2.value[k][3] )+' '+( points2.value[k][4] )+' '+\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t ( points2.value[k][5] )+' '+( points2.value[k][6] );\n\t\t\t\t\t\t\tvar command2 = command2.concat( text );\n\n\t\t\t\t\t\t}else if( points2.value[k][0] == \"L\" ){\n\t\t\t\t\t\t\tvar text = ' L '+( points2.value[k][1] )+' '+( points2.value[k][2] );\n\t\t\t\t\t\t\tvar command2 = command2.concat( text );\n\n\t\t\t\t\t\t}else if( points2.value[k][0] == \"Z\" ){\n\t\t\t\t\t\t\tbreak\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tvar element2 = svgOut.path( command2 ).stroke( { width : 0 } ).fill( \"none\" );\n\t\t\t\t} else {\n\t\t\t\t\tvar element2 = form;\n\t\t\t\t}\n\t\t\t drawSplittedData( element1, element2 );\n\t\t\t}\n\t\t}\n\t\t\n\t}", "function _stroke(ctx) {\r\n var modify = 0;\r\n\r\n if (ctx.lineJoin !== ctx._lineJoin) {\r\n ctx._lineJoin = ctx.lineJoin;\r\n ++modify;\r\n }\r\n if (ctx.lineWidth !== ctx._lineWidth) {\r\n ctx._lineWidth = ctx.lineWidth;\r\n ctx.__lineWidth = (ctx.lineWidth * ctx._lineScale).toFixed(2);\r\n ++modify;\r\n }\r\n if (ctx.miterLimit !== ctx._miterLimit) {\r\n ctx._miterLimit = ctx.miterLimit;\r\n ++modify;\r\n }\r\n if (ctx.lineCap !== ctx._lineCap) {\r\n ctx._lineCap = ctx.lineCap;\r\n ctx.__lineCap = (ctx.lineCap === \"butt\") ? \"flat\" : ctx.lineCap;\r\n ++modify;\r\n }\r\n\r\n if (modify) {\r\n ctx._strokeCache =\r\n '\" StrokeLineJoin=\"' + ctx._lineJoin +\r\n '\" StrokeThickness=\"' + ctx.__lineWidth +\r\n '\" StrokeMiterLimit=\"' + ctx._miterLimit +\r\n '\" StrokeStartLineCap=\"' + ctx.__lineCap +\r\n '\" StrokeEndLineCap=\"' + ctx.__lineCap;\r\n }\r\n return ctx._strokeCache;\r\n}", "setStroke({\n thickness = 1,\n cap = 'butt',\n join = 'miter',\n miterLimit = 10,\n color = [0, 0, 0, 0],\n lineDash = null,\n lineDashOffset = 0,\n roundSegments = 20\n } = {}) {\n this[_mesh] = null;\n this[_stroke] = Object(_extrude_polyline__WEBPACK_IMPORTED_MODULE_2__[\"default\"])({\n thickness,\n cap,\n join,\n miterLimit,\n roundSegments\n });\n if (typeof color === 'string') color = Object(_utils_parse_color__WEBPACK_IMPORTED_MODULE_10__[\"default\"])(color);\n this[_strokeColor] = color;\n this[_stroke].lineDash = lineDash;\n this[_stroke].lineDashOffset = lineDashOffset;\n return this;\n }", "function pathPrepare($el) {\n var lineLength = $el[0].getTotalLength();\n $el.css(\"stroke-dasharray\", lineLength);\n $el.css(\"stroke-dashoffset\", lineLength);\n}", "function makePathByGlyph(glyph){\n \n\n return new p.Path({\n\n })\n}", "function createPath(path, points){\n\t\t//list of paths, as defined by the paths variable at the top of this page\n\t\tpaths.forEach(function(item, index){\n\t\t\t//variable to keep track of if the current point exists in any of the paths\n\t var found = 0;\n\t\t\t//Create SVG element for the path\n\t\tvar newPath = document.createElementNS(\"http://www.w3.org/2000/svg\",\"path\");\n\t\tnewPath.setAttributeNS(null,\"stroke\",\"#000000\");\n\t\tnewPath.setAttributeNS(null,\"stroke-width\",2);\n\t\tnewPath.setAttributeNS(null,\"fill\",\"transparent\");\n\t\tnewPath.setAttributeNS(null,\"class\",\"path\");\n\t\t\t//d is how the SVG is drawn, \"M\" stands for \"MoveTo\" which is where to begin drawing\n\t\tvar d = \"M\";\n\t\t\t\t\t\t\t\t\titem.forEach(function(item2, index2){\n\t\t\t\t\t\t\t\t\t\t//if the point currently being hovered over exists in one of the paths, set the found variable to 1\n\t\t\t\t\t\t\t\t\t\tif (item2==path)\n\t\t\t\t\t\t\t\t\t\t\tfound = 1;\n\t\t\t\t\t\t\t\t\t\t//other than the very first time it is found, we want to add an \"L\" which stands for \"LineTo\" to our d variable\n\t\t\t\t\t\t\t\t\t\tif (found){\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (found>1)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\td= d.concat(\"L\");\n\t\t\t\t\t\t\t\t\t\t\t//Adds the x and y values to the current path being drawn\n\t\t\td = d.concat(parseInt(points[item2].el.attributes.cx.nodeValue));\n\t\t\td = d.concat(\" \");\n\t\t\td = d.concat(parseInt(points[item2].el.attributes.cy.nodeValue));\n\t\t\td = d.concat(\" \");\n\t\t\t\t\t\t\t\t\t\t\t//indicates that we are beyond the first element so we need to add an \"L\" before each set of co-ordinates so it knows to draw a line\n\t\t\t\t\t\t\t\t\t\t\tfound+=1;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t});\n\t\t\t//if it has created a path, the d variable will contain more than just the \"M\" character. Otherwise, there is no path\n\t\t\tif(d.length>1){\n\t\t\t\t\tnewPath.setAttributeNS(null,\"d\",d);\n\t\t\t\t//dash array and dash offset have to be set to the total length of the path in order for the animation defined in component.css to work\n\t\t newPath.setAttributeNS(null,\"stroke-dasharray\", newPath.getTotalLength());\n\t newPath.setAttributeNS(null,\"stroke-dashoffset\", newPath.getTotalLength());\n\t\t\t\t//once again, draw the SVG behind the existing points using \"insertBefore\" so you can still click on them\n\t\t\t\tdocument.getElementById(\"points\").insertBefore(newPath,document.getElementById(\"points\").childNodes.item(0));\n\t\t\t}\n\t\t\t\t\t\t\t\t\t});\n\t}", "function drawPath() {\n\tif(path.length===0) { return; }\n\tif(Quality>=2 && !isColorblind()) {\n\t\tconst rad = pathW * .6;\n\t\t\n\t\tconst rOpt = ['9','A','A','B','C'];\n\t\tconst gOpt = ['9','8','7'];\n\t\tconst bOpt = ['4','5'];\n\t\t\n\t\tconst first = (totalPaths%2)+1;\n\t\tfor(let i=first;i<path.length;i+=2) {\n\t\t\tconst j = i+totalPaths;\n\t\t\tconst r = rOpt[j%rOpt.length];\n\t\t\tconst g = gOpt[j%gOpt.length];\n\t\t\tconst b = bOpt[j%bOpt.length];\n\t\t\t\n\t\t\tmctx.fillStyle=`#${r}${g}${b}7`;\n\t\t\tmctx.beginPath();\n\t\t\tmctx.ellipse(path[i].x, path[i].y, pathW, rad, 0, 0, Math.PI*2)\n\t\t\tmctx.fill();\n\t\t}\n\t}\n\t\n\tmctx.lineWidth = pathW;\n\tmctx.strokeStyle =\"#B85\";\n\n\t// if(isColorblind()) {\n\t\t// mctx.strokeStyle = GetColorblindColor();\n\t// }\n\t\n\tconst pCount = 4;\n\tfor(let i=0;i<pCount;i++){\n\t\tmctx.beginPath();\n\t\tmctx.moveTo(path[0].x, path[0].y);\n\t\tfor(let j=i;j<path.length;j+=pCount){\n\t\t\tmctx.lineTo(path[j].x, path[j].y);\n\t\t}\n\t\tmctx.stroke();\n\t}\n}", "function updatePlaneStroke(targetAirplane){\n\tvar drawingStroke = targetAirplane.drawingStroke;\n\tdrawingStroke.graphics.clear();\n\t\n\tif(targetAirplane.path.length > 0){\n\t\tvar drawing = false;\n\t\tvar curStrokeColor = lostStrokeColor;\n\t\tvar curStrokeStyle = lostStrokeStyle;\n\t\tvar curStrokeAlpha = lostStrokeAlpha;\n\t\t\n\t\tif(targetAirplane.runwayGuide == 3){\n\t\t\tcurStrokeColor = strokeColor;\n\t\t\tcurStrokeStyle = strokeStyle;\t\n\t\t\tcurStrokeAlpha = strokeAlpha;\n\t\t}\n\t\t\n\t\tif(targetAirplane == gameData.targetPlane){\n\t\t\tdrawing = true;\n\t\t\tcurStrokeAlpha = drawStrokeAlpha;\n\t\t\tcurStrokeColor = drawStrokeColor;\n\t\t\tcurStrokeStyle = drawStrokeStyle;\n\t\t}else{\n\t\t\tcurStrokeAlpha = strokeAlpha;\n\t\t\tdrawingStroke.graphics.beginStroke(curStrokeColor)\n\t\t\t\t\t\t .setStrokeStyle(curStrokeStyle, \"round\")\n\t\t\t\t\t\t .moveTo(targetAirplane.path[0].x, targetAirplane.path[0].y);\t\n\t\t}\n\t\tdrawingStroke.alpha = curStrokeAlpha;\n\t\t\n\t\tvar dotX = targetAirplane.path[0].x;\n\t\tvar dotY = targetAirplane.path[0].y;\n\t\tvar oldX = dotX;\n\t\tvar oldY = dotY;\n\t\t\t \n\t\tfor(var p=0;p<targetAirplane.path.length;p++){\n\t\t\tif(drawing){\n\t\t\t\tif(targetAirplane.path[p].dotted){\n\t\t\t\t\tdrawingStroke.graphics.beginStroke(curStrokeColor)\n\t\t\t\t\t\t\t .setStrokeStyle(curStrokeStyle, \"round\")\n\t\t\t\t\t\t\t .moveTo(oldX, oldY)\n\t\t\t\t\t\t\t .lineTo(targetAirplane.path[p].x, targetAirplane.path[p].y);\n\t\t\t\t}else{\n\t\t\t\t\toldX = targetAirplane.path[p].x;\n\t\t\t\t\toldY = targetAirplane.path[p].y;\t\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\tdrawingStroke.graphics.lineTo(targetAirplane.path[p].x, targetAirplane.path[p].y);\t\n\t\t\t}\n\t\t}\n\t}\t\n}", "function drawPath() {\n // draw the path\n for (var j = 0; j < AllPoints.length; j++) {\n var pathString = \"M\";\n for (var i = 0; i < AllPoints[j].length; i++) {\n var x =\n allCordsMap[\n \"h\" + AllPoints[j][i][0] + \"-v\" + AllPoints[j][i][1]\n ][AllPoints[j][i][2]];\n var y =\n allCordsMap[\n \"h\" + AllPoints[j][i][0] + \"-v\" + AllPoints[j][i][1]\n ][AllPoints[j][i][2]];\n pathString = pathString + x + \",\" + y;\n if (i !== AllPoints[j].length - 1) {\n pathString += \"L\";\n } else {\n Snap.select(LIGHT_PATHS[j])\n .path(pathString)\n .attr(\"stroke\", LIGHT_COLOR)\n .attr(\"stroke-width\", 1)\n .attr(\"fill\", \"none\");\n Snap.select(DARK_PATHS[j])\n .path(pathString)\n .attr(\"stroke\", DARKER_COLOR)\n .attr(\"stroke-width\", 1)\n .attr(\"fill\", \"none\");\n console.log(\"draw path\");\n }\n }\n }\n}", "function testPath(){\t\t\t\t\t\t\t\t\t\n\n\nvar someObj = {};\n\nvar testPath = g.selectAll(\"path\");\n//testPath.remove();\ntestPath.forEach(function(el) {\n\nvar lenB = el.getTotalLength();\n\nvar defaultColor = el.attr(\"fill\");\n\nvar animationTime = 1500;\n\nel.attr({\nid: \"squiggle\",\nfill: \"#fff\",\nstrokeWidth: \"3\",\nstroke: defaultColor,\nstrokeMiterLimit: \"2\",\n\"stroke-dasharray\": lenB + \" \" + lenB,\n\"stroke-dashoffset\": lenB\n}).animate({\"stroke-dashoffset\": 0}, animationTime ,mina.easeinout,\n\n//Callback\n function(){\n\nel.attr({fill: \"#fff\"}).animate({fill:\"rgb(93, 189, 181)\", stroke:defaultColor}, animationTime,mina.easeinout, loadedEl);\n\n}\n//Callback\n);\n\n//console.log(el.attr('fill'))\n});\n\n//console.log( testPath, someObj );\n\n}", "function testPath(){\t\t\t\t\t\t\t\t\t\n\n\nvar someObj = {};\n\nvar testPath = g.selectAll(\"path\");\n//testPath.remove();\ntestPath.forEach(function(el) {\n\nvar lenB = el.getTotalLength();\n\nvar defaultColor = el.attr(\"fill\");\n\nvar animationTime = 1500;\n\nel.attr({\nid: \"squiggle\",\nfill: bgColor,\nstrokeWidth: \"3\",\nstroke: defaultColor,\nstrokeMiterLimit: \"2\",\n\"stroke-dasharray\": lenB + \" \" + lenB,\n\"stroke-dashoffset\": lenB\n}).animate({\"stroke-dashoffset\": 0}, animationTime ,mina.easeinout,\n\n//Callback\n function(){\n\nel.attr({fill: bgColor}).animate({fill:defaultColor, stroke:defaultColor}, animationTime,mina.easeinout, loadedEl);\n\n}\n//Callback\n);\n\n//console.log(el.attr('fill'))\n});\n\n//console.log( testPath, someObj );\n\n}", "getSVGPath(scaling = 'scale', infiniteCheck = true, forDrawing = false, forDrawingButInvisible = false) {\n let path = '';\n path = this.segments\n .map((seg) => seg.getSVGPath(scaling, false, infiniteCheck))\n .join('\\n');\n if (forDrawingButInvisible) {\n if (this.vertexes[1] && this.segments[0].isArc()) {\n let arcCenterCoordinates = this.segments[0].arcCenter.coordinates;\n let firstVertex = this.vertexes[0].coordinates;\n let secondVertex = this.vertexes[1].coordinates;\n if (scaling == 'scale') {\n arcCenterCoordinates = arcCenterCoordinates.toCanvasCoordinates();\n firstVertex = firstVertex.toCanvasCoordinates();\n secondVertex = secondVertex.toCanvasCoordinates();\n }\n path += ['M', arcCenterCoordinates.x, arcCenterCoordinates.y, 'L', firstVertex.x, firstVertex.y, 'L', secondVertex.x, secondVertex.y, 'L', arcCenterCoordinates.x, arcCenterCoordinates.y].join(' ');\n }\n }\n if (forDrawing) {\n let seg = this.segments[0];\n let arrowEndCoordinates = seg.vertexes[1].coordinates;\n let arrowAngle = seg.getAngleWithHorizontal() + Math.PI;\n if (seg.isArc()) {\n let originVector = this.segments[0].getArcTangent(1);\n arrowAngle = Math.atan2(originVector.y, originVector.x) + Math.PI;\n }\n let firstTriangleCoord = arrowEndCoordinates.add(new Coordinates({\n x: 20 * Math.cos(arrowAngle + 0.35),\n y: 20 * Math.sin(arrowAngle + 0.35),\n }));\n let secondTriangleCoord = arrowEndCoordinates.add(new Coordinates({\n x: 20 * Math.cos(arrowAngle - 0.35),\n y: 20 * Math.sin(arrowAngle - 0.35),\n }));\n if (scaling == 'scale') {\n arrowEndCoordinates = arrowEndCoordinates.toCanvasCoordinates();\n firstTriangleCoord = firstTriangleCoord.toCanvasCoordinates();\n secondTriangleCoord = secondTriangleCoord.toCanvasCoordinates();\n }\n path += ` M ${arrowEndCoordinates.x} ${arrowEndCoordinates.y} L ${firstTriangleCoord.x} ${firstTriangleCoord.y} M ${arrowEndCoordinates.x} ${arrowEndCoordinates.y} L ${secondTriangleCoord.x} ${secondTriangleCoord.y}`;\n }\n return path;\n }", "function startDrawingPath() {\n length = 0;\n orig.style.stroke = \"#ffffff\";\n timer = setInterval(increaseLength, 1000 / drawFPS);\n}", "function addStroke(shape,strokeWidthValue){\n var stroke = shape.content.addProperty(\"ADBE Vector Graphic - Stroke\");\n var strokeWidth = stroke.property(\"ADBE Vector Stroke Width\");\n strokeWidth.setValue(strokeWidthValue);}", "function buildSVGPath(attrs, length, spacing, offset, useDashCase) {\n if (spacing === void 0) { spacing = 1; }\n if (offset === void 0) { offset = 0; }\n if (useDashCase === void 0) { useDashCase = true; }\n // Normalise path length by setting SVG attribute pathLength to 1\n attrs.pathLength = 1;\n // We use dash case when setting attributes directly to the DOM node and camel case\n // when defining props on a React component.\n var keys = useDashCase ? dashKeys : camelKeys;\n // Build the dash offset\n attrs[keys.offset] = styleValueTypes.px.transform(-offset);\n // Build the dash array\n var pathLength = styleValueTypes.px.transform(length);\n var pathSpacing = styleValueTypes.px.transform(spacing);\n attrs[keys.array] = \"\".concat(pathLength, \" \").concat(pathSpacing);\n}", "function fillStrokeClose() {\n executeContextFill();\n executeContextStroke();\n curContext.closePath();\n }", "drop() {\n ctx.strokeStyle= '#ffffff';\n ctx.beginPath();\n ctx.setLineDash([2, 2])\n ctx.arc(this.x, this.y + 50, 5, Math.PI, Math.PI * 2, false);\n ctx.stroke(); \n }", "squarePath (x, y, l) {\n return \"M\" + x + \",\" + y + \" \" +\n \"m\" + -l/2 + \",0 \" +\n \"m\" + \"0,\" + -l/2 + \" \" +\n \"h\" + \"0,\" + l + \" \" +\n \"v\" + l + \",0 \" + // l + \" \" +\n \"h 0,\" + -l + \" \" + //,0 \" +\n \"v0,0Z\";\n }", "function _path(r0, r1, a0, a1, cx, cy, isClosed) {\n cx = cx || 0;\n cy = cy || 0;\n var isCircle = isFullCircle([a0, a1]);\n var aStart, aMid, aEnd;\n var rStart, rEnd;\n if (isCircle) {\n aStart = 0;\n aMid = PI;\n aEnd = twoPI;\n } else {\n if (a0 < a1) {\n aStart = a0;\n aEnd = a1;\n } else {\n aStart = a1;\n aEnd = a0;\n }\n }\n if (r0 < r1) {\n rStart = r0;\n rEnd = r1;\n } else {\n rStart = r1;\n rEnd = r0;\n }\n\n // N.B. svg coordinates here, where y increases downward\n function pt(r, a) {\n return [r * Math.cos(a) + cx, cy - r * Math.sin(a)];\n }\n var largeArc = Math.abs(aEnd - aStart) <= PI ? 0 : 1;\n function arc(r, a, cw) {\n return 'A' + [r, r] + ' ' + [0, largeArc, cw] + ' ' + pt(r, a);\n }\n var p;\n if (isCircle) {\n if (rStart === null) {\n p = 'M' + pt(rEnd, aStart) + arc(rEnd, aMid, 0) + arc(rEnd, aEnd, 0) + 'Z';\n } else {\n p = 'M' + pt(rStart, aStart) + arc(rStart, aMid, 0) + arc(rStart, aEnd, 0) + 'Z' + 'M' + pt(rEnd, aStart) + arc(rEnd, aMid, 1) + arc(rEnd, aEnd, 1) + 'Z';\n }\n } else {\n if (rStart === null) {\n p = 'M' + pt(rEnd, aStart) + arc(rEnd, aEnd, 0);\n if (isClosed) p += 'L0,0Z';\n } else {\n p = 'M' + pt(rStart, aStart) + 'L' + pt(rEnd, aStart) + arc(rEnd, aEnd, 0) + 'L' + pt(rStart, aEnd) + arc(rStart, aStart, 1) + 'Z';\n }\n }\n return p;\n}", "setStroke({thickness = 1, cap = 'butt', join = 'miter', miterLimit = 10, color = [0, 0, 0, 0]} = {}) {\n this[_mesh] = null;\n this[_stroke] = stroke({thickness, cap, join, miterLimit});\n this[_strokeColor] = color;\n this[_enableBlend] = color[3] < 1.0;\n }", "function pathPrepare ($el) {\n\t\tvar lineLength = $el[0].getTotalLength();\n\t\t$el.css(\"stroke-dasharray\", lineLength);\n\t\t$el.css(\"stroke-dashoffset\", lineLength);\n\t}", "function _path(r0, r1, a0, a1, cx, cy, isClosed) {\n cx = cx || 0;\n cy = cy || 0;\n\n var isCircle = isFullCircle([a0, a1]);\n var aStart, aMid, aEnd;\n var rStart, rEnd;\n\n if(isCircle) {\n aStart = 0;\n aMid = PI;\n aEnd = twoPI;\n } else {\n if(a0 < a1) {\n aStart = a0;\n aEnd = a1;\n } else {\n aStart = a1;\n aEnd = a0;\n }\n }\n\n if(r0 < r1) {\n rStart = r0;\n rEnd = r1;\n } else {\n rStart = r1;\n rEnd = r0;\n }\n\n // N.B. svg coordinates here, where y increases downward\n function pt(r, a) {\n return [r * Math.cos(a) + cx, cy - r * Math.sin(a)];\n }\n\n var largeArc = Math.abs(aEnd - aStart) <= PI ? 0 : 1;\n function arc(r, a, cw) {\n return 'A' + [r, r] + ' ' + [0, largeArc, cw] + ' ' + pt(r, a);\n }\n\n var p;\n\n if(isCircle) {\n if(rStart === null) {\n p = 'M' + pt(rEnd, aStart) +\n arc(rEnd, aMid, 0) +\n arc(rEnd, aEnd, 0) + 'Z';\n } else {\n p = 'M' + pt(rStart, aStart) +\n arc(rStart, aMid, 0) +\n arc(rStart, aEnd, 0) + 'Z' +\n 'M' + pt(rEnd, aStart) +\n arc(rEnd, aMid, 1) +\n arc(rEnd, aEnd, 1) + 'Z';\n }\n } else {\n if(rStart === null) {\n p = 'M' + pt(rEnd, aStart) + arc(rEnd, aEnd, 0);\n if(isClosed) p += 'L0,0Z';\n } else {\n p = 'M' + pt(rStart, aStart) +\n 'L' + pt(rEnd, aStart) +\n arc(rEnd, aEnd, 0) +\n 'L' + pt(rStart, aEnd) +\n arc(rStart, aStart, 1) + 'Z';\n }\n }\n\n return p;\n}", "createPath(){\n this.visualizer_path = this.el.createChild('path', {class: 'stitch-style', fill: 'none'})\n }", "function createShapeLayerWithPath(strokeWidth){\n var line = app.project.activeItem.layers.addShape();\n var path = line.content.addProperty(\"ADBE Vector Shape - Group\");\n addStroke(line,strokeWidth);\n\n return line;\n }", "draw() {\n // destructuring\n const {\n x,\n y,\n width,\n height,\n fillColor,\n strokeColor,\n strokeWidth\n } = this\n\n // saves the current styles set elsewhere\n // to avoid overwriting them\n ctx.save()\n\n // set the styles for this shape\n ctx.fillStyle = fillColor\n ctx.lineWidth = strokeWidth\n\n // create the *path*\n ctx.beginPath()\n ctx.strokeStyle = strokeColor\n ctx.rect(x, y, width, height)\n\n // draw the path to screen\n ctx.fill()\n ctx.stroke()\n\n // restores the styles from earlier\n // preventing the colors used here\n // from polluting other drawings\n ctx.restore()\n }", "function createNewPath(segment) {\n var startX = segment.endX;\n var startY = segment.endY;\n var endX = segment.endX + segment.length;\n var endY = segment.endY;\n var newPath = new fabric.Line(\n [startX, startY, endX, endY],\n {\n member: '',\n strokeWidth: 10,\n stroke: '#999797',\n originX: 'center',\n originY: 'center',\n lockScalingY: true,\n lockRotation: true,\n hasBorders: false,\n cornerSize: 4,\n cornerStyle: 'circle',\n subTargetCheck: true\n });\n canvas.add(newPath);\n pathCount++;\n if (pathCount < 10) {newPath.member = 'seg0'+ pathCount; }\n else {newPath.member = 'seg' + pathCount; }//name a segment\n //create a segment object and store it in segArray\n var newSegment = new Segment(newPath.member, startX, startY, endX, endY, curvage, superElevation, numberOfFeatures);\n segArray.push(newSegment);\n createSegmentForm(newSegment);\n newPath.on('mousedown', function(event) {\n var active = canvas.getActiveObject();\n var object = compareSegment(active);\n if (event.e.altKey === true) {createNewPath(object); }\n });\n} //end createNewPath", "function drawPath(path){\n\t\t//If we already \n\t\tif(path){\n\t\t\tfor(var p = 0; p < path.length; p++){\n\t\t\t\t//console.log(board.tiles[path[p].x][path[p].y].element.classList);\n\t\t\t\tGAME.board.tiles[path[p].x][path[p].y].element.classList.add('path');\n\t\t\t\tcurrentPath.push(GAME.board.tiles[path[p].x][path[p].y].element);\n\t\t\t}\n\t\t}\n\t}", "function testPath(){\t\t\t\t\t\t\t\t\t\nvar someObj = {};\n\nvar testPath = g.selectAll(\"path\");\n//testPath.remove();\ntestPath.forEach(function(el) {\n\nvar lenB = el.getTotalLength();\n\nvar defaultColor = el.attr(\"fill\");\nvar strokeColor = el.attr(\"stroke\");\n\nvar animationTime = 4000;\nvar animationFillTime = 1000;\nel.attr({\nid: \"#fff5e7\",\nfill: bgColor,\nstrokeWidth: \"1\",\nstroke: strokeColor,\nstrokeMiterLimit: \"2\",\n\"stroke-dasharray\": lenB + \" \" + lenB,\n\"stroke-dashoffset\": lenB\n}).animate({\"stroke-dashoffset\": 0}, animationTime ,mina.easeinout,\n\n//Callback\n function(){\nel.attr({fill: bgColor}).animate({fill:defaultColor, stroke:strokeColor}, animationFillTime,mina.easeinout,loadedEl);\n\n\n}\n//Callback\n);\n//console.log(el.attr('fill'))\n});\n//console.log( testPath, someObj );\n}", "function drawPath(ctx, x1, y1, x2, y2, width, color) {\n ctx.beginPath();\n ctx.moveTo(x1, y1);\n ctx.lineTo(x2, y2);\n ctx.strokeStyle = color;\n ctx.strokeWidth = width;\n ctx.stroke();\n ctx.strokeStyle = \"black\";\n ctx.fillStyle = \"black\";\n}", "function createPlanePath(){\n\tTweenMax.killTweensOf(gameData.targetPlane);\n\t\n\tgameData.targetPlane.path = [];\n\tgameData.targetPlane.runwayNum = -1;\n\tgameData.targetPlane.runwayGuide = -1;\n\tgameData.targetPlane.runwayGuidePlane = -1;\n\tgameData.targetPlane.runwayType = -1;\n\tgameData.targetPlane.pathed = false;\n\tgameData.targetPlane.dotted = true;\n\tupdatePlaneStroke(gameData.targetPlane);\n\t\n\tvar drawingStroke = gameData.targetPlane.drawingStroke;\n\tdrawingStroke.alpha = drawStrokeAlpha;\n\tdrawingStroke.graphics.beginStroke(drawStrokeColor)\n\t\t\t\t\t .setStrokeStyle(drawStrokeStyle)\n\t\t\t\t\t .moveTo(stage.mouseX, stage.mouseY);\n\t\t\t\t\t \n\tfor(var n=0;n<gameData.runway.length;n++){\n\t\tif(levels_arr[gameData.levelNum].runway[n].planes.indexOf(gameData.targetPlane.planeType) != -1){\n\t\t\tvar guideAnimate = gameData.runway[n].guideAnimate;\n\t\t\tguideAnimate.alpha = 1;\n\t\t}\n\t}\n}", "function set_path(){\n path_line.setMap(map);\n}", "function stroke(ctx)\n\n\n\n\n{var _ref2 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},_ref2$w = _ref2.w1,w1 = _ref2$w === undefined ? 10 : _ref2$w,_ref2$w2 = _ref2.w2,w2 = _ref2$w2 === undefined ? 2 : _ref2$w2,_ref2$c = _ref2.c1,c1 = _ref2$c === undefined ? 'rgba(' + COLOR + ', 0.5)' : _ref2$c,_ref2$c2 = _ref2.c2,c2 = _ref2$c2 === undefined ? 'rgb(' + COLOR + ')' : _ref2$c2;\n\tctx.lineWidth = w1;\n\tctx.strokeStyle = c1;\n\tctx.stroke();\n\tctx.lineWidth = w2;\n\tctx.strokeStyle = c2;\n\tctx.stroke();\n}", "function addStrokes(point, delta) {\n var step = delta.rotate(90);\n var strokePoints = strokeEnds;\n point -= step / 2;\n step /= strokePoints - 1;\n for(var i = 0; i < strokePoints; i++) {\n var strokePoint = point + step * i;\n var offset = delta * (Math.random() * 0.3 + 0.1);\n if(i % 2) {\n offset *= -1;\n }\n strokePoint += offset;\n path.insert(0, strokePoint);\n }\n}", "function ShapePath() {\n\tthis.subPaths = [];\n\tthis.currentPath = null;\n}", "function ShapePath() {\n\tthis.subPaths = [];\n\tthis.currentPath = null;\n}", "function ShapePath() {\n\tthis.subPaths = [];\n\tthis.currentPath = null;\n}", "function resizePath(d) {\n var e = +(d == \"e\"),\n x = e ? 1 : -1,\n y = height / 3;\n return \"M\" + (.5 * x) + \",\" + y +\n \"A6,6 0 0 \" + e + \" \" + (6.5 * x) + \",\" + (y + 6) +\n \"V\" + (2 * y - 6) +\n \"A6,6 0 0 \" + e + \" \" + (.5 * x) + \",\" + (2 * y) +\n \"Z\" +\n \"M\" + (2.5 * x) + \",\" + (y + 8) +\n \"V\" + (2 * y - 8) +\n \"M\" + (4.5 * x) + \",\" + (y + 8) +\n \"V\" + (2 * y - 8);\n }", "function drawPath(percent) {\n\t\t// determines how much of the path is shown\n\t\tpercentLength = pathLength * percent;\n\n\t\t// modify offset to show percentage of path completed\n\t\tpath.style.strokeDashoffset = pathLength - percentLength;\n\t}", "drawStroke() {\n strokeWeight(TILE_STROKE);\n stroke(0);\n rectMode(CORNER);\n rect(this.x * TILE_SIZE, this.y * TILE_SIZE, TILE_SIZE, TILE_SIZE);\n }", "function drawLine(pathToDraw,delay,duration,easing){\n var path = document.querySelector(pathToDraw);\n var length = path.getTotalLength();\n path.style.transition = path.style.WebkitTransition = \"none\";\n path.style.strokeDasharray = length + \" \" + length;\n path.style.strokeDashoffset = length;\n path.getBoundingClientRect();\n path.style.transition = path.style.WebkitTransition = \"stroke-dashoffset \" + duration + \"s \" + easing;\n setTimeout(function(){\n path.style.strokeDashoffset = \"0\";\n },delay);\n\n }", "function strokeObj(pName, strokeWt) {\r\tthis.pName = pName;\r\tthis.strokeWt = strokeWt;\r}", "function traceStrokeNext() {\n if (currentTraceChild >= traceChildrenMax) {\n return false;\n }\n\n var cStip = settings.stipples[currentTraceChild];\n\n cStip.c = new Color(cStip.c);\n\n // Create each circle path\n var cPath = new Path({\n strokeColor: snapColor(cStip.c),\n strokeWidth: 2,\n fillColor: 'red',\n data: {\n color: snapColorID(cStip.c),\n name: 'stipple' + currentTraceChild,\n type: 'stroke'\n },\n // Approximate the circle with the four cardinal points.\n segments: [\n [cStip.x, cStip.y - cStip.r], // N\n [cStip.x + cStip.r, cStip.y], // E\n [cStip.x, cStip.y + cStip.r], // S\n [cStip.x - cStip.r, cStip.y], // W\n [cStip.x, cStip.y - cStip.r] // N (back home)\n ]\n });\n\n // Ignore white paths (color id 8)\n // TODO: This should probably be handled depending on number of colors in the\n // media (you can have more pens than 8), paper color might not be white.\n if (cPath.data.color === 'color8') {\n cPath.remove(); return true;\n }\n\n mode.run('status', i18n.t('libs.spool.stroke', {id: (currentTraceChild+1) + '/' + traceChildrenMax}), true);\n mode.run('progress', currentTraceChild);\n\n currentTraceChild++;\n\n return true;\n }", "function ShapePath() {\n\t \tthis.subPaths = [];\n\t \tthis.currentPath = null;\n\t }", "function drawPath(context, posY, posX, destX, destY) {\n\tcontext.save();\n\tcontext.beginPath();\n\tcontext.moveTo(posY, posX);\n\tcontext.lineTo(destX, destY);\n\tcontext.strokeStyle = \"000000\";\n\tcontext.stroke();\n\tcontext.restore();\n}", "function resizePath(d) {\n var e = +(d == 'e'),\n x = e ? 1 : -1,\n y = heightContext / 3;\n return 'M' + (0.5 * x) + ',' + y + 'A6,6 0 0 ' + e + ' ' + (6.5 * x) + ',' + (y + 6) + 'V' + (2 * y - 6) + 'A6,6 0 0 ' + e + ' ' + (0.5 * x) + ',' + (2 * y) + 'Z' + 'M' + (2.5 * x) + ',' + (y + 8) + 'V' + (2 * y - 8) + 'M' + (4.5 * x) + ',' + (y + 8) + 'V' + (2 * y - 8);\n }", "function drawSecondPath(ax, bx, cx, dx, ay, by, cy, dy, t, extraPathNumber, i){\n ctx.lineWidth = Math.random()*.5+1;\n if(t<0.5){\n ctx.strokeStyle = 'rgba('+(randomGrey+200)+', '+(randomGrey+200)+', '+(randomGrey+200)+', '+(0)+')';\n }\n else{\n ctx.strokeStyle = 'rgba('+(randomGrey+100)+', '+(randomGrey+100)+', '+(randomGrey+200)+', '+(Math.random())+')';\n }\n ctx.beginPath();\n ctx.moveTo(\n ax * Math.pow(t, 3) + bx * Math.pow(t, 2) + cx * t + dx + extraPathNumber,\n ay * Math.pow(t, 3) + by * Math.pow(t, 2) + cy * t + dy+ extraPathNumber\n );\n ctx.lineTo(\n ax * Math.pow(t + 0.1, 3) + bx * Math.pow(t + 0.1, 2) + cx * (t + 0.1) + dx + extraPathNumber,\n ay * Math.pow(t + 0.1, 3) + by * Math.pow(t + 0.1, 2) + cy * (t + 0.1) + dy + extraPathNumber\n );\n //ctx.lineWidth = Math.random()*2+.5;\n // ctx.strokeStyle = 'rgb(0, 0, 0)';\n ctx.stroke();\n}", "function draw() {\n const pathColor = (getComputedStyle(document.documentElement).getPropertyValue('--path') || '#ffffff').trim();\n\n const ctx = canvas.getContext(\"2d\");\n ctx.clearRect(0, 0, canvas.width, canvas.height);\n\n const pathTransform = new DOMMatrix().scale(scaleFactor).multiply(transformFromMeter).multiplySelf(accountForFlip);\n let first = true;\n ctx.beginPath();\n ctx.lineWidth = 1;\n ctx.strokeStyle = pathColor;\n for (const coord of path) {\n const [xMeter, yMeter] = coord;\n const { x, y } = new DOMPoint(xMeter, yMeter).matrixTransform(pathTransform);\n if (first) {\n ctx.moveTo(x, y);\n first = false;\n }\n else {\n ctx.lineTo(x, y);\n }\n }\n ctx.stroke();\n }", "function Stroke(opt) {\n if (!(this instanceof Stroke)) return new Stroke(opt);\n opt = opt || {};\n this.miterLimit = as_number__WEBPACK_IMPORTED_MODULE_0___default()(opt.miterLimit, 10);\n this.thickness = as_number__WEBPACK_IMPORTED_MODULE_0___default()(opt.thickness, 1);\n this.join = opt.join || 'miter';\n this.cap = opt.cap || 'butt';\n this.roundSegments = opt.roundSegments || 20;\n this._normal = null;\n this._lastFlip = -1;\n this._started = false;\n}", "function createFlightPath(polyline, colour) {\n var flightPath = new google.maps.Polyline({\n path: polyline,\n strokeColor: colour,\n strokeOpacity: 0.8,\n strokeWeight: 2\n });\n flightPath.setMap(osmMap);\n return flightPath;\n}", "function buildSVGPath(attrs, totalLength, length, spacing, offset, useDashCase) {\n if (spacing === void 0) { spacing = 1; }\n if (offset === void 0) { offset = 0; }\n if (useDashCase === void 0) { useDashCase = true; }\n // We use dash case when setting attributes directly to the DOM node and camel case\n // when defining props on a React component.\n var keys = useDashCase ? dashKeys : camelKeys;\n // Build the dash offset\n attrs[keys.offset] = progressToPixels(-offset, totalLength);\n // Build the dash array\n var pathLength = progressToPixels(length, totalLength);\n var pathSpacing = progressToPixels(spacing, totalLength);\n attrs[keys.array] = pathLength + \" \" + pathSpacing;\n}", "function buildSVGPath(attrs, totalLength, length, spacing, offset, useDashCase) {\n if (spacing === void 0) { spacing = 1; }\n if (offset === void 0) { offset = 0; }\n if (useDashCase === void 0) { useDashCase = true; }\n // We use dash case when setting attributes directly to the DOM node and camel case\n // when defining props on a React component.\n var keys = useDashCase ? dashKeys : camelKeys;\n // Build the dash offset\n attrs[keys.offset] = progressToPixels(-offset, totalLength);\n // Build the dash array\n var pathLength = progressToPixels(length, totalLength);\n var pathSpacing = progressToPixels(spacing, totalLength);\n attrs[keys.array] = pathLength + \" \" + pathSpacing;\n}", "function buildSVGPath(attrs, totalLength, length, spacing, offset, useDashCase) {\n if (spacing === void 0) { spacing = 1; }\n if (offset === void 0) { offset = 0; }\n if (useDashCase === void 0) { useDashCase = true; }\n // We use dash case when setting attributes directly to the DOM node and camel case\n // when defining props on a React component.\n var keys = useDashCase ? dashKeys : camelKeys;\n // Build the dash offset\n attrs[keys.offset] = progressToPixels(-offset, totalLength);\n // Build the dash array\n var pathLength = progressToPixels(length, totalLength);\n var pathSpacing = progressToPixels(spacing, totalLength);\n attrs[keys.array] = pathLength + \" \" + pathSpacing;\n}", "function buildSVGPath(attrs, totalLength, length, spacing, offset, useDashCase) {\n if (spacing === void 0) { spacing = 1; }\n if (offset === void 0) { offset = 0; }\n if (useDashCase === void 0) { useDashCase = true; }\n // We use dash case when setting attributes directly to the DOM node and camel case\n // when defining props on a React component.\n var keys = useDashCase ? dashKeys : camelKeys;\n // Build the dash offset\n attrs[keys.offset] = progressToPixels(-offset, totalLength);\n // Build the dash array\n var pathLength = progressToPixels(length, totalLength);\n var pathSpacing = progressToPixels(spacing, totalLength);\n attrs[keys.array] = pathLength + \" \" + pathSpacing;\n}", "function getCircletoPath(x , y, r) { \n\treturn \"M\"+ x + \",\" + (y - r) + \"A\" + r + \",\" + r + \",0,1,1,\" + (x - 0.1) + \",\" + (y - r) +\" z\"; \n}", "function ShapePath() {\n\t\tthis.subPaths = [];\n\t\tthis.currentPath = null;\n\t}", "function guideLine(){\n ctx.beginPath();\n ctx.moveTo(300, 300);\n ctx.lineTo(0, 300);\n ctx.lineTo(200, 200);\n ctx.closePath();\n ctx.fillStyle = \"gold\";\n ctx.fill();\n}", "function gotSketch(error, s) {\n if (error) {\n console.error(error);\n } else {\n strokePath = s;\n }\n}", "function ShapePath() {\n\t\t\tthis.subPaths = [];\n\t\t\tthis.currentPath = null;\n\t\t}", "setStrokeStyle(strokeStyle) {\n this.strokeStyle = strokeStyle\n }", "function Pencil() {\n context.lineWidth = brushSizePaintDefault\n context.lineJoin = 'round'\n context.lineCap = 'round'\n context.strokeStyle = colorPaint\n context.stroke()\n}", "function drawPath(targetArray){\n var posiSet=new Array(); //To Store all recorded position\n var mac=targetArray[0].mac;\n // put points to array\n for(var i=0;i<targetArray.length;i++){\n\t \n var posi={\n \"lat\":parseFloat(targetArray[i].lat),\n \"lng\":parseFloat(targetArray[i].long)\n };\n posiSet.push(posi);\n\t\n var date = new Date(parseInt(targetArray[i].ts)*1000); \n\t\n var time=date.getFullYear()+\"-\"+(date.getMonth()+1)+\"-\"+date.getDate()+\" \"+date.getHours()+\":\"+date.getMinutes()+\":\"+date.getSeconds();\n\t\n\t//show all position with a cross\n reporter_record.push(\n new google.maps.Marker({\n position:posi,\n icon:\"wrong.png\" , \n title: mac+\" \"+time,\n map: map\n \n })\n );\n\t//Draw a set of line\n reporter_path.push(new google.maps.Polyline({\n path: posiSet,\n geodesic: true,\n strokeColor: '#FF0000',\n strokeOpacity: 1.0,\n strokeWeight: 2,\n map:map\n }));\n \n \n }\n}", "function resizePath(d) {\n var e = +(d == 'e'),\n x = e ? 1 : -1,\n y = _contextChartHeight / 3;\n return 'M' + (.5 * x) + ',' + y\n + 'A6,6 0 0 ' + e + ' ' + (6.5 * x) + ',' + (y + 6)\n + 'V' + (2 * y - 6)\n + 'A6,6 0 0 ' + e + ' ' + (.5 * x) + ',' + (2 * y)\n + 'Z'\n + 'M' + (2.5 * x) + ',' + (y + 8)\n + 'V' + (2 * y - 8)\n + 'M' + (4.5 * x) + ',' + (y + 8)\n + 'V' + (2 * y - 8);\n }", "_getLinePath() {\n const graph = this.graph;\n const width = graph.getWidth();\n const height = graph.getHeight();\n const tl = graph.getPoint({\n x: 0,\n y: 0\n });\n const br = graph.getPoint({\n x: width,\n y: height\n });\n const cell = this.cell;\n const flooX = Math.ceil(tl.x / cell) * cell;\n const flooY = Math.ceil(tl.y / cell) * cell;\n const path = [];\n for (let i = 0; i <= br.x - tl.x; i += cell) {\n const x = flooX + i;\n path.push([ 'M', x, tl.y ]);\n path.push([ 'L', x, br.y ]);\n }\n for (let j = 0; j <= br.y - tl.y; j += cell) {\n const y = flooY + j;\n path.push([ 'M', tl.x, y ]);\n path.push([ 'L', br.x, y ]);\n }\n return path;\n }", "function drawPaths( obj, moveTO, midPoint, lineTO, isDashed, strokeColor, lineWidth, arrowDir, middleArrowHeadReq) {\n\t\tvar headlen = 10;\t// length of head in pixels\n\t\tobj.paint= function(_director, time) {\t\n\t\t\tvar dx = lineTO.x - moveTO.x;\n\t\t\tvar dy = lineTO.y - moveTO.y;\n\t\t\tif(dx == 0 && dy == 0) return;\n\t\t\tvar angle = Math.atan2(dy,dx);\n\t\t\tvar canvas = _director.ctx;\n\t\t\tcanvas.strokeStyle = strokeColor;\n\t\t\tcanvas.fillStyle = strokeColor;\n\t\t\tcanvas.lineWidth = lineWidth;\n\t\t\tcanvas.beginPath();\n\t\t\tif(arrowDir == 'leftArrowHead') {\n\t\t\t\tcanvas.moveTo( moveTO.x, moveTO.y);\t\t\t\n\t\t\t\tcanvas.lineTo( moveTO.x + headlen * Math.cos(angle-Math.PI/8), moveTO.y + headlen*Math.sin(angle-Math.PI/8));\n\t\t\t\tcanvas.lineTo( moveTO.x + headlen * Math.cos(angle+Math.PI/8), moveTO.y + headlen*Math.sin(angle+Math.PI/8));\n\t\t\t\tcanvas.fill();\n\t\t\t} else if(arrowDir == 'rightArrowHead'){\n\t\t\t\tcanvas.moveTo( lineTO.x, lineTO.y);\n\t\t\t\tcanvas.lineTo( lineTO.x - headlen * Math.cos(angle-Math.PI/8), lineTO.y - headlen*Math.sin(angle-Math.PI/8));\n\t\t\t\tcanvas.lineTo( lineTO.x - headlen * Math.cos(angle+Math.PI/8), lineTO.y - headlen*Math.sin(angle+Math.PI/8));\n\t\t\t\tcanvas.fill();\n\t\t\t}\t\t\n\t\t\tif(middleArrowHeadReq) {\n\t\t\t\tvar dx = midPoint.x - moveTO.x;\n\t\t\t\tvar dy = midPoint.y - moveTO.y;\n\t\t\t\tvar angle = Math.atan2(dy,dx);\n\t\t\t\tcanvas.fillStyle = strokeColor;\n\t\t\t\tcanvas.moveTo( (midPoint.x - 5), midPoint.y);\n\t\t\t\tcanvas.lineTo( (midPoint.x - 5) - headlen * Math.cos(angle-Math.PI/10), midPoint.y - headlen*Math.sin(angle-Math.PI/10));\n\t\t\t\tcanvas.lineTo( (midPoint.x - 5) - headlen * Math.cos(angle+Math.PI/10), midPoint.y - headlen*Math.sin(angle+Math.PI/10));\n\t\t\t\tcanvas.fill();\n\t\t\t}\n\t\t\t\n\t\t\tcanvas.moveTo(moveTO.x, moveTO.y);\n\t\t\tcanvas.lineTo(lineTO.x, lineTO.y);\n\t\t\n\t\t\t//canvas.lineJoin = 'round';\n\t\t\t//canvas.lineCap = 'round';\n\t\t\t//canvas.closePath();\t\n\t\t\tcanvas.stroke();\t\n\t\t};\t\n\t}", "function beginPath() {\n this._.beginPath();\n setcurrent(this, undefined, undefined);\n this.startSubpathX = this.startSubpathY = undefined;\n this._pathIsEmpty = true;\n return this;\n }", "function drawLine(P1, P2) {\n var line = doc.pathItems.add()\n line.stroked = true;\n line.strokeColor = hexToRGB(\"#00FFFF\");\n line.strokeWidth = 0.5;\n line.setEntirePath([P1, P2]);\n}", "function resizePath(d) {\n var e = +(d == 'e'),\n x = e ? 1 : -1,\n y = availableHeight2 / 3;\n return 'M' + (.5 * x) + ',' + y\n + 'A6,6 0 0 ' + e + ' ' + (6.5 * x) + ',' + (y + 6)\n + 'V' + (2 * y - 6)\n + 'A6,6 0 0 ' + e + ' ' + (.5 * x) + ',' + (2 * y)\n + 'Z'\n + 'M' + (2.5 * x) + ',' + (y + 8)\n + 'V' + (2 * y - 8)\n + 'M' + (4.5 * x) + ',' + (y + 8)\n + 'V' + (2 * y - 8);\n }", "function resizePath(d) {\n var e = +(d == 'e'),\n x = e ? 1 : -1,\n y = availableHeight2 / 3;\n return 'M' + (.5 * x) + ',' + y\n + 'A6,6 0 0 ' + e + ' ' + (6.5 * x) + ',' + (y + 6)\n + 'V' + (2 * y - 6)\n + 'A6,6 0 0 ' + e + ' ' + (.5 * x) + ',' + (2 * y)\n + 'Z'\n + 'M' + (2.5 * x) + ',' + (y + 8)\n + 'V' + (2 * y - 8)\n + 'M' + (4.5 * x) + ',' + (y + 8)\n + 'V' + (2 * y - 8);\n }", "function resizePath(d) {\n var e = +(d == 'e'),\n x = e ? 1 : -1,\n y = availableHeight2 / 3;\n return 'M' + (.5 * x) + ',' + y\n + 'A6,6 0 0 ' + e + ' ' + (6.5 * x) + ',' + (y + 6)\n + 'V' + (2 * y - 6)\n + 'A6,6 0 0 ' + e + ' ' + (.5 * x) + ',' + (2 * y)\n + 'Z'\n + 'M' + (2.5 * x) + ',' + (y + 8)\n + 'V' + (2 * y - 8)\n + 'M' + (4.5 * x) + ',' + (y + 8)\n + 'V' + (2 * y - 8);\n }", "function resizePath(d) {\n var e = +(d == 'e'),\n x = e ? 1 : -1,\n y = availableHeight2 / 3;\n return 'M' + (.5 * x) + ',' + y\n + 'A6,6 0 0 ' + e + ' ' + (6.5 * x) + ',' + (y + 6)\n + 'V' + (2 * y - 6)\n + 'A6,6 0 0 ' + e + ' ' + (.5 * x) + ',' + (2 * y)\n + 'Z'\n + 'M' + (2.5 * x) + ',' + (y + 8)\n + 'V' + (2 * y - 8)\n + 'M' + (4.5 * x) + ',' + (y + 8)\n + 'V' + (2 * y - 8);\n }", "function drawPath() {\n //path 1\n ctx.beginPath();\n ctx.rect(0, 80, 650, 50);\n ctx.fillStyle = \"gray\";\n ctx.fill();\n ctx.closePath();\n\n ctx.beginPath();\n ctx.rect(0, 77, 700, 3);\n ctx.fillStyle = \"black\";\n ctx.fill();\n ctx.closePath();\n\n ctx.beginPath();\n ctx.rect(0, 130, 650, 3);\n ctx.fillStyle = \"black\";\n ctx.fill();\n ctx.closePath();\n\n //path 2\n ctx.beginPath();\n ctx.rect(650, 80, 50, 120);\n ctx.fillStyle = \"gray\";\n ctx.fill();\n ctx.closePath();\n\n ctx.beginPath();\n ctx.rect(647, 130, 3, 70);\n ctx.fillStyle = \"black\";\n ctx.fill();\n ctx.closePath();\n\n ctx.beginPath();\n ctx.rect(700, 77, 3, 174);\n ctx.fillStyle = \"black\";\n ctx.fill();\n ctx.closePath();\n //path 3\n ctx.beginPath();\n ctx.rect(100, 200, 600, 50);\n ctx.fillStyle = \"gray\";\n ctx.fill();\n ctx.closePath();\n\n ctx.beginPath();\n ctx.rect(100, 197, 550, 3);\n ctx.fillStyle = \"black\";\n ctx.fill();\n ctx.closePath();\n\n ctx.beginPath();\n ctx.rect(150, 250, 553, 3);\n ctx.fillStyle = \"black\";\n ctx.fill();\n ctx.closePath();\n\n //path 4\n ctx.beginPath();\n ctx.rect(100, 200, 50, 200);\n ctx.fillStyle = \"gray\";\n ctx.fill();\n ctx.closePath();\n\n ctx.beginPath();\n ctx.rect(97, 197, 3, 255);\n ctx.fillStyle = \"black\";\n ctx.fill();\n ctx.closePath();\n\n ctx.beginPath();\n ctx.rect(150, 250, 3, 150);\n ctx.fillStyle = \"black\";\n ctx.fill();\n ctx.closePath();\n\n //path 5\n ctx.beginPath();\n ctx.rect(100, 400, 600, 50);\n ctx.fillStyle = \"gray\";\n ctx.fill();\n ctx.closePath();\n\n ctx.beginPath();\n ctx.rect(97, 450, 553, 3);\n ctx.fillStyle = \"black\";\n ctx.fill();\n ctx.closePath();\n\n ctx.beginPath();\n ctx.rect(150, 398, 550, 3);\n ctx.fillStyle = \"black\";\n ctx.fill();\n ctx.closePath();\n\n //path 6\n ctx.beginPath();\n ctx.rect(650, 450, 50, 160);\n ctx.fillStyle = \"gray\";\n ctx.fill();\n ctx.closePath();\n\n ctx.beginPath();\n ctx.rect(647, 450, 3, 160);\n ctx.fillStyle = \"black\";\n ctx.fill();\n ctx.closePath();\n\n ctx.beginPath();\n ctx.rect(700, 398, 3, 220);\n ctx.fillStyle = \"black\";\n ctx.fill();\n ctx.closePath();\n\n}", "stroke(left, top, right, bottom, strokeColor = '#000000', lineWidth = 1) {\n ctx.strokeStyle = strokeColor;\n ctx.lineWidth = lineWidth;\n\n ctx.beginPath();\n ctx.moveTo(left, top);\n ctx.lineTo(right, top);\n ctx.lineTo(right, bottom);\n ctx.lineTo(left, bottom);\n ctx.closePath();\n ctx.stroke();\n }", "function Path(oa){\n\t\t// debug('\\n PATH - START');\n\t\toa = oa || {};\n\t\tthis.objtype = 'path';\n\n\t\t// declare attributes\n\t\t// this.pathpoints = false;\n\t\tthis.pathpoints = [];\n\t\tif(oa.pathpoints && oa.pathpoints.length){\n\t\t\t//debug('NEW PATH : Hydrating Path Points, length ' + oa.pathpoints.length);\n\t\t\tfor (var i = 0; i < oa.pathpoints.length; i++) {\n\t\t\t\tthis.pathpoints[i] = new PathPoint(oa.pathpoints[i]);\n\t\t\t\tthis.pathpoints[i].parentpath = this;\n\t\t\t}\n\t\t}\n\n\t\tthis.winding = isval(oa.winding)? oa.winding : this.findWinding();\n\n\t\t// internal\n\t\tthis.maxes = oa.maxes || clone(_UI.mins);\n\n\t\t// cache\n\t\toa.cache = oa.cache || {};\n\t\tthis.cache = {};\n\t\tthis.cache.segments = oa.cache.segments || [];\n\t\tthis.cache.segmentlengths = oa.cache.segmentlengths || [];\n\n\t\t// Setup the object\n\t\tif(this.pathpoints && this.calcMaxes) this.calcMaxes();\n\n\t\t// debug(' PATH - END\\n');\n\t}", "function strokeContext() {\r\n\t\tcontext.lineWidth = lineWidth;\r\n\t\tcontext.strokeStyle = color;\r\n\t\tcontext.stroke();\r\n\t}", "function init_path(){\n path = [myCenter,loc2];\n path_line = new google.maps.Polyline({\n path: path,\n strokeColor: '#FF0000',\n strokeOpacity: 0.6,\n strokeWeight: 4\n });\n}", "function makePathMarker(path, color) {\n var material = new THREE.LineDashedMaterial(\n { color: color, linewidth: 3, dashSize: 2, gapSize: 1 });\n var geometry = new THREE.Geometry();\n path.forEach(function (step) {\n var point = step;\n geometry.vertices.push(\n new THREE.Vector3(point[0], point[1], point[2]-0.49)\n );\n });\n var line = new THREE.Line( geometry, material, THREE.LineStrip );\n return line;\n }", "start() {\n var path =\n 'M1 1C1 1 62.1562 56.1927 101.659 72.1468C141.162 88.1009 207 95 207 95'; // an SVG path\n\n\n // path.setAttribute('transform', 'translate(50,50)');\n var pathAnimator;\n var startFromPercent = 0; // start from 10% of the path\n var stopAtPercent = 90; // stop at 9 0% of the path (which will then call the onDone function callback)\n\n // initiate a new pathAnimator object\n pathAnimator = new PathAnimator(path, {\n duration: 5, // seconds that will take going through the whole path\n step: (point, angle) => {\n // do something every \"frame\" with: point.x, point.y & angle\n this.x = point.x;\n this.y = point.y;\n // ctx.clearRect(0, 0, canvas.width, canvas.height);\n this._draw();\n },\n easing: function (t) {\n return t * (2 - t);\n },\n onDone: finish(this),\n });\n\n pathAnimator.start(startFromPercent, stopAtPercent);\n\n function finish() {\n // do something when animation is done\n }\n }", "function drawAllPaths() {\n var\n //strokeStyle = '#000',\n startCursor = { x: 0, y: 0 },\n lastCursor = { x: 0, y: 0 },\n cursor = { x: 0, y: 0 },\n path,\n i;\n\n for ( i = 0; i < paths.length; i++) {\n path = paths[ i ];\n\n if ( path.attrs.hasOwnProperty( 'd' ) && path.attrs.d ) {\n path.style.pathIdx = i;\n\n // used for debugging style parser\n //path.style.pathId = path.attrs.hasOwnProperty( 'id' ) ? path.attrs.id : 'noid';\n\n processTokens( splitTokens ( path.attrs.d ), path.style );\n //ctx.stroke();\n }\n }\n\n // Tidy whitespace in path.d attribute\n\n function splitTokens( pathStr ) {\n var\n specialChars = [ 'm', 'M', 'z', 'Z', 'h', 'H', 'v', 'V', 'l', 'L' ],\n tokens,\n j;\n\n // replace tabs and newlines with spaces\n pathStr = pathStr.replace( new RegExp( \"\\t\", 'g' ), ' ' ); // eslint-disable-line no-control-regex\n pathStr = pathStr.replace( new RegExp( \"\\n\", 'g' ), ' ' ); // eslint-disable-line no-control-regex\n pathStr = pathStr.replace( new RegExp( \"\\r\", 'g' ), ' ' ); // eslint-disable-line no-control-regex\n\n for ( j = 0; j < specialChars.length; j++ ) {\n // add space before special chars\n pathStr = pathStr.replace( new RegExp( specialChars[j], 'g' ), specialChars[j] + ' ' );\n // remove double space after special chars\n pathStr = pathStr.replace( new RegExp( specialChars[j] + ' ', 'g' ), specialChars[j] + ' ' );\n pathStr = pathStr.replace( new RegExp( specialChars[j] + ' ', 'g' ), specialChars[j] + ' ' );\n }\n\n tokens = pathStr.split( ' ' );\n\n tokens = tokens.filter( function tokenNotEmpty( token ) {\n return ( '' !== token );\n } );\n\n return tokens;\n }\n\n // Follow sequence of drawing operations defined in path.d attribute\n // see: https://developer.mozilla.org/en-US/docs/Web/SVG/Tutorial/Paths\n\n function processTokens( tokens, style ) {\n var\n drawOps = [],\n pathOpts = getPathOptions( style || {} ),\n absMode = true,\n currToken, nextToken,\n cnvSpace,\n temp,\n j;\n\n for ( j = 0; j < tokens.length; j++ ) {\n\n // get the current and next token, if any\n currToken = tokens[ j ];\n nextToken = ( j < ( tokens.length - 1 ) ) ? tokens[ j + 1 ] : '';\n\n // store cursor start position (of next line segment)\n lastCursor.x = cursor.x;\n lastCursor.y = cursor.y;\n\n switch( currToken ) {\n case 'm':\n absMode = false;\n temp = strToPoint( nextToken );\n\n cursor.x = 0;\n cursor.y = 0;\n\n cursor.x = cursor.x + temp.x;\n cursor.y = cursor.y + temp.y;\n startCursor.x = cursor.x;\n startCursor.y = cursor.y;\n\n cnvSpace = applyTransforms( cursor, path.transformSet, true );\n drawOps.push( { 'op': 'moveTo', 'x': cnvSpace.x, 'y': cnvSpace.y } );\n\n j = j + 1; // has one argument\n break;\n\n case 'M':\n absMode = true;\n cursor = strToPoint( nextToken );\n startCursor.x = cursor.x;\n startCursor.y = cursor.y;\n\n cnvSpace = applyTransforms( cursor, path.transformSet, true );\n drawOps.push( { 'op': 'moveTo', 'x': cnvSpace.x, 'y': cnvSpace.y } );\n\n j = j + 1; // has one argument\n break;\n\n case 'v':\n absMode = false;\n // vertical line on canvas, convert absolute to relative offset\n temp = parseFloat( nextToken ); // dY\n cursor.y = cursor.y + temp;\n\n cnvSpace = applyTransforms( cursor, path.transformSet, true );\n drawOps.push( { 'op': 'lineTo', 'x': cnvSpace.x, 'y': cnvSpace.y } );\n\n j = j + 1; // has one argument\n break;\n\n case 'V':\n absMode = true;\n // vertical line on canvas to absolute Y position\n temp = parseFloat( nextToken ); // abs Y\n\n cursor.y = temp;\n\n cnvSpace = applyTransforms( cursor, path.transformSet, true );\n drawOps.push( { 'op': 'lineTo', 'x': cnvSpace.x, 'y': cnvSpace.y } );\n\n j = j + 1; // has one argument\n break;\n\n case 'h':\n absMode = false;\n // horizontal draw on canvas to relative X position\n temp = parseFloat( nextToken ); // dX\n cursor.x = cursor.x + temp;\n\n cnvSpace = applyTransforms( cursor, path.transformSet, true );\n drawOps.push( { 'op': 'lineTo', 'x': cnvSpace.x, 'y': cnvSpace.y } );\n\n j = j + 1; // has one argument\n break;\n\n case 'H':\n absMode = true;\n // horizontal draw on canvas to absolute X position\n temp = parseFloat( nextToken ); // abs X\n cursor.x = temp;\n\n cnvSpace = applyTransforms( cursor, path.transformSet, true );\n drawOps.push( { 'op': 'lineTo', 'x': cnvSpace.x, 'y': cnvSpace.y } );\n\n j = j + 1; // has one argument\n break;\n\n case 'l':\n absMode = false;\n // lineTo on canvas to relative X,Y position\n temp = strToPoint( nextToken ); // dX,dY\n cursor.x = cursor.x + temp.x;\n cursor.y = cursor.y + temp.y;\n\n cnvSpace = applyTransforms( cursor, path.transformSet, true );\n\n //objPage.lineTo( cnvSpace.x, ( objPage.height() - cnvSpace.y ) );\n //objPage.moveTo( cnvSpace.x, ( objPage.height() - cnvSpace.y ) );\n\n drawOps.push( { 'op': 'lineTo', 'x': cnvSpace.x, 'y': cnvSpace.y } );\n\n j = j + 1; // has one argument\n break;\n\n case 'L':\n absMode = true;\n // lineTo on canvas to absolute X,Y position\n temp = strToPoint( nextToken ); // abs X,Y\n cursor.x = temp.x;\n cursor.y = temp.y;\n cnvSpace = applyTransforms( cursor, path.transformSet, true );\n //objPage.lineTo(cnvSpace.x, (objPage.height() - cnvSpace.y));\n //objPage.moveTo(cnvSpace.x, (objPage.height() - cnvSpace.y));\n\n drawOps.push( { 'op': 'lineTo', 'x': cnvSpace.x, 'y': cnvSpace.y } );\n\n absMode = true;\n j = j + 1; // has one argument\n break;\n\n case 'z':\n case 'Z':\n // close the path\n cnvSpace = applyTransforms( startCursor, path.transformSet, true );\n drawOps.push( { 'op': 'lineTo', 'x': cnvSpace.x, 'y': cnvSpace.y } );\n\n // draw the path\n if ( drawOps.length > 0 ) { traceOnCanvas( pathOpts, drawOps ); }\n drawOps = [];\n break;\n\n default:\n if ( -1 !== currToken.indexOf( ',' ) ) {\n\n // assume continuation of l or L, implicit next point on line\n temp = strToPoint( currToken );\n\n if ( absMode ) {\n cursor.x = temp.x; // follows L or M\n cursor.y = temp.y;\n } else {\n cursor.x = cursor.x + temp.x; // follows l or m\n cursor.y = cursor.y + temp.y;\n }\n\n cnvSpace = applyTransforms( cursor, path.transformSet, true );\n //ctx.lineTo( cnvSpace.x, cnvSpace.y );\n //objPage.lineTo(cnvSpace.x, (objPage.height() - cnvSpace.y));\n //objPage.moveTo(cnvSpace.x, (objPage.height() - cnvSpace.y));\n\n drawOps.push( { 'op': 'lineTo', 'x': cnvSpace.x, 'y': cnvSpace.y } );\n\n } else {\n Y.log( 'Unhandled SVG path token: ' + currToken + ' in ' + JSON.stringify( tokens ), 'warn', NAME );\n }\n\n break;\n\n }\n }\n\n // finalize any outstanding path (may be missing terminator)\n if ( drawOps.length > 0 ) { traceOnCanvas( pathOpts, drawOps ); }\n }\n\n function traceOnCanvas( pathOpts, drawOps ) {\n // SVG clipping path, nothing to draw\n if ( false === pathOpts.useFill && false === pathOpts.useStroke ) { return false; }\n let i;\n\n hpdf.page_SetLineWidth( pageHandle, pathOpts.strokeWidth );\n hpdf.page_SetRGBStroke( pageHandle, pathOpts.strokeColor[0], pathOpts.strokeColor[1], pathOpts.strokeColor[2] );\n hpdf.page_SetRGBFill( pageHandle, pathOpts.fillColor[0], pathOpts.fillColor[1], pathOpts.fillColor[2] );\n\n for ( i = 0; i < drawOps.length; i++ ) {\n switch( drawOps[i].op ) {\n case 'moveTo': hpdf.page_MoveTo( pageHandle, drawOps[i].x, drawOps[i].y ); break;\n case 'lineTo': hpdf.page_LineTo( pageHandle, drawOps[i].x, drawOps[i].y ); break;\n }\n }\n\n if ( pathOpts.useFill && pathOpts.useStroke ) {\n hpdf.page_FillStroke( pageHandle );\n return;\n }\n if ( pathOpts.useFill ) {\n hpdf.page_Fill( pageHandle );\n return;\n }\n if ( pathOpts.useStroke ) {\n hpdf.page_Stroke( pageHandle );\n }\n }\n\n }", "function resizePath(d) {\n\t var e = +(d == 'e'),\n\t x = e ? 1 : -1,\n\t y = availableHeight2 / 3;\n\t return 'M' + (.5 * x) + ',' + y\n\t + 'A6,6 0 0 ' + e + ' ' + (6.5 * x) + ',' + (y + 6)\n\t + 'V' + (2 * y - 6)\n\t + 'A6,6 0 0 ' + e + ' ' + (.5 * x) + ',' + (2 * y)\n\t + 'Z'\n\t + 'M' + (2.5 * x) + ',' + (y + 8)\n\t + 'V' + (2 * y - 8)\n\t + 'M' + (4.5 * x) + ',' + (y + 8)\n\t + 'V' + (2 * y - 8);\n\t }", "function drawPath(lat1, lng1, lat2, lng2) {\n var coords = [\n {lat: lat1, lng: lng1},\n {lat: lat2, lng: lng2}\n ];\n var path = new google.maps.Polyline({\n path: coords,\n geodesic: true,\n strokeColor: '#FF0000',\n strokeOpacity: 1.0,\n strokeWeight: 2\n });\n\n path.setMap(map);\n\n}", "function resizePath(d) {\n var e = +(d == 'e'),\n x = e ? 1 : -1,\n y = availableHeight / 3;\n return 'M' + (0.5 * x) + ',' + y\n + 'A6,6 0 0 ' + e + ' ' + (6.5 * x) + ',' + (y + 6)\n + 'V' + (2 * y - 6)\n + 'A6,6 0 0 ' + e + ' ' + (0.5 * x) + ',' + (2 * y)\n + 'Z'\n + 'M' + (2.5 * x) + ',' + (y + 8)\n + 'V' + (2 * y - 8)\n + 'M' + (4.5 * x) + ',' + (y + 8)\n + 'V' + (2 * y - 8);\n }", "function resizePath(d) {\n var e = +(d == 'e'),\n x = e ? 1 : -1,\n y = availableHeight / 3;\n return 'M' + (0.5 * x) + ',' + y\n + 'A6,6 0 0 ' + e + ' ' + (6.5 * x) + ',' + (y + 6)\n + 'V' + (2 * y - 6)\n + 'A6,6 0 0 ' + e + ' ' + (0.5 * x) + ',' + (2 * y)\n + 'Z'\n + 'M' + (2.5 * x) + ',' + (y + 8)\n + 'V' + (2 * y - 8)\n + 'M' + (4.5 * x) + ',' + (y + 8)\n + 'V' + (2 * y - 8);\n }", "function resizePath(d) {\n var e = +(d == 'e'),\n x = e ? 1 : -1,\n y = availableHeight / 3;\n return 'M' + (0.5 * x) + ',' + y\n + 'A6,6 0 0 ' + e + ' ' + (6.5 * x) + ',' + (y + 6)\n + 'V' + (2 * y - 6)\n + 'A6,6 0 0 ' + e + ' ' + (0.5 * x) + ',' + (2 * y)\n + 'Z'\n + 'M' + (2.5 * x) + ',' + (y + 8)\n + 'V' + (2 * y - 8)\n + 'M' + (4.5 * x) + ',' + (y + 8)\n + 'V' + (2 * y - 8);\n }", "function resizePath(d) {\n var e = +(d == 'e'),\n x = e ? 1 : -1,\n y = availableHeight / 3;\n return 'M' + (0.5 * x) + ',' + y\n + 'A6,6 0 0 ' + e + ' ' + (6.5 * x) + ',' + (y + 6)\n + 'V' + (2 * y - 6)\n + 'A6,6 0 0 ' + e + ' ' + (0.5 * x) + ',' + (2 * y)\n + 'Z'\n + 'M' + (2.5 * x) + ',' + (y + 8)\n + 'V' + (2 * y - 8)\n + 'M' + (4.5 * x) + ',' + (y + 8)\n + 'V' + (2 * y - 8);\n }", "_drawLine(points, group) {\n const self = this;\n const path = self._getPath(points);\n const line = self.line;\n group.addShape('path', {\n attrs: assign({\n path\n }, line)\n });\n }", "function jitterPath(path){\r\n\tvar newpath = new Path();\r\n\tvar i = 0;\r\n\twhile(i<path.length){\r\n\t\tvar p = path.getPointAt(i);\r\n\t\tvar n = path.getNormalAt(i);\r\n\t\tnewpath.add(p.subtract(n.multiply(state.getNextInt(0,10))));\r\n\t\ti += state.getNextInt(8,15);\r\n\t}\r\n\tnewpath.closed = path.closed;\r\n\treturn newpath;\r\n}" ]
[ "0.74088687", "0.74088687", "0.7278033", "0.7278033", "0.71236324", "0.7081871", "0.70170736", "0.69458985", "0.69254935", "0.68063253", "0.67537135", "0.67491984", "0.67159027", "0.6600593", "0.65062577", "0.6415569", "0.63889766", "0.62738794", "0.627145", "0.62379456", "0.6224867", "0.61821777", "0.61627644", "0.61435014", "0.61298114", "0.6122932", "0.6114801", "0.6082875", "0.6074127", "0.6070447", "0.6067968", "0.6040796", "0.60125136", "0.60072196", "0.59962714", "0.5994014", "0.59903216", "0.5984956", "0.5980299", "0.5979798", "0.5967516", "0.59649396", "0.5953867", "0.59318495", "0.59307593", "0.5929312", "0.5925594", "0.59146154", "0.59146154", "0.59146154", "0.5912318", "0.59122264", "0.5909027", "0.59027624", "0.5898317", "0.5890516", "0.58892655", "0.58874667", "0.5886468", "0.58830005", "0.58759123", "0.58724225", "0.5869476", "0.5868922", "0.5868922", "0.5868922", "0.5868922", "0.586861", "0.58675754", "0.58668065", "0.5850103", "0.5841727", "0.58416647", "0.5839939", "0.58266705", "0.5813207", "0.5812633", "0.58037424", "0.5784807", "0.57826394", "0.57780135", "0.57780135", "0.57780135", "0.57780135", "0.5775978", "0.57759607", "0.57739276", "0.5772649", "0.57641345", "0.5758594", "0.5756916", "0.5748755", "0.57481194", "0.5747203", "0.574422", "0.574422", "0.574422", "0.574422", "0.5743277", "0.5742988" ]
0.75928533
0
Stash the old values for transition.
function stash(d) { d.x0 = d.x; d.dx0 = d.dx; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "undo(){\n let state = this.getState();\n for(let key in state) this[key] = state[key];\n }", "restoreOriginalState() {\n\n\t\tconst originalValueOffset = this.valueSize * 3;\n\t\tthis.binding.setValue( this.buffer, originalValueOffset );\n\n\t}", "_revertToOriginal() {\n this._storage = {}\n this._length = 0\n this._head = 0\n }", "saveOriginalState() {\n\n\t\tconst binding = this.binding;\n\n\t\tconst buffer = this.buffer,\n\t\t\tstride = this.valueSize,\n\n\t\t\toriginalValueOffset = stride * this._origIndex;\n\n\t\tbinding.getValue( buffer, originalValueOffset );\n\n\t\t// accu[0..1] := orig -- initially detect changes against the original\n\t\tfor ( let i = stride, e = originalValueOffset; i !== e; ++ i ) {\n\n\t\t\tbuffer[ i ] = buffer[ originalValueOffset + ( i % stride ) ];\n\n\t\t}\n\n\t\t// Add to identity for additive\n\t\tthis._setIdentity();\n\n\t\tthis.cumulativeWeight = 0;\n\t\tthis.cumulativeWeightAdditive = 0;\n\n\t}", "reset() {\r\n this.historyStates.push(this.currentState);\r\n this.currentState = this.historyStates[0];\r\n }", "function clearValues() {\n arrTurnBack = [];\n arrValues = [];\n }", "function undo() {\n circles.value = clone(history[--index.value]);\n }", "backupValue() {\n this.originalValue = this.textInputNode.value;\n }", "update() {\n this.actionHistory = [];\n this.stateHistory = [];\n this.rewardHistory = [];\n }", "removeArchivedValues () {\n try {\n this.state.removeArchivedValues();\n this.emit('state changed', this.state, this.state);\n } catch (err) {\n this.emit('state change failed', err);\n throw err;\n }\n }", "rollback () {\n this.staged = this.cached\n }", "clearSpread() {\n this.spread = [];\n }", "function saveOldData() {\n oldData = newData;\n newData = null\n} // saveOldData", "revertLastState() {\n // Make sure there is a history of state changes\n if (this._history.length > 0) {\n // Pop off the last state preserved in the history and set the current state equal to that\n this._state = this._history.pop();\n }\n // Since the state has changed, we have to emit those changes\n this._emitChange();\n }", "restoreValue() {\n this.textInputNode.value = this.originalValue;\n }", "reset() {\n this._objInfo.forEach(info => {\n info.obj.position.copy(info.pos);\n info.obj.up.copy(info.up);\n\n this._checkChange(info);\n info.last.pos.copy(info.pos);\n });\n }", "function SWAP(state) {\n var stack = state.stack;\n\n var a = stack.pop();\n var b = stack.pop();\n\n if (exports.DEBUG) {\n console.log(state.step, 'SWAP[]');\n }\n\n stack.push(a);\n stack.push(b);\n }", "clearBeforeTransfer () {\n for (let key of this.keys) {\n this.delta[key] = 0\n }\n this.var.importIncidence = 0\n }", "_reset() {\n if (this.isDirty) {\n let record;\n for (record = this._previousItHead = this._itHead; record !== null; record = record._next) {\n record._nextPrevious = record._next;\n }\n for (record = this._additionsHead; record !== null; record = record._nextAdded) {\n record.previousIndex = record.currentIndex;\n }\n this._additionsHead = this._additionsTail = null;\n for (record = this._movesHead; record !== null; record = record._nextMoved) {\n record.previousIndex = record.currentIndex;\n }\n this._movesHead = this._movesTail = null;\n this._removalsHead = this._removalsTail = null;\n this._identityChangesHead = this._identityChangesTail = null;\n // TODO(vicb): when assert gets supported\n // assert(!this.isDirty);\n }\n }", "_reset() {\n if (this.isDirty) {\n let record;\n for (record = this._previousItHead = this._itHead; record !== null; record = record._next) {\n record._nextPrevious = record._next;\n }\n for (record = this._additionsHead; record !== null; record = record._nextAdded) {\n record.previousIndex = record.currentIndex;\n }\n this._additionsHead = this._additionsTail = null;\n for (record = this._movesHead; record !== null; record = record._nextMoved) {\n record.previousIndex = record.currentIndex;\n }\n this._movesHead = this._movesTail = null;\n this._removalsHead = this._removalsTail = null;\n this._identityChangesHead = this._identityChangesTail = null;\n // TODO(vicb): when assert gets supported\n // assert(!this.isDirty);\n }\n }", "_reset() {\n if (this.isDirty) {\n let record;\n for (record = this._previousItHead = this._itHead; record !== null; record = record._next) {\n record._nextPrevious = record._next;\n }\n for (record = this._additionsHead; record !== null; record = record._nextAdded) {\n record.previousIndex = record.currentIndex;\n }\n this._additionsHead = this._additionsTail = null;\n for (record = this._movesHead; record !== null; record = record._nextMoved) {\n record.previousIndex = record.currentIndex;\n }\n this._movesHead = this._movesTail = null;\n this._removalsHead = this._removalsTail = null;\n this._identityChangesHead = this._identityChangesTail = null;\n // TODO(vicb): when assert gets supported\n // assert(!this.isDirty);\n }\n }", "_reset() {\n if (this.isDirty) {\n let record;\n for (record = this._previousItHead = this._itHead; record !== null; record = record._next) {\n record._nextPrevious = record._next;\n }\n for (record = this._additionsHead; record !== null; record = record._nextAdded) {\n record.previousIndex = record.currentIndex;\n }\n this._additionsHead = this._additionsTail = null;\n for (record = this._movesHead; record !== null; record = record._nextMoved) {\n record.previousIndex = record.currentIndex;\n }\n this._movesHead = this._movesTail = null;\n this._removalsHead = this._removalsTail = null;\n this._identityChangesHead = this._identityChangesTail = null;\n // TODO(vicb): when assert gets supported\n // assert(!this.isDirty);\n }\n }", "_reset() {\n if (this.isDirty) {\n let record;\n for (record = this._previousItHead = this._itHead; record !== null; record = record._next) {\n record._nextPrevious = record._next;\n }\n for (record = this._additionsHead; record !== null; record = record._nextAdded) {\n record.previousIndex = record.currentIndex;\n }\n this._additionsHead = this._additionsTail = null;\n for (record = this._movesHead; record !== null; record = record._nextMoved) {\n record.previousIndex = record.currentIndex;\n }\n this._movesHead = this._movesTail = null;\n this._removalsHead = this._removalsTail = null;\n this._identityChangesHead = this._identityChangesTail = null;\n // TODO(vicb): when assert gets supported\n // assert(!this.isDirty);\n }\n }", "_reset() {\n if (this.isDirty) {\n let record;\n for (record = this._previousItHead = this._itHead; record !== null; record = record._next) {\n record._nextPrevious = record._next;\n }\n for (record = this._additionsHead; record !== null; record = record._nextAdded) {\n record.previousIndex = record.currentIndex;\n }\n this._additionsHead = this._additionsTail = null;\n for (record = this._movesHead; record !== null; record = record._nextMoved) {\n record.previousIndex = record.currentIndex;\n }\n this._movesHead = this._movesTail = null;\n this._removalsHead = this._removalsTail = null;\n this._identityChangesHead = this._identityChangesTail = null;\n // TODO(vicb): when assert gets supported\n // assert(!this.isDirty);\n }\n }", "Reset() {\n this.translation = this.originalTranslation.Clone();\n this.rotationInRadians = this.originalRotationInRadians;\n this.scale = this.originalScale.Clone();\n this.origin = this.originalOrigin.Clone();\n this.dimensions = this.originalDimensions.Clone();\n this.isDirty = true;\n }", "@action\n undo() {\n // Always have initial data snapshot\n if (this.snapshots.length < 2) {\n return null;\n }\n\n this.snapshots.shift();\n this.fields.replace(this.snapshots[0]);\n\n return true;\n }", "_updateCache(values) {\n let valueChanged = false;\n let oldValue; // = undefined\n\n const oldValues = this.stateStack.length > 0 && this.stateStack[this.stateStack.length - 1];\n\n for (const key in values) {\n assert(key !== undefined);\n // Check that value hasn't already been shadowed\n if (!deepEqual(values[key], this.cache[key])) {\n valueChanged = true;\n oldValue = this.cache[key];\n\n // First, save current value being shadowed\n // If a state stack frame is active, save the current parameter values for pop\n // but first check that value hasn't already been shadowed and saved\n if (oldValues && !(key in oldValues)) {\n oldValues[key] = this.cache[key];\n }\n\n // Save current value being shadowed\n this.cache[key] = values[key];\n }\n }\n\n return {valueChanged, oldValue};\n }", "restoreState() {\n const rawData = document.getElementById('rawState').value;\n localStorage.setItem('data', rawData);\n _.assign(this.$data, JSON.parse(rawData));\n this.updateNbAvailableFragsPerStage();\n }", "function storePreviousMeasurements(){\r\n previousMeasurements = airmeasurements.slice();\r\n}", "function stash(d) {\n d.x0 = d.x;\n d.dx0 = d.dx;\n }", "function stash(d) {\n d.x0 = d.x;\n d.dx0 = d.dx;\n }", "_transferState(oldLayer) {\n debug(TRACE_MATCHED, this, this === oldLayer);\n\n const {state, internalState} = oldLayer;\n\n if (this === oldLayer) {\n return;\n }\n\n // Move internalState\n this.internalState = internalState;\n this.internalState.layer = this;\n\n // Move state\n this.state = state;\n // We keep the state ref on old layers to support async actions\n // oldLayer.state = null;\n\n // Ensure any async props are updated\n this.internalState.setAsyncProps(this.props);\n\n this.diffProps(this.props, this.internalState.getOldProps());\n }", "set keepHistory(keepHistory) {\n const prevKeepHistory = this[KEEP_HISTORY];\n this[KEEP_HISTORY] = typeof keepHistory === 'number'\n && keepHistory < 1 ? false : keepHistory;\n // Change does not require historical values modification nor epoch update.\n if (this[KEEP_HISTORY] === prevKeepHistory || this[KEEP_HISTORY] === true) {\n return;\n }\n if (typeof this[KEEP_HISTORY] === 'number') {\n // Sub 1 to keep history count to account for the current value\n let deleteCount = this[VALUES].length - this[KEEP_HISTORY] - 1;\n // Change require values modification and new epoch.\n if (deleteCount > 0) {\n // Remove items from the front of the values array until the delete\n // count is 0 or the current value index is 0.\n while (this[CUR_VALUE_INDEX] > 0 && deleteCount-- > 0) {\n this[VALUES].shift();\n this[CUR_VALUE_INDEX]--;\n }\n // Remove values from the end of the values array until delete \n // count is 0\n while (deleteCount-- > 0) {\n this[VALUES].pop();\n }\n this[HISTORY_EPOCH] = Symbol();\n }\n // this[KEEP_HISTORY] === false \n // If more than one value is being stored in values array Change require\n // values modification and new epoch.\n }\n else if (this[VALUES].length > 1) {\n this[VALUES][0] = this[VALUES][this[CUR_VALUE_INDEX]];\n this[CUR_VALUE_INDEX] = 0;\n this[VALUES].splice(1);\n this[HISTORY_EPOCH] = Symbol();\n }\n }", "restore() {\r\n this.deleted = false;\r\n }", "function stash(d) {\n d.x0 = d.x;\n d.dx0 = d.dx;\n }", "function stash(d) {\n d.x0 = d.x;\n d.dx0 = d.dx;\n }", "function stash(d) {\n d.x0 = d.x;\n d.dx0 = d.dx;\n }", "revert() {\n each(this.$changed, (value, key) => {\n if(!isUndefined(value)) {\n this.$attributes[key] = value;\n }\n else {\n delete this.$attributes[key];\n }\n });\n\n this.$changed = {};\n }", "handleCopyGraph() {\n this.setState((prevState, props) => {\n prevState.points = Object.assign({}, prevState.points);\n prevState.links = Object.assign({}, prevState.links);\n prevState.tooltips = Object.assign({}, prevState.tooltips);\n prevState.currentHistoryName = null;\n\n this.saveInHistory(prevState);\n\n return prevState;\n });\n }", "function updateValuesAndStates() {\n [values, states] = generateDefaultStateArray(getItemCount());\n}", "function stash(d) {\n\td.total = d.value;\n\td.x0 = d.x;\n\td.dx0 = d.dx;\n}", "function SWAP(state) {\n const stack = state.stack;\n\n const a = stack.pop();\n const b = stack.pop();\n\n if (exports.DEBUG) console.log(state.step, 'SWAP[]');\n\n stack.push(a);\n stack.push(b);\n}", "@action undo() {\n if (this.args.onChange) {\n let that = this;\n let undoHistory = that.undoHistory.toArray();\n\n if (undoHistory.length === 0) {\n alert('No more steps to undo.');\n return false;\n }\n\n var restoreValue = undoHistory.pop();\n\n that.undoHistory = A(undoHistory);\n // that.updateValue();\n this.args.onChange(restoreValue);\n }\n }", "resetStateHistory() {\n // Clears state history, returning it to an empty list.\n this._stateHistory.splice(0, this._stateHistory.length);\n }", "reset() {\r\n this.currentState = this.initial;\r\n }", "resetActionStates() {\r\n let oldStates = this._actionStates.map(x => x);\r\n this._actionStates = [];\r\n this.emit('reset.actionstates', oldStates);\r\n return this;\r\n }", "unarchive () {\n try {\n this.state.unarchiveValue(this.boxedValue);\n this.emit('state changed', this.state, this.state);\n } catch (err) {\n this.emit('state change failed', err);\n throw err;\n }\n }", "function SWAP(state) {\n var stack = state.stack;\n\n var a = stack.pop();\n var b = stack.pop();\n\n if (DEBUG) console.log(state.step, 'SWAP[]');\n\n stack.push(a);\n stack.push(b);\n}", "function stash(d) {\n d.x0 = d.x;\n d.dx0 = d.dx;\n}", "function stash(d) {\n d.x0 = d.x;\n d.dx0 = d.dx;\n}", "resetState() {\n this._movements = 0;\n }", "_undo() {\n for (const [k, v] of Object.entries(this._undos)) {\n if (v) {\n\tthis._cells[k] = v;\n }\n else {\n\tdelete this._cells[k];\n }\n }\n }", "mergeRemovalsDict(oldState, newState) {\n const finalState = {\n ...oldState\n };\n Object.keys(oldState).forEach(oldKey => {\n if (!newState || !newState.hasOwnProperty(oldKey)) {\n delete finalState[oldKey];\n }\n });\n return finalState;\n }", "reset() {\r\n this.statesDone.clear();\r\n this.statesDone.push(this.initialState);\r\n }", "function stash(d) {\n\td.x0 = d.x;\n\td.dx0 = d.dx;\n}", "@action clearUndo() {\n let that = this;\n that.undoHistory = A();\n }", "reset() {\r\n this.state=this.initial;\r\n this.statesStack.clear();\r\n\r\n }", "function stash(d) {\r\n d.x0 = d.x;\r\n d.dx0 = d.dx;\r\n}", "function storeStooges() {\n self.log(self.oldStoogesFound);\n self.log(self.oldStoogesKilled);\n spec.integrationStore.putModel(self.moe, stoogeStored);\n spec.integrationStore.putModel(self.larry, stoogeStored);\n spec.integrationStore.putModel(self.shemp, stoogeStored);\n }", "static reset () {\n this.history = [];\n this.position = 0;\n }", "function undo() \r\n {\r\n addressRef.value = address;\r\n roomNumberRef.value = roomNumber;\r\n seatsUsedRef.value = seatsUsed;\r\n seatsTotalRef.value = seatsTotal;\r\n updateTextfieldClasses();\r\n useAddress ? useAddressClassRef.MaterialCheckbox.check() : \"\";\r\n lightsOn ? lightsClassRef.MaterialSwitch.on() : \"\";\r\n heatingCoolingOn ? heatingCoolingClassRef.MaterialSwitch.on() : \"\"; \r\n \r\n snackbarContainer.MaterialSnackbar.cleanup_();\r\n }", "_mergeWithCurrentState(change) {\n return assign(this.props.data, change);\n }", "reset() {\r\n this.currentState = this.initalState;\r\n this.clearHistory();\r\n }", "static clearState() {\n delete state.marchingOrder;\n MarchingOrder.State.getState();\n }", "static clearState() {\n delete state.marchingOrder;\n MarchingOrder.State.getState();\n }", "function transfer(){\n let index = findOp(calcScreen);\n if(index == -1){\n stack.push(parseInt(calcScreen));\n calcScreen =\"\";\n }\n else{\n if(index == 1 ||index == calcScreen.length){\n remove();\n return;\n }\n stack.push(parseInt(calcScreen.slice(0,index-1)));\n stack.push(calcScreen.slice(index-1,index));\n calcScreen = calcScreen.slice(index);\n }\n}", "_resetCurrent() {\n this._current = {\n \"line\": \"\",\n \"score\": Number.MIN_SAFE_INTEGER,\n \"normalizer\": Number.MIN_SAFE_INTEGER,\n \"joint\": Number.MIN_SAFE_INTEGER,\n };\n }", "static rewind() {\n const recordedState = state;\n state = undefined;\n mountedInstances.clear();\n return recordedState;\n }", "static rewind() {\n const recordedState = state;\n state = undefined;\n mountedInstances.clear();\n return recordedState;\n }", "reset() {\r\n this.prevState=this.currentState;\r\n this.currentState = this.config.initial;\r\n }", "function clear() {\n $log.debug(\"kyc-flow-state clear()\");\n clearCurrent();\n states = [];\n }", "function transferState(src, dest) {\n Object.keys(src).forEach(function (srck) {\n if (src.__lookupGetter__(srck) && dest.__lookupSetter__(srck)) {\n dest[srck] = src[srck];\n }\n });\n}", "clearStates() {\n // applications should extend this to actually do something, assuming they can save locally\n }", "handleUndo(){\n let undoneMove = this.gameMoves.pop();\n this.previousBishops[0].row = undoneMove[0];\n this.previousBishops[0].column = undoneMove[1];\n for(let i = 0; i < this.previousBishops.length; i++){\n this.previousBishops[i].animation = null;\n if(i == 1)\n this.board.reactivate(this.previousBishops[i]);\n }\n\n }", "restore() {\n if(this.saved.caret)\n this.set(this.saved.startNodeIndex, this.saved.startOffset);\n else\n this.set(this.saved.startNodeIndex, this.saved.startOffset,\n this.saved.endNodeIndex, this.saved.endOffset);\n }", "revert() { }", "function restore() {\n var i = 0;\n var list;\n while (that.data.lists[i] !== undefined) {\n list = that.data.lists[i];\n if (list.tChecked) {\n that.data.lists.splice(i, 1);\n removeListOnStorage(list.id, that.config.listKey);\n // make sure the list won't be checked if it ends in trash can again\n resetTchecked(list);\n gevent.fire(\"updateList\", list);\n } else {\n i++;\n }\n }\n }", "function undo(history) {\n\t debug('undo', { history: history });\n\n\t var past = history.past;\n\t var present = history.present;\n\t var future = history.future;\n\n\n\t if (past.length <= 0) return history;\n\n\t return {\n\t past: past.slice(0, past.length - 1), // remove last element from past\n\t present: past[past.length - 1], // set element as new present\n\t future: [present].concat(_toConsumableArray(future))\n\t };\n\t}", "function undoChanges(){\n\t\t//Get the last change made\n\t\tlast = _.last(changes);\n\n\t\t//Based on its' time get the others\n\t\tlast_changes = _.where(changes, {time: last.time});\n\n\t\t//Undo the changes for each change\n\t\t_.each(last_changes, function(interval){\n\t\t\t//Put previous class\n\t\t\tchange(interval);\n\t\t});\n\n\t\t//Remove the last changes from the changes\n\t\tchanges = _.difference(changes, last_changes);\n\t}", "clear() {\n debug('Clearing all previously stashed events.');\n this._eventsStash = [];\n }", "undoTransaction() {\n // this.list.items = this.oldList.items;\n let i = 0;\n for (i = 0; i < this.list.items.length; i++) {\n this.list.items[i] = this.oldList[i];\n }\n // load the old list\n // console.log(this.list.items);\n }", "reset(){\n this.potentialValues = [];\n this.valuesToSend = [];\n this.phase = \"input\"\n }", "function undo (history) {\n debug('undo', {history})\n\n const { past, present, future } = history\n\n if (past.length <= 0) return history\n\n return {\n past: past.slice(0, past.length - 1), // remove last element from past\n present: past[past.length - 1], // set element as new present\n future: [\n present, // old present state is in the future now\n ...future\n ]\n }\n}", "function undo(history) {\n const { past, future, _latestUnfiltered } = history;\n\n if (past.length <= 0) return history;\n\n const newFuture = _latestUnfiltered != null ? [_latestUnfiltered, ...future] : future;\n\n const newPresent = past[past.length - 1];\n\n return {\n ...newPresent,\n past: past.slice(0, past.length - 1),\n future: newFuture,\n _latestUnfiltered: newPresent\n };\n}", "undoTransaction() {\n this.todoItem.description = this.oldDescription;\n this.todoItem.assigned_to = this.oldAssignedTo;\n this.todoItem.due_date = this.oldDueDate;\n this.todoItem.completed = this.oldCompleted;\n }", "restore() {\n if (this[_SCOPE]) {\n this[_SCOPE][this[_NAME]] = this[_ORIG_FN];\n }\n this.records.splice(0, this.records.length);\n }", "clearState() {\n this.names = {};\n this.history = {};\n this.noids = {};\n this.avatars = {};\n }", "RevertToPreviousState()\n {\n this.ChangeState(this.m_pPreviousState);\n }", "updateHistory(currentBoard) {\n /* add current board to history and increment history index\n *** if historyIndex is less than historyLength-1, it \n means that a move has been played after the user has \n used the jump backwards button. Therefore, all elements in history after\n where historyIndex currently is should be erased *** \n */\n const historyIndex = this.state.historyIndex;\n const historyLength = this.state.history.length;\n var history = this.state.history;\n if (historyIndex < historyLength - 1) {\n history = this.state.history.splice(0, historyIndex + 1);\n }\n\n return history.concat([{ currentBoard: currentBoard }]);\n }", "reset() {\r\n this.state = this.initial;\r\n }", "resetClicks() {\n\t\tvar newState = _.extend(this.state, {click1: null, click2: null});\n\t\tthis.setState(newState);\n\t}", "undo(self) {\n let toUndo = {};\n do {\n if (this.didStack.length == 0) return;\n toUndo = this.didStack.splice(this.didStack.length - 1, 1)[0];\n toUndo.undo(self);\n this.undidStack.push(toUndo);\n } while (toUndo.includeWithPrevious == true);\n }", "function save_vals(d)\n{\n this._current = d;\n}", "mergeWithCurrentState(change) {\n return assign(this.props.data, change);\n }", "clear() {\n this.stack = this.initialItem ? [this.initialItem] : [{ index: 0, state: [] }];\n this.position = 0;\n this.onUpdate();\n }", "undoAction() {\n const stepNumber = this.state.stepNumber;\n\n if (!stepNumber) return;\n\n this.setState({\n current: this.state.history[stepNumber - 1].squares,\n stepNumber: stepNumber - 1,\n });\n }", "function cleanCopy(t) {\n const r = { ...t };\n return clean(r);\n}", "function statehandler(key, value) {\n // console.log(\"key:\",key,\"value:\",value)\n // console.log(\"old state:\", user)\n setUser({...user, [key]: value});\n // console.log(\"latest state:\", user)\n }", "resetScore() {\n // prevent a pass by reference\n this.gameStats = JSON.parse(JSON.stringify( baseScore ));\n }" ]
[ "0.6446346", "0.64061916", "0.63903314", "0.6171994", "0.60937375", "0.60750806", "0.5919713", "0.5883894", "0.5837796", "0.5791796", "0.57751423", "0.57659185", "0.57498294", "0.5707894", "0.56958836", "0.56951815", "0.5692019", "0.5636815", "0.560492", "0.560492", "0.560492", "0.560492", "0.560492", "0.560492", "0.5598793", "0.55881876", "0.558286", "0.5582189", "0.5574301", "0.5573656", "0.5573656", "0.5566349", "0.5556584", "0.5546505", "0.5530306", "0.5515829", "0.5504467", "0.5494736", "0.54835844", "0.54647005", "0.54600644", "0.54416907", "0.54254204", "0.54205096", "0.5409411", "0.54081374", "0.54062873", "0.53986585", "0.53938776", "0.53938776", "0.5378212", "0.536753", "0.53405994", "0.533058", "0.53297335", "0.53297126", "0.5319447", "0.5311777", "0.53044105", "0.5304267", "0.5300216", "0.52935773", "0.5291777", "0.5291774", "0.5291774", "0.52895325", "0.52885836", "0.5261788", "0.5261788", "0.52539223", "0.52246946", "0.5220955", "0.52169013", "0.5216276", "0.5215923", "0.5208996", "0.5203509", "0.5199444", "0.5189344", "0.518626", "0.51832837", "0.5174655", "0.5172631", "0.51665604", "0.5161331", "0.5159496", "0.5152666", "0.51505965", "0.5144389", "0.51251775", "0.5123383", "0.5122367", "0.51171035", "0.51104885", "0.51104087", "0.5106559", "0.51044846", "0.50988513", "0.5093687" ]
0.5327883
57
Interpolate the arcs in data space.
function arcTween(a) { var i = d3.interpolate({x: a.x0, dx: a.dx0}, a); return function(t) { var b = i(t); a.x0 = b.x; a.dx0 = b.dx; return arc(b); }; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function interpolate(value,xL,xR,yL,yR){\n return (value-xL)*(yR-yL)/(xR-xL) + yL;\n}", "interpolate(y2, y1, y3, n) {\n /* Equation from Astronomical Algorithms page 24 */\n const a = y2 - y1;\n const b = y3 - y2;\n const c = b - a;\n return y2 + n / 2 * (a + b + n * c);\n }", "function interpolate(d, i, x) {\n if (d.length <= 1) {\n // there is only one element in the array d,\n // copy the nearest point.\n return d[0].y;\n } else if (i === 0) {\n // linear interpolate between i and i+1.\n return getY(d, i, i+1, x);\n } else if (i >= d.length - 1) {\n // linear interpoate\n // between the last two elements.\n return getY(d, d.length - 2, d.length - 1, x);\n } else {\n // linear interpolate betewen i-1 and i.\n return getY(d, i-1, i, x);\n }\n }", "function interpolate (arr0, arr1, p) {\n var q = 1 - p;\n return [q * arr0[0] + p * arr1[0], q * arr0[1] + p * arr1[1], q * arr0[2] + p * arr1[2]];\n }", "function _interpolate(a, b, t) {\n\t return ((1 - t) * a) + (t * b);\n\t }", "LinearInterpolation(y1,y3,x2){\n return (x2 * (y3-y1)) + y1;\n }", "function _interpolate(a, b, t) {\n return ((1 - t) * a) + (t * b);\n }", "function _interpolate(a, b, t) {\n return ((1 - t) * a) + (t * b);\n }", "function interpolate(p0, p1, t) {\n return new Vector(\n p0.x * (1 - t) + p1.x * t,\n p0.y * (1 - t) + p1.y * t);\n }", "function interpolate(from,to,direction,stream){circleStream(stream,radius,delta,direction,from,to)}", "function interpolate(p, t) {\n var r = [];\n for (var i = 1; i < p.length; i ++) {\n var p0 = p[i-1], p1 = p[i];\n r.push({x: p0.x + (p1.x - p0.x) * t, y: p0.y + (p1.y - p0.y) * t});\n }\n return r;\n }", "interpolate_( /* i1, t0, t, t1 */ ) {\n\n\t\tthrow new Error( 'call to abstract method' );\n\t\t// implementations shall return this.resultBuffer\n\n\t}", "function getInterpolation(data) {\n return function (d, i, a) {\n var interpolate = d3.scale.linear()\n .domain([0,1])\n .range([1, data.length + 1]);\n\n return function(t) {\n var flooredX = Math.floor(interpolate(t));\n var weight = interpolate(t) - flooredX;\n var interpolatedLine = data.slice(0, flooredX);\n \n if(flooredX > 0 && flooredX < data.length) {\n //console.log(\"flooredX: \" + flooredX);\n \n var weightedLineAverage = data[flooredX].y * weight + data[flooredX-1].y * (1-weight);\n interpolatedLine.push({\"x\":interpolate(t)-1, \"y\":weightedLineAverage});\n }\n \n return lineFunc(interpolatedLine);\n }\n }\n }", "function vInterpolate(a, b, fraction) {\n var rval = { x: a.x + (b.x - a.x) * fraction, y: a.y + (b.y - a.y) * fraction, z: a.z + (b.z - a.z) * fraction };\n return rval;\n}", "function interpolateValues(values, year) {\n\t\t /*use bisect function to determine the position of given year in the year list in ascending order*/\n\t\t var i = d3.bisectLeft(yearList,year);\n\t\t /*extract the data value at current position i*/\n\t\t var b = values[i];\n\t\t /*when given year is not the first year in the year list, interpolate the values between a and b*/\n\t\t if (i > 0) {\n\t\t /*extract the data value before position i*/\n\t\t var a = values[i - 1];\n\t\t /*if given year is a whole year number, return 1, otherwise return the delta(fraction)*/\n\t\t var t = (year == Math.floor(year)? 1 : year - Math.floor(year));\n\t\t return a + (b - a) * t;\n\t\t }\n\t\t /*when given year is the first year in the year list, extract the first year's data*/\n\t\t return b;\n\t }", "function interpolateValues(values, year) {\n var i = bisect.left(values, year, 0, values.length - 1),\n a = values[i];\n if (i > 0) {\n var b = values[i - 1],\n t = (year - a[0]) / (b[0] - a[0]);\n return a[1] * (1 - t) + b[1] * t;\n }\n return a[1];\n }", "function interpolateValues(values, year) {\n var i = bisect.left(values, year, 0, values.length - 1),\n a = values[i];\n if (i > 0) {\n var b = values[i - 1],\n t = (year - a[0]) / (b[0] - a[0]);\n return a[1] * (1 - t) + b[1] * t;\n }\n return a[1];\n }", "function interpolateValues(values, year) {\n var i = bisect.left(values, year, 0, values.length - 1),\n a = values[i];\n if (i > 0) {\n var b = values[i - 1],\n t = (year - a[0]) / (b[0] - a[0]);\n return a[1] * (1 - t) + b[1] * t;\n }\n return a[1];\n }", "function interpolateValues(values, year) {\n var i = bisect.right(values, year, 0, values.length - 1),\n a = values[i];\n if (i > 0) {\n var b = values[i - 1],\n t = (year - a[0]) / (b[0] - a[0]);\n if (b[1] == 0) { return 0; }\n else { return a[1] * (1 - t) + b[1] * t; }\n }\n return a[1];\n }", "function interpolateValues(values, year) {\n let i = bisect.left(values, year, 0, values.length - 1),\n a = values[i];\n if (i > 0) {\n let b = values[i - 1],\n t = (year - a[0]) / (b[0] - a[0]);\n return a[1] * (1 - t) + b[1] * t;\n }\n return a[1];\n }", "function interpolateValues(values, year) {\n var i = bisect.left(values, year, 0, values.length - 1),\n a = values[i];\n if (i > 0) {\n var b = values[i - 1],\n t = (year - a[0]) / (b[0] - a[0]);\n return a[1] * (1 - t) + b[1] * t;\n }\n return a[1];\n }", "function interpolateValues(values, year) {\n // A bisector since many nation's data is sparsely-defined.\n var bisect = d3.bisector(function(d) { return d[0]; });\n\n var i = bisect.left(values, year, 0, values.length - 1),\n a = values[i];\n if (i > 0) {\n var b = values[i - 1],\n t = (year - a[0]) / (b[0] - a[0]);\n return a[1] * (1 - t) + b[1] * t;\n }\n return a[1];\n }", "function interpolateArray(data, newSampleRate, oldSampleRate) {\n var fitCount = Math.round(data.length * (newSampleRate / oldSampleRate));\n //var newData = new Array();\n var newData = [];\n //var springFactor = new Number((data.length - 1) / (fitCount - 1));\n var springFactor = Number((data.length - 1) / (fitCount - 1));\n newData[0] = data[0]; // for new allocation\n for (var i = 1; i < fitCount - 1; i++) {\n var tmp = i * springFactor;\n //var before = new Number(Math.floor(tmp)).toFixed();\n //var after = new Number(Math.ceil(tmp)).toFixed();\n var before = Number(Math.floor(tmp)).toFixed();\n var after = Number(Math.ceil(tmp)).toFixed();\n var atPoint = tmp - before;\n newData[i] = linearInterpolate(data[before], data[after], atPoint);\n }\n newData[fitCount - 1] = data[data.length - 1]; // for new allocation\n return newData;\n }", "function interpolateValues(values, year) {\n var i = bisect.left(values, year, 0, values.length - 1),\n a = values[i];\n if (i > 0) {\n var b = values[i - 1],\n t = (year - a[0]) / (b[0] - a[0]);\n return a[1] * (1 - t) + b[1] * t;\n }\n return a[1];\n }", "interpolateAngles(y2, y1, y3, n) {\n /* Equation from Astronomical Algorithms page 24 */\n const a = unwindAngle(y2 - y1);\n const b = unwindAngle(y3 - y2);\n const c = b - a;\n return y2 + n / 2 * (a + b + n * c);\n }", "function pArrInterpolate(p1,p2,k){\n\tlet x=(p2[0]-p1[0])*k+p1[0];\n\tlet y=(p2[1]-p1[1])*k+p1[1];\n\n\t// angle interpolation around a circle\n\tlet d1=p1[2],d2=p2[2];\n\tlet dD=(d2-d1)%360;\n\tif(dD<0)dD+=360;\n\tif(dD>180){ // CCW\n\t\tdD-=360; // -180<dD<0\n\t}\n\tlet r=d1+dD*k;\n\n\t// scale interpolation using log scale\n\tlet sL1=Math.log(p1[3]);\n\tlet sL2=Math.log(p2[3]);\n\tlet s=Math.exp((sL2-sL1)*k+sL1);\n\n\treturn [x,y,r,s];\n}", "function interpolateValues(values, year) {\n var i = bisect.left(values, year, 0, values.length - 1),\n a = values[i];\n if (i > 0) {\n var b = values[i - 1],\n t = (year - a[0]) / (b[0] - a[0]);\n return a[1] * (1 - t) + b[1] * t;\n }\n return a[1];\n }", "function interpolateValues(values, year) {\n var i = bisect.left(values, year, 0, values.length - 1),\n a = values[i];\n if (i > 0) {\n var b = values[i - 1],\n t = (year - a[0]) / (b[0] - a[0]);\n return a[1] * (1 - t) + b[1] * t;\n }\n return a[1];\n }", "function interpolateValues(values, year) {\n var i = bisect.left(values, year, 0, values.length - 1),\n a = values[i];\n if (i > 0) {\n var b = values[i - 1],\n t = (year - a[0]) / (b[0] - a[0]);\n return a[1] * (1 - t) + b[1] * t;\n }\n return a[1];\n }", "function interpolate(a, b, idx, steps) {\n return +a + ((+b - +a) * (idx / steps));\n }", "update(t) {\n this.current.interpolate(this.start, this.end, t);\n }", "interpolate(fa, fb, T) {\nvar DUR_A, TM_A, TM_ADJ, bones, morphs;\n//----------\nbones = this.interpolateBones(fa.getTRSets(), fb.getTRSets(), T);\nmorphs = this.interpolateMorphs(fa, fb, T);\nTM_A = fa.getTime();\nDUR_A = fa.getDuration();\nTM_ADJ = DUR_A * T;\nreturn CASFrame.create(TM_A + TM_ADJ, DUR_A - TM_ADJ, bones, morphs);\n}", "function interpolate_years(data){\n\n // Adds interpolated data points to data\n\t\n var years = _.range(2002, 2030+1);\n\n\n for (var i = 0; i < data.length; i++) {\n \tdata[i]\n\n\n\n var p_years = _.map(data[i]['Points'], function(o){\n \treturn o['Y']\n });\n\n\n // mean sample n for interpolated data points\n var mean_n = _.mean(\n _.map(data[i]['Points'], function(p){\n return p['n'];\n }\n )\n )\n\n data[i]['mean_n'] = mean_n;\n\n\n for (var j=0; j<years.length; j++) {\n\n\n \tif (_.includes(p_years, years[j])) {\n\n // not interpolated\n _.filter(data[i]['Points'], function(o){\n \treturn o['Y'] == years[j]\n })[0]['intp'] = 0\n\n \t\t}\n\n else {\n var r = data[i]['Curve']['r']\n var c = data[i]['Curve']['c']\n\n data[i]['Points'].push(\n {Y: years[j], GR: curv(c, r, years[j], 1), intp: 1}\n )\n }\n }\n };\n}", "static _interpolateHC(x, y, vi) {\n\t\tlet h10_l, h10_u = -1, c_l = -1, c_u = -1;\n\t\tlet hv = null;\n\n\t\tout:\n\t\tfor (h10_l = 0; h10_l <= 975; h10_l += 25) { // h 0-975 step 25;\n\t\t\th10_u = h10_l + 25;\n\t\t\tif (h10_u == 1000) h10_u = 0;\n\n\t\t\tinner:\n\t\t\tfor (c_l = 0; c_l <= 50; c_l += 2) { // c 0-50 step 2;\n\t\t\t\tc_u = c_l + 2;\n\n\t\t\t\tconst a = Munsell._getXy(vi, h10_l, c_l), d = Munsell._getXy(vi, h10_l, c_u);\n\t\t\t\tconst b = Munsell._getXy(vi, h10_u, c_l), c = Munsell._getXy(vi, h10_u, c_u);\n\t\t\t\tif (a == null && b == null) break inner;\n\t\t\t\tif (a == null || b == null || c == null || d == null) continue;\n\t\t\t\t// ^\n\t\t\t\t// y| B C ↖H (Direction of rotation) ↗C (Radial direction)\n\t\t\t\t// | A D\n\t\t\t\t// ------> x\n\t\t\t\tif (a[0] == b[0] && a[1] == b[1]) {\n\t\t\t\t\tif (Munsell._isInside(a, c, d, x, y)) hv = Munsell._interpolationRatio(x, y, a, d, b, c);\n\t\t\t\t} else {\n\t\t\t\t\tif (Munsell._isInside(a, c, d, x, y) || Munsell._isInside(a, b, c, x, y)) hv = Munsell._interpolationRatio(x, y, a, d, b, c);\n\t\t\t\t}\n\t\t\t\tif (hv != null) break out;\n\t\t\t}\n\t\t}\n\t\tif (hv === null) {\n\t\t\treturn [0, 0];\n\t\t}\n\t\tif (h10_u == 0) h10_u = 1000;\n\t\treturn [((h10_u - h10_l) * hv[0] + h10_l) / 10, (c_u - c_l) * hv[1] + c_l];\n\t}", "function doit(start, end, interval) {\n\tconst dates = getDatesForInterval(start, end, interval);\n\tconsole.log(dates);\n\nconst interpolated = interpolate.linear(dates.map(date => date.getTime()), data.map(d => d.date.getTime()), data.map(d => d.value));\n\nconsole.log(interpolated);\n}", "static _interpolateXY(h, c, vi) {\n\t\tconst h10 = h * 10;\n\t\tlet h10_l = 0 | Math.floor(h10 / 25) * 25, h10_u = h10_l + 25;\n\t\tconst c_l = 0 | Math.floor(c / 2) * 2, c_u = c_l + 2;\n\n\t\tconst rh = (h10 - h10_l) / (h10_u - h10_l);\n\t\tconst rc = (c - c_l) / (c_u - c_l);\n\n\t\tif (h10_u == 1000) h10_u = 0;\n\t\tconst maxC_hl = Munsell._TBL_MAX_C[vi][h10_l / 25], maxC_hu = Munsell._TBL_MAX_C[vi][h10_u / 25];\n\n\t\tif (maxC_hl <= c_l || maxC_hu <= c_l) {\n\t\t\tlet xy_hl = [0, 0], xy_hu = [0, 0];\n\n\t\t\tif (c_l < maxC_hl) {\n\t\t\t\tconst a = Munsell._getXy(vi, h10_l, c_l), d = Munsell._getXy(vi, h10_l, c_u);\n\t\t\t\txy_hl[0] = (d[0] - a[0]) * rc + a[0]; xy_hl[1] = (d[1] - a[1]) * rc + a[1];\n\t\t\t} else {\n\t\t\t\txy_hl = Munsell._getXy(vi, h10_l, maxC_hl);\n\t\t\t}\n\t\t\tif (c_l < maxC_hu) {\n\t\t\t\tconst a = Munsell._getXy(vi, h10_u, c_l), d = Munsell._getXy(vi, h10_u, c_u);\n\t\t\t\txy_hu[0] = (d[0] - a[0]) * rc + a[0]; xy_hu[1] = (d[1] - a[1]) * rc + a[1];\n\t\t\t} else {\n\t\t\t\txy_hu = Munsell._getXy(vi, h10_u, maxC_hu);\n\t\t\t}\n\t\t\treturn [\n\t\t\t\t(xy_hu[0] - xy_hl[0]) * rh + xy_hl[0],\n\t\t\t\t(xy_hu[1] - xy_hl[1]) * rh + xy_hl[1],\n\t\t\t\tfalse\n\t\t\t];\n\t\t}\n\t\tif (c_l == 0) {\n\t\t\tconst o = Munsell._ILLUMINANT_C, d = Munsell._getXy(vi, h10_l, c_u), C = Munsell._getXy(vi, h10_u, c_u);\n\t\t\tconst cd_x = (C[0] - d[0]) * rh + d[0], cd_y = (C[1] - d[1]) * rh + d[1];\n\t\t\treturn [\n\t\t\t\t(cd_x - o[0]) * rc + o[0],\n\t\t\t\t(cd_y - o[1]) * rc + o[1],\n\t\t\t\ttrue\n\t\t\t];\n\t\t} else {\n\t\t\tconst a = Munsell._getXy(vi, h10_l, c_l), d = Munsell._getXy(vi, h10_l, c_u);\n\t\t\tconst b = Munsell._getXy(vi, h10_u, c_l), C = Munsell._getXy(vi, h10_u, c_u);\n\t\t\tconst ab_x = (b[0] - a[0]) * rh + a[0], ab_y = (b[1] - a[1]) * rh + a[1];\n\t\t\tconst cd_x = (C[0] - d[0]) * rh + d[0], cd_y = (C[1] - d[1]) * rh + d[1];\n\t\t\treturn [\n\t\t\t\t(cd_x - ab_x) * rc + ab_x,\n\t\t\t\t(cd_y - ab_y) * rc + ab_y,\n\t\t\t\ttrue\n\t\t\t];\n\t\t}\n\t}", "function interpolate(length, totalLength, start, end) {\n var xy = [\n start[0] + (end[0] - start[0]) * length / totalLength,\n start[1] + (end[1] - start[1]) * length / totalLength\n ];\n return xy;\n }", "interpolatedValueAt(lon, lat) {\n if (!this.contains(lon, lat)) {\n return null\n }\n let _a = this.getDecimalIndexes(lon, lat),\n i = _a[0],\n j = _a[1]\n return this.interpolatePoint(i, j)\n }", "function interpolate(from, to, direction, stream) {\n\t circleStream(stream, radius, delta, direction, from, to);\n\t }", "function interpolate(from, to, direction, stream) {\n\t circleStream(stream, radius, delta, direction, from, to);\n\t }", "function interpolate(from, to, direction, stream) {\n\t circleStream(stream, radius, delta, direction, from, to);\n\t }", "function interpolateBetween(a, b) {\n var d = Math.max(-1, Math.min(1, dot(a, b))),\n s = d < 0 ? -1 : 1,\n θ = Math.acos(s * d),\n sinθ = Math.sin(θ);\n return sinθ ? function(t) {\n var A = s * Math.sin((1 - t) * θ) / sinθ,\n B = Math.sin(t * θ) / sinθ;\n return [\n a[0] * A + b[0] * B,\n a[1] * A + b[1] * B,\n a[2] * A + b[2] * B,\n a[3] * A + b[3] * B\n ];\n } : function() { return a; };\n}", "function interpolateX(y, y0, y1){\n return (y - y0) / (y1 - y0);\n }", "function interpolateX(y, y0, y1){\n return (y - y0) / (y1 - y0);\n }", "function sk_linearInterp( x1, x2, y1, y2, x)\n{\n if( x1 == x2)\n throw \"x1 (\" + String(x1) + \") and x2 (\" + String(x2) + \") must NOT no equal.\"; \n\n return ( y1 * ( x2 - x) + y2 * ( x - x1)) / ( x2 - x1);\n}", "function interpolateSeries(series) {\n var left, right;\n\n // Interpolate series\n for (var i = series.length - 1; i >= 0; i--) {\n if (!series[i][0]) {\n left = findNearestLeft(series, series[i]);\n right = findNearestRight(series, series[i]);\n if (!left) {\n left = right;\n }\n if (!right) {\n right = left;\n }\n series[i][0] = linearInterpolation(series[i][1], left, right);\n }\n }\n return series;\n}", "function interpolate(from, to, direction, stream) {\n _circleJs.circleStream(stream, radius, delta1, direction, from, to);\n }", "function Interpolator() {\n\tvar _this = this;\n\t\n\t\n\t// function: add\n\t// Adds points to be interpolated against\n\t_this.addPoints = function() {\n\t}\n\t\n\t_this.getValue = function() {\n\t\treturn 0.0;\n\t}\n}", "function arcTween(a) {\r\n var i = d3.interpolate(this._current, a);\r\n this._current = i(0);\r\n console.log(\"ARC TWEEN data is\"+ arc(i(t)));\r\n return function(t) {\r\n \r\n return arc(i(t));\r\n };\r\n}", "function arcTween(a) {\n console.log(this._current);\n var i = d3v5.interpolate(this._current, a);\n this._current = i(0);\n return function(t) {\n return arc(i(t));\n };\n }", "arcTween(a) {\n var i = d3.interpolate(this._current, a);\n this._current = i(0);\n return (t) => this.arc(i(t)) ;\n }", "function interpolate(from, to, direction, stream) {\n\t circleStream(stream, radius, delta, direction, from, to);\n\t }", "function interpolate(from, to, direction, stream) {\n\t circleStream(stream, radius, delta, direction, from, to);\n\t }", "function interpolate(from, to, direction, stream) {\n\t circleStream(stream, radius, delta, direction, from, to);\n\t }", "function interpolate(from, to, direction, stream) {\n\t circleStream(stream, radius, delta, direction, from, to);\n\t }", "function interpolate(from, to, direction, stream) {\n\t circleStream(stream, radius, delta, direction, from, to);\n\t }", "function arcTween(a) {\n var i = d3.interpolate({\n x: a.x0,\n dx: a.dx0\n }, a);\n return function (t) {\n var b = i(t);\n a.x0 = b.x;\n a.dx0 = b.dx;\n return that.cachedVals.arc(b);\n };\n }", "function interpolate(val, rgb1, rgb2) {\n if (val > 1) {\n val = 1;\n }\n val = Math.sqrt(val);\n var rgb = [0,0,0];\n var i;\n for (i = 0; i < 3; i++) {\n rgb[i] = Math.round(rgb1[i] * (1.0 - val) + rgb2[i] * val);\n }\n return rgb;\n}", "function interpolate(from, to, direction, stream) {\n Object(__WEBPACK_IMPORTED_MODULE_1__circle_js__[\"a\" /* circleStream */])(stream, radius, delta, direction, from, to);\n }", "function interpolateColors (dataLength, colorScale, colorRangeInfo) {\n var { colorStart, colorEnd } = colorRangeInfo\n var colorRange = colorEnd - colorStart\n var intervalSize = colorRange / dataLength\n var i, colorPoint\n var colorArray = []\n\n for (i = 0; i < dataLength; i++) {\n colorPoint = calculatePoint(i, intervalSize, colorRangeInfo)\n colorArray.push(colorScale(colorPoint))\n }\n console.log(colorArray)\n return colorArray\n}", "create_path_from_adjacent(v, s) { \r\n if (v.segments.length < 2) {\r\n console.log(\"Invalid input to create_path_from_adjacent\");\r\n return;\r\n }\r\n \r\n var v1 = s.other_vert(v), v2 = v.other_segment(s).other_vert(v);\r\n var av1 = this.get_vdata(v1.eid, false), av2 = this.get_vdata(v2.eid, false);\r\n \r\n if (av1 === undefined && av2 === undefined) {\r\n console.log(\"no animation data to interpolate\");\r\n return;\r\n } else if (av1 === undefined) {\r\n av1 = av2;\r\n } else if (av2 === undefined) {\r\n av2 = av1;\r\n } \r\n \r\n var av3 = this.get_vdata(v.eid, true);\r\n \r\n var keyframes = new set();\r\n for (var v of av1.verts) {\r\n keyframes.add(get_vtime(v));\r\n }\r\n \r\n for (var v of av2.verts) {\r\n keyframes.add(get_vtime(v));\r\n }\r\n \r\n var co = new Vector2();\r\n \r\n //ensure step func interpolation mode is off for this\r\n var oflag1 = av1.animflag, oflag2 = av2.animflag;\r\n \r\n av1.animflag &= VDAnimFlags.STEP_FUNC;\r\n av2.animflag &= VDAnimFlags.STEP_FUNC;\r\n \r\n for (var time of keyframes) {\r\n var co1 = av1.evaluate(time), co2 = av2.evaluate(time);\r\n \r\n co.load(co1).add(co2).mulScalar(0.5);\r\n av3.update(co, time);\r\n }\r\n \r\n av3.animflag = oflag1 | oflag2;\r\n \r\n av1.animflag = oflag1;\r\n av2.animflag = oflag2;\r\n }", "function arcTween(a) {\n var i = d3.interpolate({ x: a.x0, dx: a.dx0 }, a);\n return function (t) {\n var b = i(t);\n a.x0 = b.x;\n a.dx0 = b.dx;\n return arc(b);\n };\n }", "function interpolate(from, to, direction, stream) {\n Object(__WEBPACK_IMPORTED_MODULE_1__circle__[\"a\" /* circleStream */])(stream, radius, delta, direction, from, to);\n }", "function interpolate(from, to, direction, stream) {\n Object(__WEBPACK_IMPORTED_MODULE_1__circle__[\"a\" /* circleStream */])(stream, radius, delta, direction, from, to);\n }", "function interpolate(from, to, direction, stream) {\n Object(__WEBPACK_IMPORTED_MODULE_1__circle__[\"a\" /* circleStream */])(stream, radius, delta, direction, from, to);\n }", "function interpolate(from, to, direction, stream) {\n Object(__WEBPACK_IMPORTED_MODULE_1__circle__[\"a\" /* circleStream */])(stream, radius, delta, direction, from, to);\n }", "function interpolate(from, to, direction, stream) {\n Object(__WEBPACK_IMPORTED_MODULE_1__circle__[\"a\" /* circleStream */])(stream, radius, delta, direction, from, to);\n }", "function interpolate(from, to, direction, stream) {\n Object(__WEBPACK_IMPORTED_MODULE_1__circle__[\"a\" /* circleStream */])(stream, radius, delta, direction, from, to);\n }", "function interpolate(from, to, direction, stream) {\n Object(__WEBPACK_IMPORTED_MODULE_1__circle__[\"a\" /* circleStream */])(stream, radius, delta, direction, from, to);\n }", "function interpolate(from, to, direction, stream) {\n Object(__WEBPACK_IMPORTED_MODULE_1__circle__[\"a\" /* circleStream */])(stream, radius, delta, direction, from, to);\n }", "function interpolate(from, to, direction, stream) {\n Object(__WEBPACK_IMPORTED_MODULE_1__circle__[\"a\" /* circleStream */])(stream, radius, delta, direction, from, to);\n }", "function interpolate(from, to, direction, stream) {\n Object(__WEBPACK_IMPORTED_MODULE_1__circle__[\"a\" /* circleStream */])(stream, radius, delta, direction, from, to);\n }", "function interpolate(from, to, direction, stream) {\n Object(__WEBPACK_IMPORTED_MODULE_1__circle__[\"a\" /* circleStream */])(stream, radius, delta, direction, from, to);\n }", "function interpolate(from, to, direction, stream) {\n Object(__WEBPACK_IMPORTED_MODULE_1__circle__[\"a\" /* circleStream */])(stream, radius, delta, direction, from, to);\n }", "function interpolate(from, to, direction, stream) {\n Object(__WEBPACK_IMPORTED_MODULE_1__circle__[\"a\" /* circleStream */])(stream, radius, delta, direction, from, to);\n }", "function interpolate(from, to, direction, stream) {\n Object(__WEBPACK_IMPORTED_MODULE_1__circle__[\"a\" /* circleStream */])(stream, radius, delta, direction, from, to);\n }", "function interpolate(from, to, direction, stream) {\n Object(__WEBPACK_IMPORTED_MODULE_1__circle__[\"a\" /* circleStream */])(stream, radius, delta, direction, from, to);\n }", "function interpolate(from, to, direction, stream) {\n Object(__WEBPACK_IMPORTED_MODULE_1__circle__[\"a\" /* circleStream */])(stream, radius, delta, direction, from, to);\n }", "function interpolate(from, to, direction, stream) {\n Object(__WEBPACK_IMPORTED_MODULE_1__circle__[\"a\" /* circleStream */])(stream, radius, delta, direction, from, to);\n }", "function interpolate(from, to, direction, stream) {\n Object(__WEBPACK_IMPORTED_MODULE_1__circle__[\"a\" /* circleStream */])(stream, radius, delta, direction, from, to);\n }", "function arcTween(a) {\n var i = d3.interpolate({x: a.x0, dx: a.dx0}, a);\n return function(t) {\n var b = i(t);\n a.x0 = b.x;\n a.dx0 = b.dx;\n return arc(b);\n };\n }", "function arcTween(a) {\n var i = d3.interpolateObject(this._current, a);\n //k = d3.interpolate(this._current.value, a.data.value);\n //this._current.value = k(0);\n return function (t) {\n //return arc.innerRadius(200).outerRadius(k(t))(i(t));\n return arc(i(t));\n };\n }", "function interpolate(from, to, direction, stream) {\n circleStream(stream, radius, delta, direction, from, to);\n }", "function interpolate(from, to, direction, stream) {\n circleStream(stream, radius, delta, direction, from, to);\n }", "function interpolate(from, to, direction, stream) {\n circleStream(stream, radius, delta, direction, from, to);\n }", "function interpolate(from, to, direction, stream) {\n circleStream(stream, radius, delta, direction, from, to);\n }", "function interpolate(from, to, direction, stream) {\n circleStream(stream, radius, delta, direction, from, to);\n }", "function arcTween(a) {\n console.log(this._current);\n var i = d3.interpolate(this._current, a);\n this._current = i(0);\n return function (t) {\n return arc(i(t));\n };\n }", "function arcTween(a) {\r\n var i = d3.interpolate({x: a.x0, dx: a.dx0}, a);\r\n return function(t) {\r\n var b = i(t);\r\n a.x0 = b.x;\r\n a.dx0 = b.dx;\r\n return arc(b);\r\n };\r\n}", "static slerpQV(qv, qa, qb, T) {\nvar ONE, T_COMP, cosOmega, doLinear, omega, qb_, sA, sB, sinOmega, sinSqOmega;\n//-------\nONE = 1;\nT_COMP = ONE - T;\n// Omega is the angle of the interval (on the unit hypersphere)\n// over which we are to interpolate.\ncosOmega = this.innerProductQV(qa, qb);\n// Adjust if necessary to ensure |omega| < PI / 2.\n// (There is no loss of generality in this, since, for any\n// quaternion q: q and -q represent the same 3D rotation.)\nqb_ = qb;\nif (cosOmega < 0) {\n(cosOmega = -cosOmega, qb_ = this.negateQV(qb));\n}\n// Compute the interpolation weights.\n// When qa, qb are very close, we need to avoid numerical instability\n// when sinOmega is at or close to zero: in that case just do linear\n// interpolation (with subsequent re-normalization -- see below).\ndoLinear = ONE - cosOmega < 1e-5;\nif (doLinear) {\nsA = T_COMP;\nsB = T;\n} else {\nsinSqOmega = 1 - cosOmega * cosOmega;\nsinOmega = sinSqOmega / Math.sqrt(sinSqOmega);\nomega = Math.atan2(sinOmega, cosOmega);\nsA = (Math.sin(omega * T_COMP)) / sinOmega;\nsB = (Math.sin(omega * T)) / sinOmega;\n}\n// Assign the weighted sum for the interpolation to qq.\nthis.setQV_xyzw(qv, qa[0] * sA + qb_[0] * sB, qa[1] * sA + qb_[1] * sB, qa[2] * sA + qb_[2] * sB, qa[3] * sA + qb_[3] * sB);\nif (doLinear) {\n// Re-normalize the result if we did linear scaling above.\nreturn RotQuat.setNormaliseQV(qv);\n}\n}", "function interpolate(from, to, direction, stream) {\n circleStream(stream, radius, delta, direction, from, to);\n }", "function interpolate(from, to, direction, stream) {\n circleStream(stream, radius, delta, direction, from, to);\n }", "function interpolate(from, to, direction, stream) {\n circleStream(stream, radius, delta, direction, from, to);\n }", "function interpolate(from, to, direction, stream) {\n circleStream(stream, radius, delta, direction, from, to);\n }", "function interpolate(from, to, direction, stream) {\n circleStream(stream, radius, delta, direction, from, to);\n }", "function interpolate(from, to, direction, stream) {\n circleStream(stream, radius, delta, direction, from, to);\n }", "function interpolate(from, to, direction, stream) {\n circleStream(stream, radius, delta, direction, from, to);\n }", "function interpolate(from, to, direction, stream) {\n circleStream(stream, radius, delta, direction, from, to);\n }", "function interpolate(from, to, direction, stream) {\n circleStream(stream, radius, delta, direction, from, to);\n }", "function interpolate(from, to, direction, stream) {\n circleStream(stream, radius, delta, direction, from, to);\n }", "function interpolate(from, to, direction, stream) {\n circleStream(stream, radius, delta, direction, from, to);\n }" ]
[ "0.61924887", "0.6182161", "0.6120667", "0.6088595", "0.60813916", "0.598701", "0.59289837", "0.59289837", "0.5901873", "0.5874588", "0.5743015", "0.57313544", "0.5716819", "0.5691607", "0.5672326", "0.56654483", "0.56654483", "0.56654483", "0.5661493", "0.5653709", "0.5639684", "0.5624189", "0.5591166", "0.55725616", "0.55703616", "0.55657786", "0.553875", "0.553875", "0.553875", "0.55165094", "0.54731834", "0.54582405", "0.54395264", "0.5438059", "0.54375935", "0.53903407", "0.5378023", "0.5365878", "0.5352057", "0.5352057", "0.5352057", "0.53282416", "0.53241926", "0.53241926", "0.5316717", "0.530608", "0.5298643", "0.5268532", "0.5248605", "0.52484787", "0.5243665", "0.52401835", "0.52401835", "0.52401835", "0.52401835", "0.52401835", "0.5230222", "0.5215712", "0.5209466", "0.51988024", "0.519531", "0.5175276", "0.51707", "0.51707", "0.51707", "0.51707", "0.51707", "0.51707", "0.51707", "0.51707", "0.51707", "0.51707", "0.51707", "0.51707", "0.51707", "0.51707", "0.51707", "0.51707", "0.51707", "0.51707", "0.5169568", "0.5156933", "0.51533645", "0.51533645", "0.51533645", "0.51533645", "0.51533645", "0.51415634", "0.51377714", "0.5132801", "0.51271", "0.51271", "0.51271", "0.51271", "0.51271", "0.51271", "0.51271", "0.51271", "0.51271", "0.51271", "0.51271" ]
0.0
-1
Fade all but the current sequence Restore everything to full opacity when moving off the visualization.
function mouseleave(d) { d3.select("#explanationSunburst").style("visibility", "hidden"); // Transition each segment to full opacity and then reactivate it. d3.selectAll("path") .transition() .duration(500) .style("opacity", 1) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function effectFade () {\n pauseSlideshow();\n effect = 1;\n runSlideshow();\n }", "function do_fade() {\n \t\tif (!fadeFinished)\t\t\t\t\t\t\t\t// If we're still fading...\n\t \t\tvar noOfScreens = fadescreens.length;\t\t\t// ... get the number of layers we're fading.\n\t \t\tif (opacity > 0) {\t\t\t\t\t\t\t\t// If they're sill visible...\n\t \t\t\topacity -= 0.025;\t\t\t\t\t\t\t// ... fade the opacity a little bit for this frame ...\n\t \t\t\tfor ( var i = 0; i < noOfScreens; i++ )\t\t// ... and apply this to all the layers we need to fade\n\t \t\t\t\tfadescreens[i].canvas.style.opacity = opacity;\n\t \t\t}\n\t \t\telse {\t\t\t\t\t\t\t\t\t\t\t// If they're not visible ...\n\t \t\t\tfor ( var i = 0; i < noOfScreens; i++ )\t\t// ... hide all the layers ...\n\t \t\t\t\tfadescreens[i].hide();\n\t \t\t\tfadeFinished = true;\t\t\t\t\t\t// ... and stop the fade.\n\t \t\t}\n \t}", "function animateOut() {\n\n chartRing.selectAll('.chart-ring')\n .style('opacity', 1)\n .transition()\n .duration(DURATION)\n .delay(function (d, i) {\n return (DELAY + (i * 100));\n })\n .style('opacity', 0);\n }", "function fadeCanvasBackIn() {\n //Transition settings\n const duration = 250;\n const ease = d3.easeQuadInOut;\n\n //Calculate the opacity interpolator\n nodes.forEach(n => {\n n.interpolate_opacity = d3.interpolate(n.opacity, 1);\n });\n edges_concepts.forEach(l => {\n l.interpolate_opacity = d3.interpolate(\n l.opacity,\n opacity_concept_default\n );\n });\n edges_elements.forEach(l => {\n l.interpolate_opacity = d3.interpolate(\n l.opacity,\n opacity_element_default\n );\n });\n\n //Fade everything back in\n timer_draw = d3.timer(elapsed => {\n //How far along the total duration are we (taking the easing into account)\n let t = ease(Math.min(1, elapsed / duration));\n\n //Set new opacities\n nodes.forEach(n => {\n n.opacity = n.interpolate_opacity(t);\n });\n edges_concepts.forEach(l => {\n l.opacity = l.interpolate_opacity(t);\n });\n edges_elements.forEach(l => {\n l.opacity = l.interpolate_opacity(t);\n });\n\n //Draw the canvas\n drawCanvas();\n\n //Stop when the duration has been reached\n if (elapsed >= duration) timer_draw.stop();\n }); //timer\n } //function fadeCanvasBackIn", "function fadeIn() {\n\n if (ctx.globalAlpha < 1) {\n ctx.globalAlpha += 0.001;\n paint(); }\n }", "startFade(){\n this.last_update = Date.now();\n this.color = \"#f4d742\";\n this.fade_rate = .2; //fades 20% every 100 ms\n this.transparency = 1;\n }", "function Effect() {\n for (var i = 0; i < nrImg; i++) {\n Vect[i].style.opacity = \"0\"; //to add the fade effect\n Vect[i].style.visibility = \"hidden\";\n }\n Vect[nrShown].style.opacity = \"1\";\n Vect[nrShown].style.visibility = \"visible\";\n}", "CrossFade() {}", "function slide_fadeFromForeToBack() {\n var delay = 100;\n var i = 0;\n var bgop=0;\n var fgop=1;\n\n document.getElementById(backImage).style.visibility = 'visible';\n\n if (fade_cursor < 1.01) {\n bgop = fade_cursor;\n fgop = 1-fade_cursor;\n setOpacity(foreImage,fgop);\n setOpacity(backImage,bgop);\n fade_cursor += 0.2;\n window.setTimeout(slide_fadeFromForeToBack, delay);\n }\n else {\n // End of the effect, we put backImage on the foreground\n fade_cursor = 0;\n\n slide_switchFgBg();\n\n setOpacity(foreImage,1);\n setOpacity(backImage,0);\n }\n}", "kill() {\n this.segments.forEach(s => s.el.style.opacity = '0.5');\n }", "function teardownFade() {\n fader.removeClass('show fadeOut');\n }", "function invFade(obj)\n {\n obj.removeClass('invisible')\n .addClass('animated fadeIn')\n }", "function fadeOut() {\n transitionPlane.emit('fadeOut');\n setTimeout(setBackwards, 100);\n}", "function flashUsedSequence () {\n\tusedSequence.forEach(function(element, index) {\n\t\tsetTimeout(function() {\n\t\t\t\t$(element).animate({\n\t\t\t\t\topacity: \"1\"\n\t\t\t\t}, 800).animate({\n\t\t\t\t\topacity: \"0.5\"\n\t\t\t\t}, 200)\n\t\t\t}, index * 1000);\n\t})\n}", "function fadeStuffs() {\n $(\".hidden\").fadeIn('slow', 'swing').removeClass('hidden');\n }", "fadeOutAllNonPersistent() {\n this._rippleRenderer.fadeOutAllNonPersistent();\n }", "fadeOutAllNonPersistent() {\n this._rippleRenderer.fadeOutAllNonPersistent();\n }", "function fade() {\n \n opacity -= 0.01\n \n \n wr.style.opacity = opacity\n if(wr.style.opacity <= 0){\n wr.style.opacity = 0;\n clearInterval(fadeOutTimer)\n translate()\n }\n\n}", "fadeOutAll() {\n this._rippleRenderer.fadeOutAll();\n }", "fadeOutAll() {\n this._rippleRenderer.fadeOutAll();\n }", "fadeOutAll() {\n this._rippleRenderer.fadeOutAll();\n }", "fadeIn() {\n const self = this;\n const $el = $(this.newContainer);\n // Hide old Container\n $(this.oldContainer).hide();\n\n $el.css({\n visibility: 'visible',\n opacity: 0\n });\n\n TweenMax.to($el, 0.4, {\n opacity: 1,\n onComplete: () => {\n this.done();\n }\n });\n }", "function fadeInAll(callback)\n\t{\n\t\tvar duration = _options.animationDuration;\n\n\t\t// fade-in hidden elements\n\n\t\t_svg.selectAll(\".pdb-chain-group\")\n\t\t\t.transition().duration(duration)\n\t\t\t.attr(\"opacity\", 1);\n\n\t\t_svg.selectAll(\".pdb-selection-rectangle-group\")\n\t\t\t.transition().duration(duration)\n\t\t\t.attr(\"opacity\", 1);\n\n\t\t_svg.selectAll(\".pdb-panel-y-axis-label-group\")\n\t\t\t.transition().duration(duration)\n\t\t\t.attr(\"opacity\", 1)\n\t\t\t.each(\"end\", function(){\n\t\t\t\tif (_.isFunction(callback)) {\n\t\t\t\t\tcallback();\n\t\t\t\t}\n\t\t\t});\n\t}", "function fadeOut(a){return a.style.opacity=1,function b(){(a.style.opacity-=.1)<0?a.style.display=\"none\":requestAnimationFrame(b)}(),!0}", "function startFade() {\n fader.addClass('fadeOut');\n setTimeout(teardownFade, FADE_DURATION_MS);\n }", "function finalOpacity() {\n firstText.style.transition = \"opacity 1.5s linear 0s\"\n let opacity = firstText.style.opacity = \"0\";\n setTimeout(finalText, 1500)\n}", "function fadeOut()\n{\n TweenMax.to(title, { duration: 2, opacity: 0}); \n TweenMax.to(bar, { duration: 2, opacity: 0});\n \n for(let i = 0; i < cols.length; i++)\n {\n TweenLite.to(cols[i], { duration: 5, opacity: 0}); \n }\n\n}", "function fadeCanvasBackIn() {\n //Transition settings\n var duration = 250;\n var ease = d3__WEBPACK_IMPORTED_MODULE_4__[\"easeQuadInOut\"]; //Calculate the opacity interpolator\n\n nodes.forEach(function (n) {\n n.interpolate_opacity = d3__WEBPACK_IMPORTED_MODULE_4__[\"interpolate\"](n.opacity, 1);\n });\n edges_concepts.forEach(function (l) {\n l.interpolate_opacity = d3__WEBPACK_IMPORTED_MODULE_4__[\"interpolate\"](l.opacity, opacity_concept_default);\n });\n edges_elements.forEach(function (l) {\n l.interpolate_opacity = d3__WEBPACK_IMPORTED_MODULE_4__[\"interpolate\"](l.opacity, opacity_element_default);\n }); //Fade everything back in\n\n timer_draw = d3__WEBPACK_IMPORTED_MODULE_4__[\"timer\"](function (elapsed) {\n //How far along the total duration are we (taking the easing into account)\n var t = ease(Math.min(1, elapsed / duration)); //Set new opacities\n\n nodes.forEach(function (n) {\n n.opacity = n.interpolate_opacity(t);\n });\n edges_concepts.forEach(function (l) {\n l.opacity = l.interpolate_opacity(t);\n });\n edges_elements.forEach(function (l) {\n l.opacity = l.interpolate_opacity(t);\n }); //Draw the canvas\n\n drawCanvas(); //Stop when the duration has been reached\n\n if (elapsed >= duration) timer_draw.stop();\n }); //timer\n } //function fadeCanvasBackIn", "function fadeCanvasBackIn() {\n //Transition settings\n var duration = 250;\n var ease = d3__WEBPACK_IMPORTED_MODULE_4__[\"easeQuadInOut\"]; //Calculate the opacity interpolator\n\n nodes.forEach(function (n) {\n n.interpolate_opacity = d3__WEBPACK_IMPORTED_MODULE_4__[\"interpolate\"](n.opacity, 1);\n });\n edges_concepts.forEach(function (l) {\n l.interpolate_opacity = d3__WEBPACK_IMPORTED_MODULE_4__[\"interpolate\"](l.opacity, opacity_concept_default);\n });\n edges_elements.forEach(function (l) {\n l.interpolate_opacity = d3__WEBPACK_IMPORTED_MODULE_4__[\"interpolate\"](l.opacity, opacity_element_default);\n }); //Fade everything back in\n\n timer_draw = d3__WEBPACK_IMPORTED_MODULE_4__[\"timer\"](function (elapsed) {\n //How far along the total duration are we (taking the easing into account)\n var t = ease(Math.min(1, elapsed / duration)); //Set new opacities\n\n nodes.forEach(function (n) {\n n.opacity = n.interpolate_opacity(t);\n });\n edges_concepts.forEach(function (l) {\n l.opacity = l.interpolate_opacity(t);\n });\n edges_elements.forEach(function (l) {\n l.opacity = l.interpolate_opacity(t);\n }); //Draw the canvas\n\n drawCanvas(); //Stop when the duration has been reached\n\n if (elapsed >= duration) timer_draw.stop();\n }); //timer\n } //function fadeCanvasBackIn", "function fade(fadeElem, cachedElem) {\n\t\topacityUp += 0.01;\n\t\topacityDown -= 0.01;\n\t\t\n\t\t\n\t\tfadeElem.style.opacity = opacityUp.toFixed(2); \n\t\tlastElem.style.opacity = opacityDown.toFixed(2);\n\t\n\t\tif (opacityUp.toFixed(2) == 1.00) \n\t\t {\n\t\t\t clearInterval(opct);\n\t\t\t lastElem.style.display = 'none';\n\t\t }\t\t \n\t }// end fade function\t ", "fadeOut() {\n const self = this;\n // \"Unload\" Animation - onComplete callback\n TweenMax.to($(this.oldContainer), 0.4, {\n opacity: 0,\n onComplete: () => {\n this.fadeIn();\n }\n });\n }", "function fadeSlide() {\n grabNextSlide();\n image.src = slides[currentSlide].image;\n caption = slides[currentSlide].caption;\n sequence.innerHTML = (currentSlide + 1) + \" / \" + slides.length;\n\n bufferCtx.canvas.width = slideshow.width;\n bufferCtx.canvas.height = slideshow.height;\n\n ctx.globalAlpha = 0.1;\n\n clearInterval(fadeTime);\n fadeTime = setInterval(fadeIn, 180);\n }", "function fadeOut(el){\n el.style.opacity = 1;\n (function fade(){\n if((el.style.opacity -= .05) < 0 ) {el.style.display = \"none\"; return;}\n requestAnimationFrame(fade);\n })(); \n}", "function _changeBg(index, arrayEl, time){\n\t\tif(index===0)\n\t\t\t$(arrayEl[0]).fadeIn(2000);\n\t\tsetTimeout(function(){\n $(arrayEl[index]).fadeOut(2000);\n if(index+1 < arrayEl.length)\n \t$(arrayEl[index+1]).fadeIn(2000);\n\n return index+1 === arrayEl.length ? _changeBg(0, arrayEl, time): _changeBg(index+1, arrayEl, time);\n }, time);\n\t}", "function fade () \r\n{\r\n\t \r\n\t popping_back = 1;\r\n\t\r\n selectText(); \r\n\t\r\n if (stack_num <= 6)\r\n{\r\n\t\r\n\t \r\n\t\r\n\tstack_behind_one = stack_num - 1; \r\n\r\n\tstack_behind_2 = stack_behind_one -1;\r\n \r\n\tif(stack_behind_one == 0)\r\n\t{\r\n\t\tstack_behind_one = 1; \r\n\t}\r\n\tvar anim = manager.createAnimObject(\"Stack\" + stack_behind_one); \r\n\tvar anim2 = manager.createAnimObject(\"bottom\" + stack_behind_one);\r\n\tvar anim3 = manager.createAnimObject(\"text\" + stack_behind_one);\r\n\tvar anim4 = manager.createAnimObject(\"spacer\" + stack_behind_2);\r\n\tvar anims = manager.createAnimObject(\"spacer\"+stack_behind_2); \r\n\tif(stack_behind_one>1)\r\n\t{\r\n\t\r\n\t\r\n anims.add({property: Prop.dimension, to: new Dim(1,5), \r\n duration: 1000}); \r\n anim4.add({property: Prop.backgroundColor, from: new Col(0,0,0), to: new Col(255,255,255), \r\n duration:1000}); \r\n anim.add({property: Prop.backgroundColor, from: new Col(100,205,55), to: new Col(255,255,255), \r\n duration:1000}); \r\n\t anim2.add({property: Prop.backgroundColor, from: new Col(10,105,55), to: new Col(255,255,255), \r\n duration:1000});\r\n\t anim3.add({property: Prop.backgroundColor, from: new Col(100,205,55), to: new Col(255,255,255), \r\n duration:1000});\r\n\t}// this is for the fadeing out animation\r\n\t \r\n\tif(stack_behind_one==1 && last == 0)\r\n\t{\r\n\t\tvar fin = manager.createAnimObject(\"Stack1\");\r\n\t\tvar fin2 = manager.createAnimObject(\"bottom1\");\r\n\tvar fin3 = manager.createAnimObject(\"text1\");\r\n\t\t\tfin.add({property: Prop.backgroundColor, from: new Col(100,205,55), to: new Col(255,255,255), duration:1000}); \r\n\t\t\t fin2.add({property: Prop.backgroundColor, from: new Col(10,105,55), to: new Col(255,255,255), \r\n duration:1000});\r\n\t\t\t fin3.add({property: Prop.backgroundColor, from: new Col(100,205,55), to: new Col(255,255,255), \r\n duration:1000});\r\n\t\t\t last = 1; \r\n\r\n\t}//this is to fade away the last stack\r\n\t \r\n\t \r\n}\r\n\r\nstack_num--;\r\nif (stack_num <1)\r\n{\r\nstack_num= 1;\r\n}\r\n\r\n}", "fadeOutAll() {\n this._activeRipples.forEach(ripple => ripple.fadeOut());\n }", "fadeOutAll() {\n this._activeRipples.forEach(ripple => ripple.fadeOut());\n }", "fadeOutAll() {\n this._activeRipples.forEach(ripple => ripple.fadeOut());\n }", "fadeUp(){\n this.animating = true;\n const item = this.getItem({foreground:this.index})\n \n this.tween = fromTo(\n this.setArtToNextAndCloak(item),\n DISSOLVE_DURATION / 1000,\n {opacity:0},\n {opacity:1, ease:Power4.easeOut, onComplete:this.onFadeUpComplete}\n )\n \n }", "CrossFadeQueued() {}", "function mouseOff() {\n $(this).fadeTo(500,0.2);\n }", "function hideRest(miniBox) {\n for (let i = 0; i < allBoxes.length; i++) {\n if (!allBoxes[i].isEqualNode(miniBox)) {\n allBoxes[i].style.animation = 'opacityFadeOut 0.25s ease-out forwards';\n }\n }\n for (let i = 0; i < allLines.length; i++) {\n allLines[i].style.animation = 'opacityFadeOut 0.25s ease-out forwards';\n }\n}", "function hideRest(miniBox) {\n for (let i = 0; i < allBoxes.length; i++) {\n if (!allBoxes[i].isEqualNode(miniBox)) {\n allBoxes[i].style.animation = 'opacityFadeOut 0.25s ease-out forwards';\n }\n }\n for (let i = 0; i < allLines.length; i++) {\n allLines[i].style.animation = 'opacityFadeOut 0.25s ease-out forwards';\n }\n}", "function updateFade() {\n let fade = false;\n if (!fadeValue.disabled) {\n fade = parseInt(fadeValue.value, 10) || 0;\n }\n\n clickPath.setFade(fade);\n heatMap.setFade(fade);\n}", "fadeOut() {\n return new Promise((resolve, reject) => {\n let timer = this.fadeOutTime;\n renderLoop(() => {\n if (timer <= 0) {\n G.lock.sceneSwitch = false;\n resolve();\n return false;\n }\n this.calcRepaintItems();\n this.stage.alpha = --timer / this.fadeOutTime;\n });\n });\n }", "function fade(opacity, d, i) {\n\t\tsvg.selectAll('path.chord')\n\t\t\t\t.filter(d => d.source.index != i && d.target.index != i)\n\t\t\t\t.transition()\n\t\t\t\t.duration(70)\n\t\t\t\t.style('stroke-opacity', opacity)\n\t\t\t\t.style('fill-opacity', opacity)\n\t}", "function fade(opacity) {\n\treturn function(d, i) {\n\t svg.selectAll(\"path.chord\")\n\t\t .filter(function(d) { return d.source.index != i && d.target.index != i; })\n\t\t .transition()\n\t\t .style(\"stroke-opacity\", opacity)\n\t\t .style(\"fill-opacity\", opacity);\n\t};\n }", "function fadeEffect() {\n $(\".selectPlayer\")\n .fadeOut(100)\n .fadeIn(100)\n .fadeOut(100)\n .fadeIn(100);\n}", "function fade() {\n op -= .01 * speedFactor;\n \n last.clearRect(0, 0, width, height);\n last.globalAlpha = op;\n last.drawImage(frames[current], 0, 0,frames[current].width,frames[current].height,0,0,width,height);\n\n next.clearRect(0, 0, width, height);\n next.globalAlpha = 1 - op;\n for(tempCurrent=current+1;tempCurrent<=frames.length;tempCurrent++){\n // Searching for the next image frame other than current frame\n if(typeof(frames[tempCurrent])!==\"undefined\" && frames[tempCurrent].tagName === \"IMG\"){\n break;\n } \n else if (tempCurrent === frames.length){\n tempCurrent = current;\n break;\n }\n }\n next.drawImage(frames[tempCurrent], 0, 0,frames[tempCurrent].width,frames[tempCurrent].height,0,0,width,height);\n\n ctx.clearRect(0, 0, width, height);\n ctx.drawImage(last.canvas, 0, 0);\n ctx.drawImage(next.canvas, 0, 0);\n\n if (op <= 0) {\n current++; \n setTimeout(nextImage, 2000/speedFactor);}\n else {\n requestAnimationFrame(fade);\n } \n}", "function unhideContent(){\n for(var j=0;j<4;j++){\n document.getElementsByClassName(\"show-after-start\")[j].style.cssText = \"display:contents;\";\n document.getElementsByClassName(\"show-after-start\")[j].style.cssText = \"animation: fadein 1s;\";\n }\n\n}", "function fade(opacity) {\n return function(d, i) {\n svg.selectAll(\"path.chord\")\n .filter(function(d) { return d.source.index != i && d.target.index != i; })\n\t\t.transition()\n .style(\"stroke-opacity\", opacity)\n .style(\"fill-opacity\", opacity);\n };\n}", "function fade(opacity) {\n return function(d, i) {\n svg.selectAll(\"path.chord\")\n .filter(function(d) { return d.source.index != i && d.target.index != i; })\n\t\t.transition()\n .style(\"stroke-opacity\", opacity)\n .style(\"fill-opacity\", opacity);\n };\n}", "function fadeOut(el){\n\t\t\n\t\t\t\t\tel.style.opacity = 1;\n\t\n\t\t\t\t\t(function fade() {\n\t\t\t\t\t\tif ((el.style.opacity -= 0.4) < 0) {\n\t\t\t\t\t\t\tel.style.opacity = 0;\n\t\t\t\t\t\t\tel.style.display = 'none';\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\twindow.requestAnimationFrame(fade);\n\t\t\t\t\t\t}\n\t\t\t\t\t})();\n\t\t\t\t}", "function fade(opacity) {\n return function(g, i) {\n svg.selectAll(\".chord path\")\n .filter(function(d) { return d.source.index != i && d.target.index != i; })\n .transition()\n .style(\"opacity\", opacity);\n };\n }", "function fade(opacity) {\n return function(g, i) {\n svg.selectAll(\".chord path\")\n .filter(function(d) { return d.source.index != i && d.target.index != i; })\n .transition()\n .style(\"opacity\", opacity);\n };\n }", "shiftOpacity() {\n\t\tconst shift = (Math.random() - 0.5) * this.opacityVar;\n\t\tthis.opacity = shift;\n\t}", "function FADER() {\n $('.FADE').hide(0).delay(500).fadeIn(500);\n console.log('done');\n }", "function Effect()\n{\n for (var i = 0; i < nrImg; i++)\n {\n Vect[i].style.opacity = \"0\"; //to add the fade effect\n Vect[i].style.visibility = \"hidden\";\n\n\n document.getElementById(\"STitle\" + i).style.visibility = \"hidden\";\n document.getElementById(\"SCaption\" + i).style.visibility = \"hidden\";\n }\n Vect[nrShown].style.opacity = \"1\";\n Vect[nrShown].style.visibility = \"visible\";\n\n document.getElementById(\"STitle\" + nrShown).style.visibility = \"visible\";\n document.getElementById(\"SCaption\" + nrShown).style.visibility = \"visible\";\n}", "'transparent'(callback) {\n\t\tthis.style('opacity', 0, callback);\n\t}", "fadeOut() {\n this._renderer.fadeOutRipple(this);\n }", "fadeOut() {\n this._renderer.fadeOutRipple(this);\n }", "fadeOut() {\n this._renderer.fadeOutRipple(this);\n }", "function fadeAll() {\n window.grid = document.getElementById(\"grid\");\n grid.className = \"fade\";\n}", "function fadeCanvasBackIn() {\n //Transition settings\n var duration = 500;\n var ease = d3__WEBPACK_IMPORTED_MODULE_6__[\"easeQuadInOut\"]; //Calculate the opacity interpolator\n\n nodes.forEach(function (n) {\n n.interpolate_opacity = d3__WEBPACK_IMPORTED_MODULE_6__[\"interpolate\"](n.opacity, 1);\n });\n edges_primary.forEach(function (l) {\n l.interpolate_opacity = d3__WEBPACK_IMPORTED_MODULE_6__[\"interpolate\"](0, 1);\n }); //Fade everything back in\n\n timer_draw = d3__WEBPACK_IMPORTED_MODULE_6__[\"timer\"](function (elapsed) {\n //How far along the total duration are we (taking the easing into account)\n var t = ease(Math.min(1, elapsed / duration));\n clearCanvas([ctx_edges, ctx_nodes, ctx_hover, ctx_hidden]); // //Test to draw the centers of the communities\n // drawCommunityCenters()\n //Set new opacities and draw\n\n nodes.forEach(function (n) {\n n.opacity = n.interpolate_opacity(t);\n drawNodes(ctx_nodes, n, n.r, n.opacity);\n }); //Concept labels\n\n renderNodeLabels(ctx_nodes, nodes);\n edges_primary.forEach(function (l) {\n var opacity = l.interpolate_opacity(t);\n ctx_edges.globalAlpha = opacity;\n drawEdges(ctx_edges, l, l.gradient);\n });\n ctx_edges.globalAlpha = 1; //Stop when the duration has been reached\n\n if (elapsed >= duration) timer_draw.stop();\n }); //timer\n } //function fadeCanvasBackIn", "function changeBackground() {\n //$('#wrapper_bottom').fadeOut({queue: false, duration: 'slow'});\n $('#wrapper_bottom')\n .animate({\"opacity\": 1}, {\n duration:1000,\n complete:function(){\n changeImage('#hero', images[i], 1);\n if (++i >= images.length) { i = 0; } \n $(\"#wrapper_bottom\").css(\"opacity\", 0);\n changeImage('#wrapper_bottom', images[i]);\n },\n step:function(){\n return 0.001;\n }\n\n });\n }//changeBackground", "setupFade(fadeTime, from, to, onFadeDone) {}", "function fade(opacity) {\n return function(g, i) {\n svg.selectAll(\".chord path\")\n .filter(function(d) { return d.source.index != i && d.target.index != i; })\n .transition()\n .style(\"opacity\", opacity);\n };\n }", "function fadeInDisplay(el) {\nel.style.display = 'block';\nel.style.opacity = 0;\nvar last = +new Date();\nvar tick = function() {\n el.style.opacity = +el.style.opacity + (new Date() - last) / 400;\n last = +new Date();\n if (+el.style.opacity < 1) {\n (window.requestAnimationFrame && requestAnimationFrame(tick)) || setTimeout(tick, 16);\n }\n};\ntick();\n}", "function fadeCanvasBackIn() {\n //Transition settings\n var duration = 250;\n var ease = d3__WEBPACK_IMPORTED_MODULE_4__[\"easeQuadInOut\"]; /////////// Calculate the opacity interpolators //////////\n //The domain to ICH element edges\n\n edges_domain.forEach(function (n) {\n n.interpolate_opacity = d3__WEBPACK_IMPORTED_MODULE_4__[\"interpolate\"](n.opacity, opacity_edge_default);\n }); //Domain arcs\n\n domain_arcs.forEach(function (n) {\n n.interpolate_opacity = d3__WEBPACK_IMPORTED_MODULE_4__[\"interpolate\"](n.opacity, 1);\n }); //The ICH element arcs\n\n element_arcs.forEach(function (n) {\n n.interpolate_opacity = d3__WEBPACK_IMPORTED_MODULE_4__[\"interpolate\"](n.opacity, 1);\n }); //The ICH circles\n\n elements.forEach(function (n) {\n n.interpolate_opacity = d3__WEBPACK_IMPORTED_MODULE_4__[\"interpolate\"](n.opacity, 1);\n }); //The edges between the ICH and countries\n\n edges_country.forEach(function (n) {\n n.interpolate_opacity = d3__WEBPACK_IMPORTED_MODULE_4__[\"interpolate\"](n.opacity, 0);\n }); //The country arcs\n\n area_arcs.forEach(function (n) {\n n.interpolate_opacity = d3__WEBPACK_IMPORTED_MODULE_4__[\"interpolate\"](n.opacity, 0.5);\n n.interpolate_opacity_text = d3__WEBPACK_IMPORTED_MODULE_4__[\"interpolate\"](n.opacity_text, 1);\n }); //The country diamonds\n\n countries.forEach(function (n) {\n n.interpolate_opacity = d3__WEBPACK_IMPORTED_MODULE_4__[\"interpolate\"](n.opacity, 1);\n n.interpolate_opacity_text = d3__WEBPACK_IMPORTED_MODULE_4__[\"interpolate\"](n.opacity_text, country_text_opacity);\n }); //Fade everything back in\n\n timer_draw = d3__WEBPACK_IMPORTED_MODULE_4__[\"timer\"](function (elapsed) {\n //How far along the total duration are we (taking the easing into account)\n var t = ease(Math.min(1, elapsed / duration)); //Set new opacities\n\n elements.forEach(function (n) {\n n.opacity = n.interpolate_opacity(t);\n });\n countries.forEach(function (n) {\n n.opacity = n.interpolate_opacity(t);\n n.opacity_text = n.interpolate_opacity_text(t);\n });\n edges_domain.forEach(function (l) {\n l.opacity = l.interpolate_opacity(t);\n });\n edges_country.forEach(function (l) {\n l.opacity = l.interpolate_opacity(t);\n });\n domain_arcs.forEach(function (n) {\n n.opacity = n.interpolate_opacity(t);\n });\n element_arcs.forEach(function (n) {\n n.opacity = n.interpolate_opacity(t);\n });\n area_arcs.forEach(function (n) {\n n.opacity = n.interpolate_opacity(t);\n n.opacity_text = n.interpolate_opacity_text(t);\n }); //Draw the canvas\n\n drawCanvas(); //Stop when the duration has been reached\n\n if (elapsed >= duration) timer_draw.stop();\n }); //timer\n } //function fadeCanvasBackIn", "function fadeIn(el){\n el.style.opacity = 0;\n el.style.display = \"inline-block\";\n (function fade(){\n var val = parseFloat(el.style.opacity);\n if(!((val += .05) > 1)) {\n el.style.opacity = val; \n requestAnimationFrame(fade);\n }\n })();\n}", "function fade() {\n fadeObj.style.opacity = count;\n}", "function animateFullLines() {\n\n playerLevelEnvironment.fullLineFadeAnimationCounter--;\n\n if (playerLevelEnvironment.fullLineFadeAnimationCounter === 0) {\n playerLevelEnvironment.fullLineFadeAnimationCounter = gameLevelEnvironment.fullLineFadeAnimationLength;\n return true;\n } else {\n return false;\n }\n }", "function fade(opacity) {\n return function(g, i) {\n svg.selectAll(\".chord path\")\n .filter(function(d) { return d.source.index != i && d.target.index != i; })\n .transition()\n .duration(500)\n .style(\"opacity\", opacity);\n\n svg.selectAll(\".text2\")\n .filter(function(d) { return acres(d.index); })\n .transition()\n .duration(500)\n .attr(\"opacity\", 1 - opacity)\n .attr(\"style\", \"font-size: 9; font -family: Helvetica, sans-serif\");\n\n svg.selectAll(\".text3\")\n .filter(function(d) { return acres(d.index); })\n .transition()\n .duration(500)\n .attr(\"opacity\", 1 - opacity)\n .attr(\"style\", \"font-size: 13; font -family: Helvetica, sans-serif\");\n };\n }", "async function unHideRest(miniBox) {\n await new Promise(r => setTimeout(r, 200));\n for (let i = 0; i < allBoxes.length; i++) {\n if (!allBoxes[i].isEqualNode(miniBox)) {\n allBoxes[i].style.animation = 'opacityFadeIn 0.25s ease-out forwards';\n }\n }\n for (let i = 0; i < allLines.length; i++) {\n allLines[i].style.animation = 'opacityFadeIn 0.25s ease-out forwards';\n }\n}", "async function unHideRest(miniBox) {\n await new Promise(r => setTimeout(r, 200));\n for (let i = 0; i < allBoxes.length; i++) {\n if (!allBoxes[i].isEqualNode(miniBox)) {\n allBoxes[i].style.animation = 'opacityFadeIn 0.25s ease-out forwards';\n }\n }\n for (let i = 0; i < allLines.length; i++) {\n allLines[i].style.animation = 'opacityFadeIn 0.25s ease-out forwards';\n }\n}", "function fadeOut(el) {\n el.style.opacity = 1;\n el.style.display = \"none\";\n}", "function fading(circle,duration) {\n\tcircle.transition(\"fading\").delay(duration).duration(duration/2).style(\"opacity\",1e-6).remove()\n}", "function resetStyle($el, fx) {\r\n\t\t\t$el.css({ display: '' });\r\n\t\t\tif (!$.support.opacity && fx.opacity) {\r\n\t\t\t\t$el[0].style.removeAttribute('filter');\r\n\t\t\t}\r\n\t\t}", "function fadeOut(el) {\n el.style.opacity = 1;\n (function fade() {\n if ((el.style.opacity -= 0.1) < 0) {\n el.style.display = \"none\";\n } else {\n requestAnimationFrame(fade);\n }\n })();\n}", "function crossfade() {\n\t\tif (cow.randomBiomesActive == false) {\n\t\t\tif (biome == cow.currentBiome && preventSecondFadeIn == false) {// If the biome is the same as when the bgSquare spawned..\n\t\t\t\tbgSquare.alpha = Math.sin(q);\t\t\t\t\t\t\t\t// calculate alpha with a sinewave\n\t\t\t\tq += (1/lifespan)/76;\t\t\t\t\t\t\t\t\t\t// increment. lifespan is tuned to be in minutes\n\t\t\t}\n\n\t\t\tif (biome != cow.currentBiome) {\t\t\t\t\t\t\t\t// If the biome has changed..\n\t\t\t\tbgSquare.alpha -= lifespan/20000;\t\t\t\t\t\t\t// Fade out\n\t\t\t\tpreventSecondFadeIn = true;\n\t\t\t}\n\t\t} else {\n\t\t\tbgSquare.alpha = Math.sin(q);\t\t\t\t\t\t\t\t// skip most of the logic for randomBiomes and just animate\n\t\t\tq += (1/lifespan)/76;\n\t\t}\n\n\t\tif (q > 3.2 || bgSquare.alpha <= 0.01) {\t\t\t\t\t\t// if gradient has faded out.. (3.14 is one sinwave cycle)\n\t\t\tbgSquare.destroy(true);\t\t\t\t\t\t\t\t\t\t// kill it\n\t\t} else { setTimeout(function() { window.requestAnimationFrame(crossfade); }, 250) } // Throttled to 4FPS\n\t}", "function fade(opacity) {\r\n\t return function(d,i) {\r\n\t \tsvg.selectAll(\".chord path\")\r\n\t \t\t.filter(function(d) { return d.source.index != i && d.target.index != i; })\r\n\t \t\t.transition()\r\n\t \t.style(\"opacity\", opacity);\r\n\t };\r\n\t}", "function myFade(elem) {\n if (elem.fadePower == 1) {\n elem.fadePower = 0.3;\n } else {\n elem.fadePower = 1;\n }\n elem.fadeTo('fast', elem.fadePower);\n }", "function fadeIn(ms) {\n\t// array of random steps\n\tsteps = [];\n\tvar rows = cipherblock.length;\n\tvar cols = cipherblock[0].length;\n\tfor (var row=0; row<rows; row++) {\n\t\tsteps[row] = [];\n\t\tfor (var col=0; col<cols; col++) {\n\t\t\tsteps[row][col] = Math.max(Math.random()/20, 0.02);\n\t\t\tcipherblock[row][col].style.opacity = 0;\n\t\t}\n\t}\n\t\n\tvar total = cipherblock.length * cipherblock[0].length;\n\tvar completed = 0;\n\t\n\tvar id = setInterval(frame, ms);\n\tvar count = 0;\n\tvar opacity;\n\tfunction frame() {\n\t\tfor (var row=0; row<rows; row++) {\n\t\t\tfor (var col=0; col<cols; col++) {\n\t\t\t\topacity = parseFloat(cipherblock[row][col].style.opacity);\n\t\t\t\tif (opacity >= 1) continue; // already finished this one\n\t\t\t\topacity += steps[row][col];\n\t\t\t\tif (opacity >= 1) {\n\t\t\t\t\topacity = 1;\n\t\t\t\t\tcompleted++;\n\t\t\t\t}\n\t\t\t\tcipherblock[row][col].style.opacity = opacity;\n\t\t\t}\n\t\t}\n\t\tif (completed == total) {\n\t\t\tclearInterval(id);\n\t\t}\n\t}\n}", "function fade(opacity) {\n return function(g, i) {\n\n console.log(\"Test\");\n\n svg.selectAll(\".chord path\")\n .filter(function(d) { return d.source.index != i && d.target.index != i; })\n .transition()\n .style(\"fill\", \"#FF0000\");\n };\n}", "function prev() {\n\n let itemIndex = document.querySelectorAll(`${selector} > div`)[index]\n\n slideItem.forEach(slideItem => {\n slideItem.style.display = 'none'\n slideItem.style.opacity = '0'\n slideItem.querySelector('img').classList.add('transformAdd');\n itemIndex.querySelector('img').classList.remove('transformClear');\n })\n\n itemIndex.style.display = 'block'\n itemIndex.style.transition = 'all ' + (interval * 0.001) + 's';\n\n let intervalOpacity = setInterval(function () {\n\n opacityIndex += 100\n\n itemIndex.style.transition = 'all ' + (interval * 0.001) + 's';\n\n itemIndex.style.opacity = opacityIndex;\n itemIndex.querySelector('img').classList.remove('transformAdd');\n itemIndex.querySelector('img').classList.add('transformClear');\n\n if (opacityIndex >= 1000) {\n clearInterval(intervalOpacity, 10)\n opacityIndex = 0\n }\n\n }, (interval * 0.001))\n\n }", "function collTransition() {\n $('.gallery, .data_table', '#collection').fadeOut(function() {\n $('.gallery ul.ace-thumbnails, .data_table ul','#collection').empty();\n });\n $('.gallery, .data_table','#collection').fadeIn();\n }", "function resetOpacity() {\n for (let i = 0; i < dice.length; i++) {\n let element = document.getElementById(\"dice\" + i);\n dice[i].locked = false;\n element.style.opacity = \"1\";\n }\n}", "function fade(opacity) {\n return function(g, i) {\n svg.selectAll(\".chord path\")\n .filter(function(d) { return d.source.index !== i && d.target.index !== i; })\n .transition()\n .style(\"opacity\", opacity);\n };\n}", "function fade(opacity) {\n return function(g, i) {\n svg.selectAll(\"g.chord path\")\n .filter(function(d) {\n return d.source.index != i && d.target.index != i;\n })\n .transition()\n .style(\"opacity\", opacity);\n };\n }", "function fade(opacity) {\n return function(g, i) {\n svg.selectAll(\"g.chord path\")\n .filter(function(d) {\n return d.source.index != i && d.target.index != i;\n })\n .transition()\n .style(\"opacity\", opacity);\n };\n }", "function reflow(pulse, _) {\n return pulse.reflow(_.modified()).modifies('opacity');\n }", "function fadeIn(g, i) {\n\t \n\t chart.selectAll(\".circles\")\n\t \t.transition()\n\t .style(\"opacity\", .25);\n\t \n\t chart.selectAll(\".circles-text\")\n\t \t.transition()\n\t .style(\"opacity\", 1);\n\t \n\t chart.selectAll(\".nz\")\n\t \t.transition()\n\t .style(\"opacity\", .85);\n\t \n\t tooltip.style(\"visibility\", \"hidden\");\n\t \n\t}", "function fade(opacity) {\n return function (g, i) {\n svg.selectAll(\".chord path\")\n .filter(function (d) { return d.source.index != i && d.target.index != i; })\n .transition()\n .style(\"opacity\", opacity);\n };\n }", "function hide() {\n\t var time = arguments.length <= 0 || arguments[0] === undefined ? 200 : arguments[0];\n\t\n\t this.transition().duration(time).style('opacity', 0);\n\t }", "function allFadeOut(){\n $('.info').fadeOut();\n\n}", "function fadeCanvasBackIn() {\n //Transition settings\n var duration = 500;\n var ease = d3__WEBPACK_IMPORTED_MODULE_6__[\"easeQuadInOut\"]; //Calculate the opacity interpolator\n\n nodes.forEach(function (n) {\n n.interpolate_opacity = d3__WEBPACK_IMPORTED_MODULE_6__[\"interpolate\"](n.opacity, 1);\n });\n edges_primary.forEach(function (l) {\n var opacity = l.weight === 3 ? 1 : 0.35;\n l.interpolate_opacity = d3__WEBPACK_IMPORTED_MODULE_6__[\"interpolate\"](0, opacity);\n });\n var zoom_line_width = zoom_edge_increase(transform.k) * primary_line_width; //Fade everything back in\n\n timer_draw = d3__WEBPACK_IMPORTED_MODULE_6__[\"timer\"](function (elapsed) {\n //How far along the total duration are we (taking the easing into account)\n var t = ease(Math.min(1, elapsed / duration));\n clearCanvas([ctx_edges, ctx_nodes, ctx_hover, ctx_hidden]); //Set new opacities and draw\n\n nodes.forEach(function (n) {\n n.opacity = n.interpolate_opacity(t);\n drawNodes(ctx_nodes, n, n.r, n.opacity);\n }); //Concept labels\n\n renderNodeLabels(ctx_nodes, nodes);\n edges_primary.forEach(function (l) {\n var line_width = zoom_line_width * (l.weight === 3 ? 1.6 : 1);\n drawEdges(ctx_edges, l, l.gradient, line_width, l.interpolate_opacity(t));\n });\n ctx_edges.globalAlpha = 1; //Stop when the duration has been reached\n\n if (elapsed >= duration) timer_draw.stop();\n }); //timer\n } //function fadeCanvasBackIn", "function fade(opacity) {\n return function(g, i) {\n svg.selectAll(\".chord path\")\n .filter(function(d) { return d.source.index != i && d.target.index != i; })\n .transition()\n .style(\"opacity\", opacity);\n };\n}", "function fade(opacity) {\n return function(d, i) {\n wrapper.selectAll(\"path.chord\")\n .filter(function(d) { return d.source.index !== i && d.target.index !== i && Names[d.source.index] !== \"\"; })\n .transition()\n .style(\"opacity\", opacity);\n };\n }//fade", "function fade(opacity) {\n return function(d, i) {\n\twrapper.selectAll(\"path.chord\")\n\t\t.filter(function(d) { return d.source.index != i && d.target.index != i && Names[d.source.index] != \"\"; })\n\t\t.transition()\n\t\t.style(\"opacity\", opacity);\n };\n}//fade", "function fadeBands(){\n d3.selectAll('path.band')\n .each(function(d){\n // Bring the non-faded bands to the front\n if(d.a.faded() || d.b.faded()){ d3.select(this).moveToBack(); }\n // if(!d.a.faded() && !d.b.faded()){ d3.select(this).moveToFront(); }\n })\n .transition()\n .duration(500)\n .style('stroke', function(d){ return bandColor(d); });\n }", "function fade(opacity) {\n return function(g, i) {\n svg.selectAll(\".chord path\")\n .filter(function(d) { return d.source.index != i && d.target.index != i; })\n .style(\"opacity\", opacity);\n };\n }" ]
[ "0.6797845", "0.65668094", "0.64115626", "0.6408924", "0.63687515", "0.63457304", "0.6339796", "0.63162446", "0.6304784", "0.629979", "0.62893593", "0.6220785", "0.6220102", "0.6219726", "0.6199934", "0.6195979", "0.6195979", "0.61893684", "0.6164438", "0.6164438", "0.6164438", "0.61622286", "0.61605626", "0.61475027", "0.61457473", "0.6064596", "0.604861", "0.60332406", "0.60332406", "0.6026283", "0.6021796", "0.6014419", "0.6002769", "0.5999471", "0.5974919", "0.5972789", "0.5972789", "0.5972789", "0.5945804", "0.5901406", "0.5890617", "0.5873383", "0.5873383", "0.5868959", "0.58577204", "0.58519", "0.58455026", "0.5829925", "0.58223593", "0.5817464", "0.58005184", "0.58005184", "0.5791472", "0.5790397", "0.5790397", "0.57875675", "0.5783899", "0.5779357", "0.5777689", "0.5770244", "0.5770244", "0.5770244", "0.57696915", "0.5768838", "0.5761292", "0.5753576", "0.5749562", "0.5748266", "0.5743544", "0.5738946", "0.57345587", "0.57324475", "0.57264805", "0.5724199", "0.5724199", "0.5724079", "0.5721549", "0.5720243", "0.5717779", "0.57170045", "0.57167983", "0.5715615", "0.571302", "0.5711297", "0.5710527", "0.5710469", "0.57095355", "0.5709411", "0.5703519", "0.5703519", "0.57008314", "0.5696118", "0.5692161", "0.5690578", "0.5684934", "0.5683984", "0.567376", "0.56605303", "0.5654151", "0.5652499", "0.56520104" ]
0.0
-1
Given a node in a partition layout, return an array of all of its ancestor nodes, highest first, but excluding the root.
function getAncestors(node) { var path = []; var current = node; while (current.parent) { path.unshift(current); current = current.parent; } return path; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "getAncestors(node) {\n var path = [];\n var current = node;\n while (current.parent) {\n path.unshift(current);\n current = current.parent;\n }\n return path;\n }", "function getAncestors(node) {\r\n var path = [];\r\n var current = node;\r\n while (current.parent) {\r\n path.unshift(current);\r\n current = current.parent;\r\n }\r\n return path;\r\n }", "function getAncestors(node) {\n var path = [];\n var current = node;\n while (current.parent) {\n path.unshift(current);\n current = current.parent;\n }\n return path;\n }", "function getAncestors(node) {\n const path = [];\n let current = node;\n while (current.parent) {\n path.unshift(current);\n current = current.parent;\n }\n return path;\n}", "function getAncestors(node) {\n var path = [];\n var current = node;\n while (current.parent) {\n path.unshift(current);\n current = current.parent;\n }\n return path;\n }", "function getAncestors(node) {\n var path = [];\n var current = node;\n while (current.parent) {\n path.unshift(current);\n current = current.parent;\n }\n return path;\n}", "function getAncestors(node) {\n var path = [];\n var current = node;\n while (current.parent) {\n path.unshift(current);\n current = current.parent;\n }\n return path;\n}", "function getAncestors(node) {\n var path = [];\n var current = node;\n while (current.parent) {\n path.unshift(current);\n current = current.parent;\n }\n return path;\n}", "function getAncestors(node) {\n var path = [];\n var current = node;\n while (current.parent) {\n path.unshift(current);\n current = current.parent;\n }\n return path;\n }", "function getAncestors(node) {\n var path = [];\n var current = node;\n while (current.parent) {\n path.unshift(current);\n current = current.parent;\n }\n return path;\n }", "function getAncestors(node) {\n var path = [];\n var current = node;\n while (current.parent) {\n path.unshift(current);\n current = current.parent;\n }\n return path;\n }", "function getAncestors(node) {\n\t\t\tlet path = [];\n\t\t\tlet current = node;\n\t\t\twhile (current.parent) {\n\t\t\t\tpath.unshift(current);\n\t\t\t\tcurrent = current.parent;\n\t\t\t}\n\t\t\treturn path;\n\t\t}", "getAncestors(node) {\n\t\t\tconst path = [];\n\t\t\tlet current = node;\n\t\t\twhile (current.parent) {\n\t\t\t\tpath.unshift(current);\n\t\t\t\tcurrent = current.parent;\n\t\t\t}\n\t\t\tpath.unshift(current);\n\t\t\treturn path;\n\t\t}", "function getAncestors(node) {\n\tvar path = [];\n\tvar current = node;\n\twhile (current.parent) {\n\t\tpath.unshift(current);\n\t\tcurrent = current.parent;\n\t}\n\t\n\t// mskim, 상단 바에 root function이 안보이는 문제 수정 \n\tpath.unshift(current);\n\n\treturn path;\n}", "function nodeAndAncestors(node) {\n var ancestors = [node];\n var p = node;\n while (p = p.parentNode || p.ownerElement) {\n ancestors.unshift(p);\n }\n return ancestors;\n }", "function nodeAndAncestors(node) {\n var ancestors = [node];\n var p = node;\n while (p = p.parentNode || p.ownerElement) {\n ancestors.unshift(p);\n }\n return ancestors;\n }", "function parents(node) {\n var nodes = [];\n for (; node; node = node.parentNode) {\n nodes.unshift(node);\n }\n return nodes;\n}", "function getAncestors(node, selector){\n\n var ancestors = [];\n\n while(( node = node.parentElement )){\n if( node.matches(selector) ){ ancestors.push(node); }\n }\n return ancestors;\n}", "function parents(node) {\n var nodes = [node]\n for (; node; node = node.parentNode) {\n nodes.unshift(node)\n }\n return nodes\n }", "function parents(n) {\n const p = [];\n while (n.parent) {\n n = n.parent;\n p.push(n);\n }\n return p;\n}", "function getDescendants(node) {\n if (isPortal(node)) {\n return getPortalContent(node);\n }\n return node.__k || [];\n}", "function allAncestorCollections(p) {\n var p0 = pathCollections();\n var r = [];\n if (isPathPrefix(p0, p)) {\n r.unshift(p);\n while (p != p0) {\n var o = splitPath(p);\n p = o.cpath;\n r.unshift(p);\n }\n }\n return r;\n}", "_gatherParentComponents() {\n let node = this;\n const parents = [node];\n while (node.parentComponent) {\n node = node.parentComponent;\n parents.unshift(node);\n }\n return parents;\n }", "getPredecessors(node) {\n const edges = new DynamicArray();\n for (let i = 0; i < this.nbNodes; i++) {\n if (this.hasEdge(i, node)) {\n edges.add(edges.getSize(), i);\n }\n }\n return edges;\n }", "function ancestors (ref, names, onlyFirst) {\n var res = [];\n if (typeof names === \"string\") names = [names];\n while (ref.parentNode && ref.parentNode.nodeType === 1) {\n if (names.indexOf(ref.parentNode.tagName.toLowerCase()) > -1) {\n if (onlyFirst) return ref.parentNode;\n res.push(ref.parentNode);\n }\n ref = ref.parentNode;\n }\n return onlyFirst ? null : res;\n }", "get ancestors () {\n return this.parents.reduce((parents, patch) => {\n return parents.concat([ patch ]).concat(patch.parents);\n }, []);\n }", "function nonInlineAncestors(elt) {\n const result = [];\n while (elt != null && elt.tagName != 'BODY') {\n const eltDisplay = getComputedStyle(elt).display;\n switch (eltDisplay) {\n case 'inline':\n // Ignore this element\n break;\n\n default:\n result.unshift(elt);\n break;\n }\n\n elt = elt.parentNode;\n }\n return result;\n}", "FindRoots() {\n let roots = new Array();\n for (let i = 0; i < this.NodeList.length; i++) {\n if (this.NodeList[i].parents.length == []) {\n roots.push(this.NodeList[i]);\n }\n }\n return roots;\n }", "function getAncestorsByClass(node, style, ancestors) {\n\n if (!ancestors || ancestors.length === 0) {\n _ancestors = [];\n } else {\n _ancestors = ancestors;\n }\n\n console.log('getAncestorsByClass() -- node', node);\n console.log('getAncestorsByClass() -- style', style);\n console.log('getAncestorsByClass() -- ancestors', ancestors);\n console.log('getAncestorsByClass() -- _ancestors', _ancestors);\n\n if (node.parentElement && node.parentElement.id === pElementID) {\n return _ancestors;\n } else if (node.parentElement && node.parentElement.className && node.parentElement.className.indexOf(style) >= 0) {\n _ancestors.push(node.parentElement);\n return getAncestorsByClass(style, node.parentElement, _ancestors);\n }\n\n return _ancestors;\n\n }", "parents()\n\t{\n\t\tlet list = [];\n\n\t\tlet ref = this;\n\t\ttree.findConnections({node2: ref})\n\t\t\t.forEach(connection =>\n\t\t{\n\t\t\tif (list.indexOf(connection.outputPlug.node) == -1)\n\t\t\t\tlist.push(connection.outputPlug.node);\n\t\t});\n\n\t\treturn list;\n\t}", "lowestCommonAncestor(node1, node2) {\n \n }", "lowestCommonAncestor(node1, node2) {\n \n }", "function flatten(node) { // array of \"leaf\" subnodes in order of appearance.\r\n if (!node) {\r\n // // console.log(\"null object passed to flatten as node\");\r\n return [];\r\n }\r\n if (node.hasChildNodes()) {\r\n var brood = node.childNodes;\r\n var familySize = brood.length;\r\n var returnValue = [];\r\n for (var k = 0; k < familySize; k++) {\r\n returnValue = returnValue.concat(flatten(brood[k]));\r\n }\r\n return (returnValue);\r\n } else if (node.nodeType == Node.TEXT_NODE) {\r\n return ([node]);\r\n } else return ([]);\r\n}", "function toLeavesArray(node, arr) {\n var array = arr || [];\n\n if (!node.childs || node.childs.length === 0) {\n array.push(node);\n return array;\n }\n\n for (var i = 0; i < node.childs.length; i++) {\n toLeavesArray(node.childs[i], array);\n }\n\n return array;\n}", "function ancestors(first, second) {\n var path = [];\n\n for (var n in first.path) {\n if (first.path[n] !== second.path[n]) break;\n path.push(first.path[n]);\n }\n return path;\n}", "function ancestors(first, second) {\n var path = [];\n\n for (var n in first.path) {\n if (first.path[n] !== second.path[n]) break;\n path.push(first.path[n]);\n }\n return path;\n}", "nodes() {\r\n if (this.isEmpty()) return [];\r\n return this.nodesHelper1(this.min().key, this.max().key);\r\n }", "get hierarchy()\n {\n let hierarchy = [];\n let parent = this;\n while (typeof parent !== 'undefined')\n {\n hierarchy.push(parent);\n parent = parent.parent;\n }\n return hierarchy;\n }", "collateIds(node) {\n let result = [];\n // debug diagnostic\n if (!node) {\n return [];\n }\n if (node.left) {\n result = this.collateIds(this.nodes[node.left]);\n }\n result.push(node.id);\n result.push(...node.siblings);\n if (node.right) {\n result.push(...this.collateIds(this.nodes[node.right]));\n }\n return result;\n }", "lowestCommonAncestor(node1, node2) {}", "*ancestors(root, path) {\n var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n\n for (var p of Path.ancestors(path, options)) {\n var n = Node.ancestor(root, p);\n var entry = [n, p];\n yield entry;\n }\n }", "*ancestors(root, path) {\n var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n\n for (var p of Path.ancestors(path, options)) {\n var n = Node.ancestor(root, p);\n var entry = [n, p];\n yield entry;\n }\n }", "dfsPreOrder() {\n let result = [];\n function traverse(node, arr) {\n arr.push(node);\n if (node.left) traverse(node.left);\n if (node.right) traverse(node.right);\n }\n traverse(this.root, result);\n return result;\n }", "dfsPreOrder() {\n let result = [];\n\n const traverse = node => {\n result.push(node.data);\n if (node.left) {\n traverse(node.left)\n }\n if (node.right) {\n traverse(node.right)\n }\n }\n traverse(this.root);\n\n return result;\n }", "function getAncestry() {\n var path = this;\n var paths = [];\n do {\n paths.push(path);\n } while (path = path.parentPath);\n return paths;\n}", "function getAncestorPath (objX3D){\r\n\tvar arrParents = [];\r\n\tconsole.log(objX3D);\r\n\tvar objChild = objX3D;\r\n\tarrParents.push(objChild);\r\n\t//console.log(arrParents[0]);\r\n\twhile (objChild.tagName != \"Scene\") {\r\n\t\tif (objChild.parentNode.tagName == \"Group\"){\r\n\t\t\tarrParents.unshift(objChild.parentNode);\r\n\t\t\t//console.log(arrParents[0]);\r\n\t\t}\r\n\t\tobjChild = objChild.parentNode;\r\n\t}\r\n\t\r\n\treturn arrParents;\r\n}", "function $ancestors(module) {\n if (!module) { return []; }\n\n if (module.$$ancestors_cache_version === Opal.const_cache_version) {\n return module.$$ancestors;\n }\n\n var result = [], i, mods, length;\n\n for (i = 0, mods = own_ancestors(module), length = mods.length; i < length; i++) {\n result.push(mods[i]);\n }\n\n if (module.$$super) {\n for (i = 0, mods = $ancestors(module.$$super), length = mods.length; i < length; i++) {\n result.push(mods[i]);\n }\n }\n\n module.$$ancestors_cache_version = Opal.const_cache_version;\n module.$$ancestors = result;\n\n return result;\n }", "function inOrderTraverse(tree) {\n let arr = [];\n inOrderTraverseHelper(tree, arr);\n return arr;\n}", "function getHtmlElementAncestors(elem) {\n const elems = [];\n while (elem && elem instanceof HTMLElement) {\n elems.push(elem);\n if (elem.assignedSlot) {\n elem = elem.assignedSlot;\n } else if (!elem.parentElement) {\n const parentNode = elem.parentNode;\n if (parentNode instanceof DocumentFragment) {\n elem = parentNode.host;\n } else {\n // <html>.parentNode == <html>\n elem = parentNode !== elem ? parentNode : null;\n }\n } else {\n elem = elem.parentElement;\n }\n }\n return elems;\n }", "function getLowestLevelChildren(node) {\n\n var lowest_children = [];\n check_and_recur(node);\n return lowest_children;\n\n function check_and_recur(x) {\n\n if (x.hasChildNodes()){\n x.childNodes.forEach(child => {\n check_and_recur(child); \n });\n }\n else {\n lowest_children.push(x);\n }\n }\n}", "function getLowestLevelChildren(node) {\n\n var lowest_children = [];\n check_and_recur(node);\n return lowest_children;\n\n function check_and_recur(x) {\n\n if (x.hasChildNodes()){\n x.childNodes.forEach(child => {\n check_and_recur(child); \n });\n }\n else {\n lowest_children.push(x);\n }\n }\n}", "dfsPreOrder() {\n const result = [];\n\n // traverse tree\n const traverseTree = node => {\n // root value\n result.push(node.value);\n\n // if left child exists, go left again\n if (node.left) traverseTree(node.left);\n\n // if right child exists, go right again\n if (node.right) traverseTree(node.right);\n };\n traverseTree(this.root);\n\n return result;\n }", "function pathTo(node){\n var curr = node;\n var path = [];\n while(curr.parent) {\n path.push(curr);\n curr = curr.parent;\n }\n path.push(curr);\n return path;\n }", "function getAncestry() {\n\t var path = this;\n\t var paths = [];\n\t do {\n\t paths.push(path);\n\t } while (path = path.parentPath);\n\t return paths;\n\t}", "function getAncestry() {\n\t var path = this;\n\t var paths = [];\n\t do {\n\t paths.push(path);\n\t } while (path = path.parentPath);\n\t return paths;\n\t}", "function getAncestry() {\n\t var path = this;\n\t var paths = [];\n\t do {\n\t paths.push(path);\n\t } while (path = path.parentPath);\n\t return paths;\n\t}", "function getAncestry() {\n\t var path = this;\n\t var paths = [];\n\t do {\n\t paths.push(path);\n\t } while (path = path.parentPath);\n\t return paths;\n\t}", "function getAncestry() {\n\t var path = this;\n\t var paths = [];\n\t do {\n\t paths.push(path);\n\t } while (path = path.parentPath);\n\t return paths;\n\t}", "dfsPreOrder() {\n let result = []\n const traverse = (node) => {\n // capture root node value\n result.push(node.value);\n // if left exists, go left again\n if (node.left) {\n traverse(node.left);\n } \n // if right child exists, go right again\n if (node.right) { \n traverse(node.right);\n }\n }\n traverse(this.root);\n return result;\n }", "solutionPath(node) {\n var array = []\n var current = node;\n while(current != null) {\n array.push(current.tile);\n current = current.parent;\n }\n return array;\n }", "function getDOMBranch(leafElement) {\n var scanStop = document.body.parentNode;\n var branch = [];\n\n for (var scan = leafElement; (scan != null) && (scan != scanStop) && (scan != document) ; scan = scan.parentNode) {\n branch.push(scan);\n }\n\n return branch;\n }", "static findOptimalParents(leafNodes) {\n let parents = new Map();\n let foundNewParent = false;\n //Get the immediate parent for all of our leaf elements\n leafNodes.forEach((elem) => {\n let parent = elem.parentElement;\n if (!parent)\n return;\n let style = window.getComputedStyle(parent);\n //Ensure we have a block level parent\n while ((style.display || \"\").indexOf(\"inline\") >= 0) {\n if (!parent.parentElement)\n break;\n parent = parent.parentElement;\n style = window.getComputedStyle(parent);\n }\n //If for some reason we're already tracking this parent, then ignore this signal\n if (leafNodes.indexOf(parent) >= 0) {\n foundNewParent = true;\n return;\n }\n let children = parents.get(parent) || [];\n parents.set(parent, children.concat(elem));\n });\n let newSet = [];\n //Determine how much of the parent's area the child is covering\n parents.forEach((children, parent) => {\n //If would be nice to use a more flexible area formula, but weird padding and margin values can mess this up\n // let style = window.getComputedStyle(parent);\n // let parentRect = getAdjustedRect(parent, style);\n // let parentArea = parentRect.height * parentRect.width;\n //\n // let childrenArea = children.reduce((totalArea, child) => {\n // let childRect = child.getBoundingClientRect();\n // return totalArea + (childRect.width * childRect.height);\n // }, 0);\n //\n // //If we explain 90% of the parent's area, then we accept this parent\n // if (childrenArea / parentArea >= 0.9) {\n //Sadly the above doesn't work in cases with odd padding values -- might still be better in most cases?\n //Only include visible children\n if (Array.from(parent.children).filter((elem) => visible(elem)).length == children.length) {\n foundNewParent = true;\n newSet.push(parent);\n }\n else\n newSet = newSet.concat(children);\n });\n if (foundNewParent)\n return this.findOptimalParents(newSet);\n else\n return leafNodes;\n }", "function _removeDescendents( elements, ancestors ) {\n\t\t\tif ( typeof ancestors === 'undefined' ) {\n\t\t\t\tancestors = elements;\n\t\t\t}\n\n\t\t\tvar topLevelElements = [];\n\t\t\tfor ( var elementIndex = 0; elementIndex < elements.length; elementIndex++ ) {\n\t\t\t\tvar ancestorFound = false;\n\t\t\t\tfor ( var ancestorIndex = 0; ancestorIndex < ancestors.length; ancestorIndex++ ) {\n\t\t\t\t\tif ( $.contains( ancestors[ ancestorIndex ], elements[ elementIndex ] ) ) {\n\t\t\t\t\t\tancestorFound = true;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif ( !ancestorFound ) {\n\t\t\t\t\ttopLevelElements.push( elements[ elementIndex ] );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn topLevelElements;\n\t\t}", "function findAncestors(root, value) {\n /**\n * search the given node and meanwhile\n * keep pushing the visited nodes\n */\n if (root === null) return false;\n\n if (value < root.value) {\n const left = findAncestors(root.leftChild, value);\n if (left) {\n return [...left, root.value];\n }\n return false;\n }\n\n if (value > root.value) {\n const right = findAncestors(root.rightChild, value);\n if (right) {\n return [...right, root.value];\n }\n return false;\n }\n\n if (value === root.value) return [];\n return false;\n}", "preOrder() {\n const arr = [];\n const preOrder = (node) => {\n arr.push(node.value);\n\n if (node.left) {\n preOrder(node.left);\n }\n\n if (node.right) {\n preOrder(node.right);\n }\n };\n\n let current = this.root;\n preOrder(current);\n\n return arr;\n }", "parent() {\n const parents = this.nodes.reduce((arr, node) => {\n const { parentNode } = node;\n // don't add the same parent node twice\n if (parentNode && arr.every(parent => !parent.isEqualNode(parentNode))) {\n arr.push(parentNode);\n }\n return arr;\n }, []);\n\n return new DOMNodeCollection(parents);\n }", "function _getChildNodesArr(focusNode) {\n\n if(parentChildNodes.length === 0) return [];\n\n let arr = [];\n \n //Inspired from this: http://jsfiddle.net/moagrius/kamcb6gr/\n function getChildIndex (child, cb) {\n \n var parent = child.parentNode;\n\n if(parent) {\n\n var i = parent.childNodes.length - 1;\n\n for (; i >= 0; i--) {\n \n if (child === parent.childNodes[i]){\n \n cb(i);\n \n if(parent.className !== 'rte-pane-body-view') {\n \n getChildIndex(parent, cb);\n \n } \n \n break;\n \n }\n \n }\n\n } else {\n\n cb(null);\n\n }\n \n }\n\n getChildIndex(focusNode, function(selectedIndex) {\n arr.push(selectedIndex);\n });\n\n return arr; \n\n }", "function getElementAndAncestors(element) {\n var allElements = [];\n while (isTransformableElement(element)) {\n allElements.push(element);\n element = element.parentNode;\n }\n return allElements;\n}", "flatten(node = null) {\n let list = [];\n\n for (let child of (node || this.root).children || []) {\n list.push(child);\n list = list.concat(this.flatten(child));\n }\n return list;\n }", "function preOrder(node) {\n if (node == undefined) return [];\n return [node.data].concat(preOrder(node.left)).concat(preOrder(node.right));\n}", "function findFirstDefinedNotLeafAncestor(node) {\n\tlet childName = node.apiData.name;\n\tlet parentName = null;\n\twhile (true) {\n\t\tlet itemDefinition = getItemDefinition(childName);\n\t\tif (no(itemDefinition)) break;\n\t\tlet ancestorArray = splitAncestors(itemDefinition.item);\n\t\tlet len = getValidatedAncestorsLength(ancestorArray);\n\t\tif (no(len)) break;\n\t\tparentName = ancestorArray[len - 2];\n\t\tlet parentItemDefinition = getItemDefinition(parentName);\n\t\tif (no(parentItemDefinition)) {\n\t\t\tif (parentName != orderedItemsRootName) {\n\t\t\t\tconsole.log(`ERROR: Cannot find item definition for ${parentName}`);\n\t\t\t}\n\t\t\tbreak;\n\t\t}\n\t\tif (!parentItemDefinition.isLeaf) {\n\t\t\tbreak;\n\t\t}\n\t\tchildName = parentName;\n\t}\n\t//console.log(`DEBUG: Common ancestor of ${node.apiData.name} is ${parentName}`);\n\treturn parentName;\n}", "dfsInorder() {\n let result = [];\n const traverse = node => {\n if (node.left) {\n traverse(node.left);\n }\n result.push(node.data);\n if (node.right) {\n traverse(node.right)\n }\n }\n traverse(this.root)\n\n return result;\n }", "ancestors() {\n return this._ancestors.values();\n }", "function getNodePath(node) {\n if (!node.parent || !node.parent.children) {\n return [];\n }\n var path = getNodePath(node.parent);\n if (node.parent.type === 'property') {\n var key = node.parent.children[0].value;\n path.push(key);\n }\n else if (node.parent.type === 'array') {\n var index = node.parent.children.indexOf(node);\n if (index !== -1) {\n path.push(index);\n }\n }\n return path;\n}", "function getOffsetFromAncestor(node, // @param: Node:\r\n ancestor) { // @param: Node:\r\n // @return Hash: { x, y }\r\n var x = 0, y = 0;\r\n\r\n while (node && node !== ancestor) {\r\n x += node.offsetLeft || 0;\r\n y += node.offsetTop || 0;\r\n node = node.offsetParent;\r\n }\r\n return { x: x, y: y };\r\n}", "function visibleNodes() {\n var temp = [];\n for (var i = 0; i < root.length ; i++) {\n if(root[i]){\n temp.push(root[i]);\n }\n }\n return temp;\n}", "function getOrderedChildren(node) {\n var queue = [];\n for (var key in node) {\n if (node.hasOwnProperty(key)) {\n enqueueNodeWithStartIndex(queue, node[key]);\n }\n }\n queue.sort(function(a, b) { return a[1] - b[1]; });\n return queue.map(function(pair) { return pair[0]; });\n}", "function getOrderedChildren(node) {\n var queue = [];\n for (var key in node) {\n if (node.hasOwnProperty(key)) {\n enqueueNodeWithStartIndex(queue, node[key]);\n }\n }\n queue.sort(function(a, b) { return a[1] - b[1]; });\n return queue.map(function(pair) { return pair[0]; });\n}", "function getOrderedChildren(node) {\n var queue = [];\n for (var key in node) {\n if (node.hasOwnProperty(key)) {\n enqueueNodeWithStartIndex(queue, node[key]);\n }\n }\n queue.sort(function(a, b) { return a[1] - b[1]; });\n return queue.map(function(pair) { return pair[0]; });\n}", "function getOrderedChildren(node) {\n var queue = [];\n for (var key in node) {\n if (node.hasOwnProperty(key)) {\n enqueueNodeWithStartIndex(queue, node[key]);\n }\n }\n queue.sort(function(a, b) { return a[1] - b[1]; });\n return queue.map(function(pair) { return pair[0]; });\n}", "dfsInOrder() {\n let result = [];\n\n function traverse(node, arr) {\n if (node.left) traverse(node.left);\n arr.push(node);\n if (node.right) traverse(node.right);\n }\n traverse(this.root, result);\n return result;\n }", "function inOrder(node) {\n if (node == undefined) return [];\n return inOrder(node.left).concat(node.data).concat(inOrder(node.right));\n}", "dfsPreOrder() {\r\n let result = []\r\n\r\n const traverse = node => {\r\n result.push(node.data)\r\n if (node.left) traverse(node.left)\r\n if (node.right) traverse(node.right)\r\n }\r\n\r\n traverse(this.root)\r\n return result\r\n }", "preOrder() {\n let root = this.root;\n let arr = [];\n arr.push(root.value);\n\n if (root.left) {\n arr.push(...root.left.preOrder());\n }\n\n if (root.right) {\n arr.push(...root.right.preOrder());\n }\n return arr;\n }", "function getFurthestAncestor(node) {\r\n var root = node;\r\n while (root.parentNode != null) {\r\n root = root.parentNode;\r\n }\r\n return root;\r\n }", "function ancestor(node, visitors, baseVisitor, state, override) {\n var ancestors = [];\n if (!baseVisitor) { baseVisitor = base\n ; }(function c(node, st, override) {\n var type = override || node.type, found = visitors[type];\n var isNew = node !== ancestors[ancestors.length - 1];\n if (isNew) { ancestors.push(node); }\n baseVisitor[type](node, st, c);\n if (found) { found(node, st || ancestors, ancestors); }\n if (isNew) { ancestors.pop(); }\n })(node, state, override);\n }", "preOrder() {\n const results = [];\n const _traverse = (node) => {\n results.push(node.value);\n if (node.left) _traverse(node.left);\n if (node.right) _traverse(node.right);\n }\n\n _traverse(this.root);\n return results;\n }", "function ancestorElem(node){\r\n if (node.nodeType === 1) {\r\n return node;\r\n }\r\n else {\r\n return ancestorElem(node.parentNode);\r\n }\r\n }", "function ancestor(node, visitors, baseVisitor, state, override) {\n var ancestors = [];\n if (!baseVisitor) { baseVisitor = base\n ; }(function c(node, st, override) {\n var type = override || node.type, found = visitors[type];\n var isNew = node !== ancestors[ancestors.length - 1];\n if (isNew) { ancestors.push(node); }\n baseVisitor[type](node, st, c);\n if (found) { found(node, st || ancestors, ancestors); }\n if (isNew) { ancestors.pop(); }\n })(node, state, override);\n}", "traversePreOrder(node = this.root, arr = []) {\n if (!node) return arr;\n\n arr.push(node.val);\n this.traversePreOrder(node.left, arr);\n this.traversePreOrder(node.right, arr);\n return arr;\n }", "function filterParentPosition(arr) {\n var levelObj = {};\n arr.forEach(function (item) {\n var posLen = item.split('-').length;\n if (!levelObj[posLen]) {\n levelObj[posLen] = [];\n }\n levelObj[posLen].push(item);\n });\n var levelArr = Object.keys(levelObj).sort();\n\n var _loop = function _loop(i) {\n if (levelArr[i + 1]) {\n levelObj[levelArr[i]].forEach(function (ii) {\n var _loop2 = function _loop2(j) {\n levelObj[levelArr[j]].forEach(function (_i, index) {\n if (isInclude(ii.split('-'), _i.split('-'))) {\n levelObj[levelArr[j]][index] = null;\n }\n });\n levelObj[levelArr[j]] = levelObj[levelArr[j]].filter(function (p) {\n return p;\n });\n };\n\n for (var j = i + 1; j < levelArr.length; j++) {\n _loop2(j);\n }\n });\n }\n };\n\n for (var i = 0; i < levelArr.length; i++) {\n _loop(i);\n }\n var nArr = [];\n levelArr.forEach(function (i) {\n nArr = nArr.concat(levelObj[i]);\n });\n return nArr;\n}", "function filterParentPosition(arr) {\n var levelObj = {};\n arr.forEach(function (item) {\n var posLen = item.split('-').length;\n if (!levelObj[posLen]) {\n levelObj[posLen] = [];\n }\n levelObj[posLen].push(item);\n });\n var levelArr = Object.keys(levelObj).sort();\n\n var _loop = function _loop(i) {\n if (levelArr[i + 1]) {\n levelObj[levelArr[i]].forEach(function (ii) {\n var _loop2 = function _loop2(j) {\n levelObj[levelArr[j]].forEach(function (_i, index) {\n if (isInclude(ii.split('-'), _i.split('-'))) {\n levelObj[levelArr[j]][index] = null;\n }\n });\n levelObj[levelArr[j]] = levelObj[levelArr[j]].filter(function (p) {\n return p;\n });\n };\n\n for (var j = i + 1; j < levelArr.length; j++) {\n _loop2(j);\n }\n });\n }\n };\n\n for (var i = 0; i < levelArr.length; i++) {\n _loop(i);\n }\n var nArr = [];\n levelArr.forEach(function (i) {\n nArr = nArr.concat(levelObj[i]);\n });\n return nArr;\n}", "function filterParentPosition(arr) {\n var levelObj = {};\n arr.forEach(function (item) {\n var posLen = item.split('-').length;\n if (!levelObj[posLen]) {\n levelObj[posLen] = [];\n }\n levelObj[posLen].push(item);\n });\n var levelArr = Object.keys(levelObj).sort();\n\n var _loop = function _loop(i) {\n if (levelArr[i + 1]) {\n levelObj[levelArr[i]].forEach(function (ii) {\n var _loop2 = function _loop2(j) {\n levelObj[levelArr[j]].forEach(function (_i, index) {\n if (isInclude(ii.split('-'), _i.split('-'))) {\n levelObj[levelArr[j]][index] = null;\n }\n });\n levelObj[levelArr[j]] = levelObj[levelArr[j]].filter(function (p) {\n return p;\n });\n };\n\n for (var j = i + 1; j < levelArr.length; j++) {\n _loop2(j);\n }\n });\n }\n };\n\n for (var i = 0; i < levelArr.length; i++) {\n _loop(i);\n }\n var nArr = [];\n levelArr.forEach(function (i) {\n nArr = nArr.concat(levelObj[i]);\n });\n return nArr;\n}", "function getChildrenIds(node) {\n var childrenIds = [node.id];\n \n function traverse(currentNode) {\n currentNode.children.forEach(function(child) {\n childrenIds.push(child.id);\n if (child.children.length > 0) {\n traverse(child);\n }\n });\n }\n\n traverse(node);\n return childrenIds;\n }", "function ancestor(node, visitors, baseVisitor, state) {\n var ancestors = [];\n if (!baseVisitor) { baseVisitor = base\n ; }(function c(node, st, override) {\n var type = override || node.type, found = visitors[type];\n var isNew = node !== ancestors[ancestors.length - 1];\n if (isNew) { ancestors.push(node); }\n baseVisitor[type](node, st, c);\n if (found) { found(node, st || ancestors, ancestors); }\n if (isNew) { ancestors.pop(); }\n })(node, state);\n }", "depthFirstSearch(start) {\n const result = [];\n const searchStack = [start];\n const seen = new Set(searchStack);\n while(searchStack.length) {\n const currNode = searchStack.pop();\n result.push(currNode.value);\n\n for(let node of currNode.adjacent) {\n if(!seen.has(node)) {\n searchStack.push(node);\n seen.add(node);\n }\n }\n }\n return result;\n }", "function filterParentPosition(arr) {\n var levelObj = {};\n arr.forEach(function (item) {\n var posLen = item.split('-').length;\n if (!levelObj[posLen]) {\n levelObj[posLen] = [];\n }\n levelObj[posLen].push(item);\n });\n var levelArr = Object.keys(levelObj).sort(function (a, b) {\n return Number(a) - Number(b);\n });\n\n var _loop = function _loop(i) {\n if (levelArr[i + 1]) {\n levelObj[levelArr[i]].forEach(function (ii) {\n var _loop2 = function _loop2(j) {\n levelObj[levelArr[j]].forEach(function (_i, index) {\n if (isInclude(ii.split('-'), _i.split('-'))) {\n levelObj[levelArr[j]][index] = null;\n }\n });\n levelObj[levelArr[j]] = levelObj[levelArr[j]].filter(function (p) {\n return p;\n });\n };\n\n for (var j = i + 1; j < levelArr.length; j++) {\n _loop2(j);\n }\n });\n }\n };\n\n for (var i = 0; i < levelArr.length; i++) {\n _loop(i);\n }\n var nArr = [];\n levelArr.forEach(function (i) {\n nArr = nArr.concat(levelObj[i]);\n });\n return nArr;\n}", "function collectUnrelated(nodes) {\r\n var unrelated = [];\r\n $.each(nodes, function (i, n) {\r\n if (!n.searchResult && !n.state.expanded) { // no hit, no parent\r\n unrelated.push(n.nodeId);\r\n }\r\n if (!n.searchResult && n.nodes) { // recurse for non-result children\r\n $.merge(unrelated, collectUnrelated(n.nodes));\r\n }\r\n });\r\n return unrelated;\r\n }", "function encodeNodePath(node) {\n var path = [];\n while (node != document.body) {\n var parentNode = node.parentNode;\n path.push(Array.prototype.indexOf.call(parentNode.childNodes, node));\n node = parentNode;\n }\n return path.reverse();\n}", "function ancestor(node, visitors, base, state) {\n if (!base) { base = exports.base; }\n var ancestors = [];(function c(node, st, override) {\n var type = override || node.type, found = visitors[type];\n var isNew = node != ancestors[ancestors.length - 1];\n if (isNew) { ancestors.push(node); }\n base[type](node, st, c);\n if (found) { found(node, st || ancestors, ancestors); }\n if (isNew) { ancestors.pop(); }\n })(node, state);\n}" ]
[ "0.6923217", "0.69079983", "0.6887239", "0.68852204", "0.68730426", "0.68631727", "0.68631727", "0.68631727", "0.68257654", "0.68257654", "0.68257654", "0.6816942", "0.6814705", "0.66630125", "0.63084996", "0.63084996", "0.6135168", "0.60578686", "0.59700096", "0.58169633", "0.5745348", "0.5714683", "0.57066095", "0.56895965", "0.5581233", "0.5578696", "0.55200964", "0.55198103", "0.55067396", "0.5465488", "0.54640573", "0.54640573", "0.5453517", "0.54420424", "0.5437987", "0.5437987", "0.5434693", "0.5431652", "0.54227155", "0.5411562", "0.54075426", "0.54075426", "0.53930897", "0.53926575", "0.5374695", "0.53461576", "0.5326862", "0.53249097", "0.5300939", "0.5287246", "0.5287246", "0.52833444", "0.52704716", "0.52694637", "0.52694637", "0.52694637", "0.52694637", "0.52694637", "0.52527916", "0.5251445", "0.5245076", "0.5240858", "0.5232351", "0.52138865", "0.51987165", "0.5198675", "0.51955456", "0.517929", "0.5176908", "0.5176348", "0.51713973", "0.5162246", "0.5159524", "0.5159524", "0.51538754", "0.5136558", "0.51005745", "0.51005745", "0.51005745", "0.51005745", "0.5097365", "0.50856656", "0.50802577", "0.50797886", "0.5072386", "0.5064797", "0.5061872", "0.5048649", "0.5047836", "0.5039972", "0.5038689", "0.5038689", "0.5038689", "0.50376177", "0.50288403", "0.50194955", "0.5012584", "0.50089085", "0.5008229", "0.4999173" ]
0.68490946
8
CSS TRANSITION SUPPORT (Shoutout: ============================================================
function transitionEnd() { var el = document.createElement('bootstrap') var transEndEventNames = { WebkitTransition : 'webkitTransitionEnd', MozTransition : 'transitionend', OTransition : 'oTransitionEnd otransitionend', transition : 'transitionend' } for (var name in transEndEventNames) { if (el.style[name] !== undefined) { return { end: transEndEventNames[name] } } } return false // explicit for ie8 ( ._.) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "turnOn() {\n this.wrapper.style[Modernizr.prefixed('transition')] = Modernizr.prefixed('transform') + ' .25s';\n return this;\n }", "function reverseTranslate(newFrom){return $animateCss(target,{to:newFrom||from,addClass:options.transitionOutClass,removeClass:options.transitionInClass}).start();}", "function applyCSS(element, properties, duration, easing, isTransition){\n\t\tvar code = (isTransition === 0)?getCSS(properties, duration, easing):getTransition(properties, duration, easing, isTransition);\n\t\tif(styleTag === null || styleTag === undefined){\n\t\t\tstyleTag = document.createElement('style');\n\t\t\tstyleTag.type = 'text/css';\t\n\t\t\tdocument.getElementsByTagName('head')[0].appendChild(styleTag);\n\t\t}\n\t\tstyleTag.innerHTML = code;\n\t\tvar el = (typeof element === 'string') ? document.querySelectorAll(element)[0]:element\n\t\tvar cn = (properties.name || 'myTween');\n\t\tif(el.className.indexOf(cn) === -1){\n\t\t\tel.className += ' ' + cn;\n\t\t}\n\t\treturn code;\n\t}", "function applyTransition(element, properties, duration, easing){\n\t\treturn applyCSS(element, properties, duration, easing, 1);\n\t}", "function flipBack(el) {\n el.children[1].style.webkitTransform = \"perspective(600px) rotateY(0deg)\";\n el.children[0].style.webkitTransform = \"perspective(600px) rotateY(180deg)\";\n el.children[1].style.transition = \"all .5s linear 0s\";\n el.children[0].style.transition = \"all .5s linear 0s\";\n el.children[1].style.transform = \"perspective(600px) rotateY(0deg)\";\n el.children[0].style.transform = \"perspective(600px) rotateY(180deg)\";\n el.children[1].style.webkitTransition = \"all .5s linear 0s\";\n el.children[0].style.webkitTransition = \"all .5s linear 0s\";\n\n}", "function transition() {\n\t// checking R\n\tif (currentColor[0] > targetColor[0]) {\n\t\tcurrentColor[0] -= increment[0];\n\t\tif (currentColor[0] <= targetColor[0]) {\n\t\t\tincrement[0] = 0;\n\t\t}\n\t} else {\n\t\tcurrentColor[0] += increment[0];\n\t\tif (currentColor[0] >= targetColor[0]) {\n\t\t\tincrement[0] = 0;\n\t\t}\n\t}\n\t\n\t// checking G\n\tif (currentColor[1] > targetColor[1]) {\n\t\tcurrentColor[1] -= increment[1];\n\t\tif (currentColor[1] <= targetColor[1]) {\n\t\t\tincrement[1] = 0;\n\t\t}\n\t} else {\n\t\tcurrentColor[1] += increment[1];\n\t\tif (currentColor[1] >= targetColor[1]) {\n\t\t\tincrement[1] = 0;\n\t\t}\n\t}\n\t\n\t// checking B\n\tif (currentColor[2] > targetColor[2]) {\n\t\tcurrentColor[2] -= increment[2];\n\t\tif (currentColor[2] <= targetColor[2]) {\n\t\t\tincrement[2] = 0;\n\t\t}\n\t} else {\n\t\tcurrentColor[2] += increment[2];\n\t\tif (currentColor[2] >= targetColor[2]) {\n\t\t\tincrement[2] = 0;\n\t\t}\n\t}\n\t\n\t// applying the new modified color\n\ttransElement.style.backgroundColor = rgb2hex(currentColor);\n\t\n\t// transition ended. start a new one\n\tif (increment[0] == 0 && increment[1] == 0 && increment[2] == 0) {\n\t\tstartTransition();\n\t}\n}", "function transglow(element, value1, value2){\r\n element.css('-webkit-transition',('top ').concat((value1).toString(),'s ease-in-out, ','left ',(value2).toString(),'s ease-in-out'))\r\n element.css('-moz-transition',('top ').concat((value1).toString(),'s ease-in-out, ','left ',(value2).toString(),'s ease-in-out'))\r\n element.css('-ms-transition',('top ').concat((value1).toString(),'s ease-in-out, ','left ',(value2).toString(),'s ease-in-out'))\r\n element.css('-o-transition',('top ').concat((value1).toString(),'s ease-in-out, ','left ',(value2).toString(),'s ease-in-out'))\r\n element.css('transition',('top ').concat((value1).toString(),'s ease-in-out, ','left ',(value2).toString(),'s ease-in-out'))\r\n }", "function recalcTransforms() {\n var fiftyPercent = Math.round(window.innerWidth / 2) + 'px';\n pointingRight = 'translateZ(-'+fiftyPercent+') rotateY(+90deg) translateZ(+'+fiftyPercent+')';\n pointingLeft = 'translateZ(-'+fiftyPercent+') rotateY(-90deg) translateZ(+'+fiftyPercent+')';\n pointingFront = 'translateZ(-'+fiftyPercent+') rotateY(0deg) translateZ(+'+fiftyPercent+')';\n}", "_applyTransform() {\n this.wrapper.style.transform = [\n 'translateX(-50%)',\n `translateX(${this._translate})`,\n ].join(' ');\n }", "function transform( el, value ) {\n\tvar style = el.style;\n\n\tstyle.transform = value;\n\tstyle.webkitTransform = value;\n\tstyle.oTransform = value;\n\tstyle.msTransform = value;\n}", "cssToMatrix(elementId) {\n const element = document.getElementById(elementId),\n style = window.getComputedStyle(element)\n\n return style.getPropertyValue(\"-webkit-transform\") ||\n style.getPropertyValue(\"-moz-transform\") ||\n style.getPropertyValue(\"-ms-transform\") ||\n style.getPropertyValue(\"-o-transform\") ||\n style.getPropertyValue(\"transform\");\n\n\t }", "cssToMatrix(elementId) {\n const element = document.getElementById(elementId),\n style = window.getComputedStyle(element)\n\n return style.getPropertyValue(\"-webkit-transform\") ||\n style.getPropertyValue(\"-moz-transform\") ||\n style.getPropertyValue(\"-ms-transform\") ||\n style.getPropertyValue(\"-o-transform\") ||\n style.getPropertyValue(\"transform\");\n\n\t }", "function transition() {\n // checking R\n if (currentColor[0] > targetColor[0]) {\n currentColor[0] -= increment[0];\n if (currentColor[0] <= targetColor[0]) {\n increment[0] = 0;\n }\n } else {\n currentColor[0] += increment[0];\n if (currentColor[0] >= targetColor[0]) {\n increment[0] = 0;\n }\n }\n \n // checking G\n if (currentColor[1] > targetColor[1]) {\n currentColor[1] -= increment[1];\n if (currentColor[1] <= targetColor[1]) {\n increment[1] = 0;\n }\n } else {\n currentColor[1] += increment[1];\n if (currentColor[1] >= targetColor[1]) {\n increment[1] = 0;\n }\n }\n \n // checking B\n if (currentColor[2] > targetColor[2]) {\n currentColor[2] -= increment[2];\n if (currentColor[2] <= targetColor[2]) {\n increment[2] = 0;\n }\n } else {\n currentColor[2] += increment[2];\n if (currentColor[2] >= targetColor[2]) {\n increment[2] = 0;\n }\n }\n \n // applying the new modified color\n transElement.style.backgroundColor = rgb2hex(currentColor);\n \n // transition ended. start a new one\n if (increment[0] == 0 && increment[1] == 0 && increment[2] == 0) {\n startTransition();\n }\n }", "function reverseTranslate (newFrom) {\n return $animateCss(target, {\n to: newFrom || from,\n addClass: options.transitionOutClass,\n removeClass: options.transitionInClass\n }).start();\n\n }", "function lower() {\n d.getElementById('slide').style.webkitTransition = \"all 0.6s ease\";\n d.getElementById('slide').style.MozTransition = \"all 0.6s ease\";\n d.getElementById('slide').style.top = '-10px';\n}", "function reverseTranslate (newFrom) {\n return $animateCss(target, {\n to: newFrom || from,\n addClass: options.transitionOutClass,\n removeClass: options.transitionInClass\n }).start();\n\n }", "function reverseTranslate (newFrom) {\n return $animateCss(target, {\n to: newFrom || from,\n addClass: options.transitionOutClass,\n removeClass: options.transitionInClass\n }).start();\n\n }", "function reverseTranslate (newFrom) {\n return $animateCss(target, {\n to: newFrom || from,\n addClass: options.transitionOutClass,\n removeClass: options.transitionInClass\n }).start();\n\n }", "function Transform() {}", "function Transform() {}", "function Transform() {}", "function Transform() {}", "function Transform() {}", "addTransitionTimeToCSS(){\n\t\tdocument.getElementById(this._elementID).style.transition = 'filter '+this._transitionTime+'s';\n\t}", "function transElem(element, transform) {\n element.css('-webkit-transform', transform);\n element.css('-moz-transform', transform);\n element.css('-o-transform', transform);\n element.css('transform', transform);\n element.css('-ms-transform', transform);\n }", "function reverseTranslate (newFrom) {\n return $animateCss(target, {\n to: newFrom || from,\n addClass: options.transitionOutClass,\n removeClass: options.transitionInClass,\n duration: options.duration\n }).start();\n\n }", "function transitionEnd(){var el=document.createElement('bootstrap');var transEndEventNames={WebkitTransition:'webkitTransitionEnd',MozTransition:'transitionend',OTransition:'oTransitionEnd otransitionend',transition:'transitionend'};for(var name in transEndEventNames){if(el.style[name]!==undefined){return{end:transEndEventNames[name]};}}return false;// explicit for ie8 ( ._.)\n}// http://blog.alexmaccaw.com/css-transitions", "function transitionEnd(){var el=document.createElement('bootstrap');var transEndEventNames={WebkitTransition:'webkitTransitionEnd',MozTransition:'transitionend',OTransition:'oTransitionEnd otransitionend',transition:'transitionend'};for(var name in transEndEventNames){if(el.style[name]!==undefined){return{end:transEndEventNames[name]};}}return false;// explicit for ie8 ( ._.)\n}// http://blog.alexmaccaw.com/css-transitions", "function transitionSupport() {\n\t// env.window is not defined yet when this is called\n\tvar b = win.document.body || win.document.documentElement,\n\t\ts = b.style,\n\t\tp = 'transition',\n\t\tv = ['Moz', 'Webkit', 'Khtml', 'O', 'ms'];\n\t\n\tif (typeof s[p] == 'string') { return true; }\n\t\n\tp = p.charAt(0).toUpperCase() + p.substr(1);\n\tfor (var i=0; i<v.length; i++) {\n\t\tif (typeof s[v[i] + p] == 'string') { return true; }\n\t}\n\treturn false;\n}", "function transform(el, value) {\n el.style['transform'] = value;\n el.style['webkitTransform'] = value;\n}", "function transformContainer(element, translate3d, animated) {\n element.toggleClass('pp-easing', animated);\n\n element.css(getTransforms(translate3d));\n }", "function transformElement( element, transform ) {\n\n element.style.WebkitTransform = transform;\n element.style.MozTransform = transform;\n element.style.msTransform = transform;\n element.style.OTransform = transform;\n element.style.transform = transform;\n\n}", "function ws_book(i,g,a){var d=jQuery;var e=d(\"ul\",a);var c=i.duration;var b={backgroundColor:\"#000\",position:\"absolute\",left:0,top:0,\"float\":\"left\",width:\"100%\",height:\"100%\",transformStyle:\"preserve-3d\",zIndex:3,outline:\"1px solid transparent\"};var f;this.go=function(p,n){if(h.cssTransitions()&&h.cssTransforms3d()&&!document.all){if(f){return n}var s=g.get(p),k=g.get(n);var l=((n==0&&p!=n+1)||(p==n-1))?{p:true,cont1back:s.src,cont2back:k.src,item1back:k.src,item2back:s.src,item1deg:\"0.1deg\",item2deg:\"-90deg\",item1dodeg:\"90deg\",item2dodeg:\"0deg\",trans1:\"ease-in \",trans2:\"ease-out \"}:{p:false,cont1back:k.src,cont2back:s.src,item1back:s.src,item2back:k.src,item1deg:\"90deg\",item2deg:\"-0.1deg\",item1dodeg:\"0deg\",item2dodeg:\"-90deg\",trans1:\"ease-out \",trans2:\"ease-in \"};var t=d(\"<div>\").css(b).css({background:\"url(\"+l.cont1back+\")\",backgroundSize:\"auto 100%\",width:\"50%\"}).appendTo(a.parent());var q=d(\"<div>\").css(b).css({left:\"50%\",background:\"url(\"+l.cont2back+\") right\",backgroundSize:\"auto 100%\",width:\"50%\"}).appendTo(a.parent());var o=d(\"<div>\").css(b).css({background:\"url(\"+l.item1back+\")\",backgroundSize:\"auto 100%\",marginRight:\"-100%\",transform:\"rotateY(\"+l.item1deg+\")\",transition:l.trans1+c/2000+\"s\",\"transform-origin\":\"right\",\"z-index\":8}).appendTo(t);var m=d(\"<div>\").css(b).css({background:\"url(\"+l.item2back+\") right\",backgroundSize:\"auto 100%\",marginRight:\"-100%\",transform:\"rotateY(\"+l.item2deg+\")\",transition:l.trans2+c/2000+\"s\",\"transform-origin\":\"left\"}).appendTo(q);var r=d(\"<div>\").css(b).css({opacity:0.2,zIndex:2}).appendTo((l.p?t:q)).css(\"opacity\",1).clone().appendTo((l.p?m:o)).css(\"opacity\",0.2).clone().appendTo((l.p?q:t)).css(\"opacity\",1).hide().clone().appendTo((l.p?o:m)).css(\"opacity\",0.2).hide();f=new j(l,t,q,o,m,function(){e.css({left:-p+\"00%\"}).show();t.remove();q.remove();f=0})}else{a.find(\"ul\").stop(true).animate({left:(p?-p+\"00%\":(/Safari/.test(navigator.userAgent)?\"0%\":0))},i.duration,\"easeInOutExpo\")}function j(A,E,D,C,B,F){var z=E,y=D,x=C,w=B,v=\"rotateY(\"+A.item1dodeg+\")\";var u=\"rotateY(\"+A.item2dodeg+\")\";if(!A.p){z=D;y=E;x=B;w=C;v=\"rotateY(\"+A.item2dodeg+\")\";u=\"rotateY(\"+A.item1dodeg+\")\"}a.parent().css(\"perspective\",w.width()*4);x.css(\"transform\",v);x.children().fadeIn(c/2);z.children().fadeOut(c/2,function(){w.css(\"transform\",u);w.children().fadeOut(c/2);y.children().fadeIn(c/2)});setTimeout(F,c);return{stop:function(){F()}}}return p};var h={domPrefixes:\" Webkit Moz ms O Khtml\".split(\" \"),testDom:function(k){var j=this.domPrefixes.length;while(j--){if(typeof document.body.style[this.domPrefixes[j]+k]!==\"undefined\"){return true}}return false},cssTransitions:function(){return this.testDom(\"Transition\")},cssTransforms3d:function(){if(typeof document.body.style.perspectiveProperty!==\"undefined\"){return true}return this.testDom(\"Perspective\")}}}", "function applyTransforms(el, nobodyscale) {\n\t\t// zoomer area and scale value\n\t\tvar zoomerArea = el.querySelector('.zoomer__area'),\n\t\t\tzoomerAreaSize = {width: zoomerArea.offsetWidth, height: zoomerArea.offsetHeight},\n\t\t\tzoomerOffset = zoomerArea.getBoundingClientRect(),\n\t\t\tscaleVal = zoomerAreaSize.width/zoomerAreaSize.height < win.width/win.height ? win.width/zoomerAreaSize.width : win.height/zoomerAreaSize.height;\n\n\t\tif( bodyScale && !nobodyscale ) {\n\t\t\tscaleVal /= bodyScale;\n\t\t}\n\n\t\t// apply transform\n\t\tel.style.WebkitTransform = 'translate3d(' + Number(win.width/2 - (zoomerOffset.left+zoomerAreaSize.width/2)) + 'px,' + Number(win.height/2 - (zoomerOffset.top+zoomerAreaSize.height/2)) + 'px,0) scale3d(' + scaleVal + ',' + scaleVal + ',1)';\n\t\tel.style.transform = 'translate3d(' + Number(win.width/2 - (zoomerOffset.left+zoomerAreaSize.width/2)) + 'px,' + Number(win.height/2 - (zoomerOffset.top+zoomerAreaSize.height/2)) + 'px,0) scale3d(' + scaleVal + ',' + scaleVal + ',1)';\n\t}", "function styleApp(el, data) {\r\n\t var _tram = tram(el);\r\n\r\n\t // Get computed transition value\r\n\t el.css('transition', '');\r\n\t var computed = el.css('transition');\r\n\r\n\t // If computed is set to none, clear upstream\r\n\t if (computed === transNone) computed = _tram.upstream = null;\r\n\r\n\t // Set upstream transition to none temporarily\r\n\t _tram.upstream = transNone;\r\n\r\n\t // Set values immediately\r\n\t _tram.set(tramify(data));\r\n\r\n\t // Only restore upstream in preview mode\r\n\t _tram.upstream = computed;\r\n\t }", "function addTransition() {\n carouselList.style.transition = isResizing\n ? \"\"\n : \"transform 0.5s ease-in-out\";\n}", "function addAnimation(element){\r\n var transition = 'all ' + options.scrollingSpeed + 'ms ' + options.easingcss3;\r\n\r\n element.removeClass(NO_TRANSITION);\r\n return element.css({\r\n '-webkit-transition': transition,\r\n 'transition': transition\r\n });\r\n }", "function addAnimation(element){\r\n var transition = 'all ' + options.scrollingSpeed + 'ms ' + options.easingcss3;\r\n\r\n element.removeClass(NO_TRANSITION);\r\n return element.css({\r\n '-webkit-transition': transition,\r\n 'transition': transition\r\n });\r\n }", "function addAnimation(element){\r\n var transition = 'all ' + options.scrollingSpeed + 'ms ' + options.easingcss3;\r\n\r\n element.removeClass(NO_TRANSITION);\r\n return element.css({\r\n '-webkit-transition': transition,\r\n 'transition': transition\r\n });\r\n }", "function addAnimation(element){\n var transition = 'all ' + options.scrollingSpeed + 'ms ' + options.easingcss3;\n\n element.removeClass(NO_TRANSITION);\n return element.css({\n '-webkit-transition': transition,\n 'transition': transition\n });\n }", "function addAnimation(element){\n var transition = 'all ' + options.scrollingSpeed + 'ms ' + options.easingcss3;\n\n element.removeClass(NO_TRANSITION);\n return element.css({\n '-webkit-transition': transition,\n 'transition': transition\n });\n }", "function addAnimation(element){\n var transition = 'all ' + options.scrollingSpeed + 'ms ' + options.easingcss3;\n\n element.removeClass(NO_TRANSITION);\n return element.css({\n '-webkit-transition': transition,\n 'transition': transition\n });\n }", "function addAnimation(element){\n var transition = 'all ' + options.scrollingSpeed + 'ms ' + options.easingcss3;\n\n element.removeClass(NO_TRANSITION);\n return element.css({\n '-webkit-transition': transition,\n 'transition': transition\n });\n }", "getDomTransform() {\n return Math.ceil(getComputedStyle(this.characterChild).transform.split(',')[this.splitNum]) + this.calculateWithDif();\n }", "function transitionSupport() {\n\t\n\t// env.window is not defined yet when this is called\n\tif (!win) return false;\n\t\n\tvar b = win.document.body || win.document.documentElement,\n\t\ts = b.style,\n\t\tp = 'transition',\n\t\tv = ['Moz', 'Webkit', 'Khtml', 'O', 'ms'];\n\t\n\tif (typeof s[p] == 'string') { return true; }\n\t\n\tp = p.charAt(0).toUpperCase() + p.substr(1);\n\tfor (var i=0; i<v.length; i++) {\n\t\tif (typeof s[v[i] + p] == 'string') { return true; }\n\t}\n\treturn false;\n}", "function setupTransition(element, properties, duration, timing) {\n\t if (cssTransitionsSupported) {\n\t var style = (element).style;\n\t style.webkitTransitionProperty = properties;\n\t style.webkitTransitionDuration = duration + 'ms';\n\t style.webkitTransitionTimingFunction = timing;\n\t }\n\t}", "function getTransforms(translate3d){\r\n return {\r\n '-webkit-transform': translate3d,\r\n '-moz-transform': translate3d,\r\n '-ms-transform':translate3d,\r\n 'transform': translate3d\r\n };\r\n }", "function getTransforms(translate3d){\r\n return {\r\n '-webkit-transform': translate3d,\r\n '-moz-transform': translate3d,\r\n '-ms-transform':translate3d,\r\n 'transform': translate3d\r\n };\r\n }", "function getTransforms(translate3d){\r\n return {\r\n '-webkit-transform': translate3d,\r\n '-moz-transform': translate3d,\r\n '-ms-transform':translate3d,\r\n 'transform': translate3d\r\n };\r\n }", "function getTransforms(translate3d){\r\n return {\r\n '-webkit-transform': translate3d,\r\n '-moz-transform': translate3d,\r\n '-ms-transform':translate3d,\r\n 'transform': translate3d\r\n };\r\n }", "function getTransforms(translate3d){\r\n return {\r\n '-webkit-transform': translate3d,\r\n '-moz-transform': translate3d,\r\n '-ms-transform':translate3d,\r\n 'transform': translate3d\r\n };\r\n }", "function ws_stack(t,e,n){function i(e,n,i,s,o){t.support.transform&&t.support.transition?(n.transform||(n.transform=\"\"),n.left&&(n.transform+=\" translate3d(\"+(n.left?n.left:0)+\"px,0,0)\"),delete n.left,n.transition=i+\"ms all \"+s+\"ms cubic-bezier(0.770, 0.000, 0.175, 1.000)\",e.css(n),o&&e.on(\"transitionend webkitTransitionEnd oTransitionEnd MSTransitionEnd\",o)):i?e.animate(n,i,\"easeInOutExpo\",o):e.css(n)}var s=jQuery,o=s(this),a=s(\"li\",n),d=s(\"<div>\").addClass(\"ws_effect\").css({position:\"absolute\",top:0,left:0,width:\"100%\",height:\"100%\",overflow:\"hidden\"}).appendTo(n.parent());this.go=function(r,f,l){var h=a.length>2?(r-f+1)%a.length:1;Math.abs(l)>=1&&(h=l>0?0:1),h=!!h^!!t.revers;var p=(t.revers?1:-1)*n.width();a.each(function(t){h&&t!=f&&(this.style.zIndex=Math.max(0,this.style.zIndex-1))});var u=s(\".ws_list\",n),c=s(\"<div>\").css({position:\"absolute\",left:0,top:0,width:\"100%\",height:\"100%\",overflow:\"hidden\",zIndex:4}).append(s(e.get(h?r:f)).clone()),v=s(\"<div>\").css({position:\"absolute\",left:0,top:0,width:\"100%\",height:\"100%\",overflow:\"hidden\",zIndex:4}).append(s(e.get(h?f:r)).clone());t.responsive<3&&(c.find(\"img\").css(\"width\",\"100%\"),v.find(\"img\").css(\"width\",\"100%\")),i(c,{left:h?p:0}),i(v,{left:h?0:.5*-p}),h?(v.appendTo(d),c.appendTo(d)):(c.insertAfter(u),v.insertAfter(u)),h?t.fadeOut&&u.fadeOut(t.duration):(u.stop(!0,!0).hide().css({left:-r+\"00%\"}),t.fadeOut?u.fadeIn(t.duration):u.show()),setTimeout(function(){i(c,{left:h?0:p},t.duration,t.duration*(h?0:.1),function(){o.trigger(\"effectEnd\"),c.remove(),v.remove()}),i(v,{left:(h?1:0)*n.width()*.5},t.duration,t.duration*(h?.1:0))},0)}}// -----------------------------------------------------------------------------------", "function $transformer(elm) {\n\t\t\tvar self = {};\n\t\t\tvar raw = elm[0];\n\t\t\tvar currentTransformer = elm.data('$scrolly.transformer');\n\t\t\tif (currentTransformer) {\n\t\t\t\treturn currentTransformer;\n\t\t\t} else {\n\t\t\t\telm.data('$scrolly.transformer', self);\n\t\t\t}\n\n\t\t\telm.bind('$destroy', function() {\n\t\t\t\tself.pos = null;\n\t\t\t\tchangingDoneCallback = null;\n\t\t\t});\n\n\t\t\tself.pos = {x: 0, y: 0};\n\n\t\t\t//Gets the current x and y transform of the element\n\t\t\tself.updatePosition = function() {\n\t\t\t\tvar style = $window.getComputedStyle(elm[0]);\n\t\t\t\tvar matrix = (style[transformProp] || '')\n\t\t\t\t\t.replace(/[^0-9-.,]/g,'')\n\t\t\t\t\t.split(',');\n\t\t\t\tif (matrix.length > 1) {\n\t\t\t\t\tself.pos.x = parseInt(matrix[4], 10);\n\t\t\t\t\tself.pos.y = parseInt(matrix[5], 10);\n\t\t\t\t}\n\t\t\t\treturn self.pos;\n\t\t\t};\n\t\t\tself.updatePosition();\n\n\t\t\tvar changingDoneCallback;\n\t\t\telm.bind(transitionEndProp, onTransitionEnd);\n\t\t\tfunction onTransitionEnd() {\n\t\t\t\tif (self.changing) {\n\t\t\t\t\tself.stop(changingDoneCallback);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tself.stop = function(done) {\n\t\t\t\t//Stop transitions, and set self.pos to wherever we were.\n\t\t\t\traw.style[transitionProp] = '';\n\t\t\t\tself.updatePosition();\n\t\t\t\tself.changing = false;\n\n\t\t\t\t//On next frame, set our element's position - this wait is so the\n\t\t\t\t//transition style on the element has time to 'remove' itself\n\t\t\t\t$nextFrame(function() {\n\t\t\t\t\tself.setTo(self.pos);\n\t\t\t\t\t(done || noop)();\n\t\t\t\t});\n\t\t\t};\n\n\t\t\tself.easeTo = function(pos, transitionTime, done) {\n\t\t\t\tif (!angular.isNumber(transitionTime) || transitionTime < 0) {\n\t\t\t\t\tthrow new Error(\"Expected a positive number for time, got '\" +\n\t\t\t\t\t\ttransitionTime + \"'.\");\n\t\t\t\t}\n\t\t\t\t//If we're currently animating, we need to stop before we try to\n\t\t\t\t//animate differently.\n\t\t\t\tif (self.changing) {\n\t\t\t\t\tself.stop(doTransition);\n\t\t\t\t} else {\n\t\t\t\t\tdoTransition();\n\t\t\t\t}\n\t\t\t\tfunction doTransition() {\n\t\t\t\t\telm.css(transitionProp, transitionString(transitionTime));\n\n\t\t\t\t\tself.changing = true;\n\t\t\t\t\tchangingDoneCallback = done;\n\n\t\t\t\t\t//On next frame, start transition - this wait is so the transition\n\t\t\t\t\t//style on the element has time to 'apply' itself before the elm's\n\t\t\t\t\t//position is set\n\t\t\t\t\t$nextFrame(function() {\n\t\t\t\t\t\tself.setTo(pos);\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t};\n\n\t\t\t//Allow setting with setTo(x,y) or setTo({x:x, y:y})\n\t\t\tself.setTo = function(pos) {\n\t\t\t\tisDefined(pos.x) && (self.pos.x = pos.x);\n\t\t\t\tisDefined(pos.y) && (self.pos.y = pos.y);\n\t\t\t\telm.css(transformProp, transformString(self.pos.x, self.pos.y));\n\t\t\t};\n\n\t\t\tself.clear = function() {\n\t\t\t\telm.css(transformProp, '');\n\t\t\t\telm.css(transitionProp, '');\n\t\t\t};\n\n\t\t\treturn self;\n\t\t}", "function AnimateCss(shiftValue){\n\t\t\tvar _endValue = \"translate3d(\" + shiftValue + \"px,0,0)\";\n\t\t\tmainContainer.css('-webkit-transition', 'all ' + transitionTime + 'ms ease-in-out');\n\t\t\tmainContainer.css(_cssProperty, _endValue);\n}", "function setTransforms() {\n itemsStyle.style.transform = 'translate3d(' + (posI * 550) + 'px,0,0)';\n}", "function setupTransitionTransform(element, duration, timing) {\n\t if (!timing) {\n\t timing = \"ease\";\n\t }\n\t setupTransition(element, \"-webkit-transform\", duration, timing);\n\t}", "function addAnimation(element){\n \t\t\tvar transition = 'all ' + options.scrollingSpeed + 'ms ' + options.easingcss3;\n\n \t\t\telement.removeClass('fp-notransition');\n \t\t\treturn element.css({\n \t\t\t\t'-webkit-transition': transition,\n \t\t\t'transition': transition\n \t\t});\n \t\t}", "getTransitionMethod (transition) {\n\n switch (transition) {\n // ease linear\n case \"easeLinear\":\n return d3EaseLinear; \n break;\n // easeQuadIn as d3EaseQuadIn,\n case \"easeQuadIn\":\n return d3EaseQuadIn;\n break;\n // easeQuadOut as d3EaseQuadOut\n case \"easeQuadOut\":\n return d3EaseQuadOut;\n break;\n // easeQuadInOut as d3EaseQuadInOut\n case \"easeQuadInOut\":\n return d3EaseQuadInOut;\n break;\n // easeCubicIn as d3EaseCubicIn\n case \"easeCubicIn\":\n return d3EaseCubicIn;\n break;\n // easeCubicOut as d3EaseCubicOut,\n case \"easeCubicOut\":\n return d3EaseCubicOut;\n break;\n // easeCubicInOut as d3EaseCubicInOut,\n case \"easeCubicInOut\":\n return d3EaseCubicInOut;\n break;\n // easePolyIn as d3EasePolyIn,\n case \"easePolyIn\":\n return d3EasePolyIn;\n break;\n // easePolyOut as d3EasePolyOut,\n case \"easePolyOut\":\n return d3EasePolyOut;\n break;\n // easePolyInOut as d3EasePolyInOut,\n case \"easePolyInOut\":\n return d3EasePolyInOut;\n break;\n // easeSinIn as d3EaseSinIn,\n case \"easeSinIn\":\n return d3EaseSinIn;\n break;\n // easeSinOut as d3EaseSinOut,\n case \"easeSinOut\":\n return d3EaseSinOut;\n break;\n // easeSinInOut as d3EaseSinInOut,\n case \"easeSinInOut\":\n return d3EaseSinInOut;\n break;\n // easeExpIn as d3EaseExpIn,\n case \"easeExpIn\":\n return d3EaseExpIn;\n break;\n // easeExpOut as d3EaseExpOut,\n case \"easeExpOut\":\n return d3EaseExpOut;\n break;\n // easeExpInOut as d3EaseExpInOut,\n case \"easeExpInOut\":\n return d3EaseExpInOut;\n break;\n // easeCircleIn as d3EaseCircleIn,\n case \"easeCircleIn\":\n return d3EaseCircleIn;\n break;\n // easeCircleOut as d3EaseCircleOut,\n case \"easeCircleOut\":\n return d3EaseCircleOut;\n break;\n // easeCircleInOut as d3EaseCircleInOut,\n case \"easeCircleInOut\":\n return d3EaseCircleInOut;\n break;\n // easeBounceIn as d3EaseBounceIn,\n case \"easeBounceIn\":\n return d3EaseBounceIn;\n break;\n // easeBounceOut as d3EaseBounceOut,\n case \"easeBounceOut\":\n return d3EaseBounceOut;\n break;\n // easeBounceInOut as d3EaseBounceInOut,\n case \"easeBounceInOut\":\n return d3EaseBounceInOut;\n break;\n // easeBackIn as d3EaseBackIn,\n case \"easeBackIn\":\n return d3EaseBackIn;\n break;\n // easeBackOut as d3EaseBackOut,\n case \"easeBackOut\":\n return d3EaseBackOut;\n break;\n // easeBackInOut as d3EaseBackInOut,\n case \"easeBackInOut\":\n return d3EaseBackInOut;\n break;\n // easeElasticIn as d3EaseElasticIn,\n case \"easeElasticIn\":\n return d3EaseElasticIn;\n break;\n // easeElasticOut as d3EaseElasticOut,\n case \"easeElasticOut\":\n return d3EaseElasticOut;\n break;\n // easeElasticInOut as d3EaseElasticInOut,\n case \"easeElasticInOut\":\n return d3EaseElasticInOut;\n break;\n // easeElastic as d3EaseElastic,\n case \"easeElastic\":\n return d3EaseElastic;\n break;\n\n // ease elastic transition\n case \"easeElastic\":\n return d3EaseElastic; \n break;\n };\n\n }", "function addAnimation(element) {\n var transition = 'all ' + options.scrollingSpeed + 'ms ' + options.easingcss3;\n\n element.removeClass(NO_TRANSITION);\n return element.css({\n '-webkit-transition': transition,\n 'transition': transition\n });\n }", "function css3animationEffect() {\n $().waypoint && Modernizr.mq(\"only all and (min-width: 320px)\") && $(\".animated\").waypoint(function () {\n var i = $(this).data(\"animation-type\");\n (\"undefined\" == typeof i || 0 == i) && (i = \"fadeIn\"), $(this).addClass(i);\n var t = $(this).data(\"animation-duration\");\n (\"undefined\" == typeof t || 0 == t) && (t = \"1\"), $(this).css(\"animation-duration\", t + \"s\");\n var n = $(this).data(\"animation-delay\");\n \"undefined\" != typeof n && 0 != n && $(this).css(\"animation-delay\", n + \"s\"), $(this).css(\"visibility\", \"visible\"), setTimeout(function () {\n $.waypoints(\"refresh\")\n }, 1e3)\n }, {triggerOnce: !0, offset: \"bottom-in-view\"})\n }", "function transformContainer(translate3d, animated){\n \t\t\tif(animated){\n \t\t\t\taddAnimation(container);\n \t\t\t}else{\n \t\t\t\tremoveAnimation(container);\n \t\t\t}\n\n \t\t\tcontainer.css(getTransforms(translate3d));\n\n \t\t\t//syncronously removing the class after the animation has been applied.\n \t\t\tsetTimeout(function(){\n \t\t\t\tcontainer.removeClass('fp-notransition');\n \t\t\t},10)\n \t\t}", "function getTransform(x, y) {\n // Round the transforms since some browsers will\n // blur the elements for sub-pixel transforms.\n return \"translate3d(\".concat(Math.round(x), \"px, \").concat(Math.round(y), \"px, 0)\");\n }", "function getTransforms(translate3d){\n return {\n '-webkit-transform': translate3d,\n '-moz-transform': translate3d,\n '-ms-transform':translate3d,\n 'transform': translate3d\n };\n }", "function getTransforms(translate3d){\n return {\n '-webkit-transform': translate3d,\n '-moz-transform': translate3d,\n '-ms-transform':translate3d,\n 'transform': translate3d\n };\n }", "function getTransforms(translate3d){\n return {\n '-webkit-transform': translate3d,\n '-moz-transform': translate3d,\n '-ms-transform':translate3d,\n 'transform': translate3d\n };\n }", "function getTransforms(translate3d){\n return {\n '-webkit-transform': translate3d,\n '-moz-transform': translate3d,\n '-ms-transform':translate3d,\n 'transform': translate3d\n };\n }", "function getTransforms(translate3d){\n return {\n '-webkit-transform': translate3d,\n '-moz-transform': translate3d,\n '-ms-transform':translate3d,\n 'transform': translate3d\n };\n }", "function getTransforms(translate3d){\n return {\n '-webkit-transform': translate3d,\n '-moz-transform': translate3d,\n '-ms-transform':translate3d,\n 'transform': translate3d\n };\n }", "function getTransforms(translate3d){\n return {\n '-webkit-transform': translate3d,\n '-moz-transform': translate3d,\n '-ms-transform':translate3d,\n 'transform': translate3d\n };\n }", "function addAnimation(element){\r\n var transition = 'all ' + options.scrollingSpeed + 'ms ' + options.easingcss3;\r\n\r\n removeClass(element, NO_TRANSITION);\r\n return css(element, {\r\n '-webkit-transition': transition,\r\n 'transition': transition\r\n });\r\n }", "function addAnimation(element){\r\n var transition = 'all ' + options.scrollingSpeed + 'ms ' + options.easingcss3;\r\n\r\n removeClass(element, NO_TRANSITION);\r\n return css(element, {\r\n '-webkit-transition': transition,\r\n 'transition': transition\r\n });\r\n }", "function onComplete(target) {\r\n\t\ttarget.style.setProperty('-webkit-transition', \".25s all ease-out\");\r\n\t\ttarget.style.setProperty('-o-transition', \".25s all ease-out\");\r\n\t\ttarget.style.setProperty('-moz-transition', \".25s all ease-out\");\r\n\t\ttarget.style.setProperty('transition', \".25s all ease-out\");\r\n\t}", "function prepareTransition(element) {\n element.addEventListener(\n 'transitionend',\n function(event) {\n event.currentTarget.classList.remove('is-transitioning');\n },\n { once: true }\n );\n\n var properties = [\n 'transition-duration',\n '-moz-transition-duration',\n '-webkit-transition-duration',\n '-o-transition-duration'\n ];\n\n var duration = 0;\n\n properties.forEach(function(property) {\n var computedValue = getComputedStyle(element)[property];\n\n if (computedValue) {\n computedValue.replace(/\\D/g, '');\n duration || (duration = parseFloat(computedValue));\n }\n });\n\n if (duration !== 0) {\n element.classList.add('is-transitioning');\n element.offsetWidth;\n }\n }", "function supportTransitions() {\n\t\tvar b = document.body || document.documentElement;\n\t\tvar s = b.style;\n\t\tvar p = 'transition';\n\t\tif(typeof s[p] == 'string') {return true; }\n\n\t\t// Tests for vendor specific prop\n\t\tv = ['Moz', 'Webkit', 'Khtml', 'O', 'ms', 'Icab'],\n\t\tp = p.charAt(0).toUpperCase() + p.substr(1);\n\t\tfor(var i=0; i<v.length; i++) {\n\t\t if(typeof s[v[i] + p] == 'string') { return true; }\n\t\t}\n\t\treturn false;\n\t}", "function addAnimation(element){\n var transition = 'all ' + options.scrollingSpeed + 'ms ' + options.easingcss3;\n\n removeClass(element, NO_TRANSITION);\n return css(element, {\n '-webkit-transition': transition,\n 'transition': transition\n });\n }", "function addAnimation(element){\n var transition = 'all ' + options.scrollingSpeed + 'ms ' + options.easingcss3;\n\n removeClass(element, NO_TRANSITION);\n return css(element, {\n '-webkit-transition': transition,\n 'transition': transition\n });\n }", "function addAnimation(element){\n var transition = 'all ' + options.scrollingSpeed + 'ms ' + options.easingcss3;\n\n removeClass(element, NO_TRANSITION);\n return css(element, {\n '-webkit-transition': transition,\n 'transition': transition\n });\n }", "_animateCSS() {\n console.debug('Animate CSS');\n let container = this.shadowRoot.getElementById('container');\n let slides = container.querySelector(\".slider__slides\");\n slides.style.transform = \"translateX(-\" + 100 * this.position + \"%)\";\n // console.debug('Animate CSS: slider__slides: ', slides);\n // console.debug('Animate CSS: slides.style.transform: ', slides.style.transform);\n // console.debug('Animate CSS: indSel.style.left: ', indSel.style.left);\n // console.debug('Animate CSS: indSel.style.right: ', indSel.style.right);\n }", "function Transformation() {\r\n\t\tvar fn = {\r\n\t\t\ttranslate: new TransformFunction('translate({x}px,{y}px)', {x:0, y:0}),\r\n\t\t\tscale: new TransformFunction('scale({x},{y})', {x:1, y:1}),\r\n\t\t\trotate: new TransformFunction('rotate({deg}deg)', {deg:0})\r\n\t\t};\r\n\t\t\r\n\t\tif (supports3d) {\r\n\t\t\t// Use 3D transforms for better performance\r\n\t\t\tfn.translate = new TransformFunction('translate3d({x}px,{y}px,0px)', {x:0, y:0});\r\n\t\t\tfn.scale = new TransformFunction('scale3d({x},{y},1)', {x:1, y:1});\r\n\t\t}\t\r\n\t\t\r\n\t\tvar commands = {\r\n\t\t\trotate: function(deg) {\r\n\t\t\t\tfn.rotate.deg = deg;\r\n\t\t\t},\r\n\t\t\trotateBy: function(deg) {\r\n\t\t\t\tfn.rotate.deg += deg;\r\n\t\t\t},\r\n\t\t\tscale: function(s) {\r\n\t\t\t\tif (typeof s == 'number') {\r\n\t\t\t\t\ts = {x: s, y: s};\r\n\t\t\t\t}\r\n\t\t\t\tfn.scale.x = s.x;\r\n\t\t\t\tfn.scale.y = s.y;\r\n\t\t\t},\r\n\t\t\tscaleBy: function(s) {\r\n\t\t\t\tif (typeof s == 'number') {\r\n\t\t\t\t\ts = {x: s, y: s};\r\n\t\t\t\t}\r\n\t\t\t\tfn.scale.x *= s.x;\r\n\t\t\t\tfn.scale.y *= s.y;\r\n\t\t\t},\r\n\t\t\ttranslate: function(s) {\r\n\t\t\t\tvar t = fn.translate;\r\n\t\t\t\tif (!s) {\r\n\t\t\t\t\ts = {x: 0, y: 0};\r\n\t\t\t\t}\r\n\t\t\t\tt.x = (s.x !== undefined) ? parseInt(s.x, 10) : t.x;\r\n\t\t\t\tt.y = (s.y !== undefined) ? parseInt(s.y, 10) : t.y;\r\n\t\t\t},\r\n\t\t\ttranslateBy: function(s) {\r\n\t\t\t\tvar t = fn.translate;\r\n\t\t\t\tt.x += parseInt(s.x, 10) || 0;\r\n\t\t\t\tt.y += parseInt(s.y, 10) || 0;\r\n\t\t\t}\r\n\t\t};\r\n\t\tthis.fn = fn;\r\n\t\tthis.exec = function(cmd) {\r\n\t\t\tfor (var n in cmd) {\r\n\t\t\t\tif (commands[n]) {\r\n\t\t\t\t\tcommands[n](cmd[n]);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t};\r\n\t\tthis.reset = function() {\r\n\t\t\t$.each(fn, function() {\r\n\t\t\t\tthis.reset();\r\n\t\t\t});\r\n\t\t};\r\n\t\tthis.format = function() {\r\n\t\t\tvar s = '';\r\n\t\t\t$.each(fn, function(k, v) {\r\n\t\t\t\ts += v.format() + ' ';\r\n\t\t\t});\r\n\t\t\treturn s;\r\n\t\t};\r\n\t}", "function getCSS(properties, duration, easing){\n\t\tvar frames = parse(properties),\n\t\t\tprop = frames[0],\n\t\t\tisTransition = (prop.isTransition != undefined)?prop.isTransition:0,\n\t\t\tn = prop.name || global.className,\n\t\t\td = prop.duration || duration || 0.5,\n\t\t\tl = prop.animationIterationCount || prop.loop || '1',\n\t\t\te = prop.animationTimingFunction || prop.ease || easing || 'ease',\n\t\t\tad = prop.direction || 'normal',\n\t\t\tdy = prop.delay || 0,\n\t\t\tfm = prop.fillMode || (parseFloat(dy) !== 0)?'both':'forwards',\n\t\t\tp = prop.percent || 'to',\n\t\t\tisPlaying = prop.play || prop.animationPlayState || 'running',\n\t\t\tuseAll = prop.useAll || false,\n\t\t\tuseShortHand = prop.useShortHand || false,\n\t\t\tuseHacks = Boolean(prop.useHacks) || false,\n\t\t\thacks = '',\n\t\t\tt = '',\n\t\t\ts = '',\n\t\t\t_c = ':',\n\t\t\t_e = ';',\n\t\t\t_d = '.',\n\t\t\t_s = ' ',\n\t\t\t_n = '\\n',\n\t\t\t_t = '\\t',\n\t\t\t_o = '{',\n\t\t\t_x = '}'\n\t\t\t_k = 'keyframes ',\n\t\t\t_w = '-webkit-',\n\t\t\tprefix = ['',_w],\n\t\t\tnTimes = 1,\n\t\t\tnDirection = '>';\n\t\tif(n.indexOf('*') != -1){\n\t\t\tvar nRaw = n.split('*');\n\t\t\tn = nRaw[0];\n\t\t\tif((nRaw[1]).indexOf(',') != -1){\n\t\t\t\tvar nRawB = (nRaw[1]).split(',');\n\t\t\t\tnTimes = parseInt(nRawB[0]);\n\t\t\t\tnDirection = nRawB[1];\n\t\t\t}else{\n\t\t\t\tnTimes = parseInt(nRaw[1]);\n\t\t\t}\n\t\t}\n\t\tif(n.toLowerCase() == 'randomname'){\n\t\t\tn = global.className = 'myTween-' + Math.round(Math.random() * 1000);\n\t\t}\n\t\tglobal.className = n;\n\t\tvar dpx = (d + '').indexOf('ms') != -1?'ms':(d + '').indexOf('s') == -1?'s':'s';\n\t\tvar dypx = (dy + '').indexOf('ms') != -1?'ms':(dy + '').indexOf('s') == -1?'s':'s';\n\t\td = parseFloat(d);\n\t\tdy = parseFloat(dy);\n\t\tif(useHacks){\n\t\t\tif(!global.has3D){\n\t\t\t\thacks += _t + '/*enable hardware acceleration*/' + _n;\n\t\t\t\thacks += _t + 'transform:translateZ(0)' + _e + _n;\n\t\t\t\thacks += _t + _w + 'transform:translateZ(0)' + _e + _n + _n;\t\n\t\t\t}\n\t\t\thacks += _t + '/*improve anti-alias*/' + _n;\n\t\t\thacks += _t + 'box-shadow: 0 0 1px rgba(0, 0, 0, 0)' + _e + _n + _n;\n\t\t\thacks += _t + '/*font smoothing*/' + _n;\n\t\t\tif(!global.has3D){\n\t\t\t\thacks += _t + 'backface-visibility: hidden' + _e + _n;\n\t\t\t\thacks += _t + _w + 'backface-visibility: hidden' + _e + _n;\t\n\t\t\t\tglobal.has3D = false;\n\t\t\t}\n\t\t\thacks += _t + '-moz-osx-font-smoothing: grayscale' + _e + _n + _n;\t\n\t\t}\n\t\tif(l == '-1'){\n\t\t\tl = 'infinite';\n\t\t}\n\t\ts += '/* '+ global.command + ' */' + _n;\n\t\t//KEYFRAMES\n\t\tif(isTransition < 1){\n\t\t\t//keyframes\n\t\t\tvar fQty = global.frameQty;\n\t\t\tfor(var px=0; px < prefix.length; px++){\n\t\t\t\tif(fQty == 1){\n\t\t\t\t\tp = (p != '0%')?(p != 'class')?p:'to':'to';\n\t\t\t\t\tt += '@' + prefix[px] + _k + n + _s + _o + _n;\n\t\t\t\t\tt += _t + p + _s + _o + _n;\n\t\t\t\t\tfor(var k in prop){\n\t\t\t\t\t\tt += getKeyframeCSS(k,prop[k],prefix[px]);\n\t\t\t\t\t}\n\t\t\t\t\tt += _t + _x + _n;\n\t\t\t\t\tt += _x + _n;\t\t\t\t\t\n\t\t\t\t}else{\n\t\t\t\t\tt += '@' + prefix[px] + _k + n + _s + _o + _n;\n\t\t\t\t\tfor(var i = global.startFrom; i < fQty; i++){\n\t\t\t\t\t\tp = (fQty == 2)?(i == 0)?(frames[i].percent === '0%')?'from':frames[i].percent:(frames[i].percent === '100%')?'to':frames[i].percent:frames[i].percent;\n\t\t\t\t\t\tt += _t + p + _s + _o + _n;\n\t\t\t\t\t\tfor(var k in frames[i]){\n\t\t\t\t\t\t\tt += getKeyframeCSS(k,frames[i][k],prefix[px]);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tt += _t + _x + _n;\t\n\t\t\t\t\t}\n\t\t\t\t\tt += _x + _n;\n\t\t\t\t}\n\t\t\t}\n\t\t\ts += t;\n\t\t\t//class\n\t\t\tfunction nChildName(i,direction){\n\t\t\t\tvar dir = direction || '>';\n\t\t\t\tvar map = {\n\t\t\t\t\t'>' :':nth-child',\n\t\t\t\t\t'<' :':nth-last-child',\n\t\t\t\t\t'>>':':nth-of-type',\n\t\t\t\t\t'<<':':nth-last-of-type'\n\t\t\t\t}\n\t\t\t\treturn map[dir] + '(' +(i + 1)+ ')';\n\t\t\t}\n\t\t\tvar states = _d + n + ':hover, ' + _d + n + ':focus, ' + _d + n + ':active ';\n\t\t\tif(isTransition === 0){\n\t\t\t\ts += _d + n + _s + _o + _n;\n\t\t\t\ts += hacks;\t\n\t\t\t}else if(isTransition === -1){\n\t\t\t\ts += _d + n + _s + _o + _n;\n\t\t\t\ts += hacks;\t\n\t\t\t\ts += _x + _n + _s;\n\t\t\t\ts += states + _o + _n;\n\t\t\t}else if(isTransition === -2){\n\t\t\t\ts += _d + n + _s + _o + _n;\n\t\t\t\ts += hacks;\n\t\t\t}\n\t\t\t//global properties within the class\n\t\t\tif(prop.percent == 'class'){\n\t\t\t\tt = '';\n\t\t\t\tfor(var k in prop){\n\t\t\t\t\tt += getSimpleCSS(k,prop[k],'',false);\n\t\t\t\t}\n\t\t\t\ts += t;\t\t\t\t\n\t\t\t}\n\t\t\t//animation code\n\t\t\tt = '';\n\t\t\tif(useShortHand){\n\t\t\t\t//name time ease delay\n\t\t\t\tt += 'animation: ' + n + _s + d + dpx + _s + (ceaser[e]?ceaser[e]:e) + _s + ((dy == 0)?'':((nTimes == 1)?dy + dypx + _s : '' + _s)) + ((l == 1)?'':l + _s) + ((ad == 'normal')?'':ad + _s) + fm + ((isPlaying == 'running')? '' : ((isTransition === -2)?_s + 'paused':_s + isPlaying)) + _e + _n;\n\t\t\t\ts += _t + t;\n\t\t\t\ts += _t + _w + t;\t\t\t\t\n\t\t\t}else{\n\t\t\t\tfor(var px=0; px < prefix.length; px++){\n\t\t\t\t\tt += _t + prefix[px] +'animation-name: ' + n + _e + _n;\n\t\t\t\t\tt += _t + prefix[px] +'animation-duration: ' + d + dpx + _e + _n;\n\t\t\t\t\tt += _t + prefix[px] +'animation-timing-function: ' + (ceaser[e]?ceaser[e]:e) + _e + _n;\n\t\t\t\t\tt += (nTimes == 1)? _t + prefix[px] +'animation-delay: ' + dy + dypx + _e + _n : '';\n\t\t\t\t\tt += _t + prefix[px] +'animation-iteration-count: ' + l + _e + _n;\n\t\t\t\t\tt += _t + prefix[px] +'animation-direction: ' + ad + _e + _n;\n\t\t\t\t\tt += _t + prefix[px] +'animation-fill-mode: ' + fm + _e + _n;\n\t\t\t\t\tt += (isTransition === -2)? _t + prefix[px] +'animation-play-state: paused' + _e + _n : _t + prefix[px] +'animation-play-state: ' + isPlaying + _e + _n;\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\ts += t;\n\t\t\t}\n\t\t\ts += _x + _n;\n\t\t\t//:nth-child\n\t\t\tfor(var nCounter = 0; nCounter < nTimes; ++nCounter){\n\t\t\t\tif(isTransition === 0 && nTimes > 1){\n\t\t\t\t\ts += _d + ((nTimes > 1)?n+nChildName(nCounter,nDirection):n) + _s + _o + _n;\n\t\t\t\t\tfor(var px=0; px < prefix.length; px++){\n\t\t\t\t\t\ts += _t + prefix[px] +'animation-delay: ' + (dy * nCounter) + dypx + _e + _n;\n\t\t\t\t\t}\n\t\t\t\t\ts += _x + _n;\n\t\t\t\t}\n\t\t\t}\n\t\t\t//:hover :focus :active\n\t\t\tif(isTransition === -2){\n\t\t\t\ts += states + _o + _n;\n\t\t\t\ts += _t +'animation-play-state: running' + _e + _n;\n\t\t\t\ts += _t + _w + 'animation-play-state: running' + _e + _n;\n\t\t\t\ts += _x + _n;\n\t\t\t}\n\t\t}else{\n\t\t\t//TRANSITION\n\t\t\ts += _d + n + _s + _o + _n;\n\t\t\ts += hacks;\n\t\t\tt += 'transition:'\n\t\t\tif(!useAll){\n\t\t\t\tfor(var k in prop){\n\t\t\t\t\tif(isCSS(k)){\n\t\t\t\t\t\tt += _s + (k).replace(/([a-z])([A-Z])/g, '$1-$2').toLowerCase() + _s + d + dpx + _s + ceaser[e] + _s + dy + dypx + ',';\n\t\t\t\t\t}else if(k === 'transform'){\n\t\t\t\t\t\tt += _s + 'transform ' + _s + d + dpx + _s + (ceaser[e]?ceaser[e]:e) + _s + dy + dypx + ',';\n\t\t\t\t\t\tt += _s + _w +'transform ' + _s + d + dpx + _s + (ceaser[e]?ceaser[e]:e) + _s + dy + dypx + ',';\n\t\t\t\t\t}else if(k === 'transformOrigin'){\n\t\t\t\t\t\tt += _s + 'transform-origin ' + _s + d + dpx + _s + (ceaser[e]?ceaser[e]:e) + _s + dy + dypx + ',';\n\t\t\t\t\t\tt += _s + _w +'transform-origin ' + _s + d + dpx + _s + (ceaser[e]?ceaser[e]:e) + _s + dy + dypx + ',';\n\t\t\t\t\t}else if(k === 'backfaceVisibility'){\n\t\t\t\t\t\tt += _s + 'backface-visibility ' + _s + d + dpx + _s + (ceaser[e]?ceaser[e]:e) + _s + dy + dypx + ',';\n\t\t\t\t\t\tt += _s + _w +'backface-visibility ' + _s + d + dpx + _s + (ceaser[e]?ceaser[e]:e) + _s + dy + dypx + ',';\n\t\t\t\t\t}else if(k === 'filter'){\n\t\t\t\t\t\t//t += _s + 'filter ' + _s + d + dpx + _s + ceaser[e] + _s + dy + dypx + ',';\n\t\t\t\t\t\tt += _s + _w +'filter ' + _s + d + dpx + _s + (ceaser[e]?ceaser[e]:e) + _s + dy + dypx + ',';\n\t\t\t\t\t}\n\t\t\t\t}\t\n\t\t\t}else {\n\t\t\t\tt += ' all ' + d + dpx + _s + (ceaser[e]?ceaser[e]:e) + _s + dy + dypx + ',';\n\t\t\t}\n\t\t\tt = t.replace(/,\\s*$/, _e);\n\t\t\tt += _n;\n\t\t\ts += _t + t;\n\t\t\ts += _t + _w + t;\n\t\t\ts += _x + _n;\n\t\t\t//hover\n\t\t\tvar states = _d + n + ':hover, ' + _d + n + ':focus, ' + _d + n + ':active ';\n\t\t\ts += states + _o + _n;\n\t\t\tt = '';\n\t\t\tfor(var k in prop){\n\t\t\t\tt += getSimpleCSS(k,prop[k]);\n\t\t\t}\n\t\t\ts += t;\n\t\t\ts += _x + _n;\n\t\t}\n\t\tglobal.code = s;\n\t\treturn s;\n\t}", "function transformWithTransition(element, transition) {\n // transition's properties:\n // - duration: Number representing the duration of the animation in milliseconds.\n // - timing: String representing the CSS timing function that controls the progress of the animation.\n // - to: The value of *element*'s transform property after the animation.\n var duration = transition.duration * _TransitionAnimation._animationFactor;\n var transitionProperty = _BaseUtils._browserStyleEquivalents[\"transition\"].scriptName;\n element.style[transitionProperty] = duration + \"ms \" + transformNames.cssName + \" \" + transition.timing;\n element.style[transformNames.scriptName] = transition.to;\n\n var finish;\n return new Promise(function (c) {\n var onTransitionEnd = function (eventObject) {\n if (eventObject.target === element && eventObject.propertyName === transformNames.cssName) {\n finish();\n }\n };\n\n var didFinish = false;\n finish = function () {\n if (!didFinish) {\n _Global.clearTimeout(timeoutId);\n element.removeEventListener(_BaseUtils._browserEventEquivalents[\"transitionEnd\"], onTransitionEnd);\n element.style[transitionProperty] = \"\";\n didFinish = true;\n }\n c();\n };\n\n // Watch dog timeout\n var timeoutId = _Global.setTimeout(function () {\n timeoutId = _Global.setTimeout(finish, duration);\n }, 50);\n\n element.addEventListener(_BaseUtils._browserEventEquivalents[\"transitionEnd\"], onTransitionEnd);\n }, function () {\n finish(); // On cancelation, complete the promise successfully to match PVL\n });\n }", "function applyCssTransform(element, transformValue) {\n // It's important to trim the result, because the browser will ignore the set operation\n // if the string contains only whitespace.\n var value = transformValue.trim();\n element.style.transform = value;\n element.style.webkitTransform = value;\n}", "function easeOutBack (t, b, c, d, s)\n {\n if (!s) \n {\n s = 1.70158;\n }\n return c*((t=t/d-1)*t*((s+1)*t + s) + 1) + b;\n }", "_calcTransform() {\n return 'translate(' + this._margin.left + ',' + this._margin.top + ')';\n }", "function this_delay(){\n $Elem.css('-webkit-transition','height .25s, border 0s linear .21s, padding .15s');\n $Elem.css('-moz-transition','height .25s, border 0s linear .21s, padding .15s');\n $Elem.css('-o-transition','height .25s, border 0s linear .21s, padding .15s');\n $Elem.css('transition','height .25s, border 0s linear .21s, padding .15s');\n }", "function fixTransforms(props, el) {\n // clone props at this state\n var propsCopy = {};\n for (var k in props) {\n propsCopy[k] = props[k];\n }\n\n var propVal;\n for (var p in props) {\n propVal = props[p];\n\n // if not a transform: translate, just move on\n if (p != 'transform' || !isTranslate(propVal)) {\n continue;\n }\n\n var x = null;\n var y = null;\n var xy = null;\n var xyz = null;\n\n propVal = propVal.substr(0, propVal.indexOf(')') + 1);\n\n if (startsWith(propVal, 'translateX(')) {\n x = propVal.match(/translateX\\((.*)\\)/)[1].trim();\n } else if (startsWith(propVal, 'translateY(')) {\n y = propVal.match(/translateY\\((.*)\\)/)[1].trim();\n } else if (startsWith(propVal, 'translate(')) {\n xy = propVal.match(/translate\\((.*)\\)/)[1].replace(' ', '').split(',');\n x = xy[0];\n y = xy[1];\n } else { // translate3d( --> X,Y,Z\n xyz = propVal.match(/translate3d\\((.*)\\)/)[1].replace(' ', '').split(',');\n x = xyz[0];\n y = xyz[1];\n }\n\n if (x) {\n var xVal = parseInt(x);\n var xUnits = x.replace(xVal.toString(), '');\n\n if (props.left && props.right && props.left != 'auto' && props.right != 'auto') {\n continue;\n }\n\n if (props.left && props.left != 'auto') {\n var left = props.left.trim();\n var leftVal = parseInt(left);\n var leftUnits = left.replace(leftVal.toString(), '');\n\n if (leftVal == 0|| isNaN(leftVal) || xUnits != leftUnits) {\n continue;\n }\n\n if (xUnits == 'px') {\n propsCopy.left = leftVal + xVal + 'px';\n } else if (xUnits == '%') {\n propsCopy.left = computeNewPctPos(el, 'left', leftVal, xVal);\n }\n } else if (props.right && props.right != 'auto') {\n var right = props.right.trim();\n var rightVal = parseInt(right);\n var rightUnits = right.replace(rightVal.toString(), '');\n\n if (rightVal == 0|| isNaN(rightVal) || xUnits != rightUnits) {\n continue;\n }\n\n xVal = -1 * xVal; // swap around signs\n\n if (xUnits == 'px') {\n propsCopy.right = rightVal + xVal + 'px';\n } else if (xUnits == '%') {\n propsCopy.right = computeNewPctPos(el, 'right', rightVal, xVal);\n }\n } else {\n propsCopy.left = x;\n }\n }\n\n if (y) {\n var yVal = parseInt(y);\n var yUnits = y.replace(yVal.toString(), '');\n\n if (props.top && props.bottom && props.top != 'auto' && props.bottom != 'auto') {\n continue;\n }\n\n if (props.top) {\n var top = props.top.trim();\n var topVal = parseInt(top);\n var topUnits = top.replace(topVal.toString(), '');\n\n if (topVal == 0|| isNaN(topVal) || yUnits != topUnits) {\n continue;\n }\n\n if (yUnits == 'px') {\n propsCopy.top = topVal + yVal + 'px';\n } else if (yUnits == '%') {\n propsCopy.top = computeNewPctPos(el, 'top', topVal, yVal);\n }\n } else if (props.bottom) {\n var bottom = props.bottom.trim();\n var bottomVal = parseInt(bottom);\n var bottomUnits = bottom.replace(bottomVal.toString(), '');\n\n if (bottomVal == 0|| isNaN(bottomVal) || yUnits != bottomUnits) {\n continue;\n }\n\n yVal = -1 * yVal; // swap around signs\n\n if (yUnits == 'px') {\n propsCopy.bottom = bottomVal + yVal + 'px';\n } else if (yUnits == '%') {\n propsCopy.bottom = computeNewPctPos(el, 'bottom', bottomVal, yVal);\n }\n } else {\n propsCopy.top = y;\n }\n }\n\n if (['relative', 'absolute', 'fixed'].indexOf(props['position']) == -1) {\n propsCopy.position = 'relative';\n }\n\n if (x || y) {\n continue;\n }\n }\n\n return propsCopy;\n}", "function supportsTransitions() {\n\t\tvar b = document.body || document.documentElement,\n\t\t\ts = b.style,\n\t\t\tp = 'transition',\n\t\t\tv = ['Moz', 'Webkit', 'Khtml', 'O', 'ms'];\n\t\t\n\t\tif (typeof s[p] == 'string') { return true; }\n\t\t\n\t\tp = p.charAt(0).toUpperCase() + p.substr(1);\n\t\tfor (var i=0; i<v.length; i++) {\n\t\t\tif (typeof s[v[i] + p] == 'string') { return true; }\n\t\t}\n\t\treturn false;\n\t}", "function getTransform(el) {\n // @ts-ignore\n var transform = window.getComputedStyle(el)[transformProperty];\n if (!transform || transform === 'none') {\n transform = 'matrix(1, 0, 0, 1, 0, 0)';\n }\n return transform.replace(/\\(|\\)|matrix|\\s+/g, '').split(',');\n}", "function captionTransition(caption, duration) { // 3264\n if (caption.hasClass(\"center-align\")) { // 3265\n caption.velocity({opacity: 0, translateY: -100}, {duration: duration, queue: false}); // 3266\n } // 3267\n else if (caption.hasClass(\"right-align\")) { // 3268\n caption.velocity({opacity: 0, translateX: 100}, {duration: duration, queue: false}); // 3269\n } // 3270\n else if (caption.hasClass(\"left-align\")) { // 3271\n caption.velocity({opacity: 0, translateX: -100}, {duration: duration, queue: false}); // 3272\n } // 3273\n } // 3274", "function Transformation(mm,e) {\n\tvar\n\t\tself=this,\n\t\tT=mm?(mm.M?mm:new Matrix(mm)):new Matrix([[1,0,0,0],[0,1,0,0],[0,0,1,0],[0,0,0,1]]),\n\t\tparent=e;\n\t\t\n\tjQuery.extend(self,{\n\t\t\n\t\trotateX: function(angle) {\n\t\t\tvar c = Math.cos(self.angle2rad(angle));\n\t\t\tvar s = Math.sin(self.angle2rad(angle));\n\t\t\t\n\t\t\tT=T.mult([[1, 0, 0, 0],[0, c, -s, 0],[0, s, c, 0],[0, 0, 0, 1]]);\n\t\t\t\n\t\t\treturn self;\n\t\t},\n\t\t\n\t\trotateY: function(angle) {\n\t\t\tvar c = Math.cos(self.angle2rad(angle));\n\t\t\tvar s = Math.sin(self.angle2rad(angle));\n\t\t\t\n\t\t\tT=T.mult([[c, 0, s, 0],[0, 1, 0, 0],[-s, 0, c, 0],[0, 0, 0, 1]]);\n\t\t\t\n\t\t\treturn self;\n\t\t},\n\t\t\n\t\trotateZ: function(angle) {\n\t\t\tvar c = Math.cos(self.angle2rad(angle));\n\t\t\tvar s = Math.sin(self.angle2rad(angle));\n\t\t\t\n\t\t\tT=T.mult([[c, -s, 0, 0],[s, c, 0, 0],[0, 0, 1, 0],[0, 0, 0, 1]]);\n\t\t\t\n\t\t\treturn self;\n\t\t},\n\t\t\n\t\tscale: function(sx,sy,sz) {\n\t\t\tT=T.mult([[sx, 0, 0, 0],[0, sy, 0, 0],[0, 0, sz, 0],[0, 0, 0, 1]]);\n\t\t\treturn self;\n\t\t},\n\t\t\n\t\ttranslate: function(tx,ty,tz) {\n\t\t\tT=T.mult([[1, 0, 0, tx],[0, 1, 0, ty],[0, 0, 1, tz],[0, 0, 0, 1]]);\n\t\t\treturn self;\n\t\t},\n\t\t\n\t\tangle2rad: function(angle) {\n\t\t\tangle=String(angle).toLowerCase();\n\t\t\tif (String(angle).indexOf(\"deg\")!=-1)\n\t\t\t\tangle=angle.substr(0,angle.length-3)*Math.PI/180;\n\t\t\telse if (String(angle).indexOf(\"grad\")!=-1)\n\t\t\t\tangle=angle.substr(0,angle.length-4)*Math.PI/200;\n\t\t\telse if (String(angle).indexOf(\"rad\")!=-1)\n\t\t\t\tangle=angle.substr(0,angle.length-3)*1.0;\n\t\t\treturn angle*1.0;\n\t\t},\n\t\t\n\t\tset: function(mm,e) {\n\t\t\tT=mm?(mm.M?mm:new Matrix(mm)):new Matrix([[1,0,0,0],[0,1,0,0],[0,0,1,0],[0,0,0,1]]);\n\t\t\tif (e) parent=e;\n\t\t},\n\t\t\n\t\t'T':function(){return T},\n\t\tobject:function(){return parent;}\n\t});\n}", "function StyleTransformCur() {\n /**\n * SETUP CURRENT VALUE EACH TRANSFORM PROPERTIES\n */\n var optsCur = myData['opts'][an.optsPos], tfBegin = optsCur.tfBegin, tfEnd = optsCur.tfEnd, tfCur = {};\n for (var name in tfEnd) {\n // Setup value 'plus' of each properties\n var tfBeginCur = TF.ConvertValueToPX($anim, name, tfBegin[name]), tfEndCur = TF.ConvertValueToPX($anim, name, tfEnd[name]), valuePlus = (tfEndCur - tfBeginCur) * an.xCur, valueCur = tfBeginCur + valuePlus;\n // Value of current property\n tfCur[name] = valueCur;\n }\n /**\n * CONVERT PARTICULAR PROPERTY OF TRANSFORM TO CSS\n */\n var cssTf = TF.ToCss(tfCur, optsCur);\n /**\n * STORE CURRENT TRANSFORM CSS\n */\n var nameTf = VA.prefix + 'transform';\n styleCur[nameTf] = cssTf;\n // Store current Transform into system\n myData.tfCur = tfCur;\n }", "transitionToRemap() {\n if (this.tick <= 50) {\n this.tutorial.alpha -= 0.02;\n this.fireToContinue.alpha -= 0.02;\n }\n else if (this.tick <= 100) {\n this.remapHeaderText.alpha += 0.02;\n this.remapKB.alpha += 0.02;\n this.remapButtonText.alpha += 0.02;\n }\n else {\n this.state = 4;\n this.tick = 0;\n this.remapPressText.alpha = 1;\n }\n }", "apply() {\n this.scene.multMatrix(this.animTransform);\n }", "function getTransition(properties, duration, easing, type){\n\t\tvar ob = parse(properties);\n\t\tob[0].isTransition = type || 1;\n\t\tob[0].useAll = true;\n\t\treturn getCSS(ob, duration, easing);\n\t}", "function addAnimation(element) {\n var transition = 'all ' + options.scrollingSpeed + 'ms ' + options.easingcss3;\n removeClass(element, NO_TRANSITION);\n return css(element, {\n '-webkit-transition': transition,\n 'transition': transition\n });\n }", "updateTransform() {\n this.transform = Object(transformation_matrix__WEBPACK_IMPORTED_MODULE_9__[\"toSVG\"])(Object(transformation_matrix__WEBPACK_IMPORTED_MODULE_9__[\"smoothMatrix\"])(this.transformationMatrix, 100));\n }", "function AnimateDomUtils($mdUtil,$q,$timeout,$mdConstant,$animateCss){var self;return self={/**\n\t *\n\t */translate3d:function translate3d(target,from,to,options){return $animateCss(target,{from:from,to:to,addClass:options.transitionInClass,removeClass:options.transitionOutClass}).start().then(function(){// Resolve with reverser function...\n\treturn reverseTranslate;});/**\n\t * Specific reversal of the request translate animation above...\n\t */function reverseTranslate(newFrom){return $animateCss(target,{to:newFrom||from,addClass:options.transitionOutClass,removeClass:options.transitionInClass}).start();}},/**\n\t * Listen for transitionEnd event (with optional timeout)\n\t * Announce completion or failure via promise handlers\n\t */waitTransitionEnd:function waitTransitionEnd(element,opts){var TIMEOUT=3000;// fallback is 3 secs\n\treturn $q(function(resolve,reject){opts=opts||{};// If there is no transition is found, resolve immediately\n\t//\n\t// NOTE: using $mdUtil.nextTick() causes delays/issues\n\tif(noTransitionFound(opts.cachedTransitionStyles)){TIMEOUT=0;}var timer=$timeout(finished,opts.timeout||TIMEOUT);element.on($mdConstant.CSS.TRANSITIONEND,finished);/**\n\t * Upon timeout or transitionEnd, reject or resolve (respectively) this promise.\n\t * NOTE: Make sure this transitionEnd didn't bubble up from a child\n\t */function finished(ev){if(ev&&ev.target!==element[0])return;if(ev)$timeout.cancel(timer);element.off($mdConstant.CSS.TRANSITIONEND,finished);// Never reject since ngAnimate may cause timeouts due missed transitionEnd events\n\tresolve();}/**\n\t * Checks whether or not there is a transition.\n\t *\n\t * @param styles The cached styles to use for the calculation. If null, getComputedStyle()\n\t * will be used.\n\t *\n\t * @returns {boolean} True if there is no transition/duration; false otherwise.\n\t */function noTransitionFound(styles){styles=styles||window.getComputedStyle(element[0]);return styles.transitionDuration=='0s'||!styles.transition&&!styles.transitionProperty;}});},calculateTransformValues:function calculateTransformValues(element,originator){var origin=originator.element;var bounds=originator.bounds;if(origin||bounds){var originBnds=origin?self.clientRect(origin)||currentBounds():self.copyRect(bounds);var dialogRect=self.copyRect(element[0].getBoundingClientRect());var dialogCenterPt=self.centerPointFor(dialogRect);var originCenterPt=self.centerPointFor(originBnds);return{centerX:originCenterPt.x-dialogCenterPt.x,centerY:originCenterPt.y-dialogCenterPt.y,scaleX:Math.round(100*Math.min(0.5,originBnds.width/dialogRect.width))/100,scaleY:Math.round(100*Math.min(0.5,originBnds.height/dialogRect.height))/100};}return{centerX:0,centerY:0,scaleX:0.5,scaleY:0.5};/**\n\t * This is a fallback if the origin information is no longer valid, then the\n\t * origin bounds simply becomes the current bounds for the dialogContainer's parent\n\t */function currentBounds(){var cntr=element?element.parent():null;var parent=cntr?cntr.parent():null;return parent?self.clientRect(parent):null;}},/**\n\t * Calculate the zoom transform from dialog to origin.\n\t *\n\t * We use this to set the dialog position immediately;\n\t * then the md-transition-in actually translates back to\n\t * `translate3d(0,0,0) scale(1.0)`...\n\t *\n\t * NOTE: all values are rounded to the nearest integer\n\t */calculateZoomToOrigin:function calculateZoomToOrigin(element,originator){var zoomTemplate=\"translate3d( {centerX}px, {centerY}px, 0 ) scale( {scaleX}, {scaleY} )\";var buildZoom=angular.bind(null,$mdUtil.supplant,zoomTemplate);return buildZoom(self.calculateTransformValues(element,originator));},/**\n\t * Calculate the slide transform from panel to origin.\n\t * NOTE: all values are rounded to the nearest integer\n\t */calculateSlideToOrigin:function calculateSlideToOrigin(element,originator){var slideTemplate=\"translate3d( {centerX}px, {centerY}px, 0 )\";var buildSlide=angular.bind(null,$mdUtil.supplant,slideTemplate);return buildSlide(self.calculateTransformValues(element,originator));},/**\n\t * Enhance raw values to represent valid css stylings...\n\t */toCss:function toCss(raw){var css={};var lookups='left top right bottom width height x y min-width min-height max-width max-height';angular.forEach(raw,function(value,key){if(angular.isUndefined(value))return;if(lookups.indexOf(key)>=0){css[key]=value+'px';}else{switch(key){case'transition':convertToVendor(key,$mdConstant.CSS.TRANSITION,value);break;case'transform':convertToVendor(key,$mdConstant.CSS.TRANSFORM,value);break;case'transformOrigin':convertToVendor(key,$mdConstant.CSS.TRANSFORM_ORIGIN,value);break;case'font-size':css['font-size']=value;// font sizes aren't always in px\n\tbreak;}}});return css;function convertToVendor(key,vendor,value){angular.forEach(vendor.split(' '),function(key){css[key]=value;});}},/**\n\t * Convert the translate CSS value to key/value pair(s).\n\t */toTransformCss:function toTransformCss(transform,addTransition,transition){var css={};angular.forEach($mdConstant.CSS.TRANSFORM.split(' '),function(key){css[key]=transform;});if(addTransition){transition=transition||\"all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1) !important\";css.transition=transition;}return css;},/**\n\t * Clone the Rect and calculate the height/width if needed\n\t */copyRect:function copyRect(source,destination){if(!source)return null;destination=destination||{};angular.forEach('left top right bottom width height'.split(' '),function(key){destination[key]=Math.round(source[key]);});destination.width=destination.width||destination.right-destination.left;destination.height=destination.height||destination.bottom-destination.top;return destination;},/**\n\t * Calculate ClientRect of element; return null if hidden or zero size\n\t */clientRect:function clientRect(element){var bounds=angular.element(element)[0].getBoundingClientRect();var isPositiveSizeClientRect=function isPositiveSizeClientRect(rect){return rect&&rect.width>0&&rect.height>0;};// If the event origin element has zero size, it has probably been hidden.\n\treturn isPositiveSizeClientRect(bounds)?self.copyRect(bounds):null;},/**\n\t * Calculate 'rounded' center point of Rect\n\t */centerPointFor:function centerPointFor(targetRect){return targetRect?{x:Math.round(targetRect.left+targetRect.width/2),y:Math.round(targetRect.top+targetRect.height/2)}:{x:0,y:0};}};}", "function ws_book(p,n,b){var f=jQuery;var m=f(this);var i=f(\".ws_list\",b);var k=f(\"<div>\").addClass(\"ws_effect ws_book\").css({position:\"absolute\",top:0,left:0,width:\"100%\",height:\"100%\"}).appendTo(b),e=p.duration,d=p.perspective||0.4,g=p.shadow||0.35,a=p.noCanvas||false,l=p.no3d||false;var o={domPrefixes:\" Webkit Moz ms O Khtml\".split(\" \"),testDom:function(r){var q=this.domPrefixes.length;while(q--){if(typeof document.body.style[this.domPrefixes[q]+r]!==\"undefined\"){return true}}return false},cssTransitions:function(){return this.testDom(\"Transition\")},cssTransforms3d:function(){var r=(typeof document.body.style.perspectiveProperty!==\"undefined\")||this.testDom(\"Perspective\");if(r&&/AppleWebKit/.test(navigator.userAgent)){var t=document.createElement(\"div\"),q=document.createElement(\"style\"),s=\"Test3d\"+Math.round(Math.random()*99999);q.textContent=\"@media (-webkit-transform-3d){#\"+s+\"{height:3px}}\";document.getElementsByTagName(\"head\")[0].appendChild(q);t.id=s;document.body.appendChild(t);r=t.offsetHeight===3;q.parentNode.removeChild(q);t.parentNode.removeChild(t)}return r},canvas:function(){if(typeof document.createElement(\"canvas\").getContext!==\"undefined\"){return true}}};if(!l){l=o.cssTransitions()&&o.cssTransforms3d()}if(!a){a=o.canvas()}var j;this.go=function(r,q,E){if(j){return -1}var v=n.get(r),G=n.get(q);if(E==undefined){E=(q==0&&r!=q+1)||(r==q-1)}else{E=!E}var s=f(\"<div>\").appendTo(k);var t=f(v);t={width:t.width(),height:t.height(),marginLeft:parseFloat(t.css(\"marginLeft\")),marginTop:parseFloat(t.css(\"marginTop\"))};if(l){var y={background:\"#000\",position:\"absolute\",left:0,top:0,width:\"100%\",height:\"100%\",transformStyle:\"preserve-3d\",zIndex:3,outline:\"1px solid transparent\"};perspect=b.width()*(3-d*2);s.css(y).css({perspective:perspect,transform:\"translate3d(0,0,0)\"});var z=90;var D=f(\"<div>\").css(y).css({position:\"relative\",\"float\":\"left\",width:\"50%\",overflow:\"hidden\"}).append(f(\"<img>\").attr(\"src\",(E?v:G).src).css(t)).appendTo(s);var C=f(\"<div>\").css(y).css({position:\"relative\",\"float\":\"left\",width:\"50%\",overflow:\"hidden\"}).append(f(\"<img>\").attr(\"src\",(E?G:v).src).css(t).css({marginLeft:-t.width/2})).appendTo(s);var I=f(\"<div>\").css(y).css({display:E?\"block\":\"none\",width:\"50%\",transform:\"rotateY(\"+(E?0.1:z)+\"deg)\",transition:(E?\"ease-in \":\"ease-out \")+e/2000+\"s\",transformOrigin:\"right\",overflow:\"hidden\"}).append(f(\"<img>\").attr(\"src\",(E?G:v).src).css(t)).appendTo(s);var F=f(\"<div>\").css(y).css({display:E?\"none\":\"block\",left:\"50%\",width:\"50%\",transform:\"rotateY(-\"+(E?z:0.1)+\"deg)\",transition:(E?\"ease-out \":\"ease-in \")+e/2000+\"s\",transformOrigin:\"left\",overflow:\"hidden\"}).append(f(\"<img>\").attr(\"src\",(E?v:G).src).css(t).css({marginLeft:-t.width/2})).appendTo(s)}else{if(a){var x=f(\"<div>\").css({position:\"absolute\",top:0,left:E?0:\"50%\",width:\"50%\",height:\"100%\",overflow:\"hidden\",zIndex:6}).append(f(n.get(r)).clone().css({position:\"absolute\",height:\"100%\",right:E?\"auto\":0,left:E?0:\"auto\"})).appendTo(s).hide();var B=f(\"<div>\").css({position:\"absolute\",width:\"100%\",height:\"100%\",left:0,top:0,zIndex:8}).appendTo(s).hide();var H=f(\"<canvas>\").css({position:\"absolute\",zIndex:2,left:0,top:-B.height()*d/2}).attr({width:B.width(),height:B.height()*(d+1)}).appendTo(B);var A=H.clone().css({top:0,zIndex:1}).attr({width:B.width(),height:B.height()}).appendTo(B);var w=H.get(0).getContext(\"2d\");var u=A.get(0).getContext(\"2d\")}else{i.stop(true).animate({left:(r?-r+\"00%\":(/Safari/.test(navigator.userAgent)?\"0%\":0))},e,\"easeInOutExpo\")}}if(!l&&a){var D=w;var C=u;var I=G;var F=v}j=new h(E,z,D,C,I,F,B,H,A,x,t,function(){m.trigger(\"effectEnd\");s.remove();j=0})};function c(G,s,A,v,u,E,D,C,B,t,r){numSlices=u/2,widthScale=u/B,heightScale=(1-E)/numSlices;G.clearRect(0,0,r.width(),r.height());for(var q=0;q<numSlices+widthScale;q++){var z=(D?q*p.width/u+p.width/2:(numSlices-q)*p.width/u);var H=A+(D?2:-2)*q,F=v+t*heightScale*q/2;if(z<0){z=0}if(H<0){H=0}if(F<0){F=0}G.drawImage(s,z,0,2.5,p.height,H,F,2,t*(1-(heightScale*q)))}G.save();G.beginPath();G.moveTo(A,v);G.lineTo(A+(D?2:-2)*(numSlices+widthScale),v+t*heightScale*(numSlices+widthScale)/2);G.lineTo(A+(D?2:-2)*(numSlices+widthScale),t*(1-heightScale*(numSlices+widthScale))+v+t*heightScale*(numSlices+widthScale)/2);G.lineTo(A,v+t);G.closePath();G.clip();G.fillStyle=\"rgba(0,0,0,\"+Math.round(C*100)/100+\")\";G.fillRect(0,0,r.width(),r.height());G.restore()}function h(A,r,C,B,y,x,v,w,u,z,t,E){if(l){if(!A){r*=-1;var D=B;B=C;C=D;D=x;x=y;y=D}setTimeout(function(){C.children(\"img\").css(\"opacity\",g).animate({opacity:1},e/2);y.css(\"transform\",\"rotateY(\"+r+\"deg)\").children(\"img\").css(\"opacity\",1).animate({opacity:g},e/2,function(){y.hide();x.show().css(\"transform\",\"rotateX(0deg) rotateY(0deg)\").children(\"img\").css(\"opacity\",g).animate({opacity:1},e/2);B.children(\"img\").css(\"opacity\",1).animate({opacity:g},e/2)})},0);setTimeout(E,e)}else{if(a){v.show();var q=new Date;var s=true;wowAnimate(function(F){var I=jQuery.easing.easeInOutQuint(1,F,0,1,1),H=jQuery.easing.easeInOutCubic(1,F,0,1,1),L=!A;if(F<0.5){I*=2;H*=2;var G=y}else{L=A;I=(1-I)*2;H=(1-H)*2;var G=x}var J=v.height()*d/2,N=(1-I)*v.width()/2,M=1+H*d,K=v.width()/2;c(C,G,K,J,N,M,L,H*g,K,v.height(),w);if(s){z.show();s=false}B.clearRect(0,0,u.width(),u.height());B.fillStyle=\"rgba(0,0,0,\"+(g-H*g)+\")\";B.fillRect(L?K:0,0,u.width()/2,u.height())},0,1,e,E)}}}}", "function ws_book(p,n,b){var f=jQuery;var m=f(this);var i=f(\".ws_list\",b);var k=f(\"<div>\").addClass(\"ws_effect ws_book\").css({position:\"absolute\",top:0,left:0,width:\"100%\",height:\"100%\"}).appendTo(b),e=p.duration,d=p.perspective||0.4,g=p.shadow||0.35,a=p.noCanvas||false,l=p.no3d||false;var o={domPrefixes:\" Webkit Moz ms O Khtml\".split(\" \"),testDom:function(r){var q=this.domPrefixes.length;while(q--){if(typeof document.body.style[this.domPrefixes[q]+r]!==\"undefined\"){return true}}return false},cssTransitions:function(){return this.testDom(\"Transition\")},cssTransforms3d:function(){var r=(typeof document.body.style.perspectiveProperty!==\"undefined\")||this.testDom(\"Perspective\");if(r&&/AppleWebKit/.test(navigator.userAgent)){var t=document.createElement(\"div\"),q=document.createElement(\"style\"),s=\"Test3d\"+Math.round(Math.random()*99999);q.textContent=\"@media (-webkit-transform-3d){#\"+s+\"{height:3px}}\";document.getElementsByTagName(\"head\")[0].appendChild(q);t.id=s;document.body.appendChild(t);r=t.offsetHeight===3;q.parentNode.removeChild(q);t.parentNode.removeChild(t)}return r},canvas:function(){if(typeof document.createElement(\"canvas\").getContext!==\"undefined\"){return true}}};if(!l){l=o.cssTransitions()&&o.cssTransforms3d()}if(!a){a=o.canvas()}var j;this.go=function(r,q,E){if(j){return -1}var v=n.get(r),G=n.get(q);if(E==undefined){E=(q==0&&r!=q+1)||(r==q-1)}else{E=!E}var s=f(\"<div>\").appendTo(k);var t=f(v);t={width:t.width(),height:t.height(),marginLeft:parseFloat(t.css(\"marginLeft\")),marginTop:parseFloat(t.css(\"marginTop\"))};if(l){var y={background:\"#000\",position:\"absolute\",left:0,top:0,width:\"100%\",height:\"100%\",transformStyle:\"preserve-3d\",zIndex:3,outline:\"1px solid transparent\"};perspect=b.width()*(3-d*2);s.css(y).css({perspective:perspect,transform:\"translate3d(0,0,0)\"});var z=90;var D=f(\"<div>\").css(y).css({position:\"relative\",\"float\":\"left\",width:\"50%\",overflow:\"hidden\"}).append(f(\"<img>\").attr(\"src\",(E?v:G).src).css(t)).appendTo(s);var C=f(\"<div>\").css(y).css({position:\"relative\",\"float\":\"left\",width:\"50%\",overflow:\"hidden\"}).append(f(\"<img>\").attr(\"src\",(E?G:v).src).css(t).css({marginLeft:-t.width/2})).appendTo(s);var I=f(\"<div>\").css(y).css({display:E?\"block\":\"none\",width:\"50%\",transform:\"rotateY(\"+(E?0.1:z)+\"deg)\",transition:(E?\"ease-in \":\"ease-out \")+e/2000+\"s\",transformOrigin:\"right\",overflow:\"hidden\"}).append(f(\"<img>\").attr(\"src\",(E?G:v).src).css(t)).appendTo(s);var F=f(\"<div>\").css(y).css({display:E?\"none\":\"block\",left:\"50%\",width:\"50%\",transform:\"rotateY(-\"+(E?z:0.1)+\"deg)\",transition:(E?\"ease-out \":\"ease-in \")+e/2000+\"s\",transformOrigin:\"left\",overflow:\"hidden\"}).append(f(\"<img>\").attr(\"src\",(E?v:G).src).css(t).css({marginLeft:-t.width/2})).appendTo(s)}else{if(a){var x=f(\"<div>\").css({position:\"absolute\",top:0,left:E?0:\"50%\",width:\"50%\",height:\"100%\",overflow:\"hidden\",zIndex:6}).append(f(n.get(r)).clone().css({position:\"absolute\",height:\"100%\",right:E?\"auto\":0,left:E?0:\"auto\"})).appendTo(s).hide();var B=f(\"<div>\").css({position:\"absolute\",width:\"100%\",height:\"100%\",left:0,top:0,zIndex:8}).appendTo(s).hide();var H=f(\"<canvas>\").css({position:\"absolute\",zIndex:2,left:0,top:-B.height()*d/2}).attr({width:B.width(),height:B.height()*(d+1)}).appendTo(B);var A=H.clone().css({top:0,zIndex:1}).attr({width:B.width(),height:B.height()}).appendTo(B);var w=H.get(0).getContext(\"2d\");var u=A.get(0).getContext(\"2d\")}else{i.stop(true).animate({left:(r?-r+\"00%\":(/Safari/.test(navigator.userAgent)?\"0%\":0))},e,\"easeInOutExpo\")}}if(!l&&a){var D=w;var C=u;var I=G;var F=v}j=new h(E,z,D,C,I,F,B,H,A,x,t,function(){m.trigger(\"effectEnd\");s.remove();j=0})};function c(G,s,A,v,u,E,D,C,B,t,r){numSlices=u/2,widthScale=u/B,heightScale=(1-E)/numSlices;G.clearRect(0,0,r.width(),r.height());for(var q=0;q<numSlices+widthScale;q++){var z=(D?q*p.width/u+p.width/2:(numSlices-q)*p.width/u);var H=A+(D?2:-2)*q,F=v+t*heightScale*q/2;if(z<0){z=0}if(H<0){H=0}if(F<0){F=0}G.drawImage(s,z,0,2.5,p.height,H,F,2,t*(1-(heightScale*q)))}G.save();G.beginPath();G.moveTo(A,v);G.lineTo(A+(D?2:-2)*(numSlices+widthScale),v+t*heightScale*(numSlices+widthScale)/2);G.lineTo(A+(D?2:-2)*(numSlices+widthScale),t*(1-heightScale*(numSlices+widthScale))+v+t*heightScale*(numSlices+widthScale)/2);G.lineTo(A,v+t);G.closePath();G.clip();G.fillStyle=\"rgba(0,0,0,\"+Math.round(C*100)/100+\")\";G.fillRect(0,0,r.width(),r.height());G.restore()}function h(A,r,C,B,y,x,v,w,u,z,t,E){if(l){if(!A){r*=-1;var D=B;B=C;C=D;D=x;x=y;y=D}setTimeout(function(){C.children(\"img\").css(\"opacity\",g).animate({opacity:1},e/2);y.css(\"transform\",\"rotateY(\"+r+\"deg)\").children(\"img\").css(\"opacity\",1).animate({opacity:g},e/2,function(){y.hide();x.show().css(\"transform\",\"rotateX(0deg) rotateY(0deg)\").children(\"img\").css(\"opacity\",g).animate({opacity:1},e/2);B.children(\"img\").css(\"opacity\",1).animate({opacity:g},e/2)})},0);setTimeout(E,e)}else{if(a){v.show();var q=new Date;var s=true;wowAnimate(function(F){var I=jQuery.easing.easeInOutQuint(1,F,0,1,1),H=jQuery.easing.easeInOutCubic(1,F,0,1,1),L=!A;if(F<0.5){I*=2;H*=2;var G=y}else{L=A;I=(1-I)*2;H=(1-H)*2;var G=x}var J=v.height()*d/2,N=(1-I)*v.width()/2,M=1+H*d,K=v.width()/2;c(C,G,K,J,N,M,L,H*g,K,v.height(),w);if(s){z.show();s=false}B.clearRect(0,0,u.width(),u.height());B.fillStyle=\"rgba(0,0,0,\"+(g-H*g)+\")\";B.fillRect(L?K:0,0,u.width()/2,u.height())},0,1,e,E)}}}}", "function ws_book(p,n,b){var f=jQuery;var m=f(this);var i=f(\".ws_list\",b);var k=f(\"<div>\").addClass(\"ws_effect ws_book\").css({position:\"absolute\",top:0,left:0,width:\"100%\",height:\"100%\"}).appendTo(b),e=p.duration,d=p.perspective||0.4,g=p.shadow||0.35,a=p.noCanvas||false,l=p.no3d||false;var o={domPrefixes:\" Webkit Moz ms O Khtml\".split(\" \"),testDom:function(r){var q=this.domPrefixes.length;while(q--){if(typeof document.body.style[this.domPrefixes[q]+r]!==\"undefined\"){return true}}return false},cssTransitions:function(){return this.testDom(\"Transition\")},cssTransforms3d:function(){var r=(typeof document.body.style.perspectiveProperty!==\"undefined\")||this.testDom(\"Perspective\");if(r&&/AppleWebKit/.test(navigator.userAgent)){var t=document.createElement(\"div\"),q=document.createElement(\"style\"),s=\"Test3d\"+Math.round(Math.random()*99999);q.textContent=\"@media (-webkit-transform-3d){#\"+s+\"{height:3px}}\";document.getElementsByTagName(\"head\")[0].appendChild(q);t.id=s;document.body.appendChild(t);r=t.offsetHeight===3;q.parentNode.removeChild(q);t.parentNode.removeChild(t)}return r},canvas:function(){if(typeof document.createElement(\"canvas\").getContext!==\"undefined\"){return true}}};if(!l){l=o.cssTransitions()&&o.cssTransforms3d()}if(!a){a=o.canvas()}var j;this.go=function(r,q,E){if(j){return -1}var v=n.get(r),G=n.get(q);if(E==undefined){E=(q==0&&r!=q+1)||(r==q-1)}else{E=!E}var s=f(\"<div>\").appendTo(k);var t=f(v);t={width:t.width(),height:t.height(),marginLeft:parseFloat(t.css(\"marginLeft\")),marginTop:parseFloat(t.css(\"marginTop\"))};if(l){var y={background:\"#000\",position:\"absolute\",left:0,top:0,width:\"100%\",height:\"100%\",transformStyle:\"preserve-3d\",zIndex:3,outline:\"1px solid transparent\"};perspect=b.width()*(3-d*2);s.css(y).css({perspective:perspect,transform:\"translate3d(0,0,0)\"});var z=90;var D=f(\"<div>\").css(y).css({position:\"relative\",\"float\":\"left\",width:\"50%\",overflow:\"hidden\"}).append(f(\"<img>\").attr(\"src\",(E?v:G).src).css(t)).appendTo(s);var C=f(\"<div>\").css(y).css({position:\"relative\",\"float\":\"left\",width:\"50%\",overflow:\"hidden\"}).append(f(\"<img>\").attr(\"src\",(E?G:v).src).css(t).css({marginLeft:-t.width/2})).appendTo(s);var I=f(\"<div>\").css(y).css({display:E?\"block\":\"none\",width:\"50%\",transform:\"rotateY(\"+(E?0.1:z)+\"deg)\",transition:(E?\"ease-in \":\"ease-out \")+e/2000+\"s\",transformOrigin:\"right\",overflow:\"hidden\"}).append(f(\"<img>\").attr(\"src\",(E?G:v).src).css(t)).appendTo(s);var F=f(\"<div>\").css(y).css({display:E?\"none\":\"block\",left:\"50%\",width:\"50%\",transform:\"rotateY(-\"+(E?z:0.1)+\"deg)\",transition:(E?\"ease-out \":\"ease-in \")+e/2000+\"s\",transformOrigin:\"left\",overflow:\"hidden\"}).append(f(\"<img>\").attr(\"src\",(E?v:G).src).css(t).css({marginLeft:-t.width/2})).appendTo(s)}else{if(a){var x=f(\"<div>\").css({position:\"absolute\",top:0,left:E?0:\"50%\",width:\"50%\",height:\"100%\",overflow:\"hidden\",zIndex:6}).append(f(n.get(r)).clone().css({position:\"absolute\",height:\"100%\",right:E?\"auto\":0,left:E?0:\"auto\"})).appendTo(s).hide();var B=f(\"<div>\").css({position:\"absolute\",width:\"100%\",height:\"100%\",left:0,top:0,zIndex:8}).appendTo(s).hide();var H=f(\"<canvas>\").css({position:\"absolute\",zIndex:2,left:0,top:-B.height()*d/2}).attr({width:B.width(),height:B.height()*(d+1)}).appendTo(B);var A=H.clone().css({top:0,zIndex:1}).attr({width:B.width(),height:B.height()}).appendTo(B);var w=H.get(0).getContext(\"2d\");var u=A.get(0).getContext(\"2d\")}else{i.stop(true).animate({left:(r?-r+\"00%\":(/Safari/.test(navigator.userAgent)?\"0%\":0))},e,\"easeInOutExpo\")}}if(!l&&a){var D=w;var C=u;var I=G;var F=v}j=new h(E,z,D,C,I,F,B,H,A,x,t,function(){m.trigger(\"effectEnd\");s.remove();j=0})};function c(G,s,A,v,u,E,D,C,B,t,r){numSlices=u/2,widthScale=u/B,heightScale=(1-E)/numSlices;G.clearRect(0,0,r.width(),r.height());for(var q=0;q<numSlices+widthScale;q++){var z=(D?q*p.width/u+p.width/2:(numSlices-q)*p.width/u);var H=A+(D?2:-2)*q,F=v+t*heightScale*q/2;if(z<0){z=0}if(H<0){H=0}if(F<0){F=0}G.drawImage(s,z,0,2.5,p.height,H,F,2,t*(1-(heightScale*q)))}G.save();G.beginPath();G.moveTo(A,v);G.lineTo(A+(D?2:-2)*(numSlices+widthScale),v+t*heightScale*(numSlices+widthScale)/2);G.lineTo(A+(D?2:-2)*(numSlices+widthScale),t*(1-heightScale*(numSlices+widthScale))+v+t*heightScale*(numSlices+widthScale)/2);G.lineTo(A,v+t);G.closePath();G.clip();G.fillStyle=\"rgba(0,0,0,\"+Math.round(C*100)/100+\")\";G.fillRect(0,0,r.width(),r.height());G.restore()}function h(A,r,C,B,y,x,v,w,u,z,t,E){if(l){if(!A){r*=-1;var D=B;B=C;C=D;D=x;x=y;y=D}setTimeout(function(){C.children(\"img\").css(\"opacity\",g).animate({opacity:1},e/2);y.css(\"transform\",\"rotateY(\"+r+\"deg)\").children(\"img\").css(\"opacity\",1).animate({opacity:g},e/2,function(){y.hide();x.show().css(\"transform\",\"rotateX(0deg) rotateY(0deg)\").children(\"img\").css(\"opacity\",g).animate({opacity:1},e/2);B.children(\"img\").css(\"opacity\",1).animate({opacity:g},e/2)})},0);setTimeout(E,e)}else{if(a){v.show();var q=new Date;var s=true;wowAnimate(function(F){var I=jQuery.easing.easeInOutQuint(1,F,0,1,1),H=jQuery.easing.easeInOutCubic(1,F,0,1,1),L=!A;if(F<0.5){I*=2;H*=2;var G=y}else{L=A;I=(1-I)*2;H=(1-H)*2;var G=x}var J=v.height()*d/2,N=(1-I)*v.width()/2,M=1+H*d,K=v.width()/2;c(C,G,K,J,N,M,L,H*g,K,v.height(),w);if(s){z.show();s=false}B.clearRect(0,0,u.width(),u.height());B.fillStyle=\"rgba(0,0,0,\"+(g-H*g)+\")\";B.fillRect(L?K:0,0,u.width()/2,u.height())},0,1,e,E)}}}}", "function ws_book(p,n,b){var f=jQuery;var m=f(this);var i=f(\".ws_list\",b);var k=f(\"<div>\").addClass(\"ws_effect ws_book\").css({position:\"absolute\",top:0,left:0,width:\"100%\",height:\"100%\"}).appendTo(b),e=p.duration,d=p.perspective||0.4,g=p.shadow||0.35,a=p.noCanvas||false,l=p.no3d||false;var o={domPrefixes:\" Webkit Moz ms O Khtml\".split(\" \"),testDom:function(r){var q=this.domPrefixes.length;while(q--){if(typeof document.body.style[this.domPrefixes[q]+r]!==\"undefined\"){return true}}return false},cssTransitions:function(){return this.testDom(\"Transition\")},cssTransforms3d:function(){var r=(typeof document.body.style.perspectiveProperty!==\"undefined\")||this.testDom(\"Perspective\");if(r&&/AppleWebKit/.test(navigator.userAgent)){var t=document.createElement(\"div\"),q=document.createElement(\"style\"),s=\"Test3d\"+Math.round(Math.random()*99999);q.textContent=\"@media (-webkit-transform-3d){#\"+s+\"{height:3px}}\";document.getElementsByTagName(\"head\")[0].appendChild(q);t.id=s;document.body.appendChild(t);r=t.offsetHeight===3;q.parentNode.removeChild(q);t.parentNode.removeChild(t)}return r},canvas:function(){if(typeof document.createElement(\"canvas\").getContext!==\"undefined\"){return true}}};if(!l){l=o.cssTransitions()&&o.cssTransforms3d()}if(!a){a=o.canvas()}var j;this.go=function(r,q,E){if(j){return -1}var v=n.get(r),G=n.get(q);if(E==undefined){E=(q==0&&r!=q+1)||(r==q-1)}else{E=!E}var s=f(\"<div>\").appendTo(k);var t=f(v);t={width:t.width(),height:t.height(),marginLeft:parseFloat(t.css(\"marginLeft\")),marginTop:parseFloat(t.css(\"marginTop\"))};if(l){var y={background:\"#000\",position:\"absolute\",left:0,top:0,width:\"100%\",height:\"100%\",transformStyle:\"preserve-3d\",zIndex:3,outline:\"1px solid transparent\"};perspect=b.width()*(3-d*2);s.css(y).css({perspective:perspect,transform:\"translate3d(0,0,0)\"});var z=90;var D=f(\"<div>\").css(y).css({position:\"relative\",\"float\":\"left\",width:\"50%\",overflow:\"hidden\"}).append(f(\"<img>\").attr(\"src\",(E?v:G).src).css(t)).appendTo(s);var C=f(\"<div>\").css(y).css({position:\"relative\",\"float\":\"left\",width:\"50%\",overflow:\"hidden\"}).append(f(\"<img>\").attr(\"src\",(E?G:v).src).css(t).css({marginLeft:-t.width/2})).appendTo(s);var I=f(\"<div>\").css(y).css({display:E?\"block\":\"none\",width:\"50%\",transform:\"rotateY(\"+(E?0.1:z)+\"deg)\",transition:(E?\"ease-in \":\"ease-out \")+e/2000+\"s\",transformOrigin:\"right\",overflow:\"hidden\"}).append(f(\"<img>\").attr(\"src\",(E?G:v).src).css(t)).appendTo(s);var F=f(\"<div>\").css(y).css({display:E?\"none\":\"block\",left:\"50%\",width:\"50%\",transform:\"rotateY(-\"+(E?z:0.1)+\"deg)\",transition:(E?\"ease-out \":\"ease-in \")+e/2000+\"s\",transformOrigin:\"left\",overflow:\"hidden\"}).append(f(\"<img>\").attr(\"src\",(E?v:G).src).css(t).css({marginLeft:-t.width/2})).appendTo(s)}else{if(a){var x=f(\"<div>\").css({position:\"absolute\",top:0,left:E?0:\"50%\",width:\"50%\",height:\"100%\",overflow:\"hidden\",zIndex:6}).append(f(n.get(r)).clone().css({position:\"absolute\",height:\"100%\",right:E?\"auto\":0,left:E?0:\"auto\"})).appendTo(s).hide();var B=f(\"<div>\").css({position:\"absolute\",width:\"100%\",height:\"100%\",left:0,top:0,zIndex:8}).appendTo(s).hide();var H=f(\"<canvas>\").css({position:\"absolute\",zIndex:2,left:0,top:-B.height()*d/2}).attr({width:B.width(),height:B.height()*(d+1)}).appendTo(B);var A=H.clone().css({top:0,zIndex:1}).attr({width:B.width(),height:B.height()}).appendTo(B);var w=H.get(0).getContext(\"2d\");var u=A.get(0).getContext(\"2d\")}else{i.stop(true).animate({left:(r?-r+\"00%\":(/Safari/.test(navigator.userAgent)?\"0%\":0))},e,\"easeInOutExpo\")}}if(!l&&a){var D=w;var C=u;var I=G;var F=v}j=new h(E,z,D,C,I,F,B,H,A,x,t,function(){m.trigger(\"effectEnd\");s.remove();j=0})};function c(G,s,A,v,u,E,D,C,B,t,r){numSlices=u/2,widthScale=u/B,heightScale=(1-E)/numSlices;G.clearRect(0,0,r.width(),r.height());for(var q=0;q<numSlices+widthScale;q++){var z=(D?q*p.width/u+p.width/2:(numSlices-q)*p.width/u);var H=A+(D?2:-2)*q,F=v+t*heightScale*q/2;if(z<0){z=0}if(H<0){H=0}if(F<0){F=0}G.drawImage(s,z,0,2.5,p.height,H,F,2,t*(1-(heightScale*q)))}G.save();G.beginPath();G.moveTo(A,v);G.lineTo(A+(D?2:-2)*(numSlices+widthScale),v+t*heightScale*(numSlices+widthScale)/2);G.lineTo(A+(D?2:-2)*(numSlices+widthScale),t*(1-heightScale*(numSlices+widthScale))+v+t*heightScale*(numSlices+widthScale)/2);G.lineTo(A,v+t);G.closePath();G.clip();G.fillStyle=\"rgba(0,0,0,\"+Math.round(C*100)/100+\")\";G.fillRect(0,0,r.width(),r.height());G.restore()}function h(A,r,C,B,y,x,v,w,u,z,t,E){if(l){if(!A){r*=-1;var D=B;B=C;C=D;D=x;x=y;y=D}setTimeout(function(){C.children(\"img\").css(\"opacity\",g).animate({opacity:1},e/2);y.css(\"transform\",\"rotateY(\"+r+\"deg)\").children(\"img\").css(\"opacity\",1).animate({opacity:g},e/2,function(){y.hide();x.show().css(\"transform\",\"rotateX(0deg) rotateY(0deg)\").children(\"img\").css(\"opacity\",g).animate({opacity:1},e/2);B.children(\"img\").css(\"opacity\",1).animate({opacity:g},e/2)})},0);setTimeout(E,e)}else{if(a){v.show();var q=new Date;var s=true;wowAnimate(function(F){var I=jQuery.easing.easeInOutQuint(1,F,0,1,1),H=jQuery.easing.easeInOutCubic(1,F,0,1,1),L=!A;if(F<0.5){I*=2;H*=2;var G=y}else{L=A;I=(1-I)*2;H=(1-H)*2;var G=x}var J=v.height()*d/2,N=(1-I)*v.width()/2,M=1+H*d,K=v.width()/2;c(C,G,K,J,N,M,L,H*g,K,v.height(),w);if(s){z.show();s=false}B.clearRect(0,0,u.width(),u.height());B.fillStyle=\"rgba(0,0,0,\"+(g-H*g)+\")\";B.fillRect(L?K:0,0,u.width()/2,u.height())},0,1,e,E)}}}}" ]
[ "0.63923925", "0.63366467", "0.61158633", "0.603236", "0.59850186", "0.591949", "0.5896186", "0.5889262", "0.58413255", "0.57783985", "0.57483417", "0.57483417", "0.57397753", "0.57359797", "0.56957245", "0.5676835", "0.5676835", "0.5676835", "0.56698895", "0.56698895", "0.56698895", "0.56698895", "0.56698895", "0.5667473", "0.5621804", "0.56055045", "0.5598232", "0.5598232", "0.5573003", "0.55635715", "0.5562105", "0.5555649", "0.55346197", "0.55206954", "0.5519196", "0.5511218", "0.550543", "0.550543", "0.550543", "0.549761", "0.549761", "0.549761", "0.549761", "0.5497354", "0.548895", "0.54865557", "0.5457991", "0.5457991", "0.5457991", "0.5457991", "0.5457991", "0.54548067", "0.54521006", "0.544402", "0.54430866", "0.544072", "0.5439116", "0.54369", "0.5436282", "0.54192066", "0.54159063", "0.5410792", "0.5384441", "0.5384441", "0.5384441", "0.5384441", "0.5384441", "0.5384441", "0.5384441", "0.5379988", "0.5379988", "0.5375611", "0.53745717", "0.5368002", "0.5359716", "0.5359716", "0.5359716", "0.53517276", "0.53446513", "0.5338379", "0.5317933", "0.5317004", "0.5310097", "0.5307165", "0.5282752", "0.52685946", "0.5261204", "0.5253423", "0.5245062", "0.52389365", "0.523839", "0.52383536", "0.52330863", "0.5231075", "0.5226828", "0.52263224", "0.5223936", "0.5220374", "0.5220374", "0.5220374", "0.5220374" ]
0.0
-1
ALERT PLUGIN DEFINITION =======================
function Plugin(option) { return this.each(function () { var $this = $(this) var data = $this.data('bs.alert') if (!data) $this.data('bs.alert', (data = new Alert(this))) if (typeof option == 'string') data[option].call($this) }) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function Plugin(option){return this.each(function(){var $this=$(this);var data=$this.data('bs.alert');if(!data)$this.data('bs.alert',data=new Alert(this));if(typeof option=='string')data[option].call($this);});}", "function Plugin(option){return this.each(function(){var $this=$(this);var data=$this.data('bs.alert');if(!data)$this.data('bs.alert',data=new Alert(this));if(typeof option=='string')data[option].call($this);});}", "alert(x) {\n this.#mux(x, levels.alert);\n }", "function __alert($msg) {\r\n __message({type:1, message:$msg, autoclose:3});\r\n}", "function lb_alert(type, message) {\n bs_alert(\".featherlight .alert-box\", type, message)\n}", "alert(title, message, positiveText){\n alert(title, message, positiveText, () =>{console.log('Possitive Pressed')}, true); \n }", "function Plugin(option) {\n\t return this.each(function () {\n\t var $this = $(this)\n\t var data = $this.data('bs.alert')\n\t\n\t if (!data) $this.data('bs.alert', (data = new Alert(this)))\n\t if (typeof option == 'string') data[option].call($this)\n\t })\n\t }", "function Plugin(option) {\n\t return this.each(function () {\n\t var $this = $(this)\n\t var data = $this.data('bs.alert')\n\t\n\t if (!data) $this.data('bs.alert', (data = new Alert(this)))\n\t if (typeof option == 'string') data[option].call($this)\n\t })\n\t }", "function Plugin(option) {\n\t return this.each(function () {\n\t var $this = $(this)\n\t var data = $this.data('bs.alert')\n\t\n\t if (!data) $this.data('bs.alert', (data = new Alert(this)))\n\t if (typeof option == 'string') data[option].call($this)\n\t })\n\t }", "function Plugin(option) {\n\t return this.each(function () {\n\t var $this = $(this)\n\t var data = $this.data('bs.alert')\n\t\n\t if (!data) $this.data('bs.alert', (data = new Alert(this)))\n\t if (typeof option == 'string') data[option].call($this)\n\t })\n\t }", "function Plugin(option) {\n return this.each(function () {\n var $this = $(this)\n var data = $this.data('bs.alert')\n\n if (!data) $this.data('bs.alert', (data = new Alert(this)))\n if (typeof option == 'string') data[option].call($this)\n })\n }", "function Plugin(option) {\n\t return this.each(function () {\n\t var $this = $(this)\n\t var data = $this.data('bs.alert')\n\n\t if (!data) $this.data('bs.alert', (data = new Alert(this)))\n\t if (typeof option == 'string') data[option].call($this)\n\t })\n\t }", "function Plugin(option) {\n\t return this.each(function () {\n\t var $this = $(this)\n\t var data = $this.data('bs.alert')\n\n\t if (!data) $this.data('bs.alert', (data = new Alert(this)))\n\t if (typeof option == 'string') data[option].call($this)\n\t })\n\t }", "function Plugin(option) {\n\t return this.each(function () {\n\t var $this = $(this)\n\t var data = $this.data('bs.alert')\n\n\t if (!data) $this.data('bs.alert', (data = new Alert(this)))\n\t if (typeof option == 'string') data[option].call($this)\n\t })\n\t }", "function Plugin(option) {\n\t return this.each(function () {\n\t var $this = $(this)\n\t var data = $this.data('bs.alert')\n\n\t if (!data) $this.data('bs.alert', (data = new Alert(this)))\n\t if (typeof option == 'string') data[option].call($this)\n\t })\n\t }", "function Plugin(option) {\n\t return this.each(function () {\n\t var $this = $(this)\n\t var data = $this.data('bs.alert')\n\n\t if (!data) $this.data('bs.alert', (data = new Alert(this)))\n\t if (typeof option == 'string') data[option].call($this)\n\t })\n\t }", "alertSuccess(message, autoClose) {\n this.$root.alert.type = 'success';\n this.$root.alert.message = message;\n this.$root.alert.show = true;\n }", "function warn() {\n alert(\"Successfully added player.\")\n }" ]
[ "0.66825145", "0.66825145", "0.652528", "0.64891756", "0.64770555", "0.6476156", "0.633078", "0.633078", "0.633078", "0.633078", "0.6320177", "0.6313426", "0.6313426", "0.6313426", "0.6313426", "0.6313426", "0.6306269", "0.62964594" ]
0.0
-1
BUTTON PLUGIN DEFINITION ========================
function Plugin(option) { return this.each(function () { var $this = $(this) var data = $this.data('bs.button') var options = typeof option == 'object' && option if (!data) $this.data('bs.button', (data = new Button(this, options))) if (option == 'toggle') data.toggle() else if (option) data.setState(option) }) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function Plugin(option){return this.each(function(){var $this=$(this);var data=$this.data('bs.button');var options=(typeof option===\"undefined\"?\"undefined\":_typeof2(option))=='object'&&option;if(!data)$this.data('bs.button',data=new Button(this,options));if(option=='toggle')data.toggle();else if(option)data.setState(option);});}", "function Plugin(option){return this.each(function(){var $this=$(this);var data=$this.data('bs.button');var options=(typeof option==='undefined'?'undefined':_typeof(option))=='object'&&option;if(!data)$this.data('bs.button',data=new Button(this,options));if(option=='toggle')data.toggle();else if(option)data.setState(option);});}", "handleButton() {}", "function Plugin(option) {\n return this.each(function () {\n var $this = $(this)\n var data = $this.data('bs.button')\n var options = typeof option == 'object' && option\n\n if (!data) $this.data('bs.button', (data = new Button(this, options)))\n\n if (option == 'toggle') data.toggle()\n else if (option) data.setState(option)\n })\n }", "function Plugin( option ) {\n return this.each( function() {\n var $this = $( this )\n var data = $this.data( 'bs.button' )\n var options = typeof option == 'object' && option\n if ( !data ) $this.data( 'bs.button', ( data = new Button( this, options ) ) )\n if ( option == 'toggle' ) data.toggle()\n else if ( option ) data.setState( option )\n } )\n }", "function Plugin(option) {\n\t return this.each(function () {\n\t var $this = $(this)\n\t var data = $this.data('bs.button')\n\t var options = typeof option == 'object' && option\n\n\t if (!data) $this.data('bs.button', (data = new Button(this, options)))\n\n\t if (option == 'toggle') data.toggle()\n\t else if (option) data.setState(option)\n\t })\n\t }", "function Plugin(option) {\n\t return this.each(function () {\n\t var $this = $(this)\n\t var data = $this.data('bs.button')\n\t var options = typeof option == 'object' && option\n\n\t if (!data) $this.data('bs.button', (data = new Button(this, options)))\n\n\t if (option == 'toggle') data.toggle()\n\t else if (option) data.setState(option)\n\t })\n\t }", "function Plugin(option) {\n\t return this.each(function () {\n\t var $this = $(this)\n\t var data = $this.data('bs.button')\n\t var options = typeof option == 'object' && option\n\n\t if (!data) $this.data('bs.button', (data = new Button(this, options)))\n\n\t if (option == 'toggle') data.toggle()\n\t else if (option) data.setState(option)\n\t })\n\t }", "function Plugin(option) {\n\t return this.each(function () {\n\t var $this = $(this)\n\t var data = $this.data('bs.button')\n\t var options = typeof option == 'object' && option\n\n\t if (!data) $this.data('bs.button', (data = new Button(this, options)))\n\n\t if (option == 'toggle') data.toggle()\n\t else if (option) data.setState(option)\n\t })\n\t }", "function Plugin(option) {\n\t return this.each(function () {\n\t var $this = $(this)\n\t var data = $this.data('bs.button')\n\t var options = typeof option == 'object' && option\n\n\t if (!data) $this.data('bs.button', (data = new Button(this, options)))\n\n\t if (option == 'toggle') data.toggle()\n\t else if (option) data.setState(option)\n\t })\n\t }", "function Plugin(option) {\n\t return this.each(function () {\n\t var $this = $(this)\n\t var data = $this.data('bs.button')\n\t var options = typeof option == 'object' && option\n\t\n\t if (!data) $this.data('bs.button', (data = new Button(this, options)))\n\t\n\t if (option == 'toggle') data.toggle()\n\t else if (option) data.setState(option)\n\t })\n\t }", "function Plugin(option) {\n\t return this.each(function () {\n\t var $this = $(this)\n\t var data = $this.data('bs.button')\n\t var options = typeof option == 'object' && option\n\t\n\t if (!data) $this.data('bs.button', (data = new Button(this, options)))\n\t\n\t if (option == 'toggle') data.toggle()\n\t else if (option) data.setState(option)\n\t })\n\t }", "function Plugin(option) {\n\t return this.each(function () {\n\t var $this = $(this)\n\t var data = $this.data('bs.button')\n\t var options = typeof option == 'object' && option\n\t\n\t if (!data) $this.data('bs.button', (data = new Button(this, options)))\n\t\n\t if (option == 'toggle') data.toggle()\n\t else if (option) data.setState(option)\n\t })\n\t }", "function Plugin(option) {\n\t return this.each(function () {\n\t var $this = $(this)\n\t var data = $this.data('bs.button')\n\t var options = typeof option == 'object' && option\n\t\n\t if (!data) $this.data('bs.button', (data = new Button(this, options)))\n\t\n\t if (option == 'toggle') data.toggle()\n\t else if (option) data.setState(option)\n\t })\n\t }", "activateButton(){\n //If the button already exists, we want to remove and rebuilt it\n if(this.button)\n this.button.dispose();\n\n //Create button called but with Activate SpeedBoost as its text\n this.button = Button.CreateSimpleButton(\"but\", \"Activate\\nSpeedBoost\");\n this.button.width = 0.8;\n this.button.height = 0.8;\n this.button.color = \"white\";\n this.button.background = \"red\";\n this.button.alpha = 0.8;\n this.stackPanel.addControl(this.button);\n //Scope these attributes so they can be used below\n var button = this.button;\n var app = this.app;\n\n //Function for if they click it\n //Function is a member of the button object, not of this class\n this.button.onPointerDownObservable.add(function() {\n if(button.textBlock.text != \"Activate\\nSpeedBoost\")\n return;\n app.buttonPressed(\"speedBoost\");\n button.textBlock.text = \"SpeedBoost\\nActivated\";\n }); \n }", "initButtons() {\n this.setupButton(\"efecBtn\", (e) => {\n\n })\n\n }", "function Plugin(option) {\r\n return this.each(function () {\r\n var $this = $(this)\r\n var data = $this.data('bs.button')\r\n var options = typeof option == 'object' && option\r\n\r\n if (!data) $this.data('bs.button', (data = new Button(this, options)))\r\n\r\n if (option == 'toggle') data.toggle()\r\n else if (option) data.setState(option)\r\n })\r\n }", "function Plugin(option) {\r\n return this.each(function () {\r\n var $this = $(this)\r\n var data = $this.data('bs.button')\r\n var options = typeof option == 'object' && option\r\n\r\n if (!data) $this.data('bs.button', (data = new Button(this, options)))\r\n\r\n if (option == 'toggle') data.toggle()\r\n else if (option) data.setState(option)\r\n })\r\n }", "function Plugin(option) {\r\n return this.each(function () {\r\n var $this = $(this)\r\n var data = $this.data('bs.button')\r\n var options = typeof option == 'object' && option\r\n\r\n if (!data) $this.data('bs.button', (data = new Button(this, options)))\r\n\r\n if (option == 'toggle') data.toggle()\r\n else if (option) data.setState(option)\r\n })\r\n }", "function Plugin(option) {\r\n return this.each(function () {\r\n var $this = $(this)\r\n var data = $this.data('bs.button')\r\n var options = typeof option == 'object' && option\r\n\r\n if (!data) $this.data('bs.button', (data = new Button(this, options)))\r\n\r\n if (option == 'toggle') data.toggle()\r\n else if (option) data.setState(option)\r\n })\r\n }", "function Plugin(option) {\n return this.each(function () {\n var $this = $(this)\n var data = $this.data('bs.button')\n var options = typeof option == 'object' && option\n\n if ( !data) $this.data('bs.button', (data = new Button(this, options)))\n\n if (option == 'toggle') data.toggle()\n else if (option) data.setState(option)\n })\n }" ]
[ "0.74372506", "0.74121296", "0.6890832", "0.6850591", "0.68374854", "0.6800628", "0.6800628", "0.6800628", "0.6800628", "0.6800628", "0.67828363", "0.67828363", "0.67828363", "0.67828363", "0.67719966", "0.67319006", "0.6715987", "0.6715987", "0.6715987", "0.6715987", "0.6706951" ]
0.0
-1
CAROUSEL PLUGIN DEFINITION ==========================
function Plugin(option) { return this.each(function () { var $this = $(this) var data = $this.data('bs.carousel') var options = $.extend({}, Carousel.DEFAULTS, $this.data(), typeof option == 'object' && option) var action = typeof option == 'string' ? option : options.slide if (!data) $this.data('bs.carousel', (data = new Carousel(this, options))) if (typeof option == 'number') data.to(option) else if (action) data[action]() else if (options.interval) data.pause().cycle() }) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function Plugin(option) {\n return this.each(function () {\n var $this = $(this)\n var data = $this.data('bs.carasel')\n var options = $.extend({}, Carasel.DEFAULTS, $this.data(), typeof option == 'object' && option)\n var action = typeof option == 'string' ? option : options.slide\n\n if (!data) $this.data('bs.carasel', (data = new Carasel(this, options)))\n if (typeof option == 'number') data.to(option)\n else if (action) data[action]()\n else if (options.interval) data.pause().cycle()\n })\n }", "function Plugin(option){return this.each(function(){var $this=$(this);var data=$this.data('bs.carousel');var options=$.extend({},Carousel.DEFAULTS,$this.data(),(typeof option===\"undefined\"?\"undefined\":_typeof2(option))=='object'&&option);var action=typeof option=='string'?option:options.slide;if(!data)$this.data('bs.carousel',data=new Carousel(this,options));if(typeof option=='number')data.to(option);else if(action)data[action]();else if(options.interval)data.pause().cycle();});}", "initPlugins() {}", "initPlugins() {}", "function contruct() {\n\n if ( !$[pluginName] ) {\n $.loading = function( opts ) {\n $( \"body\" ).loading( opts );\n };\n }\n }", "function Plugin(option){return this.each(function(){var $this=$(this);var data=$this.data('bs.carousel');var options=$.extend({},Carousel.DEFAULTS,$this.data(),(typeof option==='undefined'?'undefined':_typeof(option))=='object'&&option);var action=typeof option=='string'?option:options.slide;if(!data)$this.data('bs.carousel',data=new Carousel(this,options));if(typeof option=='number')data.to(option);else if(action)data[action]();else if(options.interval)data.pause().cycle();});}", "function prePluginInit() {\n // Default options for the plug-in \n // Those can be pre defined or overridden in any of the following:\n // query string parameters in the script reference\n // hash tag parameters in the browser URL box\n // as the options parameter in the plug-in construction call\n // as meta tags in the enhanced element\n window.MI_defaults = {\n optimizeNames: true,\n useLinkTarget: false,\n useLinkTitle: false,\n mi_style: 'default',\n abtest: 'false',\n debug: 'false',\n tabs: ['mentions', 'photos', 'stats'],\n frameElements: ['statsPreview', 'mediaPreview', 'tags', 'shareLinks'],\n ex: [],\n includedSourceIds: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103],\n widgetTextPosition: 'bottom',\n hidden: 'false',\n xOffset: 0,\n yOffset: 0,\n gaugeOrientation: 'left',\n vertical: 'all',\n inqa: false,\n RTL: false,\n lang: \"EN\",\n displayText: false,\n layout: 'inlinepanel',\n columnscount:2,\n allowExternalLinks: 'true',\n displayExternalLinksInline: 'true',\n collapseLines: 'true',\n displayShowMore: 'true',\n loadWhenInvisible: 'false',\n hover: false,\n doClientSide: false,\n template: 'RASTA',\n tabsType: \"TABS\",\n starsType: \"SMALL\",\n animationStyle: \"DEFAULT\",\n logo: \"//d34p6saz4aff9q.cloudfront.net/images/feelterfooter.png\",\n buttonType: \"DEFAULT\",\n lightbox: true\n\n };\n window.tempDictionary = window.tempDictionary ? window.tempDictionary : {\n socialItem: function(data, baseid) {\n var click = data.click;\n var si = data.modsi ? data.modsi : window.tempDictionary[window.MI_defaults.template].socialItem.normalItem.replace(\"@@@metaicon\", data.metaicon).replace(\"@@@cond\", (data.sourceURL == '' || window.MI_defaults.allowExternalLinks == 'false' ? 'style=\"cursor:default;direction:ltr!important;\"' : ' style=\"direction:ltr!important;\" onclick=\"' + click + '\"'))\n var item = window.tempDictionary[window.MI_defaults.template].socialItem.nonTimelineItem.replace(/@@@itemImageURL/g, data.itemImageURL);\n si = si.replace(\"@@@item\", item)\n\n si = si.replace(/@@@itemImageURL/g, data.itemImageURL)\n si = si.replace(/@@@itempublisher/g, (data.itemPublisher.length > 18 ? data.itemPublisher.substring(0, 17) + '...' : data.itemPublisher))\n si = si.replace(/@@@timeago/g, data.timeAgo)\n si = si.replace(/@@@itemDate/g, data.itemDate)\n si = si.replace(/@@@sourceURL/g, data.sourceURL != 'undefined' ? \"\" : data.sourceURL.replace('http://www.youtube.com/', ''))\n si = si.replace(/@@@sourceAvatar/g, item).replace(/@@@itemtext/g, data.moditemText)\n si = si.replace(/@@@itemWidth/g, (typeof data.itemTimeLine != 'undefined' ? '250' : '275') + 'px')\n si = si.replace(/@@@sourceSite/g, (data.source.replace('.com', '').replace('www.', '').replace('.', '').replace('.', '')).trim())\n if (data.regarding) si = si.replace('</th>', '<span style=\"position: inherit;margin-right: 3px;color: #ccc;\">On</span>' + data.regarding.capitalize() + '</th>');\n if (window.MI_defaults.lang != 'EN')\n si += '<div class=\"mi_translate\" onclick=\"window.MI_logUsage(\\'translate_clicked\\',\\'' + baseid + '\\',\\'' + window.MI_defaults.lang + '\\');jQuery.MidasInsight.translate(\\'' + data.ksid + '\\');event.stopPropagation();\" style=\"color: #49b7e6;font-size:12px;height:24px;float:left;\">' + window.langDictionary[window.MI_defaults.lang].translate + '</div>';\n if (data.itemContentImageURL && data.itemContentImageURL.indexOf('/') == -1) data.itemContentImageURL = '';\n if (data.itemContentImageURL && data.itemContentImageURL.indexOf('//') < 0) data.itemContentImageURL = '//' + data.itemContentImageURL;\n if (data.itemContentImageURL && data.itemContentImageURL.indexOf('.') > -1) {\n if (!jQuery.MidasInsight.ObjDictionary[baseid].gallery) jQuery.MidasInsight.ObjDictionary[baseid].gallery = [{\n href: '//d34p6saz4aff9q.cloudfront.net/img/feelter.png'\n }];\n //jQuery.MidasInsight.ObjDictionary[baseid].gallery.push({ href: data.itemContentImageURL, title: data.itemPublisher })\n //data.galleryindex = jQuery.MidasInsight.ObjDictionary[baseid].gallery.length - 1;\n //if (window.MI_defaults.lightbox == true && !(data.source.indexOf(\"facebook\") > -1)) {\n si += window.tempDictionary[window.MI_defaults.template].socialItem.lightboxContentImage.replace(/@@@itemcontentimage/g, data.itemContentImageURL).replace(/@@@ksid/g, data.ksid).replace(/@@@kfid/g, baseid);\n\n //} else {\n // si += window.tempDictionary[window.MI_defaults.template].socialItem.itemContentImage.replace(\"@@@itemcontentimage\", data.itemContentImageURL);\n\n //}\n }\n si += '</td></tr></table>'\n si += '</div>';\n si = si.replace(/@@@click/g, '');\n\n data.modsi = si;\n },\n socialItemneweggItem: function(data, baseid) {\n data.moditemText = data.moditemText.replace(/Pros:/g, '<span style=\"font-weight:bold\">Pros:</span>').replace(/Cons:/g, '<span style=\"font-weight:bold\">Cons:</span>').replace(/Other Thoughts:/g, '<span style=\"font-weight:bold\">Other Thoughts:</span>')\n window.tempDictionary.socialItem(data, baseid);\n },\n socialItemShowInPhotosTab: function(data, baseid) {\n data.click = ' ';\n window.tempDictionary.socialItem(data, baseid);\n },\n socialItemflickrItem: function(data, baseid) {\n window.tempDictionary.socialItemShowInPhotosTab(data, baseid);\n },\n socialIteminstagramItem: function(data, baseid) {\n data.click = ' ';\n data.modsi = window.tempDictionary[window.MI_defaults.template].socialItem.instagramItem.replace(\"@@@metaicon\", data.metaicon).replace(\"@@@cond\", (data.sourceURL == '' || window.MI_defaults.allowExternalLinks == 'false' ? 'style=\"cursor:default;direction:ltr!important;\"' : ' style=\"direction:ltr!important;\" onclick=\"' + data.click + '\"'))\n window.tempDictionary.socialItem(data, baseid);\n },\n socialItempinterestItem: function(data, baseid) {\n window.tempDictionary.socialItemShowInPhotosTab(data, baseid);\n },\n socialItemyoutubeItem: function(data, baseid) {\n //if (!jQuery.MidasInsight.ObjDictionary[baseid].gallery) jQuery.MidasInsight.ObjDictionary[baseid].gallery = [];\n var vurl = data.sourceURL.replace('http://www.youtube.com/', '//www.youtube.com/watch?v=');\n jQuery.MidasInsight.AddtoGallery(baseid, {\n href: vurl,\n title: data.itemPublisher\n });\n //jQuery.MidasInsight.ObjDictionary[baseid].gallery.push({ href: data.sourceURL.replace('http://www.youtube.com/', '//www.youtube.com/watch?v='), title: data.itemPublisher })\n var click = \"window.MI_logUsage('play_video','\" + baseid + \"','youtube'); jQuery.MidasInsight.ShowLightBoxURL('\" + vurl + \"','\" + baseid + \"')\";\n var item = window.tempDictionary[window.MI_defaults.template].socialItem.nonTimelineItem;\n item = item.replace(/@@@itemImageURL/g, data.itemImageURL)\n var si = window.tempDictionary[window.MI_defaults.template].socialItem.lightboxYoutubeItem\n .replace(/@@@youtubeid/g, data.sourceURL.split('/')[data.sourceURL.split('/').length - 1]);\n data.modsi = si.replace(/@@@itemDate/g, data.itemDate)\n .replace(/@@@click/g, click)\n .replace(/@@@itemImageURL/g, data.itemImageURL)\n .replace(/@@@itemPublisher/g, (data.itemPublisher.length > 18 ? data.itemPublisher.substring(0, 17) + '...' : data.itemPublisher))\n .replace(/@@@ksid/g, data.ksid)\n .replace(/@@@timeAgo/g, data.timeAgo)\n .replace(/@@@sourceURL/g, data.sourceURL.replace('http://www.youtube.com/', ''))\n .replace(/@@@sourceAvatar/g, item)\n .replace(/@@@itemText/g, data.moditemText)\n .replace(/@@@itemWidth/g, (typeof data.itemTimeLine != 'undefined' ? '250' : '275') + 'px')\n .replace(/@@@sourceSite/g, (data.source.replace('.com', '').replace('www.', '').replace('.', '').replace('.', '')).trim())\n },\n socialItemvimeoItem: function(data, baseid) {\n //debugger;\n //if (!jQuery.MidasInsight.ObjDictionary[baseid].gallery) jQuery.MidasInsight.ObjDictionary[baseid].gallery = [];\n var vurl = data.sourceURL;\n jQuery.MidasInsight.AddtoGallery(baseid, {\n href: vurl,\n title: data.itemPublisher\n });\n\n //jQuery.MidasInsight.ObjDictionary[baseid].gallery.push({\n // href: data.sourceURL//.replace('vimeo.com/', 'player.vimeo.com/video/')\n // , title: data.itemPublisher\n //})\n var click = \"window.MI_logUsage('play_video','\" + baseid + \"','vimeo'); jQuery.MidasInsight.ShowLightBoxURL('\" + vurl + \"','\" + baseid + \"')\";\n var item = window.tempDictionary[window.MI_defaults.template].socialItem.nonTimelineItem;\n item = item.replace(/@@@itemImageURL/g, data.itemImageURL)\n var si = window.tempDictionary[window.MI_defaults.template].socialItem.lightboxVimeoItem;\n data.modsi = si.replace(/@@@itemDate/g, data.itemDate)\n .replace(/@@@click/g, click)\n .replace(/@@@itemImageURL/g, data.itemImageURL)\n .replace(/@@@itemPublisher/g, (data.itemPublisher.length > 18 ? data.itemPublisher.substring(0, 17) + '...' : data.itemPublisher))\n .replace(/@@@ksid/g, data.ksid)\n .replace(/@@@timeAgo/g, data.timeAgo)\n .replace(/@@@sourceURL/g, data.sourceURL.replace('vimeo.com/', 'player.vimeo.com/video/'))\n .replace(/@@@sourceAvatar/g, item)\n .replace(/@@@itemContentImageURL/g, data.itemContentImageURL)\n .replace(/@@@itemText/g, data.moditemText)\n .replace(/@@@itemWidth/g, (typeof data.itemTimeLine != 'undefined' ? '250' : '275') + 'px')\n .replace(/@@@sourceSite/g, (data.source.replace('.com', '').replace('www.', '').replace('.', '').replace('.', '')).trim())\n\n },\n DEFAULT: {\n panelLayout: {\n header: [\"tabs\"],\n content: [\"stars\", \"photos\", \"tags\", \"mentions\"],\n footer: [\"share\"]\n },\n panel: {\n videoholder: '<div id=\"mi_videoholder_@@@baseid\" class=\"mi_singlevideocontainer mi_closeTopLeft\" onclick=\"jQuery.MidasInsight.MI_GetPhotos(\\'@@@baseid\\',false)\"><div class=\"mi_singlevideo\"></div></div>',\n containerHtml: '<div style=\"padding:5px;\" class=\"mi_panelBackground mikfpanel\" id=\"cpcnt_@@@kfid\" style=\"direction: ltr;@@@layout\"></div>',\n tabs: '<tr><td><div class=\"MI_tabs@@@orientation\" style=\"margin-left:-3px!important;display:inline-block;width:100%;padding-top:10px;\">@@@tabs</div></td></tr>',\n gauge: '<div class=\"mi_gradeselectgradbg\"></div><div class=\"mi_gradeselectmasknerrow' + (window.MI_defaults.RTL == 'true' ? ' mi_gradeselectmasknerrow_right' : '') + '\"></div><div class=\"mi_gradeselecthandlenerrow\"></div><div class=\"mi_gradeselectdigitsnerrow\" ' + (window.MI_defaults.RTL == 'true' ? 'style=\"direction:ltr!important;\"' : 'style=\"direction:ltr;\"') + '><span style=\"font-size: 48px;z-index: 3;color: #92c83e;font-family: \\'Source Sans Pro\\', Alef!important;\"></span><span class=\"mi_gradeselectdigitsnerrow_after\">/ 100</span></div><div class=\"mi_gradeselecttext\"></div>',\n tag: '<span onclick=\"jQuery.MidasInsight.tagClicked(\\'@@@kfid\\',\\'@@@atags\\')\" class=\\'mi_tag_@@@atagsreplace mi_tag\\'>@@@atagscap <span style=\"display:;color:@@@color;-webkit-font-smoothing: antialiased;padding: 0;margin-bottom: 0;margin-left: 0;margin-top: 3px;text-shadow: @@@color 0 0 0.3px,1px 1px 1px white;background-color: transparent;line-height: 10px;nobox-shadow:inset 1px 1px 2px -1px lightslategray;padding: 0px 2px 1px 3px;border-radius: 50%;left: 4px;position: relative;\">&#9733;</span></span>',\n slidercontainer: '<div id=\"mi_previewPhotosContainer_@@@kfid\" style=\"max-width: 465px;cursor:default;-moz-user-select:none;-webkit-user-select:none; -ms-user-select:none; user-select:none;\" unselectable=\"on\" onselectstart=\"return false;\"><table class=\"mi_previewPhotosContainer\" style=\"\" cellspacing=\"0\" onclick=\"jQuery.MidasInsight.MI_GetPhotos(\\'@@@kfid\\',false)\"><tr>',\n photopreview: '<tr ><td id=\"mi_photopreview_@@@kfid\" colspan=\"2\" style=\"width:100%;overflow:hidden;background-color:white;padding:5px 0 !important;border-bottom: 1px solid #DBDBDB !important;\"><div class=\"mi_thumbscontainer\">',\n tabswrapper: {\n header: '<div style=\"width: 152px;margin: 0 auto;background: #fefefe; /* Old browsers */background: -moz-linear-gradient(top, #fefefe 0%, #eeeeee 100%); /* FF3.6+ */background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#fefefe), color-stop(100%,#eeeeee)); /* Chrome,Safari4+ */background: -webkit-linear-gradient(top, #fefefe 0%,#eeeeee 100%); /* Chrome10+,Safari5.1+ */background: -o-linear-gradient(top, #fefefe 0%,#eeeeee 100%); /* Opera 11.10+ */background: -ms-linear-gradient(top, #fefefe 0%,#eeeeee 100%); /* IE10+ */background: linear-gradient(to bottom, #fefefe 0%,#eeeeee 100%); /* W3C */filter: progid:DXImageTransform.Microsoft.gradient( startColorstr=\\'#fefefe\\', endColorstr=\\'#eeeeee\\',GradientType=0 ); /* IE6-9 */-webkit-border-radius: 15px;-moz-border-radius: 15px;border-radius: 15px;border: 1px solid #cbcbcb;padding: 5px;\">',\n footer: '</div>'\n },\n starspanel: {\n header: '<tr><td><div class=\"mi_hover_starspanel\" style=\"border-bottom: 1px solid #dfdfdf !important;padding-bottom:5px;width:100%;overflow:hidden;border-top:1px solid #dfdfdf;padding-top:5px;background: #f7f7f7; /* Old browsers */background: -moz-linear-gradient(top, #f7f7f7 0%, #ffffff 100%); /* FF3.6+ */background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#f7f7f7), color-stop(100%,#ffffff)); /* Chrome,Safari4+ */background: -webkit-linear-gradient(top, #f7f7f7 0%,#ffffff 100%); /* Chrome10+,Safari5.1+ */background: -o-linear-gradient(top, #f7f7f7 0%,#ffffff 100%); /* Opera 11.10+ */background: -ms-linear-gradient(top, #f7f7f7 0%,#ffffff 100%); /* IE10+ */background: linear-gradient(to bottom, #f7f7f7 0%,#ffffff 100%); /* W3C */filter: progid:DXImageTransform.Microsoft.gradient( startColorstr=\\'#f7f7f7\\', endColorstr=\\'#ffffff\\',GradientType=0 ); /* IE6-9 */width: 396px;left: 0px;position: relative;\"><table style=\"position:relative\">',\n footer: '</tr></table></div></td></tr>'\n },\n footer: {\n header: '<div class=\"mi_footerwrapper\"><div class=\"mi_footerroot mi_footerroot_@@@kfid\" style=\"background-image: url(//d34p6saz4aff9q.cloudfront.net/images/footer/feelterfooternew.png);background-position: -120px 0px;background-repeat: no-repeat;\"><div class=\"mi_footercontainer\" id=\"mi_footercontainer_@@@kfid\" style=\"height:100%;position:static;\">' +\n '<div class=\"mi_footer\" style=\"height:auto;\"><div onclick=\"jQuery(\\'#cpcnt_@@@kfid\\').find(\\'.MI_tab_selected\\').removeClass(\\'MI_tab_selected\\');jQuery(\\'#mipct_scroll_@@@kfid\\').addClass(\\'mi_blured\\');jQuery(\\'#mipct_tblabout_@@@kfid\\').css(\\'max-height\\',jQuery(\\'#mipct_scroll_@@@kfid\\').height()+1).css(\\'height\\',jQuery(\\'#mipct_scroll_@@@kfid\\').height()+1).css(\\'top\\',jQuery(\\'#mipct_scroll_@@@kfid\\').position().top).fadeIn();\" style=\"z-index: 1;position: absolute;right: 0px;top: 5px;height: 25px;width:57px;background-size: contain;cursor: pointer;background-image: url(\\'@@@logo\\');background-repeat: no-repeat;\"></div></div>',\n share: '<div style=\"width: 100%;float:left;\"><div class=\"mi_footer_prompt\" style=\"margin-bottom:0;\">@@@ask</div>' +\n '<ul class=\"mi_share-buttons\"><li><a onclick=\"window.MI_logUsage(\\'mail\\');\" href=\"mailto:?subject={1}&body={2}: {0}\" target=\"_blank\" title=\"Email\"><img onload=\"this.style.opacity=1;this.style.top=0;\" src=\"//d34p6saz4aff9q.cloudfront.net/images/footer/Email.png\" style=\"opacity:0;\" style=\"opacity:0\"></a></li><li><a onclick=\"window.MI_logUsage(\\'share\\');\" href=\"https://www.facebook.com/sharer/sharer.php?u={0}\" target=\"_blank\"><img onload=\"this.style.opacity=1;this.style.top=0;\" src=\"//d34p6saz4aff9q.cloudfront.net/images/footer/Facebook.png\" style=\"opacity:0;\"></a></li><li><a onclick=\"window.MI_logUsage(\\'share\\');\" href=\"https://twitter.com/intent/tweet?source={0}&text={1}: {0}\" target=\"_blank\" title=\"Tweet\"><img onload=\"this.style.opacity=1;this.style.top=0;\" src=\"//d34p6saz4aff9q.cloudfront.net/images/footer/Twitter.png\" style=\"opacity:0\"></a></li><li style=\"display:none;\"><a onclick=\"window.MI_logUsage(\\'share\\');\" href=\"http://pinterest.com/pin/create/button/?url={0}&description={2}\" target=\"_blank\" title=\"Pin it\"><img onload=\"this.style.opacity=1;this.style.top=0;\" src=\"//d34p6saz4aff9q.cloudfront.net/images/footer/Pinterest.png\"></a></li><li><a onclick=\"window.MI_logUsage(\\'share\\');\" href=\"https://plus.google.com/share?url={0}\" target=\"_blank\" title=\"Share on Google+\"><img onload=\"this.style.opacity=1;this.style.top=0;this.style.top=0;\" src=\"//d34p6saz4aff9q.cloudfront.net/images/footer/Googleplus.png\" style=\"opacity:0;\"></a></li></ul></div>',\n callForActions: '<div id=\"cfa\" style=\"white-space:nowrap;padding-left:0;display:inline-block;\"><div onclick=\"alert(\\'call to add to favorites\\')\" style=\"cursor:pointer;border-radius: 7px;height: 27px;width: 187px;margin:5px;MARGIN-LEFT:0;display: inline-block;text-align: center;box-shadow: inset 0 -9px 37px -10px silver;vertical-align: middle;padding-top: 8px;border: 1px solid rgba(0,0,0,0.2);color: grey;\">Add to favorites</div><div onclick=\"alert(\\'call to book\\')\" style=\"cursor:pointer;border-radius: 7px;height: 27px;width: 187px;margin:5px;display: inline-block;text-align: center;box-shadow: inset 0 -9px 37px -10px rgb(3, 179, 12);vertical-align: middle;padding-top: 8px;border: 1px solid rgba(0,0,0,0.2);color: white;margin-left: 1px;background-color: rgb(161, 218, 101);\">BOOK</div></div>'\n },\n header: {\n header: '<table align=\"left\" class=\"mi_reset mi_greenredtitle\">' +\n '<div class=\"mi_green_close @@@orientation\" onclick=\"jQuery.MidasInsight.hidePanel(\\'@@@kfid\\');\" style=\"z-index:3;\"></div>' +\n '<tr><td class=\"mi_header_caption@@@gaugeOrientation>' +\n '<div class=\"mi_drag_area\" style=\"position: absolute;width: 100%;height: 60px;left:0;z-index: 2\"></div>' +\n '<div class=\"mi_gradselectroot @@@gaugeOrientation\" id=\"mi_gradselectroot_@@@kfid\" data-score=\"@@@grade\" style=\"z-idex:1;\"><div class=\"mi_gradeselect\" id=\"mi_gradeselect_@@@kfid\"></div></div>' +\n '<div class=\"mi_title\" style=\"@@@titleOrientation\">@@@displayText</div>' +\n '<div style=\"@@@optionsrtl\" class=\"mi_subtitle\">@@@count</div></td></tr>'\n /*if (count > 4) {\n p += '<div style=\"' + (options.RTL == 'true' ? '' : '') + '\" class=\"mi_subtitle ' + (options.RTL == 'true' ? 'mi_subtitle_rtl' : '') + '\">' + window.langDictionary[window.MI_defaults.lang].basedon.replace('%d', count);\n p += '</div>';\n */\n // tools tabs\n +\n '<div style=\"clear:both;height:0px;margin-bottom:0px;border-top:0px solid #DBDBDB!important;\"></div>',\n footer: '</table>'\n }\n\n ,\n closebutton: '<div class=\"mi_green_close@@@gaugeOrientation\" onclick=\"jQuery.MidasInsight.hidePanel(\\'@@@kfid\\');\"></div>'\n }\n\n ,\n scrollables: {\n header: '<div style=\"clear:both;height: px;margin-bottom:0px;border-top:1px solid #DBDBDB\"></div><div id=\"mipct_scroll_@@@kfid\" tabindex=\"-1\" style=\"heightdummy:0;outline:none;\" class=\"mi_scroll\">' +\n '<table align=\"left\" id=\"mipct_tbldefault_@@@kfid\" class=\"mi_results mi_scrolledcontent\">',\n footer: '</table></div>'\n },\n socialItem: {\n timelineItem: '<div class=\"mi_timeline\">@@@fullYear<br/>@@@month<br/>@@@date</div>',\n nonTimelineItem: '<img onerror=\"jQuery.MidasInsight.HandleMissingImage(\\'avatar\\',this)\" src=\"@@@itemImageURL\" valign=\"top\" class=\"mi_resultimage\"/>',\n youtubeItem: '<div style=\"position:relative;\"><div class=\\\"MI_SourceIcon MI_@@@sourceSite\\\" mi_data-tooltip=\\\"@@@sourceSite\\\"></div><table align=\"left\" class=\"mi_resultcontainer\" style=\"direction:ltr!important;cursor:default;\"><tr><td rowspan=\"4\" valign=\"top\" style=\"padding-right:15px;padding-left:3px;width: 65px;\"><div style=\"position:relative;height: 100%;display: block;\">' +\n '@@@sourceAvatar' +\n '</div></td><th style=\"vertical-align: middle;\" align=\"left\"><div class=\"mi_resultpublisher\" style=\"color:#838383;\">@@@itemPublisher<span class=\"mi_resulttimeago\" itemDate=\"@@@itemDate\">@@@timeAgo' +\n '</span></div></th></tr><tr><td style=\"padding-right:30px;\"></td></tr>' +\n '<tr><td colspan=\"2\" onclick=\"@@@click\" style=\"cursor: pointer; cursor: hand;\"><div style=\"padding-right:10px;overflow:hidden;position:relative;max-width: 275px;\"><img src=\"https://i.ytimg.com/vi/@@@sourceURL/mqdefault.jpg\" style=\"max-width: @@@itemWidth ;min-width:185px;margin-top: 15px;margin-bottom: 15px;box-shadow: 0px 0 10px 4px #eee;float: right;border-radius: 5px;display:inline;\"/><img src=\"//d34p6saz4aff9q.cloudfront.net/images/playvideow.png\" style=\"position:absolute;cursor: pointer;left: 50%!important;margin-top: 20%;display:inline;margin-left: -30px;\" onclick=\"window.MI_logUsage(\\'play_video\\',\\'@@@baseid\\');@@@click\" onerror=\"this.style.display=\\'none\\';\"/></div>' +\n '</td></tr></table></div>',\n lightboxYoutubeItem: '<div style=\"position:relative;\"><div class=\\\"MI_SourceIcon MI_@@@sourceSite\\\" mi_data-tooltip=\\\"@@@sourceSite\\\"></div><table align=\"left\" class=\"mi_resultcontainer\" style=\"direction:ltr!important;cursor:default;\"><tr><td rowspan=\"4\" valign=\"top\" style=\"padding-right:15px;padding-left:3px;width: 65px;\"><div style=\"position:relative;height: 100%;display: block;\">' +\n '@@@sourceAvatar' +\n '</div></td><th style=\"vertical-align: middle;\" align=\"left\"><div class=\"mi_resultpublisher\" style=\"color:#838383;\">@@@itemPublisher<span class=\"mi_resulttimeago\" itemDate=\"@@@itemDate\">@@@timeAgo' +\n '</span></div></th></tr><tr><td style=\"padding-right:30px;\"></td></tr>' +\n '<tr><td colspan=\"2\" onclick=\"@@@click\" style=\"cursor: pointer; cursor: hand;\"><div style=\"padding-right:10px;overflow:hidden;position:relative;max-width: 275px;\"><div id=\"#mi_image_lightbox_@@@ksid\" onclick=\" jQuery(mi_image_lightbox_@@@ksid).fadeIn();\"><img src=\"https://i.ytimg.com/vi/@@@sourceURL/mqdefault.jpg\" style=\"max-width: @@@itemWidth ;min-width:185px;margin-top: 15px;margin-bottom: 15px;box-shadow: 0px 0 10px 4px #eee;float: right;border-radius: 5px;display:inline;\"/><img src=\"//d34p6saz4aff9q.cloudfront.net/images/playvideow.png\" style=\"position:absolute;cursor: pointer;left: 50%!important;margin-top: 20%;display:inline;margin-left: -30px;\" onclick=\"window.MI_logUsage(\\'play_video\\',\\'@@@baseid\\');@@@click\" onerror=\"this.style.display=\\'none\\';\"/></div><div class=\"mi_lightbox\" id=\"mi_image_lightbox_@@@ksid\" onclick=\"jQuery.MidasInsight.StopYoutubeVideo(jQuery(\\'#mi_image_lightbox_@@@ksid iframe\\')[0]);jQuery(this).fadeOut();\"><iframe width=\"560\" height=\"315\" src=\"https://www.youtube.com/embed/@@@youtubeid?enablejsapi=1\" frameborder=\"0\" allowfullscreen></iframe></a></div>' +\n '</td></tr></table></div>',\n lightboxVimeoItem: '<div style=\"position:relative;\"><div class=\\\"MI_SourceIcon MI_@@@sourceSite\\\" mi_data-tooltip=\\\"@@@sourceSite\\\"></div><table align=\"left\" class=\"mi_resultcontainer\" style=\"direction:ltr!important;cursor:default;\"><tr><td rowspan=\"4\" valign=\"top\" style=\"padding-right:15px;padding-left:3px;width: 65px;\"><div style=\"position:relative;height: 100%;display: block;\">' +\n '@@@sourceAvatar' +\n '</div></td><th style=\"vertical-align: middle;\" align=\"left\"><div class=\"mi_resultpublisher\" style=\"color:#838383;\">@@@itemPublisher<span class=\"mi_resulttimeago\" itemDate=\"@@@itemDate\">@@@timeAgo' +\n '</span></div></th></tr><tr><td style=\"padding-right:30px;\"></td></tr>' +\n '<tr><td colspan=\"2\" onclick=\"@@@click\" style=\"cursor: pointer; cursor: hand;\"><div style=\"padding-right:10px;overflow:hidden;position:relative;max-width: 275px;\"><div id=\"#mi_image_lightbox_@@@ksid\" onclick=\" jQuery(mi_image_lightbox_@@@ksid).fadeIn();jQuery(\\'#mi_iframe_lightbox_@@@ksid\\').attr(\\'src\\',jQuery(\\'#mi_iframe_lightbox_@@@ksid\\').attr(\\'data-src\\'));\"><img src=\"@@@itemContentImageURL\" style=\"max-width: @@@itemWidth ;min-width:185px;margin-top: 15px;margin-bottom: 15px;nbox-shadow: 0px 0 10px 4px #eee;float: right!important;border-radius: 2px;display:inline;\"/><img src=\"//d34p6saz4aff9q.cloudfront.net/images/playvideow.png\" style=\"position:absolute;cursor: pointer;left: 50%!important;margin-top: 20%;display:inline;margin-left: -30px;\" nonclick=\"window.MI_logUsage(\\'play_video\\',\\'@@@baseid\\');@@@click\" onerror=\"this.style.display=\\'none\\';\"/></div><div class=\"mi_lightbox\" id=\"mi_image_lightbox_@@@ksid\" onclick=\"jQuery(\\'#mi_iframe_lightbox_@@@ksid\\').attr(\\'src\\',\\'\\');jQuery(this).fadeOut();\"><iframe id=\"mi_iframe_lightbox_@@@ksid\" data-src=\"@@@sourceURL?autoplay=1&title=0&byline=0&portrait=0\" width=\"500\" height=\"281\" frameborder=\"0\" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe></a></div>' +\n '</td></tr></table></div>',\n normalItem: '<div style=\"position:relative;\">@@@metaicon<table align=\"left\" class=\"mi_resultcontainer\" @@@cond onclick=\"@@@click\"><tr><td rowspan=\"4\" valign=\"top\" style=\"padding-right:15px;padding-left:3px;width: 65px;\"><div style=\"position:relative;height: 100%;display:block;\">' +\n '@@@item' +\n '</div></td><th style=\"vertical-align: middle;\" align=\"left\"><div class=\"mi_resultpublisher\" style=\"color:#838383;\">@@@itempublisher<span class=\"mi_resulttimeago\" itemDate=\"@@@itemDate\">@@@timeago' +\n '</span></div></th></tr><tr><td style=\"padding-right:30px;\"><div class=\"mi_resulttext\">@@@itemtext</div>',\n instagramItem: '<div style=\"position:relative;\">@@@metaicon<table align=\"left\" class=\"mi_resultcontainer\" @@@cond onclick=\"@@@click\"><tr><td rowspan=\"4\" valign=\"top\" style=\"padding-right:15px;padding-left:3px;width: 65px;\"><div style=\"position:relative;height: 100%;display:block;\">' +\n '@@@item' +\n '</div></td><th style=\"vertical-align: middle;\" align=\"left\"><div class=\"mi_resultpublisher\" style=\"color:#838383;\">@@@itempublisher<span class=\"mi_resulttimeago\" itemDate=\"@@@itemDate\">@@@timeago' +\n '</span></div></th></tr><tr><td style=\"padding-right:30px;\">'\n\n ,\n itemContentImage: '</td></tr><tr><td colspan=\"2\"><div style=\"padding-right:10px;overflow:hidden;\"><img onload=\"if (!jQuery.MidasInsight.imageIsGood(this)) jQuery.MidasInsight.HandleMissingImage(\\'preview\\',this);\" onerror=\"jQuery.MidasInsight.HandleMissingImage(\\'preview\\',this);\" src=\"@@@itemcontentimage\" style=\"max-width: 275px;margin-top: 0px;margin-bottom: 15px;box-shadow: 0px 0 10px 4px #eee;float: right;border-radius: 5px;\"/></div>',\n lightboxContentImage: '</td></tr><tr><td colspan=\"2\"><div style=\"padding-right:10px;overflow:hidden;\"><div id=\"#mi_image_lightbox_@@@ksid\" onclick=\" jQuery(mi_image_lightbox_@@@ksid).fadeIn();\"><img src=\"@@@itemcontentimage\" style=\"max-width: 275px;margin-top: 0px;margin-bottom: 15px;box-shadow: 0px 0 10px 4px #eee;float: right;border-radius: 5px;\"></div><div class=\"mi_lightbox\" id=\"mi_image_lightbox_@@@ksid\" onclick=\"jQuery(this).fadeOut();\"><img src=\"@@@itemcontentimage\" style=\"box-shadow: 0px 0 10px 4px #eee;border-radius: 5px;\" onload=\"jQuery(this).css(\\'position\\', \\'relative\\').css(\\'top\\',\\'50%\\').css(\\'margin-top\\',((this.height/2)*-1)+ \\'px\\').css(\\'top\\',\\'50%\\',\\'!important\\');\"/></div></div>'\n\n }\n },\n MODERN: {\n panelLayout: {\n header: [\"tabs\", \"stars\"],\n content: [\"tags\", \"mentions\"],\n footer: [\"photos\", \"callForActions\", \"share\"]\n },\n panel: {\n videoholder: '<div id=\"mi_videoholder_@@@baseid\" class=\"mi_singlevideocontainer mi_closeTopLeft\" onclick=\"jQuery.MidasInsight.MI_GetPhotos(\\'@@@baseid\\',false)\" style=\"margin-top: 74px;background-position: 10px 18px;\"><div class=\"mi_singlevideo\"></div></div>',\n containerHtml: '<div style=\"padding:5px;margin-top:25px;border: 1px solid #ccc !important;\" class=\"mi_panelBackground mikfpanel\" id=\"cpcnt_@@@kfid\" style=\"direction: ltr;margin-top: 20px;@@@layout\"></div>',\n tabs: '<tr><td><div class=\"MI_tabs@@@orientation\" style=\"margin-left:-10px !important;position:relative;z-index:30;box-shadow:none;left:0px;padding-top: 0 !important;\">@@@tabs</div></td></tr>',\n gauge: '<div class=\"mi_gradeselectgradbg\"></div><div class=\"mi_gradeselectmasknerrow' + (window.MI_defaults.RTL == 'true' ? ' mi_gradeselectmasknerrow_right' : '') + '\" style=\"background-image:url(\\'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAHIAAABQCAYAAADFuSFAAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAA25pVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNS1jMDIxIDc5LjE1NTc3MiwgMjAxNC8wMS8xMy0xOTo0NDowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wTU09Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9tbS8iIHhtbG5zOnN0UmVmPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvc1R5cGUvUmVzb3VyY2VSZWYjIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtcE1NOk9yaWdpbmFsRG9jdW1lbnRJRD0ieG1wLmRpZDoyODYzNTRkZS04NWY4LTg3NDEtYjNmOS02OGU4NGQzZjVjODkiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6OTM0QjUyMzEwQ0ZBMTFFNTlCQjg4NzExODFEM0Q0M0QiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6OTM0QjUyMzAwQ0ZBMTFFNTlCQjg4NzExODFEM0Q0M0QiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENDIDIwMTQgKFdpbmRvd3MpIj4gPHhtcE1NOkRlcml2ZWRGcm9tIHN0UmVmOmluc3RhbmNlSUQ9InhtcC5paWQ6RDVFOTA3RTFFN0Y4MTFFNDkzNjJGQzdDNUEyRDA1MTYiIHN0UmVmOmRvY3VtZW50SUQ9InhtcC5kaWQ6RDVFOTA3RTJFN0Y4MTFFNDkzNjJGQzdDNUEyRDA1MTYiLz4gPC9yZGY6RGVzY3JpcHRpb24+IDwvcmRmOlJERj4gPC94OnhtcG1ldGE+IDw/eHBhY2tldCBlbmQ9InIiPz5NfkuaAAAX1klEQVR42uxdCZQdVZm+99by9u7Xr1+n926ykOASgQODS5gJijIGJQxbOM4IIosKKgoHZw7icubMAcHjuI3jCHJkNI4LGcEIKuoIozKj4uAIkTBEliyd3ve313bn++tVvby8vNd53R00CXVPbqrqVdWtW/93v3+5SzWXUrIgHfuJb9u2bUk3UgMIhUIsFosx27aZoigsn8+ztrY21t7ezvbu3csikYj7e7FYdO+JRqNM13U2OzvLUqkUE0Iwx3GYqqruNpPJuFsqo1JBzt3fDMNgiUSCzc/Pu+VS+T09PfT88NDQUE9ra2tnOBweRJn9uGcFbm1HDqOeKo5t7JvIczieQN6POu+ZmZnZj3qMo05Te/bscetNdaE60jvRs6mO1e9M9bAsy30XOucTga4tFAru/ZRzuRwzTdP9vaWlhWWzWfe9qN6opys3kg29G+Xp6Wk2OTnpXr+UpI6NjS3pRno4CZQqSS9NlSchU6KKTkxMuIKnytILUiIhEPhUabqeztG9mqa55UGwFWD9RMKia6iR0D41AgiyG8c9AD4NQZ6M3AehpXC+G2V2IrdhvxW3h5AVnHewtbDNovwZlDeOMkaxP4G6TaKh7YCg96Lek7juOQjZKZVKbv0oVzcoapQEEAHoA0HnKFNDpHehhkCyoPel3+m6ubm5yrtTI6D7/Pvp/ej30dHRSlmLBtKv6KKp7FXQb5W09Y+rz/nZB6U2+/f65/2t39Jpi/KiAHc9Dl+LxnEGGtDa9evXnwChtUE4YtWqVYeUWyMQApNeNATBtSOvIQFS2dTICBwwOguARsGknbjv97j25yjnSVwz4pflM7S6/Ebnaq+r/b1aLtXyWzKQR5OepxfyWyheJo58OgC8CHlDOp0eBIApUkmkCah1L/WlqxNpDa/RxMHSNQB1DcDcDICvx/4E8mOo0w9wzU8IVLr2aPQrjhogCUAiOlrmyVBNmwDehfF4/HQSNIFH6mip2qMZ7UKJ1CJleiYBC/UaB6groSYvhSofg6r8d/z+IPKvAOZsAGQNC4mBSG+Bs/E2qLhzkdvI9r6Y4DWTiPWUyTEDqJ0A9b2w0dfB3v0c7N2GxncvLpt4SQPpMRAEFOdBWO8BcH8Bry5Knp1vK46m5IOaTCY52LkRzslGAHotWPp11PVOvMfMSwpIzwbi3flrYOs+AgA3gYkcAvqTsq/ZRE4JVL6bAegrpqamPgGWXgWG3o53uw8aZua4BbI6FgR4L+vu7r5xxYoVlwNAnQCsDjeOpUSqnzJU7xoAejdAfAfe8xNoqD/8YztEfxQJel4ox0u/H6rzxo6OjkGyOxRvLcO6MgoPORdjUvK845jcKY0rQqhPKuHO79e8m4Nrw6X8c1sY07vVUJetKOT1Ulhi9yE6WZYm9z1pvNufj4+PnwaG3osCbwGYw8cNkB6IrxwcHLwVDNwMEH2vcNFOEXhdcGxzhDvGDqnEfmUWRwt6OHU/UyLTjm0xszDCVTVSBJBmnZqwUu6Ff2Y8qjElJYWgvgKLFwoTl4RCXSkmi+uB9gZVDSepVwgNZNEql94LjTU6OTl5BfKG4eHhj+DUvccskNW9ID09PZfBntwOddpDjgy594sC0LH2AcVfAsAnpZ3dAdB+zsz5WUWNESkPfq7QkBu9EoJxJVSUTC/W0O8rdGxaBTyGeoOstbZtnYufNmpqbD3nSrpxmYcmsvOdnZ1kQ0+Exvl2Npt9NTxesp8TxxSQJBTqi8RLJMDA27q6uq6FPVQWw0KoQUMacy84kv8rVyPf49L+A3AwmYMwRQFTuHIQQLWANQKy0bXl3iNioJjDf7+Buv2NYWbaTDu7FtecpWvJ81U1erLgSnQx6pZ6nMDMG4eGhjZAHu8FmI8fE0CSQAhEbFf29/d/qa+v7xxSpeS2N2PzHLOYl1buF0wJfdopzj4GEGeZBtlJ7p5nJGxkTr0rnLrx8Cy7CFxDXveXiuMsk9Y0MIngWt2Fiq5znAx2TEZYlEEjG2t6dtYr3wO3XJYC75P/2nHsXwPUL0BUvY5T+jtVCV+kqKFWznjT7ASIrx4ZGfk+nL13Qz7bXwxHSBzJwrwO5D8D+7bDJp5DoxPNgCjNgm3O7nnAmn7mIsfIvRnS/jGEPesCV5Gv4gqdOQZz8CO35qGmE0xmfgdtOMtULQyBRZlwplEegLQLLnBkG5lTApmzwAL102z3OinnEOTvxn6CGdYwzhcAjeoBLMvthtQxNRyu5LC/y3Gsq/LF0XPmss99oWTONa0qyaRAHp1g6VZ46e/zG/1RxUjf3pA9ROs7e2BgYCtY2J1Opw8b1Eur5Nj5ifsdI/tVaRs/4lCpZOcOUn0u8+AwWTkmiFGFIfgrvYwZU0yJDjAbIgYNq+pDrFXL7KX7padS3d8Ah/S1B93joDHEWCH7NADtQ1uxXDCFsKBZ5KGKmNNAgPpYsTT1mGUXt9oh82pdS2xRlVBrM6oWskmAnf8EJ6gDzPz4kez4OCKMpPgQLW3L6tWr7zvhhBO6SZ0uWEEaebDMR6A+N8nC9F9DvA9woRvMU3menQSZSoyZc6TmGDemvcrKso2kTNe49pI3o7lrnCO6R/HsI5wkprgXUENQNJ3poTjaAFQyM8sNqUpUAo0C9pLAfHfRmH21ZRa+gvo6zfQOwdyw3t7ej4XD4c9Bg/EjxUx1uWz0QLwAhv1OVLCF+kgXMKKQvTlnZ8a+xLTY33OhFOBKukxh8oCkuevOk3ChCq0S4+F2CNUDrNJAvK1jHkBI2hqTxkrmse1gFG08wkDcaO7HwXxZhVpVZcmDnB+hqC7TbQkVjTpaMgsoFRyzKluqSORnbCnflS+MPBrVU7cgPl29UOhCLCQwIbvrx8bGVNM0byAu/MmA9EGEOj0PLNwKEGMLgkiiLWV/4uQn78DdP60A4gvGMVw2CEV3277U4KyQl0oXEPMqcvYAd8w2bFNchN8CSafxo8n19Clg78lMbQO5wxW20r5gbSwcOUnlPLQLP/436VrO1d+jjEfhxBTBqEle47i5gIKtmhJmJXuCKTzCpGu2HZQnDjhJnNlcinvyxtwvVUX/UDSUuvJwMSfkRbvXjY6OmjBLH1wuMxcNpO+Z0ig5PNM3AcSvoYXFFgovpAlbODf0HRZpoxfMsmq1S4OrYJUbhxt5nFI9Z8PL3ENQWjCWvAdt+gKwYECGUhcAi7BIntbr2j/3bZLYTdZpdQqiFp0pqtvQBpHfpKrUt9tioqzRcGjAFCLyX1Ch3+dc/lC6jK1mc9nxKdnzLKJ1sIjSwTKw1VEnDJDjFfspmf1/2L06W5zcrSmhD4e0RPhwYOJdPwBmGlCzf0type7KpYCqLhZECuipfzQSiZwCdfplBPrJBUG0rXlp5N7nZMa3KvEOvKznhBCAZpEJNY6M8EHRKPwos69aiFJ2oSWczPTkFUzRzxVaf4sbgrBYBaSluge87Fn1h/QeetYqsPIytKp9kssHHdt8yJH2DodZL1RUqVt3h4XQCKbFs+VoiPuW2/G8XE0WzKl/cBzjIU2NfRNe7+qFwCTPHsz+0Nzc3DAA/aw/k+BFB5J0PDzSPlTgqwj0B1tbGztsTnYqB3AuF5GW7QDBY1jZznFyLEyrrD7hBEhybKrjdinTQPgaxJIXAayTeaTjRe5OdG0eWbF+lanXSiV0LcDZZTvF/7ClcTfY+r8H5GC59pI83iJi1rBMMQ1xq+PaXOmGLPBuf1MycpsdWfpOLJw+qSEAYGBXVxeNd96GMGV3JpP5LkUAiwVTXQyNSZ3C84oCvLtSqdSrFgoxnKm9GXP46cuUvvXbK94oriUh8HmEiIUc4wk4MaWcx0JeBtWx07j0vTyUuJgJ/ZWMC/bHT2VQQ2p6LSq31nJyF5aY+JZpTt4Flj7N3GYoXYZKDnupcDZVepZpLM6S6uABx4YrO2fyIxcXrNnvpONr1jV6Gmk5qNkIsLgLIA7T9BLycIk0zeKjNtfrwly76HU7fRQtaBP1WDQC0Z54IWPufOQqnuoFE9UDahKaTOB1ZR7BuRat8hjJmXFiYO3l8GZv5nqs/+gZrEJkKeJdqh7/oCIi1+CHm21p/RsYOu2yD8xUuM7GzKfw4ipri6zCb+qBUEZoT41ln7oUrL6vM/HyVY2eQqMnCNs68vn8lwHeGyYnJ6eImc2O0TYNJIEGAP8KQe0NUKkHzfc8iInT+\\/PWEz++jGvqdq7pHoDCVavcQCihRplNndC+x+\\/21jhnMi18s4ilz3XDkaM0hdV2MsyfN+zMFoD0ebBy2wEbFWaWsNiY8RQL2TEW1XoqHRSqiDwxnH3yPGiX+zvjJ61tVD75HtB6r4Ine8euXbuuBZgmTS1thpUqzcVsZigKAK5G/iLUaYgKr2tDZ8cyxlM/uxye33amhbyQAWqoiHBRg0dJMXNVLwxSC+Loa0S07WbYwXZ2lE3vaJR0JXFmV+y016KFrsqZY3ccUKUaA8hs3hlGaJZnXeFXuA4QkUDl+s6x7NMX495tbZHehmqWzBVYeQUigl/Bft7tTQddvrNDdhH01trb2/+Rut4aOTeymMuZ+56+hkv7u+B52bEhVxr2kKGxiI7eKhbaFJL0iGjyDiXc8nYmjr0ZApqIK2Dk7SEluQle7tthO4fIrgIwt7/sycwDLG/Ns3Z1oNwdyEkNix2zhf2XxtTUfboWWdVI88FsKSDPbTj8z/n5+WebmUGhEp0PZxsB4NUIM95Ko/oN0rSTz7wTCH3PVaOGiZJpC5c8N44mHCrHg9xzaNTQWXB0vswUbQ1T2DGbiG0JvWejI80f4sU+5kh5v3Q7/jRydNg4HKA25QQWVtrgVUbdGFnlkScyxcnLW5WuR1RRf3CWNB5k3QFtSeHIJYZhFA7HSuX888+vrD+ozTRtHi7xIBycrwHIlnoqFXEicyaHbpWZmbulUXSHmCgm5HDNhYiXmQlbyaMJmrSK641zRKrnW6JlRR87ThKYuCKurbikYM3Bi2O/pJhy3hwFgEnWFz4VwLawCCxHRLQzjUdgquSodMQGXaPuPN6wXxasXF0oFKhL8XGSvT/vtl5WG9k7n+ZQpR9B6+imWWN1VWp29kHr+R2fYwQeqYBQsjxmWBmC8vtBHfyTrxeJ9q8zPZJmx1mKa13ihMSGT40Un2QlK/dpv5NACJ1FlRAzHaPSTxxSmGXb1j1gWgmAnVtv8IJkD3upQLXehP2HQKo9C7FS1GMiOTekUsHCNyJf3Uj9ymJ+j5ybfg+PtmR5BA6dhkaBcMON6X0Q3Q5xihPlWTyWuBcgdrDjNIWUBO+NnPpJhek3mk4BMuBljxPWlNo1dRhIZmNrUxD6TdxyHvInFxotgVlbAx/lJlrdRetUGmV1amqqrl3UdT28du3aj5MXVTdEkbJgT4x8WM5N7uehmNcfSr01BXeYqjL6YJZgE/U380Tqq1wLpdlxnjQRVQbjZ3xiqPCELDm5z/gzCfxwzakZ7cLxHWDaXyKf2igkgVa8Gp7sPXA8f9so7BP1VkhRAhO3wFM9s3qt4kEVmBx5SM5NfYOrYYQVzLONpFoR6EcSlczbe/qVvjWf46HoCvYSSWGlVT81dcmnYmrbDaZTFOXBbVZZoeYvxfOC/VnqOHcHExp04SFuD8O0fZSmlDaKKdV6MSPsZhvimOtp4Wddvew4IyjvSpFoc0OMigolF9TvibDhudpOXHQP3ArbuZa9xFJKHxSJ1IpPGoaVgyq9y++rJiBpPm/NsrpfIH8bsr6qXlk0PAhmnlMsFjfRyrBaTNwGUk+tdnV1vRW6+TTqkqvLxpnJzwDMWdg8xkNgJLEPal/OzzA5O8Xk9AQFoIzHWz7ABb+MvUSTJiJqVI/fpKiiq9rDJCD9Rb6UPb/kX4idjZxO4BEFHjQMGPZ/45xXVo6rvs6mH6nQSCQS7u3tvZ4C/3r6WGbnn7NH993LFdIY7lg+o7BDzs0QA2keBEA0mOhbdbbSlr6JvcQTGvKJGteuhJxvqx1JqlaT3lTJh2k5YV2vGFEDmLkZseXpsJWP+iD6S+XFunXrKqtpCUjo481wcE6vy0Z6+MjQN3g+t4cV4cTk8wzBJlgZYUq6iyldfdh2M5HuHlTaO79ItpoFidKtyK+rZVntMa0bYQ2mfdB5mDoN7Hs3LWOnbxLQMnxitvvdgoGBAXeH1q8DUAVq9Tp/7f8hOGbmn7czc3dy6kctj6qSTw0nRy/35HjzMZTewQt5S3JtgN8BECDbO2C2LsXhQutBHgeZvgnZv6PeSSIXzY8C4OtQ5jNULo2akDl040h4qG6fKtIZxMYGI/7Syc1t5fHEftYCorW0gu8tzAErrb0vMGtoN7P3PM/s4X2vYeHoLQF8h4B5JsB8Z3V0UGc6pASQX5Hy4JGFaqcmlUrFoEpp1ZcLrN8PKwzDINSSoG0bTrwdejhWd32GZU5zVf+S6IDqTLYz0Z52mcj1MBOtKSYSADcSZcrAyo9zXW8PoKsLxN8AuJ56H5DwvyCCfVrW/t1GZZAHi+u24JougNkCNiaxn6Rv0NxfKpUUhBscJ05t5Knae3f/j7N/zwTXveEpcoRUjVUGjmFfRTh2ttLde1YAWcP0MsibQPhstdqt+aiFgfPfwnYzOb6HeMLlOVMrcc1DOJz0Q0gOoyl9D4poSjq3TtyYs/e+sFkW8g+7A78EYi6LUGOOSd+WlkphZfWJ25SVq94a4NU4Qc7Pg0WvBXDj1Wq1JtDvA+t+hPMvr1cGmUGaPVAdVVBPwTQxthzNN0iF/ONOJrOJK8qEO1cFLHQnVjvywCRvx3olb2n7KQ+FVgRwLZwAxM3Y3H4YL/YbAPNtTRZpeHMTD9OKiqVHwLgJSZ8iQ7jhwO11xseZMzPNnOlpZo9PkLp9QwBicwmabwvYxGu7RWvYuXUxZR5+ihrNSy3mHnbXJdIDSZVqqmsTWcko52IxBZreEEDUtAc7iLzxICBqvpIFMH8Hn+UPRw5IyfYjJvwZb00yjpBDJFqYNK2ybdQ1F1Qej60X6XRvAFHzXbEAbEOto1PjzY5i+1jTLD/cBc7Y2HPO+BjnIW8eDkIchyvueCPN6ZQIRpV0+wX1PKwgLZjO9oawrKpuumpbKSnoh52UzZi/wzKSp1KPKitX5kRfHxP9A0xGEXYWCmClWc6FfCfU7RuPlRlwR1Gi8cczawP+6gxWfo8i+OUz0jTzcnx8V7VHxamDtrvLa0LSfbqS7ugPcFm0nUwCqBW1Tk71wDOONX8Mc3lAquo+3tGx3VWp7uw4gxk7d5BzU57qCEaKaPQKZUVnS8DHJcWUFyJvpyi8TixJ6WkA/gNsz18ekI5UuR4qL0GiB2k6C53xmvJybn9toOP0cEUJUFlal12nh0GpwSU55NFlq1Z7/76wMzLM3Fnj3iopu5j3VlVhY5i6duK6lOgOHNalJKjRpGVZbWBdboHLos18m0gsrMfZnUxwqzJiZRrMoQFlFCxJtdJXjTl/QwDJktMpAPGURmGIt/8ANvllMVL0Dz6LfODYsplqW+VZAMyd8mhwVTECPJaW6vXq1ElDyPRR+Ohy4siDBiaFqtBX0AMEjjCehzlPc3SUpTOSZoYXS7Kyypi2CD34MfpJzqM4Zet4swcdLm81lg0gZ2dYZaojfeUx1e5NfwzSkUq2bZ+E/HD1XxyonWbTDJCiMSFt5uQzyNlyLuSZzB3SeBx2yDcag7RIz/Vd/jINykv9TEtDetHKKRGJ2O4nxAgtw2Cl3c8wXVOY0urN5HBskwnFCeBYVir5Ix/+4L6/vxiyNNaTqsZEZ0/J7b0Jh5k9jrjUMtw5qw5iSWt+hqmxxEYRTfQF/axLTwCu0qtT7++Y4Li0bI9JWuZ11uhQD7Os8hJyeggApqXkxZ2/Wy8deYu7ejNIS04Aiv7C0MUN/jAMeazvYuUZHMvoENBCrxMtSfq+6GoocxXA6rTFqdPCq9Y9qMRbBgMolp2SAPMe5Pdjn9b1a56mpG/zfAH5ymbCD+79eYPEYS7e6cxM/tYc3hPS+lcZIpHciKbUF2Bw5JLHxl8j7waoDo7fhG2zyxCNZoH0n8YCe3hUpkUCGaQAyCAFQAYpADIAMkgBkEEKgAxSAGQAZABkAGSQAiCDFAAZpADI4xxI+qi593nHIB2jySIg6ftn9B1PEcjj2AXy/wUYACIPOMIobjzuAAAAAElFTkSuQmCC\\');width:100%;background-repeat: no-repeat;background-position: 15px 6px;\"></div><div class=\"mi_gradeselecthandlenerrow\"></div><div class=\"mi_gradeselectdigitsnerrow\" ' + (window.MI_defaults.RTL == 'true' ? 'style=\"direction:ltr!important;\"' : 'style=\"direction:ltr; LEFT: -4PX;TOP: 30PX;\"') + '><span style=\"font-size: 43px;z-index: 3;color: #92c83e;font-family: \\'Source Sans Pro\\', Alef!important;\"></span></div><div class=\"mi_gradeselecttext\" ' + (window.MI_defaults.RTL == 'true' ? 'style=\"top:77px;direction:rtl;color:#b8b8b8;\"' : 'style=\"top:77px;direction:ltr;color:#b8b8b8;\"') + '></div>',\n starspanel: {\n header: '<tr><td><div class=\"mi_hover_starspanel\" style=\"border-bottom: 1px solid #dfdfdf !important;padding-bottom:5px;width:387px;;overflow:hidden;border-top:1px solid #dfdfdf; padding-top: 20px;margin-top: -17px;background: #f7f7f7; /* Old browsers */background: -moz-linear-gradient(top, #f7f7f7 0%, #ffffff 100%); /* FF3.6+ */background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#f7f7f7), color-stop(100%,#ffffff)); /* Chrome,Safari4+ */background: -webkit-linear-gradient(top, #f7f7f7 0%,#ffffff 100%); /* Chrome10+,Safari5.1+ */background: -o-linear-gradient(top, #f7f7f7 0%,#ffffff 100%); /* Opera 11.10+ */background: -ms-linear-gradient(top, #f7f7f7 0%,#ffffff 100%); /* IE10+ */background: linear-gradient(to bottom, #f7f7f7 0%,#ffffff 100%); /* W3C */filter: progid:DXImageTransform.Microsoft.gradient( startColorstr=\\'#f7f7f7\\', endColorstr=\\'#ffffff\\',GradientType=0 ); /* IE6-9 */width: 396px;left: -5px;position: relative;\"><table style=\"position:relative\">',\n footer: '</tr></table></div></td></tr>'\n },\n tag: '<span onclick=\"jQuery.MidasInsight.tagClicked(\\'@@@kfid\\',\\'@@@atags\\')\" class=\"mi_tag_@@@atagsreplace mi_tag\">@@@atagscap</span>',\n slidercontainer: '<div id=\"mi_previewPhotosContainer_@@@kfid\" style=\"height:65px;cursor:default;-moz-user-select: none; -webkit-user-select: none; -ms-user-select:none; user-select:none;\" unselectable=\"on\" onselectstart=\"return false;\"><table class=\"mi_previewPhotosContainer\" style=\"\" cellspacing=\"0\"><tr>',\n photopreview: '<tr ><td id=\"mi_photopreview_@@@kfid\" onclick=\"jQuery(\\'.mi_thumbscontainer\\').hide();jQuery.MidasInsight.resize(\\'@@@kfid\\');jQuery.MidasInsight.MI_GetPhotos(\\'@@@kfid\\',false);\" colspan=\"2\" style=\"width: 100%;overflow: hidden;background-color:white;\"><div class=\"mi_thumbscontainer\" style=\"margin:0 auto;overflow:hidden;width:386px;padding-top: 3px;border-top: 1px solid rgba(0,0,0,0.2);\">',\n tabswrapper: {\n header: '<div style=\"width: 152px;margin: 0 auto;background: #fefefe; /* Old browsers */background: -moz-linear-gradient(top, #fefefe 0%, #eeeeee 100%); /* FF3.6+ */background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#fefefe), color-stop(100%,#eeeeee)); /* Chrome,Safari4+ */background: -webkit-linear-gradient(top, #fefefe 0%,#eeeeee 100%); /* Chrome10+,Safari5.1+ */background: -o-linear-gradient(top, #fefefe 0%,#eeeeee 100%); /* Opera 11.10+ */background: -ms-linear-gradient(top, #fefefe 0%,#eeeeee 100%); /* IE10+ */background: linear-gradient(to bottom, #fefefe 0%,#eeeeee 100%); /* W3C */filter: progid:DXImageTransform.Microsoft.gradient( startColorstr=\\'#fefefe\\', endColorstr=\\'#eeeeee\\',GradientType=0 ); /* IE6-9 */-webkit-border-radius: 15px;-moz-border-radius: 15px;border-radius: 15px;border: 1px solid #cbcbcb;padding: 5px;\">',\n footer: '</div>'\n },\n footer: {\n header: '<div class=\"mi_footerwrapper\" style=\"background-color:#fff;\"><div class=\"mi_footerroot\" style=\"top:2px;\"><div class=\"mi_footercontainer\" id=\"mi_footercontainer_@@@kfid\" style=\"height:100%;position:static;\">' +\n '<div class=\"mi_footer\" style=\"background-image:none;height:auto;margin-top:2px;\"><div onclick=\"jQuery(\\'#cpcnt_@@@kfid\\').find(\\'.MI_tab_selected\\').removeClass(\\'MI_tab_selected\\');jQuery(\\'#mipct_scroll_@@@kfid\\').addClass(\\'mi_blured\\');jQuery(\\'#mipct_tblabout_@@@kfid\\').css(\\'max-height\\',jQuery(\\'#mipct_scroll_@@@kfid\\').height()+1).css(\\'height\\',jQuery(\\'#mipct_scroll_@@@kfid\\').height()+1).css(\\'top\\',jQuery(\\'#mipct_scroll_@@@kfid\\').position().top).fadeIn();\" style=\"z-index: 1;position: absolute;right: 0px;top: 5px;height: 25px;width: 65px;cursor: pointer;\"></div>',\n share: '<div class=\"mi_footer_prompt\" style=\"color:#59a3e8;top:auto;border-top:none;position:static;float:left;margin-bottom:0;padding: 7px;\">@@@ask</div>' +\n '<div><ul class=\"mi_share-buttons\" style=\"padding:0;margin: -5px 0 0 0;\"><li><a onclick=\"window.MI_logUsage(\\'mail\\');\" href=\"mailto:?subject={1}&body={2}: {0}\" target=\"_blank\" title=\"Email\" ><div style=\"background-image: url(\\'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAJgAAAAxCAYAAAAm0WAHAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyZpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNS1jMDIxIDc5LjE1NTc3MiwgMjAxNC8wMS8xMy0xOTo0NDowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENDIDIwMTQgKFdpbmRvd3MpIiB4bXBNTTpJbnN0YW5jZUlEPSJ4bXAuaWlkOjQxOTgzOUY2RjMxMjExRTQ4RDc1QkNENzc1ODE3OTkzIiB4bXBNTTpEb2N1bWVudElEPSJ4bXAuZGlkOjQxOTgzOUY3RjMxMjExRTQ4RDc1QkNENzc1ODE3OTkzIj4gPHhtcE1NOkRlcml2ZWRGcm9tIHN0UmVmOmluc3RhbmNlSUQ9InhtcC5paWQ6NDE5ODM5RjRGMzEyMTFFNDhENzVCQ0Q3NzU4MTc5OTMiIHN0UmVmOmRvY3VtZW50SUQ9InhtcC5kaWQ6NDE5ODM5RjVGMzEyMTFFNDhENzVCQ0Q3NzU4MTc5OTMiLz4gPC9yZGY6RGVzY3JpcHRpb24+IDwvcmRmOlJERj4gPC94OnhtcG1ldGE+IDw/eHBhY2tldCBlbmQ9InIiPz5SFpoiAAAe+klEQVR42uxdeXBd1Xn/3r5ptWTJki3bsrzbeMcOm9kNCRCghKWEpFkIkFCSIaShpO1MOmkzmTZJZ2hT2gYCTKCUBEiAYQlJiMHYGLzIeMEL3hfJkmWt7+nt9/b3O+9e6erpbZKeRP7gzly9d5d3zvc73/6dc69suq7LJ9sn23htTuvB1q1bh91gs9nUJwUx/Tt3fjeE1I5Pv9Pp9GiaVm232+fgegP2MlzzYI/gei/2E7j+Ea6fSSQScVwPsUmzLeun2ddoNyuN5rFJL/ofhgv0uHE+gHM+fDZgb8K1GuwB/hx7GNfasB9OJpNHcD6Iz5jD4YhiF3wfMjbmZu0/34axKQgb6TfbtY6b0Qb54MZxJe6bjWszsFfikg97HOf7sJ8y+HAauGM43497EtYxs46XFZOF50O2VatW5Raw0WwgshSdVbnd7ktcLtfl+Gzw+Xx+bAGPx1OFcyUgzIl74gASjEQiZ/v7+0PhcDgUi8WOx+PxN/D5Du7pRHPBQphQzI0DBQy1GOhG0H416L0In9WBQMAGDCX4Xg5m+XHdhvtCwNANDB2hUKgPO5XkEATrZXwewPU+MunjsBTo2wcs5aD3PNB7JXDMBP0VwFECPkzCuVIoAZU/ST5Eo9Eu8gF7GONPIVuPzzfQRjuwdheLLptVEkdiwQiGVgrE3+H1ei+cNGlSTXl5eYNpGXIJikXT9J6enqOdnZ1nIHBvg3FP4/Qh/LZvIiwY+p+OcxeB/i9DKeYDQ3lpaWnJSDBAuPq6u7v3dHV1HQGGV4HhDfyuA8zUJsKCUbBwOB0YbgGGSysrK6dWVFQ04rqrUAz87O3tPQ0+dEDgtkL4nkS7u4Dh7Fgt2IgFDJ/U5EUAdCcEal1NTc10AAtkIz4b49M3MKevvb39CIC+ju+PY4D2WYWjmAIG+ivw/XJguB8YzgGGMiiKjBUDLNq+tra2Hfj8FQTtLTCoc7wEjG1BuGcAw19CKW6ora2dDYtVNVYMoDsOPrSAD+vx/RGcasYemxABo0/HoF1fUlLyjbq6usUA5hurlUnvJ4ittbX1g76+vv/AAL6O893FFDC0uRAYvlVWVnbzlClTKoFFiowhCav8ITC8AUEjg45QboopYLRacHlr4f6+CQxroCRVxeYDaE8Cw0cQtJ/DfT6DMWsdjYA5vv/97w8ctLS0ZO0QoKbBvz8ETblv6tSp82C1XByMYmWhJtGwJG4wn8nBCpjqSQC3ly5zLAJmYczlaP9hMOX6+vp6H7RfxgGDHWNTCwwLOGbA0A2hbgEdyUIELB8taHMS4qu7Jk+e/O1p06adxxhrnPhgBwYma6uBoRF82IPvZ3P9FmM6OgEDgFno8IcNDQ13ANgkSDPdpIxHQM522T4sSyX6XIKYoA6JwA701TMGAbOj3RsgUD8BU5ZVV1ebMdi4YYAQ+MCgucBSB5ffDwzH0Gd8LAKGdmswJn8DBb8bit7kYKA3vnwQ8MFHPgDDAgjaDmBoK6qAoSP6+X+bPn365xBAuoplivMNMgcNlsCDvhfAXE8Bg7aNVMhMAYMFUcIFDHMQAGc18eOAwQkLMwPCVg9F6TRKG4nRCBj4MBmM/h6U/CtVVVXVRllo3DFwAx8E4zcLGBaDD1uAob1QAbPnkeI6gPpHaMxnwRjbRDAm3VQjvvDA6twEOh4CPVNMocm0Z8FwMX77I2BoRFvyMWBwQzE/hZj1TsRN5+PYWYhSWHdgKIOQ3gMG3gE+VNANZ8JgU78vwp6BD7DGgjG8CGP5E9Azu9AxyGXBAjCRd8EU3w2XwqKdbaKr/hYNouWkBjFt3jmCWtNsYPgvYFgCrZ9Q4UrD4ASGabFYzA9X02zU/AoSMP4WbulahCYPINutS7dcvMdhZ9nCpoQDCMdMM9tSlRp9aEBPS4atCR7FgXPvo+/+fBYslzZdgCzxHjAmkJ5tfhxCBjoqkWDe29XVtR1Cs6GAtLscv2W2uJrCNRGuPY+79CK5uA6pfysys382Sxj5SgewFnOA4X4IV2O6cFEIYglN3j0UleYTUekMaaKNESN/7oSALZnmlsvn+yXggQXVh/CBGebnwYf3cO6plBgWOFVkAVUPaf1baD7jh4JrM+PJINBhAz1zwKAHsB+CVrfkYg7inbWIG74EzRe4pqJiSHcjYoyylbcmKeY5IzMrAYarYMk2AsNLwJDIhQE0l+M390IwVwK/3YqBVqsjmJRfbw3J+gNhOYPv0bguYw33dcPVbjkakbMQ2C9+qlQJsm4IGQN/CHsF6H8QgrYNGD4ckYChESYn1yFeWeP3+9X8WrYBVma82MJkTt+k6QXSZGY0jAXWIptZi3ueRf96lsp0DTDcj3ClJBcGu0G/lqG/jK7DZinWGsJjM4Ifm6TaG0KLan+wbWIA/SyI3goGvYNT7Xms3gpgvga724qB3cSTurywPSTPbe+TKWVOuf3cEplR5VR0jMWG8fd7W+Pywo6gvLm3X5ZMdcuqmR5JaAMzF8IxhXwsAh9uxvG/gM7wSASsnloDU+jLpr0caFhmSeJPsZ0O23Y6UnFFUhueOoOuir6+vq8jlnkL2tOaScBw36XAcMmkSZNy9kX3wnFzoz/2m0vITOE6dCYmGw9F5MOWuHT1J0GnTaZWOGXldLec1+SVUo9djnclZPPhiFT67bKm0SvlPru1bQ8swHLEk+vAoGezlS44FQcMrHdNS3ftDtC792RcNoOOxmqX3HdpuSyod4vLXoTxR9uL6hNyuCMu+07HZXdLVM5t9AwTfo4t+PA17M9hXPYUJGCsDeHmCyGhMwFuWNxlWq7jZxPyxt6wbD8Wld6INqDBY/f9CBTBrEvne+XCJp/4XDZJ6kOBwe1xEvocMGcZTrVmyNrKYb2+AK23cfonU9zFGOODk1F5ZkufnA3q8hcr/HLlAr/qP5HBk/J8BM7s1V1BefGDfmnvTSrFshtZ10kI1DaMxe8/DMu0SofsAPM7Q0l1/Uwf3Mx5JaJrKYxUEtDPuuI1wPAKmunKEos1IkxZg92ZiQ9toKEHY3/D8oAsbXAb5Ri9KC6kMmCX2TUu2XkyJn1hfRhzSY/b7SaOWijKlTg+gP7jeQUM5o6rB26B+SvJlHGRMc0nYvLohl45BAn3QWUcNsOuFgFbBPvulpjsPhWT/dCev4L/D3iZpg+9D66vFIHyTYhlNkApgmnNzEDMdQnT6kwYyBwqxfPbg7LpYFS8EOLH3ukTN7BdPM+rrGciMZiLOVQgLbg/JP/7fhDfdZlb65KL53plXo0b8V1KwDZ8FFEM2Qu6fW4b3JZDWnuSsr8tBiFOSoV/iBVzAEMTrPB8uM3NVldv0OwChhtwz+SMma9uuHVmdi6Oj54xrBhWMrCLsrgDAqPTS+hDPAUvJSCoVCoxs9Is2TfG2NHT03ML3P3/cdlPXgFDI5Oh/RdwqUom4k73poLK/W1xaLxPPrPYJ1PKnUOC2bEEzgS2A0wiM1/bHZZaxBY3nxtQA2hlAOhzQhHWxePxKq7JspKJ61eBObglkLEfFwZ456moHDyTUBnSjcsC8v7RqDz8Zq/0RjW5ArjK6NKSqcGny9gE4fltc0gF0Z9Z7Jfb15RIbaljICBeOMUl58/yyvr9ETkIxVuDmKWtNyGPbQzKYfSzCwpzyXyfam8gxS0vn9fe3n4NlKQZzIlYvQgwBIDhWk4D5YqVVPyoFTb2KUXRlVuPJwdDkQCUgUqWyaOY/WSLEWHBbKBzBZUae34Bg3AthQtymstV0v0+XeIe+OR6CNW6hT5ZMsOT0qZkMSZZsaOPGmg+0+1H3uqV5uNRuXiORyaDmUO0DDdDwLwwzyz4HbM0w4WClzAItS7ISy8tH4OL7+7XEL845dolfhVj/DsEjH0ebI/L9UsD0gBX5/c5pA+u7l3EOi3dSbkMrvtWCHxdhSNl5XQj6wLtFNZPn+MDQ3xyoisJoY1AQRyI2eJyFP2l0kpricFeBuaQfpdhvK34piJrrMjEh9FsFK6+qC6v7+qXV7C3wlD43HbEiDa5CS523UK/uJ3DY9789TI7a2M6+HAuaN4ixqR+riB/NRfZZTTLGKDWngTciy4h+Iyn3gsqjVyO4JZmN54YfYmP40jLchZa/4e9EcQ5IaVdFDS6GbqbRFpxkYsa4SZXI6Z5yyy84rsXTFuaLfYytxBcZBT0VpU41MCumOGW+68oV5je3BeW945EYaG9ctFsr7LadHulPpucN8sj06ocEosOTW5UbGUwMpFMTY+safSoOKkzZJeZyO50y4S0pXA5Gcwp4wpTy6ICMm4FrJffPM4UJw2Otm5pN4viYoA3HwrLk5uDKuFYWOdW3iIU11Q2qumGsuiD5Qizfd1oONt4AoMXhmkNXP0TOAzms2CLYBlc2dZh0bTGIVQcsAPQ9B/9rkduWxWAW/EiMMTAx0cuZE57ijH7WmPyXHM/3ExUKsDMagSaHAQKbqYNljYAOhdwKoZhg3GaaSOzL8m6lgz88rqYOUKroSwUCBK9qN4p37myTF7bE5ZNsFi/aQ7Lb3b0K4acDWoyY5JDWS7+PhtGWoBU9qvJq3Dx247H5Y41AbhMt7J4GZjDhKQJse8pi4A58H0+VwMXKyuPQiGOdSakP6aDHp98bkUA2DVV5yrxpDLoQes1Mg4y2IdCLGQhOa+A4aZZLEpmnlJRFSrFkE8j9uLl57b3yyNv9ykXcP0yv8ytcSqNKNTUup02FddsOsyMLqSElvELtX/rsZi09CQGNHRYwgE6yRyuozenLMAcLvOxZ8eQKkVUw3KVeu1ytCOhCpR15XYlAHQZn18dkAtmuWXzkZiKNZkxEnOJx64SAdGyazOVpT8m8hqyyfdhBW9Y6pdrMVZOhwyJv0wrDCHiOvkmtPeODK4Zc2Jv4pr6rLMPlqqunsWC8SsTMKfTZrhyZODgNt22B0LlQYJWXWJXcZlpwcw2rH3qup7TgnGs+eyFoeh562BVrNTmnABnDQTW6sqFXqlBbESr89LOsBKyW1b65VNwIy4giyf1nPGWB8AZ17y+h5YiDMuoyXVLfHIrtCsA5m8/HsupTEZJpRq7w1L9ruVxrtiFt/bHNDWw/RDuF0F/NWLpmlK7UaKghXapNJ1aTlynulmWsKm6VkLLPVFNHHTtTZNdKgli9phtLDDWXFlbw3leE4OBpzofHwqJu8KwWIehRPQ8XSFNYSeWw1DkCK7RelWBl1SA0SZpxlgzrHIVkkW6s64tslBgjtdl8z1K+1/6ICx/RAb18J/6YIqTcpUSPjvinMGpB7MJh+ESKUCsKW04GEUbDrlxaYnKTMuhVafOJgsF5pWhK0LKUgV1W04BO92jSU9YlwV1LhVbMbas9LvUJC9pZBhAprAAuwAZ4uJ612CIkMy9/opuPQjBpBtm0TWhYihbNoFkMdtnrI5IGud4cyDnGq8ChIG0H+qOy49/36dcIEszxMdaHecuKfSrEHt+boU/pTijFDCDTpvBi7wWTDdXR2aqvQwRNuzUgnm1Lrl7rUPqEZ88/X6\\/\\/PK9kMrSbljqk8VTXco1mN7BBatFq7D+QFTFN0chSLMnO+VrF5XIKiQLnI5IJvShZl8yL9E1HxFLx2usuc++ckIXpbkeIKfL4ACrgq6mDyvnaSpDTglWphmDTPFOBFaRicH0SqcS3lSJJesaL7al57iWsS8zGB8I+DO4SM2oj3qAzS5G/Qs301oRuypT2AdDn3QXaY2mc61CyTfHmy5g0Uzzdrkmrsx5vGAkRXwSVusP+yJyEqn6ZfM8CJ5dSkOoMSdhnpmhvXUgBvekpSrnyZSgaiMMLw1gYWiQZtGm7tSl7KAZHzZCqJlB7mtLyHEEv+fDrUcThc1H5qpLcWOdie5odaNDJRKRHOOPsSb9fB5Rs1gsUhEc6+Q8kyN6hgeuKMV3kRcRxrwJL3PFfJ9cPNej3CdrYH53brdfCB8gfFp6qSWbgJ1F0Dw1mwXTDYdnBn4UEPr0p97rV8Q3Iru8cblP1X5e2R2Vx99NyHSk9XQVtBDtfRqELCFN1S65a3lATnQl4CYj8rO3+qQDTPn0Io/YHdYAdlB70unhxDHOdZiuxdhO4RiXEp5sWsfBXoyMsRF0UQleQPxXD0aw7hVL6mOIRVIxDyeKWbicCyFOJHOvP4vH43zouAPuXrNkkUk+m2jgy27BRB9mXay3MoxhnNs02aESqXJvyv1PRgjSUO2QZCylUPQaVlnW9YEOhpRBsuEw6AwWNFXEJ5ZjsdiSfOumbEbB8gAG88nNIVilmIpnvnp+iayc7kJ84wYT3bLlWCoTY7bmQk91yGDWLSxRvn9BrVOCUU1lZ89s6Zcn3w3id0m5bZU/tdjNlnv5DuikBTjEOWvLpZPUpmg0qmb8syUpLIMwAGe8yFiQmfBnkWAsgUtn/W00QkYX1BVKygbEN9WIPxfVOYdljukY+PAxMVjdJBWE54AhHggEXGOxYsQaBdtpnc0QQK2KwHE0UZxlChxr0HwcAhYrZC5ydyQSuTbjsl5LKMH0t/lYXH6+MSh7WlKlhS+fnypTROD6/DC9a2e7laXoDSNjM6YmGOtUBexqro7BMj9vXOZV2vX45n55dms/rIDIJXPdMiBjWSwYmBODtvOJo6jFRfbgHJ+8Ls2lJJxbpCJMRdx4HFasq19TlX1+MnUXfWTuWtWRgHHnqbicgNBevcgLF2xTFizXBgwY8uQxa80O1owW+QCfuq6srKzIVM/T9KGBWK5C60DxNBWh5i07DJQp0mOyLPdjrGl19+B6uBAXuQWgdfOJkvRGecQ4i1pKd3cAMcxVC7xy+7l+aZjkUFqhG1NHtPi0FFUB54AxMk0yA+FUPKQLQgBZt8AjpRCyRzemSh5MrZkMpJYAZ9Z+AsMnH0BIWgQsAtqbgaEhG4bBbFaXOTUO+eCUDZZUpB7WlcJvzzTfkbdYbJMzQU1+i2yatTTGnvmsIOmCe+k03Et6XLODlsHE8Oe6kT5DwLZAMfozKl8a6A8Aupc/ylg9hwXyu+yy9XhcWnqScstKn9x5AYUrVbAbmJowxovBI4UuYuyxZMrvWx8w4M9soOKi2R759uUlMhtWcA9c7xFkorR43PW0tJj0gc4OfD+YRiJBvoJrejYMZo2Ifa+b75U5iFE4pfPs9rDK/sSWecVqVuFypDC+sjuirOHaOR4V32l56mWwUP2gc2P6unZDIfhiksNQlD9b4TL5gDiSL1N5L1s2nG7BOgD6j729vbcwhrH+htXsmZWs/tqktVeT21ZyysEnlbBSsYQ+ptUUKnEF05c3kByfPLIhJPtOp+Ygp1Zwykgb0j7oI7AXQd+ZdMMA4OvhdoJ9fX2l6RhMd0Y3zCyrxCPIqjzS2qOpeJFTJ5fNc8vKBrfUoV9bAcLFrJRZMS3vPMSV1yz2FrR0pgcbxvoVaH44A/P6cO03wLkUGBxZyxTGilnl8vK4SEmbu8zlIjV9cA2YnqNMgTGmom8ChmMFlSlwYwia8zyU6xYG0VyPPxi36LKswaUCdGor59nKfVz3ZBdt5FNYGQugyaRNdiGmO9mlKcE6f5YLbtY+JCCFYFH7MQb6y+lm2RiEVmB4PRQK3ZyOIbXkSIMwRGUfkg9mWcz8QrHUylYG/a8i+w3h3LUQlDKvLaOgcOxdYDtjy42HYvKLTf0yyW+XL6724dOWmt/MsYEuWtiDoPdguns0jhPA8Cos2IPAyzV6GRXFLLuYa+Y1vVjWKf9yHYMPdI/P53ri25lBe97hGiUo2HI+MDGwDBkfrJvctNyrhG0rsq+nt4SVYGWLlUa06YPpPoX22nM8EDD3gOs1Bx90kUF/wvftGaZelGKB5sdwz024127FQIFaD2vz8q6IKrFU+FMumJaSrn9erUPOQ5+z4Ta5uiOdYTbDatG2dSJ5eXM/51DDShDvutCvLFhCyz0WxNDd3c1XVz2e7QFW476DuOcl3Ht7TU3NsCC/BmNEBW8+GZfVjW6ZVZVaGZLeOcs+g0XVVIXfxvqXnrk8wGp/byQpp7oT6t4y7/CsmhjoRRAnHsfhG0YdrGABa4FU/gwN/E9JSYmd728wGcSK9pRSm9xzoU+aT7hkd2tqhr4YT64bz0go4Vo1wyVN1Y4hD2OYPh90xeECH8v1CDvu3QYMr+De60pLS8VcvmOT1FQPk4wyn8j8WlhkZJOzqp3YHcoqMXZin0kzqzPW4qeWU3PBnq5mIF7eFZUtULKZlU758nleWTrNOWTWIlfcEgwG94O+N1n/ynFvL+55FBg+y1dKDeWDLrNB7/kQrF83h+WRt0Jy1UKPGrt0Z8KMn5a2I0j8NlX7238iJuFEZstMvHtPJ2TbibjUBFLlloQ2GKJY+ED3+HNgOJLTGlpN77Zt2wYmjXH+ibKysqvr6uqGLX2xWwL58djMLNkKiv23tbVR+5/H8b043ZZlftLcLsIAvMQnoadMmTIgJKzeP9eccvEUtIUYwAua3DIPGSWX5tBKp6ZSbErAqVRh3McFe5ycf/9YXK20YN3rXM7lLfPITFiPpJ57wtjE0Nra2gfm3IvjpwoILPhik38qLy\\/\\/FjFYF1Gm5hd1eXFnRDYcjCGL1XPW3TTDhdptg+41432SUjIul6IXuRkeS2ymARjCh9249SaWVMzf5n190/bt263xzOVo8Jnq6urJfIIkW1A4Ho+tZXErcubMGVrXW+nGC2jKD0v3d3Cb36ObrKysTD1fCSFrC2qy/qOYbIewHOnkuqikWr7TVMU5VbuK+9TafE5cRzWl/UdgtViK4MDThTI+ZObrdw+fq8wmYF1dXcTwNDA8gOO2bOWLtOMFwPBCVVXVfPPpdKuiU2h2tyRUDY70JbQsPDEy43zJmGbMACyd6lQYXU7bEEU3+NCLsb0Hp56x/javgFksGDcfGvkm3MsPEAO46Gom+tF78/F5uBRqTT9ikgf5KgAZXGCYb+K1AfsTCPQvq62tVc9VcvLZbtPVkiJOc+04lZCP2hMqM+4M6WoRYiSRWtNGYfTCopVxWUuJXSUenIFYhmy30mc3VoOOCMNuxC2fhyXaOcKhuMnpdPIVCNXp7zOzyeDDHPYiajvDASYrusU7IHGS06dPM/b6CfjwA9DQk0/AnDm0J4xGfwGmzoHEfpUdmA9STISQmYwhKPSfBB2PgoZnOJUygjZO4Df347dPtbe3n8P2iIHkMzOtZTJR6YGguFWpoq1Pk+5wqhCsBAwxGWclWDDmNFdNqU0FwbECp1qsGNA/p+G+OwrhYhuvIWv7KcbhH7jExypkulFvTGj6uPKBGSMwMMHiE+kPpwtXQTFYpjccYuODnz+FJbuZrobgxtuSWbW+o6ODQeUvcfxdyfLkSq52jPeArcX+nwiUF/HdYOkYzBeIOGzD40sz/afAJfXClcuKAYJxClr/XUNBRjtwfKvO34MP94EP7onkgylcwMDnH+5Gn/sz3T+qNxyyrolGNyNgnhwOh5cYS31lvN4GbQaS9PVnz57VAeoJnPt7kjeatoyN8307YQWWA0NdJgymENEaxJODu3qCXRtZjSkNw1Fo/UMQrl+NYhZqyLQf2t0KPtiAYSVLccRQrCePsmFgWQgKQuH6Hdzifbi0L9tvRvUCOouQbeLMLKzJMq6DZwGT67GL5TJNbeEcHJhC5rDSzfce/HCkliu9TWM7Dma8DwgzwaDZXGYyXhiYxnd2dpI52yHU30G/L4xRuAbCFrT/HjCcRR9LgIGPvg0Uk4vNB2IAH5LAwJrdg7j8Ua7fZhKwQlyktXMu72Vq+hC0ZyHNNIP/sQC0/BMEVVuhSwG4D3Dqh7jG6aDoWAcr7S3PM+Euv4FzX+fbbkh/sTCwum1gYMzIV7L/GNd25coSR4mLHfKR/e+53e6LjZfCFI0PnALibhRS/xXXnkabXfleLT+qt0xnIgK/WYj9SzCZdwJUJV9MxuCZxcCRmGxmfdQUBsH082BQB7Tzv1kjwr5vrAzJ8Z58L74zLvtr0Hud8Z4FtY8GAy0W6ecOwdrEeA9tvIZ+OtNDiWJaGbTViL5uQ1/3AMP00fLBXJ1i4QPXETE0edScMSnkv68UU8BMa8bnEm8GmNshbNNprhkXcKc2cerGePonNW+WTKqdmk7B4s6VDzh3FANFoXoB+15arYn4Rwz4rMXplej7Kzj+DOj15cJgrvfPgIGzC2/jGpOR9diPpTNlnARMhTn4nIv9OtD5BT7bCgy2QvnA+Vpi4Hec6wCGZ3HL07h/t/WB4I9DwAbe3IdTdSBsOY6vBJiLcW6m8fiV3TDnqRpfatOMyVz+v5+3AeR3OOZrMVtwLTaR/6vIgmMSdi4VvxC3XY1ra3C+3KA/HYNmYOC6+R3Y1+P773HL0fTi6QQJmNkPJ2Lr6V1A0xXgwyXAMZ/JgIkjnQ9cbo6dxeuNOM\\/\\/ScAXLXPZeSgTHz4uAbMOng/HXE1ayocx+dJeptec8pDU/yGiyziN6yf50hJqCJerZPqnThMsYNY+y7EHQHsljqfzhTDY+Tic01i7dQa/Pc5/imX8Iy9OricyZdUTLGAD10C7h3zAJ/8tDstMdVQigw9cHtTNN0TyH5MZfOET2aH08S+6gH2yfbIVe7N/MgSfbOO5/b8AAwDCB5vdkkgX5QAAAABJRU5ErkJggg==\\');height:50px;width:50px;height: 30px;width: 30px;background-size: cover;\"></div></a></li><li><a onclick=\"window.MI_logUsage(\\'share\\');\" href=\"https://www.facebook.com/sharer/sharer.php?u={0}\" target=\"_blank\"><div style=\"background-image: url(\\'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAJgAAAAxCAYAAAAm0WAHAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyZpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNS1jMDIxIDc5LjE1NTc3MiwgMjAxNC8wMS8xMy0xOTo0NDowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENDIDIwMTQgKFdpbmRvd3MpIiB4bXBNTTpJbnN0YW5jZUlEPSJ4bXAuaWlkOjQxOTgzOUY2RjMxMjExRTQ4RDc1QkNENzc1ODE3OTkzIiB4bXBNTTpEb2N1bWVudElEPSJ4bXAuZGlkOjQxOTgzOUY3RjMxMjExRTQ4RDc1QkNENzc1ODE3OTkzIj4gPHhtcE1NOkRlcml2ZWRGcm9tIHN0UmVmOmluc3RhbmNlSUQ9InhtcC5paWQ6NDE5ODM5RjRGMzEyMTFFNDhENzVCQ0Q3NzU4MTc5OTMiIHN0UmVmOmRvY3VtZW50SUQ9InhtcC5kaWQ6NDE5ODM5RjVGMzEyMTFFNDhENzVCQ0Q3NzU4MTc5OTMiLz4gPC9yZGY6RGVzY3JpcHRpb24+IDwvcmRmOlJERj4gPC94OnhtcG1ldGE+IDw/eHBhY2tldCBlbmQ9InIiPz5SFpoiAAAe+klEQVR42uxdeXBd1Xn/3r5ptWTJki3bsrzbeMcOm9kNCRCghKWEpFkIkFCSIaShpO1MOmkzmTZJZ2hT2gYCTKCUBEiAYQlJiMHYGLzIeMEL3hfJkmWt7+nt9/b3O+9e6erpbZKeRP7gzly9d5d3zvc73/6dc69suq7LJ9sn23htTuvB1q1bh91gs9nUJwUx/Tt3fjeE1I5Pv9Pp9GiaVm232+fgegP2MlzzYI/gei/2E7j+Ea6fSSQScVwPsUmzLeun2ddoNyuN5rFJL/ofhgv0uHE+gHM+fDZgb8K1GuwB/hx7GNfasB9OJpNHcD6Iz5jD4YhiF3wfMjbmZu0/34axKQgb6TfbtY6b0Qb54MZxJe6bjWszsFfikg97HOf7sJ8y+HAauGM43497EtYxs46XFZOF50O2VatW5Raw0WwgshSdVbnd7ktcLtfl+Gzw+Xx+bAGPx1OFcyUgzIl74gASjEQiZ/v7+0PhcDgUi8WOx+PxN/D5Du7pRHPBQphQzI0DBQy1GOhG0H416L0In9WBQMAGDCX4Xg5m+XHdhvtCwNANDB2hUKgPO5XkEATrZXwewPU+MunjsBTo2wcs5aD3PNB7JXDMBP0VwFECPkzCuVIoAZU/ST5Eo9Eu8gF7GONPIVuPzzfQRjuwdheLLptVEkdiwQiGVgrE3+H1ei+cNGlSTXl5eYNpGXIJikXT9J6enqOdnZ1nIHBvg3FP4/Qh/LZvIiwY+p+OcxeB/i9DKeYDQ3lpaWnJSDBAuPq6u7v3dHV1HQGGV4HhDfyuA8zUJsKCUbBwOB0YbgGGSysrK6dWVFQ04rqrUAz87O3tPQ0+dEDgtkL4nkS7u4Dh7Fgt2IgFDJ/U5EUAdCcEal1NTc10AAtkIz4b49M3MKevvb39CIC+ju+PY4D2WYWjmAIG+ivw/XJguB8YzgGGMiiKjBUDLNq+tra2Hfj8FQTtLTCoc7wEjG1BuGcAw19CKW6ora2dDYtVNVYMoDsOPrSAD+vx/RGcasYemxABo0/HoF1fUlLyjbq6usUA5hurlUnvJ4ittbX1g76+vv/AAL6O893FFDC0uRAYvlVWVnbzlClTKoFFiowhCav8ITC8AUEjg45QboopYLRacHlr4f6+CQxroCRVxeYDaE8Cw0cQtJ/DfT6DMWsdjYA5vv/97w8ctLS0ZO0QoKbBvz8ETblv6tSp82C1XByMYmWhJtGwJG4wn8nBCpjqSQC3ly5zLAJmYczlaP9hMOX6+vp6H7RfxgGDHWNTCwwLOGbA0A2hbgEdyUIELB8taHMS4qu7Jk+e/O1p06adxxhrnPhgBwYma6uBoRF82IPvZ3P9FmM6OgEDgFno8IcNDQ13ANgkSDPdpIxHQM522T4sSyX6XIKYoA6JwA701TMGAbOj3RsgUD8BU5ZVV1ebMdi4YYAQ+MCgucBSB5ffDwzH0Gd8LAKGdmswJn8DBb8bit7kYKA3vnwQ8MFHPgDDAgjaDmBoK6qAoSP6+X+bPn365xBAuoplivMNMgcNlsCDvhfAXE8Bg7aNVMhMAYMFUcIFDHMQAGc18eOAwQkLMwPCVg9F6TRKG4nRCBj4MBmM/h6U/CtVVVXVRllo3DFwAx8E4zcLGBaDD1uAob1QAbPnkeI6gPpHaMxnwRjbRDAm3VQjvvDA6twEOh4CPVNMocm0Z8FwMX77I2BoRFvyMWBwQzE/hZj1TsRN5+PYWYhSWHdgKIOQ3gMG3gE+VNANZ8JgU78vwp6BD7DGgjG8CGP5E9Azu9AxyGXBAjCRd8EU3w2XwqKdbaKr/hYNouWkBjFt3jmCWtNsYPgvYFgCrZ9Q4UrD4ASGabFYzA9X02zU/AoSMP4WbulahCYPINutS7dcvMdhZ9nCpoQDCMdMM9tSlRp9aEBPS4atCR7FgXPvo+/+fBYslzZdgCzxHjAmkJ5tfhxCBjoqkWDe29XVtR1Cs6GAtLscv2W2uJrCNRGuPY+79CK5uA6pfysys382Sxj5SgewFnOA4X4IV2O6cFEIYglN3j0UleYTUekMaaKNESN/7oSALZnmlsvn+yXggQXVh/CBGebnwYf3cO6plBgWOFVkAVUPaf1baD7jh4JrM+PJINBhAz1zwKAHsB+CVrfkYg7inbWIG74EzRe4pqJiSHcjYoyylbcmKeY5IzMrAYarYMk2AsNLwJDIhQE0l+M390IwVwK/3YqBVqsjmJRfbw3J+gNhOYPv0bguYw33dcPVbjkakbMQ2C9+qlQJsm4IGQN/CHsF6H8QgrYNGD4ckYChESYn1yFeWeP3+9X8WrYBVma82MJkTt+k6QXSZGY0jAXWIptZi3ueRf96lsp0DTDcj3ClJBcGu0G/lqG/jK7DZinWGsJjM4Ifm6TaG0KLan+wbWIA/SyI3goGvYNT7Xms3gpgvga724qB3cSTurywPSTPbe+TKWVOuf3cEplR5VR0jMWG8fd7W+Pywo6gvLm3X5ZMdcuqmR5JaAMzF8IxhXwsAh9uxvG/gM7wSASsnloDU+jLpr0caFhmSeJPsZ0O23Y6UnFFUhueOoOuir6+vq8jlnkL2tOaScBw36XAcMmkSZNy9kX3wnFzoz/2m0vITOE6dCYmGw9F5MOWuHT1J0GnTaZWOGXldLec1+SVUo9djnclZPPhiFT67bKm0SvlPru1bQ8swHLEk+vAoGezlS44FQcMrHdNS3ftDtC792RcNoOOxmqX3HdpuSyod4vLXoTxR9uL6hNyuCMu+07HZXdLVM5t9AwTfo4t+PA17M9hXPYUJGCsDeHmCyGhMwFuWNxlWq7jZxPyxt6wbD8Wld6INqDBY/f9CBTBrEvne+XCJp/4XDZJ6kOBwe1xEvocMGcZTrVmyNrKYb2+AK23cfonU9zFGOODk1F5ZkufnA3q8hcr/HLlAr/qP5HBk/J8BM7s1V1BefGDfmnvTSrFshtZ10kI1DaMxe8/DMu0SofsAPM7Q0l1/Uwf3Mx5JaJrKYxUEtDPuuI1wPAKmunKEos1IkxZg92ZiQ9toKEHY3/D8oAsbXAb5Ri9KC6kMmCX2TUu2XkyJn1hfRhzSY/b7SaOWijKlTg+gP7jeQUM5o6rB26B+SvJlHGRMc0nYvLohl45BAn3QWUcNsOuFgFbBPvulpjsPhWT/dCev4L/D3iZpg+9D66vFIHyTYhlNkApgmnNzEDMdQnT6kwYyBwqxfPbg7LpYFS8EOLH3ukTN7BdPM+rrGciMZiLOVQgLbg/JP/7fhDfdZlb65KL53plXo0b8V1KwDZ8FFEM2Qu6fW4b3JZDWnuSsr8tBiFOSoV/iBVzAEMTrPB8uM3NVldv0OwChhtwz+SMma9uuHVmdi6Oj54xrBhWMrCLsrgDAqPTS+hDPAUvJSCoVCoxs9Is2TfG2NHT03ML3P3/cdlPXgFDI5Oh/RdwqUom4k73poLK/W1xaLxPPrPYJ1PKnUOC2bEEzgS2A0wiM1/bHZZaxBY3nxtQA2hlAOhzQhHWxePxKq7JspKJ61eBObglkLEfFwZ456moHDyTUBnSjcsC8v7RqDz8Zq/0RjW5ArjK6NKSqcGny9gE4fltc0gF0Z9Z7Jfb15RIbaljICBeOMUl58/yyvr9ETkIxVuDmKWtNyGPbQzKYfSzCwpzyXyfam8gxS0vn9fe3n4NlKQZzIlYvQgwBIDhWk4D5YqVVPyoFTb2KUXRlVuPJwdDkQCUgUqWyaOY/WSLEWHBbKBzBZUae34Bg3AthQtymstV0v0+XeIe+OR6CNW6hT5ZMsOT0qZkMSZZsaOPGmg+0+1H3uqV5uNRuXiORyaDmUO0DDdDwLwwzyz4HbM0w4WClzAItS7ISy8tH4OL7+7XEL845dolfhVj/DsEjH0ebI/L9UsD0gBX5/c5pA+u7l3EOi3dSbkMrvtWCHxdhSNl5XQj6wLtFNZPn+MDQ3xyoisJoY1AQRyI2eJyFP2l0kpricFeBuaQfpdhvK34piJrrMjEh9FsFK6+qC6v7+qXV7C3wlD43HbEiDa5CS523UK/uJ3DY9789TI7a2M6+HAuaN4ixqR+riB/NRfZZTTLGKDWngTciy4h+Iyn3gsqjVyO4JZmN54YfYmP40jLchZa/4e9EcQ5IaVdFDS6GbqbRFpxkYsa4SZXI6Z5yyy84rsXTFuaLfYytxBcZBT0VpU41MCumOGW+68oV5je3BeW945EYaG9ctFsr7LadHulPpucN8sj06ocEosOTW5UbGUwMpFMTY+safSoOKkzZJeZyO50y4S0pXA5Gcwp4wpTy6ICMm4FrJffPM4UJw2Otm5pN4viYoA3HwrLk5uDKuFYWOdW3iIU11Q2qumGsuiD5Qizfd1oONt4AoMXhmkNXP0TOAzms2CLYBlc2dZh0bTGIVQcsAPQ9B/9rkduWxWAW/EiMMTAx0cuZE57ijH7WmPyXHM/3ExUKsDMagSaHAQKbqYNljYAOhdwKoZhg3GaaSOzL8m6lgz88rqYOUKroSwUCBK9qN4p37myTF7bE5ZNsFi/aQ7Lb3b0K4acDWoyY5JDWS7+PhtGWoBU9qvJq3Dx247H5Y41AbhMt7J4GZjDhKQJse8pi4A58H0+VwMXKyuPQiGOdSakP6aDHp98bkUA2DVV5yrxpDLoQes1Mg4y2IdCLGQhOa+A4aZZLEpmnlJRFSrFkE8j9uLl57b3yyNv9ykXcP0yv8ytcSqNKNTUup02FddsOsyMLqSElvELtX/rsZi09CQGNHRYwgE6yRyuozenLMAcLvOxZ8eQKkVUw3KVeu1ytCOhCpR15XYlAHQZn18dkAtmuWXzkZiKNZkxEnOJx64SAdGyazOVpT8m8hqyyfdhBW9Y6pdrMVZOhwyJv0wrDCHiOvkmtPeODK4Zc2Jv4pr6rLMPlqqunsWC8SsTMKfTZrhyZODgNt22B0LlQYJWXWJXcZlpwcw2rH3qup7TgnGs+eyFoeh562BVrNTmnABnDQTW6sqFXqlBbESr89LOsBKyW1b65VNwIy4giyf1nPGWB8AZ17y+h5YiDMuoyXVLfHIrtCsA5m8/HsupTEZJpRq7w1L9ruVxrtiFt/bHNDWw/RDuF0F/NWLpmlK7UaKghXapNJ1aTlynulmWsKm6VkLLPVFNHHTtTZNdKgli9phtLDDWXFlbw3leE4OBpzofHwqJu8KwWIehRPQ8XSFNYSeWw1DkCK7RelWBl1SA0SZpxlgzrHIVkkW6s64tslBgjtdl8z1K+1/6ICx/RAb18J/6YIqTcpUSPjvinMGpB7MJh+ESKUCsKW04GEUbDrlxaYnKTMuhVafOJgsF5pWhK0LKUgV1W04BO92jSU9YlwV1LhVbMbas9LvUJC9pZBhAprAAuwAZ4uJ612CIkMy9/opuPQjBpBtm0TWhYihbNoFkMdtnrI5IGud4cyDnGq8ChIG0H+qOy49/36dcIEszxMdaHecuKfSrEHt+boU/pTijFDCDTpvBi7wWTDdXR2aqvQwRNuzUgnm1Lrl7rUPqEZ88/X6\\/\\/PK9kMrSbljqk8VTXco1mN7BBatFq7D+QFTFN0chSLMnO+VrF5XIKiQLnI5IJvShZl8yL9E1HxFLx2usuc++ckIXpbkeIKfL4ACrgq6mDyvnaSpDTglWphmDTPFOBFaRicH0SqcS3lSJJesaL7al57iWsS8zGB8I+DO4SM2oj3qAzS5G/Qs301oRuypT2AdDn3QXaY2mc61CyTfHmy5g0Uzzdrkmrsx5vGAkRXwSVusP+yJyEqn6ZfM8CJ5dSkOoMSdhnpmhvXUgBvekpSrnyZSgaiMMLw1gYWiQZtGm7tSl7KAZHzZCqJlB7mtLyHEEv+fDrUcThc1H5qpLcWOdie5odaNDJRKRHOOPsSb9fB5Rs1gsUhEc6+Q8kyN6hgeuKMV3kRcRxrwJL3PFfJ9cPNej3CdrYH53brdfCB8gfFp6qSWbgJ1F0Dw1mwXTDYdnBn4UEPr0p97rV8Q3Iru8cblP1X5e2R2Vx99NyHSk9XQVtBDtfRqELCFN1S65a3lATnQl4CYj8rO3+qQDTPn0Io/YHdYAdlB70unhxDHOdZiuxdhO4RiXEp5sWsfBXoyMsRF0UQleQPxXD0aw7hVL6mOIRVIxDyeKWbicCyFOJHOvP4vH43zouAPuXrNkkUk+m2jgy27BRB9mXay3MoxhnNs02aESqXJvyv1PRgjSUO2QZCylUPQaVlnW9YEOhpRBsuEw6AwWNFXEJ5ZjsdiSfOumbEbB8gAG88nNIVilmIpnvnp+iayc7kJ84wYT3bLlWCoTY7bmQk91yGDWLSxRvn9BrVOCUU1lZ89s6Zcn3w3id0m5bZU/tdjNlnv5DuikBTjEOWvLpZPUpmg0qmb8syUpLIMwAGe8yFiQmfBnkWAsgUtn/W00QkYX1BVKygbEN9WIPxfVOYdljukY+PAxMVjdJBWE54AhHggEXGOxYsQaBdtpnc0QQK2KwHE0UZxlChxr0HwcAhYrZC5ydyQSuTbjsl5LKMH0t/lYXH6+MSh7WlKlhS+fnypTROD6/DC9a2e7laXoDSNjM6YmGOtUBexqro7BMj9vXOZV2vX45n55dms/rIDIJXPdMiBjWSwYmBODtvOJo6jFRfbgHJ+8Ls2lJJxbpCJMRdx4HFasq19TlX1+MnUXfWTuWtWRgHHnqbicgNBevcgLF2xTFizXBgwY8uQxa80O1owW+QCfuq6srKzIVM/T9KGBWK5C60DxNBWh5i07DJQp0mOyLPdjrGl19+B6uBAXuQWgdfOJkvRGecQ4i1pKd3cAMcxVC7xy+7l+aZjkUFqhG1NHtPi0FFUB54AxMk0yA+FUPKQLQgBZt8AjpRCyRzemSh5MrZkMpJYAZ9Z+AsMnH0BIWgQsAtqbgaEhG4bBbFaXOTUO+eCUDZZUpB7WlcJvzzTfkbdYbJMzQU1+i2yatTTGnvmsIOmCe+k03Et6XLODlsHE8Oe6kT5DwLZAMfozKl8a6A8Aupc/ylg9hwXyu+yy9XhcWnqScstKn9x5AYUrVbAbmJowxovBI4UuYuyxZMrvWx8w4M9soOKi2R759uUlMhtWcA9c7xFkorR43PW0tJj0gc4OfD+YRiJBvoJrejYMZo2Ifa+b75U5iFE4pfPs9rDK/sSWecVqVuFypDC+sjuirOHaOR4V32l56mWwUP2gc2P6unZDIfhiksNQlD9b4TL5gDiSL1N5L1s2nG7BOgD6j729vbcwhrH+htXsmZWs/tqktVeT21ZyysEnlbBSsYQ+ptUUKnEF05c3kByfPLIhJPtOp+Ygp1Zwykgb0j7oI7AXQd+ZdMMA4OvhdoJ9fX2l6RhMd0Y3zCyrxCPIqjzS2qOpeJFTJ5fNc8vKBrfUoV9bAcLFrJRZMS3vPMSV1yz2FrR0pgcbxvoVaH44A/P6cO03wLkUGBxZyxTGilnl8vK4SEmbu8zlIjV9cA2YnqNMgTGmom8ChmMFlSlwYwia8zyU6xYG0VyPPxi36LKswaUCdGor59nKfVz3ZBdt5FNYGQugyaRNdiGmO9mlKcE6f5YLbtY+JCCFYFH7MQb6y+lm2RiEVmB4PRQK3ZyOIbXkSIMwRGUfkg9mWcz8QrHUylYG/a8i+w3h3LUQlDKvLaOgcOxdYDtjy42HYvKLTf0yyW+XL6724dOWmt/MsYEuWtiDoPdguns0jhPA8Cos2IPAyzV6GRXFLLuYa+Y1vVjWKf9yHYMPdI/P53ri25lBe97hGiUo2HI+MDGwDBkfrJvctNyrhG0rsq+nt4SVYGWLlUa06YPpPoX22nM8EDD3gOs1Bx90kUF/wvftGaZelGKB5sdwz024127FQIFaD2vz8q6IKrFU+FMumJaSrn9erUPOQ5+z4Ta5uiOdYTbDatG2dSJ5eXM/51DDShDvutCvLFhCyz0WxNDd3c1XVz2e7QFW476DuOcl3Ht7TU3NsCC/BmNEBW8+GZfVjW6ZVZVaGZLeOcs+g0XVVIXfxvqXnrk8wGp/byQpp7oT6t4y7/CsmhjoRRAnHsfhG0YdrGABa4FU/gwN/E9JSYmd728wGcSK9pRSm9xzoU+aT7hkd2tqhr4YT64bz0go4Vo1wyVN1Y4hD2OYPh90xeECH8v1CDvu3QYMr+De60pLS8VcvmOT1FQPk4wyn8j8WlhkZJOzqp3YHcoqMXZin0kzqzPW4qeWU3PBnq5mIF7eFZUtULKZlU758nleWTrNOWTWIlfcEgwG94O+N1n/ynFvL+55FBg+y1dKDeWDLrNB7/kQrF83h+WRt0Jy1UKPGrt0Z8KMn5a2I0j8NlX7238iJuFEZstMvHtPJ2TbibjUBFLlloQ2GKJY+ED3+HNgOJLTGlpN77Zt2wYmjXH+ibKysqvr6uqGLX2xWwL58djMLNkKiv23tbVR+5/H8b043ZZlftLcLsIAvMQnoadMmTIgJKzeP9eccvEUtIUYwAua3DIPGSWX5tBKp6ZSbErAqVRh3McFe5ycf/9YXK20YN3rXM7lLfPITFiPpJ57wtjE0Nra2gfm3IvjpwoILPhik38qLy\\/\\/FjFYF1Gm5hd1eXFnRDYcjCGL1XPW3TTDhdptg+41432SUjIul6IXuRkeS2ymARjCh9249SaWVMzf5n190/bt263xzOVo8Jnq6urJfIIkW1A4Ho+tZXErcubMGVrXW+nGC2jKD0v3d3Cb36ObrKysTD1fCSFrC2qy/qOYbIewHOnkuqikWr7TVMU5VbuK+9TafE5cRzWl/UdgtViK4MDThTI+ZObrdw+fq8wmYF1dXcTwNDA8gOO2bOWLtOMFwPBCVVXVfPPpdKuiU2h2tyRUDY70JbQsPDEy43zJmGbMACyd6lQYXU7bEEU3+NCLsb0Hp56x/javgFksGDcfGvkm3MsPEAO46Gom+tF78/F5uBRqTT9ikgf5KgAZXGCYb+K1AfsTCPQvq62tVc9VcvLZbtPVkiJOc+04lZCP2hMqM+4M6WoRYiSRWtNGYfTCopVxWUuJXSUenIFYhmy30mc3VoOOCMNuxC2fhyXaOcKhuMnpdPIVCNXp7zOzyeDDHPYiajvDASYrusU7IHGS06dPM/b6CfjwA9DQk0/AnDm0J4xGfwGmzoHEfpUdmA9STISQmYwhKPSfBB2PgoZnOJUygjZO4Df347dPtbe3n8P2iIHkMzOtZTJR6YGguFWpoq1Pk+5wqhCsBAwxGWclWDDmNFdNqU0FwbECp1qsGNA/p+G+OwrhYhuvIWv7KcbhH7jExypkulFvTGj6uPKBGSMwMMHiE+kPpwtXQTFYpjccYuODnz+FJbuZrobgxtuSWbW+o6ODQeUvcfxdyfLkSq52jPeArcX+nwiUF/HdYOkYzBeIOGzD40sz/afAJfXClcuKAYJxClr/XUNBRjtwfKvO34MP94EP7onkgylcwMDnH+5Gn/sz3T+qNxyyrolGNyNgnhwOh5cYS31lvN4GbQaS9PVnz57VAeoJnPt7kjeatoyN8307YQWWA0NdJgymENEaxJODu3qCXRtZjSkNw1Fo/UMQrl+NYhZqyLQf2t0KPtiAYSVLccRQrCePsmFgWQgKQuH6Hdzifbi0L9tvRvUCOouQbeLMLKzJMq6DZwGT67GL5TJNbeEcHJhC5rDSzfce/HCkliu9TWM7Dma8DwgzwaDZXGYyXhiYxnd2dpI52yHU30G/L4xRuAbCFrT/HjCcRR9LgIGPvg0Uk4vNB2IAH5LAwJrdg7j8Ua7fZhKwQlyktXMu72Vq+hC0ZyHNNIP/sQC0/BMEVVuhSwG4D3Dqh7jG6aDoWAcr7S3PM+Euv4FzX+fbbkh/sTCwum1gYMzIV7L/GNd25coSR4mLHfKR/e+53e6LjZfCFI0PnALibhRS/xXXnkabXfleLT+qt0xnIgK/WYj9SzCZdwJUJV9MxuCZxcCRmGxmfdQUBsH082BQB7Tzv1kjwr5vrAzJ8Z58L74zLvtr0Hud8Z4FtY8GAy0W6ecOwdrEeA9tvIZ+OtNDiWJaGbTViL5uQ1/3AMP00fLBXJ1i4QPXETE0edScMSnkv68UU8BMa8bnEm8GmNshbNNprhkXcKc2cerGePonNW+WTKqdmk7B4s6VDzh3FANFoXoB+15arYn4Rwz4rMXplej7Kzj+DOj15cJgrvfPgIGzC2/jGpOR9diPpTNlnARMhTn4nIv9OtD5BT7bCgy2QvnA+Vpi4Hec6wCGZ3HL07h/t/WB4I9DwAbe3IdTdSBsOY6vBJiLcW6m8fiV3TDnqRpfatOMyVz+v5+3AeR3OOZrMVtwLTaR/6vIgmMSdi4VvxC3XY1ra3C+3KA/HYNmYOC6+R3Y1+P773HL0fTi6QQJmNkPJ2Lr6V1A0xXgwyXAMZ/JgIkjnQ9cbo6dxeuNOM\\/\\/ScAXLXPZeSgTHz4uAbMOng/HXE1ayocx+dJeptec8pDU/yGiyziN6yf50hJqCJerZPqnThMsYNY+y7EHQHsljqfzhTDY+Tic01i7dQa/Pc5/imX8Iy9OricyZdUTLGAD10C7h3zAJ/8tDstMdVQigw9cHtTNN0TyH5MZfOET2aH08S+6gH2yfbIVe7N/MgSfbOO5/b8AAwDCB5vdkkgX5QAAAABJRU5ErkJggg==\\');height:50px;width:50px;height: 30px;width: 30px;background-size: cover;background-position-x: 32px;;background-position: 32px;\"></div></a></li><li><a onclick=\"window.MI_logUsage(\\'share\\');\" href=\"https://twitter.com/intent/tweet?source={0}&text={1}: {0}\" target=\"_blank\" title=\"Tweet\"><div style=\"background-image: url(\\'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAJgAAAAxCAYAAAAm0WAHAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyZpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNS1jMDIxIDc5LjE1NTc3MiwgMjAxNC8wMS8xMy0xOTo0NDowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENDIDIwMTQgKFdpbmRvd3MpIiB4bXBNTTpJbnN0YW5jZUlEPSJ4bXAuaWlkOjQxOTgzOUY2RjMxMjExRTQ4RDc1QkNENzc1ODE3OTkzIiB4bXBNTTpEb2N1bWVudElEPSJ4bXAuZGlkOjQxOTgzOUY3RjMxMjExRTQ4RDc1QkNENzc1ODE3OTkzIj4gPHhtcE1NOkRlcml2ZWRGcm9tIHN0UmVmOmluc3RhbmNlSUQ9InhtcC5paWQ6NDE5ODM5RjRGMzEyMTFFNDhENzVCQ0Q3NzU4MTc5OTMiIHN0UmVmOmRvY3VtZW50SUQ9InhtcC5kaWQ6NDE5ODM5RjVGMzEyMTFFNDhENzVCQ0Q3NzU4MTc5OTMiLz4gPC9yZGY6RGVzY3JpcHRpb24+IDwvcmRmOlJERj4gPC94OnhtcG1ldGE+IDw/eHBhY2tldCBlbmQ9InIiPz5SFpoiAAAe+klEQVR42uxdeXBd1Xn/3r5ptWTJki3bsrzbeMcOm9kNCRCghKWEpFkIkFCSIaShpO1MOmkzmTZJZ2hT2gYCTKCUBEiAYQlJiMHYGLzIeMEL3hfJkmWt7+nt9/b3O+9e6erpbZKeRP7gzly9d5d3zvc73/6dc69suq7LJ9sn23htTuvB1q1bh91gs9nUJwUx/Tt3fjeE1I5Pv9Pp9GiaVm232+fgegP2MlzzYI/gei/2E7j+Ea6fSSQScVwPsUmzLeun2ddoNyuN5rFJL/ofhgv0uHE+gHM+fDZgb8K1GuwB/hx7GNfasB9OJpNHcD6Iz5jD4YhiF3wfMjbmZu0/34axKQgb6TfbtY6b0Qb54MZxJe6bjWszsFfikg97HOf7sJ8y+HAauGM43497EtYxs46XFZOF50O2VatW5Raw0WwgshSdVbnd7ktcLtfl+Gzw+Xx+bAGPx1OFcyUgzIl74gASjEQiZ/v7+0PhcDgUi8WOx+PxN/D5Du7pRHPBQphQzI0DBQy1GOhG0H416L0In9WBQMAGDCX4Xg5m+XHdhvtCwNANDB2hUKgPO5XkEATrZXwewPU+MunjsBTo2wcs5aD3PNB7JXDMBP0VwFECPkzCuVIoAZU/ST5Eo9Eu8gF7GONPIVuPzzfQRjuwdheLLptVEkdiwQiGVgrE3+H1ei+cNGlSTXl5eYNpGXIJikXT9J6enqOdnZ1nIHBvg3FP4/Qh/LZvIiwY+p+OcxeB/i9DKeYDQ3lpaWnJSDBAuPq6u7v3dHV1HQGGV4HhDfyuA8zUJsKCUbBwOB0YbgGGSysrK6dWVFQ04rqrUAz87O3tPQ0+dEDgtkL4nkS7u4Dh7Fgt2IgFDJ/U5EUAdCcEal1NTc10AAtkIz4b49M3MKevvb39CIC+ju+PY4D2WYWjmAIG+ivw/XJguB8YzgGGMiiKjBUDLNq+tra2Hfj8FQTtLTCoc7wEjG1BuGcAw19CKW6ora2dDYtVNVYMoDsOPrSAD+vx/RGcasYemxABo0/HoF1fUlLyjbq6usUA5hurlUnvJ4ittbX1g76+vv/AAL6O893FFDC0uRAYvlVWVnbzlClTKoFFiowhCav8ITC8AUEjg45QboopYLRacHlr4f6+CQxroCRVxeYDaE8Cw0cQtJ/DfT6DMWsdjYA5vv/97w8ctLS0ZO0QoKbBvz8ETblv6tSp82C1XByMYmWhJtGwJG4wn8nBCpjqSQC3ly5zLAJmYczlaP9hMOX6+vp6H7RfxgGDHWNTCwwLOGbA0A2hbgEdyUIELB8taHMS4qu7Jk+e/O1p06adxxhrnPhgBwYma6uBoRF82IPvZ3P9FmM6OgEDgFno8IcNDQ13ANgkSDPdpIxHQM522T4sSyX6XIKYoA6JwA701TMGAbOj3RsgUD8BU5ZVV1ebMdi4YYAQ+MCgucBSB5ffDwzH0Gd8LAKGdmswJn8DBb8bit7kYKA3vnwQ8MFHPgDDAgjaDmBoK6qAoSP6+X+bPn365xBAuoplivMNMgcNlsCDvhfAXE8Bg7aNVMhMAYMFUcIFDHMQAGc18eOAwQkLMwPCVg9F6TRKG4nRCBj4MBmM/h6U/CtVVVXVRllo3DFwAx8E4zcLGBaDD1uAob1QAbPnkeI6gPpHaMxnwRjbRDAm3VQjvvDA6twEOh4CPVNMocm0Z8FwMX77I2BoRFvyMWBwQzE/hZj1TsRN5+PYWYhSWHdgKIOQ3gMG3gE+VNANZ8JgU78vwp6BD7DGgjG8CGP5E9Azu9AxyGXBAjCRd8EU3w2XwqKdbaKr/hYNouWkBjFt3jmCWtNsYPgvYFgCrZ9Q4UrD4ASGabFYzA9X02zU/AoSMP4WbulahCYPINutS7dcvMdhZ9nCpoQDCMdMM9tSlRp9aEBPS4atCR7FgXPvo+/+fBYslzZdgCzxHjAmkJ5tfhxCBjoqkWDe29XVtR1Cs6GAtLscv2W2uJrCNRGuPY+79CK5uA6pfysys382Sxj5SgewFnOA4X4IV2O6cFEIYglN3j0UleYTUekMaaKNESN/7oSALZnmlsvn+yXggQXVh/CBGebnwYf3cO6plBgWOFVkAVUPaf1baD7jh4JrM+PJINBhAz1zwKAHsB+CVrfkYg7inbWIG74EzRe4pqJiSHcjYoyylbcmKeY5IzMrAYarYMk2AsNLwJDIhQE0l+M390IwVwK/3YqBVqsjmJRfbw3J+gNhOYPv0bguYw33dcPVbjkakbMQ2C9+qlQJsm4IGQN/CHsF6H8QgrYNGD4ckYChESYn1yFeWeP3+9X8WrYBVma82MJkTt+k6QXSZGY0jAXWIptZi3ueRf96lsp0DTDcj3ClJBcGu0G/lqG/jK7DZinWGsJjM4Ifm6TaG0KLan+wbWIA/SyI3goGvYNT7Xms3gpgvga724qB3cSTurywPSTPbe+TKWVOuf3cEplR5VR0jMWG8fd7W+Pywo6gvLm3X5ZMdcuqmR5JaAMzF8IxhXwsAh9uxvG/gM7wSASsnloDU+jLpr0caFhmSeJPsZ0O23Y6UnFFUhueOoOuir6+vq8jlnkL2tOaScBw36XAcMmkSZNy9kX3wnFzoz/2m0vITOE6dCYmGw9F5MOWuHT1J0GnTaZWOGXldLec1+SVUo9djnclZPPhiFT67bKm0SvlPru1bQ8swHLEk+vAoGezlS44FQcMrHdNS3ftDtC792RcNoOOxmqX3HdpuSyod4vLXoTxR9uL6hNyuCMu+07HZXdLVM5t9AwTfo4t+PA17M9hXPYUJGCsDeHmCyGhMwFuWNxlWq7jZxPyxt6wbD8Wld6INqDBY/f9CBTBrEvne+XCJp/4XDZJ6kOBwe1xEvocMGcZTrVmyNrKYb2+AK23cfonU9zFGOODk1F5ZkufnA3q8hcr/HLlAr/qP5HBk/J8BM7s1V1BefGDfmnvTSrFshtZ10kI1DaMxe8/DMu0SofsAPM7Q0l1/Uwf3Mx5JaJrKYxUEtDPuuI1wPAKmunKEos1IkxZg92ZiQ9toKEHY3/D8oAsbXAb5Ri9KC6kMmCX2TUu2XkyJn1hfRhzSY/b7SaOWijKlTg+gP7jeQUM5o6rB26B+SvJlHGRMc0nYvLohl45BAn3QWUcNsOuFgFbBPvulpjsPhWT/dCev4L/D3iZpg+9D66vFIHyTYhlNkApgmnNzEDMdQnT6kwYyBwqxfPbg7LpYFS8EOLH3ukTN7BdPM+rrGciMZiLOVQgLbg/JP/7fhDfdZlb65KL53plXo0b8V1KwDZ8FFEM2Qu6fW4b3JZDWnuSsr8tBiFOSoV/iBVzAEMTrPB8uM3NVldv0OwChhtwz+SMma9uuHVmdi6Oj54xrBhWMrCLsrgDAqPTS+hDPAUvJSCoVCoxs9Is2TfG2NHT03ML3P3/cdlPXgFDI5Oh/RdwqUom4k73poLK/W1xaLxPPrPYJ1PKnUOC2bEEzgS2A0wiM1/bHZZaxBY3nxtQA2hlAOhzQhHWxePxKq7JspKJ61eBObglkLEfFwZ456moHDyTUBnSjcsC8v7RqDz8Zq/0RjW5ArjK6NKSqcGny9gE4fltc0gF0Z9Z7Jfb15RIbaljICBeOMUl58/yyvr9ETkIxVuDmKWtNyGPbQzKYfSzCwpzyXyfam8gxS0vn9fe3n4NlKQZzIlYvQgwBIDhWk4D5YqVVPyoFTb2KUXRlVuPJwdDkQCUgUqWyaOY/WSLEWHBbKBzBZUae34Bg3AthQtymstV0v0+XeIe+OR6CNW6hT5ZMsOT0qZkMSZZsaOPGmg+0+1H3uqV5uNRuXiORyaDmUO0DDdDwLwwzyz4HbM0w4WClzAItS7ISy8tH4OL7+7XEL845dolfhVj/DsEjH0ebI/L9UsD0gBX5/c5pA+u7l3EOi3dSbkMrvtWCHxdhSNl5XQj6wLtFNZPn+MDQ3xyoisJoY1AQRyI2eJyFP2l0kpricFeBuaQfpdhvK34piJrrMjEh9FsFK6+qC6v7+qXV7C3wlD43HbEiDa5CS523UK/uJ3DY9789TI7a2M6+HAuaN4ixqR+riB/NRfZZTTLGKDWngTciy4h+Iyn3gsqjVyO4JZmN54YfYmP40jLchZa/4e9EcQ5IaVdFDS6GbqbRFpxkYsa4SZXI6Z5yyy84rsXTFuaLfYytxBcZBT0VpU41MCumOGW+68oV5je3BeW945EYaG9ctFsr7LadHulPpucN8sj06ocEosOTW5UbGUwMpFMTY+safSoOKkzZJeZyO50y4S0pXA5Gcwp4wpTy6ICMm4FrJffPM4UJw2Otm5pN4viYoA3HwrLk5uDKuFYWOdW3iIU11Q2qumGsuiD5Qizfd1oONt4AoMXhmkNXP0TOAzms2CLYBlc2dZh0bTGIVQcsAPQ9B/9rkduWxWAW/EiMMTAx0cuZE57ijH7WmPyXHM/3ExUKsDMagSaHAQKbqYNljYAOhdwKoZhg3GaaSOzL8m6lgz88rqYOUKroSwUCBK9qN4p37myTF7bE5ZNsFi/aQ7Lb3b0K4acDWoyY5JDWS7+PhtGWoBU9qvJq3Dx247H5Y41AbhMt7J4GZjDhKQJse8pi4A58H0+VwMXKyuPQiGOdSakP6aDHp98bkUA2DVV5yrxpDLoQes1Mg4y2IdCLGQhOa+A4aZZLEpmnlJRFSrFkE8j9uLl57b3yyNv9ykXcP0yv8ytcSqNKNTUup02FddsOsyMLqSElvELtX/rsZi09CQGNHRYwgE6yRyuozenLMAcLvOxZ8eQKkVUw3KVeu1ytCOhCpR15XYlAHQZn18dkAtmuWXzkZiKNZkxEnOJx64SAdGyazOVpT8m8hqyyfdhBW9Y6pdrMVZOhwyJv0wrDCHiOvkmtPeODK4Zc2Jv4pr6rLMPlqqunsWC8SsTMKfTZrhyZODgNt22B0LlQYJWXWJXcZlpwcw2rH3qup7TgnGs+eyFoeh562BVrNTmnABnDQTW6sqFXqlBbESr89LOsBKyW1b65VNwIy4giyf1nPGWB8AZ17y+h5YiDMuoyXVLfHIrtCsA5m8/HsupTEZJpRq7w1L9ruVxrtiFt/bHNDWw/RDuF0F/NWLpmlK7UaKghXapNJ1aTlynulmWsKm6VkLLPVFNHHTtTZNdKgli9phtLDDWXFlbw3leE4OBpzofHwqJu8KwWIehRPQ8XSFNYSeWw1DkCK7RelWBl1SA0SZpxlgzrHIVkkW6s64tslBgjtdl8z1K+1/6ICx/RAb18J/6YIqTcpUSPjvinMGpB7MJh+ESKUCsKW04GEUbDrlxaYnKTMuhVafOJgsF5pWhK0LKUgV1W04BO92jSU9YlwV1LhVbMbas9LvUJC9pZBhAprAAuwAZ4uJ612CIkMy9/opuPQjBpBtm0TWhYihbNoFkMdtnrI5IGud4cyDnGq8ChIG0H+qOy49/36dcIEszxMdaHecuKfSrEHt+boU/pTijFDCDTpvBi7wWTDdXR2aqvQwRNuzUgnm1Lrl7rUPqEZ88/X6\\/\\/PK9kMrSbljqk8VTXco1mN7BBatFq7D+QFTFN0chSLMnO+VrF5XIKiQLnI5IJvShZl8yL9E1HxFLx2usuc++ckIXpbkeIKfL4ACrgq6mDyvnaSpDTglWphmDTPFOBFaRicH0SqcS3lSJJesaL7al57iWsS8zGB8I+DO4SM2oj3qAzS5G/Qs301oRuypT2AdDn3QXaY2mc61CyTfHmy5g0Uzzdrkmrsx5vGAkRXwSVusP+yJyEqn6ZfM8CJ5dSkOoMSdhnpmhvXUgBvekpSrnyZSgaiMMLw1gYWiQZtGm7tSl7KAZHzZCqJlB7mtLyHEEv+fDrUcThc1H5qpLcWOdie5odaNDJRKRHOOPsSb9fB5Rs1gsUhEc6+Q8kyN6hgeuKMV3kRcRxrwJL3PFfJ9cPNej3CdrYH53brdfCB8gfFp6qSWbgJ1F0Dw1mwXTDYdnBn4UEPr0p97rV8Q3Iru8cblP1X5e2R2Vx99NyHSk9XQVtBDtfRqELCFN1S65a3lATnQl4CYj8rO3+qQDTPn0Io/YHdYAdlB70unhxDHOdZiuxdhO4RiXEp5sWsfBXoyMsRF0UQleQPxXD0aw7hVL6mOIRVIxDyeKWbicCyFOJHOvP4vH43zouAPuXrNkkUk+m2jgy27BRB9mXay3MoxhnNs02aESqXJvyv1PRgjSUO2QZCylUPQaVlnW9YEOhpRBsuEw6AwWNFXEJ5ZjsdiSfOumbEbB8gAG88nNIVilmIpnvnp+iayc7kJ84wYT3bLlWCoTY7bmQk91yGDWLSxRvn9BrVOCUU1lZ89s6Zcn3w3id0m5bZU/tdjNlnv5DuikBTjEOWvLpZPUpmg0qmb8syUpLIMwAGe8yFiQmfBnkWAsgUtn/W00QkYX1BVKygbEN9WIPxfVOYdljukY+PAxMVjdJBWE54AhHggEXGOxYsQaBdtpnc0QQK2KwHE0UZxlChxr0HwcAhYrZC5ydyQSuTbjsl5LKMH0t/lYXH6+MSh7WlKlhS+fnypTROD6/DC9a2e7laXoDSNjM6YmGOtUBexqro7BMj9vXOZV2vX45n55dms/rIDIJXPdMiBjWSwYmBODtvOJo6jFRfbgHJ+8Ls2lJJxbpCJMRdx4HFasq19TlX1+MnUXfWTuWtWRgHHnqbicgNBevcgLF2xTFizXBgwY8uQxa80O1owW+QCfuq6srKzIVM/T9KGBWK5C60DxNBWh5i07DJQp0mOyLPdjrGl19+B6uBAXuQWgdfOJkvRGecQ4i1pKd3cAMcxVC7xy+7l+aZjkUFqhG1NHtPi0FFUB54AxMk0yA+FUPKQLQgBZt8AjpRCyRzemSh5MrZkMpJYAZ9Z+AsMnH0BIWgQsAtqbgaEhG4bBbFaXOTUO+eCUDZZUpB7WlcJvzzTfkbdYbJMzQU1+i2yatTTGnvmsIOmCe+k03Et6XLODlsHE8Oe6kT5DwLZAMfozKl8a6A8Aupc/ylg9hwXyu+yy9XhcWnqScstKn9x5AYUrVbAbmJowxovBI4UuYuyxZMrvWx8w4M9soOKi2R759uUlMhtWcA9c7xFkorR43PW0tJj0gc4OfD+YRiJBvoJrejYMZo2Ifa+b75U5iFE4pfPs9rDK/sSWecVqVuFypDC+sjuirOHaOR4V32l56mWwUP2gc2P6unZDIfhiksNQlD9b4TL5gDiSL1N5L1s2nG7BOgD6j729vbcwhrH+htXsmZWs/tqktVeT21ZyysEnlbBSsYQ+ptUUKnEF05c3kByfPLIhJPtOp+Ygp1Zwykgb0j7oI7AXQd+ZdMMA4OvhdoJ9fX2l6RhMd0Y3zCyrxCPIqjzS2qOpeJFTJ5fNc8vKBrfUoV9bAcLFrJRZMS3vPMSV1yz2FrR0pgcbxvoVaH44A/P6cO03wLkUGBxZyxTGilnl8vK4SEmbu8zlIjV9cA2YnqNMgTGmom8ChmMFlSlwYwia8zyU6xYG0VyPPxi36LKswaUCdGor59nKfVz3ZBdt5FNYGQugyaRNdiGmO9mlKcE6f5YLbtY+JCCFYFH7MQb6y+lm2RiEVmB4PRQK3ZyOIbXkSIMwRGUfkg9mWcz8QrHUylYG/a8i+w3h3LUQlDKvLaOgcOxdYDtjy42HYvKLTf0yyW+XL6724dOWmt/MsYEuWtiDoPdguns0jhPA8Cos2IPAyzV6GRXFLLuYa+Y1vVjWKf9yHYMPdI/P53ri25lBe97hGiUo2HI+MDGwDBkfrJvctNyrhG0rsq+nt4SVYGWLlUa06YPpPoX22nM8EDD3gOs1Bx90kUF/wvftGaZelGKB5sdwz024127FQIFaD2vz8q6IKrFU+FMumJaSrn9erUPOQ5+z4Ta5uiOdYTbDatG2dSJ5eXM/51DDShDvutCvLFhCyz0WxNDd3c1XVz2e7QFW476DuOcl3Ht7TU3NsCC/BmNEBW8+GZfVjW6ZVZVaGZLeOcs+g0XVVIXfxvqXnrk8wGp/byQpp7oT6t4y7/CsmhjoRRAnHsfhG0YdrGABa4FU/gwN/E9JSYmd728wGcSK9pRSm9xzoU+aT7hkd2tqhr4YT64bz0go4Vo1wyVN1Y4hD2OYPh90xeECH8v1CDvu3QYMr+De60pLS8VcvmOT1FQPk4wyn8j8WlhkZJOzqp3YHcoqMXZin0kzqzPW4qeWU3PBnq5mIF7eFZUtULKZlU758nleWTrNOWTWIlfcEgwG94O+N1n/ynFvL+55FBg+y1dKDeWDLrNB7/kQrF83h+WRt0Jy1UKPGrt0Z8KMn5a2I0j8NlX7238iJuFEZstMvHtPJ2TbibjUBFLlloQ2GKJY+ED3+HNgOJLTGlpN77Zt2wYmjXH+ibKysqvr6uqGLX2xWwL58djMLNkKiv23tbVR+5/H8b043ZZlftLcLsIAvMQnoadMmTIgJKzeP9eccvEUtIUYwAua3DIPGSWX5tBKp6ZSbErAqVRh3McFe5ycf/9YXK20YN3rXM7lLfPITFiPpJ57wtjE0Nra2gfm3IvjpwoILPhik38qLy//FjFYF1Gm5hd1eXFnRDYcjCGL1XPW3TTDhdptg+41432SUjIul6IXuRkeS2ymARjCh9249SaWVMzf5n190/bt263xzOVo8Jnq6urJfIIkW1A4Ho+tZXErcubMGVrXW+nGC2jKD0v3d3Cb36ObrKysTD1fCSFrC2qy/qOYbIewHOnkuqikWr7TVMU5VbuK+9TafE5cRzWl/UdgtViK4MDThTI+ZObrdw+fq8wmYF1dXcTwNDA8gOO2bOWLtOMFwPBCVVXVfPPpdKuiU2h2tyRUDY70JbQsPDEy43zJmGbMACyd6lQYXU7bEEU3+NCLsb0Hp56x/javgFksGDcfGvkm3MsPEAO46Gom+tF78/F5uBRqTT9ikgf5KgAZXGCYb+K1AfsTCPQvq62tVc9VcvLZbtPVkiJOc+04lZCP2hMqM+4M6WoRYiSRWtNGYfTCopVxWUuJXSUenIFYhmy30mc3VoOOCMNuxC2fhyXaOcKhuMnpdPIVCNXp7zOzyeDDHPYiajvDASYrusU7IHGS06dPM/b6CfjwA9DQk0/AnDm0J4xGfwGmzoHEfpUdmA9STISQmYwhKPSfBB2PgoZnOJUygjZO4Df347dPtbe3n8P2iIHkMzOtZTJR6YGguFWpoq1Pk+5wqhCsBAwxGWclWDDmNFdNqU0FwbECp1qsGNA/p+G+OwrhYhuvIWv7KcbhH7jExypkulFvTGj6uPKBGSMwMMHiE+kPpwtXQTFYpjccYuODnz+FJbuZrobgxtuSWbW+o6ODQeUvcfxdyfLkSq52jPeArcX+nwiUF/HdYOkYzBeIOGzD40sz/afAJfXClcuKAYJxClr/XUNBRjtwfKvO34MP94EP7onkgylcwMDnH+5Gn/sz3T+qNxyyrolGNyNgnhwOh5cYS31lvN4GbQaS9PVnz57VAeoJnPt7kjeatoyN8307YQWWA0NdJgymENEaxJODu3qCXRtZjSkNw1Fo/UMQrl+NYhZqyLQf2t0KPtiAYSVLccRQrCePsmFgWQgKQuH6Hdzifbi0L9tvRvUCOouQbeLMLKzJMq6DZwGT67GL5TJNbeEcHJhC5rDSzfce/HCkliu9TWM7Dma8DwgzwaDZXGYyXhiYxnd2dpI52yHU30G/L4xRuAbCFrT/HjCcRR9LgIGPvg0Uk4vNB2IAH5LAwJrdg7j8Ua7fZhKwQlyktXMu72Vq+hC0ZyHNNIP/sQC0/BMEVVuhSwG4D3Dqh7jG6aDoWAcr7S3PM+Euv4FzX+fbbkh/sTCwum1gYMzIV7L/GNd25coSR4mLHfKR/e+53e6LjZfCFI0PnALibhRS/xXXnkabXfleLT+qt0xnIgK/WYj9SzCZdwJUJV9MxuCZxcCRmGxmfdQUBsH082BQB7Tzv1kjwr5vrAzJ8Z58L74zLvtr0Hud8Z4FtY8GAy0W6ecOwdrEeA9tvIZ+OtNDiWJaGbTViL5uQ1/3AMP00fLBXJ1i4QPXETE0edScMSnkv68UU8BMa8bnEm8GmNshbNNprhkXcKc2cerGePonNW+WTKqdmk7B4s6VDzh3FANFoXoB+15arYn4Rwz4rMXplej7Kzj+DOj15cJgrvfPgIGzC2/jGpOR9diPpTNlnARMhTn4nIv9OtD5BT7bCgy2QvnA+Vpi4Hec6wCGZ3HL07h/t/WB4I9DwAbe3IdTdSBsOY6vBJiLcW6m8fiV3TDnqRpfatOMyVz+v5+3AeR3OOZrMVtwLTaR/6vIgmMSdi4VvxC3XY1ra3C+3KA/HYNmYOC6+R3Y1+P773HL0fTi6QQJmNkPJ2Lr6V1A0xXgwyXAMZ/JgIkjnQ9cbo6dxeuNOM//ScAXLXPZeSgTHz4uAbMOng/HXE1ayocx+dJeptec8pDU/yGiyziN6yf50hJqCJerZPqnThMsYNY+y7EHQHsljqfzhTDY+Tic01i7dQa/Pc5/imX8Iy9OricyZdUTLGAD10C7h3zAJ/8tDstMdVQigw9cHtTNN0TyH5MZfOET2aH08S+6gH2yfbIVe7N/MgSfbOO5/b8AAwDCB5vdkkgX5QAAAABJRU5ErkJggg==\\');height:50px;width:50px;height: 30px;width: 30px;background-size: cover;background-position-x: 62px;;background-position: 62px;\"></div></a></li><li style=\"display:none;\"><a onclick=\"window.MI_logUsage(\\'share\\');\" href=\"http://pinterest.com/pin/create/button/?url={0}&description={2}\" target=\"_blank\" title=\"Pin it\"><img onload=\"this.style.opacity=1;this.style.top=0;\" src=\"//d34p6saz4aff9q.cloudfront.net/images/footer/Pinterest.png\" style=\"opacity:0\"></a></li><li><a onclick=\"window.MI_logUsage(\\'share\\');\" href=\"https://plus.google.com/share?url={0}\" target=\"_blank\" title=\"Share on Google+\"><div style=\"background-image: url(\\'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABcAAAAXCAYAAADgKtSgAAAD4klEQVRIDY1VzW8bVRD/7Xq9teOPtElDHdlupSIFKEqUhH5AI7WNBCeQuHAqlEPpASHgyA3hf4ALHwckGoFAHBGIA5zapoiCEUpCEiGFUlHJTkCyiePEXjter5f5rf2CWTuBkcZvPB+/eW/evFkNB9DKysrpVqt1NRgMpoWPmqYZbzQa27ZtF4Vzuq7PjY+P/3QARK9pYWHh4urq6s2trS2r2Wy6kqCHqaedfsvLyxd7UfpolpaW5jY3N7ccx3H/L5dKpS2Je0/gtD6QnkpbXFyctyzLVqDcHWWu/8XVatVmfF9wZqaDkKuYgJQVsJL3szOeJ1cJvGOwZslk8stYLDaoaRpc120fpSMXKi6+Xqnim18sWLstDEUCuDQWxotPROH3LwttbGw8OzExMa8TRW49Q2DKCljJ9wpNfPhtGU+eCuOtZ44gFtLx+MmQB6x8uJIYG4/HB4nH/zrbLZFInKOhH3/24w6OxXWMCo89YGD2oRBurdWwXXMY37MZ6ohHXF0u7KVIJBKm0k8szh9lB9v1dpmY/NSoCdtxhQFpUQ/890IDdrPlhVNHPL4P3TCMlKpbz87FcSIZxJ17dayXbC94s+rgsROHcHjgn677JFv1EhJYUSAQSBt8eQTdjy6fjcBquPjo+yoSUppyzcXLF6KsB37O28je30Wu1MT17yowDQ3XZiIeFHF1Pmm1Y2q7E1GOmBpen43itdkYbqzVpTuAqNn2G4poePiYgXBQw5isjyQML55xUpG4wVmhAP2rSrZebuFPqX3ysIHbd+vSijounxmQ/wGPF+UEMydNhCSJInkb24Y8iKJS+Ffe0adZC6zkmeMmXrkQwY1fd/HFkoUTR3TMPChHELp2fgBmgN3WPhHvkLiGdEuOF0GFnz7+wcLquo23nxvcGxpXzoZR3HGwLHoFfshoR6qTE4+40u/6XKVSqdHg55truwgEJGnHRgj6JAYDOD7Urq/SdcfKGKgRV+c8LhaLWeWkVjq/8VQUf1UcvHPLwt2C43XF7d8aqNstzI4F6er1uid0/RQKhSxxvecvQBnZfdnv/OhoAJmnY9ipO3jzqx28P1+FIRHPnw4jJKVQfc1VMXGk3hli7RWa0yyVSl2R/uxUkOZ/E0+jHhwtSlb3JaDNfD7/weTk5KuevTtcvkDz6XT6vPS+l8AP1u3rlwmcy+XuTE9PXxKb9yr3dt5x5gfj3ZGRkRdkPuyNX7Wz/ZLJBZalzp9PTU1d7U7qB/dsnW9iZnh4+FwoFArLzXfHeDITyVerJp9ENkOG89vv1BdcOXFscmrKEEoJH+WT5ssTXVE4L7rrB339/wYDDxkPEF5efgAAAABJRU5ErkJggg==\\'); background-size: 29px;width:30px;height:30px;background-repeat: no-repeat;\"></div></a></li></ul></div>',\n callForActions: '<tr><td><div id=\"cfa\" style=\"white-space:nowrap;border-top: solid 1px #c5c5c5 !important;padding-left:0;\"><div onclick=\"alert(\\'call to add to favorites\\')\" style=\"cursor:pointer;border-radius: 7px;height: 27px;width: 187px;margin:5px;MARGIN-LEFT:0;display: inline-block;text-align: center;box-shadow: inset 0 -9px 37px -10px silver;vertical-align: middle;padding-top: 8px;border: 1px solid rgba(0,0,0,0.2);color: grey;\">Add to favorites</div><div onclick=\"alert(\\'call to book\\')\" style=\"cursor:pointer;border-radius: 7px;height: 27px;width: 187px;margin:5px;display: inline-block;text-align: center;box-shadow: inset 0 -9px 37px -10px rgb(3, 179, 12);vertical-align: middle;padding-top: 8px;border: 1px solid rgba(0,0,0,0.2);color: white;margin-left: 1px;background-color: rgb(161, 218, 101);\">BOOK</div></div></td></tr>'\n },\n header: {\n header: '<table align=\"left\" class=\"mi_reset mi_greenredtitle\"><tr><td class=\"mi_header_caption@@@gaugeOrientation\" style=\"padding:0 !important;\">' +\n '<div class=\"mi_drag_area\" style=\"position: absolute;width: 100%;height:125px;left:0;z-index: 2\"></div>' +\n '<div class=\"mi_green_close@@@gaugeOrientation\" onclick=\"jQuery.MidasInsight.hidePanel(\\'@@@kfid\\');\" style=\"z-index:3;\"></div>'\n // score gauge\n +\n '<div class=\"mi_gradselectroot @@@gaugeOrientation\" id=\"mi_gradselectroot_@@@kfid\" data-score=\"@@@grade\" style=\"left:123px;top:-48px;\"><div class=\"mi_gradeselect\" id=\"mi_gradeselect_@@@kfid\"></div></div>' +\n '<div class=\"mi_title\" style=\"@@@titleOrientation;margin-top:40px;width:240px;float: left;height:38px\" >@@@displayText</div>' +\n '<div style=\"float:left !important;\" class=\"mi_subtitle\" >@@@count</div>' +\n '<div class=\"mi_preview_images\" style=\"z-index:3;width: 100px;height: 75px;border: 1px solid #ababab;position: absolute;right: 18px;top: 33px;padding: 1px 3px 3px 1px;cursor: pointer; cursor: hand;\" onclick=\"jQuery.MidasInsight.MI_GetPhotos(\\'@@@kfid\\',false);\"><div style=\"border: 1px solid #ababab;width:100%;height:100%;background-image:url(@@@previewimgsrc); background-size: cover;\"></div></div>'\n\n // tools tabs\n +\n '<div style=\"clear:both;height:0px;margin-bottom:0px;border-top:0px solid #DBDBDB!important;\"></div>' +\n '</td></tr>',\n footer: '</table>'\n }\n },\n scrollables: {\n header: '<div style=\"clear:both;height: px;margin-bottom:0px;border-top:1px solid #DBDBDB\"></div><div id=\"mipct_scroll_@@@kfid\" tabindex=\"-1\" style=\"heightdummy:0;outline:none;max-height:auto;\" class=\"mi_scroll\">' +\n '<table align=\"left\" id=\"mipct_tbldefault_@@@kfid\" class=\"mi_results mi_scrolledcontent\">',\n footer: '</table></div>'\n },\n socialItem: {\n timelineItem: '<div class=\"mi_timeline\">@@@fullYear<br/>@@@month<br/>@@@date</div>',\n nonTimelineItem: '<img onerror=\"jQuery.MidasInsight.HandleMissingImage(\\'avatar\\',this)\" src=\"@@@itemImageURL\" valign=\"top\" class=\"mi_resultimage\">',\n youtubeItem: '<div style=\"position:relative;\"><div class=\\\"MI_SourceIcon MI_@@@sourceSite\\\" mi_data-tooltip=\\\"@@@sourceSite\\\"></div><table align=\"left\" class=\"mi_resultcontainer\" style=\"direction:ltr!important;cursor:default;\"><tr><td rowspan=\"4\" valign=\"top\" style=\"padding-right:15px;padding-left:3px;width: 65px;\"><div style=\"position:relative;height: 100%;display: block;\">' +\n '@@@sourceAvatar' +\n '</div></td><th style=\"vertical-align: middle;\" align=\"left\"><div class=\"mi_resultpublisher\">@@@itemPublisher<span class=\"mi_resulttimeago\">@@@timeAgo' +\n '</div></span></th></tr><tr><td style=\"padding-right:30px;\">' +\n '</td></tr><tr><td colspan=\"2\"><div style=\"padding-right:10px;overflow:hidden;position:relative;max-width: 275px;\"><img src=\"https://i.ytimg.com/vi/@@@sourceURL/mqdefault.jpg\" style=\"max-width: @@@itemWidth ;min-width:185px;margin-top: 15px;margin-bottom: 15px;box-shadow: 0px 0 10px 4px #eee;border-radius: 5px;display:inline;\"/><img src=\"//d34p6saz4aff9q.cloudfront.net/images/playvideow.png\" style=\"position:absolute;cursor: pointer;left: 50%!important;margin-top: 20%;display:inline;margin-left: -30px;\" onclick=\"window.MI_logUsage(\\'play_video\\',\\'@@@baseid\\');@@@click\" onerror=\"this.style.display=\\'none\\';\"/></div>' +\n '</div></td></tr></table></div>',\n lightboxYoutubeItem: '<div style=\"position:relative;\"><div class=\\\"MI_SourceIcon MI_@@@sourceSite\\\" mi_data-tooltip=\\\"@@@sourceSite\\\"></div><table align=\"left\" class=\"mi_resultcontainer\" style=\"direction:ltr!important;cursor:default;\"><tr><td rowspan=\"4\" valign=\"top\" style=\"padding-right:15px;padding-left:3px;width: 65px;\"><div style=\"position:relative;height: 100%;display: block;\">' +\n '@@@sourceAvatar' +\n '</div></td><th style=\"vertical-align: middle;\" align=\"left\"><div class=\"mi_resultpublisher\" style=\"color:#838383;\">@@@itemPublisher<span class=\"mi_resulttimeago\" itemDate=\"@@@itemDate\">@@@timeAgo' +\n '</span></div></th></tr><tr><td style=\"padding-right:30px;\"></td></tr>' +\n '<tr><td colspan=\"2\" onclick=\"@@@click\" style=\"cursor: pointer; cursor: hand;\"><div style=\"padding-right:10px;overflow:hidden;position:relative;max-width: 275px;\"><div id=\"#mi_image_lightbox_@@@ksid\" onclick=\" jQuery(mi_image_lightbox_@@@ksid).fadeIn();\"><img src=\"https://i.ytimg.com/vi/@@@sourceURL/mqdefault.jpg\" style=\"max-width: @@@itemWidth ;min-width:185px;margin-top: 15px;margin-bottom: 15px;box-shadow: 0px 0 10px 4px #eee;float: right;border-radius: 5px;display:inline;\"/><img src=\"//d34p6saz4aff9q.cloudfront.net/images/playvideow.png\" style=\"position:absolute;cursor: pointer;left: 50%!important;margin-top: 20%;display:inline;margin-left: -30px;\" onclick=\"window.MI_logUsage(\\'play_video\\',\\'@@@baseid\\');@@@click\" onerror=\"this.style.display=\\'none\\';\"/></div><div class=\"mi_lightbox\" id=\"mi_image_lightbox_@@@ksid\" onclick=\"jQuery.MidasInsight.StopYoutubeVideo(jQuery(\\'#mi_image_lightbox_@@@ksid iframe\\')[0]);jQuery(this).fadeOut();\"><iframe width=\"560\" height=\"315\" src=\"https://www.youtube.com/embed/@@@youtubeid?enablejsapi=1\" frameborder=\"0\" allowfullscreen></iframe></a></div>' +\n '</td></tr></table></div>',\n lightboxVimeoItem: '<div style=\"position:relative;\"><div class=\\\"MI_SourceIcon MI_@@@sourceSite\\\" mi_data-tooltip=\\\"@@@sourceSite\\\"></div><table align=\"left\" class=\"mi_resultcontainer\" style=\"direction:ltr!important;cursor:default;\"><tr><td rowspan=\"4\" valign=\"top\" style=\"padding-right:15px;padding-left:3px;width: 65px;\"><div style=\"position:relative;height: 100%;display: block;\">' +\n '@@@sourceAvatar' +\n '</div></td><th style=\"vertical-align: middle;\" align=\"left\"><div class=\"mi_resultpublisher\" style=\"color:#838383;\">@@@itemPublisher<span class=\"mi_resulttimeago\" itemDate=\"@@@itemDate\">@@@timeAgo' +\n '</span></div></th></tr><tr><td style=\"padding-right:30px;\"></td></tr>' +\n '<tr><td colspan=\"2\" onclick=\"@@@click\" style=\"cursor: pointer; cursor: hand;\"><div style=\"padding-right:10px;overflow:hidden;position:relative;max-width: 275px;\"><div id=\"#mi_image_lightbox_@@@ksid\" onclick=\" jQuery(mi_image_lightbox_@@@ksid).fadeIn();jQuery(\\'#mi_iframe_lightbox_@@@ksid\\').attr(\\'src\\',jQuery(\\'#mi_iframe_lightbox_@@@ksid\\').attr(\\'data-src\\'));\"><img src=\"@@@itemContentImageURL\" style=\"max-width: @@@itemWidth ;min-width:185px;margin-top: 15px;margin-bottom: 15px;nbox-shadow: 0px 0 10px 4px #eee;float: right!important;border-radius: 2px;display:inline;\"/><img src=\"//d34p6saz4aff9q.cloudfront.net/images/playvideow.png\" style=\"position:absolute;cursor: pointer;left: 50%!important;margin-top: 20%;display:inline;margin-left: -30px;\" nonclick=\"window.MI_logUsage(\\'play_video\\',\\'@@@baseid\\');@@@click\" onerror=\"this.style.display=\\'none\\';\"/></div><div class=\"mi_lightbox\" id=\"mi_image_lightbox_@@@ksid\" onclick=\"jQuery(\\'#mi_iframe_lightbox_@@@ksid\\').attr(\\'src\\',\\'\\');jQuery(this).fadeOut();\"><iframe id=\"mi_iframe_lightbox_@@@ksid\" data-src=\"@@@sourceURL?autoplay=1&title=0&byline=0&portrait=0\" width=\"500\" height=\"281\" frameborder=\"0\" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe></a></div>' +\n '</td></tr></table></div>',\n normalItem: '<div style=\"position:relative;\">@@@metaicon<table align=\"left\" class=\"mi_resultcontainer\" @@@cond onclick=\"@@@click\"><tr><td rowspan=\"4\" valign=\"top\" style=\"padding-right:15px;padding-left:3px;width: 65px;\"><div style=\"position:relative;height: 100%;display:block;\">' +\n '@@@item' +\n '</div></td><th style=\"vertical-align: middle;\" align=\"left\"><div class=\"mi_resultpublisher\">@@@itempublisher<span class=\"mi_resulttimeago\"> @@@timeago' +\n '</div></span></th></tr><tr><td style=\"padding-right:30px;\"><div class=\"mi_resulttext\">@@@itemtext',\n instagramItem: '<div style=\"position:relative;\">@@@metaicon<table align=\"left\" class=\"mi_resultcontainer\" @@@cond onclick=\"@@@click\"><tr><td rowspan=\"4\" valign=\"top\" style=\"padding-right:15px;padding-left:3px;width: 65px;\"><div style=\"position:relative;height: 100%;display:block;\">' +\n '@@@item' +\n '</div></td><th style=\"vertical-align: middle;\" align=\"left\"><div class=\"mi_resultpublisher\" style=\"color:#838383;\">@@@itempublisher<span class=\"mi_resulttimeago\"> @@@timeago' +\n '</div></span></th></tr><tr><td style=\"padding-right:30px;\"><div class=\"mi_resulttext\">',\n itemContentImage: '</td></tr><tr><td colspan=\"2\"><div style=\"padding-right:10px;overflow:hidden;\"><img onload=\"if (!jQuery.MidasInsight.imageIsGood(this)) jQuery.MidasInsight.HandleMissingImage(\\'preview\\',this);\" onerror=\"jQuery.MidasInsight.HandleMissingImage(\\'preview\\',this);\" src=\"@@@itemcontentimage\" style=\"max-width: 275px;margin-top: 0px;margin-bottom: 15px;box-shadow: 0px 0 10px 4px #eee;float: right;border-radius: 5px;\"/></div>',\n lightboxContentImage: '</td></tr><tr><td colspan=\"2\"><div style=\"padding-right:10px;overflow:hidden;\"><div id=\"#mi_image_lightbox_@@@ksid\" onclick=\" jQuery(mi_image_lightbox_@@@ksid).fadeIn();\"><img src=\"@@@itemcontentimage\" style=\"max-width: 275px;margin-top: 0px;margin-bottom: 15px;box-shadow: 0px 0 10px 4px #eee;float: right;border-radius: 5px;\"></div><div class=\"mi_lightbox\" id=\"mi_image_lightbox_@@@ksid\" onclick=\"jQuery(this).fadeOut();\"><img src=\"@@@itemcontentimage\" style=\"nbox-shadow: 0px 0 10px 4px #eee;border-radius: 5px;\" onload=\"jQuery(this).css(\\'position\\', \\'relative\\').css(\\'top\\',\\'50%\\').css(\\'margin-top\\',((this.height/2)*-1)+ \\'px\\').css(\\'top\\',\\'50%\\',\\'!important\\');\"/></div></div>'\n }\n },\n RASTA: {\n panelLayout: {\n header: [\"tabs\", \"stars\"],\n content: [\"photos\", \"tags\", \"mentions\"],\n footer: [\"share\"]\n },\n panel: {\n videoholder: '<div id=\"mi_videoholder_@@@baseid\" class=\"mi_singlevideocontainer mi_closeTopLeft\" onclick=\"jQuery.MidasInsight.MI_GetPhotos(\\'@@@baseid\\',false)\" style=\"margin-top: 74px;background-position: 10px 18px;\"><div class=\"mi_singlevideo\"></div></div>',\n containerHtml: '<div style=\"padding:0px;margin-top:25px;border: 1px solid #ccc;\" class=\"mi_panelBackground mikfpanel mi_rasta\" id=\"cpcnt_@@@kfid\" style=\"direction: ltr;margin-top: 20px;@@@layout\"></div>',\n tabs: '<tr><td><div class=\"MI_tabs@@@orientation\" style=\"margin-left:0px !important;position:relative;z-index:30;box-shadow:none;left:0px;padding-top: 0 !important;\">@@@tabs</div></td></tr>',\n gauge: '<div class=\"mi_gradeselectgradbg\"></div><div class=\"mi_gradeselectmasknerrow' + (window.MI_defaults.RTL == 'true' ? ' mi_gradeselectmasknerrow_right' : '') + '\" style=\"background-image:url(\\'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAHIAAABQCAYAAADFuSFAAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAA25pVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNS1jMDIxIDc5LjE1NTc3MiwgMjAxNC8wMS8xMy0xOTo0NDowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wTU09Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9tbS8iIHhtbG5zOnN0UmVmPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvc1R5cGUvUmVzb3VyY2VSZWYjIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtcE1NOk9yaWdpbmFsRG9jdW1lbnRJRD0ieG1wLmRpZDoyODYzNTRkZS04NWY4LTg3NDEtYjNmOS02OGU4NGQzZjVjODkiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6OTM0QjUyMzEwQ0ZBMTFFNTlCQjg4NzExODFEM0Q0M0QiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6OTM0QjUyMzAwQ0ZBMTFFNTlCQjg4NzExODFEM0Q0M0QiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENDIDIwMTQgKFdpbmRvd3MpIj4gPHhtcE1NOkRlcml2ZWRGcm9tIHN0UmVmOmluc3RhbmNlSUQ9InhtcC5paWQ6RDVFOTA3RTFFN0Y4MTFFNDkzNjJGQzdDNUEyRDA1MTYiIHN0UmVmOmRvY3VtZW50SUQ9InhtcC5kaWQ6RDVFOTA3RTJFN0Y4MTFFNDkzNjJGQzdDNUEyRDA1MTYiLz4gPC9yZGY6RGVzY3JpcHRpb24+IDwvcmRmOlJERj4gPC94OnhtcG1ldGE+IDw/eHBhY2tldCBlbmQ9InIiPz5NfkuaAAAX1klEQVR42uxdCZQdVZm+99by9u7Xr1+n926ykOASgQODS5gJijIGJQxbOM4IIosKKgoHZw7icubMAcHjuI3jCHJkNI4LGcEIKuoIozKj4uAIkTBEliyd3ve313bn++tVvby8vNd53R00CXVPbqrqVdWtW/93v3+5SzWXUrIgHfuJb9u2bUk3UgMIhUIsFosx27aZoigsn8+ztrY21t7ezvbu3csikYj7e7FYdO+JRqNM13U2OzvLUqkUE0Iwx3GYqqruNpPJuFsqo1JBzt3fDMNgiUSCzc/Pu+VS+T09PfT88NDQUE9ra2tnOBweRJn9uGcFbm1HDqOeKo5t7JvIczieQN6POu+ZmZnZj3qMo05Te/bscetNdaE60jvRs6mO1e9M9bAsy30XOucTga4tFAru/ZRzuRwzTdP9vaWlhWWzWfe9qN6opys3kg29G+Xp6Wk2OTnpXr+UpI6NjS3pRno4CZQqSS9NlSchU6KKTkxMuIKnytILUiIhEPhUabqeztG9mqa55UGwFWD9RMKia6iR0D41AgiyG8c9AD4NQZ6M3AehpXC+G2V2IrdhvxW3h5AVnHewtbDNovwZlDeOMkaxP4G6TaKh7YCg96Lek7juOQjZKZVKbv0oVzcoapQEEAHoA0HnKFNDpHehhkCyoPel3+m6ubm5yrtTI6D7/Pvp/ej30dHRSlmLBtKv6KKp7FXQb5W09Y+rz/nZB6U2+/f65/2t39Jpi/KiAHc9Dl+LxnEGGtDa9evXnwChtUE4YtWqVYeUWyMQApNeNATBtSOvIQFS2dTICBwwOguARsGknbjv97j25yjnSVwz4pflM7S6/Ebnaq+r/b1aLtXyWzKQR5OepxfyWyheJo58OgC8CHlDOp0eBIApUkmkCah1L/WlqxNpDa/RxMHSNQB1DcDcDICvx/4E8mOo0w9wzU8IVLr2aPQrjhogCUAiOlrmyVBNmwDehfF4/HQSNIFH6mip2qMZ7UKJ1CJleiYBC/UaB6groSYvhSofg6r8d/z+IPKvAOZsAGQNC4mBSG+Bs/E2qLhzkdvI9r6Y4DWTiPWUyTEDqJ0A9b2w0dfB3v0c7N2GxncvLpt4SQPpMRAEFOdBWO8BcH8Bry5Knp1vK46m5IOaTCY52LkRzslGAHotWPp11PVOvMfMSwpIzwbi3flrYOs+AgA3gYkcAvqTsq/ZRE4JVL6bAegrpqamPgGWXgWG3o53uw8aZua4BbI6FgR4L+vu7r5xxYoVlwNAnQCsDjeOpUSqnzJU7xoAejdAfAfe8xNoqD/8YztEfxQJel4ox0u/H6rzxo6OjkGyOxRvLcO6MgoPORdjUvK845jcKY0rQqhPKuHO79e8m4Nrw6X8c1sY07vVUJetKOT1Ulhi9yE6WZYm9z1pvNufj4+PnwaG3osCbwGYw8cNkB6IrxwcHLwVDNwMEH2vcNFOEXhdcGxzhDvGDqnEfmUWRwt6OHU/UyLTjm0xszDCVTVSBJBmnZqwUu6Ff2Y8qjElJYWgvgKLFwoTl4RCXSkmi+uB9gZVDSepVwgNZNEql94LjTU6OTl5BfKG4eHhj+DUvccskNW9ID09PZfBntwOddpDjgy594sC0LH2AcVfAsAnpZ3dAdB+zsz5WUWNESkPfq7QkBu9EoJxJVSUTC/W0O8rdGxaBTyGeoOstbZtnYufNmpqbD3nSrpxmYcmsvOdnZ1kQ0+Exvl2Npt9NTxesp8TxxSQJBTqi8RLJMDA27q6uq6FPVQWw0KoQUMacy84kv8rVyPf49L+A3AwmYMwRQFTuHIQQLWANQKy0bXl3iNioJjDf7+Buv2NYWbaTDu7FtecpWvJ81U1erLgSnQx6pZ6nMDMG4eGhjZAHu8FmI8fE0CSQAhEbFf29/d/qa+v7xxSpeS2N2PzHLOYl1buF0wJfdopzj4GEGeZBtlJ7p5nJGxkTr0rnLrx8Cy7CFxDXveXiuMsk9Y0MIngWt2Fiq5znAx2TEZYlEEjG2t6dtYr3wO3XJYC75P/2nHsXwPUL0BUvY5T+jtVCV+kqKFWznjT7ASIrx4ZGfk+nL13Qz7bXwxHSBzJwrwO5D8D+7bDJp5DoxPNgCjNgm3O7nnAmn7mIsfIvRnS/jGEPesCV5Gv4gqdOQZz8CO35qGmE0xmfgdtOMtULQyBRZlwplEegLQLLnBkG5lTApmzwAL102z3OinnEOTvxn6CGdYwzhcAjeoBLMvthtQxNRyu5LC/y3Gsq/LF0XPmss99oWTONa0qyaRAHp1g6VZ46e/zG/1RxUjf3pA9ROs7e2BgYCtY2J1Opw8b1Eur5Nj5ifsdI/tVaRs/4lCpZOcOUn0u8+AwWTkmiFGFIfgrvYwZU0yJDjAbIgYNq+pDrFXL7KX7padS3d8Ah/S1B93joDHEWCH7NADtQ1uxXDCFsKBZ5KGKmNNAgPpYsTT1mGUXt9oh82pdS2xRlVBrM6oWskmAnf8EJ6gDzPz4kez4OCKMpPgQLW3L6tWr7zvhhBO6SZ0uWEEaebDMR6A+N8nC9F9DvA9woRvMU3menQSZSoyZc6TmGDemvcrKso2kTNe49pI3o7lrnCO6R/HsI5wkprgXUENQNJ3poTjaAFQyM8sNqUpUAo0C9pLAfHfRmH21ZRa+gvo6zfQOwdyw3t7ej4XD4c9Bg/EjxUx1uWz0QLwAhv1OVLCF+kgXMKKQvTlnZ8a+xLTY33OhFOBKukxh8oCkuevOk3ChCq0S4+F2CNUDrNJAvK1jHkBI2hqTxkrmse1gFG08wkDcaO7HwXxZhVpVZcmDnB+hqC7TbQkVjTpaMgsoFRyzKluqSORnbCnflS+MPBrVU7cgPl29UOhCLCQwIbvrx8bGVNM0byAu/MmA9EGEOj0PLNwKEGMLgkiiLWV/4uQn78DdP60A4gvGMVw2CEV3277U4KyQl0oXEPMqcvYAd8w2bFNchN8CSafxo8n19Clg78lMbQO5wxW20r5gbSwcOUnlPLQLP/436VrO1d+jjEfhxBTBqEle47i5gIKtmhJmJXuCKTzCpGu2HZQnDjhJnNlcinvyxtwvVUX/UDSUuvJwMSfkRbvXjY6OmjBLH1wuMxcNpO+Z0ig5PNM3AcSvoYXFFgovpAlbODf0HRZpoxfMsmq1S4OrYJUbhxt5nFI9Z8PL3ENQWjCWvAdt+gKwYECGUhcAi7BIntbr2j/3bZLYTdZpdQqiFp0pqtvQBpHfpKrUt9tioqzRcGjAFCLyX1Ch3+dc/lC6jK1mc9nxKdnzLKJ1sIjSwTKw1VEnDJDjFfspmf1/2L06W5zcrSmhD4e0RPhwYOJdPwBmGlCzf0type7KpYCqLhZECuipfzQSiZwCdfplBPrJBUG0rXlp5N7nZMa3KvEOvKznhBCAZpEJNY6M8EHRKPwos69aiFJ2oSWczPTkFUzRzxVaf4sbgrBYBaSluge87Fn1h/QeetYqsPIytKp9kssHHdt8yJH2DodZL1RUqVt3h4XQCKbFs+VoiPuW2/G8XE0WzKl/cBzjIU2NfRNe7+qFwCTPHsz+0Nzc3DAA/aw/k+BFB5J0PDzSPlTgqwj0B1tbGztsTnYqB3AuF5GW7QDBY1jZznFyLEyrrD7hBEhybKrjdinTQPgaxJIXAayTeaTjRe5OdG0eWbF+lanXSiV0LcDZZTvF/7ClcTfY+r8H5GC59pI83iJi1rBMMQ1xq+PaXOmGLPBuf1MycpsdWfpOLJw+qSEAYGBXVxeNd96GMGV3JpP5LkUAiwVTXQyNSZ3C84oCvLtSqdSrFgoxnKm9GXP46cuUvvXbK94oriUh8HmEiIUc4wk4MaWcx0JeBtWx07j0vTyUuJgJ/ZWMC/bHT2VQQ2p6LSq31nJyF5aY+JZpTt4Flj7N3GYoXYZKDnupcDZVepZpLM6S6uABx4YrO2fyIxcXrNnvpONr1jV6Gmk5qNkIsLgLIA7T9BLycIk0zeKjNtfrwly76HU7fRQtaBP1WDQC0Z54IWPufOQqnuoFE9UDahKaTOB1ZR7BuRat8hjJmXFiYO3l8GZv5nqs/+gZrEJkKeJdqh7/oCIi1+CHm21p/RsYOu2yD8xUuM7GzKfw4ipri6zCb+qBUEZoT41ln7oUrL6vM/HyVY2eQqMnCNs68vn8lwHeGyYnJ6eImc2O0TYNJIEGAP8KQe0NUKkHzfc8iInT+\\/PWEz++jGvqdq7pHoDCVavcQCihRplNndC+x+\\/21jhnMi18s4ilz3XDkaM0hdV2MsyfN+zMFoD0ebBy2wEbFWaWsNiY8RQL2TEW1XoqHRSqiDwxnH3yPGiX+zvjJ61tVD75HtB6r4Ine8euXbuuBZgmTS1thpUqzcVsZigKAK5G/iLUaYgKr2tDZ8cyxlM/uxye33amhbyQAWqoiHBRg0dJMXNVLwxSC+Loa0S07WbYwXZ2lE3vaJR0JXFmV+y016KFrsqZY3ccUKUaA8hs3hlGaJZnXeFXuA4QkUDl+s6x7NMX495tbZHehmqWzBVYeQUigl/Bft7tTQddvrNDdhH01trb2/+Rut4aOTeymMuZ+56+hkv7u+B52bEhVxr2kKGxiI7eKhbaFJL0iGjyDiXc8nYmjr0ZApqIK2Dk7SEluQle7tthO4fIrgIwt7/sycwDLG/Ns3Z1oNwdyEkNix2zhf2XxtTUfboWWdVI88FsKSDPbTj8z/n5+WebmUGhEp0PZxsB4NUIM95Ko/oN0rSTz7wTCH3PVaOGiZJpC5c8N44mHCrHg9xzaNTQWXB0vswUbQ1T2DGbiG0JvWejI80f4sU+5kh5v3Q7/jRydNg4HKA25QQWVtrgVUbdGFnlkScyxcnLW5WuR1RRf3CWNB5k3QFtSeHIJYZhFA7HSuX888+vrD+ozTRtHi7xIBycrwHIlnoqFXEicyaHbpWZmbulUXSHmCgm5HDNhYiXmQlbyaMJmrSK641zRKrnW6JlRR87ThKYuCKurbikYM3Bi2O/pJhy3hwFgEnWFz4VwLawCCxHRLQzjUdgquSodMQGXaPuPN6wXxasXF0oFKhL8XGSvT/vtl5WG9k7n+ZQpR9B6+imWWN1VWp29kHr+R2fYwQeqYBQsjxmWBmC8vtBHfyTrxeJ9q8zPZJmx1mKa13ihMSGT40Un2QlK/dpv5NACJ1FlRAzHaPSTxxSmGXb1j1gWgmAnVtv8IJkD3upQLXehP2HQKo9C7FS1GMiOTekUsHCNyJf3Uj9ymJ+j5ybfg+PtmR5BA6dhkaBcMON6X0Q3Q5xihPlWTyWuBcgdrDjNIWUBO+NnPpJhek3mk4BMuBljxPWlNo1dRhIZmNrUxD6TdxyHvInFxotgVlbAx/lJlrdRetUGmV1amqqrl3UdT28du3aj5MXVTdEkbJgT4x8WM5N7uehmNcfSr01BXeYqjL6YJZgE/U380Tqq1wLpdlxnjQRVQbjZ3xiqPCELDm5z/gzCfxwzakZ7cLxHWDaXyKf2igkgVa8Gp7sPXA8f9so7BP1VkhRAhO3wFM9s3qt4kEVmBx5SM5NfYOrYYQVzLONpFoR6EcSlczbe/qVvjWf46HoCvYSSWGlVT81dcmnYmrbDaZTFOXBbVZZoeYvxfOC/VnqOHcHExp04SFuD8O0fZSmlDaKKdV6MSPsZhvimOtp4Wddvew4IyjvSpFoc0OMigolF9TvibDhudpOXHQP3ArbuZa9xFJKHxSJ1IpPGoaVgyq9y++rJiBpPm/NsrpfIH8bsr6qXlk0PAhmnlMsFjfRyrBaTNwGUk+tdnV1vRW6+TTqkqvLxpnJzwDMWdg8xkNgJLEPal/OzzA5O8Xk9AQFoIzHWz7ABb+MvUSTJiJqVI/fpKiiq9rDJCD9Rb6UPb/kX4idjZxO4BEFHjQMGPZ/45xXVo6rvs6mH6nQSCQS7u3tvZ4C/3r6WGbnn7NH993LFdIY7lg+o7BDzs0QA2keBEA0mOhbdbbSlr6JvcQTGvKJGteuhJxvqx1JqlaT3lTJh2k5YV2vGFEDmLkZseXpsJWP+iD6S+XFunXrKqtpCUjo481wcE6vy0Z6+MjQN3g+t4cV4cTk8wzBJlgZYUq6iyldfdh2M5HuHlTaO79ItpoFidKtyK+rZVntMa0bYQ2mfdB5mDoN7Hs3LWOnbxLQMnxitvvdgoGBAXeH1q8DUAVq9Tp/7f8hOGbmn7czc3dy6kctj6qSTw0nRy/35HjzMZTewQt5S3JtgN8BECDbO2C2LsXhQutBHgeZvgnZv6PeSSIXzY8C4OtQ5jNULo2akDl040h4qG6fKtIZxMYGI/7Syc1t5fHEftYCorW0gu8tzAErrb0vMGtoN7P3PM/s4X2vYeHoLQF8h4B5JsB8Z3V0UGc6pASQX5Hy4JGFaqcmlUrFoEpp1ZcLrN8PKwzDINSSoG0bTrwdejhWd32GZU5zVf+S6IDqTLYz0Z52mcj1MBOtKSYSADcSZcrAyo9zXW8PoKsLxN8AuJ56H5DwvyCCfVrW/t1GZZAHi+u24JougNkCNiaxn6Rv0NxfKpUUhBscJ05t5Knae3f/j7N/zwTXveEpcoRUjVUGjmFfRTh2ttLde1YAWcP0MsibQPhstdqt+aiFgfPfwnYzOb6HeMLlOVMrcc1DOJz0Q0gOoyl9D4poSjq3TtyYs/e+sFkW8g+7A78EYi6LUGOOSd+WlkphZfWJ25SVq94a4NU4Qc7Pg0WvBXDj1Wq1JtDvA+t+hPMvr1cGmUGaPVAdVVBPwTQxthzNN0iF/ONOJrOJK8qEO1cFLHQnVjvywCRvx3olb2n7KQ+FVgRwLZwAxM3Y3H4YL/YbAPNtTRZpeHMTD9OKiqVHwLgJSZ8iQ7jhwO11xseZMzPNnOlpZo9PkLp9QwBicwmabwvYxGu7RWvYuXUxZR5+ihrNSy3mHnbXJdIDSZVqqmsTWcko52IxBZreEEDUtAc7iLzxICBqvpIFMH8Hn+UPRw5IyfYjJvwZb00yjpBDJFqYNK2ybdQ1F1Qej60X6XRvAFHzXbEAbEOto1PjzY5i+1jTLD/cBc7Y2HPO+BjnIW8eDkIchyvueCPN6ZQIRpV0+wX1PKwgLZjO9oawrKpuumpbKSnoh52UzZi/wzKSp1KPKitX5kRfHxP9A0xGEXYWCmClWc6FfCfU7RuPlRlwR1Gi8cczawP+6gxWfo8i+OUz0jTzcnx8V7VHxamDtrvLa0LSfbqS7ugPcFm0nUwCqBW1Tk71wDOONX8Mc3lAquo+3tGx3VWp7uw4gxk7d5BzU57qCEaKaPQKZUVnS8DHJcWUFyJvpyi8TixJ6WkA/gNsz18ekI5UuR4qL0GiB2k6C53xmvJybn9toOP0cEUJUFlal12nh0GpwSU55NFlq1Z7/76wMzLM3Fnj3iopu5j3VlVhY5i6duK6lOgOHNalJKjRpGVZbWBdboHLos18m0gsrMfZnUxwqzJiZRrMoQFlFCxJtdJXjTl/QwDJktMpAPGURmGIt/8ANvllMVL0Dz6LfODYsplqW+VZAMyd8mhwVTECPJaW6vXq1ElDyPRR+Ohy4siDBiaFqtBX0AMEjjCehzlPc3SUpTOSZoYXS7Kyypi2CD34MfpJzqM4Zet4swcdLm81lg0gZ2dYZaojfeUx1e5NfwzSkUq2bZ+E/HD1XxyonWbTDJCiMSFt5uQzyNlyLuSZzB3SeBx2yDcag7RIz/Vd/jINykv9TEtDetHKKRGJ2O4nxAgtw2Cl3c8wXVOY0urN5HBskwnFCeBYVir5Ix/+4L6/vxiyNNaTqsZEZ0/J7b0Jh5k9jrjUMtw5qw5iSWt+hqmxxEYRTfQF/axLTwCu0qtT7++Y4Li0bI9JWuZ11uhQD7Os8hJyeggApqXkxZ2/Wy8deYu7ejNIS04Aiv7C0MUN/jAMeazvYuUZHMvoENBCrxMtSfq+6GoocxXA6rTFqdPCq9Y9qMRbBgMolp2SAPMe5Pdjn9b1a56mpG/zfAH5ymbCD+79eYPEYS7e6cxM/tYc3hPS+lcZIpHciKbUF2Bw5JLHxl8j7waoDo7fhG2zyxCNZoH0n8YCe3hUpkUCGaQAyCAFQAYpADIAMkgBkEEKgAxSAGQAZABkAGSQAiCDFAAZpADI4xxI+qi593nHIB2jySIg6ftn9B1PEcjj2AXy/wUYACIPOMIobjzuAAAAAElFTkSuQmCC\\');width:100%;background-repeat: no-repeat;background-position: 15px 6px;\"></div><div class=\"mi_gradeselecthandlenerrow\"></div><div class=\"mi_gradeselectdigitsnerrow\" ' + (window.MI_defaults.RTL == 'true' ? 'style=\"direction:ltr!important;\"' : 'style=\"direction:ltr; LEFT: -4PX;TOP: 30PX;\"') + '><span style=\"font-size: 43px;z-index: 3;color: #92c83e;font-family: \\'Source Sans Pro\\', Alef!important;\"></span></div><div class=\"mi_gradeselecttext\" ' + (window.MI_defaults.RTL == 'true' ? 'style=\"top:77px;direction:rtl;color:#b8b8b8;\"' : 'style=\"top:77px;direction:ltr;color:#b8b8b8;\"') + '></div>',\n starspanel: {\n header: '<tr><td style=\" border-top: 1px solid #DFDFDF;\"><div class=\"mi_hover_starspanel\" style=\"border-bottom: 1px solid #dfdfdf !important;padding-bottom:5px;;overflow:hidden;border-top:1px solid transparent; padding-top: 20px;margin-top: -17px;background: #f7f7f7; /* Old browsers */background: -moz-linear-gradient(top, #f7f7f7 0%, #ffffff 100%); /* FF3.6+ */background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#f7f7f7), color-stop(100%,#ffffff)); /* Chrome,Safari4+ */background: -webkit-linear-gradient(top, #f7f7f7 0%,#ffffff 100%); /* Chrome10+,Safari5.1+ */background: -o-linear-gradient(top, #f7f7f7 0%,#ffffff 100%); /* Opera 11.10+ */background: -ms-linear-gradient(top, #f7f7f7 0%,#ffffff 100%); /* IE10+ */background: linear-gradient(to bottom, #f7f7f7 0%,#ffffff 100%); /* W3C */filter: progid:DXImageTransform.Microsoft.gradient( startColorstr=\\'#f7f7f7\\', endColorstr=\\'#ffffff\\',GradientType=0 ); /* IE6-9 */width: @@@widthpx;left: -0px;position: relative; height: 30px;\"><table style=\"position:relative\">',\n footer: '</tr></table></div></td></tr>'\n },\n tag: '<span onclick=\"jQuery.MidasInsight.tagClicked(\\'@@@kfid\\',\\'@@@atags\\')\" class=\"mi_tag_@@@atagsreplace mi_tag\">@@@atagscap<span style=\"display:inline-block;background-color:@@@color;-webkit-font-smoothing: antialiased;padding: 0;margin-bottom: 0;margin-left: 0;margin-top: 5px;left: 4px;position: relative;width:6px;height:6px;border-radius:50%; box-shadow: inset 0 0 10px 10px rgba(0,0,0,0.2);\"></span></span>',\n slidercontainer: '<div id=\"mi_previewPhotosContainer_@@@kfid\" style=\"height:65px;cursor:default;-moz-user-select: none; -webkit-user-select: none; -ms-user-select:none; user-select:none;\" unselectable=\"on\" onselectstart=\"return false;\"><table class=\"mi_previewPhotosContainer\" style=\"\" cellspacing=\"0\"><tr>',\n photopreview: '<tr ><td id=\"mi_photopreview_@@@kfid\" onclick=\"window.MI_logUsage(\\'photo_preview_clicked\\',\\'@@@kfid\\');if(jQuery.inArray(\\'photos\\', jQuery.MidasInsight.ObjDictionary[\\'@@@kfid\\'].options.tabs) ==-1) return;jQuery(this).find(\\'.mi_thumbscontainer\\').hide();jQuery.MidasInsight.MI_GetPhotos(\\'@@@kfid\\',false);\" colspan=\"2\" style=\"width: 100%;overflow: hidden;background-color:white;\"><div class=\"mi_thumbscontainer\" style=\"margin:0 auto;overflow:hidden;width:@@@widthpx;padding-top: 3px;border-top: 0px solid rgba(0,0,0,0.2);\">',\n tabswrapper: {\n header: '<div style=\"width: 152px;margin: 0 auto;background: #fefefe; /* Old browsers */background: -moz-linear-gradient(top, #fefefe 0%, #eeeeee 100%); /* FF3.6+ */background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#fefefe), color-stop(100%,#eeeeee)); /* Chrome,Safari4+ */background: -webkit-linear-gradient(top, #fefefe 0%,#eeeeee 100%); /* Chrome10+,Safari5.1+ */background: -o-linear-gradient(top, #fefefe 0%,#eeeeee 100%); /* Opera 11.10+ */background: -ms-linear-gradient(top, #fefefe 0%,#eeeeee 100%); /* IE10+ */background: linear-gradient(to bottom, #fefefe 0%,#eeeeee 100%); /* W3C */filter: progid:DXImageTransform.Microsoft.gradient( startColorstr=\\'#fefefe\\', endColorstr=\\'#eeeeee\\',GradientType=0 ); /* IE6-9 */-webkit-border-radius: 15px;-moz-border-radius: 15px;border-radius: 15px;border: 1px solid #cbcbcb;padding: 5px;\">',\n footer: '</div>'\n },\n footer: {\n header: '<div class=\"mi_footerwrapper\" style=\"background-color:#fff;\"><div class=\"mi_footerroot\" style=\"top:2px;\"><div class=\"mi_footercontainer\" id=\"mi_footercontainer_@@@kfid\" nstyle=\"height:100%;position:static;\">' +\n '<div class=\"mi_footer\" style=\"background-image:none;height:auto;margin-top:2px;\"><div onclick=\"jQuery(\\'#cpcnt_@@@kfid\\').find(\\'.MI_tab_selected\\').removeClass(\\'MI_tab_selected\\');jQuery(\\'#mipct_scroll_@@@kfid\\').addClass(\\'mi_blured\\');jQuery(\\'#mipct_tblabout_@@@kfid\\').css(\\'max-height\\',jQuery(\\'#mipct_scroll_@@@kfid\\').height()+1).css(\\'height\\',jQuery(\\'#mipct_scroll_@@@kfid\\').height()+1).css(\\'top\\',jQuery(\\'#mipct_scroll_@@@kfid\\').position().top).fadeIn();\" style=\"z-index: 1;position: absolute;right: 0px;top: 5px;height: 25px;width: 65px;cursor: pointer;display:none;\"></div>',\n share: '<div><ul class=\"mi_share-buttons\" style=\"padding:0; margin: 0 10px 5px;;\"><li><a onclick=\"window.MI_logUsage(\\'share\\');\" href=\"https://www.facebook.com/sharer/sharer.php?u={0}\" target=\"_blank\"><div style=\"margin-right: -6px;background-image: url(//d34p6saz4aff9q.cloudfront.net/img/f.png);height: 30px;width: 30px;\"></div></a></li>' +\n ' <li><a onclick=\"window.MI_logUsage(\\'share\\');\" href=\"https://twitter.com/intent/tweet?url={0}&text={1}:\" target=\"_blank\" title=\"Tweet\"><div style=\"background-image:url(//d34p6saz4aff9q.cloudfront.net/img/t.png);height: 30px;width: 30px;\"></div></a></li><li style=\"display:none;\"><a onclick=\"window.MI_logUsage(\\'share\\');\" href=\"http://pinterest.com/pin/create/button/?url={0}&description={2}\" target=\"_blank\" title=\"Pin it\"><img onload=\"this.style.opacity=1;this.style.top=0;\" src=\"//d34p6saz4aff9q.cloudfront.net/images/footer/Pinterest.png\" style=\"opacity:0\"></a></li>' +\n '<li><a onclick=\"window.MI_logUsage(\\'share\\');\" href=\"https://plus.google.com/share?url={0}\" target=\"_blank\" title=\"Share on Google+\"><div style=\"background-image: url(//d34p6saz4aff9q.cloudfront.net/img/g.png); ;width:30px;height:30px;background-repeat: no-repeat;\"></div></a></li></ul></div>' +\n '<div class=\"mi_footer_prompt\" style=\"color:#59a3e8;top:auto;border-top:none;position:static;float:left;margin-bottom:0;padding: 7px;\">@@@ask</div>',\n callForActions: '<tr><td><div id=\"cfa\" style=\"white-space:nowrap;padding: 0;margin-top: -2px;\"><div onclick=\"alert(\\'call to add to favorites\\')\" style=\"cursor:pointer;height: 21px;width: 50%;margin: 0;display: inline-block;text-align: center;vertical-align: middle;padding-top: 7px;border: 1px solid rgb(239, 239, 239);border-left: none;font-size: 12px;color: #111;border-top: none;\">+Add to Favorites</div><div onclick=\"alert(\\'call to book\\')\" style=\"cursor: pointer;height: 21px;width: 50%;margin: 0;display: inline-block;text-align: center;vertical-align: middle;padding-top: 7px;border: 1px solid rgb(239, 239, 239);border-left: none;font-size: 12px;color: #111;border-top: none;background-color: #31b444;color: white;\">Book</div></div></td></tr>'\n },\n header: {\n header: '<div class=\"mi_panelheader\" style=\" max-width: @@@widthpx;overflow: hidden;display: block;\"><table class=\"mi_rasta\" align=\"left\" class=\"mi_reset mi_greenredtitle\" style=\" max-width: @@@widthpx;overflow: hidden;display: block;\"><tr><td class=\"mi_header_caption@@@gaugeOrientation\" style=\"padding:0 !important;@@@exttrastyle\">' +\n '<div class=\"mi_drag_area\" style=\"position: absolute;width: 100%;height:125px;left:0;z-index: 2\"></div>' +\n '<div class=\"mi_green_close@@@gaugeOrientation\" onclick=\"jQuery.MidasInsight.hidePanel(\\'@@@kfid\\');\" style=\"z-index:3;cursor:pointer;display:none;\">✕</div>'\n // score gauge\n +\n '<div class=\"oi_gauge oi_gauge_@@@clsgrade mi_gradselectroot @@@gaugeOrientation\" id=\"mi_gradselectroot_@@@kfid\" data-score=\"@@@decgrade\" ></div>' +\n '<div class=\"mi_titlescore oi_color_@@@clsgrade\" style=\"@@@titleOrientation;text-align: left;margin-top: 16px;width: 240px;font-size: 25px;height: 0px;margin-left: 105px;\" >@@@textgrade</div>' +\n '<div class=\"mi_title\" style=\"@@@titleOrientation;margin-top: 22px;width: 240px;float: left;height: 41px;margin-left: 102px;color: #030303;\" >@@@displayText</div>' +\n '<div style=\"float:left !important;margin-left:102px;color: #A0A0A0; margin-top: -5px; nmargin-left: 0!important;npadding-left: 0!important;\" class=\"mi_subtitle\" >@@@count</div>' +\n '<div class=\"mi_preview_images\" style=\"z-index: 3;width: 100px;height: 60px;border: 0px solid #ababab;position: absolute;right: 18px;top: 33px;padding: 0px 0px 0px 0px;cursor: pointer;\" onclick=\"if(jQuery.inArray(\\'photos\\', jQuery.MidasInsight.ObjDictionary[\\'@@@kfid\\'].options.tabs) ==-1) return; jQuery.MidasInsight.MI_GetPhotos(\\'@@@kfid\\',false);\"><div style=\"border: 0px solid #ababab;width:100%;height:100%;background-image:url(@@@previewimgsrc); background-size: contain;background-repeat: no-repeat;background-position: center top;\"></div></div>'\n\n // tools tabs\n +\n '<div style=\"clear:both;height:0px;margin-bottom:0px;border-top:0px solid #DBDBDB!important;\"></div>' +\n '</td></tr>',\n footer: '</table></div>'\n }\n },\n scrollables: {\n header: '<div style=\"clear:both;height: px;margin-bottom:0px;border-top:0px solid #DBDBDB\"></div><div id=\"mipct_scroll_@@@kfid\" tabindex=\"-1\" style=\"heightdummy:0;outline:none;max-height:none;\" class=\"mi_scroll\">' +\n '<table align=\"left\" id=\"mipct_tbldefault_@@@kfid\" class=\"mi_results mi_scrolledcontent\">',\n footer: '</table></div>'\n },\n socialItem: {\n timelineItem: '<div class=\"mi_timeline\">@@@fullYear<br/>@@@month<br/>@@@date</div>',\n metaIcon: function(data, baseid) {\n return \"<div style=\\\"left:auto;position: absolute;right: 24px;-moz-transform:none;-moz-filter:grayscale(100%);filter: grayscale(100%);zoom: 1;-webkit-filter: grayscale(1);top: 5px;\\\" class=\\\"mi_widget_social_icon_small mi_widget_social_icon_small_\" + (data.source.replace('.com', '').replace('www.', '').replace('.', '').replace('.', '')).trim().capitalize() + \"\\\" mi_data-tooltip=\\\"\" + (data.source.replace('.com', '').replace('www.', '').replace('mi.google.reviews', 'Google Reviews').replace('plus.google', 'Google+')) + \"\\\"></div>\";\n },\n nonTimelineItem: '<img data-source=\"@@@sourceSite\" onerror=\"jQuery.MidasInsight.HandleMissingImage(\\'avatar\\',this)\" src=\"@@@itemImageURL\" valign=\"top\" class=\"mi_resultimage\">',\n youtubeItem: '<div style=\"position:relative;\"><div class=\\\"MI_SourceIcon MI_@@@sourceSite\\\" mi_data-tooltip=\\\"@@@sourceSite\\\"></div><table align=\"left\" class=\"mi_resultcontainer\" style=\"direction:ltr!important;cursor:default;\"><tr><td rowspan=\"4\" valign=\"top\" style=\"padding-right:15px;padding-left:3px;width: 65px;\"><div style=\"position:relative;height: 100%;display: block;\">' +\n '@@@sourceAvatar' +\n '</div></td><th style=\"vertical-align: middle;\" align=\"left\"><div class=\"mi_resultpublisher\">@@@itemPublisher<span class=\"mi_resulttimeago\">@@@timeAgo' +\n '</div></span></th></tr><tr><td style=\"padding-right:30px;\">' +\n '</td></tr><tr><td colspan=\"2\"><div style=\"padding-right:10px;overflow:hidden;position:relative;max-width: 275px;\" class=\"mi_imgcontainer\"><img src=\"https://i.ytimg.com/vi/@@@sourceURL/mqdefault.jpg\" style=\"max-width: @@@itemWidth ;min-width:185px;margin-top: 15px;margin-bottom: 15px;box-shadow: 0px 0 10px 4px #eee;border-radius: 5px;display:inline;\"/><img src=\"//d34p6saz4aff9q.cloudfront.net/images/playvideow.png\" style=\"position:absolute;cursor: pointer;left: 50%!important;margin-top: 20%;display:inline;margin-left: -30px;\" onclick=\"window.MI_logUsage(\\'play_video\\',\\'@@@baseid\\');@@@click\" onerror=\"this.style.display=\\'none\\';\"/></div>' +\n '</div></td></tr></table></div>',\n lightboxYoutubeItem: '<div style=\"position:relative;\"><div class=\\\"MI_SourceIcon MI_@@@sourceSite\\\" mi_data-tooltip=\\\"@@@sourceSite\\\"></div><table align=\"left\" class=\"mi_resultcontainer\" style=\"direction:ltr!important;cursor:default;\"><tr><td rowspan=\"4\" valign=\"top\" style=\"padding-right:15px;padding-left:3px;width: 65px;\"><div style=\"position:relative;height: 100%;display: block;\">' +\n '@@@sourceAvatar' +\n '</div></td><th style=\"vertical-align: middle;\" align=\"left\"><div class=\"mi_resultpublisher\" style=\"color:#838383;\">@@@itemPublisher<span class=\"mi_resulttimeago\" itemDate=\"@@@itemDate\">@@@timeAgo' +\n '</span></div></th></tr><tr><td style=\"padding-right:30px;\"></td></tr>' +\n '<tr><td colspan=\"2\" onclick=\"@@@click\" style=\"cursor: pointer; cursor: hand;\"><div style=\"padding-right:10px;overflow:hidden;position:relative;max-width: 275px;\" class=\"mi_imgcontainer\">' +\n '<div id=\"#mi_image_lightbox_@@@ksid\" >' +\n '<img src=\"https://i.ytimg.com/vi/@@@sourceURL/mqdefault.jpg\" style=\"max-width: @@@itemWidth ;min-width:185px;margin-top: 15px;margin-bottom: 15px;nbox-shadow: 0px 0 10px 4px #eee;float: right!important;border-radius: 2px;display:inline;\"/>' +\n '<img src=\"//d34p6saz4aff9q.cloudfront.net/images/playvideow.png\" style=\"position:absolute;cursor: pointer;left: 50%!important;margin-top: 20%;display:inline;margin-left: -30px;\" '\n //+'onclick=\"window.MI_logUsage(\\'play_video\\',\\'@@@baseid\\');@@@click\" '\n +\n 'onerror=\"this.style.display=\\'none\\';\"/></div>'\n //+'<div class=\"mi_lightbox\" id=\"mi_image_lightbox_@@@ksid\" onclick=\"jQuery.MidasInsight.StopYoutubeVideo(jQuery(\\'#mi_image_lightbox_@@@ksid iframe\\')[0]);jQuery(this).fadeOut();\"><iframe width=\"560\" height=\"315\" src=\"https://www.youtube.com/embed/@@@youtubeid?enablejsapi=1\" frameborder=\"0\" allowfullscreen></iframe></a></div>'\n +\n '</td></tr></table></div>',\n lightboxVimeoItem: '<div style=\"position:relative;\"><div class=\\\"MI_SourceIcon MI_@@@sourceSite\\\" mi_data-tooltip=\\\"@@@sourceSite\\\"></div><table align=\"left\" class=\"mi_resultcontainer\" style=\"direction:ltr!important;cursor:default;\"><tr><td rowspan=\"4\" valign=\"top\" style=\"padding-right:15px;padding-left:3px;width: 65px;\"><div style=\"position:relative;height: 100%;display: block;\">' +\n '@@@sourceAvatar' +\n '</div></td><th style=\"vertical-align: middle;\" align=\"left\"><div class=\"mi_resultpublisher\" style=\"color:#838383;\">@@@itemPublisher<span class=\"mi_resulttimeago\" itemDate=\"@@@itemDate\">@@@timeAgo' +\n '</span></div></th></tr><tr><td style=\"padding-right:30px;\"></td></tr>' +\n '<tr><td colspan=\"2\" onclick=\"@@@click\" style=\"cursor: pointer; cursor: hand;\"><div style=\"padding-right:10px;overflow:hidden;position:relative;max-width: 275px;\" class=\"mi_imgcontainer\">' +\n '<div id=\"#mi_image_lightbox_@@@ksid\" '\n //+'onclick=\" jQuery(mi_image_lightbox_@@@ksid).fadeIn();jQuery(\\'#mi_iframe_lightbox_@@@ksid\\').attr(\\'src\\',jQuery(\\'#mi_iframe_lightbox_@@@ksid\\').attr(\\'data-src\\'));\"'\n +\n '><img src=\"@@@itemContentImageURL\" style=\"max-width: @@@itemWidth ;min-width:185px;margin-top: 15px;margin-bottom: 15px;nbox-shadow: 0px 0 10px 4px #eee;float: right!important;border-radius: 2px;display:inline;\"/>' +\n '<img src=\"//d34p6saz4aff9q.cloudfront.net/images/playvideow.png\" style=\"position:absolute;cursor: pointer;left: 50%!important;margin-top: 20%;display:inline;margin-left: -30px;\" '\n //+'nonclick=\"window.MI_logUsage(\\'play_video\\',\\'@@@baseid\\');@@@click\" onerror=\"this.style.display=\\'none\\';\"\n +\n '/></div>'\n //+'<div class=\"mi_lightbox\" id=\"mi_image_lightbox_@@@ksid\" onclick=\"jQuery(\\'#mi_iframe_lightbox_@@@ksid\\').attr(\\'src\\',\\'\\');jQuery(this).fadeOut();\"><iframe id=\"mi_iframe_lightbox_@@@ksid\" data-src=\"@@@sourceURL?autoplay=1&title=0&byline=0&portrait=0\" width=\"500\" height=\"281\" frameborder=\"0\" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe>'\n //+'</a></div>'\n +\n '</td></tr></table></div>',\n normalItem: '<div style=\"position:relative;\">@@@metaicon<table align=\"left\" class=\"mi_resultcontainer\" @@@cond onclick=\"@@@click\"><tr><td rowspan=\"4\" valign=\"top\" style=\"padding-right:15px;padding-left:3px;width: 65px;\"><div style=\"position:relative;height: 100%;display:block;\">' +\n '@@@item' +\n '</div></td><th style=\"vertical-align: middle;\" align=\"left\"><div class=\"mi_resultpublisher\">@@@itempublisher<span class=\"mi_resulttimeago\" style=\"\"> @@@timeago' +\n '</div></span></th></tr><tr><td style=\"padding-right:30px;\"><div class=\"mi_resulttext\">@@@itemtext',\n instagramItem: '<div style=\"position:relative;\">@@@metaicon<table align=\"left\" class=\"mi_resultcontainer\" @@@cond onclick=\"@@@click\"><tr><td rowspan=\"4\" valign=\"top\" style=\"padding-right:15px;padding-left:3px;width: 65px;\"><div style=\"position:relative;height: 100%;display:block;\">' +\n '@@@item' +\n '</div></td><th style=\"vertical-align: middle;\" align=\"left\"><div class=\"mi_resultpublisher\" style=\"color:#838383;\">@@@itempublisher<span class=\"mi_resulttimeago\"> @@@timeago' +\n '</div></span></th></tr><tr><td style=\"padding-right:30px;\"><div class=\"mi_resulttext\">',\n itemContentImage: '</td></tr><tr><td colspan=\"2\"><div style=\"padding-right:10px;overflow:hidden;\"><img nonload=\"if (!jQuery.MidasInsight.imageIsGood(this)) jQuery.MidasInsight.HandleMissingImage(\\'preview\\',this);\" onerror=\"jQuery.MidasInsight.HandleMissingImage(\\'preview\\',this);\" src=\"@@@itemcontentimage\" style=\"max-width: 275px;margin-top: 0px;margin-bottom: 15px;nbox-shadow: 0px 0 10px 4px #eee;float: right;border-radius: 5px;\"/></div>',\n lightboxContentImage: '</td></tr><tr><td colspan=\"2\"><div style=\"padding-right:10px;overflow:hidden;\"><div id=\"#mi_image_lightbox_@@@ksid\" ><img src=\"@@@itemcontentimage\" style=\"max-width: 275px;margin-top: 0px;margin-bottom: 15px;nbox-shadow: 0px 0 10px 4px #eee; border-radius: 2px;float: left!important;cursor:pointer;\" nonerror=\"jQuery.MidasInsight.HandleMissingImage(\\'preview\\',this);\" nonload=\"if (!jQuery.MidasInsight.imageIsGood(this)) jQuery.MidasInsight.HandleMissingImage(\\'preview\\',this); else ' +\n '{jQuery.MidasInsight.AddtoGallery(\\'@@@kfid\\', { href: \\'@@@itemcontentimage\\', title:\\'\\' });' +\n ' jQuery(this).parent().attr(\\'onclick\\',\\'jQuery.MidasInsight.ShowLightBoxURL(\\\\\\'@@@itemcontentimage\\\\\\',\\\\\\'@@@kfid\\\\\\')\\');}\"></div></div>'\n //<div class=\"mi_lightbox\" id=\"mi_image_lightbox_@@@ksid\" onclick=\"jQuery(this).fadeOut();\"><img src=\"@@@itemcontentimage\" style=\"nbox-shadow: 0px 0 10px 4px #eee;border-radius: 5px;\" onload=\"jQuery(this).css(\\'position\\', \\'relative\\').css(\\'top\\',\\'50%\\').css(\\'margin-top\\',((this.height/2)*-1)+ \\'px\\').css(\\'top\\',\\'50%\\',\\'!important\\');\"/></div></div>'\n }\n }\n }\n\n var langDictionary = {\n EN: {\n scores: ['Lame', 'Fair', 'Okay', 'Good', 'Great!'],\n basedon: 'Based on %d Reviews & Mentions ',\n ask: 'Ask friends for their opinion',\n mentions: 'Mentions <br/>&&nbsp;Reviews',\n media: 'Photos <br/>&&nbsp;Videos',\n facebook: 'Facebook',\n feelter: 'Social <br/>Insights',\n comment: 'Comment',\n back: 'Back',\n insights: 'Insights',\n clickhere: \"CLICK HERE\",\n hoverbuttontext: 'REVIEWS, MENTIONS & PHOTOS',\n rating: 'Rating <span style=\"font-family: \\'Source Sans Pro\\'\">%d</span> Reviews & Mentions',\n translate: 'Translate'\n },\n FR: {\n scores: ['Boiteux', 'Juste', 'Bien', 'Bon', 'Grand!'],\n basedon: 'Basé sur %d Critiques et Mentions ',\n ask: 'Demandez à vos amis pour leur opinion',\n mentions: 'Mentions & Commentaires',\n media: 'Photos & Vidéos',\n facebook: 'Facebook',\n feelter: 'Insights sociaux',\n comment: 'Commentaire',\n back: 'Arrière',\n insights: 'Insights',\n clickhere: \"CLIQUEZ ICI\",\n hoverbuttontext: 'CRITIQUES, MENTIONS ET PHOTOS',\n rating: ' Rating %d Critiques & Commentaires'\n },\n IT: {\n scores: ['Zoppo', 'Fiera', 'Bene', 'Buono', 'Grande!'],\n basedon: 'Sulla base %d Recensioni e Menzioni',\n ask: 'Chiedi amici per il loro parere',\n mentions: 'Menzioni & Recensioni',\n media: 'Foto & Video',\n facebook: 'Facebook',\n feelter: 'Insights Sociali',\n comment: 'Commento',\n back: 'Indietro',\n insights: 'Insights',\n clickhere: \"CLICK HERE\",\n hoverbuttontext: 'REVIEWS, MENTIONS & PHOTOS',\n rating: 'Rating %d Reviews & Mentions'\n },\n DE: {\n scores: ['lahm', 'Messe', 'Okay', 'gut', 'Na Toll!'],\n basedon: 'Basierend auf %d Bewertungen & Mentions ',\n ask: 'Fragen Sie Freunde nach ihrer Meinung',\n mentions: 'Erwähnungen & Reviews',\n media: 'Fotos & Videos',\n facebook: 'Facebook',\n feelter: 'Social Insights',\n comment: 'Kommentar',\n back: 'Der Rücken',\n insights: 'Insights',\n clickhere: \"HIER KLICKEN\",\n hoverbuttontext: 'REZENSIONEN, ERWÄHNUNGEN UND FOTOS',\n rating: 'Bewertung %d Rezensionen und Erwähnungen'\n },\n ES: {\n scores: ['Cojos', 'Justo', 'Bien', 'Bueno', 'Excelente!'],\n basedon: 'Basado en %d Comentarios y Menciones ',\n ask: 'Pregunte a sus amigos para su opinión ',\n mentions: 'Menciones',\n media: 'Medios',\n facebook: 'Facebook',\n feelter: 'Feelter',\n comment: 'comentario',\n back: 'Back',\n clickhere: \"CLIC AQUÍ\",\n hoverbuttontext: ' COMENTARIOS, MENCIONCES Y FOTOS',\n rating: 'Puntuación %d Comentarios Y Menciones'\n },\n HE: {\n scores: ['גרוע', 'סביר', 'טוב', 'טוב מאוד', '!מעולה'],\n basedon: 'מבוסס על %d חוות דעת ',\n ask: 'שתף את החברים ',\n mentions: 'חוות&nbsp;דעת',\n media: '×ª×ž×•× ×•×ª ווידאו',\n facebook: 'פייסבוק',\n feelter: 'Feelter',\n comment: 'תגובה',\n moreInfo: 'מידע × ×•×¡×£',\n back: 'סגור',\n insights: '×ª×•×‘× ×•×ª',\n clickhere: \"לחץ כאן\",\n hoverbuttontext: 'ביקורות, איזכורים ×•×ª×ž×•× ×•×ª',\n rating: 'הדירוג מבוסס על <span style=\"font-family: \\'Source Sans Pro\\'\"> %d </span>ביקורות ואיזכורים',\n translate: 'תרגם'\n },\n CN: {\n scores: ['拉梅', '公平', '好吧', '好', '太好了!'],\n basedon: '基于%d个评论与说起 ',\n ask: '问朋友他们的意见 ',\n mentions: '说起 ',\n media: '媒体 ',\n facebook: 'Facebookçš„ ',\n feelter: 'Feelter',\n comment: '评论}',\n back: 'Back',\n clickhere: \"CLICK HERE\",\n hoverbuttontext: 'REVIEWS, MENTIONS & PHOTOS',\n rating: 'Rating %d Reviews & Mentions'\n },\n AR: {\n scores: ['عرجاء', 'معرض', 'حسنا،', 'جيدة', 'عظيم!'],\n basedon: 'استنادا %d الآراء Ùˆ التنويهات ',\n ask: ' نسأل الاصدقاء عن رأيهم ',\n mentions: ' يذكر ',\n media: ' الصور ',\n facebook: ' الفيسبوك ',\n feelter: ' Feelter ',\n comment: ' تعليق',\n back: 'Back',\n clickhere: \"CLICK HERE\",\n hoverbuttontext: 'REVIEWS, MENTIONS & PHOTOS',\n rating: 'Rating %d Reviews & Mentions'\n },\n CS: {\n scores: ['Příšerné', 'Uspokojivé', 'PrůmÄ›rné', 'Dobré', 'Vynikající'],\n basedon: 'Na základÄ› %d hodnocení a zmínek',\n ask: 'Zeptej se přítele na jeho názor',\n mentions: 'Hodnocení a zmínky',\n media: 'Fotky a videa ',\n facebook: 'Facebook',\n feelter: ' Feelter ',\n comment: 'Komentář',\n back: 'ZpÄ›t',\n clickhere: \"Klikni zde\",\n hoverbuttontext: 'Názory, zmínky a fotky',\n rating: 'Hodnocení %d názory a zmínky',\n translate: 'pÅ™eložit'\n },\n PL: {\n scores: ['Okropnie', 'Źle', 'Åšredni', 'Bardzo Dobrze', 'Doskonale'],\n basedon: 'Bazowane na %d Opiniach',\n ask: 'Zapytaj znajomych o opiniÄ™',\n mentions: 'Wzmianki i Opinie',\n media: 'Filmy i ZdjÄ™cia',\n facebook: 'Facebook',\n feelter: ' Feelter',\n comment: 'komentarz',\n back: 'z powrotem',\n clickhere: \"kliknij tutaj\",\n hoverbuttontext: 'Opinie, Wzmianki i ZdjÄ™cia',\n rating: 'Ranking %d Wzmianek i Opini',\n translate: 'tÅ‚umaczyć'\n },\n SK: {\n scores: ['Hrozné', 'Uspokojivé', 'Priemerné', 'Dobré', 'Výborné'],\n basedon: 'Na základe %d hodnotení a zmienok',\n ask: 'Spýtaj sa priateľa na jeho názor',\n mentions: 'Zmienky a hodnotenia',\n media: 'Fotky a videá',\n facebook: 'Facebook',\n feelter: ' Feelter',\n comment: 'Komentár',\n back: 'Späť',\n clickhere: \"Klikni tu\",\n hoverbuttontext: 'Opinie, Wzmianki i ZdjÄ™cia',\n rating: 'Hodnotenie %d názory a zmienky',\n translate: 'PreložiÅ¥'\n }\n };\n\n window.langDictionary = langDictionary;\n\n\n // Constructs an object from a query string\n // in the format of key=value&key2=value2\n function parseQuery(query) {\n var Params = new Object();\n if (!query) return Params; // return empty object\n var Pairs = unescape(query).split('&');\n for (var i = 0; i < Pairs.length; i++) {\n if (Pairs[i].indexOf('=') == -1) continue;\n var key = Pairs[i].substr(0, Pairs[i].indexOf('='));\n var val = Pairs[i].substr(Pairs[i].indexOf('=') + 1);\n val = val.replace(/\\+/g, ' ');\n Params[key] = val;\n }\n return Params;\n }\n\n // parse parameters from script source\n var myScript = req.url;\n var queryString = req.query;//(typeof myScript == 'undefined' || typeof myScript.src == 'undefined') ? '' : myScript.src.replace(/^[^\\?]+\\??/, '');\n\n var params = parseQuery(queryString);\n //res.write('zzzz'+queryString+' '+ JSON.stringify(queryString));\n \n window.MI_defaults = extend({}, window.MI_defaults, queryString)\n if (typeof window.MI_defaults.feedback != 'undefined') window.MI_defaults.inqa = window.MI_defaults.feedback;\n\n //get template from html if availasble\n if (!(typeof mi_template === \"undefined\")) {\n window.tempDictionary[window.MI_defaults.template].panelLayout = mi_template.panelLayout;\n }\n if (typeof window.MI_defaults.panelLayout == \"string\") try {\n window.MI_defaults.panelLayout = JSON.parse(window.MI_defaults.panelLayout.replace(/'/g, '\"'));\n }\n catch (e) {}\n if (!(typeof window.MI_defaults.panelLayout === \"undefined\")) {\n window.tempDictionary[window.MI_defaults.template].panelLayout = window.MI_defaults.panelLayout;\n }\n if (typeof window.MI_defaults.frameElements == \"string\") try {\n window.MI_defaults.frameElements = JSON.parse(window.MI_defaults.frameElements.replace(/'/g, '\"'));\n }\n catch (e) {}\n if (typeof window.MI_defaults.tabs == \"string\") try {\n window.MI_defaults.tabs = JSON.parse(window.MI_defaults.tabs.replace(/'/g, '\"'));\n }\n catch (e) {}\n if (typeof window.MI_defaults.ex == \"string\") try {\n window.MI_defaults.ex = JSON.parse(window.MI_defaults.ex.replace(/'/g, '\"'));\n }\n catch (e) {}\n if (typeof window.MI_defaults.panelLayout == 'undefined') window.MI_defaults.panelLayout = {};\n if (typeof window.MI_defaults.panelLayout.flags == 'undefined') window.MI_defaults.panelLayout.flags = [];\n if (typeof window.MI_defaults.panelLayout.flags == \"string\") try {\n window.MI_defaults.panelLayout.flags = JSON.parse(window.MI_defaults.panelLayout.flags.replace(/'/g, '\"'));\n }\n catch (e) {}\n if (typeof window.langDictionary[window.MI_defaults.lang] == 'undefined') window.MI_defaults.lang = 'EN';\n\n if (typeof window.langDictionary[window.MI_defaults.lang] == 'undefined')\n window.langDictionary[window.MI_defaults.lang] = extend({}, langDictionary['EN'], window.langDictionary[window.MI_defaults.lang]);\n\n //exclude tripadvisor\n if (typeof window.MI_defaults.ex == 'undefined') {\n window.MI_defaults.ex = [];\n }\n window.MI_defaults.ex.push(3);\n window.MI_defaults.ex.push(24);\n switch (window.MI_defaults.lang) {\n case 'AR':\n window.MI_defaults.RTL = 'true';\n window.MI_defaults.gaugeOrientation = 'right';\n break;\n }\n window.MI_defaults.minPanelWidth = window.MI_defaults.layout == \"inlinepanel\" ? 750 : 485;\n window.MI_defaults.panelWidth = window.MI_defaults.template == 'RASTA' ? window.MI_defaults.minPanelWidth : 386;\n\n if (typeof String.prototype.camelCase !== 'function') {\n String.prototype.camelCase = function() {\n return this.toLowerCase().replace(/-(.)/g, function(match, group1) {\n return group1.toUpperCase();\n });\n }\n }\n if (typeof String.prototype.trim !== 'function') {\n String.prototype.trim = function() {\n return this.replace(/^\\s+|\\s+$/g, '');\n }\n }\n\n if (typeof String.prototype.trim !== 'function') {\n String.prototype.trim = function() {\n return this.replace(/^\\s+|\\s+$/g, '');\n }\n }\n String.prototype.capitalize = function() {\n return this.replace(/((?:^|\\s(?!and)(?!or)(?!of)(?!the)(?!\\bat\\b))\\S)/g, function(a) {\n return a.toUpperCase();\n }).replace(/\\b\\S\\S$/g, function(a) {\n return a.toUpperCase();\n });\n };\n\n if (!Object.keys) {\n Object.keys = function(obj) {\n var keys = [];\n\n for (var i in obj) {\n if (obj.hasOwnProperty(i)) {\n keys.push(i);\n }\n }\n return keys;\n };\n }\n if (typeof console == \"undefined\") {\n this.console = {\n log: function() {}\n };\n }\n\n if (!Array.prototype.map) {\n Array.prototype.map = function(fun) {\n var t = Object(this);\n var len = t.length >>> 0;\n var res = new Array(len);\n var thisArg = arguments.length >= 2 ? arguments[1] : void 0;\n for (var i = 0; i < len; i++) {\n if (i in t)\n res[i] = fun.call(thisArg, t[i], i, t);\n }\n return res;\n };\n }\n\n Array.maxProp = function(array, prop) {\n var values = array.map(function(el) {\n return el[prop];\n });\n return Math.max.apply(Math, values);\n };\n Array.minProp = function(array, prop) {\n var values = array.map(function(el) {\n return el[prop];\n });\n return Math.min.apply(Math, values);\n };\n String.prototype.format = function() {\n var formatted = this;\n for (var i = 0; i < arguments.length; i++) {\n var regexp = new RegExp('\\\\{' + i + '\\\\}', 'gi');\n formatted = formatted.replace(regexp, arguments[i]);\n }\n return formatted;\n };\n\n\n // initiate logging parameters and create \n // on-screen log if in debug mode\n window.MI_logState = '';\n window.MI_logDetails = '';\n window.MI_logKey = '';\n window.MI_logLast = new Date();\n window.MI_scrollLast = new Date(1970, 1, 1);\n window.MI_queuedLoggingEvents = '';\n if (typeof(window.MI_defaults.debug) != 'undefined' && window.MI_defaults.debug == 'true') {\n jQuery('<div id=\"MI_onScreenLog\" style=\"padding:5px;overflow:hidden;z-index:999;position:fixed;right:10px;top:10px;width:200px;bottom:10px;border-radius:5px;border:1px solid #333;background:#aaa;background:rgba(0,0,0,0.5);color:white;\"><div class=\"mi-logCaption\" style=\"background:#aaa;margin:-10px -10px 10px -10px;padding:10px;color:#333;\" ><strong style=\"color: white;\">Debug-Mode Log</strong><br><div style=\"box-shadow: 0px 0px 5px gray;background-color: white;border: 1px solid #7D7D7D;border-radius: 4px;padding: 5px;margin-top: 5px;font-size: 11px;color: #999;\">This log is only displayed on debug mode.To stop showing It, Remove the \"debug=true\" parameter from your script reference or hash tag.</div></div>').appendTo(\"body\");\n }\n else if (typeof(window.MI_defaults.hidden) != 'undefined' && window.MI_defaults.hidden == 'true') {\n return;\n }\n\n window.misstimer = 0;\n }", "function startPlugin() {\n log_d(\"Starting the plug-in\");\n $('#installButton').hide();\n// Create and configure listener\n var listener = new CDO.CloudeoServiceListener();\n listener.onUserEvent = function (/**CDO.UserStateChangedEvent*/e) {\n if (e.isConnected) {\n newUser(e);\n } else {\n userGone(e);\n }\n };\n listener.onMediaStreamEvent = function(e){\n log_d(\"Got new media stream event: \" + JSON.stringify(e));\n if(e.mediaType !== CDO.MEDIA_TYPE_VIDEO) {\n// Ignore other event types.\n return;\n }\n if(e.videoPublished) {\n// User just published the video feed\n newUser(e);\n } else {\n// User just stoped publishing the video feed\n userGone(e);\n }\n };\n\n// Create the CloudeoService\n plugin.createService(CDO.createResponder(function (result) {\n service = /**CDO.CloudeoService*/ result;\n service.addServiceListener(CDO.createResponder(), listener);\n initVideo();\n initAudio();\n }));\n}", "function initPlugin() {\n initUI();\n\n// Setup logging using our handler\n CDO.initLogging(function (lev, msg) {\n switch (lev) {\n case \"DEBUG\":\n log_d(\"[CDO] \" + msg);\n break;\n case \"WARN\":\n log_e(\"[CDO] \" + msg);\n break;\n case \"ERROR\":\n log_e(\"[CDO] \" + msg);\n break;\n default:\n log_e(\"Got unsupported log level: \" + lev + \". Message: \" + msg);\n }\n }, true);\n log_d(\"Initializing the plug-in\");\n\n// Try to load the plugin\n plugin = new CDO.CloudeoPlugin(PLUGIN_CONTAINER_ID);\n var loadStatus = plugin.loadPlugin();\n if (loadStatus) {\n// Plugin is installed\n tryUpdatePlugin();\n } else {\n// Plugin requires installation\n showInstallFrame();\n }\n}", "function plugin() {\n let seneca = this;\n seneca.add('role:comics-images,cmd:metadata', (msg, res) => getMetadata(msg).then((val) => res(null, val).catch(res)));\n seneca.add('role:comics-images,cmd:bytes', (msg, res) => getBytes(msg).then((val) => res(null, val).catch(res)));\n}", "function MovieClipPlugin() {\n\t\t\tthrow(\"MovieClipPlugin cannot be instantiated.\")\n\t\t}", "static get pluginConfig() {\n return {\n after: ['render']\n };\n }", "static get pluginConfig() {\n return {\n after: ['render']\n };\n }", "static get pluginConfig() {\n return {\n after: ['render']\n };\n }", "static get pluginConfig() {\n return {\n after: ['render']\n };\n }", "function Plugin (options)\n\t{\n var args = Array.prototype.slice.call(arguments, 1);\n\n return this.each(function ()\n { \n var el = $(this), \n data = el.data('carousel');\n\n if (!data)\n {\n el.data('carousel', (data = new Carousel(this, options)));\n }\n\n if (typeof options === \"string\")\n {\n if (data[options] && options[0] !== '_')\n {\n data[options].apply(data, args);\n }\n } \n });\n\t}", "function pluginloaded()\n{\r\n}", "function Plugin( element, options ) {\n\t\tthis.element = element;\n\n\t\tthis.options = $.extend( {}, defaults, options) ;\n\n\t\tthis._defaults = defaults;\n\t\tthis._name = pluginName;\n\t\tthis.spa_space = tiddlyweb.status.space.name;\n\n\t\tthis.init();\n\t}", "function Plugin(element, options) {\n this.element = element;\n this.options = $.extend({}, defaults, options);\n this._defaults = defaults;\n this._name = pluginName;\n this.activePan = {};\n this.activeTargetClassName = \"lighter-active\";\n this.activeMenuClassName = \"lighter-menu-active\";\n this.init();\n }", "function Plugin(el, options) {\n var self = this;\n this.$el = $(el);\n this.isLoaded = false;\n this.grid = null;\n this.settings = $.extend({}, defaults, options);\n validateSettings(this.settings);\n if (this.settings.color != \"chroma\")\n this.settings.color = colorToRGB(this.settings.color);\n\n if (chromaScreen == null) {\n chromaScreen = new ChromaScreen();\n\n //force the icons to load\n this.$el.append(\"<span class='chrg-loadicon chrgi-image'></span>\");\n setTimeout(function () {\n self.$el.find(\".chrg-loadicon\").remove();\n }, 100);\n }\n this._init();\n }", "static get pluginConfig() {\n return {\n after: ['render', 'renderContents']\n };\n }", "static get pluginConfig() {\n return {\n after: ['render', 'renderContents']\n };\n }", "ready() {\n this.plugin = new window.Vue({\n el: this.shadowRoot,\n created() {\n },\n data: {msg: \"\"},\n methods: {\n onBtnClick() {\n const FS_Extra = Editor.require(\"packages://hello-world/node_modules/fs-extra\");\n let dir = Path.join(Editor.projectInfo.path, \"tmpDir\");\n FS_Extra.mkdirSync(dir);\n\n // Editor.Ipc.sendToMain('hello-world:clicked');\n },\n layout() {\n if (Editor.isMainProcess) {\n Editor.Window.main.resetLayout(\"packages://hello-world/layout.json\");\n\n } else {\n Editor.remote.Window.main.resetLayout(\"packages://hello-world/layout.json\");\n }\n },\n sceneWalker() {\n Editor.Scene.callSceneScript('hello-world', 'get-canvas-children', function (err, length) {\n console.log(`get-canvas-children callback : length - ${length}`);\n });\n }\n }\n });\n\n\n }", "function MovieClipPlugin() {\n\t\tthrow(\"MovieClipPlugin cannot be instantiated.\")\n\t}", "arcPlugins() {\n return [\n \"bold\", \"italic\", \"h1\", \"h2\", \"h3\", \"center\", \"quote\", \"link\",\n \"list\", \"section\", \"code\", \"image\", \"youtube\"\n ];\n }", "function mainBanner() {\n\n if ($('#rev_slider').length > 0) {\n var revapi16;\n if ($('#rev_slider').revolution == undefined) {\n revslider_showDoubleJqueryError('#rev_slider');\n } else {\n revapi16 = $('#rev_slider').show().revolution({\n sliderType: 'carousel',\n jsFileLocation: '../revolution/js/',\n sliderLayout: 'fullscreen',\n dottedOverlay: 'none',\n delay: 9000,\n navigation: {\n keyboardNavigation: 'off',\n keyboard_direction: 'horizontal',\n mouseScrollNavigation: 'off',\n // mouseScrollNavigation:\"on\",\n // mouseScrollReverse:\"default\",\n onHoverStop: 'off',\n touch: {\n touchenabled: 'on',\n swipe_threshold: 75,\n swipe_min_touches: 1,\n swipe_direction: 'horizontal',\n drag_block_vertical: false\n },\n\n arrows: {\n style: 'arrowpag',\n enable: true,\n hide_onmobile: true,\n hide_under: 600,\n hide_onleave: false,\n hide_delay: 200,\n hide_delay_mobile: 1200,\n tmp: '<div class=\"arrow-text\">{{param1}}</div>',\n left: {\n h_align: 'left',\n v_align: 'center',\n h_offset: 30,\n v_offset: 0\n },\n right: {\n h_align: 'right',\n v_align: 'center',\n h_offset: 30,\n v_offset: 0\n }\n },\n\n tabs: {\n style: 'hermes',\n enable: true,\n // width: 175,\n // height: 140,\n width: 320,\n height: 160,\n min_width: 150,\n wrapper_padding: 0,\n wrapper_color: '#000000',\n wrapper_opacity: '0.5',\n tmp: '<span class=\"tp-tab-image\"></span>',\n visibleAmount: 10,\n hide_onmobile: true,\n hide_under: 776,\n hide_onleave: false,\n hide_delay: 200,\n // direction: \"vertical\",\n direction: 'horizontal',\n span: true,\n position: 'inner',\n space: 0,\n // h_align: \"right\",\n h_align: 'center',\n v_align: 'bottom',\n h_offset: 0,\n v_offset: 100\n }\n },\n carousel: {\n horizontal_align: 'center',\n vertical_align: 'center',\n fadeout: 'on',\n vary_fade: 'on',\n maxVisibleItems: 3,\n infinity: 'on',\n space: 0,\n stretch: 'on'\n },\n responsiveLevels: [1240, 1024, 778, 480],\n gridwidth: [800, 640, 480, 480],\n gridheight: [720, 720, 480, 360],\n lazyLoad: 'on',\n lazyType: 'smart',\n parallax: {\n type: 'scroll',\n origo: 'enterpoint',\n speed: 400,\n levels: [5, 10, 15, 20, 25, 30, 35, 40, 45, 50]\n },\n shadow: 0,\n spinner: 'off',\n stopLoop: 'off',\n stopAfterLoops: 0,\n stopAtSlide: -1,\n shuffle: 'off',\n autoHeight: 'off',\n disableProgressBar: 'off',\n hideThumbsOnMobile: 'off',\n hideSliderAtLimit: 0,\n hideCaptionAtLimit: 0,\n hideAllCaptionAtLilmit: 0,\n debugMode: false,\n fallbacks: {\n simplifyAll: 'off',\n nextSlideOnWindowFocus: 'off',\n disableFocusListener: false\n }\n });\n }\n };\n\n $('#thumbsButton').on('mouseenter', function (e) {\n $('body').toggleClass('showThumbnails');\n });\n\n $('.tp-tabs').on('mouseleave', function (e) {\n $('body').removeClass('showThumbnails');\n });\n}", "function BonjourPlugin() {\n }", "function Plugin(option) {\n\t return this.each(function () {\n\t var $this = $(this)\n\t var data = $this.data('bs.carousel')\n\t var options = $.extend({}, Carousel.DEFAULTS, $this.data(), typeof option == 'object' && option)\n\t var action = typeof option == 'string' ? option : options.slide\n\t\n\t if (!data) $this.data('bs.carousel', (data = new Carousel(this, options)))\n\t if (typeof option == 'number') data.to(option)\n\t else if (action) data[action]()\n\t else if (options.interval) data.pause().cycle()\n\t })\n\t }", "function Plugin(option) {\n\t return this.each(function () {\n\t var $this = $(this)\n\t var data = $this.data('bs.carousel')\n\t var options = $.extend({}, Carousel.DEFAULTS, $this.data(), typeof option == 'object' && option)\n\t var action = typeof option == 'string' ? option : options.slide\n\t\n\t if (!data) $this.data('bs.carousel', (data = new Carousel(this, options)))\n\t if (typeof option == 'number') data.to(option)\n\t else if (action) data[action]()\n\t else if (options.interval) data.pause().cycle()\n\t })\n\t }", "function Plugin(option) {\n\t return this.each(function () {\n\t var $this = $(this)\n\t var data = $this.data('bs.carousel')\n\t var options = $.extend({}, Carousel.DEFAULTS, $this.data(), typeof option == 'object' && option)\n\t var action = typeof option == 'string' ? option : options.slide\n\t\n\t if (!data) $this.data('bs.carousel', (data = new Carousel(this, options)))\n\t if (typeof option == 'number') data.to(option)\n\t else if (action) data[action]()\n\t else if (options.interval) data.pause().cycle()\n\t })\n\t }", "function Plugin(option) {\n\t return this.each(function () {\n\t var $this = $(this)\n\t var data = $this.data('bs.carousel')\n\t var options = $.extend({}, Carousel.DEFAULTS, $this.data(), typeof option == 'object' && option)\n\t var action = typeof option == 'string' ? option : options.slide\n\t\n\t if (!data) $this.data('bs.carousel', (data = new Carousel(this, options)))\n\t if (typeof option == 'number') data.to(option)\n\t else if (action) data[action]()\n\t else if (options.interval) data.pause().cycle()\n\t })\n\t }", "function Plugin(option) {\n\t return this.each(function () {\n\t var $this = $(this)\n\t var data = $this.data('bs.carousel')\n\t var options = $.extend({}, Carousel.DEFAULTS, $this.data(), typeof option == 'object' && option)\n\t var action = typeof option == 'string' ? option : options.slide\n\n\t if (!data) $this.data('bs.carousel', (data = new Carousel(this, options)))\n\t if (typeof option == 'number') data.to(option)\n\t else if (action) data[action]()\n\t else if (options.interval) data.pause().cycle()\n\t })\n\t }", "function Plugin(option) {\n\t return this.each(function () {\n\t var $this = $(this)\n\t var data = $this.data('bs.carousel')\n\t var options = $.extend({}, Carousel.DEFAULTS, $this.data(), typeof option == 'object' && option)\n\t var action = typeof option == 'string' ? option : options.slide\n\n\t if (!data) $this.data('bs.carousel', (data = new Carousel(this, options)))\n\t if (typeof option == 'number') data.to(option)\n\t else if (action) data[action]()\n\t else if (options.interval) data.pause().cycle()\n\t })\n\t }", "function Plugin(option) {\n\t return this.each(function () {\n\t var $this = $(this)\n\t var data = $this.data('bs.carousel')\n\t var options = $.extend({}, Carousel.DEFAULTS, $this.data(), typeof option == 'object' && option)\n\t var action = typeof option == 'string' ? option : options.slide\n\n\t if (!data) $this.data('bs.carousel', (data = new Carousel(this, options)))\n\t if (typeof option == 'number') data.to(option)\n\t else if (action) data[action]()\n\t else if (options.interval) data.pause().cycle()\n\t })\n\t }", "function Plugin(option) {\n\t return this.each(function () {\n\t var $this = $(this)\n\t var data = $this.data('bs.carousel')\n\t var options = $.extend({}, Carousel.DEFAULTS, $this.data(), typeof option == 'object' && option)\n\t var action = typeof option == 'string' ? option : options.slide\n\n\t if (!data) $this.data('bs.carousel', (data = new Carousel(this, options)))\n\t if (typeof option == 'number') data.to(option)\n\t else if (action) data[action]()\n\t else if (options.interval) data.pause().cycle()\n\t })\n\t }", "function Plugin(option) {\n\t return this.each(function () {\n\t var $this = $(this)\n\t var data = $this.data('bs.carousel')\n\t var options = $.extend({}, Carousel.DEFAULTS, $this.data(), typeof option == 'object' && option)\n\t var action = typeof option == 'string' ? option : options.slide\n\n\t if (!data) $this.data('bs.carousel', (data = new Carousel(this, options)))\n\t if (typeof option == 'number') data.to(option)\n\t else if (action) data[action]()\n\t else if (options.interval) data.pause().cycle()\n\t })\n\t }", "function Awake () {\n\n\t}", "function Awake () {\n\n\t}", "configure() {\n //if (typeof $.fn.SageMedia == 'undefined') {\n // this.js = '/js/SageMediaManagement.js';\n //}\n //this.css = '//';\n }", "static get pluginConfig() {\n return {\n chain : ['populateHeaderMenu']\n };\n }", "function mainSlider() {\n if ($('.tp-banner').length) {\n $('.tp-banner').revolution({\n delay:9000,\n startwidth:1170,\n startheight: 800,\n hideThumbs:10,\n fullWidth:\"on\",\n forceFullWidth:\"on\",\n onHoverStop:\"off\",\n navigationType:\"none\",\n navigationStyle:\"preview4\",\n spinner:\"off\",\n hideTimerBar:\"on\"\n });\n }\n }", "function Plugin(option) {\n return this.each(function () {\n var $this = $(this)\n var data = $this.data('bs.carousel')\n var options = $.extend({}, Carousel.DEFAULTS, $this.data(), typeof option == 'object' && option)\n var action = typeof option == 'string' ? option : options.slide\n\n if (!data) $this.data('bs.carousel', (data = new Carousel(this, options)))\n if (typeof option == 'number') data.to(option)\n else if (action) data[action]()\n else if (options.interval) data.pause().cycle()\n })\n }", "function CalendarPlugin() {\n}", "function Plugin(option){return this.each(function(){var $this=$(this);var data=$this.data('bs.affix');var options=(typeof option===\"undefined\"?\"undefined\":_typeof2(option))=='object'&&option;if(!data)$this.data('bs.affix',data=new Affix(this,options));if(typeof option=='string')data[option]();});}", "function Plugin(option){return this.each(function(){var $this=$(this);var data=$this.data('bs.affix');var options=(typeof option==='undefined'?'undefined':_typeof(option))=='object'&&option;if(!data)$this.data('bs.affix',data=new Affix(this,options));if(typeof option=='string')data[option]();});}", "function Plugin( element, options ) {\n this.ele = element; \n this.$ele = $(element); \n this.options = $.extend( {}, defaults, options) ; \n \n this._defaults = defaults; \n this._name = pgn; \n\n this.init(); \n }", "function Plugin( element, options ) {\n this.element = element;\n this.options = $.extend( {}, defaults, options) ;\n \n this._defaults = defaults;\n this._name = pluginName;\n this._frame = 1;\n\t\tthis._shakeCounter;\n\t\t\n this.init();\n }", "static get pluginConfig() {\n return {\n chain: ['populateHeaderMenu']\n };\n }", "_setPlugins() {\n this.config.plugins = {\n // Systems\n global: [\n { key: 'RoomSystem', plugin: Systems.RoomSystem, start: false, mapping: 'rooms' },\n { key: 'CursorSystem', plugin: Systems.CursorSystem, start: false, mapping: 'cursors' }\n ],\n // Managers\n scene: [\n { key: 'UpdateManager', plugin: Managers.UpdateManager, mapping: 'updates' },\n { key: 'LightSourceManager', plugin: Managers.LightSourceManager, mapping: 'lightSources' },\n { key: 'LayerManager', plugin: Managers.LayerManager, mapping: 'layers' }\n ]\n };\n }", "function pluginhelpers() {\n //check for loader\n if (settings.loader.length == 0) {\n //create loader element and add to container\n loader = $('<div />', {\n 'id': 'loader'\n })\n settings.target.append(loader);\n settings.loader = loader;\n }\n // if (settings.addmore.length == 0) {\n // //create loader element and add to container\n // addmore = $('<div />', {\n // 'id': 'addmore'\n // })\n // settings.target.append(addmore);\n // settings.addmore = addmore;\n // }\n\n // //bind addmore to further calls\n // settings.addmore.bind('click', loadMore)\n\n //bind controls to videos\n settings.target.on('click', '.control', play_pause);\n }", "constructor() {\n this.plugins = [];\n this.plugins_by_events = [];\n this.callbacks_by_events = [];\n \n window.custom_plugins.concrete = {}; // this is where loaded plugins are stored\n }", "function Plugin(option) {\r\n return this.each(function () {\r\n var $this = $(this)\r\n var data = $this.data('bs.carousel')\r\n var options = $.extend({}, Carousel.DEFAULTS, $this.data(), typeof option == 'object' && option)\r\n var action = typeof option == 'string' ? option : options.slide\r\n\r\n if (!data) $this.data('bs.carousel', (data = new Carousel(this, options)))\r\n if (typeof option == 'number') data.to(option)\r\n else if (action) data[action]()\r\n else if (options.interval) data.pause().cycle()\r\n })\r\n }", "function Plugin(option) {\r\n return this.each(function () {\r\n var $this = $(this)\r\n var data = $this.data('bs.carousel')\r\n var options = $.extend({}, Carousel.DEFAULTS, $this.data(), typeof option == 'object' && option)\r\n var action = typeof option == 'string' ? option : options.slide\r\n\r\n if (!data) $this.data('bs.carousel', (data = new Carousel(this, options)))\r\n if (typeof option == 'number') data.to(option)\r\n else if (action) data[action]()\r\n else if (options.interval) data.pause().cycle()\r\n })\r\n }", "function Plugin(option) {\r\n return this.each(function () {\r\n var $this = $(this)\r\n var data = $this.data('bs.carousel')\r\n var options = $.extend({}, Carousel.DEFAULTS, $this.data(), typeof option == 'object' && option)\r\n var action = typeof option == 'string' ? option : options.slide\r\n\r\n if (!data) $this.data('bs.carousel', (data = new Carousel(this, options)))\r\n if (typeof option == 'number') data.to(option)\r\n else if (action) data[action]()\r\n else if (options.interval) data.pause().cycle()\r\n })\r\n }", "function execPluginCityGmlCode(){\n\n // Get parameters\n var url = document.getElementById(\"cityUrl\").value;\n var alt = document.getElementById(\"cityAltitude\").value;\n var citylat = document.getElementById(\"cityLatPos\").value;\n var citylon = document.getElementById(\"cityLonPos\").value;\n var cityalt = document.getElementById(\"cityAltPos\").value;\n\n // Get ptolemy references\n ptapplet = document.getElementById(\"pTolemy3D\").getSubApplet();\n ptolemy = ptapplet.getPtolemy();\n scene = ptolemy.getScene();\n canvas = ptapplet.getCanvas();\n camera = canvas.getCameraMovement();\n\n // Create icon plugin\n cityPlugin = ptolemy.createInstance(\"org.ptolemy3d.plugin.CityGmlPlugin\");\n cityPlugin.setFileUrl(url);\n cityPlugin.setAltitude(alt);\n\n // Add plugin to the scene.\n scene.getPlugins().addPlugin(cityPlugin);\n\n // Fly to city coordinates\n camera.flyTo(citylat, citylon, cityalt);\n}", "function Plugin( option ) {\n return this.each( function() {\n var $this = $( this )\n var data = $this.data( 'bs.carousel' )\n var options = $.extend( {}, Carousel.DEFAULTS, $this.data(), typeof option == 'object' && option )\n var action = typeof option == 'string' ? option : options.slide\n if ( !data ) $this.data( 'bs.carousel', ( data = new Carousel( this, options ) ) )\n if ( typeof option == 'number' ) data.to( option )\n else if ( action ) data[ action ]()\n else if ( options.interval ) data.pause().cycle()\n } )\n }", "function pluginInit( patternlab ) {\n\n // Create a helper for cleaner console logging.\n const log = (type, ...messages) => console[type](`${pluginName}:`, ...messages);\n\n // Exit if patterlab not set.\n if ( !patternlab ) {\n\n // Report error.\n log('error', 'patternlab object not provided to plugin-init');\n\n // Exit.\n process.exit(1);\n\n }\n\n // Get default plugin configurations.\n var pluginConfig = getPluginFrontendConfig();\n\n // Get project-specific plugin configurations.\n pluginConfig.tabsToAdd = patternlab.config.plugins[pluginName].options.tabsToAdd;\n\n // Write the plugin JSON to the `public/patternlab-components`.\n writeConfigToOutput(patternlab, pluginConfig);\n\n // Get the output path.\n var pluginConfigPathName = path.resolve(patternlab.config.paths.public.root, 'patternlab-components', 'packages');\n\n // Output configurations as JSON.\n try {\n\n fs.outputFileSync(pluginConfigPathName + '/' + pluginName + '.json', JSON.stringify(pluginConfig, null, 2));\n\n } catch (ex) {\n\n log('trace', 'Error occurred while writing pluginFile configuration');\n log('log', ex);\n\n }\n\n // Initialize patternlab plugins if no other plugins have been registered already.\n if( !patternlab.plugins ) patternlab.plugins = [];\n\n // Add the plugin configurations to the patternlab object.\n patternlab.plugins.push(pluginConfig);\n\n // Find plugin files.\n var pluginFiles = glob.sync(path.join(__dirname, '/dist/**/*'));\n\n // Identity component files.\n var componentFiles = [\n 'markup-templating'\n ];\n\n // Load the plugin.\n if( pluginFiles && pluginFiles.length > 0 ) {\n\n // Get JS snippet.\n let tab_frontend_snippet = fs.readFileSync(path.resolve(__dirname + '/src/snippet.js'), 'utf8');\n\n // Load each plugin file.\n pluginFiles.forEach((pluginFile) => {\n\n // Make sure the file exists.\n if ( fs.existsSync(pluginFile) && fs.statSync(pluginFile).isFile() ) {\n\n // Get file paths.\n let relativePath = path.relative(__dirname, pluginFile).replace('dist', '');\n let writePath = path.join(patternlab.config.paths.public.root, 'patternlab-components', 'pattern-lab', pluginName, relativePath);\n\n // A message to future plugin authors:\n // Depending on your plugin's job, you might need to alter the dist file instead of copying.\n // If you are simply copying `dist` files, you can probably do the below:\n // fs.copySync(pluginFile, writePath);\n\n // In this case, we need to alter the `dist` file to loop through our tabs to load as defined in the `package.json`.\n // We are also being a bit lazy here, since we only expect one file.\n let tabJSFileContents = fs.readFileSync(pluginFile, 'utf8');\n\n // Initialize an empty string of parsed JS snippets.\n let snippetString = '';\n\n // Initialize an empty object for loading languages.\n let prismLanguages = {};\n\n // Initialize an empty array for loading components.\n let prismComponents = [];\n\n // Make sure some tabs should be parsed.\n if( pluginConfig.tabsToAdd && pluginConfig.tabsToAdd.length > 0 ) {\n\n // Parse the JS snippet for each tab.\n pluginConfig.tabsToAdd.forEach((lang) => {\n\n // Parse the snippet.\n let tabSnippetLocal = tab_frontend_snippet.replace(/<<type>>/g, lang).replace(/<<typeUC>>/g, lang.toUpperCase());\n\n // Save the snippet.\n snippetString += tabSnippetLocal + EOL;\n\n // Find the language.\n let tabLanguageLocal = loadPrismLanguage(lang);\n\n // Save the language.\n if( !prismLanguages[lang] && tabLanguageLocal ) prismLanguages[lang] = tabLanguageLocal;\n\n });\n\n // Load each component file.\n componentFiles.forEach((componentFile) => {\n\n // Attempt to load the component file.\n const component = loadPrismComponent(componentFile);\n\n // Generate the output file.\n if( component ) prismComponents.push(component);\n\n });\n\n // Generate the output file.\n tabJSFileContents = tabJSFileContents.replace('/*SNIPPETS*/', snippetString).replace('/*LANGUAGES*/', Object.values(prismLanguages).join(EOL)).replace('/*COMPONENTS*/', prismComponents.join('\\n'));\n\n // Save the output file for use in the browser.\n fs.outputFileSync(writePath, tabJSFileContents);\n\n }\n\n }\n\n });\n\n }\n\n // Setup listeners if not already active. We also enable and set the plugin as initialized.\n if( !patternlab.config.plugins ) patternlab.config.plugins = {};\n\n // Attempt to only register events once.\n if( patternlab.config.plugins[pluginName] !== undefined && patternlab.config.plugins[pluginName].enabled && !patternlab.config.plugins[pluginName].initialized ) {\n\n // Register events.\n registerEvents(patternlab);\n\n // Set the plugin initialized flag to `true` to indicate it is installed and ready.\n patternlab.config.plugins[pluginName].initialized = true;\n\n }\n\n}", "function Plugin( element, options ) {\n\t\tthis.$element = $(element);\n this.element = element;\n this.options = $.extend( {}, defaults, options) ;\n this._defaults = defaults;\n this._name = pluginName;\n \n this.init();\n }", "function Plugin(option) {\n return this.each(function () {\n var $this = $(this)\n var data = $this.data('bs.carousel')\n var options = $.extend({}, Carousel.DEFAULTS, $this.data(), typeof option == 'object' && option)\n var action = typeof option == 'string' ? option : options.slide\n\n if ( !data) $this.data('bs.carousel', (data = new Carousel(this, options)))\n if (typeof option == 'number') data.to(option)\n else if (action) data[action]()\n else if (options.interval) data.pause().cycle()\n })\n }" ]
[ "0.6379666", "0.6265333", "0.6264111", "0.6264111", "0.626211", "0.6259165", "0.6186643", "0.6171016", "0.6166579", "0.61048615", "0.6008145", "0.5995487", "0.5995487", "0.5995487", "0.5995487", "0.59917486", "0.5988653", "0.5898087", "0.5879424", "0.5869915", "0.58522534", "0.58522534", "0.5849879", "0.5845338", "0.58368766", "0.58034986", "0.5801923", "0.5790186", "0.5790186", "0.5790186", "0.5790186", "0.57900697", "0.57900697", "0.57900697", "0.57900697", "0.57900697", "0.57852924", "0.57852924", "0.57687265", "0.5748882", "0.5746046", "0.5737352", "0.57353693", "0.5734917", "0.5724591", "0.571996", "0.5707987", "0.57078636", "0.57055277", "0.5672016", "0.56350416", "0.5627178", "0.5627178", "0.5627178", "0.5626402", "0.5615744", "0.56121093", "0.5599867", "0.5586978" ]
0.0
-1
COLLAPSE PLUGIN DEFINITION ==========================
function Plugin(option) { return this.each(function () { var $this = $(this) var data = $this.data('bs.collapse') var options = $.extend({}, Collapse.DEFAULTS, $this.data(), typeof option == 'object' && option) if (!data && options.toggle && /show|hide/.test(option)) options.toggle = false if (!data) $this.data('bs.collapse', (data = new Collapse(this, options))) if (typeof option == 'string') data[option]() }) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "collapseMenu() {\r\n\t}", "function Plugin(option) {\n\t return this.each(function () {\n\t var $this = $(this)\n\t var data = $this.data('bs.collapse')\n\t var options = $.extend({}, Collapse.DEFAULTS, $this.data(), typeof option == 'object' && option)\n\t\n\t if (!data && options.toggle && option == 'show') options.toggle = false\n\t if (!data) $this.data('bs.collapse', (data = new Collapse(this, options)))\n\t if (typeof option == 'string') data[option]()\n\t })\n\t }", "function Plugin(option) {\n return this.each(function () {\n var $this = $(this)\n var data = $this.data('bs.collapse')\n var options = $.extend({}, Collapse.DEFAULTS, $this.data(), typeof option == 'object' && option)\n \n if (!data && options.toggle && /show|hide/.test(option)) options.toggle = false\n if (!data) $this.data('bs.collapse', (data = new Collapse(this, options)))\n if (typeof option == 'string') data[option]()\n })\n }", "function Plugin(option) {\n\t return this.each(function () {\n\t var $this = $(this)\n\t var data = $this.data('bs.collapse')\n\t var options = $.extend({}, Collapse.DEFAULTS, $this.data(), typeof option == 'object' && option)\n\t\n\t if (!data && options.toggle && /show|hide/.test(option)) options.toggle = false\n\t if (!data) $this.data('bs.collapse', (data = new Collapse(this, options)))\n\t if (typeof option == 'string') data[option]()\n\t })\n\t }", "function Plugin(option) {\n\t return this.each(function () {\n\t var $this = $(this)\n\t var data = $this.data('bs.collapse')\n\t var options = $.extend({}, Collapse.DEFAULTS, $this.data(), typeof option == 'object' && option)\n\t\n\t if (!data && options.toggle && /show|hide/.test(option)) options.toggle = false\n\t if (!data) $this.data('bs.collapse', (data = new Collapse(this, options)))\n\t if (typeof option == 'string') data[option]()\n\t })\n\t }", "function Plugin(option) {\n\t return this.each(function () {\n\t var $this = $(this)\n\t var data = $this.data('bs.collapse')\n\t var options = $.extend({}, Collapse.DEFAULTS, $this.data(), typeof option == 'object' && option)\n\t\n\t if (!data && options.toggle && /show|hide/.test(option)) options.toggle = false\n\t if (!data) $this.data('bs.collapse', (data = new Collapse(this, options)))\n\t if (typeof option == 'string') data[option]()\n\t })\n\t }", "function Plugin(option) {\n\t return this.each(function () {\n\t var $this = $(this)\n\t var data = $this.data('bs.collapse')\n\t var options = $.extend({}, Collapse.DEFAULTS, $this.data(), typeof option == 'object' && option)\n\n\t if (!data && options.toggle && /show|hide/.test(option)) options.toggle = false\n\t if (!data) $this.data('bs.collapse', (data = new Collapse(this, options)))\n\t if (typeof option == 'string') data[option]()\n\t })\n\t }", "function Plugin(option) {\n\t return this.each(function () {\n\t var $this = $(this)\n\t var data = $this.data('bs.collapse')\n\t var options = $.extend({}, Collapse.DEFAULTS, $this.data(), typeof option == 'object' && option)\n\n\t if (!data && options.toggle && /show|hide/.test(option)) options.toggle = false\n\t if (!data) $this.data('bs.collapse', (data = new Collapse(this, options)))\n\t if (typeof option == 'string') data[option]()\n\t })\n\t }", "function Plugin(option) {\n\t return this.each(function () {\n\t var $this = $(this)\n\t var data = $this.data('bs.collapse')\n\t var options = $.extend({}, Collapse.DEFAULTS, $this.data(), typeof option == 'object' && option)\n\n\t if (!data && options.toggle && /show|hide/.test(option)) options.toggle = false\n\t if (!data) $this.data('bs.collapse', (data = new Collapse(this, options)))\n\t if (typeof option == 'string') data[option]()\n\t })\n\t }", "function Plugin(option) {\n\t return this.each(function () {\n\t var $this = $(this)\n\t var data = $this.data('bs.collapse')\n\t var options = $.extend({}, Collapse.DEFAULTS, $this.data(), typeof option == 'object' && option)\n\n\t if (!data && options.toggle && /show|hide/.test(option)) options.toggle = false\n\t if (!data) $this.data('bs.collapse', (data = new Collapse(this, options)))\n\t if (typeof option == 'string') data[option]()\n\t })\n\t }", "function Plugin(option) {\n\t return this.each(function () {\n\t var $this = $(this)\n\t var data = $this.data('bs.collapse')\n\t var options = $.extend({}, Collapse.DEFAULTS, $this.data(), typeof option == 'object' && option)\n\n\t if (!data && options.toggle && /show|hide/.test(option)) options.toggle = false\n\t if (!data) $this.data('bs.collapse', (data = new Collapse(this, options)))\n\t if (typeof option == 'string') data[option]()\n\t })\n\t }", "function Plugin(option) {\n return this.each(function () {\n var $this = $(this)\n var data = $this.data('bs.collapse')\n var options = $.extend({}, Collapse.DEFAULTS, $this.data(), typeof option == 'object' && option)\n\n if (!data && options.toggle && /show|hide/.test(option)) options.toggle = false\n if (!data) $this.data('bs.collapse', (data = new Collapse(this, options)))\n if (typeof option == 'string') data[option]()\n })\n }", "function Plugin(option) {\n return this.each(function () {\n var $this = $(this)\n var data = $this.data('bs.collapse')\n var options = $.extend({}, Collapse.DEFAULTS, $this.data(), typeof option == 'object' && option)\n\n if (!data && options.toggle && option == 'show') options.toggle = false\n if (!data) $this.data('bs.collapse', (data = new Collapse(this, options)))\n if (typeof option == 'string') data[option]()\n })\n }", "function Plugin(option) {\n return this.each(function () {\n var $this = $(this)\n var data = $this.data('bs.collapse')\n var options = $.extend({}, Collapse.DEFAULTS, $this.data(), typeof option == 'object' && option)\n\n if (!data && options.toggle && option == 'show') options.toggle = false\n if (!data) $this.data('bs.collapse', (data = new Collapse(this, options)))\n if (typeof option == 'string') data[option]()\n })\n }", "function Plugin(option) {\n return this.each(function () {\n var $this = $(this)\n var data = $this.data('bs.collapse')\n var options = $.extend({}, Collapse.DEFAULTS, $this.data(), typeof option == 'object' && option)\n\n if (!data && options.toggle && option == 'show') options.toggle = false\n if (!data) $this.data('bs.collapse', (data = new Collapse(this, options)))\n if (typeof option == 'string') data[option]()\n })\n }", "function Plugin(option) {\n return this.each(function () {\n var $this = $(this)\n var data = $this.data('bs.collapse')\n var options = $.extend({}, Collapse.DEFAULTS, $this.data(), typeof option == 'object' && option)\n\n if (!data && options.toggle && option == 'show') options.toggle = false\n if (!data) $this.data('bs.collapse', (data = new Collapse(this, options)))\n if (typeof option == 'string') data[option]()\n })\n }", "function Plugin(option) {\n return this.each(function () {\n var $this = $(this)\n var data = $this.data('bs.collapse')\n var options = $.extend({}, Collapse.DEFAULTS, $this.data(), typeof option == 'object' && option)\n\n if (!data && options.toggle && option == 'show') options.toggle = false\n if (!data) $this.data('bs.collapse', (data = new Collapse(this, options)))\n if (typeof option == 'string') data[option]()\n })\n }", "function Plugin(option) {\n return this.each(function () {\n var $this = $(this)\n var data = $this.data('bs.collapse')\n var options = $.extend({}, Collapse.DEFAULTS, $this.data(), typeof option == 'object' && option)\n\n if (!data && options.toggle && option == 'show') options.toggle = false\n if (!data) $this.data('bs.collapse', (data = new Collapse(this, options)))\n if (typeof option == 'string') data[option]()\n })\n }", "function Plugin(option) {\n return this.each(function () {\n var $this = $(this)\n var data = $this.data('bs.collapse')\n var options = $.extend({}, Collapse.DEFAULTS, $this.data(), typeof option == 'object' && option)\n\n if (!data && options.toggle && option == 'show') options.toggle = false\n if (!data) $this.data('bs.collapse', (data = new Collapse(this, options)))\n if (typeof option == 'string') data[option]()\n })\n }", "function Plugin(option) {\n return this.each(function () {\n var $this = $(this)\n var data = $this.data('bs.collapse')\n var options = $.extend({}, Collapse.DEFAULTS, $this.data(), typeof option == 'object' && option)\n\n if (!data && options.toggle && option == 'show') options.toggle = false\n if (!data) $this.data('bs.collapse', (data = new Collapse(this, options)))\n if (typeof option == 'string') data[option]()\n })\n }", "function Plugin(option) {\n return this.each(function () {\n var $this = $(this)\n var data = $this.data('bs.collapse')\n var options = $.extend({}, Collapse.DEFAULTS, $this.data(), typeof option == 'object' && option)\n\n if (!data && options.toggle && option == 'show') options.toggle = false\n if (!data) $this.data('bs.collapse', (data = new Collapse(this, options)))\n if (typeof option == 'string') data[option]()\n })\n }", "function Plugin(option) {\n return this.each(function () {\n var $this = $(this)\n var data = $this.data('bs.collapse')\n var options = $.extend({}, Collapse.DEFAULTS, $this.data(), typeof option == 'object' && option)\n\n if (!data && options.toggle && option == 'show') options.toggle = false\n if (!data) $this.data('bs.collapse', (data = new Collapse(this, options)))\n if (typeof option == 'string') data[option]()\n })\n }", "function Plugin(option) {\n return this.each(function () {\n var $this = $(this)\n var data = $this.data('bs.collapse')\n var options = $.extend({}, Collapse.DEFAULTS, $this.data(), typeof option == 'object' && option)\n\n if (!data && options.toggle && option == 'show') options.toggle = false\n if (!data) $this.data('bs.collapse', (data = new Collapse(this, options)))\n if (typeof option == 'string') data[option]()\n })\n }", "function Plugin(option) {\n return this.each(function () {\n var $this = $(this)\n var data = $this.data('bs.collapse')\n var options = $.extend({}, Collapse.DEFAULTS, $this.data(), typeof option == 'object' && option)\n\n if (!data && options.toggle && option == 'show') options.toggle = false\n if (!data) $this.data('bs.collapse', (data = new Collapse(this, options)))\n if (typeof option == 'string') data[option]()\n })\n }", "function Plugin(option) {\n return this.each(function () {\n var $this = $(this)\n var data = $this.data('bs.collapse')\n var options = $.extend({}, Collapse.DEFAULTS, $this.data(), typeof option == 'object' && option)\n\n if (!data && options.toggle && option == 'show') options.toggle = false\n if (!data) $this.data('bs.collapse', (data = new Collapse(this, options)))\n if (typeof option == 'string') data[option]()\n })\n }", "function Plugin(option) {\n return this.each(function () {\n var $this = $(this)\n var data = $this.data('bs.collapse')\n var options = $.extend({}, Collapse.DEFAULTS, $this.data(), typeof option == 'object' && option)\n\n if (!data && options.toggle && option == 'show') options.toggle = false\n if (!data) $this.data('bs.collapse', (data = new Collapse(this, options)))\n if (typeof option == 'string') data[option]()\n })\n }", "function Plugin( option ) {\n return this.each( function() {\n var $this = $( this )\n var data = $this.data( 'bs.collapse' )\n var options = $.extend( {}, Collapse.DEFAULTS, $this.data(), typeof option == 'object' && option )\n if ( !data && options.toggle && option == 'show' ) options.toggle = false\n if ( !data ) $this.data( 'bs.collapse', ( data = new Collapse( this, options ) ) )\n if ( typeof option == 'string' ) data[ option ]()\n } )\n }", "function Plugin(option) {\n return this.each(function () {\n var $this = $(this)\n var data = $this.data('bs.collapse')\n var options = $.extend({}, Collapse.DEFAULTS, $this.data(), typeof option == 'object' && option)\n\n if (!data && options.toggle && /show|hide/.test(option)) options.toggle = false\n if (!data) $this.data('bs.collapse', (data = new Collapse(this, options)))\n if (typeof option == 'string') data[option]()\n })\n }", "function Plugin(option) {\n return this.each(function () {\n var $this = $(this)\n var data = $this.data('bs.collapse')\n var options = $.extend({}, Collapse.DEFAULTS, $this.data(), typeof option == 'object' && option)\n\n if (!data && options.toggle && option == 'show') option = !option\n if (!data) $this.data('bs.collapse', (data = new Collapse(this, options)))\n if (typeof option == 'string') data[option]()\n })\n }", "function Plugin(option) {\n return this.each(function () {\n var $this = $(this)\n var data = $this.data('bs.collapse')\n var options = $.extend({}, Collapse.DEFAULTS, $this.data(), typeof option == 'object' && option)\n\n if (!data && options.toggle && option == 'show') option = !option\n if (!data) $this.data('bs.collapse', (data = new Collapse(this, options)))\n if (typeof option == 'string') data[option]()\n })\n }", "function Plugin(option) {\n return this.each(function () {\n var $this = $(this)\n var data = $this.data('bs.collapse')\n var options = $.extend({}, Collapse.DEFAULTS, $this.data(), typeof option == 'object' && option)\n\n if (!data && options.toggle && option == 'show') option = !option\n if (!data) $this.data('bs.collapse', (data = new Collapse(this, options)))\n if (typeof option == 'string') data[option]()\n })\n }", "function Plugin(option) {\n return this.each(function () {\n var $this = $(this)\n var data = $this.data('bs.collapse')\n var options = $.extend({}, Collapse.DEFAULTS, $this.data(), typeof option == 'object' && option)\n\n if (!data && options.toggle && option == 'show') option = !option\n if (!data) $this.data('bs.collapse', (data = new Collapse(this, options)))\n if (typeof option == 'string') data[option]()\n })\n }", "function Plugin(option) {\n return this.each(function () {\n var $this = $(this)\n var data = $this.data('bs.collapse')\n var options = $.extend({}, Collapse.DEFAULTS, $this.data(), typeof option == 'object' && option)\n\n if (!data && options.toggle && option == 'show') option = !option\n if (!data) $this.data('bs.collapse', (data = new Collapse(this, options)))\n if (typeof option == 'string') data[option]()\n })\n }", "function Plugin(option) {\n return this.each(function () {\n var $this = $(this)\n var data = $this.data('bs.collapse')\n var options = $.extend({}, Collapse.DEFAULTS, $this.data(), typeof option == 'object' && option)\n\n if (!data && options.toggle && option == 'show') option = !option\n if (!data) $this.data('bs.collapse', (data = new Collapse(this, options)))\n if (typeof option == 'string') data[option]()\n })\n }", "function Plugin(option) {\n return this.each(function () {\n var $this = $(this)\n var data = $this.data('bs.collapse')\n var options = $.extend({}, Collapse.DEFAULTS, $this.data(), typeof option == 'object' && option)\n\n if (!data && options.toggle && option == 'show') option = !option\n if (!data) $this.data('bs.collapse', (data = new Collapse(this, options)))\n if (typeof option == 'string') data[option]()\n })\n }", "function Plugin(option) {\n return this.each(function () {\n var $this = $(this)\n var data = $this.data('bs.collapse')\n var options = $.extend({}, Collapse.DEFAULTS, $this.data(), typeof option == 'object' && option)\n\n if (!data && options.toggle && option == 'show') option = !option\n if (!data) $this.data('bs.collapse', (data = new Collapse(this, options)))\n if (typeof option == 'string') data[option]()\n })\n }", "function Plugin(option) {\n return this.each(function () {\n var $this = $(this)\n var data = $this.data('bs.collapse')\n var options = $.extend({}, Collapse.DEFAULTS, $this.data(), typeof option == 'object' && option)\n\n if (!data && options.toggle && option == 'show') option = !option\n if (!data) $this.data('bs.collapse', (data = new Collapse(this, options)))\n if (typeof option == 'string') data[option]()\n })\n }", "function Plugin(option) {\n return this.each(function () {\n var $this = $(this)\n var data = $this.data('bs.collapse')\n var options = $.extend({}, Collapse.DEFAULTS, $this.data(), typeof option == 'object' && option)\n\n if (!data && options.toggle && option == 'show') option = !option\n if (!data) $this.data('bs.collapse', (data = new Collapse(this, options)))\n if (typeof option == 'string') data[option]()\n })\n }", "function Plugin(option) {\n return this.each(function () {\n var $this = $(this)\n var data = $this.data('bs.collapse')\n var options = $.extend({}, Collapse.DEFAULTS, $this.data(), typeof option == 'object' && option)\n\n if (!data && options.toggle && option == 'show') option = !option\n if (!data) $this.data('bs.collapse', (data = new Collapse(this, options)))\n if (typeof option == 'string') data[option]()\n })\n }", "function Plugin(option) {\n return this.each(function () {\n var $this = $(this)\n var data = $this.data('bs.collapse')\n var options = $.extend({}, Collapse.DEFAULTS, $this.data(), typeof option == 'object' && option)\n\n if (!data && options.toggle && option == 'show') option = !option\n if (!data) $this.data('bs.collapse', (data = new Collapse(this, options)))\n if (typeof option == 'string') data[option]()\n })\n }", "function Plugin(option) {\n return this.each(function () {\n var $this = $(this)\n var data = $this.data('bs.collapse')\n var options = $.extend({}, Collapse.DEFAULTS, $this.data(), typeof option == 'object' && option)\n\n if (!data && options.toggle && option == 'show') option = !option\n if (!data) $this.data('bs.collapse', (data = new Collapse(this, options)))\n if (typeof option == 'string') data[option]()\n })\n }", "function Plugin(option) {\n return this.each(function () {\n var $this = $(this)\n var data = $this.data('bs.collapse')\n var options = $.extend({}, Collapse.DEFAULTS, $this.data(), typeof option == 'object' && option)\n\n if (!data && options.toggle && option == 'show') option = !option\n if (!data) $this.data('bs.collapse', (data = new Collapse(this, options)))\n if (typeof option == 'string') data[option]()\n })\n }", "function Plugin(option) {\n return this.each(function () {\n var $this = $(this)\n var data = $this.data('bs.collapse')\n var options = $.extend({}, Collapse.DEFAULTS, $this.data(), typeof option == 'object' && option)\n\n if (!data && options.toggle && option == 'show') option = !option\n if (!data) $this.data('bs.collapse', (data = new Collapse(this, options)))\n if (typeof option == 'string') data[option]()\n })\n }", "function Plugin(option) {\n return this.each(function () {\n var $this = $(this)\n var data = $this.data('bs.collapse')\n var options = $.extend({}, Collapse.DEFAULTS, $this.data(), typeof option == 'object' && option)\n\n if (!data && options.toggle && option == 'show') option = !option\n if (!data) $this.data('bs.collapse', (data = new Collapse(this, options)))\n if (typeof option == 'string') data[option]()\n })\n }", "function Plugin(option) {\n return this.each(function () {\n var $this = $(this)\n var data = $this.data('bs.collapse')\n var options = $.extend({}, Collapse.DEFAULTS, $this.data(), typeof option == 'object' && option)\n\n if ( !data && options.toggle && option == 'show') option = !option\n if ( !data) $this.data('bs.collapse', (data = new Collapse(this, options)))\n if (typeof option == 'string') data[option]()\n })\n }" ]
[ "0.64858043", "0.62959516", "0.62379456", "0.62360334", "0.62360334", "0.62360334", "0.6226784", "0.6226784", "0.6226784", "0.6226784", "0.6226784", "0.611942", "0.611882", "0.611882", "0.611882", "0.611882", "0.611882", "0.611882", "0.611882", "0.611882", "0.611882", "0.611882", "0.611882", "0.611882", "0.611882", "0.611882", "0.6101677", "0.6085216", "0.60680336", "0.60680336", "0.60680336", "0.60680336", "0.60680336", "0.60680336", "0.60680336", "0.60680336", "0.60680336", "0.60680336", "0.60680336", "0.60680336", "0.60680336", "0.60680336", "0.60680336", "0.60680336", "0.60605645" ]
0.0
-1
DROPDOWN PLUGIN DEFINITION ==========================
function Plugin(option) { return this.each(function () { var $this = $(this) var data = $this.data('bs.dropdown') if (!data) $this.data('bs.dropdown', (data = new Dropdown(this))) if (typeof option == 'string') data[option].call($this) }) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function Plugin(option){return this.each(function(){var $this=$(this);var data=$this.data('bs.dropdown');if(!data)$this.data('bs.dropdown',data=new Dropdown(this));if(typeof option=='string')data[option].call($this);});}", "function Plugin(option){return this.each(function(){var $this=$(this);var data=$this.data('bs.dropdown');if(!data)$this.data('bs.dropdown',data=new Dropdown(this));if(typeof option=='string')data[option].call($this);});}", "function McDropdownPanel() { }", "function helper(){\n $(\"#ylwdrop\").show();\n}", "function Plugin(option) {\n\t return this.each(function () {\n\t var $this = $(this)\n\t var data = $this.data('bs.dropdown')\n\t\n\t if (!data) $this.data('bs.dropdown', (data = new Dropdown(this)))\n\t if (typeof option == 'string') data[option].call($this)\n\t })\n\t }", "function Plugin(option) {\n\t return this.each(function () {\n\t var $this = $(this)\n\t var data = $this.data('bs.dropdown')\n\t\n\t if (!data) $this.data('bs.dropdown', (data = new Dropdown(this)))\n\t if (typeof option == 'string') data[option].call($this)\n\t })\n\t }", "function Plugin(option) {\n\t return this.each(function () {\n\t var $this = $(this)\n\t var data = $this.data('bs.dropdown')\n\t\n\t if (!data) $this.data('bs.dropdown', (data = new Dropdown(this)))\n\t if (typeof option == 'string') data[option].call($this)\n\t })\n\t }", "function Plugin(option) {\n\t return this.each(function () {\n\t var $this = $(this)\n\t var data = $this.data('bs.dropdown')\n\t\n\t if (!data) $this.data('bs.dropdown', (data = new Dropdown(this)))\n\t if (typeof option == 'string') data[option].call($this)\n\t })\n\t }", "function Plugin(option) {\n\t return this.each(function () {\n\t var $this = $(this)\n\t var data = $this.data('bs.dropdown')\n\t\n\t if (!data) $this.data('bs.dropdown', (data = new Dropdown(this)))\n\t if (typeof option == 'string') data[option].call($this)\n\t })\n\t }", "function Plugin(option) {\n\t return this.each(function () {\n\t var $this = $(this)\n\t var data = $this.data('bs.dropdown')\n\n\t if (!data) $this.data('bs.dropdown', (data = new Dropdown(this)))\n\t if (typeof option == 'string') data[option].call($this)\n\t })\n\t }", "function Plugin(option) {\n\t return this.each(function () {\n\t var $this = $(this)\n\t var data = $this.data('bs.dropdown')\n\n\t if (!data) $this.data('bs.dropdown', (data = new Dropdown(this)))\n\t if (typeof option == 'string') data[option].call($this)\n\t })\n\t }", "function Plugin(option) {\n\t return this.each(function () {\n\t var $this = $(this)\n\t var data = $this.data('bs.dropdown')\n\n\t if (!data) $this.data('bs.dropdown', (data = new Dropdown(this)))\n\t if (typeof option == 'string') data[option].call($this)\n\t })\n\t }", "function Plugin(option) {\n\t return this.each(function () {\n\t var $this = $(this)\n\t var data = $this.data('bs.dropdown')\n\n\t if (!data) $this.data('bs.dropdown', (data = new Dropdown(this)))\n\t if (typeof option == 'string') data[option].call($this)\n\t })\n\t }", "function Plugin(option) {\n\t return this.each(function () {\n\t var $this = $(this)\n\t var data = $this.data('bs.dropdown')\n\n\t if (!data) $this.data('bs.dropdown', (data = new Dropdown(this)))\n\t if (typeof option == 'string') data[option].call($this)\n\t })\n\t }", "function Plugin(option) {\n return this.each(function () {\n var $this = $(this)\n var data = $this.data('bs.dropdown')\n\n if (!data) $this.data('bs.dropdown', (data = new Dropdown(this)))\n if (typeof option == 'string') data[option].call($this)\n })\n }", "function init_dash() {\n dropDown();\n}", "function Plugin( option ) {\n return this.each( function() {\n var $this = $( this )\n var data = $this.data( 'bs.dropdown' )\n if ( !data ) $this.data( 'bs.dropdown', ( data = new Dropdown( this ) ) )\n if ( typeof option == 'string' ) data[ option ].call( $this )\n } )\n }", "function Plugin(option) {\n return this.each(function () {\n var $this = $(this);\n var data = $this.data('bs.dropdown');\n\n if (!data) $this.data('bs.dropdown', (data = new Dropdown(this)));\n if (typeof option == 'string') data[option].call($this);\n });\n }", "function Plugin(option) {\n return this.each(function () {\n var $this = $(this);\n var data = $this.data('bs.dropdown');\n\n if (!data) $this.data('bs.dropdown', (data = new Dropdown(this)));\n if (typeof option == 'string') data[option].call($this);\n });\n }", "function Plugin(option){return this.each(function(){var $this=$(this);var data=$this.data('bs.button');var options=(typeof option===\"undefined\"?\"undefined\":_typeof2(option))=='object'&&option;if(!data)$this.data('bs.button',data=new Button(this,options));if(option=='toggle')data.toggle();else if(option)data.setState(option);});}", "function Plugin(option) {\r\n return this.each(function () {\r\n var $this = $(this)\r\n var data = $this.data('bs.dropdown')\r\n\r\n if (!data) $this.data('bs.dropdown', (data = new Dropdown(this)))\r\n if (typeof option == 'string') data[option].call($this)\r\n })\r\n }", "function Plugin(option) {\r\n return this.each(function () {\r\n var $this = $(this)\r\n var data = $this.data('bs.dropdown')\r\n\r\n if (!data) $this.data('bs.dropdown', (data = new Dropdown(this)))\r\n if (typeof option == 'string') data[option].call($this)\r\n })\r\n }", "function Plugin(option) {\r\n return this.each(function () {\r\n var $this = $(this)\r\n var data = $this.data('bs.dropdown')\r\n\r\n if (!data) $this.data('bs.dropdown', (data = new Dropdown(this)))\r\n if (typeof option == 'string') data[option].call($this)\r\n })\r\n }", "function Plugin(option) {\r\n return this.each(function () {\r\n var $this = $(this)\r\n var data = $this.data('bs.dropdown')\r\n\r\n if (!data) $this.data('bs.dropdown', (data = new Dropdown(this)))\r\n if (typeof option == 'string') data[option].call($this)\r\n })\r\n }" ]
[ "0.6855298", "0.6855298", "0.65427923", "0.63471085", "0.6315303", "0.6315303", "0.6315303", "0.6315303", "0.6315303", "0.6297622", "0.6297622", "0.6297622", "0.6297622", "0.6297622", "0.627536", "0.6171215", "0.61269915", "0.6117604", "0.6117604", "0.6079827", "0.60632604", "0.60632604", "0.60632604", "0.60632604" ]
0.0
-1
MODAL PLUGIN DEFINITION =======================
function Plugin(option, _relatedTarget) { return this.each(function () { var $this = $(this) var data = $this.data('bs.modal') var options = $.extend({}, Modal.DEFAULTS, $this.data(), typeof option == 'object' && option) if (!data) $this.data('bs.modal', (data = new Modal(this, options))) if (typeof option == 'string') data[option](_relatedTarget) else if (options.show) data.show(_relatedTarget) }) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function Plugin(option,_relatedTarget){return this.each(function(){var $this=$(this);var data=$this.data('bs.modal');var options=$.extend({},Modal.DEFAULTS,$this.data(),(typeof option==='undefined'?'undefined':_typeof(option))=='object'&&option);if(!data)$this.data('bs.modal',data=new Modal(this,options));if(typeof option=='string')data[option](_relatedTarget);else if(options.show)data.show(_relatedTarget);});}", "function Plugin(option,_relatedTarget){return this.each(function(){var $this=$(this);var data=$this.data('bs.modal');var options=$.extend({},Modal.DEFAULTS,$this.data(),(typeof option===\"undefined\"?\"undefined\":_typeof2(option))=='object'&&option);if(!data)$this.data('bs.modal',data=new Modal(this,options));if(typeof option=='string')data[option](_relatedTarget);else if(options.show)data.show(_relatedTarget);});}", "function Plugin(option, _relatedTarget) {\n return this.each(function () {\n var $this = $(this)\n var data = $this.data('bs.modal')\n var options = $.extend({}, SIAModal.DEFAULTS, $this.data(), typeof option == 'object' && option)\n\n if (!data) $this.data('bs.modal', (data = new SIAModal(this, options)))\n if (typeof option == 'string') data[option](_relatedTarget)\n else if (options.show) data.show(_relatedTarget)\n })\n }", "function Plugin(option, _relatedTarget) {\n\t return this.each(function () {\n\t var $this = $(this)\n\t var data = $this.data('bs.modal')\n\t var options = $.extend({}, Modal.DEFAULTS, $this.data(), typeof option == 'object' && option)\n\t\n\t if (!data) $this.data('bs.modal', (data = new Modal(this, options)))\n\t if (typeof option == 'string') data[option](_relatedTarget)\n\t else if (options.show) data.show(_relatedTarget)\n\t })\n\t }", "function Plugin(option, _relatedTarget) {\n\t return this.each(function () {\n\t var $this = $(this)\n\t var data = $this.data('bs.modal')\n\t var options = $.extend({}, Modal.DEFAULTS, $this.data(), typeof option == 'object' && option)\n\t\n\t if (!data) $this.data('bs.modal', (data = new Modal(this, options)))\n\t if (typeof option == 'string') data[option](_relatedTarget)\n\t else if (options.show) data.show(_relatedTarget)\n\t })\n\t }", "function Plugin(option, _relatedTarget) {\n\t return this.each(function () {\n\t var $this = $(this)\n\t var data = $this.data('bs.modal')\n\t var options = $.extend({}, Modal.DEFAULTS, $this.data(), typeof option == 'object' && option)\n\t\n\t if (!data) $this.data('bs.modal', (data = new Modal(this, options)))\n\t if (typeof option == 'string') data[option](_relatedTarget)\n\t else if (options.show) data.show(_relatedTarget)\n\t })\n\t }", "function Plugin(option, _relatedTarget) {\n\t return this.each(function () {\n\t var $this = $(this)\n\t var data = $this.data('bs.modal')\n\t var options = $.extend({}, Modal.DEFAULTS, $this.data(), typeof option == 'object' && option)\n\t\n\t if (!data) $this.data('bs.modal', (data = new Modal(this, options)))\n\t if (typeof option == 'string') data[option](_relatedTarget)\n\t else if (options.show) data.show(_relatedTarget)\n\t })\n\t }", "function Plugin(option, _relatedTarget) {\n\t return this.each(function () {\n\t var $this = $(this)\n\t var data = $this.data('bs.modal')\n\t var options = $.extend({}, Modal.DEFAULTS, $this.data(), typeof option == 'object' && option)\n\t\n\t if (!data) $this.data('bs.modal', (data = new Modal(this, options)))\n\t if (typeof option == 'string') data[option](_relatedTarget)\n\t else if (options.show) data.show(_relatedTarget)\n\t })\n\t }", "function Plugin(option, _relatedTarget) {\n return this.each(function () {\n var $this = $(this)\n var data = $this.data('bs.modal')\n var options = $.extend({}, Modal.DEFAULTS, $this.data(), typeof option == 'object' && option)\n\n if (!data) $this.data('bs.modal', (data = new Modal(this, options)))\n if (typeof option == 'string') data[option](_relatedTarget)\n else if (options.show) data.show(_relatedTarget)\n })\n }", "function Plugin(option, _relatedTarget) {\n\t return this.each(function () {\n\t var $this = $(this)\n\t var data = $this.data('bs.modal')\n\t var options = $.extend({}, Modal.DEFAULTS, $this.data(), typeof option == 'object' && option)\n\n\t if (!data) $this.data('bs.modal', (data = new Modal(this, options)))\n\t if (typeof option == 'string') data[option](_relatedTarget)\n\t else if (options.show) data.show(_relatedTarget)\n\t })\n\t }", "function Plugin(option, _relatedTarget) {\n\t return this.each(function () {\n\t var $this = $(this)\n\t var data = $this.data('bs.modal')\n\t var options = $.extend({}, Modal.DEFAULTS, $this.data(), typeof option == 'object' && option)\n\n\t if (!data) $this.data('bs.modal', (data = new Modal(this, options)))\n\t if (typeof option == 'string') data[option](_relatedTarget)\n\t else if (options.show) data.show(_relatedTarget)\n\t })\n\t }", "function Plugin(option, _relatedTarget) {\n\t return this.each(function () {\n\t var $this = $(this)\n\t var data = $this.data('bs.modal')\n\t var options = $.extend({}, Modal.DEFAULTS, $this.data(), typeof option == 'object' && option)\n\n\t if (!data) $this.data('bs.modal', (data = new Modal(this, options)))\n\t if (typeof option == 'string') data[option](_relatedTarget)\n\t else if (options.show) data.show(_relatedTarget)\n\t })\n\t }", "function Plugin(option, _relatedTarget) {\n\t return this.each(function () {\n\t var $this = $(this)\n\t var data = $this.data('bs.modal')\n\t var options = $.extend({}, Modal.DEFAULTS, $this.data(), typeof option == 'object' && option)\n\n\t if (!data) $this.data('bs.modal', (data = new Modal(this, options)))\n\t if (typeof option == 'string') data[option](_relatedTarget)\n\t else if (options.show) data.show(_relatedTarget)\n\t })\n\t }", "function Plugin(option, _relatedTarget) {\n\t return this.each(function () {\n\t var $this = $(this)\n\t var data = $this.data('bs.modal')\n\t var options = $.extend({}, Modal.DEFAULTS, $this.data(), typeof option == 'object' && option)\n\n\t if (!data) $this.data('bs.modal', (data = new Modal(this, options)))\n\t if (typeof option == 'string') data[option](_relatedTarget)\n\t else if (options.show) data.show(_relatedTarget)\n\t })\n\t }", "function Plugin( option, _relatedTarget ) {\n return this.each( function() {\n var $this = $( this )\n var data = $this.data( 'bs.modal' )\n var options = $.extend( {}, Modal.DEFAULTS, $this.data(), typeof option == 'object' && option )\n if ( !data ) $this.data( 'bs.modal', ( data = new Modal( this, options ) ) )\n if ( typeof option == 'string' ) data[ option ]( _relatedTarget )\n else if ( options.show ) data.show( _relatedTarget )\n } )\n }", "function Plugin(option, _relatedTarget) {\n \treturn this.each(function () {\n \t\tvar $this = $(this)\n \t\tvar data = $this.data('bs.modal')\n \t\tvar options = $.extend({}, Modal.DEFAULTS, $this.data(), typeof option == 'object' && option)\n\n \t\tif (!data) $this.data('bs.modal', (data = new Modal(this, options)))\n \t\t\tif (typeof option == 'string') data[option](_relatedTarget)\n \t\t\t\telse if (options.show) data.show(_relatedTarget)\n \t\t\t})\n }", "function Plugin(option, _relatedTarget) {\n return this.each(function () {\n var $this = $(this)\n var data = $this.data('bs.modal')\n var options = $.extend({}, Modal.DEFAULTS, $this.data(), typeof option == 'object' && option)\n\n if (!data) $this.data('bs.modal', (data = new Modal(this, options)))\n if (typeof option == 'string') data[option](_relatedTarget)\n else if (options.show) data.show(_relatedTarget)\n })\n }", "function Plugin(option, _relatedTarget) {\n return this.each(function () {\n var $this = $(this)\n var data = $this.data('bs.modal')\n var options = $.extend({}, Modal.DEFAULTS, $this.data(), typeof option == 'object' && option)\n\n if (!data) $this.data('bs.modal', (data = new Modal(this, options)))\n if (typeof option == 'string') data[option](_relatedTarget)\n else if (options.show) data.show(_relatedTarget)\n })\n }", "function Plugin(option, _relatedTarget) {\n return this.each(function () {\n var $this = $(this)\n var data = $this.data('bs.modal')\n var options = $.extend({}, Modal.DEFAULTS, $this.data(), typeof option == 'object' && option)\n\n if (!data) $this.data('bs.modal', (data = new Modal(this, options)))\n if (typeof option == 'string') data[option](_relatedTarget)\n else if (options.show) data.show(_relatedTarget)\n })\n }", "function Plugin(option, _relatedTarget) {\n return this.each(function () {\n var $this = $(this)\n var data = $this.data('bs.modal')\n var options = $.extend({}, Modal.DEFAULTS, $this.data(), typeof option == 'object' && option)\n\n if (!data) $this.data('bs.modal', (data = new Modal(this, options)))\n if (typeof option == 'string') data[option](_relatedTarget)\n else if (options.show) data.show(_relatedTarget)\n })\n }", "function Plugin(option, _relatedTarget) {\n return this.each(function () {\n var $this = $(this)\n var data = $this.data('bs.modal')\n var options = $.extend({}, Modal.DEFAULTS, $this.data(), typeof option == 'object' && option)\n\n if (!data) $this.data('bs.modal', (data = new Modal(this, options)))\n if (typeof option == 'string') data[option](_relatedTarget)\n else if (options.show) data.show(_relatedTarget)\n })\n }", "function Plugin(option, _relatedTarget) {\n return this.each(function () {\n var $this = $(this)\n var data = $this.data('bs.modal')\n var options = $.extend({}, Modal.DEFAULTS, $this.data(), typeof option == 'object' && option)\n\n if (!data) $this.data('bs.modal', (data = new Modal(this, options)))\n if (typeof option == 'string') data[option](_relatedTarget)\n else if (options.show) data.show(_relatedTarget)\n })\n }", "function Plugin(option, _relatedTarget) {\n return this.each(function () {\n var $this = $(this)\n var data = $this.data('bs.modal')\n var options = $.extend({}, Modal.DEFAULTS, $this.data(), typeof option == 'object' && option)\n\n if (!data) $this.data('bs.modal', (data = new Modal(this, options)))\n if (typeof option == 'string') data[option](_relatedTarget)\n else if (options.show) data.show(_relatedTarget)\n })\n }", "function Plugin(option, _relatedTarget) {\n return this.each(function () {\n var $this = $(this)\n var data = $this.data('bs.modal')\n var options = $.extend({}, Modal.DEFAULTS, $this.data(), typeof option == 'object' && option)\n\n if (!data) $this.data('bs.modal', (data = new Modal(this, options)))\n if (typeof option == 'string') data[option](_relatedTarget)\n else if (options.show) data.show(_relatedTarget)\n })\n }", "function Plugin(option, _relatedTarget) {\n return this.each(function () {\n var $this = $(this)\n var data = $this.data('bs.modal')\n var options = $.extend({}, Modal.DEFAULTS, $this.data(), typeof option == 'object' && option)\n\n if (!data) $this.data('bs.modal', (data = new Modal(this, options)))\n if (typeof option == 'string') data[option](_relatedTarget)\n else if (options.show) data.show(_relatedTarget)\n })\n }", "function Plugin(option, _relatedTarget) {\n return this.each(function () {\n var $this = $(this)\n var data = $this.data('bs.modal')\n var options = $.extend({}, Modal.DEFAULTS, $this.data(), typeof option == 'object' && option)\n\n if (!data) $this.data('bs.modal', (data = new Modal(this, options)))\n if (typeof option == 'string') data[option](_relatedTarget)\n else if (options.show) data.show(_relatedTarget)\n })\n }", "function Plugin(option, _relatedTarget) {\n return this.each(function () {\n var $this = $(this)\n var data = $this.data('bs.modal')\n var options = $.extend({}, Modal.DEFAULTS, $this.data(), typeof option == 'object' && option)\n\n if (!data) $this.data('bs.modal', (data = new Modal(this, options)))\n if (typeof option == 'string') data[option](_relatedTarget)\n else if (options.show) data.show(_relatedTarget)\n })\n }" ]
[ "0.7613195", "0.76106924", "0.70632553", "0.6971759", "0.6971759", "0.6971759", "0.6971759", "0.6971759", "0.696315", "0.6952324", "0.6952324", "0.6952324", "0.6952324", "0.6952324", "0.6940254", "0.6925037", "0.68679523", "0.68679523", "0.68679523", "0.68679523", "0.68679523", "0.68679523", "0.68679523", "0.68679523", "0.68679523", "0.68679523", "0.68679523" ]
0.0
-1
TOOLTIP PLUGIN DEFINITION =========================
function Plugin(option) { return this.each(function () { var $this = $(this) var data = $this.data('bs.tooltip') var options = typeof option == 'object' && option if (!data && /destroy|hide/.test(option)) return if (!data) $this.data('bs.tooltip', (data = new Tooltip(this, options))) if (typeof option == 'string') data[option]() }) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "_addTooltips() {\n $(this.el.querySelectorAll('[title]')).tooltip({\n delay: { show: 500, hide: 0 }\n });\n }", "function initInstanceInfoTooltip() {\n jQuery('#instance-tooltip').tooltip();\n}", "get tooltip() {}", "function tooltips() {\r\n\t$('.tooltip-link').tooltip();\r\n}", "function zoto_widget_tips(options) {\n\tthis.$uber(options);\n\tthis.type = 'zoto_widget_tips';\n\tthis.set_title('quick tips');\n}", "function bindTooltip(){\n bindTooltipSkin(\".b-tooltip, .b-panel-icons-item a,.b-tool, .b-image-nav, .b-help, .b-title\",\"qtip-light\");\n }", "applyTooltips() {\n tippy(\".tipped\", {\n arrow: true,\n animateFill: false,\n size: \"small\",\n maxWidth: 200,\n interactiveBorder: 8\n });\n }", "function SetupPlayerTooltip(){\n // http://qtip2.com/\n $('.icon').each(function() {\n $(this).qtip({\n content: {\n text: function (event, api) {\n $.ajax({\n url: '/players/tooltip/' + $(this).data('type') + '/' + $(this).data('id')\n })\n .then(function(content) {\n // Set the tooltip content upon successful retrieval\n api.set('content.text', content);\n }, function(xhr, status, error) {\n // Upon failure... set the tooltip content to error\n api.set('content.text', status + ': ' + error);\n });\n return '';\n }\n },\n position: { my: 'lefttop', at: 'rightmiddle' },\n style: { classes: 'playerTooltip' }\n });\n });\n}", "function initToolTips() {\n $(\"[title]:not([data-hasqtip])\").each(function() {\n var $this = $(this);\n $this.qtip({\n style: {\n classes: 'qtip-bootstrap',\n },\n position: {\n my: 'top center', // Position my top left...\n at: 'bottom center', // at the bottom right of...\n target: $this, // my target,\n viewport: $(window)\n },\n events: {\n render: function(event, api) {\n // Extract the title translation ID\n var transIDs = $this.data('i18n').split(';');\n var titleTransID = transIDs[0].split(']')[1];\n\n // Remove the translation data-i18ns for title (but not text node)\n if (transIDs.length === 1) {\n $this.removeAttr('data-i18n'); // Only had title, delete it\n } else if (transIDs.length === 2) {\n $this.attr('data-i18n', transIDs[1]); // Set to the main text ID\n }\n\n // Chuck the new title trans ID (without the [title]) onto the tooltip\n api.elements.content.attr('data-i18n', titleTransID);\n }\n }\n });\n });\n}", "set tooltip(value) {}", "addHighlighTooltip () {\n }", "function ShowHelp() {\n $('img').tooltip('show');\n}", "getTooltip(){return this.__tooltip}", "function ShowHelp() {\n $('img').tooltip('show');\n coursePlayer.pause();\n}", "function init() { \n \n posHTML.setDragnDrop()\n \n //Tooltip\n $(\"a\").tooltip('show')\n $('a').tooltip({html: true}) \n $(\"a\").tooltip('hide') \n}", "tooltipClicked() {}", "function Plugin(option){return this.each(function(){var $this=$(this);var data=$this.data('bs.tooltip');var options=(typeof option==='undefined'?'undefined':_typeof(option))=='object'&&option;if(!data&&/destroy|hide/.test(option))return;if(!data)$this.data('bs.tooltip',data=new Tooltip(this,options));if(typeof option=='string')data[option]();});}", "function tooltip(e,t,title) {\r\n\t\t$('<div id=\"tooltip\" />')\r\n .appendTo('body')\r\n .text(title)\r\n .hide()\r\n .css({\r\n backgroundImage : 'url(./assets/images/skins/'+settings.skin+'/'+settings.skin+'_controlpanel.png)',\r\n\t\t\tbackgroundPosition : 'top left',\r\n\t\t\tbackgroundRepeat : 'repeat-x',\r\n\t\t\tcolor : settings.label,\r\n\t\t\tborder: '1px solid ' + settings.label,\r\n\t\t\ttop: e.pageY - 20,\r\n left: e.pageX + 20\r\n })\r\n .fadeIn(350);\r\n\t\t\r\n\t\tt.mousemove(function(e) {\r\n\t\t $('#tooltip').css({\r\n\t\t\ttop: e.pageY - 20,\r\n\t\t\tleft: e.pageX + 20\r\n\t\t });\r\n\t\t});\r\n\t }", "function Tip() {\n tt_Tip(arguments, null);\n}", "function TipMenu()\n{\n\tm_tt_Tip(arguments, null);\n}", "function Plugin(option){return this.each(function(){var $this=$(this);var data=$this.data('bs.tooltip');var options=(typeof option===\"undefined\"?\"undefined\":_typeof2(option))=='object'&&option;if(!data&&/destroy|hide/.test(option))return;if(!data)$this.data('bs.tooltip',data=new Tooltip(this,options));if(typeof option=='string')data[option]();});}", "function doTooltip(e, msg) {\nif ( typeof Tooltip == \"undefined\" || !Tooltip.ready ) return;\nTooltip.show(e, msg);\n}", "function showHelpTooltip() {\n $('#tooltip_help').show();\n}", "function titleTooltip(elem){\n $(elem).hover(function(){\n /// Hover over code\n var title = $(this).attr('title');\n $(this).data('tipText', title).removeAttr('title');\n $('<p class=\"jtt\"></p>')\n .text(title)\n .appendTo('body')\n .fadeIn('slow');\n }, function() {\n /// Hover out code\n $(this).attr('title', $(this).data('tipText'));\n $('.jtt').remove();\n }).mousemove(function(e) {\n var mousex = e.pageX + 20; /// Get X coordinates\n var mousey = e.pageY + 10; /// Get Y coordinates\n $('.jtt').css({ top: mousey, left: mousex })\n });\n}", "function enableTooltip() {\n $('[v-tooltip]').tooltip({trigger: \"hover\", 'delay': {show: 1000, hide: 100}});\n}", "function init() {\n setUpToolTip();\n}", "function toolTip() {\n $('[data-toggle=\"tooltip\"]').tooltip();\n}", "function updateTooltips() {\n jQuery('.tooltip').tooltip({showURL: false });\n}", "_init() {\n var elemId = this.$element.attr('aria-describedby') || Foundation.GetYoDigits(6, 'tooltip');\n\n this.options.positionClass = this.options.positionClass || this._getPositionClass(this.$element);\n this.options.tipText = this.options.tipText || this.$element.attr('title');\n this.template = this.options.template ? $(this.options.template) : this._buildTemplate(elemId);\n\n if (this.options.allowHtml) {\n this.template.appendTo(document.body)\n .html(this.options.tipText)\n .hide();\n } else {\n this.template.appendTo(document.body)\n .text(this.options.tipText)\n .hide();\n }\n\n this.$element.attr({\n 'title': '',\n 'aria-describedby': elemId,\n 'data-yeti-box': elemId,\n 'data-toggle': elemId,\n 'data-resize': elemId\n }).addClass(this.options.triggerClass);\n\n //helper variables to track movement on collisions\n this.usedPositions = [];\n this.counter = 4;\n this.classChanged = false;\n\n this._events();\n }", "showToolTip_(event) {\n this.updateToolTip_(event);\n }", "toggleTooltips() {\n self.enableTooltips = !self.enableTooltips;\n }", "function initializeTooltips() {\n // Download document link\n $('.download-document').tooltip({\n 'show': true,\n 'placement': 'top',\n 'title': \"Download the document\"\n });\n\n // Delete document link\n $('.delete-document').tooltip({\n 'show': true,\n 'placement': 'top',\n 'title': \"Delete the document\"\n });\n\n // Upload document link\n $('.upload-document').tooltip({\n 'show': true,\n 'placement': 'top',\n 'title': \"Upload document\"\n });\n\n // Create new folder link\n $('.create-folder').tooltip({\n 'show': true,\n 'placement': 'top',\n 'title': \"Create new folder\"\n });\n}", "function tooltip(){\n $(\".waypoints-header\").tooltip({\n position: {\n my: \"center\", \n at: \"bottom\", \n of: \"#waypoints\"\n },\n show: {\n effect: \"slideDown\",\n delay: 1\n }, \n });\n}", "function ToolTips(){\n\tif(PlayerPrefs.GetInt(\"ToolTips\")==0){\n\t\tPlayerPrefs.SetInt(\"ToolTips\",1);\n\t\ttooltipstext.GetComponent (Text).text = \"on\";\n\t}\n\telse if(PlayerPrefs.GetInt(\"ToolTips\")==1){\n\t\tPlayerPrefs.SetInt(\"ToolTips\",0);\n\t\ttooltipstext.GetComponent (Text).text = \"off\";\n\t}\n}", "showTip(context) {\n const me = this;\n\n if (me.showTooltip) {\n me.clockTemplate = new ClockTemplate({\n scheduler: me.client\n });\n me.tip = new Tooltip({\n id: `${me.client.id}-time-range-tip`,\n cls: 'b-interaction-tooltip',\n align: 'b-t',\n autoShow: true,\n updateContentOnMouseMove: true,\n forElement: context.element,\n getHtml: () => me.getTipHtml(context.record, context.element)\n });\n }\n }", "function updateTips(t) {\n\t\ttips.text(t)\n\t}", "function display_tip() {\n if (pause_on_tile === true) {\n g.paused = true;\n }\n\n show_description(g.progress); //description.js\n\n g.progress = g.progress + 1;\n}", "function toolTipInit() {\n\t\n\t\t$('.menu li a').tooltip({\n\t\t\tplacement: 'right'\n\t\t});\n\t}", "function createTooltip(position, elem, ttContent)\r\n{\r\n\tvar myPosition = \"center top+20\";\r\n\tvar atPosition = \"center bottom\";\r\n\tvar arrowClass = \"arrow\";\r\n\t\r\n\tif(position == \"bottom\")\r\n\t{\r\n\t\tmyPosition = \"center top+15\";\r\n\t\tatPosition = \"center bottom\";\r\n\t}\r\n\telse if(position == \"top\")\r\n\t{\r\n\t\tmyPosition = \"center bottom-15\";\r\n\t\tatPosition = \"center top\";\r\n\t}\r\n\telse if(position == \"left\")\r\n\t{\r\n\t\tmyPosition = \"right-15 center\";\r\n\t\tatPosition = \"left center\";\r\n\t\t\r\n\t\tarrowClass = \"arrowHor\";\r\n\t}\r\n\telse if(position == \"right\")\r\n\t{\r\n\t\tmyPosition = \"left+15 center\";\r\n\t\tatPosition = \"right center\";\r\n\t\t\r\n\t\tarrowClass = \"arrowHor\";\r\n\t}\r\n\t\r\n\telem.tooltip({\r\n\t\titems: elem.prop(\"tagName\"),\r\n\t\tcontent: ttContent,\r\n\t\tdelay: 5000,\r\n\t position: {\r\n\t\t my: myPosition,\r\n\t\t at: atPosition,\r\n\t\t /*\r\n\t\t using: function( position, feedback ) {\r\n\t\t $( this ).css( position );\r\n\t\t $( \"<div>\" )\r\n\t\t .addClass( arrowClass )\r\n\t\t .addClass( feedback.vertical )\r\n\t\t .addClass( feedback.horizontal )\r\n\t\t .appendTo( this );\r\n\t\t }\r\n\t\t */\r\n\t },\r\n\t\topen: function(event, ui) {\r\n\t\t\tvar tooltip = ui.tooltip;\r\n\t\t\tsetTimeout(function(tooltip){tooltip.hide();}, 4000, tooltip);\r\n\t\t}\r\n\t});\r\n}", "showTip(context) {\n const me = this;\n\n if (me.showTooltip) {\n me.clockTemplate = new ClockTemplate({\n timeAxisViewModel: me.client.timeAxisViewModel\n });\n\n me.tip = new Tooltip({\n cls: 'b-interaction-tooltip',\n align: 'b-t',\n autoShow: true,\n forElement: context.element,\n getHtml: () => me.getTipHtml(context.record, context.element)\n });\n }\n }", "function loadTooltips() {\n $('.hover-tooltip').tooltip({\n title: hoverGetData,\n html: true,\n container: 'body',\n placement: 'left',\n delay: {\n \"show\": 100,\n \"hide\": 1500\n }\n });\n}", "function init_tooltips(){\n \n $(\".tooltip-bot, .tooltip-bot a, .nav-social-links a\").tooltip({\n placement: \"bottom\"\n });\n \n $(\".tooltip-top, .tooltip-top a\").tooltip({\n placement: \"top\"\n });\n \n \n $(\".tooltip-right, .tooltip-right a\").tooltip({\n placement: \"right\"\n });\n \n \n $(\".tooltip-left, .tooltip-left a\").tooltip({\n placement: \"left\"\n });\n \n }", "function toolTips(el,help) {\n\t\t$(el).on('mouseenter', function() {\n\t\t\t$(help).show();\n\t\t\t$(el).on('click', function() {\n\t\t\t\t$(help).hide();\n\t\t\t});\n\t\t\t$(el).on('mouseleave', function() {\n\t\t\t\t$(help).hide();\n\t\t\t});\n\t\t});\n\t}", "function setupBootstrapTooltips() {\n\t$('[data-toggle=\"tooltip\"], .conceptPoint, #recommendSection .panel-heading, .btn-info').tooltip({\n\t\tcontainer: 'body',\n\t\thtml: true\n\t});\n}", "function SetupCompetitionTooltip(){\n\n // http://qtip2.com/\n $('.icon1').each(function() {\n $(this).qtip({\n content: {\n text: '<div class=\"tooltipText\">' + $(this).data(\"summary\") + '</div>'\n },\n position: { my: 'lefttop', at: 'rightmiddle' },\n style: { classes: 'playerTooltip' }\n });\n });\n}", "function tooltipInit() {\n $('[data-toggle=\"tooltip\"]').tooltip();\n}", "function load_tooltips() {\n $('[data-toggle=\"tooltip\"]').tooltip()\n}", "function mouseOverHelp(i) {\n return function() {\n target.innerHTML = helperTags[i].tooltip\n };\n }", "get tooltipTemplate() {\n return html`<simple-tooltip\n id=\"tooltip\"\n for=\"button\"\n ?hidden=\"${!this.currentTooltip && !this.currentLabel}\"\n position=\"${this.tooltipDirection || \"bottom\"}\"\n >${this.currentTooltip || this.currentLabel}</simple-tooltip\n >`;\n }", "function init_tooltips(){\n\n $(\".tooltip-bot, .tooltip-bot a, .nav-social-links a\").tooltip({\n placement: \"bottom\"\n });\n\n $(\".tooltip-top, .tooltip-top a\").tooltip({\n placement: \"top\"\n });\n\n }", "function enableToolTipForHeader(){\r\n\t$('#merchantUpload').tooltip({title: \"Upload new set of images for an application.\", animation: true,placement: \"auto\"});\r\n\t$('[href=\"/search\"]').tooltip({title: \"Search existing or previously uploaded application from the system.\", animation: true,placement: \"auto\"});\r\n\t$('[href=\"/followup\"]').tooltip({title: \"Search applications for document followup from Head office.\", animation: true,placement: \"auto\"});\r\n\t$('[href=\"/signup\"]').tooltip({title: \"Register new merchant promoter or staff in Online Submission Application.\", animation: true,placement: \"auto\"});\r\n\t$('[href=\"#logout\"]').tooltip({title: \"Logout to OSA-PH.\", animation: true,placement: \"auto\"});\r\n}", "function initTooltip() {\n angular.element(elem).tooltip({\n title: scope.bsTip,\n placement: scope.bsTipPlacement\n });\n }", "function tp(poTag, psSelector)\n{\n\n if(psSelector)\n {\n var sHTML = \"\"+$(psSelector).html();\n sHTML = sHTML.split('\"').join(\"'\");\n\n $(poTag).attr('title', sHTML);\n }\n\n\n $(poTag).tooltip(\n {content: function()\n {\n if(!$(this).attr('title'))\n $(this).attr('title', $(this).text());\n\n return $(this).attr('title');\n }\n }).blur().mouseenter();\n\n return true;\n}", "function e(t){var e,i;this.qTipTitle=null,this.qTipText=null,this.qTipInnerHTML=null,null!=(i=/^\\(tooltip: ?(.+)\\|(.+)(?=\\))\\)$/.exec(t.text()))&&3==i.length?(this.qTipTitle=i[1],this.qTipText=i[2],e=/^(.+)\\|/,this.qTipInnerHTML=(i[1]+\"|\"+i[2]).replace(e,\"\")):null!=(i=/^(.+)\\|(.+)$/.exec(t.text()))&&3==i.length?(this.qTipTitle=i[1],this.qTipText=i[2],e=/^(.+)\\|/,this.qTipInnerHTML=t.html().replace(e,\"\")):(this.qTipText=t.text(),this.qTipInnerHTML=t.html())}", "function show() {\n tID = null;\n let isBrowsable = false;\n if ($.tooltip.current !== null) {\n isBrowsable = settings($.tooltip.current).isBrowsable;\n }\n\n if ((!IE || !$.fn.bgiframe) && settings($.tooltip.current).fade) {\n if (helper.parent.is(':animated'))\n helper.parent\n .stop()\n .show()\n .fadeTo(settings($.tooltip.current).fade, 100);\n else\n helper.parent.is(':visible')\n ? helper.parent.fadeTo(\n settings($.tooltip.current).fade,\n 100\n )\n : helper.parent.fadeIn(settings($.tooltip.current).fade);\n } else {\n helper.parent.show();\n }\n\n $(helper.parent[0])\n .unbind('mouseenter')\n .unbind('mouseleave')\n .mouseenter(function () {\n if (isBrowsable) {\n $.tooltip.currentHover = true;\n }\n })\n .mouseleave(function () {\n if (isBrowsable) {\n // if tooltip has scrollable content or selectionnable text - should be closed on mouseleave:\n $.tooltip.currentHover = false;\n helper.parent.hide();\n }\n });\n\n update();\n }", "_createToolTip () {\n const tip = d3.tip().attr('id', 'ets-tip')\n .html((d) => { return this._getTipContent(d); })\n .direction((d) => { return this._setTipDirection(d); });\n\n\n return tip;\n }", "function tooltipFunctions() {\n $('[data-toggle=\"tooltip\"]').tooltip(); //needed for tooltip\n $('[data-toggle=\"popover\"]').popover();\n $('.tdPlaylistButton').mouseenter(function(){\n setTimeout(function(){\n $('.tdPlaylistButton').tooltip('hide');\n },1000);\n });\n $('.browseChannelButton').mouseenter(function () {\n setTimeout(function () {\n $('.browseChannelButton').tooltip('hide');\n }, 1000);\n });\n $('.lightBoxMode').mouseenter(function () {\n setTimeout(function () {\n $('.lightBoxMode').tooltip('hide');\n }, 1000);\n });\n $('.channelSearchButton').mouseenter(function () {\n setTimeout(function () {\n $('.channelSearchButton').tooltip('hide');\n }, 1000);\n });\n $('.videoSearchButton').mouseenter(function () {\n setTimeout(function () {\n $('.videoSearchButton').tooltip('hide');\n }, 1000);\n });\n $('#videoStats .fa-bar-chart').mouseenter(function () {\n setTimeout(function () {\n $('#videoStats .fa-bar-chart').tooltip('hide');\n }, 1000);\n });\n $('#channelInfo .fa-list-alt').mouseenter(function () {\n setTimeout(function () {\n $('#channelInfo .fa-list-alt').tooltip('hide');\n }, 1000);\n });\n $('.listDropButton').mouseenter(function(){\n setTimeout(function(){\n $('.listDropButton').tooltip('hide');\n },1000);\n });\n $('.lastVideoButton').mouseenter(function(){\n setTimeout(function(){\n $('.lastVideoButton').tooltip('hide');\n },1000);\n });\n $('.rewindButton').mouseenter(function(){\n setTimeout(function(){\n $('.rewindButton').tooltip('hide');\n },1000);\n });\n $('.fastForwardButton').mouseenter(function(){\n setTimeout(function(){\n $('.fastForwardButton').tooltip('hide');\n },1000);\n });\n $('.nextVideoButton').mouseenter(function(){\n setTimeout(function(){\n $('.nextVideoButton').tooltip('hide');\n },1000);\n });\n $('.playButton').mouseenter(function(){\n setTimeout(function(){\n $('.playButton').tooltip('hide');\n },1000);\n });\n $('.pauseButton').mouseenter(function(){\n setTimeout(function() {\n $('.pauseButton').tooltip('hide');\n }, 1000);\n });\n $('.listUpButton').mouseenter(function(){\n setTimeout(function(){\n $('.listUpButton').tooltip('hide');\n },1000);\n });\n}", "function ActivateTooltip() {\n // creates the tooltip to display the y point\n $(\"<div id='tooltip'></div>\").css({\n position: \"absolute\",\n display: \"none\",\n border: \"1px solid #fdd\",\n padding: \"2px\",\n \"background-color\": \"#fee\",\n opacity: 0.80\n }).appendTo(\"body\");\n // displays the tooltip on hover\n $(\"#placeholder\").bind(\"plothover\", function (event, pos, item) {\n if (item) {\n var x = item.datapoint[0].toFixed(2), y = item.datapoint[1].toFixed(2);\n $(\"#tooltip\").html(y)\n .css({ top: item.pageY + 5, left: item.pageX + 5 })\n .fadeIn(200);\n }\n else {\n $(\"#tooltip\").hide();\n }\n });\n }", "function addTooltips() {\n //Pick a random message\n var activeMsgId = Math.floor(Math.random() * (Object.keys(messages).length));\n $('.task-input').attr('data-position', 'bottom center');\n $('.task-input.task').attr('data-html', '<div class=\"input-tooltip\">' + messages[activeMsgId].task.line1 + '<br><i>' + messages[activeMsgId].task.line2 + '</i></div>');\n $('.task-input.section').attr('data-html', '<div class=\"input-tooltip\">' + messages[activeMsgId].section.line1 + '<br><i>' + messages[activeMsgId].section.line2 + '</i></div>');\n $('.task-input.tags').attr('data-html', '<div class=\"input-tooltip\">' + messages[activeMsgId].tags.line1 + '<br><i>' + messages[activeMsgId].tags.line2 + '</i></div>');\n $('.task-input.points').attr('data-html', '<div class=\"input-tooltip\">' + messages[activeMsgId].points.line1 + '<br><i>' + messages[activeMsgId].points.line2 + '</i></div>');\n $('.task-input').popup({\n preserve: true,\n delay: {show: 350}\n });\n}", "function SetupPlayerMatchTooltip(){\n\n // http://qtip2.com/\n $('.matchIcon').each(function() {\n $(this).qtip({\n content: {\n text: function (event, api) {\n $.ajax({\n url: '/players/tooltip/matches/' + $(this).attr('id')\n })\n .then(function(content) {\n // Set the tooltip content upon successful retrieval\n api.set('content.text', content);\n }, function(xhr, status, error) {\n // Upon failure... set the tooltip content to error\n api.set('content.text', status + ': ' + error);\n });\n return '';\n }\n },\n position: { my: 'rightMiddle', at: 'leftMiddle' },\n style: { classes: 'matchTooltip' }\n });\n });\n}", "function showHelpStrip() {\n // loadInputControls();\n helpTip = $(document).tooltip({ disabled: false });\n helpTip = $(document).tooltip({ track: true });\n}", "function toolTipInit() {\r\n\t\r\n\t\t$('.social-icon-top ul li a, ul.footer-social li a').tooltip({\r\n\t\t\tplacement: 'bottom'\r\n\t\t});\r\n\t}", "function toolTipHTML() {\n return \"100\";\n }", "function setTooltips()\r\n{\r\n $(function()\r\n {\r\n if ($(\".tooltip\").length > 0)\r\n {\r\n $(\".tooltip\").tooltip({showURL: false});\r\n }\r\n });\r\n}", "initTooltip() {\n const me = this,\n {\n client\n } = me;\n\n if (me.showTooltip) {\n if (me.tip) {\n me.tip.showBy(me.getTooltipTarget());\n } else {\n me.clockTemplate = new ClockTemplate({\n scheduler: client\n });\n me.tip = new Tooltip({\n id: `${client.id}-drag-create-tip`,\n autoShow: true,\n trackMouse: false,\n updateContentOnMouseMove: true,\n getHtml: me.getTipHtml.bind(me),\n align: client.isVertical ? 't-b' : 'b100-t100',\n hideDelay: 0,\n axisLock: true // Don't want it flipping to the side where we are dragging\n\n });\n me.tip.on('innerhtmlupdate', me.updateDateIndicator, me);\n }\n }\n }", "function updateTooltips(){\r\n\t//Bind Tooltips with Buttons\r\n\t$(\"button[rel='tooltip']\").tooltip({\r\n\t\tplacement:'top',\r\n\t\ttrigger:'hover',\r\n\t\tanimation:'true'\r\n\t});\r\n}", "get tooltipClass() { return this._tooltipClass; }", "function tooltips ( ) {\r\n\r\n\t\t// Tooltips are added with options.tooltips in original order.\r\n\t\tvar tips = scope_Handles.map(addTooltip);\r\n\r\n\t\tbindEvent('update', function(values, handleNumber, unencoded) {\r\n\r\n\t\t\tif ( !tips[handleNumber] ) {\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\r\n\t\t\tvar formattedValue = values[handleNumber];\r\n\r\n\t\t\tif ( options.tooltips[handleNumber] !== true ) {\r\n\t\t\t\tformattedValue = options.tooltips[handleNumber].to(unencoded[handleNumber]);\r\n\t\t\t}\r\n\r\n\t\t\ttips[handleNumber].innerHTML = formattedValue;\r\n\t\t});\r\n\t}", "function initializeTooltips(){\n\t$('.tooltip').tooltipster({\n\t\tcontentAsHTML: true, // set title content to html\n\t\ttrigger: 'custom', // add custom trigger\n\t\ttriggerOpen: { // open tooltip when element is clicked, tapped (mobile) or hovered\n\t\t mouseenter: true\n\t\t},\n\t\ttriggerClose: { // close tooltip when element is clicked again, tapped or when the mouse leaves it\n\t\t\tmouseleave: true\n\t\t},\n\t\ttheme: ['tooltipster-light'/*, 'tooltipster-light-custom'*/]\n \t});\n}", "function ttMouseOver() {\nif (tooltipsOn && wgCanonicalNamespace != \"Special\" && (itemTooltips || npcTooltips || questTooltips || quickTooltips || abilityTooltips || otherTooltips)) {\n$(\"body\").mouseover(hideTip);\n$(\"#bodyContent\").append('<div id=\"tfb\" class=\"htt\"></div><div id=\"templatetfb\" class=\"htt\"><div>');\nif (itemTooltips) $(\"span.itemlink,span.setlink\").each(bindTT);\nif (npcTooltips) $(\"span.npclink\").each(bindTT);\nif (questTooltips) $(\"span.questlink\").each(bindTT);\nif (achievementTooltips) $(\"span.achievementlink\").each(bindTT);\nif (abilityTooltips) $(\"span.abilitylink\").each(bindTT);\nif (otherTooltips) $(\"span.ajaxttlink\").each(bindTT);\nif (quickTooltips) $(\"span.tttemplatelink\").each(function () {\n$(this).mouseover(showTemplateTip);\n$(this).mouseout(hideTemplateTip);\n$(this).mousemove(moveTip);\n});\n}\n}", "function responsiveTooltips() {\r\n\t\t\t\t\t\r\n\t\t\t\t\t$('.nectar_image_with_hotspots').each(function () {\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t$(this).find('.nectar_hotspot_wrap').each(function () {\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tif (nectarDOMInfo.winW > 690) {\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t// Remove click if applicable\r\n\t\t\t\t\t\t\t\tif ($(this).parents('.nectar_image_with_hotspots[data-tooltip-func=\"hover\"]').length > 0) {\r\n\t\t\t\t\t\t\t\t\t$(this).find('.nectar_hotspot').removeClass('click');\r\n\t\t\t\t\t\t\t\t\t$(this).find('.nttip').removeClass('open');\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t$(this).find('.nttip .inner a.tipclose').remove();\r\n\t\t\t\t\t\t\t\t$('.nttip').css('height', 'auto');\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t// Reset for positioning\r\n\t\t\t\t\t\t\t\t$(this).css({\r\n\t\t\t\t\t\t\t\t\t'width': 'auto',\r\n\t\t\t\t\t\t\t\t\t'height': 'auto'\r\n\t\t\t\t\t\t\t\t});\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t$(this).find('.nttip')\r\n\t\t\t\t\t\t\t\t\t.removeClass('force-right')\r\n\t\t\t\t\t\t\t\t\t.removeClass('force-left')\r\n\t\t\t\t\t\t\t\t\t.removeClass('force-top')\r\n\t\t\t\t\t\t\t\t\t.css('width', 'auto');\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\tvar $tipOffset = $(this).find('.nttip').offset();\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t// Against right side \r\n\t\t\t\t\t\t\t\tif ($tipOffset.left > $(this).parents('.nectar_image_with_hotspots').width() - 200) {\r\n\t\t\t\t\t\t\t\t\t$(this).find('.nttip').css('width', '250px');\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\telse {\r\n\t\t\t\t\t\t\t\t\t$(this).find('.nttip').css('width', 'auto');\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t// Responsive\r\n\t\t\t\t\t\t\t\tif ($tipOffset.left < 0) {\r\n\t\t\t\t\t\t\t\t\t$(this).find('.nttip').addClass('force-right');\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\telse if ($tipOffset.left + $(this).find('.nttip').outerWidth(true) > nectarDOMInfo.winW) {\r\n\t\t\t\t\t\t\t\t\t$(this).find('.nttip').addClass('force-left').css('width', '250px');\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\telse if ($tipOffset.top + $(this).find('.nttip').height() + 35 > $window.height() && $('#nectar_fullscreen_rows').length > 0) {\r\n\t\t\t\t\t\t\t\t\t$(this).find('.nttip').addClass('force-top');\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\tif ($(this).find('> .open').length == 0) {\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t$(this).css({\r\n\t\t\t\t\t\t\t\t\t\t'width': '30px',\r\n\t\t\t\t\t\t\t\t\t\t'height': '30px'\r\n\t\t\t\t\t\t\t\t\t});\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t//fixed position\r\n\t\t\t\t\t\t\t\t$(this).find('.nttip')\r\n\t\t\t\t\t\t\t\t\t.removeClass('force-left')\r\n\t\t\t\t\t\t\t\t\t.removeClass('force-right')\r\n\t\t\t\t\t\t\t\t\t.removeClass('force-top');\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t$(this).find('.nectar_hotspot').addClass('click');\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\tif ($(this).find('.nttip a.tipclose').length == 0) {\r\n\t\t\t\t\t\t\t\t\t$(this).find('.nttip .inner').append('<a href=\"#\" class=\"tipclose\"><span></span></a>');\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t// Change height of fixed\r\n\t\t\t\t\t\t\t\t$('.nttip').css('height', $window.height());\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t});\r\n\t\t\t\t\t\r\n\t\t\t\t}", "initTooltip() {\n const me = this,\n client = me.client;\n\n if (me.showTooltip) {\n if (me.tip) {\n me.tip.showBy(me.getTooltipTarget());\n } else {\n me.clockTemplate = new ClockTemplate({\n timeAxisViewModel: client.timeAxisViewModel\n });\n\n me.tip = new Tooltip({\n id: `${client.id}-drag-create-tip`,\n autoShow: true,\n trackMouse: false,\n getHtml: me.getTipHtml.bind(me),\n align: client.isVertical ? 't-b' : 'b100-t100',\n hideDelay: 0,\n axisLock: true // Don't want it flipping to the side where we are dragging\n });\n\n me.tip.on('innerhtmlupdate', me.updateDateIndicator, me);\n }\n }\n }", "function QTip() {\n\n var myPos = {\n bot: { target: 'mouse', my: 'top left', at: 'bottom right', adjust: { x: 10, y: 20 } },\n top: { target: 'mouse', my: 'bottom left', at: 'top right', adjust: { x: 5, y: 0 } }\n };\n\n // destroy artifacts before creating again\n $('.qtip').each(function () {\n $(this).data('qtip').destroy();\n })\n\n // create tooltip\n $('[title]').each(function () {\n $(this).qtip({\n style: { classes: 'qtip-light qtip-shadow qtip-rounded' },\n position: ($(this).data('qtop')) ? myPos.top : myPos.bot,\n content: { text: '<span class=\"glyphicon ' + CD_Library.Icons[$(this).data('icon')] + '\"></span> &nbsp;' + $(this).attr('title') },\n suppress: true\n });\n\n });\n\n}", "function setupToolTips(id, msg) {\n let newID = id + 'tip';\n document.getElementById(newID).innerHTML = msg;\n document.getElementById(newID).style.visibility = \"hidden\";\n\n}", "function showTooltip(content, event) {\n tt.style('opacity', 1.0)\n .html(content);\n \n updatePosition(event);\n }", "function ttMouseOver(foo) {\nif (tooltipsOn && getCookie(\"wiki-tiploader\") != \"no\") {\n$(\"#WikiaArticle\").mouseover(hideTip);\n$(\"#WikiaArticle\").append('<div id=\"tfb\" class=\"htt\"></div><div id=\"templatetfb\" class=\"htt\"><div>');\n$tfb = $(\"#tfb\");\n$ttfb = $(\"#templatetfb\");\n$htt = $(\"#tfb,#templatetfb\");\nif(foo==1){\n$(\"#WikiaArticle span.ajaxttlink\").each(bindTT);\n}\n$(\"#WikiaArticle span.tttemplatelink\").mouseover(showTemplateTip).mouseout(hideTemplateTip).mousemove(moveTip);\n}\n}", "function JT_init(){\n\t $(\"a.jTip\")\n\t\t .hover(function(){JT_show(this.href,this.id,this.name)},function(){$('#JT').remove()})\n .click(function(){return false});\t \n}", "function Plugin(option) {\n\t return this.each(function () {\n\t var $this = $(this)\n\t var data = $this.data('bs.tooltip')\n\t var options = typeof option == 'object' && option\n\t\n\t if (!data && option == 'destroy') return\n\t if (!data) $this.data('bs.tooltip', (data = new Tooltip(this, options)))\n\t if (typeof option == 'string') data[option]()\n\t })\n\t }", "function toggle_tooltip() {\n $('[data-toggle=\"tooltip\"]').tooltip(); \n}", "function showToolTipHelp() {\n\t\tvar link = tip.triggerElement;\n\t\tif (!link) {\n\t\t\treturn false;\n\t\t}\n\t\tvar table = link.getAttribute('data-table');\n\t\tvar field = link.getAttribute('data-field');\n\t\tvar key = table + '.' + field;\n\t\tvar response = cshHelp.key(key);\n\t\ttip.target = tip.triggerElement;\n\t\tif (response) {\n\t\t\tupdateTip(response);\n\t\t} else {\n\t\t\t\t// If a table is defined, use ExtDirect call to get the tooltip's content\n\t\t\tif (table) {\n\t\t\t\tvar description = '';\n\t\t\t\tif (typeof(top.TYPO3.LLL) !== 'undefined') {\n\t\t\t\t\tdescription = top.TYPO3.LLL.core.csh_tooltip_loading;\n\t\t\t\t} else if (opener && typeof(opener.top.TYPO3.LLL) !== 'undefined') {\n\t\t\t\t\tdescription = opener.top.TYPO3.LLL.core.csh_tooltip_loading;\n\t\t\t\t}\n\n\t\t\t\t\t// Clear old tooltip contents\n\t\t\t\tupdateTip({\n\t\t\t\t\tdescription: description,\n\t\t\t\t\tcshLink: '',\n\t\t\t\t\tmoreInfo: '',\n\t\t\t\t\ttitle: ''\n\t\t\t\t});\n\t\t\t\t\t// Load content\n\t\t\t\tTYPO3.CSH.ExtDirect.getTableContextHelp(table, function(response, options) {\n\t\t\t\t\tExt.iterate(response, function(key, value){\n\t\t\t\t\t\tcshHelp.add(value);\n\t\t\t\t\t\tif (key === field) {\n\t\t\t\t\t\t\tupdateTip(value);\n\t\t\t\t\t\t\t\t// Need to re-position because the height may have increased\n\t\t\t\t\t\t\ttip.show();\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t}, this);\n\n\t\t\t\t// No table was given, use directly title and description\n\t\t\t} else {\n\t\t\t\tupdateTip({\n\t\t\t\t\tdescription: link.getAttribute('data-description'),\n\t\t\t\t\tcshLink: '',\n\t\t\t\t\tmoreInfo: '',\n\t\t\t\t\ttitle: link.getAttribute('data-title')\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\t}", "function tooltips() {\n\n // Tooltips are added with options.tooltips in original order.\n var tips = scope_Handles.map(addTooltip);\n\n bindEvent('update', function (values, handleNumber, unencoded) {\n\n if (!tips[handleNumber]) {\n return;\n }\n\n var formattedValue = values[handleNumber];\n\n if (options.tooltips[handleNumber] !== true) {\n formattedValue = options.tooltips[handleNumber].to(unencoded[handleNumber]);\n }\n\n tips[handleNumber].innerHTML = formattedValue;\n });\n }", "function showNotificationsTooltip() {\n $('#tooltip_content').show();\n}", "function tooltips ( ) {\n\n\t\t// Tooltips are added with options.tooltips in original order.\n\t\tvar tips = scope_Handles.map(addTooltip);\n\n\t\tbindEvent('update', function(values, handleNumber, unencoded) {\n\n\t\t\tif ( !tips[handleNumber] ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tvar formattedValue = values[handleNumber];\n\n\t\t\tif ( options.tooltips[handleNumber] !== true ) {\n\t\t\t\tformattedValue = options.tooltips[handleNumber].to(unencoded[handleNumber]);\n\t\t\t}\n\n\t\t\ttips[handleNumber].innerHTML = formattedValue;\n\t\t});\n\t}", "function tooltips ( ) {\n\n\t\t// Tooltips are added with options.tooltips in original order.\n\t\tvar tips = scope_Handles.map(addTooltip);\n\n\t\tbindEvent('update', function(values, handleNumber, unencoded) {\n\n\t\t\tif ( !tips[handleNumber] ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tvar formattedValue = values[handleNumber];\n\n\t\t\tif ( options.tooltips[handleNumber] !== true ) {\n\t\t\t\tformattedValue = options.tooltips[handleNumber].to(unencoded[handleNumber]);\n\t\t\t}\n\n\t\t\ttips[handleNumber].innerHTML = formattedValue;\n\t\t});\n\t}", "function tooltips ( ) {\n\n\t\t// Tooltips are added with options.tooltips in original order.\n\t\tvar tips = scope_Handles.map(addTooltip);\n\n\t\tbindEvent('update', function(values, handleNumber, unencoded) {\n\n\t\t\tif ( !tips[handleNumber] ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tvar formattedValue = values[handleNumber];\n\n\t\t\tif ( options.tooltips[handleNumber] !== true ) {\n\t\t\t\tformattedValue = options.tooltips[handleNumber].to(unencoded[handleNumber]);\n\t\t\t}\n\n\t\t\ttips[handleNumber].innerHTML = formattedValue;\n\t\t});\n\t}", "function tooltips ( ) {\n\n\t\t// Tooltips are added with options.tooltips in original order.\n\t\tvar tips = scope_Handles.map(addTooltip);\n\n\t\tbindEvent('update', function(values, handleNumber, unencoded) {\n\n\t\t\tif ( !tips[handleNumber] ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tvar formattedValue = values[handleNumber];\n\n\t\t\tif ( options.tooltips[handleNumber] !== true ) {\n\t\t\t\tformattedValue = options.tooltips[handleNumber].to(unencoded[handleNumber]);\n\t\t\t}\n\n\t\t\ttips[handleNumber].innerHTML = formattedValue;\n\t\t});\n\t}", "function tooltips ( ) {\n\n\t\t// Tooltips are added with options.tooltips in original order.\n\t\tvar tips = scope_Handles.map(addTooltip);\n\n\t\tbindEvent('update', function(values, handleNumber, unencoded) {\n\n\t\t\tif ( !tips[handleNumber] ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tvar formattedValue = values[handleNumber];\n\n\t\t\tif ( options.tooltips[handleNumber] !== true ) {\n\t\t\t\tformattedValue = options.tooltips[handleNumber].to(unencoded[handleNumber]);\n\t\t\t}\n\n\t\t\ttips[handleNumber].innerHTML = formattedValue;\n\t\t});\n\t}", "function tooltips ( ) {\n\n\t\t// Tooltips are added with options.tooltips in original order.\n\t\tvar tips = scope_Handles.map(addTooltip);\n\n\t\tbindEvent('update', function(values, handleNumber, unencoded) {\n\n\t\t\tif ( !tips[handleNumber] ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tvar formattedValue = values[handleNumber];\n\n\t\t\tif ( options.tooltips[handleNumber] !== true ) {\n\t\t\t\tformattedValue = options.tooltips[handleNumber].to(unencoded[handleNumber]);\n\t\t\t}\n\n\t\t\ttips[handleNumber].innerHTML = formattedValue;\n\t\t});\n\t}", "function tooltips ( ) {\n\n\t\t// Tooltips are added with options.tooltips in original order.\n\t\tvar tips = scope_Handles.map(addTooltip);\n\n\t\tbindEvent('update', function(values, handleNumber, unencoded) {\n\n\t\t\tif ( !tips[handleNumber] ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tvar formattedValue = values[handleNumber];\n\n\t\t\tif ( options.tooltips[handleNumber] !== true ) {\n\t\t\t\tformattedValue = options.tooltips[handleNumber].to(unencoded[handleNumber]);\n\t\t\t}\n\n\t\t\ttips[handleNumber].innerHTML = formattedValue;\n\t\t});\n\t}", "function tooltips ( ) {\n\n\t\t// Tooltips are added with options.tooltips in original order.\n\t\tvar tips = scope_Handles.map(addTooltip);\n\n\t\tbindEvent('update', function(values, handleNumber, unencoded) {\n\n\t\t\tif ( !tips[handleNumber] ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tvar formattedValue = values[handleNumber];\n\n\t\t\tif ( options.tooltips[handleNumber] !== true ) {\n\t\t\t\tformattedValue = options.tooltips[handleNumber].to(unencoded[handleNumber]);\n\t\t\t}\n\n\t\t\ttips[handleNumber].innerHTML = formattedValue;\n\t\t});\n\t}", "function tooltips ( ) {\n\n\t\t// Tooltips are added with options.tooltips in original order.\n\t\tvar tips = scope_Handles.map(addTooltip);\n\n\t\tbindEvent('update', function(values, handleNumber, unencoded) {\n\n\t\t\tif ( !tips[handleNumber] ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tvar formattedValue = values[handleNumber];\n\n\t\t\tif ( options.tooltips[handleNumber] !== true ) {\n\t\t\t\tformattedValue = options.tooltips[handleNumber].to(unencoded[handleNumber]);\n\t\t\t}\n\n\t\t\ttips[handleNumber].innerHTML = formattedValue;\n\t\t});\n\t}", "function tooltips ( ) {\n\n\t\t// Tooltips are added with options.tooltips in original order.\n\t\tvar tips = scope_Handles.map(addTooltip);\n\n\t\tbindEvent('update', function(values, handleNumber, unencoded) {\n\n\t\t\tif ( !tips[handleNumber] ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tvar formattedValue = values[handleNumber];\n\n\t\t\tif ( options.tooltips[handleNumber] !== true ) {\n\t\t\t\tformattedValue = options.tooltips[handleNumber].to(unencoded[handleNumber]);\n\t\t\t}\n\n\t\t\ttips[handleNumber].innerHTML = formattedValue;\n\t\t});\n\t}", "function enableToolTipForContactTime(){\r\n\t$('[id^=\"contactFrom\"]').tooltip({title: \"Please follow military time format from 0800 to 1800.\", animation: true,placement: \"auto\"});\r\n\t$('[id^=\"contactTo\"]').tooltip({title: \"Please follow military time format from 0800 to 1800.\", animation: true,placement: \"auto\"});\r\n}", "function Plugin(option) {\n return this.each(function () {\n var $this = $(this);\n var data = $this.data('bs.tooltip');\n var options = typeof option == 'object' && option;\n\n if (!data && /destroy|hide/.test(option)) return;\n if (!data) $this.data('bs.tooltip', (data = new Tooltip(this, options)));\n if (typeof option == 'string') data[option]()\n })\n }", "function vtt_tooltip(e, id, contents){\r\n id = \"TTL_TTP_\"+id;\r\n div = document.createElement('div');\r\n div.setAttribute('id', id);\r\n div.setAttribute('style', 'position:absolute; top:120px; left:720px; padding:2px; z-index:200; border:solid 1px #000000; background-color:#FFFFFF; visibility:hidden;');\r\n div.innerHTML = contents;\r\n document.getElementById('ltop1').parentNode.appendChild(div);\r\n var timer;\r\n\r\n delay_mouseover = function (e){\r\n if (timer != undefined) window.clearTimeout(timer);\r\n timer = window.setTimeout(function(){\r\n x = document.getElementById(id);\r\n x.style.visibility = 'visible';\r\n x.style.left = (e.pageX+12)+'px';\r\n x.style.top = (e.pageY+1)+'px';\r\n }, 500);\r\n }\r\n delay_mouseout = function (){\r\n if (timer != undefined) window.clearTimeout(timer);\r\n timer = window.setTimeout(function(){\r\n document.getElementById(id).style.visibility = 'hidden';\r\n }, 300);\r\n }\r\n\r\n e.addEventListener('mouseover', delay_mouseover, false);\r\n e.addEventListener('mouseout', delay_mouseout, false);\r\n }", "function Plugin(option) {\n return this.each(function () {\n var $this = $(this)\n var data = $this.data('sia.siatooltip')\n var options = typeof option == 'object' && option\n\n if (!data && /destroy|hide/.test(option)) return\n if (!data) $this.data('sia.siatooltip', (data = new SIATooltip(this, options)))\n if (typeof option == 'string') data[option]()\n })\n }", "function Plugin(option) {\n return this.each(function () {\n var $this = $(this)\n var data = $this.data('bs.tooltip')\n var options = typeof option == 'object' && option\n\n if (!data && /destroy|hide/.test(option)) return\n if (!data) $this.data('bs.tooltip', (data = new Tooltip(this, options)))\n if (typeof option == 'string') data[option]()\n })\n }", "function tooltip(){\r\n\t\ttry{\r\n\t\t\tvar tooltips = document.getElementsByClassName(\"inew-tooltiptext\");\r\n\t\t\tfor (var i = tooltips.length - 1; i >= 0; --i) {\r\n\t\t\t\tvar tooltipCount = tooltips[i].innerHTML.length;\r\n\t\t\t\tif (tooltipCount > 22){\r\n\t\t\t\t\ttooltips[i].className = \"inew-tooltiptext inew-tooltipLarge\";\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}catch (e){}\t\r\n\t}", "function Plugin(option) {\n\t return this.each(function () {\n\t var $this = $(this)\n\t var data = $this.data('bs.tooltip')\n\t var options = typeof option == 'object' && option\n\t\n\t if (!data && /destroy|hide/.test(option)) return\n\t if (!data) $this.data('bs.tooltip', (data = new Tooltip(this, options)))\n\t if (typeof option == 'string') data[option]()\n\t })\n\t }", "function Plugin(option) {\n\t return this.each(function () {\n\t var $this = $(this)\n\t var data = $this.data('bs.tooltip')\n\t var options = typeof option == 'object' && option\n\t\n\t if (!data && /destroy|hide/.test(option)) return\n\t if (!data) $this.data('bs.tooltip', (data = new Tooltip(this, options)))\n\t if (typeof option == 'string') data[option]()\n\t })\n\t }", "function Plugin(option) {\n\t return this.each(function () {\n\t var $this = $(this)\n\t var data = $this.data('bs.tooltip')\n\t var options = typeof option == 'object' && option\n\t\n\t if (!data && /destroy|hide/.test(option)) return\n\t if (!data) $this.data('bs.tooltip', (data = new Tooltip(this, options)))\n\t if (typeof option == 'string') data[option]()\n\t })\n\t }" ]
[ "0.7192862", "0.7176083", "0.7123107", "0.71060693", "0.70085734", "0.6952688", "0.6936619", "0.6877055", "0.68541384", "0.6819276", "0.6799216", "0.67991906", "0.6754186", "0.6751899", "0.6703513", "0.66871077", "0.66587776", "0.66451734", "0.66412985", "0.6640944", "0.6639732", "0.66106975", "0.6608732", "0.6593808", "0.65926516", "0.6574664", "0.6542902", "0.65390664", "0.6527057", "0.6516247", "0.6514956", "0.6508757", "0.6508504", "0.6503343", "0.6496464", "0.64952195", "0.6491949", "0.6484728", "0.6480224", "0.64783216", "0.6476321", "0.6468246", "0.6460835", "0.645633", "0.64534", "0.6444895", "0.64440084", "0.64424026", "0.6427506", "0.63982296", "0.63922465", "0.6386074", "0.636776", "0.6365135", "0.6357984", "0.63461447", "0.63328964", "0.63321704", "0.6325913", "0.6318782", "0.63079864", "0.62904197", "0.62852097", "0.62784356", "0.6275179", "0.62733835", "0.62658656", "0.6264686", "0.6247294", "0.62324125", "0.6232063", "0.6228656", "0.6226631", "0.6207227", "0.620404", "0.61972797", "0.6197102", "0.6192224", "0.6191361", "0.61911434", "0.6187313", "0.617883", "0.6176551", "0.6176551", "0.6176551", "0.6176551", "0.6176551", "0.6176551", "0.6176551", "0.6176551", "0.6176551", "0.6176551", "0.6169945", "0.6169269", "0.6166501", "0.61617684", "0.6157643", "0.6142661", "0.61423874", "0.61423874", "0.61423874" ]
0.0
-1
POPOVER PLUGIN DEFINITION =========================
function Plugin(option) { return this.each(function () { var $this = $(this) var data = $this.data('bs.popover') var options = typeof option == 'object' && option if (!data && /destroy|hide/.test(option)) return if (!data) $this.data('bs.popover', (data = new Popover(this, options))) if (typeof option == 'string') data[option]() }) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function PopoverConfig() { }", "function Plugin(option){return this.each(function(){var $this=$(this);var data=$this.data('bs.popover');var options=(typeof option==='undefined'?'undefined':_typeof(option))=='object'&&option;if(!data&&/destroy|hide/.test(option))return;if(!data)$this.data('bs.popover',data=new Popover(this,options));if(typeof option=='string')data[option]();});}", "function Plugin(option){return this.each(function(){var $this=$(this);var data=$this.data('bs.popover');var options=(typeof option===\"undefined\"?\"undefined\":_typeof2(option))=='object'&&option;if(!data&&/destroy|hide/.test(option))return;if(!data)$this.data('bs.popover',data=new Popover(this,options));if(typeof option=='string')data[option]();});}", "function Popout() {\n\tthis._scrX = 0;\n\tthis._scrY = 0;\n\tthis._$ = $(this);\n}", "_setPopOver() {\n const $content = this._getContent();\n if (!$content) {\n return;\n }\n const options = {\n content: $content,\n html: true,\n placement: 'left',\n title: _t('Availability'),\n trigger: 'focus',\n delay: {'show': 0, 'hide': 100 },\n };\n this.$el.popover(options);\n }", "function porfolio_detail_popup() {\r\n $('.portfolio-detail-popup').magnificPopup({\r\n type: 'inline',\r\n mainClass: 'mfp-fade',\r\n preloader: true,\r\n gallery: {\r\n enabled: true\r\n }\r\n });\r\n }", "function init() {\n $(\".boxart\").popover({\n content: getPopoverContent,\n trigger: 'hover',\n html: true,\n container: 'body',\n viewport: \".content-wrap\",\n placement: \"auto\"\n });\n }", "function Plugin(option) {\n return this.each(function () {\n var $this = $(this);\n var data = $this.data(DataKey);\n if (!data) {\n var options = $.extend({}, Default, $this.data(), typeof option === 'object' && option);\n $this.data(DataKey, (data = new PushMenu(options)));\n }\n if (option === 'toggle') {\n data.toggle();\n }\n });\n }", "static get tag() {\n return \"simple-popover\";\n }", "static get tag() {\n return \"simple-popover\";\n }", "function popover(){\n var bootstrap = require('bootstrap');\n $(\"[data-toggle='popover']\").popover();\n $(document).on('mouseout','.omit',function(){\n $(\".popover\").delay(800).hide();\n }).on('mouseover','.popover',function(){\n $(this).show();\n }).on('mouseout','.popover',function(){\n $(this).hide();\n });\n }", "function popUp()\n{\n}", "function Plugin(option) {\n\t return this.each(function () {\n\t var $this = $(this)\n\t var data = $this.data('bs.popover')\n\t var options = typeof option == 'object' && option\n\t\n\t if (!data && option == 'destroy') return\n\t if (!data) $this.data('bs.popover', (data = new Popover(this, options)))\n\t if (typeof option == 'string') data[option]()\n\t })\n\t }", "function initPopups() {\r\n jQuery('.social-popup').contentPopup({\r\n mode: 'click',\r\n hideOnClickLink: false,\r\n hideOnClickOutside: false\r\n });\r\n}", "function blog_detail_popup() {\r\n $('.blog-detail-popup').magnificPopup({\r\n type: 'inline',\r\n mainClass: 'mfp-fade',\r\n preloader: true,\r\n gallery: {\r\n enabled: true\r\n }\r\n });\r\n }", "getPopover() {\n return jQuery(this.link).data(bootstrap.Popover.DATA_KEY);\n }", "function createPopUp() {\n\n}", "function Highpop(refpatt,id)\n{\n Popup.call(this,refpatt,id); // Call parent constructor\n\n this.revealTime = false;\n}", "function hidePopOver(){\r\n\t\t$('.popover').hide();\r\n\t}", "modalBgClick() {\n PubSub.publish('modal.bgClick');\n }", "function Plugin( option ) {\n return this.each( function() {\n var $this = $( this )\n var data = $this.data( 'bs.popover' )\n var options = typeof option == 'object' && option\n var selector = options && options.selector\n if ( !data && option == 'destroy' ) return\n if ( selector ) {\n if ( !data ) $this.data( 'bs.popover', ( data = {} ) )\n if ( !data[ selector ] ) data[ selector ] = new Popover( this, options )\n } else {\n if ( !data ) $this.data( 'bs.popover', ( data = new Popover( this, options ) ) )\n }\n if ( typeof option == 'string' ) data[ option ]()\n } )\n }", "function Plugin(option) {\n return this.each(function () {\n var $this = $(this);\n var data = $this.data('bs.popover');\n var options = typeof option == 'object' && option;\n\n if (!data && /destroy|hide/.test(option)) return;\n if (!data) $this.data('bs.popover', (data = new Popover(this, options)));\n if (typeof option == 'string') data[option]()\n })\n }", "function autopop() {\n $(\"#autopop-modal\").modal('show');\n}", "displayMoreInformationPopup (item) {\n $(item).popup('show')\n }", "function ShowPopover()\n{\n $('#cover').css('display', 'block');\n popoverOpen = true;\n}", "function video_soundcloud() {\r\n $('.magnific-youtube,.magnific-vimeo,.magnific-soundcloud').magnificPopup({\r\n type: 'iframe',\r\n mainClass: 'mfp-fade',\r\n removalDelay: 300,\r\n preloader: true,\r\n fixedContentPos: false\r\n });\r\n }", "function Plugin(option) {\n return this.each(function () {\n var $this = $(this);\n var data = $this.data('bs.popover');\n var options = typeof option == 'object' && option;\n var selector = options && options.selector;\n\n if (!data && option == 'destroy') return;\n if (selector) {\n if (!data) $this.data('bs.popover', (data = {}));\n if (!data[selector]) data[selector] = new Popover(this, options);\n } else {\n if (!data) $this.data('bs.popover', (data = new Popover(this, options)));\n }\n if (typeof option == 'string') data[option]();\n });\n }", "function pop_in_out(e){\n\t\t\t\t\tif($panel.is_popped_in()){\n\t\t\t\t\t\t$mainContainer.removeClass(\"lyrics_visible\");\n\t\t\t\t\t}else {\n\t\t\t\t\t\t$mainContainer.addClass(\"lyrics_visible\");\n\t\t\t\t\t}\n\t\t\t\t\t$panel.pop_in_out($panel.is_popped_in() ? '400px' : '100%', e, site);\n\t\t\t\t}", "function pop_in_out(e){\n\t\t\t\t\tif($panel.is_popped_in()){\n\t\t\t\t\t\t$mainContainer.removeClass(\"lyrics_visible\");\n\t\t\t\t\t}else {\n\t\t\t\t\t\t$mainContainer.addClass(\"lyrics_visible\");\n\t\t\t\t\t}\n\t\t\t\t\t$panel.pop_in_out($panel.is_popped_in() ? '400px' : '100%', e, site);\n\t\t\t\t}", "function init_ZIPmodal_popup() {\n let cityPopup = $('.modal-popover .data-list');\n cityPopup.scrollTop(0);\n\n cityPopup.niceScroll({\n cursorcolor: \"rgba(100, 100, 100,.2)\",\n autohidemode: false,\n bouncescroll: true,\n cursorwidth: \"4px\",\n cursorborder: \"4px\",\n grabcursorenabled: false,\n horizrailenabled: false,\n touchbehavior: true,\n preventmultitouchscrolling: false,\n cursordragontouch: true,\n railpadding: {top: 0, right: 2, left: 0, bottom: 0}, // set padding for rail bar\n });\n }", "function Plugin(option) {\n\t return this.each(function () {\n\t var $this = $(this)\n\t var data = $this.data('bs.popover')\n\t var options = typeof option == 'object' && option\n\t\n\t if (!data && /destroy|hide/.test(option)) return\n\t if (!data) $this.data('bs.popover', (data = new Popover(this, options)))\n\t if (typeof option == 'string') data[option]()\n\t })\n\t }", "function Plugin(option) {\n\t return this.each(function () {\n\t var $this = $(this)\n\t var data = $this.data('bs.popover')\n\t var options = typeof option == 'object' && option\n\t\n\t if (!data && /destroy|hide/.test(option)) return\n\t if (!data) $this.data('bs.popover', (data = new Popover(this, options)))\n\t if (typeof option == 'string') data[option]()\n\t })\n\t }", "function Plugin(option) {\n\t return this.each(function () {\n\t var $this = $(this)\n\t var data = $this.data('bs.popover')\n\t var options = typeof option == 'object' && option\n\t\n\t if (!data && /destroy|hide/.test(option)) return\n\t if (!data) $this.data('bs.popover', (data = new Popover(this, options)))\n\t if (typeof option == 'string') data[option]()\n\t })\n\t }", "function Plugin(option) {\n return this.each(function () {\n var $this = $(this)\n var data = $this.data('bs.popover')\n var options = typeof option == 'object' && option\n\n if (!data && option == 'destroy') return\n if (!data) $this.data('bs.popover', (data = new Popover(this, options)))\n if (typeof option == 'string') data[option]()\n })\n }", "function Plugin(option) {\n return this.each(function () {\n var $this = $(this)\n var data = $this.data('bs.popover')\n var options = typeof option == 'object' && option\n\n if (!data && option == 'destroy') return\n if (!data) $this.data('bs.popover', (data = new Popover(this, options)))\n if (typeof option == 'string') data[option]()\n })\n }", "function Plugin(option) {\n return this.each(function () {\n var $this = $(this)\n var data = $this.data('bs.popover')\n var options = typeof option == 'object' && option\n\n if (!data && option == 'destroy') return\n if (!data) $this.data('bs.popover', (data = new Popover(this, options)))\n if (typeof option == 'string') data[option]()\n })\n }", "function Plugin(option) {\n return this.each(function () {\n var $this = $(this)\n var data = $this.data('bs.popover')\n var options = typeof option == 'object' && option\n\n if (!data && option == 'destroy') return\n if (!data) $this.data('bs.popover', (data = new Popover(this, options)))\n if (typeof option == 'string') data[option]()\n })\n }", "function Plugin(option) {\n return this.each(function () {\n var $this = $(this)\n var data = $this.data('bs.popover')\n var options = typeof option == 'object' && option\n\n if (!data && option == 'destroy') return\n if (!data) $this.data('bs.popover', (data = new Popover(this, options)))\n if (typeof option == 'string') data[option]()\n })\n }", "function Plugin(option) {\n return this.each(function () {\n var $this = $(this)\n var data = $this.data('bs.popover')\n var options = typeof option == 'object' && option\n\n if (!data && option == 'destroy') return\n if (!data) $this.data('bs.popover', (data = new Popover(this, options)))\n if (typeof option == 'string') data[option]()\n })\n }", "function Plugin(option) {\n return this.each(function () {\n var $this = $(this)\n var data = $this.data('bs.popover')\n var options = typeof option == 'object' && option\n\n if (!data && option == 'destroy') return\n if (!data) $this.data('bs.popover', (data = new Popover(this, options)))\n if (typeof option == 'string') data[option]()\n })\n }", "function Plugin(option) {\n return this.each(function () {\n var $this = $(this)\n var data = $this.data('bs.popover')\n var options = typeof option == 'object' && option\n\n if (!data && option == 'destroy') return\n if (!data) $this.data('bs.popover', (data = new Popover(this, options)))\n if (typeof option == 'string') data[option]()\n })\n }", "function Plugin(option) {\n return this.each(function () {\n var $this = $(this)\n var data = $this.data('bs.popover')\n var options = typeof option == 'object' && option\n\n if (!data && option == 'destroy') return\n if (!data) $this.data('bs.popover', (data = new Popover(this, options)))\n if (typeof option == 'string') data[option]()\n })\n }", "function Plugin(option) {\n return this.each(function () {\n var $this = $(this)\n var data = $this.data('bs.popover')\n var options = typeof option == 'object' && option\n\n if (!data && option == 'destroy') return\n if (!data) $this.data('bs.popover', (data = new Popover(this, options)))\n if (typeof option == 'string') data[option]()\n })\n }", "function Plugin(option) {\n return this.each(function () {\n var $this = $(this)\n var data = $this.data('bs.popover')\n var options = typeof option == 'object' && option\n\n if (!data && option == 'destroy') return\n if (!data) $this.data('bs.popover', (data = new Popover(this, options)))\n if (typeof option == 'string') data[option]()\n })\n }", "function Plugin(option) {\n return this.each(function () {\n var $this = $(this)\n var data = $this.data('bs.popover')\n var options = typeof option == 'object' && option\n\n if (!data && option == 'destroy') return\n if (!data) $this.data('bs.popover', (data = new Popover(this, options)))\n if (typeof option == 'string') data[option]()\n })\n }", "function Plugin(option) {\n return this.each(function () {\n var $this = $(this)\n var data = $this.data('bs.popover')\n var options = typeof option == 'object' && option\n\n if (!data && option == 'destroy') return\n if (!data) $this.data('bs.popover', (data = new Popover(this, options)))\n if (typeof option == 'string') data[option]()\n })\n }", "function Plugin(option) {\n return this.each(function () {\n var $this = $(this)\n var data = $this.data('bs.popover')\n var options = typeof option == 'object' && option\n\n if (!data && option == 'destroy') return\n if (!data) $this.data('bs.popover', (data = new Popover(this, options)))\n if (typeof option == 'string') data[option]()\n })\n }", "function Plugin(option) {\n return this.each(function () {\n var $this = $(this)\n var data = $this.data('bs.popover')\n var options = typeof option == 'object' && option\n\n if (!data && option == 'destroy') return\n if (!data) $this.data('bs.popover', (data = new Popover(this, options)))\n if (typeof option == 'string') data[option]()\n })\n }", "function Plugin(option) {\n return this.each(function () {\n var $this = $(this)\n var data = $this.data('bs.popover')\n var options = typeof option == 'object' && option\n\n if (!data && option == 'destroy') return\n if (!data) $this.data('bs.popover', (data = new Popover(this, options)))\n if (typeof option == 'string') data[option]()\n })\n }", "function Plugin(option) {\n return this.each(function () {\n var $this = $(this)\n var data = $this.data('bs.popover')\n var options = typeof option == 'object' && option\n\n if (!data && option == 'destroy') return\n if (!data) $this.data('bs.popover', (data = new Popover(this, options)))\n if (typeof option == 'string') data[option]()\n })\n }", "function Plugin(option) {\n return this.each(function () {\n var $this = $(this)\n var data = $this.data('bs.popover')\n var options = typeof option == 'object' && option\n\n if (!data && option == 'destroy') return\n if (!data) $this.data('bs.popover', (data = new Popover(this, options)))\n if (typeof option == 'string') data[option]()\n })\n }", "function Plugin(option) {\n return this.each(function () {\n var $this = $(this)\n var data = $this.data('bs.popover')\n var options = typeof option == 'object' && option\n\n if (!data && option == 'destroy') return\n if (!data) $this.data('bs.popover', (data = new Popover(this, options)))\n if (typeof option == 'string') data[option]()\n })\n }", "function Plugin(option) {\n return this.each(function () {\n var $this = $(this)\n var data = $this.data('bs.popover')\n var options = typeof option == 'object' && option\n\n if (!data && option == 'destroy') return\n if (!data) $this.data('bs.popover', (data = new Popover(this, options)))\n if (typeof option == 'string') data[option]()\n })\n }", "function Plugin(option) {\n return this.each(function () {\n var $this = $(this)\n var data = $this.data('bs.popover')\n var options = typeof option == 'object' && option\n\n if (!data && option == 'destroy') return\n if (!data) $this.data('bs.popover', (data = new Popover(this, options)))\n if (typeof option == 'string') data[option]()\n })\n }", "function Plugin(option) {\n return this.each(function () {\n var $this = $(this)\n var data = $this.data('bs.popover')\n var options = typeof option == 'object' && option\n\n if (!data && option == 'destroy') return\n if (!data) $this.data('bs.popover', (data = new Popover(this, options)))\n if (typeof option == 'string') data[option]()\n })\n }", "function Plugin(option) {\n return this.each(function () {\n var $this = $(this)\n var data = $this.data('bs.popover')\n var options = typeof option == 'object' && option\n\n if (!data && option == 'destroy') return\n if (!data) $this.data('bs.popover', (data = new Popover(this, options)))\n if (typeof option == 'string') data[option]()\n })\n }", "function Plugin(option) {\n return this.each(function () {\n var $this = $(this)\n var data = $this.data('bs.popover')\n var options = typeof option == 'object' && option\n\n if (!data && option == 'destroy') return\n if (!data) $this.data('bs.popover', (data = new Popover(this, options)))\n if (typeof option == 'string') data[option]()\n })\n }", "function Plugin(option) {\n return this.each(function () {\n var $this = $(this)\n var data = $this.data('bs.popover')\n var options = typeof option == 'object' && option\n\n if (!data && option == 'destroy') return\n if (!data) $this.data('bs.popover', (data = new Popover(this, options)))\n if (typeof option == 'string') data[option]()\n })\n }", "function Plugin(option) {\n return this.each(function () {\n var $this = $(this)\n var data = $this.data('bs.popover')\n var options = typeof option == 'object' && option\n\n if (!data && /destroy|hide/.test(option)) return\n if (!data) $this.data('bs.popover', (data = new Popover(this, options)))\n if (typeof option == 'string') data[option]()\n })\n }", "function Plugin(option) {\n return this.each(function () {\n var $this = $(this)\n var data = $this.data('bs.popover')\n var options = typeof option == 'object' && option\n\n if ( !data && option == 'destroy') return\n if ( !data) $this.data('bs.popover', (data = new Popover(this, options)))\n if (typeof option == 'string') data[option]()\n })\n }", "function Plugin(option) {\n\t return this.each(function () {\n\t var $this = $(this)\n\t var data = $this.data('bs.popover')\n\t var options = typeof option == 'object' && option\n\n\t if (!data && /destroy|hide/.test(option)) return\n\t if (!data) $this.data('bs.popover', (data = new Popover(this, options)))\n\t if (typeof option == 'string') data[option]()\n\t })\n\t }", "function Plugin(option) {\n\t return this.each(function () {\n\t var $this = $(this)\n\t var data = $this.data('bs.popover')\n\t var options = typeof option == 'object' && option\n\n\t if (!data && /destroy|hide/.test(option)) return\n\t if (!data) $this.data('bs.popover', (data = new Popover(this, options)))\n\t if (typeof option == 'string') data[option]()\n\t })\n\t }", "function Plugin(option) {\n\t return this.each(function () {\n\t var $this = $(this)\n\t var data = $this.data('bs.popover')\n\t var options = typeof option == 'object' && option\n\n\t if (!data && /destroy|hide/.test(option)) return\n\t if (!data) $this.data('bs.popover', (data = new Popover(this, options)))\n\t if (typeof option == 'string') data[option]()\n\t })\n\t }", "function Plugin(option) {\n\t return this.each(function () {\n\t var $this = $(this)\n\t var data = $this.data('bs.popover')\n\t var options = typeof option == 'object' && option\n\n\t if (!data && /destroy|hide/.test(option)) return\n\t if (!data) $this.data('bs.popover', (data = new Popover(this, options)))\n\t if (typeof option == 'string') data[option]()\n\t })\n\t }", "function Plugin(option) {\n\t return this.each(function () {\n\t var $this = $(this)\n\t var data = $this.data('bs.popover')\n\t var options = typeof option == 'object' && option\n\n\t if (!data && /destroy|hide/.test(option)) return\n\t if (!data) $this.data('bs.popover', (data = new Popover(this, options)))\n\t if (typeof option == 'string') data[option]()\n\t })\n\t }", "function Plugin(option) {\n return this.each(function () {\n var $this = $(this)\n var data = $this.data('bs.popover')\n var options = typeof option == 'object' && option\n var selector = options && options.selector\n\n if (!data && option == 'destroy') return\n if (selector) {\n if (!data) $this.data('bs.popover', (data = {}))\n if (!data[selector]) data[selector] = new Popover(this, options)\n } else {\n if (!data) $this.data('bs.popover', (data = new Popover(this, options)))\n }\n if (typeof option == 'string') data[option]()\n })\n }", "function Plugin(option) {\n return this.each(function () {\n var $this = $(this)\n var data = $this.data('bs.popover')\n var options = typeof option == 'object' && option\n var selector = options && options.selector\n\n if (!data && option == 'destroy') return\n if (selector) {\n if (!data) $this.data('bs.popover', (data = {}))\n if (!data[selector]) data[selector] = new Popover(this, options)\n } else {\n if (!data) $this.data('bs.popover', (data = new Popover(this, options)))\n }\n if (typeof option == 'string') data[option]()\n })\n }", "function Plugin(option) {\n return this.each(function () {\n var $this = $(this)\n var data = $this.data('bs.popover')\n var options = typeof option == 'object' && option\n var selector = options && options.selector\n\n if (!data && option == 'destroy') return\n if (selector) {\n if (!data) $this.data('bs.popover', (data = {}))\n if (!data[selector]) data[selector] = new Popover(this, options)\n } else {\n if (!data) $this.data('bs.popover', (data = new Popover(this, options)))\n }\n if (typeof option == 'string') data[option]()\n })\n }", "function Plugin(option) {\n return this.each(function () {\n var $this = $(this)\n var data = $this.data('bs.popover')\n var options = typeof option == 'object' && option\n var selector = options && options.selector\n\n if (!data && option == 'destroy') return\n if (selector) {\n if (!data) $this.data('bs.popover', (data = {}))\n if (!data[selector]) data[selector] = new Popover(this, options)\n } else {\n if (!data) $this.data('bs.popover', (data = new Popover(this, options)))\n }\n if (typeof option == 'string') data[option]()\n })\n }", "function Plugin(option) {\n return this.each(function () {\n var $this = $(this)\n var data = $this.data('bs.popover')\n var options = typeof option == 'object' && option\n var selector = options && options.selector\n\n if (!data && option == 'destroy') return\n if (selector) {\n if (!data) $this.data('bs.popover', (data = {}))\n if (!data[selector]) data[selector] = new Popover(this, options)\n } else {\n if (!data) $this.data('bs.popover', (data = new Popover(this, options)))\n }\n if (typeof option == 'string') data[option]()\n })\n }", "function showSharePopUp () {\r\n\r\n // Trigger share pop up since we were in last slide\r\n if ( !isSharePopUpShowing && EM.scenemanager.presentation.userInfo.isPublic ){\r\n $('.pop-container').show();\r\n isSharePopUpShowing = true;\r\n\r\n $('.rightButton').prop('disabled', true);\r\n $('.leftButton').prop('disabled', false);\r\n\r\n var scale_factor = $('#slide-box').attr('scale-factor') || ( $(window).width() / 1920);\r\n\r\n $('.wrap-pop').css('-webkit-transform', 'scale(' + scale_factor + ')');\r\n $('.wrap-pop').css('-moz-transform', 'scale(' + scale_factor + ')');\r\n $('.wrap-pop').css('-ms-transform', 'scale(' + scale_factor + ')');\r\n $('.wrap-pop').css('transform', 'scale(' + scale_factor + ')');\r\n }\r\n }", "function look_ruby_single_page_featured_popup() {\r\n $('.page-template-default .post-thumb.is-image-single a').magnificPopup({\r\n type: 'image',\r\n removalDelay: 500,\r\n mainClass: 'mfp-fade',\r\n closeOnContentClick: true,\r\n closeBtnInside: true\r\n });\r\n }", "function look_ruby_sb_widget_instagram_popup() {\r\n if ('undefined' != typeof (look_ruby_sb_instagram_popup) && 1 == look_ruby_sb_instagram_popup) {\r\n $('.instagram-content-wrap .instagram-el a').magnificPopup({\r\n type: 'image',\r\n removalDelay: 200,\r\n mainClass: 'mfp-fade',\r\n closeOnContentClick: true,\r\n closeBtnInside: true,\r\n gallery: {\r\n enabled: true,\r\n navigateByImgClick: true,\r\n preload: [0, 1]\r\n }\r\n });\r\n }\r\n }", "openPopUp(){\r\n // Hide the back panel.\r\n const element = document.getElementsByClassName(StylesPane.HideBackPanel)[0]\r\n element.className = StylesPane.BackPanel\r\n // Show the settings panel.\r\n }", "function partenza()\n{\t\n\tjQuery.support.cors = true;\n\n\t//per il tooltip (notifiche)\n\t$('.notifiche').popover({\n\t\t'html': 'true',\n 'selector': '',\n 'placement': 'bottom',\n 'title': 'Notifiche',\n 'content': '<div class=\"well well-small\">Guarda il tutorial di Local Job</div>'+\n '<div class=\"well well-small\">Aggiorna il tuo profilo per iniziare</div>',\n 'container': '.contNotifiche'\n });\n\n\t//Listen for orientation changes\n\twindow.addEventListener(\"orientationchange\", function() {\n \t\t\n \t\t//Announce the new orientation number\n \t\tif(window.orientation == 0 && (location.href).indexOf(\"home\") == -1)\n \t\t{\n \t\t\t//Non sono nella mappa, quindi non faccio niente\n \t\t\tlocation.href = 'interventi-attivi.html';\n \t\t}\n \t\tif(window.orientation == 90 && (location.href).indexOf(\"home\") == -1)\n \t\t{\n \t\t\t//orientamento verso sinistra\n \t\t\tlocation.href = 'map-landscape.html';\n \t\t}\n \t\tif(window.orientation == -90 && (location.href).indexOf(\"home\") == -1)\n \t\t{\n\t\t\t//orientamento verso destra\n \t\t\tlocation.href = 'map-landscape.html';\n \t\t}\n\t}, false);\n}", "function updateMemberPopover(idNum) {\n $(\"#mPill_\" + idNum).data('popover').options.content = \"\";\n}", "function Plugin(option) {\n return this.each(function () {\n var $this = $(this)\n var data = $this.data('bs.popover')\n var options = typeof option == 'object' && option\n\n if (!data && /destroy|hide/.test(option)) return\n if (!data) $this.data('bs.popover', (data = new Popover(this, options)))\n if (typeof option == 'string') data[option]()\n })\n }", "function popItems(mode) {\n if (mpg.lightbox) {\n mpg.lightbox.dismiss();\n }\n var lb = mpg.chooser_lightbox;\n lb.pop(undefined,undefined,true);//without topline\n var fsrc = om.useMinified?\"chooser2.html\":\"chooser2d.html\"; // go to dev version from dev version\n lb.setHtml('<iframe width=\"100%\" height=\"100%\" scrolling=\"no\" id=\"chooser\" src=\"'+fsrc+'?mode='+mode+'\"/>');\n }", "function Poppy (cfg) {\n if (controller) return controller;\n\n if (browserIsNotSupported(window.navigator)) return this.fallback();\n\n cfg = cfg || {};\n this.cfg = {\n theme: cfg.theme || \"default\"\n };\n\n this.injectStyle();\n this.createOverlay();\n this.bind();\n modals = this.modals = {};\n count = 0;\n controller = this;\n return this;\n}", "function makePopupSolicitud(){ \n\n}", "function Plugin(option) {\r\n return this.each(function () {\r\n var $this = $(this)\r\n var data = $this.data('bs.popover')\r\n var options = typeof option == 'object' && option\r\n\r\n if (!data && /destroy|hide/.test(option)) return\r\n if (!data) $this.data('bs.popover', (data = new Popover(this, options)))\r\n if (typeof option == 'string') data[option]()\r\n })\r\n }", "function Plugin(option) {\r\n return this.each(function () {\r\n var $this = $(this)\r\n var data = $this.data('bs.popover')\r\n var options = typeof option == 'object' && option\r\n\r\n if (!data && /destroy|hide/.test(option)) return\r\n if (!data) $this.data('bs.popover', (data = new Popover(this, options)))\r\n if (typeof option == 'string') data[option]()\r\n })\r\n }", "function Plugin(option) {\r\n return this.each(function () {\r\n var $this = $(this)\r\n var data = $this.data('bs.popover')\r\n var options = typeof option == 'object' && option\r\n\r\n if (!data && /destroy|hide/.test(option)) return\r\n if (!data) $this.data('bs.popover', (data = new Popover(this, options)))\r\n if (typeof option == 'string') data[option]()\r\n })\r\n }", "function Plugin(option) {\r\n return this.each(function () {\r\n var $this = $(this)\r\n var data = $this.data('bs.popover')\r\n var options = typeof option == 'object' && option\r\n\r\n if (!data && /destroy|hide/.test(option)) return\r\n if (!data) $this.data('bs.popover', (data = new Popover(this, options)))\r\n if (typeof option == 'string') data[option]()\r\n })\r\n }", "function popup(msg,bak)\n{\n delay(800);\n\n var content=\"<table class=\\\"tooltip\\\"><tr><td class=\\\"tooltip\\\">\"+msg+\"</td></tr></table>\";\n\n if(old)\n {\n alert(msg);\n return;\n } \n \n yyy=Yoffset; \n skin.width=popwidth;\n\n if(nav)\n { \n skin.document.open();\n skin.document.write(content);\n skin.document.close();\n skin.visibility=\"visible\";\n }\n\n if(iex)\n { \n pup.innerHTML=content;\n skin.visibility=\"visible\";\n } \n\n if(n_6)\n { \n document.getElementById(\"pup\").innerHTML=content;\n skin.visibility=\"visible\";\n }\n}", "function notify_popup(){//called from popup window when popup window has opened!\n\t//console.log('notify_popup');\n\tif(hap_popup && hap_popup.initPopup != undefined){//dont do anything if we are not going to be able to open popup!\n\t\tif(hap_settings.autoUpdateWindowData)updatePlayerData();\n\t\n\t\tif(hap_players && hap_players[0]){\n\t\t\tif(hap_players[0].destroyPlaylist != undefined)hap_players[0].destroyPlaylist();\n\t\t}\n\t\tjQuery('#componentWrapper').css('display','none');//hide player in parent page (we cant clear html because we dont dynamically append componentWrapper html with jquery! Only if we save the player html prior to this action so we can reinstantiate it later.)\n\t\t\n\t\ttry {\n\t\t\tif(hap_popup.initPopup != undefined)hap_popup.initPopup(hap_settings);\n\t\t\tif(hap_players[0])hap_players[0].find('.popup_open').css('display','none');\n\t\t}catch(e){\n\t\t\talert('parent notify_popup error: ' + e.message);\n\t\t\treturn false;\n\t\t}\n\t}\n}" ]
[ "0.65172714", "0.6155215", "0.614206", "0.60616994", "0.6005223", "0.59905416", "0.59692305", "0.58698756", "0.58214915", "0.58214915", "0.5795073", "0.5791303", "0.5788668", "0.57536405", "0.5745262", "0.572578", "0.5721664", "0.57004213", "0.5683987", "0.5673775", "0.56450665", "0.562796", "0.56140083", "0.56118774", "0.5611822", "0.5611256", "0.5601729", "0.5596869", "0.5596869", "0.55966145", "0.55949515", "0.55949515", "0.55949515", "0.55833876", "0.5577806", "0.5577806", "0.5577806", "0.5577806", "0.5577806", "0.5577806", "0.5577806", "0.5577806", "0.5577806", "0.5577806", "0.5577806", "0.5577806", "0.5577806", "0.5577806", "0.5577806", "0.5577806", "0.5577806", "0.5577806", "0.5577806", "0.5577806", "0.5577806", "0.5577806", "0.5577806", "0.5577806", "0.55724996", "0.55706817", "0.5565676", "0.5565676", "0.5565676", "0.5565676", "0.5565676", "0.5562148", "0.5562148", "0.5562148", "0.5562148", "0.5562148", "0.55405176", "0.5518634", "0.5504538", "0.54761374", "0.5474267", "0.54522055", "0.5447434", "0.5395847", "0.53904444", "0.5384788", "0.53787214", "0.53787214", "0.53787214", "0.53787214", "0.5378135", "0.5376093" ]
0.0
-1
SCROLLSPY CLASS DEFINITION ==========================
function ScrollSpy(element, options) { this.$body = $(document.body) this.$scrollElement = $(element).is(document.body) ? $(window) : $(element) this.options = $.extend({}, ScrollSpy.DEFAULTS, options) this.selector = (this.options.target || '') + ' .nav li > a' this.offsets = [] this.targets = [] this.activeTarget = null this.scrollHeight = 0 this.$scrollElement.on('scroll.bs.scrollspy', $.proxy(this.process, this)) this.refresh() this.process() }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "set scrolling(scrolling) {\n this._scrolling = scrolling;\n }", "function ScrollPosition() {}", "constructor() {\n this.instance = createScrollBar();\n }", "get scrollTarget(){return this.$.scrollable}", "constructor(props){\n super(props);\n this.state = {\n show: true,\n scrollPos: 0\n };\n this.handleScroll = this.handleScroll.bind(this);\n }", "function VirtualScrollStrategy() {}", "function VirtualScrollStrategy() {}", "function VirtualScrollStrategy() {}", "function VirtualScrollStrategy() {}", "function _scrollable() {\n // Private variables\n var position = {};\n\n // Private method\n function getEvent(event) {\n return event.originalEvent.targetTouches[0] ? event.originalEvent.targetTouches[0] : event.originalEvent.changedTouches[0];\n };\n\n // Public method\n this.onStart = function(e) {\n var touchObject = getEvent(e);\n\n position.start = {x: touchObject.pageX, y: touchObject.pageY};\n\n e.stopPropagation();\n };\n\n this.onMove = function(e) {\n var touchObject = getEvent(e);\n var dist = position.start.y - touchObject.pageY;\n\n if(this.scrollTop + dist >= this.scrollHeight - this.clientHeight) {\n e.preventDefault();\n e.returnValue = false;\n return false;\n }\n\n e.stopPropagation();\n };\n\n this.onWheel = function(e) {\n var up = (e.type == 'DOMMouseScroll' ? e.originalEvent.detail * -40 : e.originalEvent.wheelDelta) > 0,\n h = this.scrollHeight - this.clientHeight,\n c = this.scrollTop / h;\n\n if ((!up && c === 1) || (up && c === 0) || h === 0) {\n e.preventDefault();\n e.returnValue = false;\n return false;\n }\n\n e.stopPropagation();\n };\n}", "function scroller() {\n if (this.id == \"arrow1\") {\n smoothScroll(\"SP\");\n }\n else if (this.id == \"arrow2\") {\n smoothScroll(\"VP\");\n }\n else if (this.id == \"arrow3\") {\n smoothScroll(\"TP\");\n }\n else if (this.id == \"arrow4\") {\n smoothScroll(\"top\");\n }\n}", "function updateScroll(){if(!elements.li[0])return;var height=elements.li[0].offsetHeight,top=height*ctrl.index,bot=top+height,hgt=elements.scroller.clientHeight,scrollTop=elements.scroller.scrollTop;if(top<scrollTop){scrollTo(top);}else if(bot>scrollTop+hgt){scrollTo(bot-hgt);}}", "_scrollHandler () {}", "stepScrollAnimation_() {\n if (!this.scrollTarget) {\n return;\n }\n\n const currentScrollPos = -this.workspace_.scrollY;\n const diff = this.scrollTarget - currentScrollPos;\n if (Math.abs(diff) < 1) {\n this.workspace_.scrollbar.setY(this.scrollTarget);\n this.scrollTarget = null;\n return;\n }\n this.workspace_.scrollbar.setY(\n currentScrollPos + diff * this.scrollAnimationFraction);\n\n requestAnimationFrame(this.stepScrollAnimation_.bind(this));\n }", "function Scrolltrack (options) {\n if (!(this instanceof Scrolltrack)) return new Scrolltrack(options)\n if (!options) options = {}\n\n this.selector = options.selector || 'h1, h2, h3, h4, h5, h6'\n this.parent = options.parent || document\n this.onupdate = options.onupdate || function () {}\n this.menu = options.menu || document\n this.scrollParent = options.scrollParent || document\n this.offsetPercent = options.offsetPercent || 0.1\n\n this.listener = debounce(this.onScroll, 5).bind(this)\n this.update = debounce(this._update, 20).bind(this)\n this.active = undefined\n this.index = []\n\n this.listen()\n this.update()\n}", "function scroller_multiselect() {\n $('.multi_choice').find('ul').addClass('scroller');\n $('.multi_choice').find('ul').slimScroll({\n height: 'auto'\n });\n}", "function ScrollBar(options) {\r\n if (options === void 0) { options = {}; }\r\n var _this = _super.call(this, { node: Private.createNode() }) || this;\r\n /**\r\n * A timeout callback for repeating the mouse press.\r\n */\r\n _this._onRepeat = function () {\r\n // Clear the repeat timer id.\r\n _this._repeatTimer = -1;\r\n // Bail if the mouse has been released.\r\n if (!_this._pressData) {\r\n return;\r\n }\r\n // Look up the part that was pressed.\r\n var part = _this._pressData.part;\r\n // Bail if the thumb was pressed.\r\n if (part === 'thumb') {\r\n return;\r\n }\r\n // Schedule the timer for another repeat.\r\n _this._repeatTimer = setTimeout(_this._onRepeat, 20);\r\n // Get the current mouse position.\r\n var mouseX = _this._pressData.mouseX;\r\n var mouseY = _this._pressData.mouseY;\r\n // Handle a decrement button repeat.\r\n if (part === 'decrement') {\r\n // Bail if the mouse is not over the button.\r\n if (!domutils_1.ElementExt.hitTest(_this.decrementNode, mouseX, mouseY)) {\r\n return;\r\n }\r\n // Emit the step requested signal.\r\n _this._stepRequested.emit('decrement');\r\n // Finished.\r\n return;\r\n }\r\n // Handle an increment button repeat.\r\n if (part === 'increment') {\r\n // Bail if the mouse is not over the button.\r\n if (!domutils_1.ElementExt.hitTest(_this.incrementNode, mouseX, mouseY)) {\r\n return;\r\n }\r\n // Emit the step requested signal.\r\n _this._stepRequested.emit('increment');\r\n // Finished.\r\n return;\r\n }\r\n // Handle a track repeat.\r\n if (part === 'track') {\r\n // Bail if the mouse is not over the track.\r\n if (!domutils_1.ElementExt.hitTest(_this.trackNode, mouseX, mouseY)) {\r\n return;\r\n }\r\n // Fetch the thumb node.\r\n var thumbNode = _this.thumbNode;\r\n // Bail if the mouse is over the thumb.\r\n if (domutils_1.ElementExt.hitTest(thumbNode, mouseX, mouseY)) {\r\n return;\r\n }\r\n // Fetch the client rect for the thumb.\r\n var thumbRect = thumbNode.getBoundingClientRect();\r\n // Determine the direction for the page request.\r\n var dir = void 0;\r\n if (_this._orientation === 'horizontal') {\r\n dir = mouseX < thumbRect.left ? 'decrement' : 'increment';\r\n }\r\n else {\r\n dir = mouseY < thumbRect.top ? 'decrement' : 'increment';\r\n }\r\n // Emit the page requested signal.\r\n _this._pageRequested.emit(dir);\r\n // Finished.\r\n return;\r\n }\r\n };\r\n _this._value = 0;\r\n _this._page = 10;\r\n _this._maximum = 100;\r\n _this._repeatTimer = -1;\r\n _this._pressData = null;\r\n _this._thumbMoved = new signaling_1.Signal(_this);\r\n _this._stepRequested = new signaling_1.Signal(_this);\r\n _this._pageRequested = new signaling_1.Signal(_this);\r\n _this.addClass('p-ScrollBar');\r\n _this.setFlag(widget_1.Widget.Flag.DisallowLayout);\r\n // Set the orientation.\r\n _this._orientation = options.orientation || 'vertical';\r\n _this.dataset['orientation'] = _this._orientation;\r\n // Parse the rest of the options.\r\n if (options.maximum !== undefined) {\r\n _this._maximum = Math.max(0, options.maximum);\r\n }\r\n if (options.page !== undefined) {\r\n _this._page = Math.max(0, options.page);\r\n }\r\n if (options.value !== undefined) {\r\n _this._value = Math.max(0, Math.min(options.value, _this._maximum));\r\n }\r\n return _this;\r\n }", "function setScrollable()\r\n{\r\n //Added document readiness to set classes if the link toggles\r\n $(document).ready(function()\r\n {\r\n //Event to auto-position next/previous arrowheads\r\n document.scrollableOnResizeListener = function(e)\r\n {\r\n //Exit if the body height has not changed since it's unlikely that the arrowheads need to be repositioned\r\n if (isDefined(document.scrollableBodyHeight))\r\n if (document.scrollableBodyHeight == $(\"body\").height())\r\n return false;\r\n document.scrollableBodyHeight = $(\"body\").height();\r\n \r\n $(\".scrollable\").each(function()\r\n {\r\n var currentElement = $(this);\r\n var buttonTop = (currentElement.offset().top + currentElement.outerHeight() / 2);\r\n var previous = currentElement.children(\".previous:first\");\r\n var next = currentElement.children(\".next:first\");\r\n var previousLeft = previous.hasClass(\"autoPosition\") ? (currentElement.offset().left - previous.outerWidth()) : previous.offset().left;\r\n var nextLeft = next.hasClass(\"autoPosition\") ? (currentElement.offset().left + currentElement.outerWidth()) : next.offset().left;\r\n var nextWidth = next.outerWidth();\r\n\r\n //Position and show scroll buttons only if they're within the visible area of the screen\r\n if ((previousLeft >= 0) && ((nextLeft + nextWidth) < document.body.clientWidth))\r\n {\r\n if (previous.hasClass(\"autoPosition\"))\r\n previous.css({position:\"absolute\", left: previousLeft, top: buttonTop});\r\n if (next.hasClass(\"autoPosition\"))\r\n next.css({position:\"absolute\", left: nextLeft, top: buttonTop});\r\n previous.show();\r\n next.show();\r\n }\r\n else\r\n {\r\n previous.hide();\r\n next.hide();\r\n }\r\n });\r\n };\r\n\r\n //Initialize tinyCarousel\r\n $(\".scrollable\").each(function()\r\n {\r\n var currentElement = $(this);\r\n var classes = currentElement.attr(\"class\");\r\n var millisecondsInASecond = 1000;\r\n var scrollItems = 1;\r\n var scrollTime = 1000;\r\n var animationTime = 150;\r\n var previous = currentElement.children(\".previous:first\");\r\n var next = currentElement.children(\".next:first\");\r\n\r\n //Read custom parameters from the CSS class value\r\n if ((isDefined(document.isMobileOptimized)) && (classes.indexOf(\"mobileScrollItems\") >= 0))\r\n scrollItems = parseInt(classes.split(\"mobileScrollItems\")[1].split(\" \")[0]);\r\n else if (classes.indexOf(\"scrollItems\") >= 0)\r\n scrollItems = parseInt(classes.split(\"scrollItems\")[1].split(\" \")[0]);\r\n if (classes.indexOf(\"scrollTime\") >= 0)\r\n scrollTime = parseInt(classes.split(\"scrollTime\")[1].split(\" \")[0]) * millisecondsInASecond;\r\n \r\n //Assign swipe functionality\r\n currentElement.bind(\"swipeleft\", function(e)\r\n {\r\n $(this).find(\".next:not(.hidden):first\").trigger(\"click\");\r\n });\r\n currentElement.bind(\"swiperight\", function(e)\r\n {\r\n $(this).find(\".previous:not(.hidden):first\").trigger(\"click\");\r\n });\r\n \r\n currentElement.tinycarousel({interval:true, display:scrollItems, intervaltime:scrollTime, duration:animationTime, callback:document.scrollableOnResizeListener});\r\n });\r\n \r\n //Auto-position next/previous arrowheads\r\n document.scrollableOnResizeListener();\r\n $(window).resize(document.scrollableOnResizeListener);\r\n });\r\n}", "get scroller() {\n return this.getScrollerForMode(this.mode);\n }", "function cust_PageScroll(ref) {\n\n}", "function updateScroll () {\n if (!elements.li[0]) return;\n if (mode === MODE_STANDARD) {\n updateStandardScroll();\n } else {\n updateVirtualScroll();\n }\n }", "_setupScrollspy() {\n if (!this.scrollContent) {\n return;\n }\n\n new ScrollSpy(document.querySelector(this.scrollContent), {\n target: this.menu,\n // Top offset position of the sticky menu\n offset: 220\n });\n }", "function init(){\n\tnew SmoothScroll(document,200,2)\n}", "_setupScroll() {\n this._expanderEl = document.createElement('div');\n this._expanderEl.setAttribute('class', 'expander');\n document.body.appendChild(this._expanderEl);\n }", "function VirtualScrollStrategy() { }", "function VirtualScrollStrategy() { }", "get scrollSpeed() { return this._scrollSpeed; }", "_scrollTop(){\n let self = this;\n \n if(this.props.speed == 'fast') {\n let hasScrollTop = 'scrollTop' in window;\n //if (value === undefined) return hasScrollTop ? node.scrollTop : node.pageYOffset\n hasScrollTop ? (() => {window.scrollTop = 0})() : (() => { window.scrollTo(window.scrollX, 0) })();\n }else{\n function moveScroll(){ \n self.scrollTop = self.scrollTop / 1.2; \n if(self.scrollTop === 0){ \n clearInterval(moveInterval); \n moveInterval = null;\n } \n } \n let moveInterval = setInterval(moveScroll, 10); \n } \n }", "initScroll() {\n const me = this,\n scroller = me.scrollable,\n virtualScrollerElement = me.virtualScrollerElement;\n\n if (BrowserHelper.isFirefox) {\n scroller.element.addEventListener('wheel', (event) => {\n if (event.deltaX) {\n scroller.x += event.deltaX;\n event.preventDefault();\n }\n });\n }\n\n scroller.yScroller = me.grid.scrollable;\n\n // Add our Scroller to the controlling GridScroller\n scroller.yScroller.addScroller(scroller);\n\n // Create a Scroller for the fake horizontal scrollbar so that it can partner\n me.fakeScroller = new Scroller({\n element: virtualScrollerElement,\n overflowX: true\n });\n\n // Fire horizontalscroll when our xScroller reports a scroll\n scroller.on('scroll', me.createOnFrame(me.syncScrollingPartners));\n scroller.on('scrollend', () => {\n me.scrolling = false;\n });\n\n scroller.addPartner(me.fakeScroller, 'x');\n if (me.header) {\n scroller.addPartner(me.header.scrollable, 'x');\n }\n if (me.footer) {\n scroller.addPartner(me.footer.scrollable, 'x');\n }\n }", "updateScrollIndicators () {\n let container = this.refs.container;\n let up = false;\n let down = false;\n let scrollTop = container.scrollTop;\n let scrollHeight = container.scrollHeight;\n let offsetHeight = container.offsetHeight;\n\n if (scrollTop > 0) {\n up = true;\n }\n\n if (\n scrollHeight > offsetHeight && scrollTop + offsetHeight !== scrollHeight\n ) {\n down = true;\n }\n\n container.className = classNames('scroll-indicator', this.props.className, {\n 'scroll-up': up,\n 'scroll-down': down,\n });\n }", "function scrollListener() {\n activeInWrapper()\n scrollAnimation()\n}", "[scroll]() {\n if (!this.scrollableElement || !this.currentMousePosition) {\n return;\n }\n\n cancelAnimationFrame(this.scrollAnimationFrame);\n\n const { speed, sensitivity } = this.options;\n\n const rect = this.scrollableElement.getBoundingClientRect();\n const bottomCutOff = rect.bottom > window.innerHeight;\n const topCutOff = rect.top < 0;\n const cutOff = topCutOff || bottomCutOff;\n\n const documentScrollingElement = getDocumentScrollingElement();\n const scrollableElement = this.scrollableElement;\n const clientX = this.currentMousePosition.clientX;\n const clientY = this.currentMousePosition.clientY;\n\n if (scrollableElement !== document.body && scrollableElement !== document.documentElement && !cutOff) {\n const { offsetHeight, offsetWidth } = scrollableElement;\n\n if (rect.top + offsetHeight - clientY < sensitivity) {\n scrollableElement.scrollTop += speed;\n } else if (clientY - rect.top < sensitivity) {\n scrollableElement.scrollTop -= speed;\n }\n\n if (rect.left + offsetWidth - clientX < sensitivity) {\n scrollableElement.scrollLeft += speed;\n } else if (clientX - rect.left < sensitivity) {\n scrollableElement.scrollLeft -= speed;\n }\n } else {\n const { innerHeight, innerWidth } = window;\n\n if (clientY < sensitivity) {\n documentScrollingElement.scrollTop -= speed;\n } else if (innerHeight - clientY < sensitivity) {\n documentScrollingElement.scrollTop += speed;\n }\n\n if (clientX < sensitivity) {\n documentScrollingElement.scrollLeft -= speed;\n } else if (innerWidth - clientX < sensitivity) {\n documentScrollingElement.scrollLeft += speed;\n }\n }\n\n this.scrollAnimationFrame = requestAnimationFrame(this[scroll]);\n }", "function Scroller(X,Y,refresh) {\n\tthis.canScroll=0;\n\tthis.refresh=refresh;\n\tthis.x=X;\n\tthis.y=Y;\n\tthis.timer=setTimeout(\"repositionOver()\",this.refresh);\n}", "function setScrolling()\n {\n scrolling = true;\n }", "function createNiceScroll(elmntClass,scrollColor=\"#e8e8e8\",width=\"5px\"){\n $(elmntClass).niceScroll({\n cursorwidth:width,\n cursorcolor:scrollColor,\n cursorborder: \"0px solid #fff\", // css definition for cursor border\n cursorborderradius: \"0px\", // border radius in pixel for cursor\n autohidemode:false,\n zindex:999,\n emulatetouch: true,\n });\n }", "_refreshScrollerPosition() {\n this.__carouselScrollerWidth = qx.bom.element.Dimension.getWidth(\n this.__carouselScroller.getContentElement()\n );\n\n this._scrollToPage(this.getCurrentIndex());\n }", "function O_Scrollbar()\n\t{\n\t\tvar $=this,\n\t\t\t_=null;\n\t\t\n\t\t$.varchar___id\t\t\t\t\t\t\t\t='';\n\t\t$.varchar___position\t\t\t\t\t\t='';\n\t\t$.object_dom___component\t\t\t\t\t=_;\n\t\t\n\t\t$.integer___left_offset\t\t\t\t\t\t=0;\n\t\t$.integer___top_offset\t\t\t\t\t\t=0;\n\t\t\n\t\t$.object_dom___o_Slider\t\t\t\t\t\t=_;\n\t\t$.integer___o_Slider_offset_width\t\t\t=0;\n\t\t$.integer___o_Slider_offset_height\t\t\t=0;\n\t\t$.integer___o_Slider_minimal_left_offset\t=0;\n\t\t$.integer___o_Slider_maximal_left_offset\t=0;\n\t\t\n//\tTEMP:\n\t\t$.integer___minimal_value_limit=0;\n\t\t$.integer___maximal_value_limit=0;\n\t\t$.integer___value_changing_step=0;\n\t\t\n//\tTEMP:\n\t\t$.array_object___mouse_cursor_position_info\t\t=[];\n\t\t$.object_object___mouse_cursor_position_info\t={};\n\t\t$.object_integer___o_Slider_left_offset_by_value={};\n\t\t\n\t\t\n//\tANALYZE:\n\t\t$.integer___target_scrolling_minimal_left_offset\t=0;\n\t\t$.integer___target_scrolling_maximal_left_offset\t=0;\n\t\t$.integer___target_scrolling_minimal_top_offset\t\t=0;\n\t\t$.integer___target_scrolling_maximal_top_offset\t\t=0;\t\t\n\t\t\n\t\t\n\t\t$.integer___minimal_mouse_cursor_coordinate_x=0;\n\t\t$.integer___maximal_mouse_cursor_coordinate_x=0;\n\t\t$.integer___minimal_mouse_cursor_coordinate_y=0;\n\t\t$.integer___maximal_mouse_cursor_coordinate_y=0;\n\n\t\t$.integer___mouse_cursor_coordinate_x=0;\n\t\t$.integer___mouse_cursor_coordinate_y=0;\n\t\t\n\t\t$.integer___previous_mouse_cursor_coordinate_x=0;\n\t\t$.integer___previous_mouse_cursor_coordinate_y=0;\n\t\t\n\t\t$.integer___mouse_cursor_horizontal_offset\t=0;\n\t\t$.integer___mouse_cursor_vertical_offset\t=0;\n\t\t\n\t\t$.float___o_Slider_movement_step\t\t\t=0;\n\t\t\n\t\t\n\t\t$.F_ExecuteActionAfterScrollReachedRightEnd=_;\n\t\t\n\t\t\n\t\t$.F_Initialize=function(object___configuration)\n\t\t{\n\t\t\tif (object___configuration)\n\t\t\t{\n\t\t\t\t$.varchar___id=object___configuration.varchar___id;\n\t\t\t\t\n\t\t\t\t$.varchar___position=object___configuration.varchar___position;\n\t\t\t\t\n\t\t\t\t$.object_dom___component\t=object___configuration.object_dom___component||document.getElementById(object___configuration.string___DOM_id);\n\t\t\t\t$.object_dom___o_Slider\t\t=jQuery(\"div div\",$.object_dom___component)[0];\n\t\t\t\t\n\t\t\t\tif (!object___configuration.object_dom___target && !object___configuration.string___target_DOM_id)\n\t\t\t\t\t$.object_dom___target\t=$.object_dom___component.parentNode.children[0];\n\t\t\t\telse \n\t\t\t\t\t$.object_dom___target\t=object___configuration.object_dom___target||document.getElementById(object___configuration.string___target_DOM_id);\n\t\t\t\t\t\n\n\t\t\t\tif ($.varchar___position=='horizontal')\n\t\t\t\t{\n\t\t\t\t\t$.integer___offset_width\t\t\t\t\t\t=$.object_dom___component.offsetWidth;//Math.floor(jQuery($.object_dom___component).outerWidth());\n\t\n//\tTODO: need update on window resize and recalculate depended values\n\t\t\t\t\t$.integer___left_offset\t\t\t\t\t\t\t=__GetElementAbsoluteXCoordinate($.object_dom___component); //Math.floor(jQuery($.object_dom___component).offset().left);\n\t\t\t\t\t\n\t\t\t\t\t$.integer___o_Slider_minimal_offset_width\t\t=50;\n\t\t\t\t\t$.integer___o_Slider_maximal_left_offset\t\t=$.integer___offset_width-$.integer___o_Slider_minimal_offset_width;\n\t\t\t\t\t\n//\tANALYZE: case, when separate controls present, need include their dimensions\n//\tANALYZE: when start offset not 0, saved scrolling position\n\t\t\t\t\t$.integer___o_Slider_minimal_left_offset\t\t=0;\n\t\t\t\t\t\n\t\t\t\t\t$.integer___target_scrolling_minimal_left_offset=0;\n//\tIMPORTANT,ANALYZE: possible problem width border, padding/margin while calculating offsetWidth/offsetHeight\n\t\t\t\t\t$.integer___target_scrolling_maximal_left_offset=$.object_dom___target.scrollWidth-$.object_dom___target.offsetWidth;\n\t\t\t\t\t\n\t\t\t\t\tvar integer___borders_width=jQuery($.object_dom___component).children('div').children('b').width()+jQuery($.object_dom___component).children('div').children('i').width();\n\n\t\t\t\t\tjQuery($.object_dom___component).children('div').children('em').css('width',$.integer___offset_width-integer___borders_width+'px');\n\t\t\t\t\t\n\t\t\t\t\tif ($.integer___target_scrolling_maximal_left_offset>$.integer___o_Slider_maximal_left_offset)\n\t\t\t\t\t{\n\t\t\t\t\t\t$.integer___o_Slider_offset_width\t\t\t=$.integer___o_Slider_minimal_offset_width;\n\t\t\t\t\t\t$.integer___o_Slider_maximal_left_offset\t=$.integer___offset_width-$.integer___o_Slider_offset_width;\n\n\t\t\t\t\t\t$.object___o_Slider.F_InitializeWidth(integer___borders_width);\n\t\t\t\t\t\t\n\t\t\t\t\t\t$.integer___minimal_mouse_cursor_coordinate_x=$.integer___left_offset;\n\t\t\t\t\t\t$.integer___maximal_mouse_cursor_coordinate_x=$.integer___left_offset+$.integer___offset_width-$.integer___o_Slider_offset_width;\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\tvar integer___target_scrolling_step\t\t\t\t\t\t=Math.ceil($.integer___target_scrolling_maximal_left_offset/$.integer___o_Slider_maximal_left_offset);\n\t\t\t\t\t\t$.float___o_Slider_movement_step\t\t\t\t\t\t=$.integer___o_Slider_maximal_left_offset/$.integer___target_scrolling_maximal_left_offset;\n//\tif (integer___o_Slider.movement_step==1)\n\t\t\t\t\t\tvar integer___target_scrolling_steps_amount\t\t\t\t=Math.ceil($.integer___o_Slider_maximal_left_offset);\n\t\t\t\t\t\t\n\t\t\t\t\t\tvar integer___target_scrolling_step_adjustments_amount\t=integer___target_scrolling_step*integer___target_scrolling_steps_amount-$.integer___target_scrolling_maximal_left_offset;\n\t\t\t\t\t\tvar integer___target_scrolling_step_adjustments_interval=Math.floor(integer___target_scrolling_steps_amount/integer___target_scrolling_step_adjustments_amount);\n\t\t\t\t\t\t\n\t\t\t\t\t\t$.object___o_Slider.F_CalculateMovementSteps\n\t\t\t\t\t\t(\n\t\t\t\t\t\t\tinteger___target_scrolling_step,\n\t\t\t\t\t\t\tinteger___target_scrolling_steps_amount,\n\t\t\t\t\t\t\tinteger___target_scrolling_step_adjustments_amount,\n\t\t\t\t\t\t\tinteger___target_scrolling_step_adjustments_interval\n\t\t\t\t\t\t);\n\t\t\t\t\t\t\n//\tANALYZE,TODO: need adjustment of accuracy\n\n//\tset slider position by target\n\t\t\t\t\t\t$.object___o_Slider.F_InitializePosition();\n\t\t\t\t\t\t\n\t\t\t\t\t\t$.object___o_Slider.F_ProcessEvent_mousemove=function(object_dom___event)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tobject_dom___event=object_dom___event||event;\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t$.integer___mouse_cursor_coordinate_x=object_dom___event.clientX||object_dom___event.pageX;\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t$.integer___mouse_cursor_coordinate_x+=Math.ceil(jQuery(document).scrollLeft()); //document.body.scrollLeft\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t$.integer___mouse_cursor_horizontal_offset=$.integer___mouse_cursor_coordinate_x-$.integer___previous_mouse_cursor_coordinate_x;\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif ($.object_dom___o_Slider.offsetLeft+$.integer___mouse_cursor_horizontal_offset>=$.integer___o_Slider_maximal_left_offset)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$.object___o_Slider.integer___movement_step_index\t=integer___target_scrolling_steps_amount;\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t$.object_dom___o_Slider.style.left\t\t\t=$.integer___o_Slider_maximal_left_offset+'px';\n\t\t\t\t\t\t\t\t$.object_dom___target.scrollLeft\t\t\t=$.integer___target_scrolling_maximal_left_offset;\n\n\t\t\t\t\t\t\t\tif (typeof($.F_ExecuteActionAfterScrollReachedRightEnd)=='function')\n\t\t\t\t\t\t\t\t\t$.F_ExecuteActionAfterScrollReachedRightEnd();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse if ($.object_dom___o_Slider.offsetLeft+$.integer___mouse_cursor_horizontal_offset<=$.integer___o_Slider_minimal_left_offset)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$.object___o_Slider.integer___movement_step_index\t=0;\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t$.object_dom___o_Slider.style.left\t\t\t=$.integer___o_Slider_minimal_left_offset+'px';\n\t\t\t\t\t\t\t\t$.object_dom___target.scrollLeft\t\t\t=$.integer___target_scrolling_minimal_left_offset;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t{\n//\t\t\t\t\t\t\t\t$.integer___mouse_cursor_vertical_offset\t=$.integer___mouse_cursor_coordinate_y-$.integer___previous_mouse_cursor_coordinate_y;\n\t\t\t\t\t\t\t\t$.object_dom___o_Slider.style.left\t\t\t=$.object_dom___o_Slider.offsetLeft+$.integer___mouse_cursor_horizontal_offset+'px';\n\n\n//\t\t\t\t\t\t\t\tconsole.log($.object___o_Slider.integer___mouse_cursor_top_offset+\":\"+$.object___o_Slider.integer___action_point_top_offset);\n\t\t\t\t\t\t\t\t\n//\tif $.object___o_Slider step ==1 \n/*\t\t\t\t\t\t\t\tif ($.integer___mouse_cursor_coordinate_y>$.integer___previous_mouse_cursor_coordinate_y)\n\t\t\t\t\t\t\t\t\t$.object___o_Slider.integer___movement_step_index++;\n\t\t\t\t\t\t\t\telse if ($.integer___mouse_cursor_coordinate_y<$.integer___previous_mouse_cursor_coordinate_y)\n\t\t\t\t\t\t\t\t\t$.object___o_Slider.integer___movement_step_index--;\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tif ($.object___o_Slider.integer___movement_step_index>integer___target_scrolling_steps_amount)\n\t\t\t\t\t\t\t\t\t$.object___o_Slider.integer___movement_step_index=integer___target_scrolling_steps_amount;\n\t\t\t\t\t\t\t\telse if ($.object___o_Slider.integer___movement_step_index<0)\n\t\t\t\t\t\t\t\t\t$.object___o_Slider.integer___movement_step_index=0;\n*/\n/*\tif $.object___o_Slider step >1\n\t\t\t\t\t\t\t\t$.object___o_Slider.integer___mouse_cursor_top_offset=$.integer___mouse_cursor_coordinate_y-$.integer___top_offset-$.object_dom___o_Slider.offsetTop;\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tif ($.object___o_Slider.integer___mouse_cursor_top_offset>$.object___o_Slider.integer___action_point_top_offset)\n\t\t\t\t\t\t\t\t\t$.object___o_Slider.integer___movement_step_index++;\n\t\t\t\t\t\t\t\telse if ($.object___o_Slider.integer___mouse_cursor_top_offset<$.object___o_Slider.integer___action_point_top_offset)\n\t\t\t\t\t\t\t\t\t$.object___o_Slider.integer___movement_step_index--;\n*/\n//console.log($.object___o_Slider.array_object___movement_step_info[$.object___o_Slider.integer___movement_step_index].integer___target_scrolling_offset)\n\t\t\t\t\t\t\t\t$.object_dom___target.scrollLeft=$.object___o_Slider.array_object___movement_step_info[$.object_dom___o_Slider.offsetLeft].integer___target_scrolling_offset;\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t$.integer___previous_mouse_cursor_coordinate_x=$.integer___mouse_cursor_coordinate_x;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t};\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\t$.integer___o_Slider_offset_width\t\t\t=$.integer___offset_width-$.integer___target_scrolling_maximal_left_offset;\n\t\t\t\t\t\t$.integer___o_Slider_maximal_left_offset\t=$.integer___offset_width-$.integer___o_Slider_offset_width;\n\t\t\t\t\t\t\n\t\t\t\t\t\tif ($.object_dom___target.scrollLeft>0)\n\t\t\t\t\t\t\t$.object_dom___o_Slider.style.left=$.object_dom___target.scrollLeft+'px';\n\t\t\t\t\t\t\n\t\t\t\t\t\t$.object___o_Slider.F_InitializeWidth(integer___borders_width);\n\t\t\t\t\t\t\n\t\t\t\t\t\t$.object___o_Slider.F_ProcessEvent_mousemove=function(object_dom___event)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tobject_dom___event=object_dom___event||event;\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t$.integer___mouse_cursor_coordinate_x=object_dom___event.clientX||object_dom___event.pageX;\n\n\t\t\t\t\t\t\t$.integer___mouse_cursor_coordinate_x+=Math.ceil(jQuery(document).scrollLeft()); //document.body.scrollLeft\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t$.integer___mouse_cursor_horizontal_offset=$.integer___mouse_cursor_coordinate_x-$.integer___previous_mouse_cursor_coordinate_x;\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif ($.object_dom___o_Slider.offsetLeft+$.integer___mouse_cursor_horizontal_offset>=$.integer___o_Slider_maximal_left_offset)\n\t\t\t\t\t\t\t\t$.object_dom___o_Slider.style.left=$.integer___o_Slider_maximal_left_offset+'px';\n\t\t\t\t\t\t\telse if ($.object_dom___o_Slider.offsetLeft+$.integer___mouse_cursor_horizontal_offset<=$.integer___o_Slider_minimal_left_offset)\n\t\t\t\t\t\t\t\t$.object_dom___o_Slider.style.left=$.integer___o_Slider_minimal_left_offset+'px';\n\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$.object_dom___o_Slider.style.left=$.object_dom___o_Slider.offsetLeft+$.integer___mouse_cursor_horizontal_offset+'px';\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t$.integer___previous_mouse_cursor_coordinate_x=$.integer___mouse_cursor_coordinate_x;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t$.object_dom___target.scrollLeft=$.object_dom___o_Slider.offsetLeft;\n\t\t\t\t\t\t};\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\telse if ($.varchar___position=='vertical')\n\t\t\t\t{\n\t\t\t\t\t$.integer___offset_height\t\t\t\t\t\t=$.object_dom___component.offsetHeight;//Math.floor(jQuery($.object_dom___component).outerWidth());\n\t\n//\tTODO: need update on window resize and recalculate depended values\n\t\t\t\t\t$.integer___top_offset\t\t\t\t\t\t\t=__GetElementAbsoluteYCoordinate($.object_dom___component); //Math.floor(jQuery($.object_dom___component).offset().left);\n\t\t\t\t\t\n\t\t\t\t\t$.integer___o_Slider_minimal_offset_height\t\t=50;\n\t\t\t\t\t$.integer___o_Slider_maximal_top_offset\t\t\t=$.integer___offset_height-$.integer___o_Slider_minimal_offset_height;\n\t\t\t\t\t\n//\tANALYZE: case, when separate controls present, need include their dimensions\n//\tANALYZE: when start offset not 0, saved scrolling position\n\t\t\t\t\t$.integer___o_Slider_minimal_top_offset\t\t\t=0;\n\t\t\t\t\t\n\t\t\t\t\t$.integer___target_scrolling_minimal_top_offset\t=0;\n//\tIMPORTANT,ANALYZE: possible problem width border, padding/margin while calculating offsetWidth/offsetHeight\n\t\t\t\t\t$.integer___target_scrolling_maximal_top_offset\t=$.object_dom___target.scrollHeight-$.object_dom___target.offsetHeight;\n\t\t\t\t\t\n\t\t\t\t\tvar integer___borders_height=jQuery($.object_dom___component).children('div').children('b').height()+jQuery($.object_dom___component).children('div').children('i').height();\n\n\t\t\t\t\tjQuery($.object_dom___component).children('div').children('em').css('height',$.integer___offset_height-integer___borders_height+'px');\n\t\t\t\t\t\n\t\t\t\t\tif ($.integer___target_scrolling_maximal_top_offset>$.integer___o_Slider_maximal_top_offset)\n\t\t\t\t\t{\n\t\t\t\t\t\t$.integer___o_Slider_offset_height\t\t=$.integer___o_Slider_minimal_offset_height;\n\t\t\t\t\t\t$.integer___o_Slider_maximal_top_offset\t=$.integer___offset_height-$.integer___o_Slider_offset_height;\n\t\t\t\t\t\t\n\t\t\t\t\t\t$.object___o_Slider.F_InitializeHeight(integer___borders_height);\n\t\t\t\t\t\t\n\t\t\t\t\t\t$.integer___minimal_mouse_cursor_coordinate_y=$.integer___top_offset;\n\t\t\t\t\t\t$.integer___maximal_mouse_cursor_coordinate_y=$.integer___top_offset+$.integer___offset_height-$.integer___o_Slider_offset_height;\n\t\t\t\t\t\t\n//\t\t\t\t\t\t$.integer___minimal_value_limit\t=object___configuration.integer___minimal_value_limit;\n//\t\t\t\t\t\t$.integer___maximal_value_limit\t=object___configuration.integer___maximal_value_limit;\n\t\t\n//\t\t\t\t\t\t$.integer___value_changing_step\t\t\t\t\t=object___configuration.integer___value_changing_step||1;\n\t\t\t\t\t\t\n\t\t\t\t\t\tvar integer___target_scrolling_step\t\t\t\t\t\t=Math.ceil($.integer___target_scrolling_maximal_top_offset/$.integer___o_Slider_maximal_top_offset);\n\t\t\t\t\t\t$.float___o_Slider_movement_step\t\t\t\t\t\t=$.integer___o_Slider_maximal_top_offset/$.integer___target_scrolling_maximal_top_offset;\n//\tif (integer___o_Slider.movement_step==1)\n\t\t\t\t\t\tvar integer___target_scrolling_steps_amount\t\t\t\t=Math.ceil($.integer___o_Slider_maximal_top_offset);\n\t\t\t\t\t\t\n\t\t\t\t\t\tvar integer___target_scrolling_step_adjustments_amount\t=integer___target_scrolling_step*integer___target_scrolling_steps_amount-$.integer___target_scrolling_maximal_top_offset;\n\t\t\t\t\t\tvar integer___target_scrolling_step_adjustments_interval=Math.floor(integer___target_scrolling_steps_amount/integer___target_scrolling_step_adjustments_amount);\n\t\t\t\t\t\t\n/*\t\t\t\t\t\tconsole.log\n\t\t\t\t\t\t(\n\t\t\t\t\t\t\tinteger___target_scrolling_step*integer___target_scrolling_steps_amount+\"\\r\\n\"\n\t\t\t\t\t\t\t\t+\":\"+$.integer___o_Slider_maximal_top_offset+\"\\r\\n\"\n\t\t\t\t\t\t\t\t+\":\"+integer___target_scrolling_step+\"\\r\\n\"\n\t\t\t\t\t\t\t\t+\":\"+integer___target_scrolling_steps_amount+\"\\r\\n\"\n\t\t\t\t\t\t\t\t+\":\"+integer___target_scrolling_step_adjustments_amount+\"\\r\\n\"\n\t\t\t\t\t\t\t\t+\":\"+integer___target_scrolling_step_adjustments_interval+\"\\r\\n\"\n\t\t\t\t\t\t\t\t+\"-----------------------------------------------------------------------\"\n\t\t\t\t\t\t);\n*/\t\t\t\t\t\t\n//\t\t\t\t\t\tF_CalculateMovementSteps(integer___maximal_step,integer___maximal_steps_amount,integer___step_adjustments_amount,integer___maximal_step_adjustments_interval);\n\t\t\t\t\t\t$.object___o_Slider.F_CalculateMovementSteps\n\t\t\t\t\t\t(\n\t\t\t\t\t\t\tinteger___target_scrolling_step,\n\t\t\t\t\t\t\tinteger___target_scrolling_steps_amount,\n\t\t\t\t\t\t\tinteger___target_scrolling_step_adjustments_amount,\n\t\t\t\t\t\t\tinteger___target_scrolling_step_adjustments_interval\n\t\t\t\t\t\t);\n\t\t\t\t\t\t\n//\tANALYZE,TODO: need adjustment of accuracy\n//\t\t\t\t\t\tconsole.log($.object_dom___target.scrollTop+\":\"+$.float___o_Slider_movement_step);\n//\tset slider position by target\n\t\t\t\t\t\t$.object___o_Slider.F_InitializePosition();\n\t\t\t\t\t\t\n//\t\t\t\t\t\tconsole.log($.object___o_Slider.array_object___movement_step_info);\n\t\t\t\t\t\t\n\t\t\t\t\t\t$.object___o_Slider.F_ProcessEvent_mousemove=function(object_dom___event)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tobject_dom___event=object_dom___event||event;\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t$.integer___mouse_cursor_coordinate_y=object_dom___event.clientY||object_dom___event.pageY;\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t$.integer___mouse_cursor_coordinate_y+=Math.ceil(jQuery(document).scrollTop()); //document.body.scrollLeft\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t$.integer___mouse_cursor_vertical_offset=$.integer___mouse_cursor_coordinate_y-$.integer___previous_mouse_cursor_coordinate_y;\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif ($.object_dom___o_Slider.offsetTop+$.integer___mouse_cursor_vertical_offset>=$.integer___o_Slider_maximal_top_offset)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$.object___o_Slider.integer___movement_step_index\t=integer___target_scrolling_steps_amount;\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t$.object_dom___o_Slider.style.top\t\t\t\t\t=$.integer___o_Slider_maximal_top_offset+'px';\n\t\t\t\t\t\t\t\t$.object_dom___target.scrollTop\t\t\t=$.integer___target_scrolling_maximal_top_offset;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse if ($.object_dom___o_Slider.offsetTop+$.integer___mouse_cursor_vertical_offset<=$.integer___o_Slider_minimal_top_offset)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$.object___o_Slider.integer___movement_step_index\t=0;\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t$.object_dom___o_Slider.style.top\t\t\t\t\t=$.integer___o_Slider_minimal_top_offset+'px';\n\t\t\t\t\t\t\t\t$.object_dom___target.scrollTop\t\t\t=$.integer___target_scrolling_minimal_top_offset;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t{\n//\t\t\t\t\t\t\t\t$.integer___mouse_cursor_vertical_offset\t=$.integer___mouse_cursor_coordinate_y-$.integer___previous_mouse_cursor_coordinate_y;\n\t\t\t\t\t\t\t\t$.object_dom___o_Slider.style.top\t\t\t=$.object_dom___o_Slider.offsetTop+$.integer___mouse_cursor_vertical_offset+'px';\n\n\n//\t\t\t\t\t\t\t\tconsole.log($.object___o_Slider.integer___mouse_cursor_top_offset+\":\"+$.object___o_Slider.integer___action_point_top_offset);\n\t\t\t\t\t\t\t\t\n//\tif $.object___o_Slider step ==1 \n/*\t\t\t\t\t\t\t\tif ($.integer___mouse_cursor_coordinate_y>$.integer___previous_mouse_cursor_coordinate_y)\n\t\t\t\t\t\t\t\t\t$.object___o_Slider.integer___movement_step_index++;\n\t\t\t\t\t\t\t\telse if ($.integer___mouse_cursor_coordinate_y<$.integer___previous_mouse_cursor_coordinate_y)\n\t\t\t\t\t\t\t\t\t$.object___o_Slider.integer___movement_step_index--;\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tif ($.object___o_Slider.integer___movement_step_index>integer___target_scrolling_steps_amount)\n\t\t\t\t\t\t\t\t\t$.object___o_Slider.integer___movement_step_index=integer___target_scrolling_steps_amount;\n\t\t\t\t\t\t\t\telse if ($.object___o_Slider.integer___movement_step_index<0)\n\t\t\t\t\t\t\t\t\t$.object___o_Slider.integer___movement_step_index=0;\n*/\n/*\tif $.object___o_Slider step >1\n\t\t\t\t\t\t\t\t$.object___o_Slider.integer___mouse_cursor_top_offset=$.integer___mouse_cursor_coordinate_y-$.integer___top_offset-$.object_dom___o_Slider.offsetTop;\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tif ($.object___o_Slider.integer___mouse_cursor_top_offset>$.object___o_Slider.integer___action_point_top_offset)\n\t\t\t\t\t\t\t\t\t$.object___o_Slider.integer___movement_step_index++;\n\t\t\t\t\t\t\t\telse if ($.object___o_Slider.integer___mouse_cursor_top_offset<$.object___o_Slider.integer___action_point_top_offset)\n\t\t\t\t\t\t\t\t\t$.object___o_Slider.integer___movement_step_index--;\n*/\n//console.log($.object___o_Slider.array_object___movement_step_info[$.object___o_Slider.integer___movement_step_index].integer___target_scrolling_offset)\n\t\t\t\t\t\t\t\t$.object_dom___target.scrollTop=$.object___o_Slider.array_object___movement_step_info[$.object_dom___o_Slider.offsetTop].integer___target_scrolling_offset;\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t$.integer___previous_mouse_cursor_coordinate_y=$.integer___mouse_cursor_coordinate_y;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t};\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\t$.integer___o_Slider_offset_height\t\t=$.integer___offset_height-$.integer___target_scrolling_maximal_top_offset;\n\t\t\t\t\t\t$.integer___o_Slider_maximal_top_offset\t=$.integer___offset_height-$.integer___o_Slider_offset_height;\n\t\t\t\t\t\t\n\t\t\t\t\t\tif ($.object_dom___target.scrollTop>0)\n\t\t\t\t\t\t\t$.object_dom___o_Slider.style.top=$.object_dom___target.scrollTop+'px';\n\n\t\t\t\t\t\t$.object___o_Slider.F_InitializeHeight(integer___borders_height);\n\t\t\t\t\t\t\n\t\t\t\t\t\t$.object___o_Slider.F_ProcessEvent_mousemove=function(object_dom___event)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tobject_dom___event=object_dom___event||event;\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t$.integer___mouse_cursor_coordinate_y=object_dom___event.clientY||object_dom___event.pageY;\n\n\t\t\t\t\t\t\t$.integer___mouse_cursor_coordinate_y+=Math.ceil(jQuery(document).scrollTop()); //document.body.scrollLeft\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t$.integer___mouse_cursor_vertical_offset=$.integer___mouse_cursor_coordinate_y-$.integer___previous_mouse_cursor_coordinate_y;\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif ($.object_dom___o_Slider.offsetTop+$.integer___mouse_cursor_vertical_offset>=$.integer___o_Slider_maximal_top_offset)\n\t\t\t\t\t\t\t\t$.object_dom___o_Slider.style.top=$.integer___o_Slider_maximal_top_offset+'px';\n\t\t\t\t\t\t\telse if ($.object_dom___o_Slider.offsetTop+$.integer___mouse_cursor_vertical_offset<=$.integer___o_Slider_minimal_top_offset)\n\t\t\t\t\t\t\t\t$.object_dom___o_Slider.style.top=$.integer___o_Slider_minimal_top_offset+'px';\n\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$.object_dom___o_Slider.style.top=$.object_dom___o_Slider.offsetTop+$.integer___mouse_cursor_vertical_offset+'px';\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t$.integer___previous_mouse_cursor_coordinate_y=$.integer___mouse_cursor_coordinate_y;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t$.object_dom___target.scrollTop=$.object_dom___o_Slider.offsetTop;\n\t\t\t\t\t\t};\n\t\t\t\t\t}\n\n/*\t\t\t\t\tconsole.log($.object_dom___component.offsetHeight);\n\t\t\t\t\tconsole.log\n\t\t\t\t\t(\n\t\t\t\t\t\t$.integer___offset_height+\"\\r\\n\"\n\t\t\t\t\t\t\t+\":\"+$.integer___top_offset+\"\\r\\n\"\n\t\t\t\t\t\t\t+\":\"+$.integer___o_Slider_maximal_top_offset+\"\\r\\n\"\n\t\t\t\t\t\t\t+\":\"+$.integer___target_scrolling_maximal_top_offset+\"\\r\\n\"\n\t\t\t\t\t\t\t+\":\"+$.object_dom___target.scrollHeight+\":\"+$.object_dom___target.offsetHeight+\"\\r\\n\"\n\t\t\t\t\t\t\t+\"-----------------------------------------------------------------------\"\n\t\t\t\t\t);\n*/\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$.object_dom___o_Slider.onmousedown=function(object_dom___event)\n\t\t\t\t{\n\t\t\t\t\t$.object___o_Slider.F_ProcessEvent_mousedown(object_dom___event);\n\t\t\t\t\treturn false;\n\t\t\t\t};\n\t\t\t\t\n\t\t\t\tjQuery($.object_dom___component).children('div').children('em').on('mousedown',function(object_dom___event)\n\t\t\t\t{\n\t\t\t\t\t$.object___o_Slider.F_MoveToMouseCursor(object_dom___event);\n\t\t\t\t});\n\n\n/*\t\t\t\tconsole.log($.integer___o_Slider_offset_width\n\t\t\t\t\t\t\t+\":\"+integer___o_Slider_maximal_moving_step\n\t\t\t\t\t\t\t+\":\"+integer___o_Slider_maximal_moving_steps_amount\n\t\t\t\t\t\t\t+\":\"+integer___o_Slider_moving_step_adjustments_amount\n\t\t\t\t\t\t\t+\":\"+integer___o_Slider_maximal_moving_step_adjustments_interval\n\t\t\t\t\t\t\t+\"-----------------------------------------------------------------------\");\n*/\n//\tANALYZE: necessity to check availability before full initialization\n\t\t\t\t$.F_CheckAvailability();\n\t\t\t}\n\t\t};\n\t\t\n\t\t$.object___o_Slider=\n\t\t{\n\t\t\tinteger___action_point_top_offset\t:0,\n\t\t\tinteger___action_point_left_offset\t:0,\n\n\t\t\tinteger___mouse_cursor_left_offset\t:0,\n\t\t\tinteger___mouse_cursor_top_offset\t:0,\n\t\t\t\n\t\t\tarray_object___movement_step_info \t:[],\n\t\t\t\n\t\t\tinteger___movement_step_index\t\t:0,\n\t\t\tinteger___movement_steps_amount\t\t:0,\n\t\t\t\n\t\t\tF_InitializePosition:function()\n\t\t\t{\n\t\t\t\tif ($.object_dom___target.scrollLeft>0)\n\t\t\t\t{\n\t\t\t\t\tif (Math.ceil($.object_dom___target.scrollLeft*$.float___o_Slider_movement_step)>=$.integer___o_Slider_maximal_left_offset)\n\t\t\t\t\t\t$.object_dom___o_Slider.style.left=$.integer___o_Slider_maximal_left_offset+'px';\n\t\t\t\t\telse if (Math.ceil($.object_dom___target.scrollLeft*$.float___o_Slider_movement_step)<=$.integer___o_Slider_minimal_left_offset)\n\t\t\t\t\t\t$.object_dom___o_Slider.style.left=$.integer___o_Slider_minimal_left_offset+'px';\n\t\t\t\t\telse \n\t\t\t\t\t\t$.object_dom___o_Slider.style.left=Math.ceil($.object_dom___target.scrollLeft*$.float___o_Slider_movement_step)+'px';\n\t\t\t\t}\n\t\t\t\telse if ($.object_dom___target.scrollTop>0)\n\t\t\t\t{\n\t\t\t\t\tif (Math.ceil($.object_dom___target.scrollTop*$.float___o_Slider_movement_step)>=$.integer___o_Slider_maximal_top_offset)\n\t\t\t\t\t\t$.object_dom___o_Slider.style.top=$.integer___o_Slider_maximal_top_offset+'px';\n\t\t\t\t\telse if (Math.ceil($.object_dom___target.scrollTop*$.float___o_Slider_movement_step)<=$.integer___o_Slider_minimal_top_offset)\n\t\t\t\t\t\t$.object_dom___o_Slider.style.top=$.integer___o_Slider_minimal_top_offset+'px';\n\t\t\t\t\telse \n\t\t\t\t\t\t$.object_dom___o_Slider.style.top=Math.ceil($.object_dom___target.scrollTop*$.float___o_Slider_movement_step)+'px';\n\t\t\t\t}\n\t\t\t},\n\t\t\t\n\t\t\tF_InitializeWidth:function(integer___borders_width)\n\t\t\t{\n\t\t\t\tjQuery($.object_dom___o_Slider).css('width',$.integer___o_Slider_offset_width+'px');\n\t\t\t\tjQuery($.object_dom___o_Slider).children('em').css('width',$.integer___o_Slider_offset_width-integer___borders_width+'px');\n\t\t\t},\n\t\t\tF_InitializeHeight:function(integer___borders_height)\n\t\t\t{\n\t\t\t\tjQuery($.object_dom___o_Slider).css('height',$.integer___o_Slider_offset_height+'px');\n\t\t\t\tjQuery($.object_dom___o_Slider).children('em').css('height',$.integer___o_Slider_offset_height-integer___borders_height+'px');\n\t\t\t},\n\t\t\t\n\t\t\tF_ProcessEvent_mousedown:function(object_dom___event)\n\t\t\t{\n\t\t\t\tobject_dom___event=object_dom___event||event;\n\t\t\t\t\n\t\t\t\t$.integer___mouse_cursor_coordinate_x=object_dom___event.clientX||object_dom___event.pageX;\n\t\t\t\t$.integer___mouse_cursor_coordinate_y=object_dom___event.clientY||object_dom___event.pageY;\n\t\t\t\t\n\t\t\t\t$.integer___mouse_cursor_coordinate_x+=Math.ceil(jQuery(document).scrollLeft()); //document.body.scrollLeft\n\t\t\t\t$.integer___mouse_cursor_coordinate_y+=Math.ceil(jQuery(document).scrollTop()); //document.body.scrollTop\n\t\t\t\t\n\t\t\t\t$.integer___previous_mouse_cursor_coordinate_x=$.integer___mouse_cursor_coordinate_x;\n\t\t\t\t$.integer___previous_mouse_cursor_coordinate_y=$.integer___mouse_cursor_coordinate_y;\n\t\t\t\t\n\t\t\t\t$.object___o_Slider.integer___action_point_left_offset\t=$.integer___mouse_cursor_coordinate_x-$.integer___left_offset-$.object_dom___o_Slider.offsetLeft;\n\t\t\t\t$.object___o_Slider.integer___action_point_top_offset\t=$.integer___mouse_cursor_coordinate_y-$.integer___top_offset-$.object_dom___o_Slider.offsetTop;\n\n\t\t\t\t__object___O_Scrollbar_configuration.varchar___active_component_id=$.varchar___id+'-'+$.varchar___position;\n\t\t\t\t__object___O_Scrollbar_configuration.bool___mouse_text_selection_availability=false;\n\t\t\t\t\n\t\t\t\tdocument.getElementById(\"id_div___layer-Main\").style.cursor=\"pointer\"; //fix for FF (document.body.style.cursor='pointer';)\n\t\t\t},\n\t\t\tF_ProcessEvent_mouseup:function()\n\t\t\t{\n\t\t\t\t$.integer___previous_mouse_cursor_coordinate_x=_;\n\t\t\t\t$.integer___previous_mouse_cursor_coordinate_y=_;\n\t\t\t\t\n\t\t\t\t__object___O_Scrollbar_configuration.varchar___active_component_id=_;\n\t\t\t\t__object___O_Scrollbar_configuration.bool___mouse_text_selection_availability=true;\n\t\t\t\t\n\t\t\t\tdocument.getElementById(\"id_div___layer-Main\").style.cursor=\"default\"; //fix for FF (document.body.style.cursor='default';)\n\t\t\t},\n\t\t\t\n\t\t\tF_ProcessEvent_mousemove:_,\n\t\t\t\n//\tANALYZE: case, when pass direct offsets (left,top,scrolling_left,scrolling_top) necessity and performance\n\t\t\tF_MoveToPosition:function(integer___offset,integer___scrolling_offset)\n\t\t\t{\n\t\t\t\tif ($.varchar___position=='horizontal')\n\t\t\t\t{\n\t\t\t\t\t$.object_dom___o_Slider.style.left\t=integer___offset+'px';\n\t\t\t\t\t$.object_dom___target.scrollLeft\t=integer___scrolling_offset;\n\t\t\t\t}\n\t\t\t\telse if ($.varchar___position=='vertical')\n\t\t\t\t{\t\t\t\t\t\n\t\t\t\t\t$.object_dom___o_Slider.style.top\t=integer___offset+'px';\n\t\t\t\t\t$.object_dom___target.scrollTop\t\t=integer___scrolling_offset;\n\t\t\t\t}\n\t\t\t},\n\t\t\t\n\t\t\tF_MoveToMouseCursor:function(object_dom___event)\n\t\t\t{\n\t\t\t\tobject_dom___event=object_dom___event||event;\n\t\t\t\t\n\t\t\t\tif ($.varchar___position=='horizontal')\n\t\t\t\t{\n\t\t\t\t\t$.integer___mouse_cursor_coordinate_x=object_dom___event.clientX||object_dom___event.pageX;\n\t\n\t\t\t\t\t$.integer___mouse_cursor_coordinate_x+=Math.ceil(jQuery(document).scrollLeft()); //document.body.scrollLeft\n\t\t\t\t\t\n\t\t\t\t\t$.integer___mouse_cursor_horizontal_offset=$.integer___mouse_cursor_coordinate_x-$.integer___left_offset;\n\t\t\t\t\t\n\t\t\t\t\tif ($.integer___mouse_cursor_horizontal_offset>=$.integer___o_Slider_maximal_left_offset)\n\t\t\t\t\t\t$.object_dom___o_Slider.style.left=$.integer___o_Slider_maximal_left_offset+'px';\n\t\t\t\t\telse if ($.integer___mouse_cursor_horizontal_offset<=$.integer___o_Slider_minimal_left_offset)\n\t\t\t\t\t\t$.object_dom___o_Slider.style.left=$.integer___o_Slider_minimal_left_offset+'px';\n\t\t\t\t\telse \n\t\t\t\t\t\t$.object_dom___o_Slider.style.left=$.integer___mouse_cursor_horizontal_offset+'px';\n\t\t\t\t\t\n\t\t\t\t\tif ($.integer___target_scrolling_maximal_left_offset>$.integer___o_Slider_maximal_left_offset)\n\t\t\t\t\t\t$.object_dom___target.scrollLeft=$.object___o_Slider.array_object___movement_step_info[$.object_dom___o_Slider.offsetLeft].integer___target_scrolling_offset;\n\t\t\t\t\telse \n\t\t\t\t\t\t$.object_dom___target.scrollLeft=$.object_dom___o_Slider.offsetLeft;\n\t\t\t\t}\n\t\t\t\telse if ($.varchar___position=='vertical')\n\t\t\t\t{\t\t\t\t\t\n\t\t\t\t\t$.integer___mouse_cursor_coordinate_y=object_dom___event.clientY||object_dom___event.pageY;\n\t\n\t\t\t\t\t$.integer___mouse_cursor_coordinate_y+=Math.ceil(jQuery(document).scrollTop()); //document.body.scrollLeft\n\t\t\t\t\t\n\t\t\t\t\t$.integer___mouse_cursor_vertical_offset=$.integer___mouse_cursor_coordinate_y-$.integer___top_offset;\n\t\t\t\t\t\n\t\t\t\t\tif ($.integer___mouse_cursor_vertical_offset>=$.integer___o_Slider_maximal_top_offset)\n\t\t\t\t\t\t$.object_dom___o_Slider.style.top=$.integer___o_Slider_maximal_top_offset+'px';\n\t\t\t\t\telse if ($.integer___mouse_cursor_vertical_offset<=$.integer___o_Slider_minimal_top_offset)\n\t\t\t\t\t\t$.object_dom___o_Slider.style.top=$.integer___o_Slider_minimal_top_offset+'px';\n\t\t\t\t\telse \n\t\t\t\t\t\t$.object_dom___o_Slider.style.top=$.integer___mouse_cursor_vertical_offset+'px';\n\t\t\t\t\t\n\t\t\t\t\tif ($.integer___target_scrolling_maximal_top_offset>$.integer___o_Slider_maximal_top_offset)\n\t\t\t\t\t\t$.object_dom___target.scrollTop=$.object___o_Slider.array_object___movement_step_info[$.object_dom___o_Slider.offsetTop].integer___target_scrolling_offset;\n\t\t\t\t\telse \n\t\t\t\t\t\t$.object_dom___target.scrollTop=$.object_dom___o_Slider.offsetTop;\n\t\t\t\t}\n\t\t\t},\n\t\t\t\n\t\t\tF_CalculateMovementSteps:function(integer___maximal_step,integer___maximal_steps_amount,integer___step_adjustments_amount,integer___maximal_step_adjustments_interval)\n\t\t\t{\n\t\t\t\tvar integer___step_adjustments_counter=0;\n\t\t\t\tvar integer___offset=0;\n\t\t\t\t\n\t\t\t\t$.object___o_Slider.array_object___movement_step_info[0]=\n\t\t\t\t{\n\t\t\t\t\tinteger___offset\t\t\t\t\t\t\t:$.integer___o_Slider_minimal_top_offset,\n\t\t\t\t\tinteger___target_scrolling_offset\t:$.integer___target_scrolling_minimal_top_offset\n\t\t\t\t};\n\n\t\t\t\tfor (var integer___index=1;integer___index<=integer___maximal_steps_amount;integer___index++)\n\t\t\t\t{\n//\tTODO,IMPORTANT: for case with 'integer___maximal_step_adjustments_interval=1' avoid first come min steps then all max, its cause outcentering indicator on middle values (shifted to right)\n\t\t\t\t\tif (integer___index%integer___maximal_step_adjustments_interval==0 \n\t\t\t\t\t\t&& integer___step_adjustments_counter<integer___step_adjustments_amount)\n\t\t\t\t\t{\t\t\t\t\t\t\n\t\t\t\t\t\tinteger___step_adjustments_counter++;\n\t\t\t\t\t\tinteger___offset+=integer___maximal_step-1;\n\t\t\t\t\t}\n\t\t\t\t\telse \n\t\t\t\t\t\tinteger___offset+=integer___maximal_step;\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t$.object___o_Slider.array_object___movement_step_info[integer___index]=\n\t\t\t\t\t{\n\t\t\t\t\t\tinteger___offset\t\t\t\t\t\t\t:integer___offset,\n//\tEND: calculate target offset\n\t\t\t\t\t\tinteger___target_scrolling_offset\t:integer___offset//integer___index*$.integer___value_changing_step>$.integer___maximal_value_limit?$.integer___maximal_value_limit:integer___index*$.integer___value_changing_step\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\n\t\t$.F_CheckAvailability=function()\n\t\t{\n//\t\t\tconsole.log($.object_dom___target.scrollHeight+\":\"+$.object_dom___target.offsetHeight);\n\t\t\tif ($.varchar___position=='horizontal' && $.object_dom___target.scrollWidth>$.object_dom___target.offsetWidth)\n\t\t\t{\n\t\t\t\t$.object_dom___component.style.visibility='visible';\n\t\t\t\t\n\t\t\t\tjQuery($.object_dom___target).addClass(\"class_div___element-horizontal_scrollbar_status__visible\");\n\t\t\t\t\n//\t\t\t\t$.object___o_Slider.F_InitializePosition();\n\t\t\t}\n\t\t\telse if ($.varchar___position=='vertical' && $.object_dom___target.scrollHeight>$.object_dom___target.offsetHeight)\n\t\t\t{\n\t\t\t\t$.object_dom___component.style.visibility='visible';\n//\tANALYZE: class name 'class_div___element-ScrollableContainer-vertical_scrollbar_status__visible' and status....(enabled,active etc...)\n\t\t\t\tjQuery($.object_dom___target).addClass(\"class_div___element-vertical_scrollbar_status__visible\");\n\t\t\t\t\n//\t\t\t\t$.object___o_Slider.F_InitializePosition();\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$.object_dom___component.style.visibility='hidden';\n\t\t\t\t\n//\tANALYZE,OPTMIZE: per companent need only one operation horizontal or vertical, but using composit name conversion BAD way due to optimization algorithm (hard to compress composit names)\n\t\t\t\tjQuery($.object_dom___target).removeClass(\"class_div___element-horizontal_scrollbar_status__visible\");\n\t\t\t\tjQuery($.object_dom___target).removeClass(\"class_div___element-vertical_scrollbar_status__visible\");\n\t\t\t}\n\t\t};\n\t}", "moveDown() {\n this.point.y += this.scrollSpeed;\n }", "restoreScroll(state = this.storedScrollState) {\n const me = this;\n\n // TODO: Implement special multi-element Scroller subclass for Grids which\n // encapsulates the x axis only Scrollers of all its SubGrids.\n me.eachSubGrid((subGrid) => {\n subGrid.scrollable.x = state.scrollLeft[subGrid.region];\n });\n\n me.scrollable.y = state.scrollTop;\n }", "function ScrollSpy(element,options){this.$body=$(document.body);this.$scrollElement=$(element).is(document.body)?$(window):$(element);this.options=$.extend({},ScrollSpy.DEFAULTS,options);this.selector=(this.options.target||'')+' .nav li > a';this.offsets=[];this.targets=[];this.activeTarget=null;this.scrollHeight=0;this.$scrollElement.on('scroll.bs.scrollspy',$.proxy(this.process,this));this.refresh();this.process();}", "function ScrollSpy(element,options){this.$body=$(document.body);this.$scrollElement=$(element).is(document.body)?$(window):$(element);this.options=$.extend({},ScrollSpy.DEFAULTS,options);this.selector=(this.options.target||'')+' .nav li > a';this.offsets=[];this.targets=[];this.activeTarget=null;this.scrollHeight=0;this.$scrollElement.on('scroll.bs.scrollspy',$.proxy(this.process,this));this.refresh();this.process();}", "scrollIntoView() {\n this.updated |= UPDATED_SCROLL;\n return this;\n }", "_horizontalScrollbarHandler() {\n const that = this;\n\n that.closeMenu();\n that.isScrolling = true;\n\n requestAnimationFrame(() => {\n that._recycle();\n that.isScrolling = false;\n });\n }", "_scrollingStart() {\n this.scrolling = true\n this.style.focus.border.fg = this.borderScrolling\n this.focus()\n this.screen.render()\n this.emit(\"scrolling-start\")\n }", "function Plugin(option){return this.each(function(){var $this=$(this);var data=$this.data('bs.scrollspy');var options=(typeof option==='undefined'?'undefined':_typeof(option))=='object'&&option;if(!data)$this.data('bs.scrollspy',data=new ScrollSpy(this,options));if(typeof option=='string')data[option]();});}", "get _scrollBottom(){return this._scrollPosition+this._viewportHeight;}", "initScrollbar(){\n\t\tconst { fade = true } = this.options.scrollbar;\n\t\tthis.indicators = [];\n\t\tlet indicator;\n\n\t\tif (this.options.scrollX) {\n\t\t\tindicator = {\n\t\t\t\tel: createScrollbar('horizontal'),\n\t\t\t\tdirection: 'horizontal',\n\t\t\t\tfade\n\t\t\t};\n\t\t\tthis.insertScrollBar(indicator.el);\n\n\t\t\tthis.indicators.push(new Indicator(this, indicator));\n\t\t}\n\n\t\tif (this.options.scrollY) {\n\t\t\tindicator = {\n\t\t\t\tel: createScrollbar('vertical'),\n\t\t\t\tdirection: 'vertical',\n\t\t\t\tfade\n\t\t\t};\n\t\t\tthis.insertScrollBar(indicator.el);\n\t\t\tthis.indicators.push(new Indicator(this, indicator));\n\t\t}\n\n\t\tthis.on('refresh', () => {\n\t\t\tfor (let i = 0; i < this.indicators.length; i++) {\n\t\t\t\tthis.indicators[i].refresh();\n\t\t\t}\n\t\t});\n\n\t\tif (fade) {\n\t\t\tthis.on('scrollEnd', () => {\n\t\t\t\tfor (let i = 0; i < this.indicators.length; i++) {\n\t\t\t\t\tthis.indicators[i].fade();\n\t\t\t\t}\n\t\t\t});\n\n\t\t\tthis.on('scrollCancel', () => {\n\t\t\t\tfor (let i = 0; i < this.indicators.length; i++) {\n\t\t\t\t\tthis.indicators[i].fade();\n\t\t\t\t}\n\t\t\t});\n\n\t\t\tthis.on('scrollStart', () => {\n\t\t\t\tfor (let i = 0; i < this.indicators.length; i++) {\n\t\t\t\t\tthis.indicators[i].fade(true);\n\t\t\t\t}\n\t\t\t});\n\n\t\t\tthis.on('beforeScrollStart', () => {\n\t\t\t\tfor (let i = 0; i < this.indicators.length; i++) {\n\t\t\t\t\tthis.indicators[i].fade(true, true);\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t}", "function _scrollToY() {\r\n return scrollToObjY(this);\r\n}", "function initScroll(){var windowH=$(window).height(),newW=windowH/1400*29232+1e3/windowH*3;scrollWidth=newW-$(window).width(),$(\".helper\").width(newW),$(\"#wrapper,.helper\").height(windowH),myscroll=new iScroll(\"wrapper\",{hScrollbar:!0,useTransition:!0,hScroll:!0,vScroll:!1,checkDOMChanges:!0,bounce:!1,scrollbarClass:\"myScrollbar\"}),\n// \nmyscroll.options.onScrollStart=function(){\"block\"==$(\".detail\").css(\"display\")&&($(\".detail\").css(\"display\",\"none\"),$(\"#daoyu\").attr(\"id\",\"\")),\"block\"==$(\".detail-w\").css(\"display\")&&($(\".detail-w\").css(\"display\",\"none\"),$(\"#daoyu\").attr(\"id\",\"\"))},myscroll.options.onScrollEnd=function(){$(\".myScrollbarH\").hide(),timer&&clearTimeout(timer),timer=setTimeout(function(){clearTimeout(timer),timer=null,myscroll.scrollTo(myscroll.x+scrollWidth,0,Math.abs(5e5*(scrollWidth+myscroll.x)/scrollWidth),\"relative\")},2e4)},myscroll.scrollTo(scrollWidth,0,5e5,\"relative\"),$(\".myScrollbarH\").hide()}", "start() {\n\t\tthis.scroll.start();\n\t}", "function OCM_scrolling() {\r\n\t\t\t\t\t\r\n\t\t\t\t\t$offCanvasEl.mousewheel(function (event, delta) {\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tthis.scrollTop -= (delta * 30);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tevent.preventDefault();\r\n\t\t\t\t\t});\r\n\t\t\t\t\t\r\n\t\t\t\t}", "get scrollTarget() {\n return this.$.scrollable;\n }", "get scrollTarget() {\n return this.$.scrollable;\n }", "get scrollTarget() {\n return this.$.scrollable;\n }", "get scrollTarget() {\n return this.$.scrollable;\n }", "updateScroll() {\n\t\t\tthis.scrollPosition = window.scrollY;\n\t\t}", "function makeScroll(obj){\n\t $(obj).attr('data-scroll', 'y');\n\t $(\"[data-scroll='y']\", obj.parentNode).each(function() {\n\n\t var $this = $(this);\n\t if ($this.hasClass(\"ui-scrolllistview\")) $this.scrolllistview();\n\t else {\n\t var st = $this.jqmData(\"scroll\") + \"\";\n\t var paging = st && st.search(/^[xy]p$/) != -1;\n\t var dir = st && st.search(/^[xy]/) != -1 ? st.charAt(0) : null;\n\t var opts = {};\n\t if (dir) opts.direction = st;\n\t //if (paging)\n\t opts.pagingEnabled = false;\n\t var method = $this.jqmData(\"scroll-method\");\n\t if (method) opts.scrollMethod = method;\n\t $this.scrollview(opts);\n\t }\n\t });\n\t}", "function Plugin(option){return this.each(function(){var $this=$(this);var data=$this.data('bs.scrollspy');var options=(typeof option===\"undefined\"?\"undefined\":_typeof2(option))=='object'&&option;if(!data)$this.data('bs.scrollspy',data=new ScrollSpy(this,options));if(typeof option=='string')data[option]();});}", "setScroll() {\n this.canScroll = true\n }", "initScroll() {\n this.libraryView.effetLibrarySelect.scrollTop += 1;\n this.libraryView.exempleLibrarySelect.scrollTop += 1;\n this.libraryView.intrumentLibrarySelect.scrollTop += 1;\n }", "setScrollPosition() {\n var step = this.state.step;\n var isVertical = this.props.vertical;\n var left = !isVertical ? step * this.state.width : 0;\n var top = isVertical ? step * this.state.height : 0;\n\n this.scroller.setPosition(left, top);\n this.scroller.scrollTo(left, top, false);\n }", "function scroller(){\n\t\t\t\t\t$('.scrollPage').click(function(){\n\t\t\t\t\t\tvar elementClicked = $(this).attr(\"href\");\n\t\t\t\t\t\tvar destination = $(elementClicked).offset().top;\n\t\t\t\t\t\t$(\"html:not(:animated),body:not(:animated)\").animate({\n\t\t\t\t\t\t\tscrollTop: destination - 1 //Number being the pixel distance from destination.\n\t\t\t\t\t\t}, 1000, 'easeInOutQuint');\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t\t\n\t\t\t\t\t});\n\t\t\t\t}", "set scrolling(scrolling) {\n this._scrolling = scrolling;\n this.bodyContainer.classList[scrolling ? 'add' : 'remove']('b-scrolling');\n }", "function onScroll() {\n latest = getScrollY();\n requestTick();\n }", "setScrollClass() {\n if (!this.bodyWrapperCenter[0] || !this.bodyWrapperCenter[0].offsetHeight) return;\n const height = parseInt(this.bodyWrapperCenter[0].offsetHeight, 10);\n const headerHeight = this.headerRow ? this.headerRow[0].offsetHeight : 0;\n const tableHeight = parseInt(this.tableBody[0].offsetHeight, 10);\n this.element.removeClass('has-vertical-scroll has-visible-last-row has-horizontal-scroll');\n\n if (tableHeight < height - headerHeight) {\n this.element.addClass('has-visible-last-row');\n }\n\n if (!this.hasLeftPane && !this.hasRightPane) {\n return;\n }\n\n const hasScrollBarV = parseInt(this.bodyWrapperCenter[0].scrollHeight, 10) > height + 2;\n const width = parseInt(this.bodyWrapperCenter[0].offsetWidth, 10);\n const hasScrollBarH = parseInt(this.bodyWrapperCenter[0].scrollWidth, 10) > width;\n\n if (hasScrollBarV) {\n this.element.addClass('has-vertical-scroll');\n }\n if (hasScrollBarH) {\n this.element.addClass('has-horizontal-scroll');\n }\n }", "function DragToScroll() {\n this.boundaries = null;\n this.callback = null;\n}", "function ViewportScrollPosition() {}", "function ViewportScrollPosition() {}", "function ViewportScrollPosition() {}", "function ViewportScrollPosition() {}", "function initializeScrollbar() { \n $(\".mcustomScroll\").mCustomScrollbar({ \n theme:\"dark-3\",\n axis:\"yx\",\n advanced:{\n updateOnContentResize: true\n }\n });\n\n $(\".mcustomScroll.mcustomScrollVerticalOnly\").mCustomScrollbar({ \n theme:\"dark-3\",\n axis:\"y\",\n advanced:{\n updateOnContentResize: true\n }\n });\n }", "calcScrollBarY() {\n let scrollBarBoxHeight = this.getScrollBarBoxHeight()\n let scrollRate = this.scrollRange.start / this.calcListItemCount()\n return scrollBarBoxHeight * scrollRate\n }", "scrollTo() {\n window.scroll({\n top: this.getCurrSlide().offsetTop,\n left: 0,\n behavior: 'smooth'\n })\n }", "update() {\n\t\tthis.scroll.update();\n\t}", "function ScrollSpy(element, options) {\n\t this.$body = $(document.body)\n\t this.$scrollElement = $(element).is(document.body) ? $(window) : $(element)\n\t this.options = $.extend({}, ScrollSpy.DEFAULTS, options)\n\t this.selector = (this.options.target || '') + ' .nav li > a'\n\t this.offsets = []\n\t this.targets = []\n\t this.activeTarget = null\n\t this.scrollHeight = 0\n\t\n\t this.$scrollElement.on('scroll.bs.scrollspy', $.proxy(this.process, this))\n\t this.refresh()\n\t this.process()\n\t }", "function ScrollSpy(element, options) {\n\t this.$body = $(document.body)\n\t this.$scrollElement = $(element).is(document.body) ? $(window) : $(element)\n\t this.options = $.extend({}, ScrollSpy.DEFAULTS, options)\n\t this.selector = (this.options.target || '') + ' .nav li > a'\n\t this.offsets = []\n\t this.targets = []\n\t this.activeTarget = null\n\t this.scrollHeight = 0\n\t\n\t this.$scrollElement.on('scroll.bs.scrollspy', $.proxy(this.process, this))\n\t this.refresh()\n\t this.process()\n\t }", "function ScrollSpy(element, options) {\n\t this.$body = $(document.body)\n\t this.$scrollElement = $(element).is(document.body) ? $(window) : $(element)\n\t this.options = $.extend({}, ScrollSpy.DEFAULTS, options)\n\t this.selector = (this.options.target || '') + ' .nav li > a'\n\t this.offsets = []\n\t this.targets = []\n\t this.activeTarget = null\n\t this.scrollHeight = 0\n\t\n\t this.$scrollElement.on('scroll.bs.scrollspy', $.proxy(this.process, this))\n\t this.refresh()\n\t this.process()\n\t }", "cycle() {\n const self = this;\n const { element, options, isPaused } = self;\n\n Timer.clear(element, carouselString);\n if (isPaused) {\n Timer.clear(element, pausedClass);\n removeClass(element, pausedClass);\n }\n\n Timer.set(element, () => {\n if (!self.isPaused && isElementInScrollRange(element)) {\n self.index += 1;\n self.to(self.index);\n }\n }, options.interval, carouselString);\n }", "init() {\n this.scroller = document.querySelector('.scroller');\n\n if (this.scroller === null) return;\n\n this.wrapper = this.scroller.querySelector('.scroller__wrapper-inner');\n this.slides = this.wrapper.querySelectorAll('.scroller__slide');\n this.count = this.slides.length;\n\n if (this.count === 0) {\n this.scroller.parentNode.removeChild(this.slides);\n delete this.wrapper;\n delete this.slides;\n delete this.scroller;\n delete this.count;\n return;\n }\n\n this.transitions = document.documentElement.classList.contains('csstransitions');\n this.transforms = document.documentElement.classList.contains('csstransforms');\n\n this.paginator = this.scroller.querySelector('.scroller__paginator');\n this.prev_button = this.scroller.querySelector('.scroller__prev');\n this.next_button = this.scroller.querySelector('.scroller__next');\n\n this.prev_button.addEventListener('click', this.openPrevSlide.bind(this));\n this.next_button.addEventListener('click', this.openNextSlide.bind(this));\n\n let first_slide = this.slides[0].cloneNode(true)\n , last_slide = this.slides[this.count - 1].cloneNode(true);\n\n first_slide.classList.add('cloned');\n last_slide.classList.add('cloned');\n this.wrapper.appendChild(first_slide);\n this.wrapper.insertBefore(last_slide, this.slides[0]);\n\n let index = this.count;\n while (index--) {\n this.createButton(this.count - index - 1);\n }\n\n this.current_page = 0;\n this.paginator_buttons = this.paginator.querySelectorAll('.scroller__page');\n this.current_button = this.paginator_buttons[0];\n this.current_button.classList.add('scroller__page_current');\n\n this.animation = false;\n this.tansition_timer = null;\n\n if (this.transitions) {\n let transEndEventNames = {\n 'WebkitTransition': 'webkitTransitionEnd',\n 'MozTransition': 'transitionend',\n 'OTransition': 'oTransitionEnd',\n 'msTransition': 'MSTransitionEnd',\n 'transition': 'transitionend'\n };\n this.wrapper.addEventListener(transEndEventNames[Modernizr.prefixed('transition')], this.checkIndex.bind(this));\n }\n\n this.moveToFirst().delay().then(this.turnOn.bind(this));\n window.addEventListener('resize', this.resized.bind(this));\n }", "initSnap(){\n\t\tthis.currentPage = {};\n\t\tconst snap = this.options.snap;\n\n\t\tif (snap.loop) {\n\t\t\tlet children = this.scroller.children;\n\t\t\tif (children.length > 0) {\n\t\t\t\tprepend(children[children.length - 1].cloneNode(true), this.scroller);\n\t\t\t\tthis.scroller.appendChild(children[1].cloneNode(true));\n\t\t\t}\n\t\t}\n\n\t\tlet el = snap.el;\n\t\tif (typeof el === 'string') {\n\t\t\tel = this.scroller.querySelectorAll(el);\n\t\t}\n\n\t\tthis.on('refresh', () => {\n\t\t\tthis.pages = [];\n\n\t\t\tif (!this.wrapperWidth || !this.wrapperHeight || !this.scrollerWidth || !this.scrollerHeight) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tlet stepX = snap.stepX || this.wrapperWidth;\n\t\t\tlet stepY = snap.stepY || this.wrapperHeight;\n\n\t\t\tlet x = 0;\n\t\t\tlet y;\n\t\t\tlet cx;\n\t\t\tlet cy;\n\t\t\tlet i = 0;\n\t\t\tlet l;\n\t\t\tlet m = 0;\n\t\t\tlet n;\n\t\t\tlet rect;\n\t\t\tif (!el) {\n\t\t\t\tcx = Math.round(stepX / 2);\n\t\t\t\tcy = Math.round(stepY / 2);\n\n\t\t\t\twhile (x > -this.scrollerWidth) {\n\t\t\t\t\tthis.pages[i] = [];\n\t\t\t\t\tl = 0;\n\t\t\t\t\ty = 0;\n\n\t\t\t\t\twhile (y > -this.scrollerHeight) {\n\t\t\t\t\t\tthis.pages[i][l] = {\n\t\t\t\t\t\t\tx: Math.max(x, this.maxScrollX),\n\t\t\t\t\t\t\ty: Math.max(y, this.maxScrollY),\n\t\t\t\t\t\t\twidth: stepX,\n\t\t\t\t\t\t\theight: stepY,\n\t\t\t\t\t\t\tcx: x - cx,\n\t\t\t\t\t\t\tcy: y - cy\n\t\t\t\t\t\t};\n\n\t\t\t\t\t\ty -= stepY;\n\t\t\t\t\t\tl++;\n\t\t\t\t\t}\n\n\t\t\t\t\tx -= stepX;\n\t\t\t\t\ti++;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tl = el.length;\n\t\t\t\tn = -1;\n\n\t\t\t\tfor (; i < l; i++) {\n\t\t\t\t\trect = getRect(el[i]);\n\t\t\t\t\tif (i === 0 || rect.left <= getRect(el[i - 1]).left) {\n\t\t\t\t\t\tm = 0;\n\t\t\t\t\t\tn++;\n\t\t\t\t\t}\n\n\t\t\t\t\tif (!this.pages[m]) {\n\t\t\t\t\t\tthis.pages[m] = [];\n\t\t\t\t\t}\n\n\t\t\t\t\tx = Math.max(-rect.left, this.maxScrollX);\n\t\t\t\t\ty = Math.max(-rect.top, this.maxScrollY);\n\t\t\t\t\tcx = x - Math.round(rect.width / 2);\n\t\t\t\t\tcy = y - Math.round(rect.height / 2);\n\n\t\t\t\t\tthis.pages[m][n] = {\n\t\t\t\t\t\tx: x,\n\t\t\t\t\t\ty: y,\n\t\t\t\t\t\twidth: rect.width,\n\t\t\t\t\t\theight: rect.height,\n\t\t\t\t\t\tcx: cx,\n\t\t\t\t\t\tcy: cy\n\t\t\t\t\t};\n\n\t\t\t\t\tif (x > this.maxScrollX) {\n\t\t\t\t\t\tm++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tlet initPage = snap.loop ? 1 : 0;\n\t\t\tthis.goToPage(this.currentPage.pageX || initPage, this.currentPage.pageY || 0, 0);\n\n\t\t\tconst snapThreshold = snap.threshold;\n\t\t\tif (snapThreshold % 1 === 0) {\n\t\t\t\tthis.snapThresholdX = snapThreshold;\n\t\t\t\tthis.snapThresholdY = snapThreshold;\n\t\t\t} else {\n\t\t\t\tthis.snapThresholdX = Math.round(this.pages[this.currentPage.pageX][this.currentPage.pageY].width * snapThreshold);\n\t\t\t\tthis.snapThresholdY = Math.round(this.pages[this.currentPage.pageX][this.currentPage.pageY].height * snapThreshold);\n\t\t\t}\n\t\t});\n\n\t\tthis.on('scrollEnd', () => {\n\t\t\tif (snap.loop) {\n\t\t\t\tif (this.currentPage.pageX === 0) {\n\t\t\t\t\tthis.goToPage(this.pages.length - 2, this.currentPage.pageY, 0);\n\t\t\t\t}\n\t\t\t\tif (this.currentPage.pageX === this.pages.length - 1) {\n\t\t\t\t\tthis.goToPage(1, this.currentPage.pageY, 0);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\n\t\tif (snap.listenFlick !== false) {\n\t\t\tthis.on('flick', () => {\n\t\t\t\tlet time = snap.speed || Math.max(\n\t\t\t\t\tMath.max(\n\t\t\t\t\t\tMath.min(Math.abs(this.x - this.startX), 1000),\n\t\t\t\t\t\tMath.min(Math.abs(this.y - this.startY), 1000)\n\t\t\t\t\t), 300);\n\n\t\t\t\tthis.goToPage(\n\t\t\t\t\tthis.currentPage.pageX + this.directionX,\n\t\t\t\t\tthis.currentPage.pageY + this.directionY,\n\t\t\t\t\ttime\n\t\t\t\t);\n\t\t\t});\n\t\t}\n\t}", "get scrollDistance() { return this._scrollDistance; }", "function ScrollSpy(element, options) {\n\t this.$body = $(document.body)\n\t this.$scrollElement = $(element).is(document.body) ? $(window) : $(element)\n\t this.options = $.extend({}, ScrollSpy.DEFAULTS, options)\n\t this.selector = (this.options.target || '') + ' .nav li > a'\n\t this.offsets = []\n\t this.targets = []\n\t this.activeTarget = null\n\t this.scrollHeight = 0\n\n\t this.$scrollElement.on('scroll.bs.scrollspy', $.proxy(this.process, this))\n\t this.refresh()\n\t this.process()\n\t }", "function ScrollSpy(element, options) {\n\t this.$body = $(document.body)\n\t this.$scrollElement = $(element).is(document.body) ? $(window) : $(element)\n\t this.options = $.extend({}, ScrollSpy.DEFAULTS, options)\n\t this.selector = (this.options.target || '') + ' .nav li > a'\n\t this.offsets = []\n\t this.targets = []\n\t this.activeTarget = null\n\t this.scrollHeight = 0\n\n\t this.$scrollElement.on('scroll.bs.scrollspy', $.proxy(this.process, this))\n\t this.refresh()\n\t this.process()\n\t }", "function ScrollSpy(element, options) {\n\t this.$body = $(document.body)\n\t this.$scrollElement = $(element).is(document.body) ? $(window) : $(element)\n\t this.options = $.extend({}, ScrollSpy.DEFAULTS, options)\n\t this.selector = (this.options.target || '') + ' .nav li > a'\n\t this.offsets = []\n\t this.targets = []\n\t this.activeTarget = null\n\t this.scrollHeight = 0\n\n\t this.$scrollElement.on('scroll.bs.scrollspy', $.proxy(this.process, this))\n\t this.refresh()\n\t this.process()\n\t }", "function ScrollSpy(element, options) {\n\t this.$body = $(document.body)\n\t this.$scrollElement = $(element).is(document.body) ? $(window) : $(element)\n\t this.options = $.extend({}, ScrollSpy.DEFAULTS, options)\n\t this.selector = (this.options.target || '') + ' .nav li > a'\n\t this.offsets = []\n\t this.targets = []\n\t this.activeTarget = null\n\t this.scrollHeight = 0\n\n\t this.$scrollElement.on('scroll.bs.scrollspy', $.proxy(this.process, this))\n\t this.refresh()\n\t this.process()\n\t }", "function ScrollSpy(element, options) {\n\t this.$body = $(document.body)\n\t this.$scrollElement = $(element).is(document.body) ? $(window) : $(element)\n\t this.options = $.extend({}, ScrollSpy.DEFAULTS, options)\n\t this.selector = (this.options.target || '') + ' .nav li > a'\n\t this.offsets = []\n\t this.targets = []\n\t this.activeTarget = null\n\t this.scrollHeight = 0\n\n\t this.$scrollElement.on('scroll.bs.scrollspy', $.proxy(this.process, this))\n\t this.refresh()\n\t this.process()\n\t }", "restoreScroll(state = this.storedScrollState) {\n const me = this; // TODO: Implement special multi-element Scroller subclass for Grids which\n // encapsulates the x axis only Scrollers of all its SubGrids.\n\n me.eachSubGrid(subGrid => {\n subGrid.scrollable.x = state.scrollLeft[subGrid.region];\n });\n me.scrollable.y = state.scrollTop;\n }", "scroll() {\n const env = this;\n const container = this['$container']['$node'];\n container.parentNode.addEventListener( 'scroll', function( e ) {\n env['$content'].scrollTop = container.parentNode.scrollTop;\n env['$content'].scrollLeft = container.parentNode.scrollLeft;\n env.setPage();\n });\n }", "function ViewportScrollPosition() { }", "function ViewportScrollPosition() { }", "function updateScroll () {\n if (!elements.li[0]) return;\n var height = elements.li[0].offsetHeight,\n top = height * ctrl.index,\n bot = top + height,\n hgt = elements.scroller.clientHeight,\n scrollTop = elements.scroller.scrollTop;\n if (top < scrollTop) {\n scrollTo(top);\n } else if (bot > scrollTop + hgt) {\n scrollTo(bot - hgt);\n }\n }", "function updateScroll () {\n if (!elements.li[0]) return;\n var height = elements.li[0].offsetHeight,\n top = height * ctrl.index,\n bot = top + height,\n hgt = elements.scroller.clientHeight,\n scrollTop = elements.scroller.scrollTop;\n if (top < scrollTop) {\n scrollTo(top);\n } else if (bot > scrollTop + hgt) {\n scrollTo(bot - hgt);\n }\n }", "function updateScroll () {\n if (!elements.li[0]) return;\n var height = elements.li[0].offsetHeight,\n top = height * ctrl.index,\n bot = top + height,\n hgt = elements.scroller.clientHeight,\n scrollTop = elements.scroller.scrollTop;\n if (top < scrollTop) {\n scrollTo(top);\n } else if (bot > scrollTop + hgt) {\n scrollTo(bot - hgt);\n }\n }", "function scroll() {\n\t\t\tslotScroller.scrollTop(top);\n\t\t}", "function scroll() {\n\t\t\tslotScroller.scrollTop(top);\n\t\t}", "function scroll() {\n\t\t\tslotScroller.scrollTop(top);\n\t\t}", "function scroll() {\n\t\t\tslotScroller.scrollTop(top);\n\t\t}", "function scroll() {\n\t\t\tslotScroller.scrollTop(top);\n\t\t}", "function ScrollSpy(element, options) {\n\t var process = $.proxy(this.process, this)\n\t\n\t this.$body = $('body')\n\t this.$scrollElement = $(element).is('body') ? $(window) : $(element)\n\t this.options = $.extend({}, ScrollSpy.DEFAULTS, options)\n\t this.selector = (this.options.target || '') + ' .nav li > a'\n\t this.offsets = []\n\t this.targets = []\n\t this.activeTarget = null\n\t this.scrollHeight = 0\n\t\n\t this.$scrollElement.on('scroll.bs.scrollspy', process)\n\t this.refresh()\n\t this.process()\n\t }", "function scrollAnimate() {\n\n\t/*\t\t\t\tassignClassByNumber(\n\t\t\t\t\t\t\t$('#history'), // pass the jQuery object we're animating\n\t\t\t\t\t\t\tgetElementHeightAboveFold($('#history')),\n\t\t\t\t\t\t\thistoryFrames\n\t\t\t\t\t\t\t);\n\n\t\t\t\t\tassignClassByNumber(\n\t\t\t\t\t\t\t$('#timeline-2010 h3'), // pass the jQuery object we're animating\n\t\t\t\t\t\t\tgetElementHeightAboveFold($('#timeline-2010 h3')), // pass the current (relative) scroll position\n\t\t\t\t\t\t\t[\n\t\t\t\t\t\t\t\t['popped', 300, 99999] // the 'script' array [ css class, scroll start pos, scroll end pos]\n\n\t\t\t\t\t\t\t]\n\t\t\t\t\t\t\t);\n\t\t\t\t\tassignClassByNumber(\n\t\t\t\t\t\t\t$('#timeline-2013 h3'), // pass the jQuery object we're animating\n\t\t\t\t\t\t\tgetElementHeightAboveFold($('#timeline-2013 h3')), // pass the current (relative) scroll position\n\t\t\t\t\t\t\t[\n\t\t\t\t\t\t\t\t['popped', 300, 99999] // the 'script' array [ css class, scroll start pos, scroll end pos]\n\n\t\t\t\t\t\t\t]\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\n\t\t\t\t\tassignClassByNumber(\n\t\t\t\t\t\t\t$('#timeline-2010 img'), // pass the jQuery object we're animating\n\t\t\t\t\t\t\tgetElementHeightAboveFold($('#timeline-2010 img')), // pass the current (relative) scroll position\n\t\t\t\t\t\t\t[\n\t\t\t\t\t\t\t\t['popped', 200, 99999] // the 'script' array [ css class, scroll start pos, scroll end pos]\n\n\t\t\t\t\t\t\t]\n\t\t\t\t\t\t\t);\n\t\t\t\t\tassignClassByNumber(\n\t\t\t\t\t\t\t$('#timeline-2013 img'), // pass the jQuery object we're animating\n\t\t\t\t\t\t\tgetElementHeightAboveFold($('#timeline-2013 img')), // pass the current (relative) scroll position\n\t\t\t\t\t\t\t[\n\t\t\t\t\t\t\t\t['popped', 200, 99999] // the 'script' array [ css class, scroll start pos, scroll end pos]\n\n\t\t\t\t\t\t\t]\n\t\t\t\t\t\t\t);\n\t\t\t\t\t*/\n\t\t\t\t}", "get [scrollTarget]() {\n return this[ids].grippedContent;\n }" ]
[ "0.6425834", "0.6410249", "0.63330656", "0.63049364", "0.6215433", "0.62142974", "0.62142974", "0.62142974", "0.62142974", "0.6204531", "0.6202594", "0.6194863", "0.6175148", "0.61379933", "0.6110296", "0.60964507", "0.6077627", "0.6067853", "0.6066979", "0.6066347", "0.60607004", "0.6031798", "0.6029409", "0.60178894", "0.60145843", "0.60145843", "0.6009836", "0.5986001", "0.5984642", "0.5977808", "0.59752804", "0.5974726", "0.5973864", "0.59716725", "0.59669113", "0.5958856", "0.5954943", "0.59539956", "0.59402204", "0.59340787", "0.59340787", "0.5925412", "0.5908062", "0.58994687", "0.5898798", "0.5891129", "0.58805645", "0.5880435", "0.5880085", "0.58790165", "0.5872916", "0.58653057", "0.58653057", "0.58653057", "0.58653057", "0.58605355", "0.5860211", "0.58567643", "0.5855502", "0.58526623", "0.58445466", "0.5841945", "0.58395314", "0.5836577", "0.583436", "0.5833074", "0.58275723", "0.58275723", "0.58275723", "0.58275723", "0.5818543", "0.5814696", "0.58132327", "0.5812516", "0.580502", "0.580502", "0.580502", "0.5792256", "0.5790512", "0.57880646", "0.5785029", "0.5783605", "0.5783605", "0.5783605", "0.5783605", "0.5783605", "0.5772017", "0.5772008", "0.57707715", "0.57707715", "0.57675433", "0.57675433", "0.57675433", "0.57584697", "0.57584697", "0.57584697", "0.57584697", "0.57584697", "0.5758173", "0.5758117", "0.575124" ]
0.0
-1
SCROLLSPY PLUGIN DEFINITION ===========================
function Plugin(option) { return this.each(function () { var $this = $(this) var data = $this.data('bs.scrollspy') var options = typeof option == 'object' && option if (!data) $this.data('bs.scrollspy', (data = new ScrollSpy(this, options))) if (typeof option == 'string') data[option]() }) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function Plugin(option){return this.each(function(){var $this=$(this);var data=$this.data('bs.scrollspy');var options=(typeof option==='undefined'?'undefined':_typeof(option))=='object'&&option;if(!data)$this.data('bs.scrollspy',data=new ScrollSpy(this,options));if(typeof option=='string')data[option]();});}", "function Plugin(option){return this.each(function(){var $this=$(this);var data=$this.data('bs.scrollspy');var options=(typeof option===\"undefined\"?\"undefined\":_typeof2(option))=='object'&&option;if(!data)$this.data('bs.scrollspy',data=new ScrollSpy(this,options));if(typeof option=='string')data[option]();});}", "function initializeScrollbar() { \n $(\".mcustomScroll\").mCustomScrollbar({ \n theme:\"dark-3\",\n axis:\"yx\",\n advanced:{\n updateOnContentResize: true\n }\n });\n\n $(\".mcustomScroll.mcustomScrollVerticalOnly\").mCustomScrollbar({ \n theme:\"dark-3\",\n axis:\"y\",\n advanced:{\n updateOnContentResize: true\n }\n });\n }", "function init(){\n\tnew SmoothScroll(document,200,2)\n}", "function cust_PageScroll(ref) {\n\n}", "function updateScroll(){if(!elements.li[0])return;var height=elements.li[0].offsetHeight,top=height*ctrl.index,bot=top+height,hgt=elements.scroller.clientHeight,scrollTop=elements.scroller.scrollTop;if(top<scrollTop){scrollTo(top);}else if(bot>scrollTop+hgt){scrollTo(bot-hgt);}}", "function initScroll(){var windowH=$(window).height(),newW=windowH/1400*29232+1e3/windowH*3;scrollWidth=newW-$(window).width(),$(\".helper\").width(newW),$(\"#wrapper,.helper\").height(windowH),myscroll=new iScroll(\"wrapper\",{hScrollbar:!0,useTransition:!0,hScroll:!0,vScroll:!1,checkDOMChanges:!0,bounce:!1,scrollbarClass:\"myScrollbar\"}),\n// \nmyscroll.options.onScrollStart=function(){\"block\"==$(\".detail\").css(\"display\")&&($(\".detail\").css(\"display\",\"none\"),$(\"#daoyu\").attr(\"id\",\"\")),\"block\"==$(\".detail-w\").css(\"display\")&&($(\".detail-w\").css(\"display\",\"none\"),$(\"#daoyu\").attr(\"id\",\"\"))},myscroll.options.onScrollEnd=function(){$(\".myScrollbarH\").hide(),timer&&clearTimeout(timer),timer=setTimeout(function(){clearTimeout(timer),timer=null,myscroll.scrollTo(myscroll.x+scrollWidth,0,Math.abs(5e5*(scrollWidth+myscroll.x)/scrollWidth),\"relative\")},2e4)},myscroll.scrollTo(scrollWidth,0,5e5,\"relative\"),$(\".myScrollbarH\").hide()}", "_scrollHandler () {}", "function scroller_multiselect() {\n $('.multi_choice').find('ul').addClass('scroller');\n $('.multi_choice').find('ul').slimScroll({\n height: 'auto'\n });\n}", "function Plugin(option) {\n\t return this.each(function () {\n\t var $this = $(this)\n\t var data = $this.data('bs.scrollspy')\n\t var options = typeof option == 'object' && option\n\t\n\t if (!data) $this.data('bs.scrollspy', (data = new ScrollSpy(this, options)))\n\t if (typeof option == 'string') data[option]()\n\t })\n\t }", "function Plugin(option) {\n\t return this.each(function () {\n\t var $this = $(this)\n\t var data = $this.data('bs.scrollspy')\n\t var options = typeof option == 'object' && option\n\t\n\t if (!data) $this.data('bs.scrollspy', (data = new ScrollSpy(this, options)))\n\t if (typeof option == 'string') data[option]()\n\t })\n\t }", "function Plugin(option) {\n\t return this.each(function () {\n\t var $this = $(this)\n\t var data = $this.data('bs.scrollspy')\n\t var options = typeof option == 'object' && option\n\t\n\t if (!data) $this.data('bs.scrollspy', (data = new ScrollSpy(this, options)))\n\t if (typeof option == 'string') data[option]()\n\t })\n\t }", "function Plugin(option) {\n\t return this.each(function () {\n\t var $this = $(this)\n\t var data = $this.data('bs.scrollspy')\n\t var options = typeof option == 'object' && option\n\t\n\t if (!data) $this.data('bs.scrollspy', (data = new ScrollSpy(this, options)))\n\t if (typeof option == 'string') data[option]()\n\t })\n\t }", "function scroller() {\n if (this.id == \"arrow1\") {\n smoothScroll(\"SP\");\n }\n else if (this.id == \"arrow2\") {\n smoothScroll(\"VP\");\n }\n else if (this.id == \"arrow3\") {\n smoothScroll(\"TP\");\n }\n else if (this.id == \"arrow4\") {\n smoothScroll(\"top\");\n }\n}", "function setScrollable()\r\n{\r\n //Added document readiness to set classes if the link toggles\r\n $(document).ready(function()\r\n {\r\n //Event to auto-position next/previous arrowheads\r\n document.scrollableOnResizeListener = function(e)\r\n {\r\n //Exit if the body height has not changed since it's unlikely that the arrowheads need to be repositioned\r\n if (isDefined(document.scrollableBodyHeight))\r\n if (document.scrollableBodyHeight == $(\"body\").height())\r\n return false;\r\n document.scrollableBodyHeight = $(\"body\").height();\r\n \r\n $(\".scrollable\").each(function()\r\n {\r\n var currentElement = $(this);\r\n var buttonTop = (currentElement.offset().top + currentElement.outerHeight() / 2);\r\n var previous = currentElement.children(\".previous:first\");\r\n var next = currentElement.children(\".next:first\");\r\n var previousLeft = previous.hasClass(\"autoPosition\") ? (currentElement.offset().left - previous.outerWidth()) : previous.offset().left;\r\n var nextLeft = next.hasClass(\"autoPosition\") ? (currentElement.offset().left + currentElement.outerWidth()) : next.offset().left;\r\n var nextWidth = next.outerWidth();\r\n\r\n //Position and show scroll buttons only if they're within the visible area of the screen\r\n if ((previousLeft >= 0) && ((nextLeft + nextWidth) < document.body.clientWidth))\r\n {\r\n if (previous.hasClass(\"autoPosition\"))\r\n previous.css({position:\"absolute\", left: previousLeft, top: buttonTop});\r\n if (next.hasClass(\"autoPosition\"))\r\n next.css({position:\"absolute\", left: nextLeft, top: buttonTop});\r\n previous.show();\r\n next.show();\r\n }\r\n else\r\n {\r\n previous.hide();\r\n next.hide();\r\n }\r\n });\r\n };\r\n\r\n //Initialize tinyCarousel\r\n $(\".scrollable\").each(function()\r\n {\r\n var currentElement = $(this);\r\n var classes = currentElement.attr(\"class\");\r\n var millisecondsInASecond = 1000;\r\n var scrollItems = 1;\r\n var scrollTime = 1000;\r\n var animationTime = 150;\r\n var previous = currentElement.children(\".previous:first\");\r\n var next = currentElement.children(\".next:first\");\r\n\r\n //Read custom parameters from the CSS class value\r\n if ((isDefined(document.isMobileOptimized)) && (classes.indexOf(\"mobileScrollItems\") >= 0))\r\n scrollItems = parseInt(classes.split(\"mobileScrollItems\")[1].split(\" \")[0]);\r\n else if (classes.indexOf(\"scrollItems\") >= 0)\r\n scrollItems = parseInt(classes.split(\"scrollItems\")[1].split(\" \")[0]);\r\n if (classes.indexOf(\"scrollTime\") >= 0)\r\n scrollTime = parseInt(classes.split(\"scrollTime\")[1].split(\" \")[0]) * millisecondsInASecond;\r\n \r\n //Assign swipe functionality\r\n currentElement.bind(\"swipeleft\", function(e)\r\n {\r\n $(this).find(\".next:not(.hidden):first\").trigger(\"click\");\r\n });\r\n currentElement.bind(\"swiperight\", function(e)\r\n {\r\n $(this).find(\".previous:not(.hidden):first\").trigger(\"click\");\r\n });\r\n \r\n currentElement.tinycarousel({interval:true, display:scrollItems, intervaltime:scrollTime, duration:animationTime, callback:document.scrollableOnResizeListener});\r\n });\r\n \r\n //Auto-position next/previous arrowheads\r\n document.scrollableOnResizeListener();\r\n $(window).resize(document.scrollableOnResizeListener);\r\n });\r\n}", "function qodeOnWindowScroll() {\n\t qodeInitNewsShortcodesPagination().scroll();\n }", "function scroll() {\n\t\t\tslotScroller.scrollTop(top);\n\t\t}", "function scroll() {\n\t\t\tslotScroller.scrollTop(top);\n\t\t}", "function scroll() {\n\t\t\tslotScroller.scrollTop(top);\n\t\t}", "function scroll() {\n\t\t\tslotScroller.scrollTop(top);\n\t\t}", "function scroll() {\n\t\t\tslotScroller.scrollTop(top);\n\t\t}", "function monitorScroll() {\n SidebarActions.monitorScroll()\n}", "function Plugin(option) {\n\t return this.each(function () {\n\t var $this = $(this)\n\t var data = $this.data('bs.scrollspy')\n\t var options = typeof option == 'object' && option\n\n\t if (!data) $this.data('bs.scrollspy', (data = new ScrollSpy(this, options)))\n\t if (typeof option == 'string') data[option]()\n\t })\n\t }", "function Plugin(option) {\n\t return this.each(function () {\n\t var $this = $(this)\n\t var data = $this.data('bs.scrollspy')\n\t var options = typeof option == 'object' && option\n\n\t if (!data) $this.data('bs.scrollspy', (data = new ScrollSpy(this, options)))\n\t if (typeof option == 'string') data[option]()\n\t })\n\t }", "function Plugin(option) {\n\t return this.each(function () {\n\t var $this = $(this)\n\t var data = $this.data('bs.scrollspy')\n\t var options = typeof option == 'object' && option\n\n\t if (!data) $this.data('bs.scrollspy', (data = new ScrollSpy(this, options)))\n\t if (typeof option == 'string') data[option]()\n\t })\n\t }", "function Plugin(option) {\n\t return this.each(function () {\n\t var $this = $(this)\n\t var data = $this.data('bs.scrollspy')\n\t var options = typeof option == 'object' && option\n\n\t if (!data) $this.data('bs.scrollspy', (data = new ScrollSpy(this, options)))\n\t if (typeof option == 'string') data[option]()\n\t })\n\t }", "function Plugin(option) {\n\t return this.each(function () {\n\t var $this = $(this)\n\t var data = $this.data('bs.scrollspy')\n\t var options = typeof option == 'object' && option\n\n\t if (!data) $this.data('bs.scrollspy', (data = new ScrollSpy(this, options)))\n\t if (typeof option == 'string') data[option]()\n\t })\n\t }", "function updateScreenshotScroll() {\r\n if (!isMobile) { \r\n $('#screenshots').slimScroll(slimOptionsContent); \r\n }\r\n}", "function initThumbScroll(){\n //console.log(\"initThumbScroll\");\n var trigger = $('.reload_action_left');\n trigger.each(function(i, el){\n $(el).bind('click',function(){\n $('body,html').animate({scrollTop : 0});\n });\n });\n}", "function initSideAreaScroll(){\n\t\"use strict\";\n\n\tif($j('.side_menu').length){\t\n\t\t$j(\".side_menu\").niceScroll({ \n\t\t\tscrollspeed: 60,\n\t\t\tmousescrollstep: 40,\n\t\t\tcursorwidth: 0, \n\t\t\tcursorborder: 0,\n\t\t\tcursorborderradius: 0,\n\t\t\tcursorcolor: \"transparent\",\n\t\t\tautohidemode: false, \n\t\t\thorizrailenabled: false \n\t\t});\n\t}\n}", "function Plugin(option) {\n return this.each(function () {\n var $this = $(this)\n var data = $this.data('bs.scrollspy')\n var options = typeof option == 'object' && option\n\n if (!data) $this.data('bs.scrollspy', (data = new ScrollSpy(this, options)))\n if (typeof option == 'string') data[option]()\n })\n }", "function updateScroll () {\n if (!elements.li[0]) return;\n if (mode === MODE_STANDARD) {\n updateStandardScroll();\n } else {\n updateVirtualScroll();\n }\n }", "function initCustomScrollbar() {\n $('.custom-scroll').mCustomScrollbar({});\n}", "updateMenuScrollArea(){\n \n //$('#sidebar-scroller').perfectScrollbar('update');\n \n }", "function Plugin( option ) {\n return this.each( function() {\n var $this = $( this )\n var data = $this.data( 'bs.scrollspy' )\n var options = typeof option == 'object' && option\n if ( !data ) $this.data( 'bs.scrollspy', ( data = new ScrollSpy( this, options ) ) )\n if ( typeof option == 'string' ) data[ option ]()\n } )\n }", "function Plugin(option) {\r\n return this.each(function () {\r\n var $this = $(this)\r\n var data = $this.data('bs.scrollspy')\r\n var options = typeof option == 'object' && option\r\n\r\n if (!data) $this.data('bs.scrollspy', (data = new ScrollSpy(this, options)))\r\n if (typeof option == 'string') data[option]()\r\n })\r\n }", "function Plugin(option) {\r\n return this.each(function () {\r\n var $this = $(this)\r\n var data = $this.data('bs.scrollspy')\r\n var options = typeof option == 'object' && option\r\n\r\n if (!data) $this.data('bs.scrollspy', (data = new ScrollSpy(this, options)))\r\n if (typeof option == 'string') data[option]()\r\n })\r\n }", "function Plugin(option) {\r\n return this.each(function () {\r\n var $this = $(this)\r\n var data = $this.data('bs.scrollspy')\r\n var options = typeof option == 'object' && option\r\n\r\n if (!data) $this.data('bs.scrollspy', (data = new ScrollSpy(this, options)))\r\n if (typeof option == 'string') data[option]()\r\n })\r\n }", "function Plugin(option) {\r\n return this.each(function () {\r\n var $this = $(this)\r\n var data = $this.data('bs.scrollspy')\r\n var options = typeof option == 'object' && option\r\n\r\n if (!data) $this.data('bs.scrollspy', (data = new ScrollSpy(this, options)))\r\n if (typeof option == 'string') data[option]()\r\n })\r\n }", "get scrollTarget(){return this.$.scrollable}", "function qodefSideAreaScroll(){\n\t\tvar sideMenu = $('.qodef-side-menu');\n\t\t\n\t\tif(sideMenu.length){\n sideMenu.perfectScrollbar({\n wheelSpeed: 0.6,\n suppressScrollX: true\n });\n\t\t}\n\t}", "function Plugin(option) {\n return this.each(function () {\n var $this = $(this)\n var data = $this.data('bs.scrollspy')\n var options = typeof option == 'object' && option\n\n if ( !data) $this.data('bs.scrollspy', (data = new ScrollSpy(this, options)))\n if (typeof option == 'string') data[option]()\n })\n }", "function scroller(){\n\t\t\t\t\t$('.scrollPage').click(function(){\n\t\t\t\t\t\tvar elementClicked = $(this).attr(\"href\");\n\t\t\t\t\t\tvar destination = $(elementClicked).offset().top;\n\t\t\t\t\t\t$(\"html:not(:animated),body:not(:animated)\").animate({\n\t\t\t\t\t\t\tscrollTop: destination - 1 //Number being the pixel distance from destination.\n\t\t\t\t\t\t}, 1000, 'easeInOutQuint');\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t\t\n\t\t\t\t\t});\n\t\t\t\t}" ]
[ "0.6854317", "0.6835888", "0.6574524", "0.6469166", "0.6357787", "0.6308153", "0.62861264", "0.6273556", "0.62687165", "0.6192112", "0.6192112", "0.6192112", "0.6192112", "0.6183829", "0.6172839", "0.6162308", "0.6159222", "0.6159222", "0.6159222", "0.6159222", "0.6159222", "0.615238", "0.61505353", "0.61505353", "0.61505353", "0.61505353", "0.61505353", "0.6149959", "0.6138613", "0.61262906", "0.61244196", "0.6116511", "0.6113441", "0.6094338", "0.6084287", "0.6033817", "0.6033817", "0.6033817", "0.6033817", "0.603112", "0.6029997", "0.60198176", "0.6018526" ]
0.0
-1
TAB PLUGIN DEFINITION =====================
function Plugin(option) { return this.each(function () { var $this = $(this) var data = $this.data('bs.tab') if (!data) $this.data('bs.tab', (data = new Tab(this))) if (typeof option == 'string') data[option]() }) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function Plugin(option){return this.each(function(){var $this=$(this);var data=$this.data('bs.tab');if(!data)$this.data('bs.tab',data=new Tab(this));if(typeof option=='string')data[option]();});}", "function Plugin(option){return this.each(function(){var $this=$(this);var data=$this.data('bs.tab');if(!data)$this.data('bs.tab',data=new Tab(this));if(typeof option=='string')data[option]();});}", "static get tag() {\n return \"a11y-tabs\";\n }", "static get tag() {\n return \"a11y-tab\";\n }", "applyTabsIA() {\n let $tabButtonItem = $('#tab-button li'),\n $tabSelect = $('#tab-select'),\n $tabContents = $('.tab-contents'),\n activeClass = 'is-active';\n\n $tabButtonItem.first().addClass(activeClass);\n $tabContents.not(':first').hide();\n\n $tabButtonItem.find('a').on('click', function(e) {\n let target = $(this).attr('href');\n $tabButtonItem.removeClass(activeClass);\n $(this).parent().addClass(activeClass);\n $tabSelect.val(target);\n $tabContents.hide();\n $(target).show();\n e.preventDefault();\n });\n\n $tabSelect.on('change', function() {\n let target = $(this).val(), targetSelectNum = $(this).prop('selectedIndex');\n $tabButtonItem.removeClass(activeClass);\n $tabButtonItem.eq(targetSelectNum).addClass(activeClass);\n $tabContents.hide();\n $(target).show();\n });\n }", "loadOneTab() { }", "function Plugin(option) {\n\t return this.each(function () {\n\t var $this = $(this)\n\t var data = $this.data('bs.tab')\n\t\n\t if (!data) $this.data('bs.tab', (data = new Tab(this)))\n\t if (typeof option == 'string') data[option]()\n\t })\n\t }", "function Plugin(option) {\n\t return this.each(function () {\n\t var $this = $(this)\n\t var data = $this.data('bs.tab')\n\t\n\t if (!data) $this.data('bs.tab', (data = new Tab(this)))\n\t if (typeof option == 'string') data[option]()\n\t })\n\t }", "function Plugin(option) {\n\t return this.each(function () {\n\t var $this = $(this)\n\t var data = $this.data('bs.tab')\n\t\n\t if (!data) $this.data('bs.tab', (data = new Tab(this)))\n\t if (typeof option == 'string') data[option]()\n\t })\n\t }", "function Plugin(option) {\n\t return this.each(function () {\n\t var $this = $(this)\n\t var data = $this.data('bs.tab')\n\t\n\t if (!data) $this.data('bs.tab', (data = new Tab(this)))\n\t if (typeof option == 'string') data[option]()\n\t })\n\t }", "function Plugin(option) {\n return this.each(function () {\n var $this = $(this)\n var data = $this.data('bs.tab')\n\n if (!data) $this.data('bs.tab', (data = new Tab(this)))\n if (typeof option == 'string') data[option]()\n })\n }", "function Plugin(option) {\n\t return this.each(function () {\n\t var $this = $(this)\n\t var data = $this.data('bs.tab')\n\n\t if (!data) $this.data('bs.tab', (data = new Tab(this)))\n\t if (typeof option == 'string') data[option]()\n\t })\n\t }", "function Plugin(option) {\n\t return this.each(function () {\n\t var $this = $(this)\n\t var data = $this.data('bs.tab')\n\n\t if (!data) $this.data('bs.tab', (data = new Tab(this)))\n\t if (typeof option == 'string') data[option]()\n\t })\n\t }", "function Plugin(option) {\n\t return this.each(function () {\n\t var $this = $(this)\n\t var data = $this.data('bs.tab')\n\n\t if (!data) $this.data('bs.tab', (data = new Tab(this)))\n\t if (typeof option == 'string') data[option]()\n\t })\n\t }", "function Plugin(option) {\n\t return this.each(function () {\n\t var $this = $(this)\n\t var data = $this.data('bs.tab')\n\n\t if (!data) $this.data('bs.tab', (data = new Tab(this)))\n\t if (typeof option == 'string') data[option]()\n\t })\n\t }", "function Plugin(option) {\n\t return this.each(function () {\n\t var $this = $(this)\n\t var data = $this.data('bs.tab')\n\n\t if (!data) $this.data('bs.tab', (data = new Tab(this)))\n\t if (typeof option == 'string') data[option]()\n\t })\n\t }", "function initTabs() {\n jQuery(\".product-comparison-tabset\").tabset({\n tabLinks: \"a\",\n addToParent: !0,\n defaultTab: !0\n });\n}", "function tab() {\n let triggerTabList = [].slice.call(document.querySelectorAll('#nav-myProfile-tab, #nav-conundrum-tab'))\n triggerTabList.forEach(function (triggerEl) {\n var tabTrigger = new bootstrap.Tab(triggerEl)\n triggerEl.addEventListener('click', function (event) {\n event.preventDefault()\n tabTrigger.show()\n })\n })\n}", "setTabProperties() { }", "function Plugin( option ) {\n return this.each( function() {\n var $this = $( this )\n var data = $this.data( 'bs.tab' )\n if ( !data ) $this.data( 'bs.tab', ( data = new Tab( this ) ) )\n if ( typeof option == 'string' ) data[ option ]()\n } )\n }", "function pageTabs_helm_set(mode) {\n\n var defaultTab = \"\";\n\n if (mode === \"loanDetails\") {\n $(\"#RecentlyViewedTab_helm\").toggleClass(\"displayNone\", false);\n $(\"#LoanDetailsTab_helm\").toggleClass(\"displayNone\", false);\n $(\"#AuditTrackingTab_helm\").toggleClass(\"displayNone\", false);\n $(\"#AdvancedSearchTab_helm\").toggleClass(\"displayNone\", true);\n defaultTab = \"LoanDetailsTab_helm\";\n } else if (mode === \"search\") {\n $(\"#RecentlyViewedTab_helm\").toggleClass(\"displayNone\", false);\n $(\"#AdvancedSearchTab_helm\").toggleClass(\"displayNone\", false);\n $(\"#LoanDetailsTab_helm\").toggleClass(\"displayNone\", true);\n $(\"#AuditTrackingTab_helm\").toggleClass(\"displayNone\", true);\n defaultTab = \"AdvancedSearchTab_helm\";\n }\n else if (mode === \"recentlyViewedMinimized\") {\n //only show recently viewed tab and disable the tab selected appearance and give it a neutral look.\n $(\"#RecentlyViewedTab_helm\").toggleClass(\"displayNone\", false).toggleClass(\"ui-state-active\", false);\n $(\"#AdvancedSearchTab_helm\").toggleClass(\"displayNone\", true);\n $(\"#LoanDetailsTab_helm\").toggleClass(\"displayNone\", true);\n $(\"#AuditTrackingTab_helm\").toggleClass(\"displayNone\", true);\n }\n helm.ActiveTabId = defaultTab; //store the active tab in js property that will be accessible to other functions\n\n var $helmTabs = $(\"#Tabs_helm\");\n $helmTabs.tabs({\n // //active: Compass.Utils.jQueryTabs_GetTabIndex(defaultTab, \"Tabs_helm\"), //Activate Loan Details Tab\n // //beforeActivate: optimizeIE7Rendering,\n activate: jQueryTabs_TabSelect\n });\n\n //set active jquery page tab to helm default tab.\n var activeTabIndex = Compass.Utils.jQueryTabs_GetTabIndex(defaultTab, \"Tabs_helm\");\n $helmTabs.tabs({ active: activeTabIndex });\n $(\"#Tabs_HtmlList_helm\").toggleClass(\"displayNone\", false);\n \n // All Tab Content Area Div's had to be hidden initially otherwise\n // the screen would jumble around during rendering until the jquery \n // page tabs could be intialized. Unhide the tab content with this next line of code.\n $(\".jqPageTabsContent_helm\").toggleClass(\"displayNone\", false);\n }", "function Plugin(option) {\n return this.each(function () {\n var $this = $(this)\n var data = $this.data('bs.tab')\n if (!data) $this.data('bs.tab', (data = new Tab(this)))\n if (typeof option == 'string') data[option]()\n })\n }", "function IMcTabsConfig() { }", "function activaTab(tab){\n $('.nav-tabs-chart-selector a[href=\"#' + tab + '\"]').tab('show');\n }", "function Plugin(option) {\r\n return this.each(function () {\r\n var $this = $(this)\r\n var data = $this.data('bs.tab')\r\n\r\n if (!data) $this.data('bs.tab', (data = new Tab(this)))\r\n if (typeof option == 'string') data[option]()\r\n })\r\n }", "function Plugin(option) {\r\n return this.each(function () {\r\n var $this = $(this)\r\n var data = $this.data('bs.tab')\r\n\r\n if (!data) $this.data('bs.tab', (data = new Tab(this)))\r\n if (typeof option == 'string') data[option]()\r\n })\r\n }", "function Plugin(option) {\r\n return this.each(function () {\r\n var $this = $(this)\r\n var data = $this.data('bs.tab')\r\n\r\n if (!data) $this.data('bs.tab', (data = new Tab(this)))\r\n if (typeof option == 'string') data[option]()\r\n })\r\n }", "function Plugin(option) {\r\n return this.each(function () {\r\n var $this = $(this)\r\n var data = $this.data('bs.tab')\r\n\r\n if (!data) $this.data('bs.tab', (data = new Tab(this)))\r\n if (typeof option == 'string') data[option]()\r\n })\r\n }", "function Plugin(option) {\n return this.each(function () {\n var $this = $(this)\n var data = $this.data('bs.tab')\n\n if (!data) $this.data('bs.tab', (data = new Tab(this)))\n if (typeof option == 'string') data[option]()\n })\n }" ]
[ "0.7422795", "0.7422795", "0.692493", "0.68403625", "0.68381155", "0.6825247", "0.6680546", "0.6680546", "0.6680546", "0.6680546", "0.666558", "0.6643974", "0.6643974", "0.6643974", "0.6643974", "0.6643974", "0.66033274", "0.6584258", "0.6564133", "0.65579057", "0.65392226", "0.6499142", "0.64859676", "0.64832747", "0.64773303", "0.64773303", "0.64773303", "0.64773303", "0.6476622" ]
0.0
-1
AFFIX PLUGIN DEFINITION =======================
function Plugin(option) { return this.each(function () { var $this = $(this) var data = $this.data('bs.affix') var options = typeof option == 'object' && option if (!data) $this.data('bs.affix', (data = new Affix(this, options))) if (typeof option == 'string') data[option]() }) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function Plugin(option){return this.each(function(){var $this=$(this);var data=$this.data('bs.affix');var options=(typeof option==='undefined'?'undefined':_typeof(option))=='object'&&option;if(!data)$this.data('bs.affix',data=new Affix(this,options));if(typeof option=='string')data[option]();});}", "function Plugin(option){return this.each(function(){var $this=$(this);var data=$this.data('bs.affix');var options=(typeof option===\"undefined\"?\"undefined\":_typeof2(option))=='object'&&option;if(!data)$this.data('bs.affix',data=new Affix(this,options));if(typeof option=='string')data[option]();});}", "function Plugin(option) {\n\t return this.each(function () {\n\t var $this = $(this)\n\t var data = $this.data('bs.affix')\n\t var options = typeof option == 'object' && option\n\t\n\t if (!data) $this.data('bs.affix', (data = new Affix(this, options)))\n\t if (typeof option == 'string') data[option]()\n\t })\n\t }", "function Plugin(option) {\n\t return this.each(function () {\n\t var $this = $(this)\n\t var data = $this.data('bs.affix')\n\t var options = typeof option == 'object' && option\n\t\n\t if (!data) $this.data('bs.affix', (data = new Affix(this, options)))\n\t if (typeof option == 'string') data[option]()\n\t })\n\t }", "function Plugin(option) {\n\t return this.each(function () {\n\t var $this = $(this)\n\t var data = $this.data('bs.affix')\n\t var options = typeof option == 'object' && option\n\t\n\t if (!data) $this.data('bs.affix', (data = new Affix(this, options)))\n\t if (typeof option == 'string') data[option]()\n\t })\n\t }", "function Plugin(option) {\n\t return this.each(function () {\n\t var $this = $(this)\n\t var data = $this.data('bs.affix')\n\t var options = typeof option == 'object' && option\n\t\n\t if (!data) $this.data('bs.affix', (data = new Affix(this, options)))\n\t if (typeof option == 'string') data[option]()\n\t })\n\t }", "function callPlugin() {\n $timeout(function() {\n elm[attrs.uiJq].apply(elm, createLinkOptions());\n }, 0, false);\n }", "function callPlugin() {\n $timeout(function() {\n elm[attrs.uiJq].apply(elm, linkOptions);\n }, 0, false);\n }", "function callPlugin() {\n $timeout(function() {\n elm[attrs.uiJq].apply(elm, linkOptions);\n }, 0, false);\n }", "function Plugin(option) {\n return this.each(function () {\n var $this = $(this)\n var data = $this.data('bs.affix')\n var options = typeof option == 'object' && option\n\n if (!data) $this.data('bs.affix', (data = new Affix(this, options)))\n if (typeof option == 'string') data[option]()\n })\n }", "function Plugin(option) {\n\t return this.each(function () {\n\t var $this = $(this)\n\t var data = $this.data('bs.affix')\n\t var options = typeof option == 'object' && option\n\n\t if (!data) $this.data('bs.affix', (data = new Affix(this, options)))\n\t if (typeof option == 'string') data[option]()\n\t })\n\t }", "function Plugin(option) {\n\t return this.each(function () {\n\t var $this = $(this)\n\t var data = $this.data('bs.affix')\n\t var options = typeof option == 'object' && option\n\n\t if (!data) $this.data('bs.affix', (data = new Affix(this, options)))\n\t if (typeof option == 'string') data[option]()\n\t })\n\t }", "function Plugin(option) {\n\t return this.each(function () {\n\t var $this = $(this)\n\t var data = $this.data('bs.affix')\n\t var options = typeof option == 'object' && option\n\n\t if (!data) $this.data('bs.affix', (data = new Affix(this, options)))\n\t if (typeof option == 'string') data[option]()\n\t })\n\t }", "function Plugin(option) {\n\t return this.each(function () {\n\t var $this = $(this)\n\t var data = $this.data('bs.affix')\n\t var options = typeof option == 'object' && option\n\n\t if (!data) $this.data('bs.affix', (data = new Affix(this, options)))\n\t if (typeof option == 'string') data[option]()\n\t })\n\t }", "function Plugin(option) {\n\t return this.each(function () {\n\t var $this = $(this)\n\t var data = $this.data('bs.affix')\n\t var options = typeof option == 'object' && option\n\n\t if (!data) $this.data('bs.affix', (data = new Affix(this, options)))\n\t if (typeof option == 'string') data[option]()\n\t })\n\t }", "function Plugin(option) {\n return this.each(function () {\n var $this = $(this);\n var data = $this.data('bs.affix');\n var options = (typeof option === 'undefined' ? 'undefined' : _typeof(option)) == 'object' && option;\n\n if (!data) $this.data('bs.affix', data = new Affix(this, options));\n if (typeof option == 'string') data[option]();\n });\n }", "function Plugin(option) {\n return this.each(function () {\n var $this = $(this)\n var data = $this.data('bs.affix')\n var options = typeof option == 'object' && option\n\n if (!data) $this.data('bs.affix', (data = new Affix(this, options)))\n if (typeof option == 'string') data[option]()\n })\n }", "function Plugin( option ) {\n return this.each( function() {\n var $this = $( this )\n var data = $this.data( 'bs.affix' )\n var options = typeof option == 'object' && option\n if ( !data ) $this.data( 'bs.affix', ( data = new Affix( this, options ) ) )\n if ( typeof option == 'string' ) data[ option ]()\n } )\n }" ]
[ "0.6413848", "0.63957715", "0.5915483", "0.5915483", "0.5915483", "0.5915483", "0.5907848", "0.58639544", "0.58639544", "0.58600503", "0.58577216", "0.58577216", "0.58577216", "0.58577216", "0.58577216", "0.5832297", "0.5786588", "0.57440233" ]
0.0
-1
Check for IE =< 8
function isIE() { return typeof attachEvent !== "undefined" && typeof addEventListener === "undefined"; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function less_IE8() {\n if (/msie [1-8]{1}[^0-9]/.test(navigator.userAgent.toLowerCase())) {\n return true;\n }\n}", "function seven_isIE () {\n\t\t\tvar myNav = navigator.userAgent.toLowerCase();\n\t\t\treturn (myNav.indexOf('msie') != -1) ? parseInt(myNav.split('msie')[1]) : false;\n\t\t}", "function isIE() {\n return navigator.userAgent.toLowerCase().indexOf(\"trident\") > 0;\n }", "function isIE() {\n return navigator.userAgent.toLowerCase().indexOf(\"trident\") > 0;\n }", "function isIE() {\n var myNav = navigator.userAgent.toLowerCase();\n return (myNav.indexOf('msie') != -1) ? parseInt(myNav.split('msie')[1]) : false;\n }", "function isIE () {\n var myNav = navigator.userAgent.toLowerCase();\n return (myNav.indexOf('msie') != -1) ? parseInt(myNav.split('msie')[1], 10) : false;\n }", "function isIE() {\n var nav = navigator.userAgent.toLowerCase();\n\n return (nav.indexOf('msie') != -1) ? parseInt(nav.split('msie')[1]) : false;\n }", "function compIE(){\r\n\tvar agent = navigator.userAgent;\r\n\tif(agent.indexOf(\"MSIE 7.0\") > -1 || agent.indexOf(\"MSIE 8.0\") > - 1 || agent.indexOf(\"Trident 4.0\") > -1 || document.documentMode && document.documentMode <= 5)\r\n\t\treturn true;\r\n\treturn false;\r\n}", "function isInternetExplorer() {\n\t var rv = -1; // Return value assumes failure.\n\t var ua = navigator.userAgent;\n\t if (navigator.appName === 'Microsoft Internet Explorer') {\n\t var re = new RegExp(\"MSIE ([0-9]{1,}[\\.0-9]{0,})\");\n\t if (re.exec(ua) != null)\n\t rv = parseFloat(RegExp.$1);\n\t }\n\t // IE > 11\n\t else if (ua.indexOf(\"Trident\") > -1) {\n\t var re = new RegExp(\"rv:([0-9]{2,2}[\\.0-9]{0,})\");\n\t if (re.exec(ua) !== null) {\n\t rv = parseFloat(RegExp.$1);\n\t }\n\t }\n\t\n\t return rv >= 8;\n\t }", "function isInternetExplorer() {\n\t var rv = -1; // Return value assumes failure.\n\t var ua = navigator.userAgent;\n\t if (navigator.appName === 'Microsoft Internet Explorer') {\n\t var re = new RegExp(\"MSIE ([0-9]{1,}[\\.0-9]{0,})\");\n\t if (re.exec(ua) != null)\n\t rv = parseFloat(RegExp.$1);\n\t }\n\t // IE > 11\n\t else if (ua.indexOf(\"Trident\") > -1) {\n\t var re = new RegExp(\"rv:([0-9]{2,2}[\\.0-9]{0,})\");\n\t if (re.exec(ua) !== null) {\n\t rv = parseFloat(RegExp.$1);\n\t }\n\t }\n\t\n\t return rv >= 8;\n\t }", "function isIE () {\n\tvar myNav = navigator.userAgent.toLowerCase();\n\treturn (myNav.indexOf('msie') != -1) ? parseInt(myNav.split('msie')[1]) : false;\n}", "function isIE () {\n var myNav = navigator.userAgent.toLowerCase();\n return (myNav.indexOf('msie') != -1) ? parseInt(myNav.split('msie')[1]) : false;\n}", "function isLowIE9() {\r\n var e = window.navigator.userAgent.toString().toUpperCase();\r\n var flag = false;\r\n if (e.indexOf(\"MSIE\") >= 0) {\r\n\r\n if (e.indexOf(\"MSIE 6.0\") > 0) flag = true;\r\n if (e.indexOf(\"MSIE 7.0\") > 0) flag = true;\r\n if (e.indexOf(\"MSIE 8.0\") > 0) flag = true;\r\n\r\n }\r\n\r\n\r\n return flag;\r\n\r\n }", "function isIE() {\r\n return (navigator.userAgent.toLowerCase().indexOf('msie ') != -1) || (!!navigator.userAgent.match(/Trident.*rv[:]*11\\./));\r\n}", "function isInternetExplorer() {\n\t if (typeof navigator === 'undefined') {\n\t return false;\n\t }\n\t\n\t var rv = -1; // Return value assumes failure.\n\t var ua = navigator.userAgent;\n\t if (navigator.appName === 'Microsoft Internet Explorer') {\n\t var re = new RegExp(\"MSIE ([0-9]{1,}[\\.0-9]{0,})\");\n\t if (re.exec(ua) != null)\n\t rv = parseFloat(RegExp.$1);\n\t }\n\t // IE > 11\n\t else if (ua.indexOf(\"Trident\") > -1) {\n\t var re = new RegExp(\"rv:([0-9]{2,2}[\\.0-9]{0,})\");\n\t if (re.exec(ua) !== null) {\n\t rv = parseFloat(RegExp.$1);\n\t }\n\t }\n\t\n\t return rv >= 8;\n\t }", "function mg_is_old_IE() {\r\n\t\tif( navigator.appVersion.indexOf(\"MSIE 8.\") != -1 ) {return true;}\r\n\t\telse {return false;}\r\n\t}", "function isIE() {\n return (navigator.userAgent.toLowerCase().indexOf('msie ') != -1) || (!!navigator.userAgent.match(/Trident.*rv[:]*11\\./));\n}", "function isInternetExplorer() {\n if (typeof navigator === 'undefined') {\n return false;\n }\n\n var rv = -1; // Return value assumes failure.\n var ua = navigator.userAgent;\n if (navigator.appName === 'Microsoft Internet Explorer') {\n var re = new RegExp(\"MSIE ([0-9]{1,}[\\.0-9]{0,})\");\n if (re.exec(ua) != null)\n rv = parseFloat(RegExp.$1);\n }\n // IE > 11\n else if (ua.indexOf(\"Trident\") > -1) {\n var re = new RegExp(\"rv:([0-9]{2,2}[\\.0-9]{0,})\");\n if (re.exec(ua) !== null) {\n rv = parseFloat(RegExp.$1);\n }\n }\n\n return rv >= 8;\n }", "function isInternetExplorer() {\n if (typeof navigator === 'undefined') {\n return false;\n }\n\n var rv = -1; // Return value assumes failure.\n var ua = navigator.userAgent;\n if (navigator.appName === 'Microsoft Internet Explorer') {\n var re = new RegExp(\"MSIE ([0-9]{1,}[\\.0-9]{0,})\");\n if (re.exec(ua) != null)\n rv = parseFloat(RegExp.$1);\n }\n // IE > 11\n else if (ua.indexOf(\"Trident\") > -1) {\n var re = new RegExp(\"rv:([0-9]{2,2}[\\.0-9]{0,})\");\n if (re.exec(ua) !== null) {\n rv = parseFloat(RegExp.$1);\n }\n }\n\n return rv >= 8;\n }", "function isInternetExplorer() {\n if (typeof navigator === 'undefined') {\n return false;\n }\n\n var rv = -1; // Return value assumes failure.\n var ua = navigator.userAgent;\n if (navigator.appName === 'Microsoft Internet Explorer') {\n var re = new RegExp(\"MSIE ([0-9]{1,}[\\.0-9]{0,})\");\n if (re.exec(ua) != null)\n rv = parseFloat(RegExp.$1);\n }\n // IE > 11\n else if (ua.indexOf(\"Trident\") > -1) {\n var re = new RegExp(\"rv:([0-9]{2,2}[\\.0-9]{0,})\");\n if (re.exec(ua) !== null) {\n rv = parseFloat(RegExp.$1);\n }\n }\n\n return rv >= 8;\n }", "function isInternetExplorer() {\n if (typeof navigator === 'undefined') {\n return false;\n }\n\n var rv = -1; // Return value assumes failure.\n var ua = navigator.userAgent;\n if (navigator.appName === 'Microsoft Internet Explorer') {\n var re = new RegExp(\"MSIE ([0-9]{1,}[\\.0-9]{0,})\");\n if (re.exec(ua) != null)\n rv = parseFloat(RegExp.$1);\n }\n // IE > 11\n else if (ua.indexOf(\"Trident\") > -1) {\n var re = new RegExp(\"rv:([0-9]{2,2}[\\.0-9]{0,})\");\n if (re.exec(ua) !== null) {\n rv = parseFloat(RegExp.$1);\n }\n }\n\n return rv >= 8;\n }", "function isInternetExplorer() {\n if (typeof navigator === 'undefined') {\n return false;\n }\n\n var rv = -1; // Return value assumes failure.\n var ua = navigator.userAgent;\n if (navigator.appName === 'Microsoft Internet Explorer') {\n var re = new RegExp(\"MSIE ([0-9]{1,}[\\.0-9]{0,})\");\n if (re.exec(ua) != null)\n rv = parseFloat(RegExp.$1);\n }\n // IE > 11\n else if (ua.indexOf(\"Trident\") > -1) {\n var re = new RegExp(\"rv:([0-9]{2,2}[\\.0-9]{0,})\");\n if (re.exec(ua) !== null) {\n rv = parseFloat(RegExp.$1);\n }\n }\n\n return rv >= 8;\n }", "function isInternetExplorer() {\n if (typeof navigator === 'undefined') {\n return false;\n }\n\n var rv = -1; // Return value assumes failure.\n var ua = navigator.userAgent;\n if (navigator.appName === 'Microsoft Internet Explorer') {\n var re = new RegExp(\"MSIE ([0-9]{1,}[\\.0-9]{0,})\");\n if (re.exec(ua) != null)\n rv = parseFloat(RegExp.$1);\n }\n // IE > 11\n else if (ua.indexOf(\"Trident\") > -1) {\n var re = new RegExp(\"rv:([0-9]{2,2}[\\.0-9]{0,})\");\n if (re.exec(ua) !== null) {\n rv = parseFloat(RegExp.$1);\n }\n }\n\n return rv >= 8;\n }", "function isInternetExplorer() {\n if (typeof navigator === 'undefined') {\n return false;\n }\n\n var rv = -1; // Return value assumes failure.\n var ua = navigator.userAgent;\n if (navigator.appName === 'Microsoft Internet Explorer') {\n var re = new RegExp(\"MSIE ([0-9]{1,}[\\.0-9]{0,})\");\n if (re.exec(ua) != null) rv = parseFloat(RegExp.$1);\n }\n // IE > 11\n else if (ua.indexOf(\"Trident\") > -1) {\n var re = new RegExp(\"rv:([0-9]{2,2}[\\.0-9]{0,})\");\n if (re.exec(ua) !== null) {\n rv = parseFloat(RegExp.$1);\n }\n }\n\n return rv >= 8;\n }", "function IEVersion () {\n\t\tvar rv = false;\n\t\tif (navigator.appName == 'Microsoft Internet Explorer') {\n\t\t\tvar ua = navigator.userAgent, re = new RegExp(\"MSIE ([0-9]{1,}[\\.0-9]{0,})\");\n\t\t\tif (re.exec(ua) != null) {\n\t\t\t\tif(parseFloat( RegExp.$1 ) >= 5 && parseFloat( RegExp.$1 ) < 8) {\n\t\t\t\t\trv = true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn rv;\n\t}", "function isInternetExplorer() {\n\t if (typeof navigator === 'undefined') {\n\t return false;\n\t }\n\n\t var rv = -1; // Return value assumes failure.\n\t var ua = navigator.userAgent;\n\t if (navigator.appName === 'Microsoft Internet Explorer') {\n\t var re = new RegExp(\"MSIE ([0-9]{1,}[\\.0-9]{0,})\");\n\t if (re.exec(ua) != null)\n\t rv = parseFloat(RegExp.$1);\n\t }\n\t // IE > 11\n\t else if (ua.indexOf(\"Trident\") > -1) {\n\t var re = new RegExp(\"rv:([0-9]{2,2}[\\.0-9]{0,})\");\n\t if (re.exec(ua) !== null) {\n\t rv = parseFloat(RegExp.$1);\n\t }\n\t }\n\n\t return rv >= 8;\n\t }", "function isInternetExplorer() {\n\t if (typeof navigator === 'undefined') {\n\t return false;\n\t }\n\n\t var rv = -1; // Return value assumes failure.\n\t var ua = navigator.userAgent;\n\t if (navigator.appName === 'Microsoft Internet Explorer') {\n\t var re = new RegExp(\"MSIE ([0-9]{1,}[\\.0-9]{0,})\");\n\t if (re.exec(ua) != null)\n\t rv = parseFloat(RegExp.$1);\n\t }\n\t // IE > 11\n\t else if (ua.indexOf(\"Trident\") > -1) {\n\t var re = new RegExp(\"rv:([0-9]{2,2}[\\.0-9]{0,})\");\n\t if (re.exec(ua) !== null) {\n\t rv = parseFloat(RegExp.$1);\n\t }\n\t }\n\n\t return rv >= 8;\n\t }", "function vpb_IE_detected()\n{\n var ua = window.navigator.userAgent;\n var old_ie = ua.indexOf('MSIE ');\n var new_ie = ua.indexOf('Trident/');\n\n if ((old_ie > -1) || (new_ie > -1)) \n\t{\n return true;\n } else {\n\t\treturn false;\n\t}\n}", "function msieversion() \n{\n\ttry{\n\t var ua = window.navigator.userAgent;\n\t var msie = ua.indexOf(\"MSIE \");\n\t\n\t if (msie > 0) // Check for Internet Explorer\n\t {\n\t \tvar version = parseInt(ua.substring(msie + 5, ua.indexOf(\".\", msie)));\n\t \tif (version < 9) {\n\t \t\treturn true;\n\t \t}\n\t }\n\t} catch (err) {\n\t\t//ignore any error\n\t}\n return false;\n}", "function isIE() {\n\tif (navigator.appName.indexOf(\"Explorer\")>0)\n\t\treturn true;\n\telse\n\t\treturn false;\n}", "function ie() {\n var ua = window.navigator.userAgent;\n var msie = ua.indexOf(\"MSIE \");\n if (msie > 0 || !!navigator.userAgent.match(/Trident.*rv\\:11\\./))\n return true;\n else\n return false;\n}", "function uTestBrowserIE()\n{\n return (uBrowserID == uIE);\n}", "function isIE() {\n return (navigator.appName == \"Microsoft Internet Explorer\");\n}", "function isInternetExplorerBefore(version) {\n var iematch = /MSIE ([0-9]+)/g.exec(window.navigator.userAgent);\n\n return iematch ? +iematch[1] < version : false;\n}", "function is_IE()\n{\n\tif (navigator.userAgent.indexOf(\"MSIE\")>-1) return true;\n\treturn false\n}", "function isIE() {\n return jQuery.browser.msie;\n }", "IE ():boolean {\n\n\t\treturn this.agent.match(/Trident/i) ? true : false;\n\t}", "function isIE8() {\n if (window.attachEvent && !window.addEventListener) {\n return true;\n } else {\n return false;\n }\n }", "function checkVersion() {\n\t\tvar msg = \"You're not using Internet Explorer.\";\n\t\tvar ver = getInternetExplorerVersion();\n\t\tif ( ver > -1 ) {\n\t\t\tif ( ver >= 8.0 ) {\n\t\t\t\tmsg = \"You're using a recent copy of Internet Explorer.\"\n\t\t\t}\n\t\t\telse {\n\t\t\t\tmsg = \"You should upgrade your copy of Internet Explorer.\";\n\t\t\t}\n\t\t}\n\t\tconsole.log( msg );\n\t}", "function isIE() {\n\t//Create var for userAgent\n\tuserAg = navigator.userAgent;\n\t//Create var to store return of index of strings\n\tvar is_ie = userAg.indexOf(\"MSIE \") > -1 || userAg.indexOf(\"Trident/\") > -1 || userAg.indexOf(\"Edge\") > -1;\n\t//return result\n\treturn is_ie;\n}", "function isIE9OrLower() {\n\t\tvar userAgent = navigator.userAgent.toLowerCase();\n\t\treturn (userAgent.indexOf('msie') != -1) ? parseInt(userAgent.split('msie')[1]) < 10 : false;\n\t}", "function iedetect(v) {\n\n\t var r = RegExp('msie' + (!isNaN(v) ? ('\\\\s' + v) : ''), 'i');\n\t\treturn r.test(navigator.userAgent);\n\t\t\t\n\t}", "function is_IE() {\n return (window.navigator.userAgent.match(/MSIE|Trident/) !== null);\n}", "function isLessThanIe9() {\n var b = document.createElement('b');\n b.innerHTML = '<!--[if IE lte 9]><i></i><![endif]-->';\n return b.getElementsByTagName('i').length === 1;\n }", "function detectIE() {\r\n\tvar ua = window.navigator.userAgent;\r\n\tvar msie = ua.indexOf('MSIE ');\r\n\tif (msie > 0) {\r\n\t\treturn parseInt(ua.substring(msie + 5, ua.indexOf('.', msie)), 10);\r\n\t}\r\n\tvar trident = ua.indexOf('Trident/');\r\n\tif (trident > 0) {\r\n\t\tvar rv = ua.indexOf('rv:');\r\n\t\treturn parseInt(ua.substring(rv + 3, ua.indexOf('.', rv)), 10);\r\n\t}\r\n\tvar edge = ua.indexOf('Edge/');\r\n\tif (edge > 0) {\r\n\t\treturn parseInt(ua.substring(edge + 5, ua.indexOf('.', edge)), 10);\r\n\t}\r\n\treturn false;\r\n}", "function isIE () {\n var ms_ie = false;\n var ua = window.navigator.userAgent;\n var old_ie = ua.indexOf('MSIE ');\n var new_ie = ua.indexOf('Trident/');\n\n if ((old_ie > -1) || (new_ie > -1)) {\n ms_ie = true;\n }\n\n return ms_ie ;\n}", "function isBrowserIE () {\n var ua = window.navigator.userAgent\n var msie = ua.indexOf('MSIE ')\n var trident = ua.indexOf('Trident/')\n var edge = ua.indexOf('Edge/')\n if (msie > 0 || trident > 0 || edge > 0) {\n return true\n }\n }", "function isIE() {\n\t\t\treturn typeof attachEvent !== \"undefined\" && typeof addEventListener === \"undefined\";\n\t\t}", "function detectIE() {\n\tvar isie = false;\n\tvar ua = window.navigator.userAgent;\n\tvar msie = ua.indexOf('MSIE ');\n\tvar trident = ua.indexOf('Trident/');\n\tvar edge = ua.indexOf('Edge/');\n\tif (msie > 0) {\n\t\t// IE 10 or older\n\t\tisie = true;\n\t\tvar ieVer = parseInt(ua.substring(msie + 5, ua.indexOf('.', msie)), 10);\n\t} else if (trident > 0) {\n\t\t// IE 11\n\t\tisie = true;\n\t\tvar rv = ua.indexOf('rv:');\n\t\tvar ieVer = parseInt(ua.substring(rv + 3, ua.indexOf('.', rv)), 10);\n\t} else if (edge > 0) {\n\t\t// Edge (IE 12+)\n\t\tisie = true;\n\t\tvar ieVer = parseInt(ua.substring(edge + 5, ua.indexOf('.', edge)), 10);\n\t}\n\tif (isie == true) {\n\t\t$('html').addClass('ie');\n\t\tif (ieVer == 11) $('html').addClass('ie11');\n\t}\n}", "function isIE()\n{\n return document.all;\n}", "function isIe678 () {\n\t\tvar IE = eval('\"v\"==\"\\v\"');\n\t\treturn \tIE;\n\t}", "function isIE() { //ie?\n if (!!window.ActiveXObject || \"ActiveXObject\" in window)\n return true;\n else\n return false;\n}", "function isIE() {\n var rv = -1; // Return value assumes failure.\n var ua = window.navigator.userAgent;\n if (ua.indexOf('MSIE ') > 0) {\n // IE 10 or older => return version number\n rv = parseInt(ua.substring(ua.indexOf('MSIE ') + 5, ua.indexOf('.', ua.indexOf('MSIE '))), 10);\n } else if (ua.indexOf('Trident/') > 0) {\n // IE 11 => return version number\n var rv = ua.indexOf('rv:');\n rv = parseInt(ua.substring(rv + 3, ua.indexOf('.', rv)), 10);\n } else if (ua.indexOf('Edge/') > 0) {\n // IE 12 => return version number\n rv = parseInt(ua.substring(ua.indexOf('Edge/') + 5, ua.indexOf('.', ua.indexOf('Edge/'))), 10);\n }\n return rv > -1;\n}", "function podPress_is_modern_ie() {\r\n\t\tif ( -1 != navigator.userAgent.search(/Trident\\/([0-9]+\\.[0-9]+)/gi) && true == podPress_is_v1_gtoreq_v2(RegExp.$1, '5') && -1 != navigator.userAgent.search(/MSIE\\s([0-9]+\\.[0-9]+)/gi) && true == podPress_is_v1_gtoreq_v2(RegExp.$1, '9') ) {\r\n\t\t\treturn true;\r\n\t\t} else {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}", "function isIE() {\n let ua = navigator.userAgent;\n /* MSIE used to detect old browsers and Trident used to newer ones*/\n return ua.indexOf(\"MSIE \") > -1 || ua.indexOf(\"Trident/\") > -1;\n}", "function detectIE() {\n if (navigator.userAgent.indexOf(\"MSIE\") >= 0) {\n window.location = \"/static/badbrowser.html\";\n }\n return false;\n}", "function detectIE() {\n\t\t\t\t var ua = window.navigator.userAgent;\n\n\t\t\t\t var msie = ua.indexOf('MSIE ');\n\t\t\t\t if (msie > 0) {\n\t\t\t\t\t// IE 10 or older => return version number\n\t\t\t\t\treturn parseInt(ua.substring(msie + 5, ua.indexOf('.', msie)), 10);\n\t\t\t\t }\n\n\t\t\t\t var trident = ua.indexOf('Trident/');\n\t\t\t\t if (trident > 0) {\n\t\t\t\t\t// IE 11 => return version number\n\t\t\t\t\tvar rv = ua.indexOf('rv:');\n\t\t\t\t\treturn parseInt(ua.substring(rv + 3, ua.indexOf('.', rv)), 10);\n\t\t\t\t }\n\n\t\t\t\t var edge = ua.indexOf('Edge/');\n\t\t\t\t if (edge > 0) {\n\t\t\t\t\t// Edge (IE 12+) => return version number\n\t\t\t\t\treturn parseInt(ua.substring(edge + 5, ua.indexOf('.', edge)), 10);\n\t\t\t\t }\n\n\t\t\t\t // other browser\n\t\t\t\t return false;\n\t\t\t}", "function msieversion() {\r\n var ua = window.navigator.userAgent;\r\n var msie = ua.indexOf(\"MSIE \");\r\n if (msie > 0 || !!navigator.userAgent.match(/Trident.*rv\\:11\\./)) {\r\n var ieVersion = parseInt(ua.substring(msie + 5, ua.indexOf(\".\", msie)));\r\n if (ieVersion === 9) {\r\n $('body').addClass('no-js ie' + ieVersion);\r\n }\r\n return ieVersion;\r\n } else {\r\n return false;\r\n }\r\n }", "function detectIE() {\n var ua = window.navigator.userAgent;\n\n var msie = ua.indexOf('MSIE ');\n if (msie > 0) {\n // IE 10 or older => return version number\n return parseInt(ua.substring(msie + 5, ua.indexOf('.', msie)), 10);\n }\n\n var trident = ua.indexOf('Trident/');\n if (trident > 0) {\n // IE 11 => return version number\n var rv = ua.indexOf('rv:');\n return parseInt(ua.substring(rv + 3, ua.indexOf('.', rv)), 10);\n }\n\n var edge = ua.indexOf('Edge/');\n if (edge > 0) {\n // IE 12 (aka Edge) => return version number\n return parseInt(ua.substring(edge + 5, ua.indexOf('.', edge)), 10);\n }\n\n // other browser\n return false;\n }", "function msieversion() {\n var ua = window.navigator.userAgent;\n var msie = ua.indexOf(\"MSIE \");\n if (msie > 0 || !!navigator.userAgent.match(/Trident.*rv\\:11\\./)) { \n var ieVersion = parseInt(ua.substring(msie + 5, ua.indexOf(\".\", msie)));\n if (ieVersion === 9) {$('body').addClass('no-js ie' + ieVersion);}\n return ieVersion;\n }\n else { return false; }\n }", "function msieversion() {\n var ua = window.navigator.userAgent;\n var msie = ua.indexOf(\"MSIE \");\n if (msie > 0 || !!navigator.userAgent.match(/Trident.*rv\\:11\\./)) { \n var ieVersion = parseInt(ua.substring(msie + 5, ua.indexOf(\".\", msie)));\n if (ieVersion === 9) {$('body').addClass('no-js ie' + ieVersion);}\n return ieVersion;\n }\n else { return false; }\n }", "function detectIE() {\n\tvar ua = window.navigator.userAgent;\n\n\tvar msie = ua.indexOf('MSIE ');\n\tif (msie > 0) {\n\t\t// IE 10 or older => return version number\n\t\treturn parseInt(ua.substring(msie + 5, ua.indexOf('.', msie)), 10);\n\t}\n\n\tvar trident = ua.indexOf('Trident/');\n\tif (trident > 0) {\n\t\t// IE 11 => return version number\n\t\tvar rv = ua.indexOf('rv:');\n\t\treturn parseInt(ua.substring(rv + 3, ua.indexOf('.', rv)), 10);\n\t}\n\n\tvar edge = ua.indexOf('Edge/');\n\tif (edge > 0) {\n\t // IE 12 => return version number\n\t return parseInt(ua.substring(edge + 5, ua.indexOf('.', edge)), 10);\n\t}\n\n\t// other browser\n\treturn false;\n}", "function isIE(e,i){var t,n=\"IE\",m=document.createElement(\"B\"),o=document.documentElement;return e&&(n+=\" \"+e,i&&(n=i+\" \"+n)),m.innerHTML=\"<!--[if \"+n+']><b id=\"iecctest\"></b><![endif]-->',o.appendChild(m),t=!!document.getElementById(\"iecctest\"),o.removeChild(m),t}", "function isIE() {\n ua = navigator.userAgent;\n /* MSIE used to detect old browsers and Trident used to newer ones*/\n var is_ie = ua.indexOf(\"MSIE \") > -1 || ua.indexOf(\"Trident/\") > -1;\n\n return is_ie;\n}", "function detectIE() {\n var ua = window.navigator.userAgent;\n\n var msie = ua.indexOf('MSIE ');\n if (msie > 0) {\n // IE 10 or older => return version number\n return true;\n }\n\n var trident = ua.indexOf('Trident/');\n if (trident > 0) {\n // IE 11 => return version number\n var rv = ua.indexOf('rv:');\n return true;\n }\n\n var edge = ua.indexOf('Edge/');\n if (edge > 0) {\n // Edge (IE 12+) => return version number\n return true;\n }\n\n // other browser\n return false;\n }", "function isMsieSevenOrNewer() {\n\t\tif (typeof window.XMLHttpRequest !== 'undefined') {\n\t\t\treturn true;\n\t\t}\n\n\t\treturn false;\n\t}", "function detectIE() {\n var ua = window.navigator.userAgent;\n\n var msie = ua.indexOf('MSIE ');\n if (msie > 0) {\n // IE 10 or older => return version number\n return parseInt(ua.substring(msie + 5, ua.indexOf('.', msie)), 10);\n }\n\n var trident = ua.indexOf('Trident/');\n if (trident > 0) {\n // IE 11 => return version number\n var rv = ua.indexOf('rv:');\n return parseInt(ua.substring(rv + 3, ua.indexOf('.', rv)), 10);\n }\n\n // var edge = ua.indexOf('Edge/');\n // if (edge > 0) {\n // // Edge (IE 12+) => return version number\n // return parseInt(ua.substring(edge + 5, ua.indexOf('.', edge)), 10);\n // }\n\n // other browser\n return false;\n}", "function detectIE() {\n var ua = window.navigator.userAgent;\n var msie = ua.indexOf('MSIE ');\n\n\n var msie11 = ua.indexOf('rv:11');\n if (msie11 > 0) {\n // IE 10 or older => return version number\n return parseInt(ua.substring(msie11 + 3, ua.indexOf('.', msie11) + 2), 10);\n }\n\n if (msie > 0) {\n // IE 10 or older => return version number\n return parseInt(ua.substring(msie + 5, ua.indexOf('.', msie)), 10);\n }\n\n var trident = ua.indexOf('Trident/');\n if (trident > 0) {// IE 11 => return version number\n var rv = ua.indexOf('rv:');\n return parseInt(ua.substring(rv + 3, ua.indexOf('.', rv)), 10);\n }\n\n var edge = ua.indexOf('Edge/');\n if (edge > 0) {// Edge (IE 12+) => return version number\n return parseInt(ua.substring(edge + 5, ua.indexOf('.', edge)), 10);\n }// other browser\n return false;\n }", "function detectIE() {\n var ua = window.navigator.userAgent;\n\n var msie = ua.indexOf('MSIE ');\n if (msie > 0) {\n // IE 10 or older => return version number\n return parseInt(ua.substring(msie + 5, ua.indexOf('.', msie)), 10);\n }\n\n var trident = ua.indexOf('Trident/');\n if (trident > 0) {\n // IE 11 => return version number\n var rv = ua.indexOf('rv:');\n return parseInt(ua.substring(rv + 3, ua.indexOf('.', rv)), 10);\n }\n\n var edge = ua.indexOf('Edge/');\n if (edge > 0) {\n // IE 12 => return version number\n return parseInt(ua.substring(edge + 5, ua.indexOf('.', edge)), 10);\n }\n\n // other browser\n return false;\n}", "function browserIsIE() {\n var ua = window.navigator.userAgent;\n\n var msie = ua.indexOf('MSIE ');\n if (msie > 0) {\n // IE 10 or older => return version number\n return parseInt(ua.substring(msie + 5, ua.indexOf('.', msie)), 10);\n }\n\n var trident = ua.indexOf('Trident/');\n if (trident > 0) {\n // IE 11 => return version number\n var rv = ua.indexOf('rv:');\n return parseInt(ua.substring(rv + 3, ua.indexOf('.', rv)), 10);\n }\n\n var edge = ua.indexOf('Edge/');\n if (edge > 0) {\n // IE 12 => return version number\n return parseInt(ua.substring(edge + 5, ua.indexOf('.', edge)), 10);\n }\n\n // other browser\n return false;\n}", "function detectIE() {\n var ua = window.navigator.userAgent;\n\n var msie = ua.indexOf('MSIE ');\n if (msie > 0) {\n // IE 10 or older => return version number\n return parseInt(ua.substring(msie + 5, ua.indexOf('.', msie)), 10);\n }\n\n var trident = ua.indexOf('Trident/');\n if (trident > 0) {\n // IE 11 => return version number\n var rv = ua.indexOf('rv:');\n return parseInt(ua.substring(rv + 3, ua.indexOf('.', rv)), 10);\n }\n\n var edge = ua.indexOf('Edge/');\n if (edge > 0) {\n // IE 12 (aka Edge) => return version number\n return parseInt(ua.substring(edge + 5, ua.indexOf('.', edge)), 10);\n }\n\n // other browser\n return false;\n}", "function detectIE() {\n\tvar ua = navigator.userAgent;\n\tvar msie = ua.indexOf('MSIE ');\n\tif (msie > 0) {\n\t\t// IE 10 or older => return version number\n\t\treturn parseInt(ua.substring(msie + 5, ua.indexOf('.', msie)), 10);\n\t}\n\n\tvar trident = ua.indexOf('Trident/');\n\tif (trident > 0) {// IE 11 => return version number\n\t\tvar rv = ua.lastIndexOf('rv:');\n\t\treturn parseInt(ua.substring(rv + 3, ua.indexOf('.', rv)), 10);\n\t}\n\n\tvar edge = ua.indexOf('Edge/');\n\tif (edge > 0) {// Edge (IE 12+) => return version number\n\t\treturn parseInt(ua.substring(edge + 5, ua.indexOf('.', edge)), 10);\n\t}// other browser\n\treturn false;\n}", "isIE() {\n return Boolean(\n (Object.getOwnPropertyDescriptor && Object.getOwnPropertyDescriptor(window, 'ActiveXObject')) ||\n 'ActiveXObject' in window\n )\n }", "function msieversion () {\n var ua = window.navigator.userAgent\n\n var msie = ua.indexOf('MSIE')\n\n if (msie > 0 || !!navigator.userAgent.match(/Trident.*rv\\:11\\./)) // If Internet Explorer, return version number\n {\n return true\n }\n\n return false\n}", "function detectIE() {\n var ua = window.navigator.userAgent;\n\n var msie = ua.indexOf('MSIE ');\n if (msie > 0) {\n // IE 10 or older => return version number\n return parseInt(ua.substring(msie + 5, ua.indexOf('.', msie)), 10);\n }\n\n var trident = ua.indexOf('Trident/');\n if (trident > 0) {\n // IE 11 => return version number\n var rv = ua.indexOf('rv:');\n return parseInt(ua.substring(rv + 3, ua.indexOf('.', rv)), 10);\n }\n\n var edge = ua.indexOf('Edge/');\n if (edge > 0) {\n // Edge (IE 12+) => return version number\n return parseInt(ua.substring(edge + 5, ua.indexOf('.', edge)), 10);\n }\n\n // other browser\n return false;\n}", "function isIE( version, comparison ){\n\t\t var $div = jQuery('<div style=\"display:none;\"/>').appendTo(jQuery('body'));\n\t\t $div.html('<!--[if '+(comparison||'')+' IE '+(version||'')+']><a>&nbsp;</a><![endif]-->');\n\t\t var ieTest = $div.find('a').length;\n\t\t $div.remove();\n\t\t return ieTest;\n\t\t}", "function isIE( version, comparison ){\n\t\t var $div = jQuery('<div style=\"display:none;\"/>').appendTo(jQuery('body'));\n\t\t $div.html('<!--[if '+(comparison||'')+' IE '+(version||'')+']><a>&nbsp;</a><![endif]-->');\n\t\t var ieTest = $div.find('a').length;\n\t\t $div.remove();\n\t\t return ieTest;\n\t\t}", "function isIE( version, comparison ){\n\t\t var $div = jQuery('<div style=\"display:none;\"/>').appendTo(jQuery('body'));\n\t\t $div.html('<!--[if '+(comparison||'')+' IE '+(version||'')+']><a>&nbsp;</a><![endif]-->');\n\t\t var ieTest = $div.find('a').length;\n\t\t $div.remove();\n\t\t return ieTest;\n\t\t}", "function isIE( version, comparison ){\n\t\t var $div = jQuery('<div style=\"display:none;\"/>').appendTo(jQuery('body'));\n\t\t $div.html('<!--[if '+(comparison||'')+' IE '+(version||'')+']><a>&nbsp;</a><![endif]-->');\n\t\t var ieTest = $div.find('a').length;\n\t\t $div.remove();\n\t\t return ieTest;\n\t\t}", "function detectIE() {\n var ua = window.navigator.userAgent;\n\n var msie = ua.indexOf(\"MSIE \");\n if (msie > 0) {\n // IE 10 or older => return version number\n return parseInt(ua.substring(msie + 5, ua.indexOf(\".\", msie)), 10);\n }\n\n var trident = ua.indexOf(\"Trident/\");\n if (trident > 0) {\n // IE 11 => return version number\n var rv = ua.indexOf(\"rv:\");\n return parseInt(ua.substring(rv + 3, ua.indexOf(\".\", rv)), 10);\n }\n\n var edge = ua.indexOf(\"Edge/\");\n if (edge > 0) {\n // Edge (IE 12+) => return version number\n return parseInt(ua.substring(edge + 5, ua.indexOf(\".\", edge)), 10);\n }\n\n // other browser\n return false;\n}", "function detectIE() {\n var ua = window.navigator.userAgent;\n\n var msie = ua.indexOf('MSIE ');\n if (msie > 0) {\n // IE 10 or older => return version number\n return parseInt(ua.substring(msie + 5, ua.indexOf('.', msie)), 10);\n }\n\n var trident = ua.indexOf('Trident/');\n if (trident > 0) {\n // IE 11 => return version number\n var rv = ua.indexOf('rv:');\n return parseInt(ua.substring(rv + 3, ua.indexOf('.', rv)), 10);\n }\n\n var edge = ua.indexOf('Edge/');\n if (edge > 0) {\n // Edge (IE 12+) => return version number\n return parseInt(ua.substring(edge + 5, ua.indexOf('.', edge)), 10);\n }\n\n // other browser\n return false;\n}", "function detectIE() {\n var ua = window.navigator.userAgent;\n\n var msie = ua.indexOf('MSIE ');\n if (msie > 0) {\n // IE 10 or older => return version number\n return parseInt(ua.substring(msie + 5, ua.indexOf('.', msie)), 10);\n }\n\n var trident = ua.indexOf('Trident/');\n if (trident > 0) {\n // IE 11 => return version number\n var rv = ua.indexOf('rv:');\n return parseInt(ua.substring(rv + 3, ua.indexOf('.', rv)), 10);\n }\n\n var edge = ua.indexOf('Edge/');\n if (edge > 0) {\n // Edge (IE 12+) => return version number\n return parseInt(ua.substring(edge + 5, ua.indexOf('.', edge)), 10);\n }\n\n // other browser\n return false;\n}", "function detectIE() {\n var ua = window.navigator.userAgent;\n\n var msie = ua.indexOf('MSIE ');\n if (msie > 0) {\n // IE 10 or older => return version number\n return parseInt(ua.substring(msie + 5, ua.indexOf('.', msie)), 10);\n }\n\n var trident = ua.indexOf('Trident/');\n if (trident > 0) {\n // IE 11 => return version number\n var rv = ua.indexOf('rv:');\n return parseInt(ua.substring(rv + 3, ua.indexOf('.', rv)), 10);\n }\n\n var edge = ua.indexOf('Edge/');\n if (edge > 0) {\n // Edge (IE 12+) => return version number\n return parseInt(ua.substring(edge + 5, ua.indexOf('.', edge)), 10);\n }\n\n // other browser\n return false;\n}", "function detectIE() {\r\n var ua = window.navigator.userAgent;\r\n\r\n // Test values; Uncomment to check result …\r\n\r\n // IE 10\r\n // ua = 'Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.2; Trident/6.0)';\r\n\r\n // IE 11\r\n // ua = 'Mozilla/5.0 (Windows NT 6.3; Trident/7.0; rv:11.0) like Gecko';\r\n\r\n // Edge 12 (Spartan)\r\n // ua = 'Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/39.0.2171.71 Safari/537.36 Edge/12.0';\r\n\r\n // Edge 13\r\n // ua = 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2486.0 Safari/537.36 Edge/13.10586';\r\n\r\n var msie = ua.indexOf('MSIE ');\r\n if (msie > 0) {\r\n // IE 10 or older => return version number\r\n return parseInt(ua.substring(msie + 5, ua.indexOf('.', msie)), 10);\r\n }\r\n\r\n var trident = ua.indexOf('Trident/');\r\n if (trident > 0) {\r\n // IE 11 => return version number\r\n var rv = ua.indexOf('rv:');\r\n return parseInt(ua.substring(rv + 3, ua.indexOf('.', rv)), 10);\r\n }\r\n\r\n var edge = ua.indexOf('Edge/');\r\n if (edge > 0) {\r\n // Edge (IE 12+) => return version number\r\n return parseInt(ua.substring(edge + 5, ua.indexOf('.', edge)), 10);\r\n }\r\n\r\n // other browser\r\n return false;\r\n }", "function isIE(userAgent) {\n userAgent = userAgent || navigator.userAgent;\n return userAgent.indexOf(\"MSIE \") > -1 || userAgent.indexOf(\"Trident/\") > -1 || userAgent.indexOf(\"Edge/\") > -1;\n}", "function ie() {\n\n var undef,\n v = 3,\n div = document.createElement('div'),\n all = div.getElementsByTagName('i');\n\n while (\n div.innerHTML = '<!--[if gt IE ' + (++v) + ']><i></i><![endif]-->',\n all[0]\n );\n\n return v > 4 ? v : undef;\n\n}", "function isIE() {\n return Prototype.Browser.IE;\n}", "function preIE10Check() {\n if (window.attachEvent && !window.navigator.msPointerEnabled) {\n return true;\n } else {\n return false;\n }\n }", "function IE(e) {\n if (navigator.appName == \"Microsoft Internet Explorer\" && (event.button == \"2\" || event.button == \"3\")) {\n return false;\n }\n}", "function autoComplete_func_isIE() { // Private method\n return autoComplete_func_isIE5() || autoComplete_func_isIE6() || autoComplete_func_isIE7() ;\n}", "function isMsieSevenOrNewer() {\n if (wind.XMLHttpRequest !== undefined) {\n return true;\n }\n\n return false;\n }", "function alertBadBrowser(){\n var isIE = /*@cc_on!@*/false || !!document.documentMode;\n var isEdge = !isIE && !!window.StyleMedia;\n\n if(isIE||isEdge){\n alert(\"Your browser may cause display problems. You should obtain a modern webkit browser. While some versions of Microsoft Edge work, it can be buggy. Chrome, Firefox, Safari, and Opera all work consistently. Internet Explorer is not supported.\");\n }\n}", "function notie() {\n\t\tif ( - [1, ]) {\n\t\t\talert('这货不是ie')\n\t\t}\n\t}", "function checkIeVersion() {\n var ie = gees.tools.internetExplorerVersion();\n if (ie == 7 || ie == 8 || ie == 9) {\n gees.dom.get('name_field').value = 'name';\n gees.dom.get('text_field').value = 'description';\n }\n}" ]
[ "0.8209785", "0.7952113", "0.7779973", "0.7779973", "0.76790655", "0.76722354", "0.7621934", "0.76195014", "0.7618983", "0.7618983", "0.7618805", "0.7611331", "0.7579891", "0.7526922", "0.7499647", "0.7482198", "0.74821013", "0.7475237", "0.7475237", "0.7475237", "0.7475237", "0.7475237", "0.7475237", "0.7461863", "0.74601996", "0.7435999", "0.7435999", "0.738482", "0.7357658", "0.7349865", "0.7348692", "0.7323509", "0.7312837", "0.7309005", "0.72396123", "0.72374004", "0.72177076", "0.71970475", "0.7193053", "0.7152698", "0.714838", "0.7140309", "0.710487", "0.7093298", "0.7067522", "0.70610523", "0.70533764", "0.69823444", "0.6970156", "0.6949804", "0.69008064", "0.6900243", "0.6896983", "0.6890349", "0.68801206", "0.68781394", "0.6873751", "0.68234825", "0.6812241", "0.6783441", "0.6783441", "0.6781478", "0.67713827", "0.6768603", "0.67682713", "0.6755709", "0.67536074", "0.6749299", "0.67338634", "0.6719256", "0.67024714", "0.67020434", "0.66899174", "0.6682491", "0.6681827", "0.6678833", "0.6678833", "0.6678833", "0.6678833", "0.66734034", "0.666689", "0.666689", "0.666689", "0.66560036", "0.66550696", "0.66203314", "0.6620277", "0.66002625", "0.65959764", "0.6565711", "0.65538037", "0.65463704", "0.6542034", "0.65347064" ]
0.69279826
55
When User Tap the Back button
function chatBackButton(e) { if (e) e.preventDefault(); client_configuration['chat']['chat_user'] = undefined; if ( typeof cordova != 'undefined') cordova.plugins.Keyboard.close(); //ChatPage.keyboardDidHide; Draw.switchBack(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function onBack() {\n resetPageState();\n }", "function onBackKeyDown() {\n\t//alert(\"Back Pressed\");\n\tgo_back();\n}", "function onBackKeyDown() {\n \tif($.mobile.activePage.is(\"#start\")) {\n \t\tnavigator.app.exitApp(); // Exit app if current page is start Page\n \t} else {\n \t\tnavigator.app.backHistory(); // Go back in history in any other case\n \t}\n }", "function onBackKeyDown() {\n goBack();\n}", "function onBackButton() {\r\n\t\t\tnavigator.app.exitApp();\r\n\t\t}", "function OnAndroidBackButton_Click( e )\r\n{\r\n Back() ;\r\n}", "handleBackAction() {\n this._triggerOnBack();\n }", "_backPress(event) {\n this.props.navigator.pop()\n }", "function onBackKey(){\n\tif(app.session.data.extra_prev_state > 0){\n\t\tback_to_pre();\n\t}else{\n\t\thide_all_pages();\n\t\tif(app.session.data.cstate > 0){\n\t\t\tvar callback = app.session.data.state_back_callback[app.session.data.cstate];\n\t\t\tif(callback !== null)\n\t\t\t\tcallback();\n\t\t}\n\t\tstop_processing();\n\t}\n}", "function onBackKeyDown() {\n\t// Handle the back button\n\tconsole.log('device.onBackKeyDown');\n\twindow.history.back();\n}", "handleBackButton() {\n // ToastAndroid.show('Back button is pressed', ToastAndroid.SHORT);\n // return false;\n }", "handleBackButtonClick() {\n console.log(\"Dashboard\", \"Device Back Button Pressed\");\n return false;\n }", "function goBack() {\n\t\t\t$window.history.back();\n\t\t}", "function onBackKeyDown(){\n //if($.mobile.activePage.attr('id') == 'home'){ // PARA AÑADIR MAS USAR SEPARADORES \"||\"\n // navigator.notification.confirm(\n // '¿Salir de la aplicación?', \n // function(button) {\n // if (button == 2) {\n // navigator.app.exitApp();\n // }\n // }, \n // 'Salir', 'No,Si');return false;\n // }\n // else { //else if ($.mobile.activePage.attr('id') == 'charlas'){\n //$.mobile.changePage('#home');\n //}else\n\t\tnavigator.app.exitApp();\n // }\n }", "function goBack(){\n // *Navigating back:\n window.history.back();\n }", "function onBackButton() {\r\n\tnavigator.app.exitApp();\r\n}", "function goBack() { $window.history.back(); }", "function OnBtnBack_Click( e )\r\n{\r\n Back() ;\r\n}", "function OnBtnBack_Click( e )\r\n{\r\n Back() ;\r\n}", "function OnBtnBack_Click( e )\r\n{\r\n Back() ;\r\n}", "function OnBtnBack_Click( e )\r\n{\r\n Back() ;\r\n}", "function OnBtnBack_Click( e )\r\n{\r\n Back() ;\r\n}", "function OnBtnBack_Click( e )\r\n{\r\n Back() ;\r\n}", "function goBack() {\n $ionicHistory.goBack();\n }", "function onHardwareBackButton(e) {\n var backView = $ionicHistory.backView();\n if (backView) {\n // there is a back view, go to it\n backView.go();\n } else {\n // there is no back view, so close the app instead\n ionic.Platform.exitApp();\n }\n e.preventDefault();\n return false;\n }", "function onHardwareBackButton(e) {\n var backView = $ionicHistory.backView();\n if (backView) {\n // there is a back view, go to it\n backView.go();\n } else {\n // there is no back view, so close the app instead\n ionic.Platform.exitApp();\n }\n e.preventDefault();\n return false;\n }", "function back () {\n\t\n\t window.history.back();\n\t \n}", "function onBackKeyDown() {\n window.location.href = \"index.html\";\n}", "function onBackKeyDown() {\r\n}", "onBackClicked_() {\n this.fire('cancel');\n }", "onBackButtonClick_() {\n this.userActed('os-trial-back');\n }", "_onBack () {\n this.props.navigator.pop();\n }", "function pageBackAction() {\n if (typeof(navigator) != 'undefined' && typeof(navigator.app) != 'undefined' && typeof(navigator.app.backHistory) == 'function')\n navigator.app.backHistory();\n else\n history.go(-1);\n}", "function goBack() {\n window.history.back();\n }", "function goBack() {\n window.history.back();\n }", "function goBack() {\n window.history.back();\n }", "function goBack() {\n window.history.back();\n }", "_onBack () { \n this.props.navigator.pop();\n }", "function back(){\n\twindow.history.back();\n}", "function backAction(e) {\r\n\r\n\tif(e != null)\r\n\t\te.preventDefault();\r\n\r\n\tif(History.size() == 0) {\r\n\t\tnavigator.app.exitApp();\r\n\t} else {//Hay historia (Vaciar siempre la pila antes de cambiar)\r\n\t\tif(History.topPage() == '#index') {\r\n\t\t\t//Como es index, vacio la pila\r\n\t\t\tHistory.clear();\r\n\t\t\tbrowse($.mobile.path.get() + \"../index/index.html\", \"none\");\r\n\r\n\t\t} else if(History.topPage() == '#typeList') {\r\n\t\t\tHistory.pop();\r\n\t\t\tbrowse($.mobile.path.get() + \"../typeList/typeList.html\", \"none\");\r\n\r\n\t\t} else if(History.topPage() == '#settings') {\r\n\t\t\tHistory.pop();\r\n\t\t\tbrowse($.mobile.path.get() + \"../settings/settings.html\", \"none\");\r\n\r\n\t\t}\r\n\t}\r\n}", "function back(){\r\n window.history.back();\r\n}", "function onHardwareBackButton(e) {\n var backView = $ionicHistory.backView();\n if (!backView) {\n // there is no back view, so close the app instead\n ionic.Platform.exitApp();\n } else {\n var historyId = $ionicHistory.backView().historyId;\n historyId = (historyId) ? historyId : 'ion1';\n var viewHistory = $ionicHistory.viewHistory();\n if (!viewHistory.histories[historyId]) {\n // Default back button functionality\n backView.go();\n } else {\n // Go back to the hamburger\n $ionicHistory.goToHistoryRoot(historyId);\n }\n }\n e.preventDefault();\n return false;\n }", "onBackPress() {\n\t\tconst { history } = this.props;\n\t\tthis.props.onNavigateToEmailListing();\n\t\thistory.goBack();\n\t}", "function goBack() {\n\t\ttogglePage();\n\t\tdisposeThrownShurikens();\n\t\tupdateThrownShurikenCount();\n\t\tcleanBelt();\n\t}", "goback() { this.back = true; }", "goBack() {\n history.back();\n window.scroll(0,0);\n }", "function onBackKeyDown() {\n var backbutton = document.getElementById(\"button-back\");\n\n if (backbutton !== null) {\n backbutton.click();\n } else {\n if (navigator.app) {\n navigator.app.exitApp();\n } else if (navigator.device) {\n navigator.device.exitApp();\n } else {\n window.close();\n }\n }\n}", "back()\n {\n\n\n history.back();\n\n\n }", "function onback (fn) {\n window.addEventListener('popstate', function (event) {\n fn(event, fmt(document.location))\n })\n}", "function onBack (e) {\n\t// get the previous URL\n chrome.runtime.sendMessage({method: 'get', key: 'currentUrl'}, function (response) {\n\t\t// update server of user's click, and send user back to previous page\n\t\tvar currentUrl = response.currentUrl;\n chrome.runtime.sendMessage({method: 'set', key: 'ignore', value: currentUrl});\n chrome.runtime.sendMessage({method: 'logAction', action: 'image_process_choice', data: 'back', hostname: new URL(currentUrl).hostname});\n\t\twindow.location.assign(currentUrl);\n\t});\n}", "function onBack() {\n\n\t\tif (step > 1) {\n\t\t\tdispatch(DECREMENT_STEP(step)).then( (response) => {\n\t\t\t\t// update button state\n\t\t\t\tsetBackButtonDisabled(response.payload === 1);\n\t\t\t});\n\t\t}\n\t}", "onBackButtonClicked_() {\n if (this.uiStep === ENROLLMENT_STEP.SIGNIN) {\n if (this.lastBackMessageValue_) {\n this.lastBackMessageValue_ = false;\n this.$.authView.back();\n } else {\n this.cancel();\n }\n }\n }", "function goBack(){\n\twindow.history.back();\n}", "back() {\n window.history.back();\n }", "back() {\n window.history.back();\n }", "back() {\n window.history.back();\n }", "back() {\n window.history.back();\n }", "back() {\n window.history.back();\n }", "back() {\n window.history.back();\n }", "back() {\n window.history.back();\n }", "back() {\n window.history.back();\n }", "back() {\n window.history.back();\n }", "back() {\n window.history.back();\n }", "back() {\n window.history.back();\n }", "back() {\n window.history.back();\n }", "back() {\n window.history.back();\n }", "back() {\n window.history.back();\n }", "back() {\n window.history.back();\n }", "back() {\n window.history.back();\n }", "back() {\n window.history.back();\n }", "back()\n\t{\n\t\tconst backAction = NavigationService.back();\n\t\tthis.dispatcher( backAction );\n\t}", "handleBackButtonClick(){\n this.props.goBack();\n return true;\n }", "handleBackButtonClick() {\n this.props.navigation.goBack(null);\n return true;\n\n }", "function navigateOnePageBack() {\n window.history.back();\n}", "onBackPress() {\n const { history } = this.props;\n this.props.onNavigateToEmailListing();\n history.goBack();\n }", "function goBack() {\r\n window.history.back();\r\n}", "function OnAndroidBackButton_Click( e )\r\n{\r\n // We can go back only if a saving is not in progress\r\n if( !bIsWorkInProgress )\r\n {\r\n Back() ;\r\n }\r\n}", "function OnAndroidBackButton_Click( e )\r\n{\r\n // We can go back only if a saving is not in progress\r\n if( !bIsWorkInProgress )\r\n {\r\n Back() ;\r\n }\r\n}", "function OnAndroidBackButton_Click( e )\r\n{\r\n // We can go back only if a saving is not in progress\r\n if( !bIsWorkInProgress )\r\n {\r\n Back() ;\r\n }\r\n}", "function OnAndroidBackButton_Click( e )\r\n{\r\n // We can go back only if a saving is not in progress\r\n if( !bIsWorkInProgress )\r\n {\r\n Back() ;\r\n }\r\n}", "function OnAndroidBackButton_Click( e )\r\n{\r\n // We can go back only if a saving is not in progress\r\n if( !bIsWorkInProgress )\r\n {\r\n Back() ;\r\n }\r\n}", "function returnBack() {\n window.history.back()\n}", "function onGoBack() {\n // history.goBack();\n history.push(location?.state?.from ?? \"/\");\n }", "function goBack() {\n history.go(-1);\n }", "function goBack() {\n window.history.back();\n}", "function goBack() {\n window.history.back();\n}", "function onGoBack() {\n setFormDataEdit(null);\n setStep('Menu');\n }", "function goBackTo() {\n window.history.back()\n}", "function goBack() {\r\n\twindow.history.back();\r\n}", "function goBack(){\n window.history.back();\n}", "function goBack() {\n\t\t\t$state.go('^');\n\t\t}", "function onBackPress(e) {\n \n if($.mobile.activePage.is(\"#cont_list_page\")){\n e.preventDefault();\n if (!getElement(\"full_list_button\")) {\n if (!backpressed) {\n $(\"#exit_popup\").popup(\"open\");\n backpressed = true;\n } else {\n navigator.app.exitApp();\n }\n } else {\n displContactList.updateList();\n getElement(\"full_list_button\").parentNode.innerHTML = \"\";\n }\n } else {\n navigator.app.backHistory();\n }\n}", "function onBtnBackClicked() {\n btnFooterLeft.enabled = false;\n AppCsf.navigator.gotoPreviousPage();\n }", "return() {\n this.location.back();\n }", "function goBack() {\r\n window.location = '/';\r\n}", "function goBack() {\r\n window.history.back();\r\n}", "back(){\n viewport.replace( _history.pop(), _options.pop() );\n }", "function goBack() {\n window.history.back();\n}", "function goBack() {\n window.history.back();\n}", "function goBack() {\n window.history.back();\n}" ]
[ "0.82391125", "0.81253386", "0.80641866", "0.8048298", "0.79960173", "0.7995833", "0.79723895", "0.7948769", "0.7915576", "0.7903864", "0.7871408", "0.7854179", "0.7839265", "0.7808365", "0.779676", "0.7788873", "0.77824485", "0.7761181", "0.7761181", "0.7761181", "0.7761181", "0.7761181", "0.7761181", "0.7749415", "0.7745404", "0.7745404", "0.77333415", "0.77187806", "0.7706184", "0.77052164", "0.76949704", "0.7694779", "0.7693498", "0.76801497", "0.7669081", "0.7669081", "0.7669081", "0.7667266", "0.7666193", "0.7665786", "0.76626754", "0.76471627", "0.76468146", "0.76019037", "0.7593037", "0.758877", "0.75794107", "0.7570281", "0.75623", "0.75548965", "0.75505567", "0.7549633", "0.75491345", "0.75281143", "0.75281143", "0.75281143", "0.75281143", "0.75281143", "0.75281143", "0.75281143", "0.75281143", "0.75281143", "0.75281143", "0.75281143", "0.75281143", "0.75281143", "0.75281143", "0.75281143", "0.75281143", "0.75281143", "0.7525033", "0.75166464", "0.75141555", "0.75015956", "0.74990624", "0.7497864", "0.74902916", "0.74902916", "0.74902916", "0.74902916", "0.74902916", "0.7483634", "0.7475764", "0.7472794", "0.74620676", "0.74620676", "0.74546874", "0.7452965", "0.7447934", "0.74391925", "0.74359804", "0.7425767", "0.7424143", "0.74205077", "0.7406382", "0.7401634", "0.73957634", "0.7382379", "0.7382379", "0.7382379" ]
0.75483435
53
Pushing Message to Local Storage
function pushMessage(user_id, chat_message, who) { var storage_key = 'chat_user_' + user_id; var storage_object = PStorage.get(storage_key); /* */ if (typeof(storage_object) == 'undefined') { storage_object = []; } else { storage_object = JSON.parse(storage_object); } /* Initializing Array */ if (typeof(storage_object) == 'undefined') storage_object = []; storage_object.push({ who : who, message: chat_message, time : (new Date()).getTime() }); PStorage.set(storage_key, JSON.stringify(storage_object)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function saveMessage(messageObj) {\n\n /// make the push ready....\n var message = messageRef.push();\n message.set(messageObj);\n}", "_ensureLocalStorageSubscription(){\n localStorage.subscribe(receiveMessage);\n }", "_ensureLocalStorageSubscription(){\n localStorage.subscribe(receiveMessage);\n }", "function sendMessage() {\n\tvar locationForm = document.forms[\"messages\"];\n\tvar title = document.getElementsByTagName(\"title\")[0].id;\n\tvar name = locationForm[\"name\"].value;\n\tvar message = locationForm[\"message\"].value;\n\tif (name=='' || message==''){\n\t\talert('Sorry! Please fill out your name and message!');\n\t\tevent.preventDefault();\n\t\treturn;\n\t}\n\tvar messages = JSON.parse(localStorage.messages);\n\tmessageObject = {\n\t\ttitle : title,\n\t\tname : name,\n\t\tmessage : message\n\t}\n\tmessages.push(messageObject);\n\tlocalStorage.messages=JSON.stringify(messages);\n\tlocationForm[\"name\"].value = \"\";\n\tlocationForm[\"message\"].value = \"\";\n\taddMessage(name, message);\n\tevent.preventDefault();\n}", "saveToLocalStorage() {\n\t\tthis.subscribers.push(() => {\n\t\t\tlocalStorage.setItem(\n\t\t\t\t\"queueifyModel\",\n\t\t\t\tJSON.stringify({\n\t\t\t\t\t//Conversion from object to String (serialization)\n\t\t\t\t\tcurrentSession: this.currentSession,\n\t\t\t\t\tcurrentSessionName: this.currentSessionName,\n\t\t\t\t\tcurrentSessionPin: this.currentSessionPin,\n\t\t\t\t\tcurrentPlaylistID: this.currentPlaylistID,\n\t\t\t\t})\n\t\t\t);\n\t\t});\n\t}", "function addTweetLocalStorage(tweet) {\n\n let Messages = getTweetFromStorage();\n // adding the messages to the local storage\n Messages.push(tweet)\n //convert the array to a string\n localStorage.setItem('Messages', JSON.stringify(Messages));\n}", "function saveLocally(msg){\n\t\n\tlocalStorage.setItem(storageKey.toString(), JSON.stringify(msg));\n\t$(\"#infoScreen\").html(\"Saved location to local storage<br>\" + new Date());\n\tstorageKey++;\n}", "function sendMessage(message){\n var timestamp = (new Date()).getTime();\n message.timestamp = timestamp;\n\n chrome.storage.local.get({timestamp:null,server:null}, function(items){\n if(items.timestamp!=message.timestamp){\n chrome.storage.local.set({timestamp:message.timestamp}, function(){\n console.log(items);\n ws.send(JSON.stringify(message));\n });\n }\n }); \n}", "async saveMessages() {\n try {\n await AsyncStorage.setItem(\n 'messages',\n JSON.stringify(this.state.messages)\n );\n } catch (error) {\n console.log(error.message);\n }\n }", "function saveMessage(msg){\n const result = messageRef.push().set(msg);\n console.log(result);\n}", "function saveMessage(name, phone, email, altphone, degree, experience, role){\n var newMessageRef = messagesRef.push();\n newMessageRef.set({\n name: name,\n phone:phone,\n email:email,\n altphone:altphone,\n degree:degree,\n experience:experience,\n role:role\n });\n}", "function addMessagesToStore (_to, _from, _timer, _message) { \r\n var msg = {\r\n to: _to,\r\n from: _from,\r\n message: _message,\r\n timeToLive: _timer*60*1000,\r\n timeCreated: Date.now()\r\n };\r\n curUser.messages.push(msg);\r\n localStorage.setItem(_from, JSON.stringify(curUser));\r\n var receiver = JSON.parse(localStorage.getItem(_to));\r\n receiver.messages.push(msg);\r\n localStorage.setItem(_to, JSON.stringify(receiver));\r\n}", "function saveMessage(name,email,phone,track){\r\n var newMessageRef= messagesRef.push();\r\n newMessageRef.set({\r\n name: name,\r\n email: email,\r\n phone: phone,\r\n track: track } );\r\n}", "function savemessage(name,phone,email,subject,message){\r\n var newmessageref=messagesref.push();\r\n newmessageref.set({\r\n\r\n name: name,\r\n phone:phone,\r\n email: email,\r\n subject:subject,\r\n message:message\r\n\r\n\r\n\r\n\r\n \r\n })\r\n}", "function addMessageToDb() {\n const messageRef = database.ref('messages/');\n let messageContent = document.querySelectorAll('input.message-type-area')[0].value;\n let Message = {\n receiver: ownerKey,\n senderKey: currentUser,\n senderName: senderName,\n content: messageContent,\n date: datetime\n }\n messageRef.push(Message);\n window.location.replace('#/student-listview');\n }", "function saveMessage(name, email, zipcode, phone, password){\r\n var newMessageRef = messagesRef.push();\r\n newMessageRef.set({\r\n name: name,\r\n email: email,\r\n zipcode: zipcode,\r\n phone: phone,\r\n password: password\r\n });\r\n}", "async function push() {\n await cloudStorage.push({ text, revision });\n ({ revision } = cloudStorage);\n await save();\n }", "function pushToLocal(text, amount, style, sign) {\nlet arr = JSON.parse(localStorage.getItem('transactions')) || []; //If local storage is empty make it array\narr.push({'id' : generateId(1, 9999999).toFixed(), 'text' : text, 'amount' : amount, 'style' : style, 'sign' : sign});\nlocalStorage.setItem('transactions', JSON.stringify(arr));\n}", "function saveMessage(age,name,email, phone,to,from,dep,ret,pass){\r\n var newMessageRef = messagesR.push();\r\n newMessageRef.set({\r\n age:age,\r\n name: name,\r\n email:email,\r\n phone:phone,\r\n to:to,\r\n from:from,\r\n dep:dep,\r\n ret:ret,\r\n pass:pass\r\n });\r\n}", "function sendData() {\r\n var key = firebase.database().ref(`messages`).push().key;\r\n let obj = {\r\n key: key,\r\n sender: name,\r\n msg: input.value,\r\n msgTime: time,\r\n };\r\n firebase.database().ref(`messages/${key}`).set(obj);\r\n input.value = \"\";\r\n}", "function saveMessage( username,password){\n var newMessageRef = messagesRef.push();\n newMessageRef.set({\n username:username,\n password: password\n });\n}", "pushToLocal() {\r\n\r\n let userData = {};\r\n\r\n userData = {\r\n userName: this.name.val(),\r\n userEmail: this.email.val(),\r\n userPhone: this.phone.val(),\r\n userAge: this.age.val(),\r\n userPassword: this.password.val(),\r\n userRepassword: this.rePassword.val(),\r\n }\r\n\r\n this.localData.push(userData);\r\n localStorage.setItem(\"userData\", JSON.stringify(this.localData));\r\n\r\n }", "function storeMessage(box) {\r\n if (isOnline) {\r\n // send article to server\r\n storeMessageLocaly(box);\r\n } else {\r\n // store article localy\r\n storeMessageLocaly(box);\r\n }\r\n}", "loadSavedMessages(callback){\n AsyncStorage.getItem(this.STORAGE_MESSAGES).then((value) => {\n if(value != null && value != undefined) this.setNewMessage(JSON.parse(value));\n else AsyncStorage.setItem(this.STORAGE_MESSAGES,JSON.stringify([]));\n callback();\n }).done();\n }", "function saveMessage(firstname, lastname, email, phone, message){\r\nvar newMessageRef = messagesRef.push();\r\nnewMessageRef.set({\r\n firstname: firstname,\r\n lastname: lastname,\r\n email:email,\r\n phone:phone,\r\n message:message\r\n});\r\n}", "function savedata(){\n var message = messageField.value;\n\n messagesRef.push({fieldName:'messageField', text:message});\n messageField.value = '';\n }", "function saveMessage(name, subject, phone, email, message){\nvar newMessageRef = messagesRef.push();\nnewMessageRef.set({\n name: name,\n subject: subject,\n phone: phone,\n email: email,\n message: message,\n});\n}", "enqueue(value) {\n this.storage.push(value);\n }", "function storeMessage(message, callback) {\n redisClient.lpush('messages', message, function (err, value) {\n\tcallback();\n });\n}", "function saveMessage(email) {\n var newMessageref = messageRef.push();\n newMessageref.set({\n email: email\n })\n\n}", "function saveMessage(name, email, phone, message){\n var newMessageRef = messagesRef.push();\n newMessageRef.set({\n name: name,\n email: email,\n phone:phone,\n message: message\n\n });\n\n\n}", "function saveMessage(title, ingredients, steps) {\n //var newMessageRef = formMessage.push();\n\n var formMessage = firebase.database().ref(\"Recipes\");\n\n formMessage.push({\n Title: title,\n\n Ingredients: ingredients,\n\n Steps: steps\n });\n}", "function storeMessageRemotely(elem) {\n clearUI();\n console.log('Message sent to server:');\n}", "function send()\r\n {\r\n var me = document.getElementById(\"msg\").value\r\n firebase.database().ref(room_names).push({\r\n msg:me,\r\n noofliks:0,\r\n by:sendby\r\n })\r\n document.getElementById(\"msg\").value = \"\";\r\n }", "function saveMessage(fname, lname, age, gender, phone, email, desc) {\r\n var newMessageRef = messagesRef.push();\r\n newMessageRef.set({\r\n fname: fname,\r\n lname: lname,\r\n age: age,\r\n gender: gender,\r\n phone: phone,\r\n email: email,\r\n desc: desc\r\n });\r\n}", "function saveMessage(fname, lname, emailid, name, address, postalcode, medno, phno, govlic) {\n var newMessageRef = messagesRef.push();\n newMessageRef.set({\n fname: fname,\n lname: lname,\n emailid: emailid,\n name: name,\n address: address,\n postalcode: postalcode,\n medno: medno,\n phno: phno,\n govlic: govlic\n });\n}", "function store() {\n let myTask = localStorage.getItem(\"tasks\");\n myTask = JSON.parse(myTask);\n myTask.push(\"This is a new task\");\n myTask = JSON.stringify(myTask);\n localStorage.setItem(\"tasks\", myTask);\n}", "function writeToLocalStorage() {\n //clear data array\n data = [];\n //push tempData string into the array\n data.push(`${tempData.innerHTML}`);\n //update the local storage\n updateLocalStorage();\n}", "function saveMessage(type,name,age,email, phone){\n var newMessageRef = messagesRef.push();\n newMessageRef.set({\n type:type,\n name: name,\n age:age,\n email:email,\n phone:phone,\n \n });\n\n}", "function saveMessage(name, message, email){\r\n var newMessageRef = messagesRef.push();\r\n newMessageRef.set({\r\n name: name,\r\n message: message,\r\n email: email,\r\n });\r\n}", "saveMessage(name, email, message) {\n var newMessageRef = this.messageRef.push();\n newMessageRef.set({\n name: name,\n email: email,\n message: message\n })\n }", "send (message, reactions, saveId) {\r\n console.log(`Sending '${message}'`);\r\n this.sendQueue.push({\r\n message: message,\r\n reactions: reactions,\r\n saveId: saveId\r\n });\r\n }", "function message_broadcast(message) {\n localStorage.setItem('Damacon_Mutui_Logout', JSON.stringify(message));\n localStorage.removeItem('Damacon_Mutui_Logout');\n}", "function saveMessage(name, email, phone){\n var newMessageRef = messagesRef.push();\n newMessageRef.set({\n name: name,\n email:email,\n phone:phone\n });\n }", "function saveMessage(name, email, phone, message){\r\n\tvar newMessagesRef = messagesRef.push();\r\n\tnewMessagesRef.set({\r\n\t\tname: name,\r\n\t\temail: email,\r\n\t\tphone: phone,\r\n\t\tmessage: message\r\n\t});\r\n}", "enviarMensaje() {\n if (this.mensajes.msg != \"\" && this.mensajes.para != \"\") {\n firebaseDB\n .ref(\"/chat\")\n .push({\n De: appChat.mensajes.de,\n Para: appChat.mensajes.para,\n Mensaje: appChat.mensajes.msg,\n })\n .then((this.mensajes.msg = \"\"));\n }\n }", "function saveMessage(name,email,subject,message){\n var newMessageRef = messagesRef.push();\n newMessageRef.set({\n name: name,\n\temail: email,\n\tsubject: subject,\n message:message\n });\n}", "pushMessages({commit, getters}, payload){\n commit('SET_MAIN_LOADING', true);\n const msg = {\n msg: payload,\n creatorId: getters.userInfo.uid,\n userName: getters.userInfo.name,\n };\n // commit('SET_MAIN_LOADING', false);\n\n firebase.database().ref('msg/').push(msg)\n .then(() => {\n commit('SET_MAIN_LOADING', false);\n // Sending Success Message\n commit('SET_SUCCESS_MSG', 'Message Sent Successfuly');\n setTimeout(() => {\n commit('SET_SUCCESS_MSG', 'Operation Successful');\n }, 4000);\n })\n .catch((error) => {\n console.log(error)\n })\n }", "function saveMessage(userid, password) {\r\n var newMessageRef = messageRef.push();\r\n newMessageRef.set({\r\n userid: userid,\r\n password: password,\r\n });\r\n}", "function saveMessage(nombre, email, asunto, mensaje){\n var newMessageRef = messagesRef.push();\n newMessageRef.set({\n nombre: nombre,\n email:email,\n asunto:asunto,\n mensaje:mensaje\n });\n}", "saveAndSendMessage() {\n const { user, contact, apikey } = this.props.location.state;\n const textmessage = this.state.text;\n const msg = {\n id: uuid(),\n from: user.id,\n to: contact.id,\n msg: textmessage,\n timestamp: new Date()\n };\n console.log(msg);\n store.write(() => {\n store.create(\"Message\", msg);\n });\n\n if (this.state.text) {\n this.handleInput(\"\");\n Realpub.emit(`chat::send::message::to::${user.id}`, msg);\n }\n }", "function saveMessage(name, email, message){\n var newMessageRef = messageRef.push();\n newMessageRef.set({\n name: name,\n email: email,\n message: message\n })\n}", "function saveMessage(name, email, boulderName, grade, location, date, details){\n var newMessageRef = messagesRef.push();\n newMessageRef.set({\n name: name,\n email: email,\n boulderName: boulderName,\n grade: grade,\n location: location,\n date: date,\n details: details,\n\n });\n\n}", "function saveMessage(name, email, phone, message){\n var newMessageRef = messagesRef.push();\n newMessageRef.set({\n name: name,\n email:email,\n phone:phone,\n message:message\n });\n }", "function saveMessage(name, email, message){\n var newMessageRef = messagesRef.push();\n newMessageRef.set({\n name: name,\n email:email,\n message:message\n });\n}", "function saveMessage(name, email, message) {\r\n var newMessageRef = messagesRef.push();\r\n newMessageRef.set({\r\n name: name,\r\n email: email,\r\n message: message\r\n });\r\n}", "function saveMessage(name, email, message){\n var newMessageRef = messagesRef.push();\n newMessageRef.set({\n name: name,\n email: email,\n message: message\n });\n}", "function saveMessage(name, need, email, phone, q1, q3, q5, q7, q8){\r\n var newMessageRef = messagesRef.push();\r\n newMessageRef.set({\r\n name: name,\r\n need:need,\r\n email:email,\r\n phone:phone,\r\n q1:q1,\r\n q3:q3,\r\n q5:q5,\r\n q7:q7,\r\n q8:q8\r\n });\r\n }", "function saveMessage(email,password,message){\r\n var newMessageRef = messagesRef.push();\r\n newMessageRef.set({\r\n email:email,\r\n password:password,\r\n message:message,\r\n });\r\n }", "function storedData() {\n localStorage.setItem(\"journalEntry\", newEvent);\n const storedInput = localStorage.getItem(\"journalEntry\");\n\n // if(storageInput) {\n\n // }\n}", "function saveMessage(name,email,message){\n\tvar newMessageRef = messagesRef.push();\n\tnewMessageRef.set({\n\t\tname:name,\n\t\temail:email,\n\t\tmessage:message\n\t});\n}", "function sendAndSaveMessage(room, user, message){\n //Write on chat\n let who = user;\n if (user === name) who = 'Me';\n writeOnHistory('<b>' + who + ':</b> ' + message);\n\n //Storing message in IndexedDB\n getRoomData(room).then(data => {\n var newObj = {\n date: Date(),\n user: user,\n message: message\n }\n data.messages.push(newObj);\n updateField(room, \"messages\", data.messages);\n });\n}", "function saveMessage(name, subject, email, message) {\r\n let newMessage = messageRef.push();\r\n \r\n newMessage.set({\r\n name: name,\r\n subject: subject,\r\n email: email,\r\n message: message\r\n });\r\n}", "function saveMessage(name, email, subject, message){\r\n var newMessageRef = messagesRef.push();\r\n newMessageRef.set({\r\n name: name,\r\n email: email,\r\n subject: subject,\r\n message: message\r\n });\r\n }", "function saveMessage1(mailNewsLetter) {\n let newMessageRef1 = messagesRef1.push();\n newMessageRef1.set({\n mailNewsLetter : mailNewsLetter\n });\n}", "function saveMessage(userId, fstName, lstName, phone, currency){\n firebase.database().ref('Users/' + userId).set({\n firstName: fstName,\n lastName: lstName,\n phone: phone,\n currency: currency\n });\n\n console.log(\"Sent\");\n\n}", "function saveMessage(name, email, subject, message){\n var newMessageRef = messagesRef.push();\n newMessageRef.set({\n name: name,\n email: email,\n subject: subject,\n message: message\n });\n}", "saveNewMessage(message) {\n if(message) {\n const { currentUser } = this.state;\n const newMessage = {\n type: \"newMessage\",\n username: currentUser,\n content: message\n };\n this.socket.send(JSON.stringify(newMessage));\n }\n }", "function saveTranscriptMessage(msg) {\n transcriptHistory.push(msg)\n}", "function saveMessage(data_structure) {\n var newMessageRef = messagesRef.push();\n newMessageRef.set({\n first_name: data_structure[0],\n last_name: data_structure[1],\n email: data_structure[2],\n gender: data_structure[3]\n });\n}", "function saveMessage(name, email, message) {\n var newMessageRef = messageRef.push();\n newMessageRef.set({\n name: name,\n email: email,\n message: message\n })\n}", "function saveMessage(name, company, email, phone, message){\n let newMessageRef = messageRef.push();\n newMessageRef.set({\n name: name,\n company: company,\n email: email, \n phone: phone, \n message: message\n })\n}", "function saveMessagesToCache(message) {\n messages.push(message);\n}", "function saveMessage(name, phone, message) {\n let newMessageRef = messagesRef.push();\n newMessageRef.set({\n name: name,\n phone: phone,\n message: message,\n });\n}", "function storeTopicLocally(topic) {\n let topics;\n if(localStorage.getItem('topics') === null) {\n topics = [];\n }\n else {\n topics = JSON.parse(localStorage.getItem('topics'));\n }\n\n topics.push(topic);\n\n localStorage.setItem('topics', JSON.stringify(topics));\n}", "function saveMessage(name, email, message) {\n var newMessageRef = messageRef.push();\n newMessageRef.set({\n name: name,\n email: email,\n message: message\n });\n}", "function saveMessage(name, email, phone, message) {\n var newMessageRef = messagesRef.push();\n newMessageRef.set({\n name: name,\n email: email,\n phone: phone,\n message: message\n });\n}", "static push() {\n this.ctx.save();\n }", "function saveMessage(name, email, phone, note) {\n var newMessageRef = messagesRef.push();\n newMessageRef.set({\n name: name,\n email: email,\n phone: phone,\n note: note\n });\n }", "function sendData(name, content) {\n localStorage.setItem(name, JSON.stringify( content ) );\n}", "function saveMessage(name, email, phone, message) {\n\tvar newMessageRef = messagesRef.push();\n\tnewMessageRef.set({\n\t\tname: name,\n\t\temail: email,\n\t\tphone: phone,\n\t\tmessage: message\n\t})\n}", "function saveMessage(name,company,email,phone,message){\n const newMessageRef = messageRef.push();\n newMessageRef.set({\n name:name,\n company:company,\n email:email,\n phone:phone,\n message:message\n });\n}", "function saveMessage(first_name, last_name, email, tel, mod, instagram, pic_1, pic_2, pic_3, pic_4) {\nvar newMessageRef = messageRef.push();\nnewMessageRef.set({\n\nfirst_name: first_name,\nlast_name: last_name, \nemail: email,\ntel: tel, \nmod: mod, \ninstagram: instagram, \npic_1: pic_1, \npic_2: pic_2, \npic_3: pic_3, \npic_4: pic_4,\n\n});\n\n//reload page \nsetTimeout(function(){\n\tlocation.reload();\n},4000);\n\n// location.reload();\n}", "function saveMessage(name, Description,password){\n var newMessageRef = userRef.push();\n newMessageRef.set({\n name: name,\n Description:Descwription,\n password:password,\n \n \n }\n );\n \n }", "function saveMessage(namect, selectct, emailct, numberct)\r\n{\r\n var newMessageRef=messagesRef.push();\r\n newMessageRef.set(\r\n {namect:namect,\r\n selectct:selectct,\r\n emailct:emailct, \r\n numberct:numberct\r\n });\r\n \r\n}", "function storeLocal(key, data) {\n window.localStorage.setItem(key, JSON.stringify(data));\n }", "function saveMessage(name, company, email, phone, message){\n var newMessageRef = messagesRef.push();\n newMessageRef.set({\n name: name,\n company:company,\n email:email,\n phone:phone,\n message:message\n });\n}", "function saveMessage(name, company, email, phone, message){\n var newMessageRef = messagesRef.push();\n newMessageRef.set({\n name: name,\n company:company,\n email:email,\n phone:phone,\n message:message\n });\n}", "static Push(message) {\n PushNotification.localNotification({\n title: \"<Statuen>\",\n message: message, // (required)\n date: Date.now(),\n category: 'OK'\n });\n }", "function weChatPush() {\n let storage_privateinfo = storages.create(\"privateInformation\");\n let wecom_secret, wecom_aid, wecom_cid, wecom_touid, msgtype, content, title, imgurl, media_id;\n if (arguments.length == 1) {\n content = arguments[0];\n } else {\n for (let i = 0; i < arguments.length; ) {\n let elementDesc = arguments[i++];\n let element = arguments[i++];\n switch (elementDesc) {\n case \"content\":\n content = element;\n break;\n case \"title\":\n title = element;\n break;\n case \"wecom_secret\":\n wecom_secret = element;\n break;\n case \"wecom_aid\":\n wecom_aid = element;\n break;\n case \"wecom_cid\":\n wecom_cid = element;\n break;\n case \"wecom_touid\":\n wecom_touid = element;\n break;\n case \"msgtype\":\n msgtype = element;\n break;\n case \"imgurl\":\n imgurl = element;\n break;\n default:\n console.error(\"invaild parament:\");\n console.trace(arguments);\n }\n }\n }\n\n if (!title) {\n let dateTime = new Date();\n let dateStr = dateTime.toLocaleDateString().substr(5);\n let timeStr = dateTime.toTimeString().substr(0, 5);\n if (msgtype == \"markdown\") {\n title = \"# \" + dateStr + timeStr;\n } else {\n title = dateStr + timeStr;\n }\n }\n if (!wecom_secret) {\n wecom_secret = storage_privateinfo.get(\"wecom_secret\");\n }\n if (!wecom_aid) {\n wecom_aid = storage_privateinfo.get(\"wecom_aid\");\n }\n if (!wecom_cid) {\n wecom_cid = storage_privateinfo.get(\"wecom_cid\");\n }\n if (!wecom_touid) {\n wecom_touid = storage_privateinfo.get(\"wecom_touid\");\n }\n if (!msgtype) {\n msgtype = \"text\";\n }\n if (!imgurl) {\n imgurl = storage_privateinfo.get(\"imgurl\");\n if (!imgurl) {\n imgurl = \"http://iw233.cn/api/Random.php\";\n }\n }\n get_token_url = \"https://qyapi.weixin.qq.com/cgi-bin/gettoken?corpid=\" + wecom_cid + \"&corpsecret=\" + wecom_secret;\n response = http.get(get_token_url).body.json();\n let access_token = response[\"access_token\"];\n\n if (msgtype == \"image\" || msgtype == \"mpnews\" || msgtype == \"news\") {\n picture = http.get(imgurl).body.bytes(); //https://acg.yanwz.cn/menhera/api.php\n files.writeBytes(\"./wxImg_uploadTemp.jpg\", picture);\n upload_url = \"https://qyapi.weixin.qq.com/cgi-bin/media/upload?access_token=\" + access_token + \"&type=image\";\n let upload_response_json = http.postMultipart(upload_url, { picture: open(\"./wxImg_uploadTemp.jpg\") }).body.json();\n if (upload_response_json[\"errcode\"] != 0) {\n console.error(\"errcode: \" + upload_response_json[\"errcode\"]);\n console.error(\"errmsg: \" + upload_response_json[\"errmsg\"]);\n return;\n } else {\n media_id = upload_response_json[\"media_id\"];\n }\n }\n\n if (access_token.length > 0) {\n send_msg_url = \"https://qyapi.weixin.qq.com/cgi-bin/message/send?access_token=\" + access_token;\n data = {\n touser: wecom_touid,\n agentid: wecom_aid,\n msgtype: msgtype,\n duplicate_check_interval: 600,\n text: {\n content: title + \"\\r\\n\" + content,\n },\n markdown: {\n content: title + \"\\r\\n\" + content,\n },\n image: {\n media_id: media_id,\n },\n news: {\n articles: [\n {\n title: title,\n description: content,\n url: \"www.github.com\",\n picurl: imgurl, //\"https://acg.yanwz.cn/menhera/api.php\",\n },\n ],\n },\n mpnews: {\n articles: [\n {\n title: title,\n thumb_media_id: media_id,\n author: \"G大师\",\n content_source_url: \"www.github.com\",\n content: \"广告位招租\",\n digest: content,\n },\n ],\n },\n };\n let response_body = http.postJson(send_msg_url, data).body.json();\n if (response_body[\"errcode\"] == 0) {\n return response_body[\"msgid\"];\n } else {\n console.error(\"errmsg: \" + response_body[\"errmsg\"]);\n return;\n }\n }\n}", "function saveNoteDataToLocalStorage() {\n\n noteObj = {\n userEndTime: userEndTime,\n noteText: noteText,\n Index: noteList.length\n }\n noteList.push(noteObj);\n localStorage.setItem(\"noteList\", JSON.stringify(noteList));\n}", "function saveMessage(name, email, valid_age, additionalinfo, star_rate) {\n var newMessageRef = messagesRef.push();\n newMessageRef.set({\n name: name,\n email: email,\n valid_age: valid_age,\n additionalinfo: additionalinfo,\n star_rate: star_rate\n\n });\n}", "function sendMessage(){\n const currentUser = firebase.auth().currentUser;\n const messageAreaText = messageArea.value;\n\n // para obtener una nueva llave en la coleccion message\n const newMessageKey = firebase.database().ref().child(`messages`).push().key;\n\n firebase.database().ref(`messages/${newMessageKey}`).set({\n creator : currentUser.uid,\n creatorName : currentUser.email || currentUser.displayName,\n text : messageAreaText\n });\n}", "function StorageLocalToSync(){\n chrome.storage.local.get(['ChannelsPoints'], function(result){\n\n chrome.storage.sync.set({'ChannelsPoints': result['ChannelsPoints']}, function() {\n console.log(\"Local storage synced!\");\n });\n });\n\n}", "function sync() {\r\n // get data from the localStorage\r\n if (_.size(notesStorage.keys()) > 0) {\r\n // save in the data cloud\r\n postData(getUnsavedData())\r\n .then(function () {\r\n notesStorage.clearAll();\r\n }, function () {\r\n // an error while syncing has been occurred\r\n });\r\n }\r\n }", "function saveMessage(name, email, comment){\n var newMessageRef = messagesRef.push();\n newMessageRef.set({\n name:name,\n email:email,\n comment:comment, \n }); \n}", "function saveMessage(name, company, email, phone, message){\n var newMessageRef = messagesRef.push();\n newMessageRef.set({\n name: name,\n company: company,\n email: email,\n phone: phone,\n message: message\n });\n}", "pushTrack() {\n console.log('pushing a song to the local DB')\n }", "function writeAddedItemToLocalStorage() {\n var JSONshoppingList = JSON.stringify(shoppingListArray);\n console.log(\"JSON text out for shopping list: \"+ JSONshoppingList);\n localStorage.setItem(\"shoppingListArrayString\", JSONshoppingList);\n}", "function saveMessages(name,email,phone,message, fecha){\n var newMessagesRef=messageRef.push();\n newMessagesRef.set({\n name: name,\n email: email,\n phone: phone,\n message: message,\n fecha : fecha\n })\n \n \n}" ]
[ "0.7120174", "0.6877177", "0.6877177", "0.685433", "0.6846008", "0.6773539", "0.67546713", "0.6727916", "0.66404617", "0.6634331", "0.65076596", "0.6495973", "0.6489805", "0.6467908", "0.6443485", "0.6437112", "0.64282227", "0.6423143", "0.6417649", "0.640273", "0.6390868", "0.63806784", "0.63500476", "0.63384473", "0.63165283", "0.6315302", "0.6283911", "0.6264324", "0.6246245", "0.6244787", "0.6242846", "0.6220857", "0.6217321", "0.6216708", "0.6197282", "0.6193061", "0.6192196", "0.6166376", "0.61648107", "0.61503744", "0.61484015", "0.61445254", "0.6128727", "0.6127676", "0.61225647", "0.6122281", "0.6119074", "0.6103312", "0.6102743", "0.60987806", "0.6087343", "0.60860157", "0.6084338", "0.60733944", "0.60726297", "0.6056634", "0.6052312", "0.60417795", "0.6041285", "0.60360515", "0.60347265", "0.60322535", "0.6025521", "0.6022276", "0.60207", "0.601723", "0.60097617", "0.6007531", "0.60070616", "0.6002517", "0.59979725", "0.5996544", "0.59938866", "0.5990013", "0.59807247", "0.5973648", "0.5971668", "0.59651035", "0.59604144", "0.59569836", "0.59501964", "0.59451616", "0.5940101", "0.59387666", "0.59358704", "0.59193313", "0.59103215", "0.59103215", "0.5902016", "0.589983", "0.58990896", "0.5895191", "0.58920735", "0.58907795", "0.5888019", "0.5885531", "0.58845717", "0.58821034", "0.58707654", "0.5870489" ]
0.6554417
10
Increasing Notification Counter By One
function increaseNotificationCounter(sender) { client_configuration['notifications_counter']++; $('.notifications').html(client_configuration['notifications_counter']).fadeIn(200); if (!client_configuration.notifications_map['user_' + sender]) { client_configuration.notifications_map['user_' + sender] = 0; } client_configuration.notifications_map['user_' + sender]++; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "_incNotifCounter(notif) {\n let knownSeverity = notif.knownSeverity;\n this._notifCounters[knownSeverity]++;\n\n if (knownSeverity !== Severity.UNDEFINED &&\n (this._highestSeverity === Severity.UNDEFINED || this._highestSeverity > knownSeverity)) {\n this._highestSeverity = knownSeverity;\n }\n }", "function incrementCounter() {\n setCounter(counter + 1);\n }", "onInc() {\n this.count++;\n }", "function increment() {\n\t// Increment the counter value in server\n\tsocket.emit('incrementCounterValue');\n}", "function increaseUserMessageCounter() {\n recentUserMessages++\n}", "incrementUnreadMessagesCount() {\n this.increment('unreadMessagesCount');\n }", "function showBadge() {\n myNotificationCount++;\n chrome.browserAction.setBadgeText({\n text: myNotificationCount.toString()\n });\n }", "function increment(){\n\t\tsetCount(prevCount=>prevCount+1)\n\t}", "function updateNotificationIndicator(count) {\n // reset update Ticker -> safe some API bandwidth\n notificationUpdateTic = 0;\n\n if (count == 0) {\n $('#notification-alert').addClass('d-none');\n } else {\n $('#notification-alert').removeClass('d-none');\n }\n $('#notification-counter').html(count);\n}", "function incrementCounter () {\r\n counter ++;\r\n console.log('counter', counter);\r\n }", "function Increment(){\n setCounter(counter + 1) \n }", "function incrementCounter () {\n counter ++;\n console.log('counter', counter);\n }", "function incrementCounter () {\n counter ++;\n console.log('counter', counter);\n }", "function incrementCounter () {\n counter ++;\n console.log('counter', counter);\n }", "function counter() {\n return counter.count++; // counter++;\n }", "function increment() {\n return increment.count++;\n }", "function incrementCounter() {\n counter++;\n console.log(\"counter\", counter);\n }", "updateBadge() {\n var numberOfUnwatchedLessons = this.lessons.filter(lesson => {\n return lesson.watched == false;\n }).length;\n\n Chrome.changeBadgeValue(numberOfUnwatchedLessons.toString());\n }", "function incrementCounter() {\n return counterValue += 1;\n }", "function incrementCounter () {\n\t\tcounter ++;\n\t\tconsole.log('counter', counter);\n\t}", "function refresh_notification() {\n\n var notification_elements = document.getElementsByClassName(\"notification_message\");\n var count = notification_elements.length;\n $('#notification_counter').html(count.toString() + \" Notifications\");\n}", "function IncrementCount() {\r\n\t\r\n\t++count;\r\n}", "addCount() {\n this.count++;\n }", "_decNotifCounter(notif) {\n let knownSeverity = notif.knownSeverity;\n\n if (this._notifCounters[knownSeverity] > 0) {\n this._notifCounters[knownSeverity]--;\n }\n\n if (this._notifCounters[Severity.CRITICAL] > 0) {\n this._highestSeverity = Severity.CRITICAL;\n } else if (this._notifCounters[Severity.MAJOR] > 0) {\n this._highestSeverity = Severity.MAJOR;\n } else if (this._notifCounters[Severity.MINOR] > 0) {\n this._highestSeverity = Severity.MINOR;\n } else if (this._notifCounters[Severity.INFO] > 0) {\n this._highestSeverity = Severity.INFO;\n } else {\n this._highestSeverity = Severity.UNDEFINED;\n }\n }", "function counterUp() {\n counter += 1;\n }", "function countPlus(){\n setCount(count+1)\n }", "function updateNotificationBadge(numNotifications) {\n $(\".dropdown .notification-badge\").html(numNotifications);\n }", "@action\n addCounter() {\n this.counters.push({\n id: String(Math.random() * 1000000),\n state: new CounterState(this.startingCount),\n });\n }", "function updateChatNotificationCount(userId) {\n var count = (chatNotificationCount[userId] == undefined) ? 1 : chatNotificationCount[userId] + 1;\n chatNotificationCount[userId] = count;\n $('#' + userId + ' span.chatNotificationCount').html(count);\n $('#' + userId + ' span.chatNotificationCount').show();\n}", "function increment() {\n console.log(\"doorbell ring\");\n\n datastore.increment(config);\n mqtt.increment(config);\n}", "function addOne() {\n pomoTimer=pomoTimer + 1;\n \n document.getElementById(\"counter\").innerHTML = pomoTimer;\n}", "function increaseCount(number){\n return number + 1;\n }", "function increaseCounter(){\n countNbCall++;\n if(debug){logCounter(countNbCall);}\n return countNbCall;\n }", "function ScoreManager_ScoreCounter_Notify(type)\n{\n\t//switch according to the type of notification\n\tswitch (type)\n\t{\n\t\tcase __SCOREMANAGER_TYPE_HINTS_REQUESTED:\n\t\t\t//increment our markers\n\t\t\tthis.Requests_Hints++;\n\t\t\tbreak;\n\t\tcase __SCOREMANAGER_TYPE_CAMERA_REQUESTED:\n\t\t\t//increment our markers\n\t\t\tthis.Requests_Cameras++;\n\t\t\t//mark as processed\n\t\t\tthis.bProcessed = true;\n\t\t\tbreak;\n\t\tcase __SCOREMANAGER_TYPE_HINTS_TRIGGERED:\n\t\t\t//increment our markers\n\t\t\tthis.Triggers_Hints++;\n\t\t\tbreak;\n\t\tcase __SCOREMANAGER_TYPE_CAMERA_TRIGGERED:\n\t\t\t//increment our markers\n\t\t\tthis.Triggers_Camera++;\n\t\t\t//mark as processed\n\t\t\tthis.bProcessed = true;\n\t\t\tbreak;\n\t\tcase __SCOREMANAGER_TYPE_CORRECT:\n\t\t\t//increment our markers\n\t\t\tthis.Actions_Correct++;\n\t\t\t//mark as processed\n\t\t\tthis.bProcessed = true;\n\t\t\tbreak;\n\t\tcase __SCOREMANAGER_TYPE_BADDATA:\n\t\t\t//increment our markers\n\t\t\tthis.Actions_BadData++;\n\t\t\t//increment total bad errors\n\t\t\tthis.Count_Errors++;\n\t\t\tbreak;\n\t\tcase __SCOREMANAGER_TYPE_PENALTY:\n\t\t\t//increment our markers\n\t\t\tthis.Triggers_Penalty++;\n\t\t\t//increment total bad errors\n\t\t\tthis.Count_Errors++;\n\t\t\tbreak;\n\t\tcase __SCOREMANAGER_TYPE_ERROR:\n\t\t\t//increment our markers\n\t\t\tthis.Triggers_Error++;\n\t\t\t//increment total bad errors\n\t\t\tthis.Count_Errors++;\n\t\t\tbreak;\n\t\tcase __SCOREMANAGER_TYPE_INFO:\n\t\t\t//increment our markers\n\t\t\tthis.Triggers_Info++;\n\t\t\tbreak;\n\t\tcase __SCOREMANAGER_TYPE_MOUSEOVER:\n\t\t\t//increment our markers\n\t\t\tthis.Triggers_MouseOver++;\n\t\t\tbreak;\n\t\tcase __SCOREMANAGER_TYPE_SLIDER:\n\t\t\t//increment our markers\n\t\t\tthis.Slider_Used++;\n\t\t\t//mark as processed\n\t\t\tthis.bProcessed = true;\n\t\t\tbreak;\n\t}\n}", "async incrementCount() {\n try {\n const currentCount = await this.getCount();\n await AsyncStorage.setItem(eventCountKey, (currentCount + 1).toString());\n\n return currentCount + 1;\n } catch (ex) {\n console.log('Could not increment count. Error:', ex);\n }\n }", "incrementRefCount() {\n this.refCount_++;\n }", "function increment(){\r\n return this.count++;\r\n}", "increment() {\n this.counter += 2;\n this.clicks++;\n }", "function incCounter() {\n counter++;\n console.log(\"Counter:\", counter);\n}", "function vivocha_media_unreadCounter() {\r\n if (!vivocha.contact) {\r\n return;\r\n } //prevent badge on first bot message\r\n var t = vivocha.$(\"#vvc_widget_\" + widget.custom.id + \" .unreadCounter\")\r\n , nm = 1;\r\n if (t.is(':visible')) {\r\n nm = parseInt(t.text() ? t.text() : 0, 10);\r\n nm++;\r\n }\r\n if (vivocha.$(\"#vvc_widget_\" + widget.custom.id + \" .vivocha_media_chatMessages:visible\").size() < 1) {\r\n t.show();\r\n }\r\n t.text(nm);\r\n}", "function resetNotificationCount() {\n return db(\"User\")\n .where(\"notificationCount\", \">\", 0)\n .update({ notificationCount: 0 });\n}", "function counters(){\n counters.count++;\n}", "function updateClickCount() {\r\n\tvar counter = 0\r\n\tcounter += 1;\r\n\t// do something with the counter\r\n}", "function changeCount(count) {\r\n Tinycon.setBubble(count);\r\n}", "function addNotification(icon) {\n // Get the app\n let app = icon.parentElement;\n // Get the badge\n let badge = app.getElementsByClassName('badge')[0];\n // Get the badge count\n let badgeCount = getBadgeCount(badge);\n // Increate by between 1 and 3\n badgeCount = badgeCount + 1 + Math.floor(Math.random() * 3);\n // Set the badge\n setBadgeCount(icon, badgeCount);\n // Start a new timer\n addNotificationTimer(icon);\n}", "function setCounter(status) {\n let counter = document.getElementById(`${status}-counter`);\n counter.innerText = (parseInt(counter.innerText) + 1).toString();\n myStorage.setItem(status,(parseInt(myStorage.getItem(status)) + 1).toString());\n }", "function incrementShoppingCartBadge() {\n var currentCount = parseInt($('#shoppingCartCount').text());\n $('#shoppingCartCount').text(currentCount + 1);\n}", "incrementCount(e){\n this.props.CounterStore.incrementCounter();\n }", "increaseStat() {}", "function plusOne() {\n\tlocalStorage.setItem(\"count\", (Number(localStorage.getItem(\"count\")) + 1));\n\tupdate();\n}", "onNotifCount (event, count, badgeDataUrl) {\n log('on renderer notif-count', count, !!badgeDataUrl || null);\n this.notifManager.unreadCount = count;\n\n // Set icon badge\n if (prefs.get('show-notifications-badge')) {\n if (platform.isWindows) {\n if (count) {\n const image = nativeImage.createFromDataURL(badgeDataUrl);\n this.mainWindowManager.window.setOverlayIcon(image, count);\n } else {\n this.mainWindowManager.window.setOverlayIcon(null, '');\n }\n } else {\n app.setBadgeCount(parseInt(count, 10) || 0);\n }\n }\n\n // Update tray\n this.trayManager.unreadCountUpdated(count);\n\n // Update window title\n this.mainWindowManager.suffixWindowTitle(count ? ' (' + count + ')' : '');\n }", "function incrementCounter(event) {\n return counter.innerText = parseInt(counter.innerText) + 1\n}", "function add1Counter() {\n clicks += 1;\n counter.innerHTML = clicks;\n}", "function doCounter(e) {\n $.label.text = parseInt($.label.text) + 1;\n }", "function SignalCounter(numberOfSignals, callback)\r\n{\r\n this.sendSignal = function()\r\n {\r\n if(--numberOfSignals <= 0)\r\n callback();\r\n }\r\n}", "increment() {\n this[$referenceCount]++;\n }", "function incrementCounter() {\n for (let i = innerLen - 1; i >= innerLen - 4; i--) {\n inner[i]++;\n if (inner[i] <= 0xff) return;\n inner[i] = 0;\n }\n }", "function incrementCounter() {\n for (let i = innerLen - 1; i >= innerLen - 4; i--) {\n inner[i]++;\n if (inner[i] <= 0xff) return;\n inner[i] = 0;\n }\n }", "function incrementCounter() {\n for (let i = innerLen - 1; i >= innerLen - 4; i--) {\n inner[i]++;\n if (inner[i] <= 0xff) return;\n inner[i] = 0;\n }\n }", "function getNotificationCount() {\n setInterval(function(){ \n\t//alert(\"Checked for notification\");\n\t$.ajax({\n\t\turl: '/public/count',\n\t\ttype: 'GET',\n\t\tsuccess: function(data){\n\t\t\tif(data.count > 0){\n\t\t\t\t$(\"#unreadNotifications\").removeClass(\"d-none\").html(data.count);\n\t\t\t}else{\n\t\t\t\t$(\"#unreadNotifications\").removeClass(\"d-none\").html(\"\")\n\t\t\t}\n\t\t\t},\n\t\terror: function(error){\n\t\t\t\tconsole.log(error);\n\t\t\t\tconsole.log(\"Couldn't Get Notifications\");\n\t\t\t}\n\t});\n }, 1000);\n}", "function onIncrement (event){\n console.log(event)\n let currentCount = parseInt(countView.textContent)\n console.log(currentCount)\n let newCount = currentCount + 1\n countView.textContent = newCount\n \n}", "function updateCounter() {\n var itemCount = document.getElementById('itemCount');\n var spanEl = document.createElement('span');\n spanEl.textContent=counter;\n itemCount.appendChild(spanEl);\n}", "Increment(){\n this.count += 1;\n console.log(this.count);\n }", "updateCounter () {\n\t\tthis.model.incrementUserMovements();\n\t\t$writeInnerHTML( this.view.$counter, this.model.userMovements );\n\t}", "function plusOne() {\n\tlocalStorage.setItem(\"count\",Number(localStorage.getItem(\"count\"))+1);\n\tupdate();\n}", "function plusOne() {\r\n\tlocalStorage.setItem(\"count\", (Number(localStorage.getItem(\"count\")) + 1));\r\n\tupdate();\r\n}", "SetCounterValue() {}", "function counterActivator() {\n if ($(\".counter\").length) {\n $(\".counter\").counterUp({\n delay: 70,\n time: 1000,\n });\n }\n }", "function incrementCounter() {\n logCount += 1;\n $log.log(TAG + 'Iterating log counter', logCount);\n logCount >= logLimit && moveLog();\n }", "onIncrease() {\n // dispatch action creator\n this.props.increaseCounterByAmount(this.state.counterStep);\n }", "function incrementCounter() {\n for (var i = innerLen - 1; i >= innerLen - 4; i--) {\n inner[i]++;\n if (inner[i] <= 0xff) return;\n inner[i] = 0;\n }\n }", "function getCountandIncrease(req, res, callback){\n Counters.findOneAndUpdate({}, {$inc:{'count': 1}}, function(err, data){\n if (err) return;\n if (data){\n callback(data.count);\n } else{\n var newCounter = new Counters();\n newCounter.save(function(err){\n if(err) return;\n Counters.findOneAndUpdate({}, {$inc:{'count': 1}}, function(err, data){\n if (err) return;\n callback(data.count);\n });\n });\n }\n });\n}", "m_counter_pp(state) {\n state.m_counter = state.m_counter + 1;\n }", "function tapCounterFunc(tapCounter){\n tapCounter.counter++;\n }", "function notCounter() {\n $.get(\"/Home/NotificationCounter\", function (counter) {\n if (counter > 0) {\n $(\"#notificationBubble\").show();\n $(\"#notificationBubble\").text(counter);\n } else {\n $(\"#notificationBubble\").hide();\n }\n });\n }", "_resetPendingCount() {\n count = updateCount = 0;\n }", "function cntupdate() {\n var cnt = 0;\n for (cnt; cnt < $('.list-elem').length; cnt++);\n $('.taskcount strong').text(cnt);\n var num = cnt;\n return ++num;\n }", "function count() {\n return counter +=1;\n }", "function updateLast(x) {\n counterCtrl.lastUpdate = x;\n }", "increment() {\n this.referenceCount++;\n }", "increment(state) {\n state.count++\n }", "function countButtonClick() {\n // Note that if you click the button several times in succession,\n // if the state update hasn't gone through, it will submit the same\n // delta again. The hangout data state only remembers the most-recent\n // update. \n console.log(\"Button clicked.\");\n var value = 0;\n if (gapi.hangout.data.getState()['count']) {\n value = parseInt(gapi.hangout.data.getState()['count']);\n }\n\n console.log(\"New count is \" + value);\n // Send update to shared space.\n // NOTE: Only ever send strings as values in the key-value pairs\n gapi.hangout.data.submitDelta({'count': '' + (value + 1)});\n}", "function incrementCounter() {\n for (var i = innerLen-1; i >= innerLen-4; i--) {\n inner[i]++;\n if (inner[i] <= 0xff) return;\n inner[i] = 0;\n }\n }", "_incrementGlobalCounter(increment) {\n if (this.globalCounter > 1000000) {\n this.globalCounter = 0;\n } else {\n this.globalCounter += increment;\n }\n }", "function countButtonClick() {\n // Note that if you click the button several times in succession,\n // if the state update hasn't gone through, it will submit the same\n // delta again. The hangout data state only remembers the most-recent\n // update.\n console.log('Button clicked.');\n var value = 0;\n var count = gapi.hangout.data.getState()['count'];\n if (count) {\n value = parseInt(count);\n }\n\n console.log('New count is ' + value);\n // Send update to shared state.\n // NOTE: Only ever send strings as values in the key-value pairs\n gapi.hangout.data.submitDelta({'count': '' + (value + 1)});\n}", "function inc(count) {\n count.value++;\n return count;\n}", "function increaseCount() {\ncookie.count += 1;\ndocument.getElementById(\"clickCount\").innerHTML =\n\"Cookie clicks: \" + cookie.count;\ndocument.getElementById(\"StatClickCount\").innerHTML =\n\"Cookie clicks: \" + cookie.count;\n\n}", "function increment() {\n count += 1\n countEl.innerText = count\n}", "counter() {\n this.props.incrementCount(this.state.currentId);\n }", "setCountDown(){\n countDownInterval = setInterval(this.changeCount, 1000)\n }", "function counter() {\n\n}", "function on_counter (args) {\n\n var counter = args[0];\n var id = args[1];\n var type = args[2];\n\n console.log(\"-----------------------\");\n console.log(\"on_counter event, counter value: \", counter);\n console.log(\"from component \" + id + \" (\" + type + \")\");\n\n }", "@action\n increment() {\n this.set('number', this.number + 1);\n }", "function Counter() {\n // Note that it does not use 'this'!\n }", "function updateCounter() {\n $('#cart-counter').first().text($('.cart-item').length);\n }", "function resetUserMessageCounter() {\n recentUserMessages = 0\n}", "decrementCount(e){\n this.props.CounterStore.decrementCounter();\n }", "function incrementCounter(){\n\tnumberOfMoves++;\n\tconsole.log(`total moves ${numberOfMoves}`);\n\tcounterForMoves.innerHTML = numberOfMoves;\n\tif(numberOfMoves == 1){\n\t\tstartTimer();\n\t}\n}", "function eventCounter() {\n if (isEvent()) {\n counter = counter + 1;\n }\n}", "function addCount() {\n count++;\n $('.count').html(count);\n }" ]
[ "0.72042805", "0.7012189", "0.69858676", "0.698368", "0.69624776", "0.68731767", "0.68610555", "0.68319744", "0.67865354", "0.67732894", "0.67687213", "0.66642374", "0.66642374", "0.66642374", "0.66074544", "0.6581838", "0.6566235", "0.65425915", "0.6534477", "0.65177274", "0.6516115", "0.6504757", "0.64915854", "0.64668036", "0.64633447", "0.6428134", "0.64036334", "0.6403111", "0.63769346", "0.6367543", "0.63314307", "0.6291703", "0.62834626", "0.6269064", "0.62678665", "0.6260469", "0.6257386", "0.62530077", "0.6225028", "0.62194663", "0.62037385", "0.61899316", "0.61795795", "0.6166233", "0.61515075", "0.6148706", "0.6148224", "0.6143702", "0.61432755", "0.6138462", "0.6133802", "0.61295444", "0.61241925", "0.61180025", "0.6114041", "0.6112624", "0.610614", "0.610614", "0.610614", "0.6087314", "0.6085097", "0.6079039", "0.6066674", "0.60546845", "0.60509783", "0.60463506", "0.6019543", "0.60108644", "0.5998598", "0.5997175", "0.5991727", "0.5986596", "0.59855855", "0.5985505", "0.59797966", "0.59782237", "0.59718263", "0.5966911", "0.5960933", "0.59548336", "0.5953732", "0.59465665", "0.5937581", "0.5934809", "0.5924416", "0.5923106", "0.5921048", "0.59147596", "0.5909471", "0.5907513", "0.58962864", "0.58947176", "0.58865505", "0.58778137", "0.58765143", "0.58719057", "0.5870132", "0.58647865", "0.5860437", "0.58565426" ]
0.7511858
0
The handler for Apple's APN Token
function tokenHandler(response) { client_configuration['notifications'] = { status: true, token : response }; updateToken(response); userModel.set('udid', response); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function tokenHandler (result) {\n // Your iOS push server needs to know the token before it can push to this device\n // here is where you might want to send it the token for later use.\n // alert('In JS tokenHandler: device token = '+result);\n App.deviceToken = result;\n App.deviceAlias = 'mye'+calcMD5(result);\n // alert('Javascript中, 记录在MyE的Alas:' + App.deviceAlias);\n}", "function deviceTokenSuccess(e) {\n deviceToken = e.deviceToken;\n Ti.API.info('PUSH TOKEN');\n Ti.API.info(deviceToken);\n /*Registramos el Token en el sistema*/\n var url = Alloy.Globals.weburl+'api/v1/setTokenIDUserForNotifications';\n var oSetTokenInCloud = Ti.Network.createHTTPClient({timeout:Alloy.Globals.timeOutWebServices});\n oSetTokenInCloud.setRequestHeader(\"enctype\", \"multipart/form-data\");\n oSetTokenInCloud.setRequestHeader(\"Content-Type:\", \"text/html; charset=utf-8\");\n oSetTokenInCloud.open(\"POST\",url);\n var varsToSend = {\n idUser: Alloy.Globals.id_user,\n token:deviceToken,\n platform:'ios'\n };\n\n oSetTokenInCloud.send(varsToSend);\n oSetTokenInCloud.onerror = function(){\n //alert(\"Error al grabar TOKEN PUSH\");\n }\n Ti.UI.iOS.appBadge = 0;\n }", "function tokenHandler ( req, res, next ) {\n var device = req.body.device\n , sar = req.body.sar\n , auth = req.body.auth\n db.retrieveAgentFromDevice( 'setup', device, function ( e, agent ) {\n if (e) { e.code = \"INTERNAL_ERROR\"; return next(e) }\n if (!agent) {\n e = new Error('Unknown device id.')\n e.code = \"INVALID_DEVICEID\"\n return next(e)\n }\n // Setup Personal Agent does not take passcode as parameter, assumes it is entered\n var payload =\n { 'iss': config.host.setup\n , 'aud': config.host.ix\n , 'sub': agent.sub\n , 'token.a2p3.org':\n { 'sar': sar\n , 'auth':\n { 'passcode': (auth.passcode) ? true : false\n , 'authorization': (auth.authorization) ? true : false\n , 'nfc': (auth.nfc) ? true : false\n }\n }\n }\n var ixToken = token.create( payload, vault.keys[config.host.ix].latest )\n return res.send( {'result': {'token': ixToken }})\n })\n}", "function stripeTokenHandler(token) {\n var obj = {};\n\n obj.UserId = RegistrationService.UserId;\n obj.Auth0Id = RegistrationService.Auth0Identifier;\n obj.Token = token.id;\n obj.coupon_code = $scope.CouponCode;\n\n var data = JSON.stringify(obj);\n\n RegistrationService.HandleStripeToken(data)\n .then(function(response){\n toaster.success('Registration Success', 'You have been successfully registered you may now login.');\n $state.transitionTo('login');\n });\n\n }", "[net.auth_granted]({token}) {\n console.log('SC:auth_granted', token);\n }", "function deviceTokenSuccess(e) {\n\n\t\tTi.App.Properties.setString('app:deviceToken', e.deviceToken);\n\t\tdeviceToken = e.deviceToken;\n\n\t\tpostRegisterDeviceToken(deviceToken);\n\t\tTi.API.info('******** deviceToken *********** ' + deviceToken);\n\n\t}", "verifyTOTPToken (request, reply) {\n reply();\n }", "function processTokenCallback(kc, token) {\n if (kc.debug) {\n console.info('[SSI.KEYCLOAK] Processing Token');\n }\n try {\n setTokenIfValid(kc, token);\n } catch (e) {\n return kc.onAuthError(e);\n }\n return kc.onAuthSuccess();\n }", "function _update_token(){\n try{\n if((!Ti.Network.online)||(Titanium.Platform.model == 'google_sdk' || Titanium.Platform.model == 'Simulator')){\n return;\n }\n if (Titanium.Platform.name == 'iPhone OS'){\n Titanium.Network.registerForPushNotifications({\n types: [\n Titanium.Network.NOTIFICATION_TYPE_BADGE,\n Titanium.Network.NOTIFICATION_TYPE_ALERT,\n Titanium.Network.NOTIFICATION_TYPE_SOUND\n ],\n success:function(e){\n var deviceToken = e.deviceToken;\n var xhr = null;\n if(self.set_enable_keep_alive){\n xhr = Ti.Network.createHTTPClient({\n enableKeepAlive:false\n });\n }else{\n xhr = Ti.Network.createHTTPClient();\n }\n xhr.onload = function(){\n try{\n if((xhr.readyState === 4)&&(this.status === 200)){ \n }else{\n return; \n }\n }catch(e){\n var params = {\n message:'',\n show_message:false,\n message_title:'',\n send_error_email:true,\n error_message:e,\n error_source:window_source+' - _update_token - success from server - 1',\n server_response_message:this.responseText\n };\n self.processXYZ(params); \n return;\n }\n };\n xhr.onerror = function(e){\n var params = {\n message:'',\n show_message:false,\n message_title:'',\n send_error_email:true,\n error_message:e,\n error_source:window_source+' - _update_token - success from server - 2',\n server_response_message:this.responseText\n };\n self.processXYZ(params); \n return;\n };\n xhr.setTimeout(self.default_time_out);\n xhr.open('POST',self.get_host_url()+'update',false);\n xhr.send({\n 'type':'update_token',\n 'hash':_user_id,\n 'company_id':_company_id,\n 'manager_user_id':_user_id,\n 'token':deviceToken,\n 'app_security_session':self.is_simulator()?self.default_udid:Titanium.Platform.id,\n 'app_version_increment':self.version_increment,\n 'app_version':self.version,\n 'app_platform':self.get_platform_info()\n });\n },\n error:function(e){\n var params = {\n message:'',\n show_message:false,\n message_title:'',\n send_error_email:true,\n error_message:e,\n error_source:window_source+' - _update_token - error from server',\n server_response_message:this.responseText\n };\n self.processXYZ(params); \n },\n callback:function(e){\n var params = {\n message:'',\n show_message:false,\n message_title:'',\n send_error_email:true,\n error_message:e,\n error_source:window_source+' - _update_token - call back from server',\n server_response_message:this.responseText\n };\n self.processXYZ(params); \n }\n });\n }\n if((Ti.Platform.name).toLowerCase() === 'android'){\n \n }\n }catch(err){\n self.process_simple_error_message(err,window_source+' - _update_token');\n return;\n }\n }", "function showToken(response){\n console.log(response);\n}", "_jwtTokenFired(e){this.jwt=e.detail}", "function tradeCodeForAccessToken() {\n return axios.post(`https://${process.env.REACT_APP_AUTH0_DOMAIN}/oauth/token`, payload).catch(error => {\n console.log('--- error getting access token ---', error); \n })\n }", "function tradeCodeForAccessToken() {\n return axios.post(`https://${process.env.REACT_APP_AUTH0_DOMAIN}/oauth/token`, payload)\n }", "function deviceTokenSuccess(e){\n var servidor;\n var deviceToken = e.deviceToken;\n Ti.API.info(\"*** Token: \" + deviceToken );\n Utiles.grabarOpcion( \"deviceToken\", deviceToken );\n Utiles.registrarEnServidor(deviceToken);\n }", "function deviceTokenSuccess(e) {\n Ti.API.info('succesfuly registered');\n CloudPush.enabled = true;\n CloudPush.focusAppOnPush = true;\n CloudPush.showTrayNotification = true;\n CloudPush.showAppOnTrayClick = true;\n //CloudPush.showTrayNotificationsWhenFocused = true;\n //CloudPush.bubbleParent = true;\n deviceToken = e.deviceToken;\n Ti.App.Properties.setString('deviceToken', deviceToken);\n}", "async function badgeBookTokenHandler(req, res, next) {\n let token = req.cookies[BADGEBOOK_COOKIE_NAME];\n let tokenPayload;\n\n try {\n let key = await jose.JWK.asKey(KEY_JSON);\n let verifier = await jose.JWS.createVerify(key);\n let verifiedToken = await verifier.verify(token);\n let payload = JSON.parse(verifiedToken.payload.toString());\n\n if (payload) {\n tokenPayload = payload;\n }\n } catch (err) {\n // We had some sort of error. You could log it if you want.\n }\n\n // If token is valid, attach details to request. You can use these to\n // implement security or make decisions later on down your filtering chain.\n if (tokenPayload) {\n req.isValidBadgeBookUser = true;\n req.badgeBookUserDetails = tokenPayload;\n }\n next();\n}", "function signtokenHandler(req, res) {\n const user = req.user\n const otpTokenVerified = req.otpTokenVerified\n const token = signToken(user, { hasVerified2FA: otpTokenVerified })\n res.json({ token: token })\n}", "async authenticate(code) {\n const tokenResponse = await fetch('https://accounts.spotify.com/api/token', {\n method: 'POST',\n headers: {\n 'Authorization': 'Basic ' + Buffer.from(clientId + ':' + clientSecret).toString('base64')\n },\n mode: 'cors',\n body: new URLSearchParams({\n 'code': code,\n 'redirect_uri': redirectUri,\n 'grant_type': 'authorization_code'\n }\n )\n });\n const tokens = await tokenResponse.json();\n const accessToken = tokens.access_token;\n const refreshToken = tokens.refresh_token;\n console.log(\"Authorization token retrieved: \" + accessToken);\n this.setTokens(accessToken, refreshToken);\n }", "async extractFromAuthCode () {\n\t\ttry {\n\t\t\tthis.payload = this.api.services.tokenHandler.decode(this.request.query.code);\n\t\t}\n\t\tcatch (error) {\n\t\t\tconst message = typeof error === 'object' ? error.message : error;\n\t\t\tthrow this.errorHandler.error('tokenInvalid', { reason: message });\n\t\t}\n\t\tif (this.payload.type !== 'pauth') {\n\t\t\tthrow this.errorHandler.error('tokenInvalid', { reason: 'not a provider authorization token' });\n\t\t}\n\t}", "function adalCallback(error, token) {\n if (!error){\n //call DynamicsWebApi callback only when a token has been retrieved\n dynamicsWebApiCallback(token);\n }\n else{\n console.log('Token has not been retrieved. Error: ' + error.stack);\n }\n }", "approveTokensToContract(){\n var self = this;\n var tokens = 1000000;\n registerApiCall.approveTokenForRegisterUser(userPrivateKey,tokens,function(err,result){\n if(result){\n Alert.alert(\"Registration\", \"Registration completed successfully.\" ,\n [ {text: 'OK', onPress: () => self.openHomeScreen()}, ] )\n }else{\n Alert.alert( 'Alert', 'Something went wrong \\n' +err,\n [\n {text: 'OK', onPress: () => self.setState({loaderVisible:false})},\n ], { cancelable: false } );\n }\n\n });\n}", "onTokenResponseEvent(handler) {\n return this.on('TokenResponseEvent', handler);\n }", "function deviceTokenSuccess(e) {\n\n var registerParams = {};\n\n if (OS_IOS) {\n Ti.API.info(\"retrieved token!: \" + e.deviceToken);\n deviceToken = e.deviceToken;\n\n //*******************************************************\n // REMOVE APPLICATION SPECIFIC CODE FROM LIBRARY\n // no alloy models code should be here!!\n registerParams = {\n\n body : {\n \"deviceType\" : \"ios\",\n \"deviceToken\" : e.deviceToken,\n \"appIdentifier\" : Titanium.App.id,\n \"appName\" : Titanium.App.name,\n \"appVersion\" : Titanium.App.version,\n \"installationId\" : Ti.Platform.createUUID(),\n \"userId\" : userId\n }\n };\n } else {\n // _params.notificationReceive - function to call when a push is recieved\n // _params.notificationOpen - function to call when push is opened\n\n Ti.API.debug(\"registering the android device for push\");\n\n //*******************************************************\n // REMOVE APPLICATION SPECIFIC CODE FROM LIBRARY\n // no alloy models code should be here!!\n registerParams = {\n notificationReceive : receivePush,\n body : {\n \"deviceType\" : \"android\",\n \"userId\" : userId\n }\n };\n }\n parseService.registerPush(registerParams).then(function(_response) {\n Ti.API.info(\"IOS: parseService.registerPush - \" + JSON.stringify(_response));\n\n /// Storing the installation ID for later update.\n Ti.App.Properties.setString(\"generated.installationId\", uuid);\n Ti.App.Properties.setString(\"parse.installationId\", _response.objectId);\n\n }, function(_error) {\n Ti.API.error(\"IOS: parseService.registerPush ERROR- \" + JSON.stringify(_error));\n alert(\"IOS: parseService.registerPush ERROR- \" + JSON.stringify(_error));\n });\n\n}", "function stripeTokenHandler(token) {\n //..send to server ...\n var callback = $parse(attrs.planCheckout);\n if (typeof callback === 'function') {\n scope.planCheckout({token: token});\n }\n console.log(\"inside stripeTokenHandler\" + token);\n }", "onSendToken() {\n const {activity} = this.state;\n if (activity === \"registerNewEmail\") {\n const {contactAddress, contactType} = this.state;\n this.doTokenRequest(\"POST\", \"/auth/newContact/sendVerify\", \"sendCode\",\n {contactAddress, contactType});\n } else {\n const {username} = this.state;\n this.doTokenRequest(\"POST\", \"/auth/user/sendVerify\",\n \"sendCode\", {username});\n }\n\n }", "function onLoadToken() {\n if (this.status >= 400) {\n console.warn('failed to load token', this.status, this.responseText);\n reject(originalError);\n return;\n }\n const token = this.responseText.trim();\n // We have a token! attempt to open a WebSocket again.\n const newUri = `${uri}?rtspwssession=${token}`;\n const ws2 = new WebSocket(newUri, protocol);\n ws2.binaryType = 'arraybuffer';\n ws2.onerror = (err) => {\n reject(err);\n };\n ws2.onopen = () => resolve(ws2);\n }", "_onNewAccessToken() {\n super._onNewAccessToken();\n if (this.accessToken !== '') {\n this.socket.emit('initiate', { accessToken: this.accessToken })\n }\n }", "authToken(state, token) {\n state.authToken = token;\n }", "getAccessToken() {}", "function tokenHandler (result)\n{\n\tlocalStorage.registrationId = result;\n\tvar jqxhr = $.ajax(\n\t{\t\t\t\n\t\turl: localStorage.registerPushnotificationRegIDURL + result,\n\t\ttype:\"GET\",\n\t\tdataType: \"json\"\n\t});\n}", "function authCallback(errorDesc, token, error, tokenType) {\n // This function is called after loginRedirect and acquireTokenRedirect. Use tokenType to determine context.\n // For loginRedirect, tokenType = \"id_token\". For acquireTokenRedirect, tokenType:\"access_token\".\n if (token) {\n this.acquireTokenSilent(applicationConfig.graphScopes).then(function (accessToken) {\n const user = AuthAgent.getUser();\n // set to store the user with a wait glovbal action for app runStart !\n waitForGlobal('Store', function() {\n Store.dispatch('user/loginUser', { user: user, token: accessToken })\n });\n }, function (error) {\n // fallback on popup mode if redirect mode not working\n this.acquireTokenPopup(applicationConfig.graphScopes).then(function (accessToken) {\n const user = AuthAgent.getUser();\n // set to store the user with a wait glovbal action for app runStart !\n waitForGlobal('Store', function() {\n Store.dispatch('user/loginUser', { user: user, token: accessToken })\n });\n }, function (error) {\n console.log(error);\n });\n });\n }\n else if (errorDesc || error) {\n console.log(error + ':' + errorDesc);\n }\n}", "function stripeTokenHandler(token) {\n // Insert the token ID into the form so it gets submitted to the server\n var form = document.getElementById('payment-form');\n var hiddenInput = document.createElement('input');\n hiddenInput.setAttribute('type', 'hidden');\n hiddenInput.setAttribute('name', 'stripeToken');\n hiddenInput.setAttribute('value', token.id);\n form.appendChild(hiddenInput);\n // Submit the form\n form.submit();\n }", "function getToken() {\n $.post(appServerUrl + \"/user\", null, (data, status) => {\n console.log(\"got response from /user\", data, status);\n token = data.token;\n initializeSession();\n });\n}", "function handleToken(token) {\n axios.post(`http://localhost:3030/Checkout/checkout`,{token,event})\n .then(function (response) {\n const { status } = response.data;\n console.log(\"Response:\", response.data);\n\n if (status === \"success\") {\n toastr.success('Success! Check email for details', {\n positionClass: \"toast-top-left\",\n })\n } else { \n toastr.warning('Something went wrong', {\n positionClass: \"toast-top-left\",\n })\n }\n }).catch(function (err) {\n console.log(err);\n });\n }", "getRequestToken() {\n return apiClient.get(\n '/authentication/token/new?api_key=6c1e80dae659cb7d1abdf16afd8bb0e3'\n )\n }", "onToken(token) {\n return token;\n }", "onToken(token) {\n return token;\n }", "function stripeTokenHandler(token) {\n // Insert the token ID into the form so it gets submitted to the server\n var hiddenInput = document.createElement(\"input\");\n hiddenInput.setAttribute(\"type\", \"hidden\");\n hiddenInput.setAttribute(\"name\", \"stripeToken\");\n hiddenInput.setAttribute(\"value\", token.id);\n form.appendChild(hiddenInput);\n\n // Submit the form\n form.submit();\n}", "function checkToken() {\n const kc = this;\n const url = `${getRealmUrl(kc)}/protocol/openid-connect/userinfo`;\n\n if (kc.debug) {\n console.info('[SSI.KEYCLOAK] Checking token from:', url);\n }\n\n const req = new XMLHttpRequest();\n req.open('GET', url, true);\n req.setRequestHeader('Authorization', `bearer ${kc.token}`);\n\n req.onreadystatechange = function() {\n if (req.readyState !== 4) return;\n if (req.status === 200) {\n if (kc.debug) {\n console.log('[SSI.KEYCLOAK] Token checks out');\n }\n return;\n }\n if (kc.debug) {\n console.info(\n '[SSI.KEYCLOAK] Token was revoked. Logging out...'\n );\n }\n localLogout(kc);\n };\n req.send();\n }", "function fetchAuthToken() { \r\n _authToken();\r\n }", "function deviceTokenSuccess(e) {\n\tdeviceToken = e.deviceToken;\n\tlocalStorage.saveDeviceToken(e.deviceToken);\n}", "function callbackMethod(req, res){\n console.log(\"==Token:==\".blue) \n console.log((req.query.code).yellow);\n var authorizationCode = req.query.code;\n console.log(\"==========\".blue)\n res.send(\"thx\"); // return something to make the browser happy\n\n // pass the token/code to the spotify controller and start authentication\n spotifyController.initialiseAuthentication(authorizationCode);\n}", "getAPIToken(username, password, twofactor) {\n \n this.baseurl = this.baseurl.trim();\n this.baseurl = this.baseurl.replace(/\\/$/, \"\");\n this.baseurl = this.baseurl.replace(/\\s/, \"\");\n \n // Retrieve tokens\n return fetch(this.baseurl + '/session/login/', {\n method: 'GET',\n credentials: 'same-origin',\n headers: {\n Accept: 'application/json',\n //'Content-Type': 'application/json'\n }\n })\n .then((tokenresponse) => tokenresponse.json())\n .then((tokenresponseJson) => {\n \n console.log(tokenresponseJson);\n \n // See if we're already logged in\n if (tokenresponseJson['api-token'] != '' && tokenresponseJson['api-token'] !== null) {\n return tokenresponseJson;\n }\n \n var params = {\n email: username, \n password: password,\n __bTk: tokenresponseJson.csrf[0].token,\n __bTs: tokenresponseJson.csrf[0].time,\n __bTa: tokenresponseJson.csrf[0].action\n };\n \n if (twofactor !== '' && twofactor !== null) {\n params['2fa'] = twofactor;\n }\n \n var formdata = new FormData();\n \n for (var k in params) {\n formdata.append(k, params[k]);\n }\n \n var query = {\n method: 'POST',\n credentials: 'same-origin',\n headers: {\n Accept: 'application/json',\n //'Content-Type': 'application/json'\n },\n body: formdata\n };\n\n return fetch(this.baseurl + '/session/login/', query)\n .then((response) => response.json())\n .then((responseJson) => {\n //console.log(responseJson);\n //console.log(\"Response: \" + JSON.stringify(responseJson));\n return responseJson;\n })\n .catch((error) => {\n console.warn(error)\n });\n \n })\n .catch((tokenerror) => {\n console.warn(tokenerror)\n });\n \n }", "function renewAppUserToken() {\n\n }", "function stripeTokenHandler(token, form) {\n // Insert the token ID into the form so it gets submitted to the server\n // var form = document.getElementById('stripe-payment-form');\n var hiddenInput = document.createElement('input');\n hiddenInput.setAttribute('type', 'hidden') ;\n hiddenInput.setAttribute('name', 'stripeToken');\n hiddenInput.setAttribute('value', token.id);\n form.appendChild(hiddenInput);\n\n // Submit the form\n form.submit();\n }", "function stripeTokenHandler(token) {\n // Insert the token ID into the form so it gets submitted to the server\n var form = document.getElementById('payment-form');\n var hiddenInput = document.createElement('input');\n hiddenInput.setAttribute('type', 'hidden');\n hiddenInput.setAttribute('name', 'stripeToken');\n hiddenInput.setAttribute('value', token.id);\n form.appendChild(hiddenInput);\n\n // Submit the form\n form.submit();\n}", "receive (token, callback) {\n // verifyJWT\n }", "generateAccessToken(){\n\t\treturn \"token\"\n\t}", "function storeDeviceToken(type) {\n // Create a random userid to store with it\n var data = {\"type\": \"notification_\" + type, \"data\": $scope.regId};\n console.log(\"Store token for registered device with data \" + JSON.stringify(data));\n $scope.setRequestProperty(data);\n }", "function validateToken(caData, rt) {\n\treturn new Promise(function(resolve, reject) {\n\t\tvar ep = rt.ep;\n\t\t\n\t\tif (ep.rs === 'token' && ep.app === 'admin')\n\t\t\t// automatic pass of @admin/token/...\n\t\t\tresolve( {userID: GUEST_USER_ID} );\n\t\telse {\n\t\t\tvar inData = rt.inData;\n\t\t\t\n\t\t\tif (inData.state) {\n\t\t\t\t// \"state\" is used as the anti-csrf token\n\t\t\t\tvar stateStr = inData.state,\n\t\t\t\t\t idx = stateStr.indexOf('http', 32);\t// 32 is the default appKey length\n\t\t\t\t\n\t\t\t\tif (stateStr.substring(0, 2) === '__' && idx > 0) {\n\t\t\t\t\t// when talking to FB, we'll embed the appKey and login done page in the 'state' variable\n\t\t\t\t\tvar appKey = stateStr.substring(2, idx);\n\t\t\t\t\tif (appKey === caData.appKey) {\n\t\t\t\t\t\tinData.nextPage = stateStr.substring(idx);\n\t\t\t\t\t\treturn resolve( {userID: GUEST_USER_ID} );\n\t\t\t\t\t}\n\t\t\t\t} \n\t\t\t}\n\t\t\t\n\t\t\t// when dealing with FB login, we have to accept token as part of the URL\n\t\t\tvar token = rt.req.headers['x-deva-token'] || rt.inData._tkn;\n\t\t\tif (token) {\n\t\t\t\tif (token.length < TOKEN_LENGTH)\n\t\t\t\t\treturn reject( errUtil.err(errUtil.INVALID_TOKEN) );\n\n\t\t\t\ttokenUtil.validateToken(caData, token, function(err, uPro) {\n\t\t\t\t\tif (err)\n\t\t\t\t\t\treturn reject( err );\n\t\t\t\t\t\t\n\t\t\t\t\tuPro.token = token;\n\t\t\t\t\tresolve( uPro );\n\t\t\t\t});\n\t\t\t}\n\t\t\telse {\n\t\t\t\tvar appKey = rt.req.headers['x-deva-appkey'],\n\t\t \t\t\t appSecret = rt.req.headers['x-deva-appsecret'];\n\t\t\t\t//console.log('input appKey: %s, appSecret: %s', appKey, appSecret);\n\t\t\t\t//console.log('app appKey: %s, appSecret: %s', caData.appKey, caData.appSecret);\n\t\t\t\t\t \n\t\t\t\tif (caData.appKey === appKey) {\n\t\t\t\t\tvar uPro = {userID: GUEST_USER_ID};\n\t\t\t\t\tresolve( uPro ); \n\t\t\t\t}\n\t\t \t\t/*\n\t\t\t\tif (caData.appKey === appKey && (!appSecret || caData.appSecret === appSecret)) {\n\t\t\t\t\tvar uPro = {userID: GUEST_USER_ID};\n\t\t\t\t\tresolve( uPro );\n\t\t\t\t}\n\t\t\t\t*/\n\t\t\t\telse\n\t\t\t\t\treject( errUtil.err(errUtil.NO_TOKEN) );\n\t\t\t}\n\t\t}\n\t});\n}", "function stripeTokenHandler(token) {\n // Insert the token ID into the form so it gets submitted to the server\n var form = document.getElementById('payment-form');\n var hiddenInput = document.createElement('input');\n hiddenInput.setAttribute('type', 'hidden');\n hiddenInput.setAttribute('name', 'stripeToken');\n hiddenInput.setAttribute('value', token.id);\n form.appendChild(hiddenInput);\n\n // Submit the form\n form.submit();\n}", "function conectApi() {\n fetch('https://api.nvoip.com.br/v2/oauth/token', {\n method: 'POST',\n headers: { ...defaultHeaders, ...authorizationHeaders },\n body: credentials,\n })\n .then((res) => res.json()) // retorna a resposta da requisição em formato JSON\n .then((data) => {\n access_token = data['access_token']; // acessa o access_token\n alert('Conectado com a Nvoip!');\n })\n .catch((error) => console.log(error)); // caso ocorra um erro na requisição\n}", "function requestToken() {\n // Creates promise-storing object.\n var deferred = Q.defer();\n var retrieveTokenParams = { 'form': {\n 'APIKey': apiInfoObject.apiKey,\n 'apipassword': apiInfoObject.apiPassword, \n 'action': 'token'\n }}\n requestHttp.post(apiInfoObject.apiUrl, retrieveTokenParams, function(err, response, body) {\n if (!err) {\n try {\n var jsonBody = JSON.parse(body);\n if (jsonBody.statusDescription == 'success') {\n logger.log('debug', 'Request for token returned body:' + jsonBody);\n deferred.resolve(JSON.parse(body).token);\n } else {\n logger.error('Unable to retrieve a donation token from the DonorsChoose API for user mobile:' \n + donorPhone);\n sendSMS(donorPhone, donationConfig.error_start_again);\n }\n }\n catch (e) {\n logger.error('Failed trying to parse the donation token request response from DonorsChoose.org for user mobile:' \n + donorPhone + ' Error: ' + e.message + '| Response: ' + response + '| Body: ' + body);\n sendSMS(donorPhone, donationConfig.error_start_again);\n }\n }\n else {\n deferred.reject('Was unable to retrieve a response from the submit donation endpoint of DonorsChoose.org, user mobile: ' \n + donorPhone + 'error: ' + err);\n sendSMS(donorPhone, donationConfig.error_start_again);\n }\n });\n return deferred.promise;\n }", "async acquireTokenInteractive(request) {\n const correlationId = request.correlationId || this.cryptoProvider.createNewGuid();\n this.logger.trace(\"acquireTokenInteractive called\", correlationId);\n const {\n openBrowser,\n successTemplate,\n errorTemplate,\n windowHandle,\n loopbackClient: customLoopbackClient,\n ...remainingProperties\n } = request;\n if (this.nativeBrokerPlugin) {\n var _remainingProperties$;\n const brokerRequest = {\n ...remainingProperties,\n clientId: this.config.auth.clientId,\n scopes: request.scopes || msalCommon.OIDC_DEFAULT_SCOPES,\n redirectUri: `${Constants.HTTP_PROTOCOL}${Constants.LOCALHOST}`,\n authority: request.authority || this.config.auth.authority,\n correlationId: correlationId,\n extraParameters: {\n ...remainingProperties.extraQueryParameters,\n ...remainingProperties.tokenQueryParameters\n },\n accountId: (_remainingProperties$ = remainingProperties.account) == null ? void 0 : _remainingProperties$.nativeAccountId\n };\n return this.nativeBrokerPlugin.acquireTokenInteractive(brokerRequest, windowHandle);\n }\n const {\n verifier,\n challenge\n } = await this.cryptoProvider.generatePkceCodes();\n const loopbackClient = customLoopbackClient || new LoopbackClient();\n const authCodeListener = loopbackClient.listenForAuthCode(successTemplate, errorTemplate);\n const redirectUri = loopbackClient.getRedirectUri();\n const validRequest = {\n ...remainingProperties,\n correlationId: correlationId,\n scopes: request.scopes || msalCommon.OIDC_DEFAULT_SCOPES,\n redirectUri: redirectUri,\n responseMode: msalCommon.ResponseMode.QUERY,\n codeChallenge: challenge,\n codeChallengeMethod: msalCommon.CodeChallengeMethodValues.S256\n };\n const authCodeUrl = await this.getAuthCodeUrl(validRequest);\n await openBrowser(authCodeUrl);\n const authCodeResponse = await authCodeListener.finally(() => {\n loopbackClient.closeServer();\n });\n if (authCodeResponse.error) {\n throw new msalCommon.ServerError(authCodeResponse.error, authCodeResponse.error_description, authCodeResponse.suberror);\n } else if (!authCodeResponse.code) {\n throw NodeAuthError.createNoAuthCodeInResponseError();\n }\n const clientInfo = authCodeResponse.client_info;\n const tokenRequest = {\n code: authCodeResponse.code,\n codeVerifier: verifier,\n clientInfo: clientInfo || msalCommon.Constants.EMPTY_STRING,\n ...validRequest\n };\n return this.acquireTokenByCode(tokenRequest);\n }", "function storeDeviceToken(type) {\n // Create a random userid to store with it\n var user = {\n user: 'user' + Math.floor((Math.random() * 10000000) + 1),\n type: type,\n token: $scope.regId\n };\n console.log(\"Post token for registered device with data \" + JSON.stringify(user));\n $cordovaToast.showShortCenter(\"Post token for registered device with data \" + JSON.stringify(user));\n $http.post('http://192.168.1.106:8000/subscribe', JSON.stringify(user))\n .success(function(data, status) {\n console.log(\"Token stored, device is successfully subscribed to receive push notifications.\");\n $cordovaToast.showShortCenter('Token stored, device is successfully subscribed to receive push notifications.');\n })\n .error(function(data, status) {\n console.log(\"Error storing device token.\" + data + \" \" + status)\n });\n }", "function storeDeviceToken(type) {\n // Create a random userid to store with it\n var user = { uid: auth.profile.user_id, type: type, token: $scope.regId };\n $scope.method = 'POST';\n $scope.url = 'http://46.101.46.12/ChatCatApi/api/addGSMUser.php';\n //execute method\n $http({method: $scope.method, url: $scope.url, data: JSON.stringify(user), headers : {'Content-Type':'application/x-www-form-urlencoded; charset=UTF-8'}}).\n success(function(data, status) {\n //if added information, it will log OK and redirect.\n console.log(\"Token stored, device is successfully subscribed to receive push notifications.\");\n //redirect to main post page\n }).error(function(data, status) {\n $scope.status = status;\n console.log(\"Error storing device token.\" + data + \" \" + status)\n });\n}", "validateToken(req, res, next) {\n //Token uit header halen\n const token = req.header(\"x-access-token\") || \"\";\n\n //Token decoderen\n authentication.decodeToken(token, (err, payload) => {\n if (err) {\n //Foutief token, ga naar error endpoint\n const error = new ApiError(err.message || err, 401);\n next(error);\n } else {\n //Correct\n //console.log(\"Authenticated! Payload = \");\n //console.dir(payload);\n req.user = payload.sub;\n next();\n }\n });\n }", "token(payload, done) {\n User().setToken(payload, done)\n }", "function authSuccess(token) {\n return {\n type: Constants.AUTH_SUCCESS,\n token: token\n };\n}", "function stripeTokenHandler(token) {\n // Insert the token ID into the form so it gets submitted to the server\n var form = document.getElementById('payment-form');\n var hiddenInput = document.createElement('input');\n hiddenInput.setAttribute('type', 'hidden');\n hiddenInput.setAttribute('name', 'stripeToken');\n hiddenInput.setAttribute('value', token.id);\n form.appendChild(hiddenInput);\n\n// Submit the form\n form.submit();\n}", "stripeTokenHandler(token) {\n // Insert the token ID into the form so it gets submitted to the server\n var form = this.formTarget;\n var hiddenInput = document.createElement('input');\n hiddenInput.setAttribute('type', 'hidden');\n hiddenInput.setAttribute('name', 'stripeToken');\n hiddenInput.setAttribute('value', token.id);\n form.appendChild(hiddenInput);\n\n //prevent overclicking.\n this.submitButtonTarget.classList.add(\"hidden\");\n\n // Submit the form\n form.submit();\n }", "function oauthaccountkit(url_app, uri) {\n var deferred = $q.defer();\n if(window.cordova) {\n if($cordovaOauthUtility.isInAppBrowserInstalled()) {\n var redirect_uri = \"http://localhost/callback\";\n if(typeof uri !== undefined) {\n redirect_uri = uri;\n }\n var api_id = '531228893597329';\n var browserRef = window.cordova.InAppBrowser.open('https://www.accountkit.com/v1.0/dialog/sms_login/?app_id='+api_id+'&country_code=%2B55&fb_app_events_enabled=true&locale=pt_BR&logging_ref=f2b531fda08f9f4&origin=' + url_app + '&sdk=web&state=abcd', '_blank', 'toolbar=no,zoom=no,location=no,clearsessioncache=yes,clearcache=yes');\n browserRef.addEventListener('loadstart', function(event) {\n if((event.url).indexOf(redirect_uri) === 0) {\n var accessToken = (event.url).split(\"#token:\")[1].split(',')[0];\n deferred.resolve({error: false, success: true, access_token: accessToken, callback: redirect_uri});\n } else {\n deferred.reject({success: false, callback: redirect_uri, error: true, access_token: null});\n }\n });\n browserRef.addEventListener('exit', function(event) {\n deferred.reject(\"The sign in flow was canceled\");\n });\n } else {\n deferred.reject(\"Could not find InAppBrowser plugin\");\n }\n } else {\n deferred.reject(\"Cannot authenticate via a web browser\");\n }\n return deferred.promise;\n }", "function receivePaymentToken(token, pmData) {\n // Hide the form div, show the success div\n show(successDiv);\n hide(formDiv);\n hide(errorDiv);\n\n // Add the card info to the success div\n document.getElementById(`${prefix}_card_type`).innerHTML = pmData.card_type;\n document.getElementById(`${prefix}_card_truncated`).innerHTML = pmData.last_four_digits;\n\n // Fill in the token\n tokenField.setAttribute(\"value\", token);\n\n // Enable the submit button\n formSubmit.disabled = false;\n }", "function signIn() {\n myMSALObj.loginPopup(loginRequest)\n .then(loginResponse => {\n // get the accesstoken for the user\n getTokenPopup(loginRequest);\n\n }).catch(error => {\n console.log(error);\n });\n}", "async function oauth(req, res, next) {\n\n let code = req.query.code;\n let token = `https://api.login.yahoo.com/oauth2/get_token`;\n // let remoteUserURL = ``;\n\n try {\n const access_token = await exchangeCodeForToken(code);\n }\n\n}", "static postCode () {\n var token = /access_token=([^&]+)/.exec(window.document.location.hash)\n var expires_in = /expires_in=([^&]+)/.exec(window.document.location.hash)\n var state = /state=([^&]+)/.exec(window.document.location.hash)\n var error = /error=([^&]+)/.exec(window.document.location.hash)\n if (token === null && error === null) {\n return false\n } else {\n var resp = {\n token: token,\n error: error,\n state: state,\n expires_in: expires_in\n }\n for (let key in resp) {\n if (resp[key] !== null) {\n resp[key] = resp[key][1]\n }\n }\n if (window.opener !== null) {\n // the origin should be explicitly specified instead of \"*\"\n window.opener.postMessage({ source: MESSAGE_SOURCE_IDENTIFIER, payload: resp }, '*')\n }\n return true\n }\n }", "function fetchToken() {\n $.getJSON(buildTokenUrl(), {command: 'request'}, response => {\n token = response.token;\n console.log(`session token fetched: ${token}`);\n });\n}", "async getTokenAuth(service) {\n\t\tconst date = new Date();\n\t\n\t\t// Tokent request authorization XML\n\t\tconst tra = (`<?xml version=\"1.0\" encoding=\"UTF-8\" ?>\n\t\t<loginTicketRequest version=\"1.0\">\n\t\t\t<header>\n\t\t\t\t<uniqueId>${Math.floor(date.getTime() / 1000)}</uniqueId>\n\t\t\t\t<generationTime>${new Date(date.getTime() - 600000).toISOString()}</generationTime>\n\t\t\t\t<expirationTime>${new Date(date.getTime() + 600000).toISOString()}</expirationTime>\n\t\t\t</header>\n\t\t\t<service>${service}</service>\n\t\t</loginTicketRequest>`).trim();\n\n\t\t// Get cert from parameters\n\t\tconst certPromise = this.afip.CERT\n\t\t\t\n\t\t// Get key from parameters\n\t\tconst keyPromise = this.afip.PRIVATEKEY\n\n\t\t// Wait for cert and key content\n\t\tconst [cert, key] = await Promise.all([certPromise, keyPromise]);\n\n\t\t// Sign Tokent request authorization XML\n\t\tconst p7 = forge.pkcs7.createSignedData();\n\t\tp7.content = forge.util.createBuffer(tra, \"utf8\");\n\t\tp7.addCertificate(cert);\n\t\tp7.addSigner({\n\t\t\tauthenticatedAttributes: [{\n\t\t\t\ttype: forge.pki.oids.contentType,\n\t\t\t\tvalue: forge.pki.oids.data,\n\t\t\t}, \n\t\t\t{\n\t\t\t\ttype: forge.pki.oids.messageDigest\n\t\t\t}, \n\t\t\t{\n\t\t\t\ttype: forge.pki.oids.signingTime, \n\t\t\t\tvalue: new Date()\n\t\t\t}],\n\t\t\tcertificate: cert,\n\t\t\tdigestAlgorithm: forge.pki.oids.sha256,\n\t\t\tkey: key,\n\t\t});\n\t\tp7.sign();\n\t\tconst bytes = forge.asn1.toDer(p7.toAsn1()).getBytes();\n\t\tconst signedTRA = Buffer.from(bytes, \"binary\").toString(\"base64\");\n\n\t\t// SOAP Client options\n\t\tconst soapClientOptions = { disableCache:true, endpoint: this.afip.WSAA_URL };\n\n\t\t// Create SOAP client\n\t\tconst soapClient = await soap.createClientAsync(this.afip.WSAA_WSDL, soapClientOptions);\n\n\t\t// Arguments for soap client request \n\t\tconst loginArguments = { in0: signedTRA };\n\t\t\n\t\t// Call loginCms SOAP method\n\t\tconst [ loginCmsResult ] = await soapClient.loginCmsAsync(loginArguments)\n\n\t\t// Parse loginCmsReturn to JSON \n\t\tconst res = await xmlParser.parseStringPromise(loginCmsResult.loginCmsReturn); \n\n\t\treturn JSON.stringify(res.loginticketresponse)\n\t}", "function exchangeOAuth2Token(params) {\n const oauth2Endpoint = 'https://www.googleapis.com/oauth2/v3/tokeninfo';\n\n if (params['access_token']) {\n const xhr = new XMLHttpRequest();\n\n xhr.open('POST', oauth2Endpoint + '?access_token=' + params['access_token']);\n xhr.onreadystatechange = function() {\n const response = xhr.response ? JSON.parse(xhr.response) : {};\n\n // When request is finished, verify that the 'aud' property in the\n // response matches YOUR_CLIENT_ID.\n if (xhr.readyState == 4 && xhr.status == 200 &&\n response['aud'] && response['aud'] == YOUR_CLIENT_ID) {\n\n // Store granted scopes in local storage to facilitate\n // incremental authorization.\n params['scope'] = response['scope'];\n\n localStorage.setItem('oauth2-waes-list', JSON.stringify(params));\n\n if (params['state'] == 'start_app') {\n console.log('token ready');\n startApp();\n }\n } else if (xhr.readyState == 4) {\n console.log('There was an error processing the token, another response was returned, or the token was invalid.')\n }\n };\n xhr.send(null);\n }\n}", "function maketoken(info){\n info.expires=Date.now()+tokenExpiresTime\n return jwt.encode(info,secret)\n}", "function getToken(sessionId) {}", "async function getToken(code) {\n let url = \"https://api.weibo.com/oauth2/access_token?\" + `client_id=1606107874&client_secret=dc58406953c628e820ad3aedfa70a4cf&grant_type=authorization_code&code=${code}&redirect_uri=http://www.rikuki.cn/passWeibo.html`;\n let data = {\n client_id: \"1606107874\",\n client_secret: \"dc58406953c628e820ad3aedfa70a4cf\",\n grant_type: \"authorization_code\",\n code: code,\n redirect_uri: \"http://www.rikuki.cn/main.html\"\n }\n let options = {\n method: 'POST',\n uri: url,\n headers: {\n 'User-Agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/68.0.3440.106 Safari/537.36',\n 'Content-Type': 'application/json'\n },\n body: {},\n json: true\n };\n try {\n let response = await rp(options);\n return Promise.resolve({status: 2000, info:{token: response.access_token, uid: response.uid}});\n } catch(err) {\n console.log(err);\n return Promise.resolve({status: 4000, info: \"get token fail\"});\n }\n}", "function checkToken(result) {\n \n node.get('MTID', function(authorized) {\n var msg;\n if (authorized.success) {\n // No errors.\n result([]);\n }\n else {\n msg = 'Token authorization failed: ' + authorized.msg;\n result([msg]);\n }\n }, 'SERVER', token);\n }", "function successHandler (result) {\n console.log('result = ' + result);\n user_token = result;\n FB.init({ appId: \"825295254244111\", nativeInterface: CDV.FB, useCachedDialogs: false });\n}", "function onTokenResponse(body) {\n persist(store.set(TOKEN, body));\n return body;\n}", "function handleClick() {\n\t\tpaymentsClient.loadPaymentData(getRequest()).then(function(paymentData){\n\t\t\tconst $data = paymentData.paymentMethodData.tokenizationData.token\n\t\t\tgpaytoken($data);\n\n\t\t}).catch(function(err){\n\t\t\tself.hide(err);\n\t\t});\n\n\t}", "receiveAccessToken(eventName,at){\n return this.credentials[eventName].receive(at);\n }", "function getOAuthToken(res) {\n var baseURL = 'https://publicapi.avans.nl/oauth/request_token';\n var key = '17f48ee9e866d30bd4f4bdbce3f5e2c7b292ddab';\n var secret = '6ab1750c99cfdaf73d6c198f3e9a4a3511ff15a2';\n var callback = 'http://127.0.0.1:8080/callback';\n var nonce = 'Du0x1J'; //generateNonce();\n var timestamp = 1496756772; //Math.floor(new Date() / 1000);\n var signMethod = 'HMAC-SHA1';\n var parameters = {\n oauth_consumer_key: key,\n oauth_nonce: nonce,\n oauth_timestamp: timestamp,\n oauth_signature_method: signMethod,\n oauth_callback: callback,\n oauth_version: '1.0'\n };\n var token = '';\n //parameters.push({ parameter: 'oauth_consumer_key', value: key });\n //parameters.push({ parameter: 'oauth_callback', value: callback });\n //parameters.push({ parameter: 'oauth_nonce', value: nonce });\n //parameters.push({ parameter: 'oauth_timestamp', value: timestamp });\n //parameters.push({ parameter: 'oauth_signature_method', value: signMethod });\n //parameters.push({ parameter: 'oauth_version', value: '1.0' });\n var signature = oauthSignature.generate('GET', baseURL, parameters, secret, token, { encodeSignature: false });//generateSignature(parameters, 'GET', baseURL, secret, token);\n res.send(signature);\n //var url = (baseURL + '?oauth_consumer_key=' + key + '&oauth_signature_method=' + signMethod + '&oauth_timestamp=' + timestamp +\n // '&oauth_nonce=' + nonce + '&oauth_version=1.0&oauth_signature=' + signature + '&oauth_callback=' + callback);\n //request.get(url, function (error, response, body) {\n // res.send(body);\n //});\n }", "function onAuthorizeSuccess(data, accept){\n accept();\n}", "onRegister(token)\n {\n // console.log('TOKEN:', token);\n }", "async function stripeTokenHandler(token) {\n console.log(token);\n const response = await fetch('http://localhost:2999/api/billing/payment_methods', {\n method: 'POST',\n headers: {\n 'Content-Type': 'application/json'\n },\n body: JSON.stringify({card_token: token.id})\n });\n\n return response.json();\n}", "function getServerOTP() {\n var authnData = {\n \"authId\": AUTH_ID,\n \"hint\": \"GET_SERVER_OTP\" //dont change this value.\n };\n authenticate(authnData);\n}", "async acquireTokenSilent(request) {\n const correlationId = request.correlationId || this.cryptoProvider.createNewGuid();\n this.logger.trace(\"acquireTokenSilent called\", correlationId);\n if (this.nativeBrokerPlugin) {\n const brokerRequest = {\n ...request,\n clientId: this.config.auth.clientId,\n scopes: request.scopes || msalCommon.OIDC_DEFAULT_SCOPES,\n redirectUri: `${Constants.HTTP_PROTOCOL}${Constants.LOCALHOST}`,\n authority: request.authority || this.config.auth.authority,\n correlationId: correlationId,\n extraParameters: request.tokenQueryParameters,\n accountId: request.account.nativeAccountId,\n forceRefresh: request.forceRefresh || false\n };\n return this.nativeBrokerPlugin.acquireTokenSilent(brokerRequest);\n }\n return super.acquireTokenSilent(request);\n }", "getToken() {\n return [\n this.authenticate([AUTH_TYPE.BASIC, AUTH_TYPE.CLIENT]),\n this._bindAfterToken.bind(this),\n this.exchange(),\n ];\n }", "function passTokenToApi() {\n getTokenRedirect(tokenRequest)\n .then(response => {\n callApiWithToken(apiConfig.endpoint, response.accessToken);\n }).catch(error => {\n console.error(error);\n });\n}", "async requestToken(authorizationCode, authorizationGrantHost) {\n \n // Post parameters.\n const params = new URLSearchParams();\n params.append('client_id', this.clientId);\n params.append('client_secret', this.clientSecret);\n params.append('grant_type', 'authorization_code');\n params.append('redirect_uri', `http://${authorizationGrantHost}/auth_grant`);\n params.append('vg', 'nl-NL'); // TODO: This should actually be macthing clientID/secret registration country.\n params.append('code', authorizationCode);\n // Redact client secret in log.\n console.log('Token request post params: '+params.toString().replace(/client_secret=.*&grant_type/, 'client_secret=****&grant_type'));\n\n const config = {\n headers: { \n 'Content-Type': 'application/x-www-form-urlencoded',\n 'Accept': 'application/json;charset=utf-8',\n },\n };\n\n try {\n // Retrieve token.\n const response = await axios.post(TOKEN_REQUEST_URL, params, config);\n //console.log('Token request response: '+JSON.stringify(response.data)); // Cannot print. Contains sensitive data.\n this.pushEvent('token-status-changed', 'token_received');\n\n let tokenData = response.data;\n tokenData.creation_date = new Date();\n\n tokenStorage.setItem(TOKEN_STORAGE_NAME, tokenData);\n this.pushEvent('token-status-changed', 'token_stored');\n\n } catch(err) {\n console.error('Request token error: '+err.message);\n this.pushEvent('error', {message: err.message, title: 'Failed to request token'});\n } finally {\n if(this.mieleResponseTimeout) {\n clearTimeout(this.mieleResponseTimeout);\n }\n }\n }", "function proceed () {\n\t\t\tif (!store.getters.getBearerToken) {\n\t\t\t\tnext ();\n\t\t\t} else {\n\t\t\t\tconsole.log('Already logged in');\n\t\t\t} \n\t\t}", "function sendToken() {\n authy.request_sms(self.authyId, true, function(err, response) {\n cb.call(self, err);\n });\n }", "function onAuthorizeSuccess (data, accept) {\n accept()\n}", "function linkTokenSuccess(req, res, next) {\n var provider = getProviderToken(req.path);\n res.status(200).json({\n ok: true,\n success: util.capitalizeFirstLetter(provider) + \" successfully linked\",\n provider: provider\n });\n }", "function getToken() {\n\treturn wAccessToken;\n}", "function createToken() {\n stripe.createToken($scope.card).then(function(result) {\n if (result.error) {\n $scope.cardError = result.error.message;\n $scope.submitting = false;\n } else {\n // Send the token to your server\n stripeTokenHandler(result.token);\n }\n });\n }", "requestToken(whose) {\n return irma\n .newPopup({\n session: {\n url: this.url,\n start: {\n url: (o) => `${o.url}/v1/request`,\n method: \"POST\",\n headers: { \"Content-Type\": \"application/json\" },\n body: JSON.stringify({\n attribute: {\n type: \"pbdf.sidn-pbdf.email.email\",\n value: whose,\n },\n }),\n },\n mapping: {\n sessionPtr: (r) => JSON.parse(r.qr),\n sessionToken: (r) => r.token,\n },\n result: false,\n },\n })\n .start()\n .then((map) => map.sessionToken);\n }", "function getToken() {\n var data = {\n grant_type: 'client_credentials',\n client_id: API_USER_ID,\n client_secret: API_SECRET\n }\n console.log(`sendpulse.js: Getting token for client_id: ${API_USER_ID}, client_secret: ${API_SECRET}`);\n sendRequest('oauth/access_token', 'POST', data, false, saveToken);\n function saveToken(data) {\n if (data.access_token) {\n TOKEN = data.access_token;\n console.log(`sendpulse.js: Token received: ${TOKEN}`);\n var hashName = md5(API_USER_ID + '::' + API_SECRET);\n fs.writeFileSync(path.join(TOKEN_STORAGE, hashName), TOKEN);\n } else {\n console.log(`sendpulse.js: No token received: ${JSON.stringify(data)}`)\n }\n }\n}", "function getTokenAndConnect(endpoint) {\n\t\t\t\t$.ajax({\n\t\t\t\t\t\ttype: 'POST',\n\t\t\t\t\t\turl: 'https://collective.brightstream.io/v1/tokens/',\n\t\t\t\t\t\tdata: {\n\t\t\t\t\t\t\t\t\"appId\": appid,\n\t\t\t\t\t\t\t\t\"endpointId\": endpoint,\n\t\t\t\t\t\t\t\t\"ttl\": \"60000\"\n\t\t\t\t\t\t},\n\t\t\t\t\t\tsuccess: function (resp) {\n\t\t\t\t\t\t\t\t// connect using the token we retrieved\n\t\t\t\t\t\t\t\tconnect(resp.tokenId);\n\t\t\t\t\t\t},\n\t\t\t\t\t\terror: function (err) {\n\t\t\t\t\t\t\t\talert(err.statusText);\n\t\t\t\t\t\t}\n\t\t\t\t});\n\t\t}", "function tokenReady(at) {\n accessToken = at;\n\n prepareInfiniteScroll();\n owdFbInt.getFriends();\n }", "registerTokenWith2FA(device, username, password, mfa_code) {\n return new Promise((resolve, reject) => {\n if(!username || !password){\n reject(new Error(\"Username or Password is undefined, did you export ROBINHOOD_USERNAME and ROBINHOOD_PASSWORD?\"))\n }else{\n this.post(\n {\n uri: _apiUrl + endpoints.login,\n form: {\n device_token: device.device_token,\n client_id: _clientId,\n expires_in: 86400,\n grant_type: 'password',\n scope: 'internal',\n password: password,\n username: username,\n mfa_code: mfa_code\n }\n },\n (err, httpResponse, body) => {\n if (err) {\n reject(err);\n }else if(body.detail == \"Request blocked, challenge issued.\"){\n device.register(body)\n resolve(body)\n }else if(body.mfa_required == true && body.mfa_type == 'sms') {\n console.log(body)\n // reject(new Error('You must disable 2FA on your account for this to work.'))\n } else if(body.detail == \"After 5 attempts, you must wait 10 minutes before trying again.\") {\n reject(new Error(body.detail+': ' + JSON.stringify(httpResponse)));\n } else if(body.detail == \"Unable to log in with provided credentials.\") {\n reject(new Error(body.detail+': ' + JSON.stringify(httpResponse)));\n }else if (!body.access_token) {\n reject(new Error('token not found ' + JSON.stringify(httpResponse)));\n } else{\n // This means we can now authenticate\n // Save token\n this.device.registerWithTokens(body)\n }\n }\n );\n }\n })\n }", "function receiveToken(userId, token, error) {\n return {\n type: SESSION_RECEIVE,\n userId,\n token,\n error,\n };\n}", "_device_code(str, type) {\n const req = {\n method: 'POST',\n url: `${this._settings.endpoint}/oauth/device/${type}`,\n headers: {\n 'User-Agent': this._settings.useragent,\n 'Content-Type': 'application/json'\n },\n body: JSON.stringify(str)\n };\n\n this._debug(req);\n return got(req).then(response => JSON.parse(response.body)).catch(error => {\n throw (error.response && error.response.statusCode == 401) ? Error(error.response.headers['www-authenticate']) : error;\n });\n }", "function _handleFb() {\n\t\tlet shortToken;\n\t\tif (window.location.hash) {\n\n\t\t\tconsole.log(\"window.location\", window.location);\n\n\t\t\t\tlet accessTokenMatch = window.location.hash.match(/access_token\\=([a-zA-Z0-9]+)/);\n\t\t\tconsole.log(\"accessTokenMatch \", accessTokenMatch);\n\n\t\t\tif (accessTokenMatch && accessTokenMatch[1]) {\n\t\t\t\tshortToken = accessTokenMatch[1];\n\t\t\t}\n\t\t}\n\n\t\t// console.log(\"_handleFb \");\n\t\t// console.log(\"shortToken \", shortToken);\n\n\t\tif (shortToken) {\n\t\t\t// We came here from Facebook redirect, with a token\n\t\t\tif (getUrlParams()[\"accountLinking\"]) {\n\t\t\t\t_getFBMeWithShortToken({\n\t\t\t\t\tshortToken,\n\t\t\t\t\tcallback: function(data) {\n\n\t\t\t\t\t\tconsole.log(\"_getFBMeWithShortToken data\", data);\n\t\t\t\t\t\t//console.log('updating', data)\n\t\t\t\t\t\tupdateClient({\"facebookLogin\": data[\"id\"]}, function(d, e) {\n\t\t\t\t\t\t\tconsole.log('updated!');\n\t\t\t\t\t\t\tconsole.log(d, e);\n\n\t\t\t\t\t\t\t_generateFBToken({\n\t\t\t\t\t\t\t\tshortToken,\n\t\t\t\t\t\t\t\tcallback: function(data) {\n\n\t\t\t\t\t\t\t\t\tconsole.log()\n\t\t\t\t\t\t\t\t\tif (data && data[\"value\"] === \"ok\") {\n\t\t\t\t\t\t\t\t\t\t_store._fbAllowed = true;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t\t// Clear query parameter from address bar\n\t\t\t\twindow.setTimeout(function() {\n\t\t\t\t\thistory.pushState(\"\", document.title, window.location.pathname);\n\t\t\t\t}, 0);\n\t\t\t}\n\t\t\telse {\n\t\t\t\t_generateFBToken({\n\t\t\t\t\tshortToken,\n\t\t\t\t\tcallback: function(data) {\n\t\t\t\t\t\tif (data && data[\"value\"] === \"ok\") {\n\t\t\t\t\t\t\t_store._fbAllowed = true;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\tif(window.altyn.zonePrefix === \"\"||(window.isMobile && window.altyn.zonePrefix ==\"/open\")){\n\t\t\t\t//Just came on page, need to get token status\n\t\t\t\t_getFBTokenStatus(function(response) {\n\t\t\t\t\tif (response && response[\"value\"] === true) {\n\t\t\t\t\t\t_store._fbAllowed = true;\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\n\t\t}\n\t}" ]
[ "0.69455236", "0.6520233", "0.63696545", "0.6172708", "0.60947555", "0.5897789", "0.5889666", "0.5857201", "0.5840831", "0.5830904", "0.57706606", "0.57510847", "0.57207584", "0.57194173", "0.57045466", "0.56513065", "0.5638502", "0.5619901", "0.55974287", "0.559664", "0.557845", "0.5570562", "0.55673474", "0.5531563", "0.5495796", "0.5495576", "0.5494724", "0.54787725", "0.54769504", "0.5476478", "0.5475836", "0.546837", "0.54606926", "0.5460066", "0.54583204", "0.54569167", "0.54569167", "0.544896", "0.5448854", "0.54403746", "0.54401684", "0.54133904", "0.5412729", "0.5403305", "0.53973126", "0.5392104", "0.5376873", "0.53644955", "0.53455913", "0.53312194", "0.53270876", "0.5326658", "0.531144", "0.53104126", "0.5307635", "0.53063506", "0.530311", "0.5301582", "0.5294342", "0.5232003", "0.5220125", "0.52179927", "0.5210985", "0.52103716", "0.5207715", "0.52027816", "0.52011216", "0.51991445", "0.51915866", "0.5189958", "0.5185128", "0.5184014", "0.5183804", "0.5172789", "0.5164116", "0.516285", "0.51539767", "0.5147333", "0.5138233", "0.51361793", "0.51305556", "0.5128436", "0.5119769", "0.5118015", "0.5116731", "0.51029456", "0.50999755", "0.5097178", "0.5091918", "0.5083974", "0.5083615", "0.50835896", "0.5081964", "0.5076783", "0.50734854", "0.50730085", "0.5072837", "0.50703406", "0.50626826", "0.5059467" ]
0.6248485
3
Generic Method for Failure Callback if Somehow the notification service response badly
function notificationRegisterFailed(response) { console.log('Register Failed: ' + response); client_configuration['notifications'] = { status: false }; return; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function failureCB(){}", "static notifyFailure()\n\t\t{\n\t\t\tthis.notify(NotificationFeedbackType.Error);\n\t\t}", "function requestFailed(response) {\n console.log(response);\n if (response.status == '400') {\n notificationService.displayError(response.data.Message);\n console.log(response.data);\n }\n else\n console.log(response.statusText);\n }", "function FailureCallback(e) {\n var newMessage = 'XHR Failed for store request'\n if (e.data && e.data.description) {\n newMessage = newMessage + '\\n' + e.data.description;\n }\n e.data.description = newMessage;\n return $q.reject(e);\n }", "function failureCB() { }", "function onFailure(error) {\n // error handling\n NotificationService.notify('error', 'Transactions Error', 'Error while retrieving the transactions.' + error);\n }", "function onFailure(error) {\n // error handling\n NotificationService.notify('error', 'Transactions Error', 'Error while retrieving the transactions.' + error);\n }", "function notifyDeviceOfFailure() {\n pubsub.publish(\"device\", \"error\");\n}", "handleFailure() {\n console.log(\"Failure\");\n }", "function onFail(message) {\n\n}", "function onFail(message) {\n }", "onAuthenticationFailure(response) {}", "function handleErrorResult(data, status, errorCallback) {\n \tswitch (status) {\n \t\tcase 400:\n \t\t\tif (errorCallback === undefined || typeof (errorCallback) != \"function\") {\n \t\t\t\t$log.debug('webvellaDevelopers>providers>query.service> result failure: errorCallback not a function or missing ');\n \t\t\t\talert(\"The errorCallback argument is not a function or missing\");\n \t\t\t\treturn;\n \t\t\t}\n \t\t\tdata.success = false;\n \t\t\terrorCallback(data);\n \t\t\tbreak;\n \t\tdefault:\n \t\t\t$log.debug('webvellaDevelopers>providers>query.service> result failure: API call finished with error: ' + status);\n \t\t\talert(\"An API call finished with error: \" + status);\n \t\t\tbreak;\n \t}\n }", "function failure(error){\n\t\t\t$log.error(error.status + ' - ' + error.statusText + ': ' + error.data);\n\t\t}", "function OnFailure(sender, args) {\n alert(\"Error occurred at UpdateListItem. See console for details.\");\n console.log('Request failed at UpdateListItem :' + args.get_message() + '\\n' + args.get_stackTrace());\n}", "function showAPICallFailureInPopup(data, msg){\n\t\t\t\tlogger.debug(\"showAPICallFailureInPopup\", data);\n\t\t\t\tnotificationDialog.open(msg, true);\n\t\t\t}", "function OnFailure(error, userContext, methodName) {\n //alert('failure');\n if (error !== null) {\n hidewPleaseWait();\n showAlert(error.get_message());\n }\n}", "function OnErrorCallMaladie(jqXHR, status) {\n\t\t}", "function onFailure(err) {\n onTimelyResponse(spec.code);\n Object(__WEBPACK_IMPORTED_MODULE_11__utils_js__[\"logError\"])(\"Server call for \".concat(spec.code, \" failed: \").concat(err, \". Continuing without bids.\"));\n onResponse();\n }", "function callback_failure_job_details(request, response)\r\n{\r\n writeSR3(\"GetJobDetails failed\", false);\r\n setTimeout(\"writeSR3('', false)\", 10000);\r\n}", "function failNdef(reason) {\r\n navigator.notification.alert(reason, function() {}, \"There was a problem\");\r\n}", "function FailIfRejected() {}", "function FailIfRejected() {}", "function FailIfRejected() {}", "function FailIfRejected() {}", "function FailIfRejected() {}", "function FailIfRejected() {}", "function FailIfRejected() {}", "function FailIfRejected() {}", "function FailIfRejected() {}", "function apiFail(thisres){\n console.log(thisres);\n }", "function onFail(message) {\n console.log('Failed because: ' + message);\n }", "function handleFailure (response, failureFunc) {\r\n\r\n // These are things we want done always, no matter what callback is given.\r\n switch (response.status) {\r\n case 401: // Unauthorized\r\n Chi.clearProfiles();\r\n Chi.Router.navigate('/', {trigger: true});\r\n break;\r\n default:\r\n console.log(response.status + ' ' + response.statusText);\r\n }\r\n\r\n if (failureFunc !== undefined) {\r\n failureFunc();\r\n } else {\r\n // These are things to by default, if no callback.\r\n switch (response.status) {\r\n case 0:\r\n alert('The server went away. :(');\r\n break;\r\n case 401: // Unauthorized\r\n console.log('Session token expired.');\r\n break;\r\n default:\r\n alert(response.status + ' ' + response.statusText);\r\n }\r\n }\r\n }", "function generalHandler(error) {\n // TODO - Handle variety of errors properly.\n console.log(error);\n\n if ($.isEmptyObject(error.errorMsg)) {\n Notification.notifyFailure('INTERNAL_ERROR');\n }\n else {\n Notification.notifyFailure(error.errorMsg, error.prefix, error.suffix);\n }\n\n Status.resetStatus();\n\n return $q.reject('Internal error');\n }", "function OnUpdateFailure(error, userContext, methodName) {\n //alert('failure');\n if (error !== null) {\n showAlert(error.get_message());\n }\n}", "function failed(e) {\n console.error(e);\n Notification.remove(note_id);\n page(\"/error\");\n note_id = null;\n }", "onError() {}", "function OnErrorCallMaladie(jqXHR, status) {\n\t\t\tbrief.save();\n\t\t\tnotif(\"warning\", \"Brief sauvegardé avec <strong>succès</strong> !\");\n\n\t\t}", "function regFailureiPhoneCallback(errormsg) {\n kony.print(\"\\n\\n************ JS regFailureCallback() called *********\");\n kony.print(\"Error message: \" + JSON.stringify(errormsg));\n}", "function unregFailureiPhoneCallback(errormsg) {\n kony.print(\"Error message: \" + JSON.stringify(errormsg));\n}", "function onErrorItem(response) {\n $scope.ui.isNitInProgress = false;\n Notification.error({\n message: response,\n title: '<i class=\"glyphicon glyphicon-remove\"></i> Nit Form error!'\n });\n }", "onFailure(error) {\n console.warn(`ERROR(${error.code}): ${error.message}`);\n }", "function onFail(message){\n console.log('Failed because: ' + message);\n}", "function onFail(message) {\n alert('Failed because: ' + message);\n }", "function failDiscoverTag(reason) {\r\n navigator.notification.alert(reason, function() {}, \"There was a problem\");\r\n}", "function didNotFetch() {\n return { type: FAILED_FETCH };\n}", "function errorHandler(statusCode){\n alert(\"Not able to present data due to error \",statusCode);\n}", "function onFail(message) {\n alert('Failed because: ' + message);\n }", "function onFail(message) {\n alert('Failed because: ' + message);\n }", "function onFail(message) {\n alert('Failed because: ' + message);\n }", "function onFail(message) {\n alert('Failed because: ' + message);\n }", "function onFail(message) {\n alert('Failed because: ' + message);\n }", "function onFail(message) {\n alert('Failed because: ' + message);\n }", "function onFail(message) {\n alert('Failed because: ' + message);\n }", "function errorCallback(data) {\n if (data.errorCode === 200) {\n clicked = false;\n jQuery('.ld-loading-main-complete_booking').hide();\n tokenRequest();\n } else {\n clicked = false;\n jQuery('.ld-loading-main-complete_booking').hide();\n jQuery('#ld-card-payment-error').show();\n jQuery('#ld-card-payment-error').text(response.error.message);\n }\n }", "function onFail(message) {\n alert('Failed because: ' + message);\n }", "function _failedReq() {\n\t\t\t\t\t\tif(idataObj.hasOwnProperty('socket')) {\n\t\t\t\t\t\t\tidataObj.socket = undefined;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t//logger.error(JSON.stringify(idataObj));\n\t\t\t\t\t\tif(idataObj.offLineRequest == true) {\n\t\t\t\t\t\t\tdbStore.redisConnPub.publish('FAILURE_DAEMON', JSON.stringify(idataObj));\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif(socket) {\n\t\t\t\t\t\t\tidataObj.socketId = socket.id;\n\t\t\t\t\t\t}\n\t\t\t\t\t}", "function responseDataFailure(error = \"Data not found\", statusCode = 404) {\n return {\n 'result': 'nOK',\n 'statusCode': statusCode,\n 'message': error,\n };\n}", "function onFail(message) {\n alert('Failed because: ' + message);\n }", "function onPushNotificationError(error) {\n Q(pushCallback(error)).done(undefined, function (e) {\n diag.debug.assert(e === error, 'push callback failed: ' + e.message);\n });\n}", "function statusError()\n\t{\n\t\tcallback();\n\t}", "function doFailure(log='') {\n console.log(log)\n setUnauthStatus({ log:\"connSignInAsync error. \"+log })\n resetStoredUserAuth()\n return null\n }", "function itFailed(data){\n\t\tconsole.log(\"Failed\");\n\t\tconsole.log(data);\n\t}", "function onFail( message ) {\n //alert('Failed because: ' + message);\n $scope.takePhotoOpt = false;\n $scope.image_available = false;\n }", "function getBlogFailure(error){}", "function OnFailed(results)\n{\n alert(results.get_message());\n}", "function onFail(message) {\n alert('Failed because: ' + message);\n }", "function OnErrorCallMaladie(jqXHR, status) {\n\t\t\treturn false;\n\t\t}", "function Failure() {\n return null;\n}", "function onRequestFailure(msg)\n{\n $(\"#dialog-message\").dialog( \"destroy\" );\n \n switch (msg.status) {\n case 403:\n // 403 specific handler\n break;\n\n case 404:\n // 404 specific handler\n }\n}", "function onFail(message) {\n // alert('Failed because: ' + message);\n}", "function fail() {\n return error('Something failed');\n }", "function fetchUsersFailure(error){\n return {type:FETCH_USERS_FAILURE, payload:error}\n}", "handleFailure (error_)\n\t{\n\t\tthrow error_;\n\t}", "function onFail(message) {\n console.log('Failed because: ' + message);\n}", "function handleEventFailure(rsp) {\n loadComplete();\n $scope.currentEvent = null;\n $scope.showToast('Load failed, please restart.');\n }", "callbackWrapper() {\n if (this.error == \"obstruction_error\") {\n this.error = false\n this.callback('obstruction_error')\n } else if (this.error == 'outofbounds_error') {\n this.error = false\n this.callback('outofbounds_error')\n } else\n this.callback()\n }", "function onFail(mesage) {\n alert('Failed because: ' + message);\n}", "function check(fnSuccess, fnFailure) {\r\n if (!fnSuccess) {\r\n throw new sap.ui2.srvc.Error(\"Missing success callback\",\r\n \"sap.ui2.launchpage.admin.PageBuildingService\");\r\n }\r\n if (typeof fnSuccess !== \"function\") {\r\n throw new sap.ui2.srvc.Error(\"Success callback is not a function\",\r\n \"sap.ui2.launchpage.admin.PageBuildingService\");\r\n }\r\n // Note: fnFailure can never be NULL at this point\r\n if (typeof fnFailure !== \"function\") {\r\n throw new sap.ui2.srvc.Error(\"Error callback is not a function\",\r\n \"sap.ui2.launchpage.admin.PageBuildingService\");\r\n }\r\n }", "function handleFailed(data) {\n\tvar message = new MessagePopup( _t('msg.error.generic'), 'warning');\n\tvar messages = [ message ];\n\t\n\tshowMessageMapPopup(messages);\n\t\n\tconsole.log(data);\n}", "onError(data) {\n // call the user supplied callback\n if (this.onErrorCallback) {\n this.onErrorCallback(data)\n }\n this.log(\"track:notPlaying\", data)\n }", "function getTokenFailure(error) {\n inAppBrowserObject.close();\n $(\"#overlay-div\").css(\"display\", \"none\");\n if (error.status === 0) {\n $(\"#message-to-display\").html(\"The server is taking too long to respond\");\n } else {\n $(\"#message-to-display\").html(\"There was an error loading the details.<br>Please close app and try again.<br>If the problem persists call us on<br><a href='tel:1800652525'>1800 652 525</a>\");\n }\n\n $(\"#alert-dialog\").foundation(\"open\");\n}", "_onError (data) {\n if (this.destroyed) return\n\n const code = Number(data.data)\n\n // The HTML5_ERROR error occurs when the YouTube player needs to switch from\n // HTML5 to Flash to show an ad. Ignore it.\n if (code === YOUTUBE_ERROR.HTML5_ERROR) return\n\n // The remaining error types occur when the YouTube player cannot play the\n // given video. This is not a fatal error. Report it as unplayable so the user\n // has an opportunity to play another video.\n if (code === YOUTUBE_ERROR.UNPLAYABLE_1 ||\n code === YOUTUBE_ERROR.UNPLAYABLE_2 ||\n code === YOUTUBE_ERROR.NOT_FOUND ||\n code === YOUTUBE_ERROR.INVALID_PARAM) {\n return this.emit('unplayable', this.videoId)\n }\n\n // Unexpected error, does not match any known type\n this._destroy(new Error('YouTube Player Error. Unknown error code: ' + code))\n }", "function handleCallback(response, successMessage, callback) {\n console.log(response);\n if (response.statusCode < 400) {\n console.info(successMessage);\n callback(null);\n } else if (response.statusCode < 500) {\n // Client error, don't retry\n console.info(\n `Error handling GitHub webhook, will not retry: ${response.statusCode} - ${response.statusMessage}`\n );\n callback(null);\n } else {\n // Server error, retry\n console.info(\"Server error, retrying call\");\n callback({\n statusCode: response.statusCode,\n statusMessage: response.statusMessage,\n });\n }\n}", "success(notification) {\n notification = normalize(notification, \"success\");\n return notification;\n }", "static sendFailHandler (err, conContext) {\n if (conContext.handlers) {\n if (conContext.handlers.sendFailCb) {\n conContext.handlers.sendFailCb(err)\n }\n }\n }", "function showAPICallFailure(data, msg){\n\t\t\t\tlogger.debug(\"showAPICallFailure\", data);\n\t\t\t\tlpChatShowView(lpCWAssist.lpChatMakeOfflineScreenHtml(msg), true);\n\t\t\t\tshowChatWizContainer();\n\t\t\t}", "function onFail(message) {\n //alert('Failed because: ' + message);\n}", "function doFailure(log='') {\n console.log(log)\n setUnauthStatus({ log:\"confirmCodeFormAsync error. \"+log })\n showError(log)\n resetStoredUserAuth()\n resolve(null)\n }", "async trackFailureEvent (failureEvent) {\n\t\tif (!this.user) { return; }\n\t\tconst trackObject = {\n\t\t\tError: failureEvent,\n\t\t\t'email': this.user.get('email')\n\t\t};\n\t\tthis.api.services.analytics.track(\n\t\t\t'Email Confirmation Failed',\n\t\t\ttrackObject,\n\t\t\t{\n\t\t\t\trequest: this,\n\t\t\t\tuser: this.user\n\t\t\t}\n\t\t);\n\t}", "function processServiceError(err)\n{\n var message = \"\";\n\n if(err.responseText != null)\n message = $.parseJSON(err.responseText).errorMessage;\n else if(err.statusText != null)\n message = err.statusText;\n\n // service is not active or unreachable\n if(err.status == 0)\n message = \"Service Unavailable\";\n\n // show error message to the user\n showAlert(\"danger\", \"Error: \"+message);\n}", "onError(payload, err) {\n let reportError = true;\n\n if (String(err).indexOf('401') > -1) {\n reportError = false;\n } else if (String(err).indexOf('404') > -1) {\n reportError = false;\n }\n\n return reportError;\n }", "function onFail(message) {\n // alert('Failed because: ' + message);\n}", "_onError (data) {\n if (this.destroyed) return\n\n const code = data.data\n\n // The HTML5_ERROR error occurs when the YouTube player needs to switch from\n // HTML5 to Flash to show an ad. Ignore it.\n if (code === YOUTUBE_ERROR.HTML5_ERROR) return\n\n // The remaining error types occur when the YouTube player cannot play the\n // given video. This is not a fatal error. Report it as unplayable so the user\n // has an opportunity to play another video.\n if (code === YOUTUBE_ERROR.UNPLAYABLE_1 ||\n code === YOUTUBE_ERROR.UNPLAYABLE_2 ||\n code === YOUTUBE_ERROR.NOT_FOUND ||\n code === YOUTUBE_ERROR.INVALID_PARAM) {\n return this.emit('unplayable', this.videoId)\n }\n\n // Unexpected error, does not match any known type\n this._destroy(new Error('YouTube Player Error. Unknown error code: ' + code))\n }", "function processErrorResponse(variable, errMsg, errorCB, xhrObj, skipNotification, skipDefaultNotification) {\n // EVENT: ON_ERROR\n if (!skipNotification) {\n initiateCallback(VARIABLE_CONSTANTS.EVENT.ERROR, variable, errMsg, xhrObj, skipDefaultNotification);\n }\n\n /* trigger error callback */\n Utils.triggerFn(errorCB, errMsg);\n\n if (CONSTANTS.isRunMode) {\n /* process next requests in the queue */\n variableActive[variable.activeScope.$id][variable.name] = false;\n variable.canUpdate = true;\n processRequestQueue(variable, requestQueue[variable.activeScope.$id], getDataInRun);\n\n // EVENT: ON_CAN_UPDATE\n initiateCallback(VARIABLE_CONSTANTS.EVENT.CAN_UPDATE, variable, errMsg, xhrObj);\n }\n }", "function Fail(errorData, message)\n{\n $('#connectionStatus').html(\"BAD AJAX REQUEST!\");\n\tconsole.log(message);\n}", "function onFail(message) {\n alert('Failed because: ' + message);\n}", "function onFail(message) {\n alert('Failed because: ' + message);\n}", "function onFail(message) {\n alert('Failed because: ' + message);\n}", "function onFail(message) {\n alert('Failed because: ' + message);\n}" ]
[ "0.68833345", "0.67651135", "0.6671625", "0.66107064", "0.6542515", "0.6449701", "0.6449701", "0.64260936", "0.6381373", "0.63277006", "0.62581867", "0.61930716", "0.6084188", "0.6071446", "0.60713047", "0.6065821", "0.60319453", "0.6014962", "0.5977113", "0.59755886", "0.59615105", "0.5955035", "0.5955035", "0.5955035", "0.5955035", "0.5955035", "0.5955035", "0.5955035", "0.5955035", "0.5955035", "0.5929417", "0.5924351", "0.5921002", "0.59194636", "0.5915866", "0.59109116", "0.5882", "0.58704793", "0.58658755", "0.58633673", "0.58486134", "0.5844126", "0.58376443", "0.5811636", "0.5807186", "0.5798106", "0.5794107", "0.5793984", "0.5793984", "0.5793984", "0.5793984", "0.5793984", "0.5793984", "0.5793984", "0.57909507", "0.577739", "0.5772925", "0.57707894", "0.57661176", "0.5761669", "0.57566845", "0.57566607", "0.5747263", "0.5743407", "0.57375354", "0.5726732", "0.57211995", "0.5711349", "0.5708", "0.56987095", "0.569814", "0.5689474", "0.56875294", "0.5681169", "0.5672665", "0.5669522", "0.5669087", "0.5663554", "0.5659074", "0.5654613", "0.5651791", "0.56475484", "0.56411314", "0.56375915", "0.56341296", "0.563377", "0.5631659", "0.56310314", "0.5622262", "0.56206006", "0.5617316", "0.56169754", "0.5614219", "0.56141424", "0.56127757", "0.56066114", "0.5600983", "0.5600983", "0.5600983", "0.5600983" ]
0.6361198
9
Check if String is Hebrew
function isHebrew(str) { return (str.charCodeAt(0) > 0x590 && str.charCodeAt(0) < 0x5FF) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function isHebrew(message) {\n return message.match(/[\\u0590-\\u05FF]+/);\n }", "function isEng(t) { return t.search(/[\\u0020-\\u007F]/g) != -1 }", "function langIsRTL (sampleText) {\n var t = sampleText.replace(/@\\w+/, ''),\n countHeb = countMatches('[\\\\u05B0-\\\\u05F4\\\\uFB1D-\\\\uFBF4]'),\n countArb = countMatches('[\\\\u060C-\\\\u06FE\\\\uFB50-\\\\uFEFC]');\n\n function countMatches (match) {\n var matches = t.match(new RegExp(match, 'g'));\n return matches !== null ? matches.length : 0;\n }\n\n // if 20% of chars are Hebrew or Arbic then direction is rtl\n return (countHeb + countArb) * 100 / t.length > 20;\n }", "function isArabicMessage(msg) {\n return /[\\u0600-\\u06FF]/.test(msg.text);\n}", "function isChinese(value) {\n var len = value.length;\n var cnChar = value.match(/[^\\x00-\\x80]/g);\n return cnChar !== null;\n }", "function isPangram(string) {\n //...\n}", "function isEnglishLetter(charCode) {\n\treturn (65 <= charCode && charCode <= 90) || (97 <= charCode && charCode <= 122);\n}", "function notUnicode(s) {\n if (/[\\ud800-\\udbff][^\\udc00-\\udfff]/.test(s)) {\n return true /* high-surrogate without low-surrogate */\n }\n\n if (/[^\\ud800-\\udbff][\\udc00-\\udfff]/.test(s)) {\n return true /* low-surrogate without high-surrogate */\n }\n\n return false\n}", "function isAsciiOnly(str) {\n console.log(\"Story is: \", str, str.length)\n let retval = true;\n for (let i = 0; i<str.length; i++)\n if (str.charCodeAt(i) > 127)\n retval = false;\n return retval;\n}", "function is_hexdigit(str)\n{\n\tif (str.length==0) return false;\n\tfor (var i=0;i < str.length;i++)\n\t{\n\t\tif (str.charAt(i) <= '9' && str.charAt(i) >= '0') continue;\n\t\tif (str.charAt(i) <= 'F' && str.charAt(i) >= 'A') continue;\n\t\tif (str.charAt(i) <= 'f' && str.charAt(i) >= 'a') continue;\n\t\treturn false;\n\t}\n\treturn true;\n}", "function chinese_check_only(v)\n{\n var ck = /[^\\x00-\\xff]/;\n\n if (v==\"\" ||ck.test(v)) {\n return 1;\n }\n \n return 0;\n}", "function _isASCIIString(value)\n{\n for (var i = 0; i < value.length; ++i) {\n if (_getElementAt(value, i) >= 128)\n return false;\n }\n return true;\n}", "function containsEnglish(str){\n str.toLowerCase();\n console.log(\"#2: \" + str.includes(\"english\"));\n}", "function isCyrillic (text) {\n if(/[а-я]/i.test(text)) {\n return 'ru'\n } else {\n return 'en'\n }\n }", "function isAlpha(string) {\n\tvar patt = /^[a-zA-Z\\u00C6\\u00D0\\u018E\\u018F\\u0190\\u0194\\u0132\\u014A\\u0152\\u1E9E\\u00DE\\u01F7\\u021C\\u00E6\\u00F0\\u01DD\\u0259\\u025B\\u0263\\u0133\\u014B\\u0153\\u0138\\u017F\\u00DF\\u00FE\\u01BF\\u021D\\u0104\\u0181\\u00C7\\u0110\\u018A\\u0118\\u0126\\u012E\\u0198\\u0141\\u00D8\\u01A0\\u015E\\u0218\\u0162\\u021A\\u0166\\u0172\\u01AFY\\u0328\\u01B3\\u0105\\u0253\\u00E7\\u0111\\u0257\\u0119\\u0127\\u012F\\u0199\\u0142\\u00F8\\u01A1\\u015F\\u0219\\u0163\\u021B\\u0167\\u0173\\u01B0y\\u0328\\u01B4\\u00C1\\u00C0\\u00C2\\u00C4\\u01CD\\u0102\\u0100\\u00C3\\u00C5\\u01FA\\u0104\\u00C6\\u01FC\\u01E2\\u0181\\u0106\\u010A\\u0108\\u010C\\u00C7\\u010E\\u1E0C\\u0110\\u018A\\u00D0\\u00C9\\u00C8\\u0116\\u00CA\\u00CB\\u011A\\u0114\\u0112\\u0118\\u1EB8\\u018E\\u018F\\u0190\\u0120\\u011C\\u01E6\\u011E\\u0122\\u0194\\u00E1\\u00E0\\u00E2\\u00E4\\u01CE\\u0103\\u0101\\u00E3\\u00E5\\u01FB\\u0105\\u00E6\\u01FD\\u01E3\\u0253\\u0107\\u010B\\u0109\\u010D\\u00E7\\u010F\\u1E0D\\u0111\\u0257\\u00F0\\u00E9\\u00E8\\u0117\\u00EA\\u00EB\\u011B\\u0115\\u0113\\u0119\\u1EB9\\u01DD\\u0259\\u025B\\u0121\\u011D\\u01E7\\u011F\\u0123\\u0263\\u0124\\u1E24\\u0126I\\u00CD\\u00CC\\u0130\\u00CE\\u00CF\\u01CF\\u012C\\u012A\\u0128\\u012E\\u1ECA\\u0132\\u0134\\u0136\\u0198\\u0139\\u013B\\u0141\\u013D\\u013F\\u02BCN\\u0143N\\u0308\\u0147\\u00D1\\u0145\\u014A\\u00D3\\u00D2\\u00D4\\u00D6\\u01D1\\u014E\\u014C\\u00D5\\u0150\\u1ECC\\u00D8\\u01FE\\u01A0\\u0152\\u0125\\u1E25\\u0127\\u0131\\u00ED\\u00ECi\\u00EE\\u00EF\\u01D0\\u012D\\u012B\\u0129\\u012F\\u1ECB\\u0133\\u0135\\u0137\\u0199\\u0138\\u013A\\u013C\\u0142\\u013E\\u0140\\u0149\\u0144n\\u0308\\u0148\\u00F1\\u0146\\u014B\\u00F3\\u00F2\\u00F4\\u00F6\\u01D2\\u014F\\u014D\\u00F5\\u0151\\u1ECD\\u00F8\\u01FF\\u01A1\\u0153\\u0154\\u0158\\u0156\\u015A\\u015C\\u0160\\u015E\\u0218\\u1E62\\u1E9E\\u0164\\u0162\\u1E6C\\u0166\\u00DE\\u00DA\\u00D9\\u00DB\\u00DC\\u01D3\\u016C\\u016A\\u0168\\u0170\\u016E\\u0172\\u1EE4\\u01AF\\u1E82\\u1E80\\u0174\\u1E84\\u01F7\\u00DD\\u1EF2\\u0176\\u0178\\u0232\\u1EF8\\u01B3\\u0179\\u017B\\u017D\\u1E92\\u0155\\u0159\\u0157\\u017F\\u015B\\u015D\\u0161\\u015F\\u0219\\u1E63\\u00DF\\u0165\\u0163\\u1E6D\\u0167\\u00FE\\u00FA\\u00F9\\u00FB\\u00FC\\u01D4\\u016D\\u016B\\u0169\\u0171\\u016F\\u0173\\u1EE5\\u01B0\\u1E83\\u1E81\\u0175\\u1E85\\u01BF\\u00FD\\u1EF3\\u0177\\u00FF\\u0233\\u1EF9\\u01B4\\u017A\\u017C\\u017E\\u1E93]+$/;\n\treturn patt.test(string);\n}", "function testText(txtString) {\n var stringText = new RegExp(/^[a-zA-zÑñÁáÉéÍíÓóÚúÜü\\s]+$/);\n if (stringText.test(txtString)) {\n return true;\n } else {\n return false;\n }\n}", "function checkString( text ) {\n\tvar str= text.value.toString();\n\tvar len=str.length;\n\tvar check = true;\n\tvar err = \"\";\n\tfor(var i=0; i<len; i++)\n\t{\n\t\tif(! ( (str.charAt(i)>='a' && str.charAt(i)<='z') || (str.charAt(i)>='A' && str.charAt(i)<='Z') || str.charAt(i)==' ' ) )\n\t\t{\n\t\t\tcheck= false;\n\t\t}\n\t}\n\tif( check == false)\n\t{\n\t\t\terr=\"Only Alphabets Allowed\";\n\t\t} else {\n\t\t\terr=\"\";\n\t\t}\n\treturn err;\n}", "function isWord(str) {\n var alphaNumericFound = false;\n for (var i = 0; i < str.length; i++) {\n var code = str.charCodeAt(i);\n if ((code > 47 && code < 58) || // numeric (0-9)\n (code > 64 && code < 91) || // upper alpha (A-Z)\n (code > 96 && code < 123)) { // lower alpha (a-z)\n alphaNumericFound = true;\n return alphaNumericFound;\n }\n }\n return alphaNumericFound;\n }", "function isAnsiLetter(ch) {\n const Ascii_a = 97;\n const Ascii_z = 122;\n const Ascii_A = 65;\n const Ascii_Z = 90;\n let code = ch.charCodeAt(0);\n return (Ascii_A <= code && code <= Ascii_Z) || (Ascii_a <= code && code <= Ascii_z);\n }", "function rendersPolishSigns(text) {\n var replacementChar = 65533;\n return text.indexOf(String.fromCharCode(replacementChar)) === -1 ? true : false;\n }", "function validateChar(str) {\r\n for (var i = 0; i < str.length; i++) {\r\n var firstChar = str.charCodeAt(i);\r\n if (firstChar === 0x9 || firstChar === 0xA || firstChar === 0xD\r\n || (firstChar >= 0x20 && firstChar <= 0xD7FF)\r\n || (firstChar >= 0xE000 && firstChar <= 0xFFFD)) {\r\n continue;\r\n }\r\n if (i + 1 === str.length) {\r\n return false;\r\n }\r\n // UTF-16 surrogate characters\r\n var secondChar = str.charCodeAt(i + 1);\r\n if ((firstChar >= 0xD800 && firstChar <= 0xDBFF)\r\n && (secondChar >= 0xDC00 && secondChar <= 0xDFFF)) {\r\n i++;\r\n continue;\r\n }\r\n return false;\r\n }\r\n return true;\r\n}", "function isDirectionRTL(str,strongFallback){return getDirection(str,strongFallback)===UnicodeBidiDirection.RTL;}", "function areCharsOrLetters(theString) {\n var regSpecialChar = /[`!@#$%^&*()_+\\-=\\[\\]{};':\"\\\\|,.<>\\/?~]/\n var isChar = regSpecialChar.test(theString)\n var isLetter = theString.match(/[a-z]/i)\n if (isChar != false && isLetter != null) {\n return true\n } else if (isLetter != null) {\n return true\n } else if (isChar != false) {\n return true\n } else {\n return false\n }\n}", "function isAlphabet(str) {\n var code, i, len;\n\n for (i = 0, len = str.length; i < len; i++) {\n code = str.charCodeAt(i);\n if (\n !(code > 64 && code < 91) && // upper alpha (A-Z)\n !(code > 96 && code < 123)\n ) {\n // lower alpha (a-z)\n return false;\n }\n }\n return true;\n}", "function isNumberOrAlphabet(str) {\nfor(var i=0;i<str.length;i++) {\nvar c=str.charCodeAt(i);\nif(c<0x0030 || (c>0x0039 && c<0x0041) || (c>0x005A && c<0x0061) || c>0x007A) return false;\n}\nreturn true;\n}", "function isPangram(string){\n for(let i = 97; i < 123; i++){\n if(!string.toLowerCase().split('').find(chr => chr === String.fromCharCode(i))){\n return false;\n }\n }\n return true;\n}", "function valid_ascii(str) {\n\tvar reg =/^[\\x21-\\x7e]*$/;\n\tif (!reg.test(str)) {\n\t\treturn false;\n\t}\n\treturn true;\n}", "function IsSomewhereinPhoneticModifierCharaceter(CUni)\r\n{\r\n\tif(CUni=='হ' || CUni=='গ' \r\n\t|| CUni=='ঘ' || CUni=='ণ'\r\n\t|| CUni=='ঃ' || CUni=='ট'\r\n\t|| CUni=='ো' \r\n\t|| CUni=='ই' || CUni=='ি' \r\n\t|| CUni=='উ' || CUni=='ু'\r\n\t|| CUni=='র' || CUni=='ড়' )\r\n\t\treturn true;\r\n\treturn false;\r\n}", "function latticeCanDisplayStr(str) {\n for (let i = 0; i < str.length; i++)\n if (str.charCodeAt(i) < 0x0020 || str.charCodeAt(i) > 0x007f)\n return false;\n return true;\n}", "function isPangram(string){\n return string.match(/([a-z])(?!.*\\1)/ig || []).length == 26\n}", "function fnIsPrintableString(str){\n // check that every char in \"str\" has a code between 32 and 126\n return str.split(\"\").every((c) => {\n const charcode = c.charCodeAt(0);\n return (charcode >= 32 && charcode <= 126);\n });\n}", "function isNotAlphabets(str)\n{\n\tfor (var i = 0; i < str.length; i++)\n\t{\n\t\tvar ch = str.substring(i, i + 1);\n\t\tif((ch < \"a\" || \"z\" < ch) && (ch < \"A\" || \"Z\" < ch)) \n\t\t{\n\t\t\treturn true;\n\t\t}\n\t}\n\treturn false;\n}", "function strchk_unicode(str)\n{\n\tvar strlen=str.length;\n\tif(strlen>0)\n\t{\n\t\tvar c = '';\n\t\tfor(var i=0;i<strlen;i++)\n\t\t{\n\t\t\tc = escape(str.charAt(i));\n\t\t\tif(c.charAt(0) == '%' && c.charAt(1)=='u')\n\t\t\t\treturn true;\n\t\t}\n\t}\n\treturn false;\n}", "validate (text) {\r\n var find = text.match(['931', 'Declaración Jurada', 'en', 'Pesos con centavos', 'S.U.S.S.'].join('\\r\\n'))\r\n return (!!find)\r\n }", "function looksLikeWin1252(samples) {\n var ascii = 'abcdefghijklmnopqrstuvwxyz0123456789.\\'\"?+-\\n,:;/|_$% ', //common l.c. ascii chars\n extended = 'ßàáâãäåæçèéêëìíîïðñòóôõöøùúûüýÿ°–±’‘', // common extended\n str = decodeSamples('win1252', samples),\n asciiScore = getCharScore(str, ascii),\n totalScore = getCharScore(str, extended + ascii);\n return totalScore > 0.97 && asciiScore >= 0.6; // mostly unaccented ascii chars\n }", "function isText(str) {\n\t// Validate characters only\n\tvar regex = /^[A-Za-z]+$/;\n\treturn str.match(regex);\n}", "function hasUTF8(input)\n{\n return (input.indexOf('<meta charset=\"utf-8\">') != -1 || input.indexOf('<meta charset=\"UTF-8\">') != -1);\n}", "validateInput(text) {\n let valueCheck = this.getValue(text);\n if (valueCheck) {\n return undefined;\n }\n else {\n return 'Supports 128 characters of ASCII.';\n }\n }", "function isASCII(str) {\r\n\tvar isValid = (sys_constants.ASCII_EXTENDED ? /^[\\x00-\\xFF]*$/\r\n\t\t\t: /^[\\x00-\\x7F]*$/).test(str);\r\n\tif (!isValid) {\r\n\t\treturn validateLatinCharacters(str);\r\n\t}\r\n\treturn true;\r\n}", "function isUnicodeLetter(code) {\n for (var _i = 0; _i < unicodeLetterTable.length;) {\n if (code < unicodeLetterTable[_i++]) {\n return false;\n }\n\n if (code <= unicodeLetterTable[_i++]) {\n return true;\n }\n }\n\n return false;\n }", "function isAscii(value) {\n return typeof value === 'string' && validator_lib_isAscii__WEBPACK_IMPORTED_MODULE_1___default()(value);\n}", "function isValidReasonPhrase (statusText) {\n for (let i = 0; i < statusText.length; ++i) {\n const c = statusText.charCodeAt(i)\n if (\n !(\n (\n c === 0x09 || // HTAB\n (c >= 0x20 && c <= 0x7e) || // SP / VCHAR\n (c >= 0x80 && c <= 0xff)\n ) // obs-text\n )\n ) {\n return false\n }\n }\n return true\n}", "function CheckBig5(str){\n\treturn str.replace(/許/g,\"許\\\\\").replace(/功/g,\"功\\\\\").replace(/么/g,\"么\\\\\").replace(/蓋/g,\"蓋\\\\\").replace(/閱/g,\"閱\\\\\");\n}", "function cleanTitle(text) {\n // NOTE: Regex is from https://stackoverflow.com/a/11598864\n const clean_non_printable_chars_re = /[\\0-\\x1F\\x7F-\\x9F\\xAD\\u0378\\u0379\\u037F-\\u0383\\u038B\\u038D\\u03A2\\u0528-\\u0530\\u0557\\u0558\\u0560\\u0588\\u058B-\\u058E\\u0590\\u05C8-\\u05CF\\u05EB-\\u05EF\\u05F5-\\u0605\\u061C\\u061D\\u06DD\\u070E\\u070F\\u074B\\u074C\\u07B2-\\u07BF\\u07FB-\\u07FF\\u082E\\u082F\\u083F\\u085C\\u085D\\u085F-\\u089F\\u08A1\\u08AD-\\u08E3\\u08FF\\u0978\\u0980\\u0984\\u098D\\u098E\\u0991\\u0992\\u09A9\\u09B1\\u09B3-\\u09B5\\u09BA\\u09BB\\u09C5\\u09C6\\u09C9\\u09CA\\u09CF-\\u09D6\\u09D8-\\u09DB\\u09DE\\u09E4\\u09E5\\u09FC-\\u0A00\\u0A04\\u0A0B-\\u0A0E\\u0A11\\u0A12\\u0A29\\u0A31\\u0A34\\u0A37\\u0A3A\\u0A3B\\u0A3D\\u0A43-\\u0A46\\u0A49\\u0A4A\\u0A4E-\\u0A50\\u0A52-\\u0A58\\u0A5D\\u0A5F-\\u0A65\\u0A76-\\u0A80\\u0A84\\u0A8E\\u0A92\\u0AA9\\u0AB1\\u0AB4\\u0ABA\\u0ABB\\u0AC6\\u0ACA\\u0ACE\\u0ACF\\u0AD1-\\u0ADF\\u0AE4\\u0AE5\\u0AF2-\\u0B00\\u0B04\\u0B0D\\u0B0E\\u0B11\\u0B12\\u0B29\\u0B31\\u0B34\\u0B3A\\u0B3B\\u0B45\\u0B46\\u0B49\\u0B4A\\u0B4E-\\u0B55\\u0B58-\\u0B5B\\u0B5E\\u0B64\\u0B65\\u0B78-\\u0B81\\u0B84\\u0B8B-\\u0B8D\\u0B91\\u0B96-\\u0B98\\u0B9B\\u0B9D\\u0BA0-\\u0BA2\\u0BA5-\\u0BA7\\u0BAB-\\u0BAD\\u0BBA-\\u0BBD\\u0BC3-\\u0BC5\\u0BC9\\u0BCE\\u0BCF\\u0BD1-\\u0BD6\\u0BD8-\\u0BE5\\u0BFB-\\u0C00\\u0C04\\u0C0D\\u0C11\\u0C29\\u0C34\\u0C3A-\\u0C3C\\u0C45\\u0C49\\u0C4E-\\u0C54\\u0C57\\u0C5A-\\u0C5F\\u0C64\\u0C65\\u0C70-\\u0C77\\u0C80\\u0C81\\u0C84\\u0C8D\\u0C91\\u0CA9\\u0CB4\\u0CBA\\u0CBB\\u0CC5\\u0CC9\\u0CCE-\\u0CD4\\u0CD7-\\u0CDD\\u0CDF\\u0CE4\\u0CE5\\u0CF0\\u0CF3-\\u0D01\\u0D04\\u0D0D\\u0D11\\u0D3B\\u0D3C\\u0D45\\u0D49\\u0D4F-\\u0D56\\u0D58-\\u0D5F\\u0D64\\u0D65\\u0D76-\\u0D78\\u0D80\\u0D81\\u0D84\\u0D97-\\u0D99\\u0DB2\\u0DBC\\u0DBE\\u0DBF\\u0DC7-\\u0DC9\\u0DCB-\\u0DCE\\u0DD5\\u0DD7\\u0DE0-\\u0DF1\\u0DF5-\\u0E00\\u0E3B-\\u0E3E\\u0E5C-\\u0E80\\u0E83\\u0E85\\u0E86\\u0E89\\u0E8B\\u0E8C\\u0E8E-\\u0E93\\u0E98\\u0EA0\\u0EA4\\u0EA6\\u0EA8\\u0EA9\\u0EAC\\u0EBA\\u0EBE\\u0EBF\\u0EC5\\u0EC7\\u0ECE\\u0ECF\\u0EDA\\u0EDB\\u0EE0-\\u0EFF\\u0F48\\u0F6D-\\u0F70\\u0F98\\u0FBD\\u0FCD\\u0FDB-\\u0FFF\\u10C6\\u10C8-\\u10CC\\u10CE\\u10CF\\u1249\\u124E\\u124F\\u1257\\u1259\\u125E\\u125F\\u1289\\u128E\\u128F\\u12B1\\u12B6\\u12B7\\u12BF\\u12C1\\u12C6\\u12C7\\u12D7\\u1311\\u1316\\u1317\\u135B\\u135C\\u137D-\\u137F\\u139A-\\u139F\\u13F5-\\u13FF\\u169D-\\u169F\\u16F1-\\u16FF\\u170D\\u1715-\\u171F\\u1737-\\u173F\\u1754-\\u175F\\u176D\\u1771\\u1774-\\u177F\\u17DE\\u17DF\\u17EA-\\u17EF\\u17FA-\\u17FF\\u180F\\u181A-\\u181F\\u1878-\\u187F\\u18AB-\\u18AF\\u18F6-\\u18FF\\u191D-\\u191F\\u192C-\\u192F\\u193C-\\u193F\\u1941-\\u1943\\u196E\\u196F\\u1975-\\u197F\\u19AC-\\u19AF\\u19CA-\\u19CF\\u19DB-\\u19DD\\u1A1C\\u1A1D\\u1A5F\\u1A7D\\u1A7E\\u1A8A-\\u1A8F\\u1A9A-\\u1A9F\\u1AAE-\\u1AFF\\u1B4C-\\u1B4F\\u1B7D-\\u1B7F\\u1BF4-\\u1BFB\\u1C38-\\u1C3A\\u1C4A-\\u1C4C\\u1C80-\\u1CBF\\u1CC8-\\u1CCF\\u1CF7-\\u1CFF\\u1DE7-\\u1DFB\\u1F16\\u1F17\\u1F1E\\u1F1F\\u1F46\\u1F47\\u1F4E\\u1F4F\\u1F58\\u1F5A\\u1F5C\\u1F5E\\u1F7E\\u1F7F\\u1FB5\\u1FC5\\u1FD4\\u1FD5\\u1FDC\\u1FF0\\u1FF1\\u1FF5\\u1FFF\\u200B-\\u200F\\u202A-\\u202E\\u2060-\\u206F\\u2072\\u2073\\u208F\\u209D-\\u209F\\u20BB-\\u20CF\\u20F1-\\u20FF\\u218A-\\u218F\\u23F4-\\u23FF\\u2427-\\u243F\\u244B-\\u245F\\u2700\\u2B4D-\\u2B4F\\u2B5A-\\u2BFF\\u2C2F\\u2C5F\\u2CF4-\\u2CF8\\u2D26\\u2D28-\\u2D2C\\u2D2E\\u2D2F\\u2D68-\\u2D6E\\u2D71-\\u2D7E\\u2D97-\\u2D9F\\u2DA7\\u2DAF\\u2DB7\\u2DBF\\u2DC7\\u2DCF\\u2DD7\\u2DDF\\u2E3C-\\u2E7F\\u2E9A\\u2EF4-\\u2EFF\\u2FD6-\\u2FEF\\u2FFC-\\u2FFF\\u3040\\u3097\\u3098\\u3100-\\u3104\\u312E-\\u3130\\u318F\\u31BB-\\u31BF\\u31E4-\\u31EF\\u321F\\u32FF\\u4DB6-\\u4DBF\\u9FCD-\\u9FFF\\uA48D-\\uA48F\\uA4C7-\\uA4CF\\uA62C-\\uA63F\\uA698-\\uA69E\\uA6F8-\\uA6FF\\uA78F\\uA794-\\uA79F\\uA7AB-\\uA7F7\\uA82C-\\uA82F\\uA83A-\\uA83F\\uA878-\\uA87F\\uA8C5-\\uA8CD\\uA8DA-\\uA8DF\\uA8FC-\\uA8FF\\uA954-\\uA95E\\uA97D-\\uA97F\\uA9CE\\uA9DA-\\uA9DD\\uA9E0-\\uA9FF\\uAA37-\\uAA3F\\uAA4E\\uAA4F\\uAA5A\\uAA5B\\uAA7C-\\uAA7F\\uAAC3-\\uAADA\\uAAF7-\\uAB00\\uAB07\\uAB08\\uAB0F\\uAB10\\uAB17-\\uAB1F\\uAB27\\uAB2F-\\uABBF\\uABEE\\uABEF\\uABFA-\\uABFF\\uD7A4-\\uD7AF\\uD7C7-\\uD7CA\\uD7FC-\\uF8FF\\uFA6E\\uFA6F\\uFADA-\\uFAFF\\uFB07-\\uFB12\\uFB18-\\uFB1C\\uFB37\\uFB3D\\uFB3F\\uFB42\\uFB45\\uFBC2-\\uFBD2\\uFD40-\\uFD4F\\uFD90\\uFD91\\uFDC8-\\uFDEF\\uFDFE\\uFDFF\\uFE1A-\\uFE1F\\uFE27-\\uFE2F\\uFE53\\uFE67\\uFE6C-\\uFE6F\\uFE75\\uFEFD-\\uFF00\\uFFBF-\\uFFC1\\uFFC8\\uFFC9\\uFFD0\\uFFD1\\uFFD8\\uFFD9\\uFFDD-\\uFFDF\\uFFE7\\uFFEF-\\uFFFB\\uFFFE\\uFFFF]/g;\n // clean page title text of things that can screw up BT. Currently [] and non printable chars\n return text.replace(\"[\", '').replace(\"]\", '').replace(clean_non_printable_chars_re, '');\n}", "function convertToRawString(str) {\n if (typeof str === \"string\") {\n var strUpper = str.toUpperCase();\n // Normalize to NFD & use regex to remove diacritics. Remove special chars.\n return strUpper.normalize(\"NFD\").replace(/[\\u0300-\\u036f]/g, \"\").replace(/\\W/g, ''); \n } else {\n return false;\n }\n}", "function textCheck(inputText)\n{\n\tvar letters = /^[A-Za-z0-9]+$/;\n\tif(inputText.match(letters))\n\t{\n\t\treturn true;\n\t}\n\telse\n\t{\n\t\treturn false;\n\t}\n}", "function isNonAscii(code) {\n return code >= 0x0080;\n}", "function isPangram(str){\n var test = {};\n for (var i = 0; i < str.length; i++){\n test[str[i]] = true;\n }\n return obj.keys(test).length == 26;\n }", "function isPalindrome (str) {\n // 步驟一:將所有的單字轉成小寫,拆成陣列,並且排除非英文單字\n str = str.toLowerCase()\n\n charactersArr = str.split('').filter(character => {\n return /[a-z]/.test(character)\n })\n\n // 步驟二:如果正著寫和反轉過來寫的內容都一樣,則回傳 true,否則 false\n return charactersArr.join('') === charactersArr.reverse().join('')\n}", "function arabicWordStartCheck(contextParams) {\r\n\t const char = contextParams.current;\r\n\t const prevChar = contextParams.get(-1);\r\n\t return (\r\n\t // ? arabic first char\r\n\t (prevChar === null && isArabicChar(char)) ||\r\n\t // ? arabic char preceded with a non arabic char\r\n\t (!isArabicChar(prevChar) && isArabicChar(char))\r\n\t );\r\n\t}", "function validateName(str) {\r\n if (str.length === 0) {\r\n return false;\r\n }\r\n var initialFirstChar = str.charCodeAt(0);\r\n var initialFirstCharMatch = (initialFirstChar === 0x3A\r\n || initialFirstChar === 0x5F\r\n || (initialFirstChar >= 0x41 && initialFirstChar <= 0x5A)\r\n || (initialFirstChar >= 0x61 && initialFirstChar <= 0x7A)\r\n || (initialFirstChar >= 0xC0 && initialFirstChar <= 0xD6)\r\n || (initialFirstChar >= 0xD8 && initialFirstChar <= 0xF6)\r\n || (initialFirstChar >= 0XF8 && initialFirstChar <= 0X2FF)\r\n || (initialFirstChar >= 0x370 && initialFirstChar <= 0x37D)\r\n || (initialFirstChar >= 0x37F && initialFirstChar <= 0X1FFF)\r\n || (initialFirstChar >= 0x200C && initialFirstChar <= 0x200D)\r\n || (initialFirstChar >= 0x2070 && initialFirstChar <= 0x218F)\r\n || (initialFirstChar >= 0x2C00 && initialFirstChar <= 0x2FEF)\r\n || (initialFirstChar >= 0x3001 && initialFirstChar <= 0xD7FF)\r\n || (initialFirstChar >= 0xF900 && initialFirstChar <= 0xFDCF)\r\n || (initialFirstChar >= 0xFDF0 && initialFirstChar <= 0xFFFD));\r\n if (str.length === 1) {\r\n return initialFirstCharMatch;\r\n }\r\n // UTF-16 surrogate characters\r\n var initialSecondChar = str.charCodeAt(1);\r\n var initialSecondCharMatch = ((initialFirstChar >= 0xD800 && initialFirstChar <= 0xDB7F)\r\n && (initialSecondChar >= 0xDC00 && initialSecondChar <= 0xDFFF));\r\n if (!initialFirstCharMatch && !initialSecondCharMatch) {\r\n return false;\r\n }\r\n var start = initialSecondCharMatch ? 2 : 1;\r\n for (var i = start; i < str.length; i++) {\r\n var firstChar = str.charCodeAt(i);\r\n if (firstChar === 0x3A\r\n || firstChar === 0x5F\r\n || firstChar === 0x2D\r\n || firstChar === 0x2E\r\n || firstChar === 0xB7\r\n || (firstChar >= 0x30 && firstChar <= 0x39)\r\n || (firstChar >= 0x41 && firstChar <= 0x5A)\r\n || (firstChar >= 0x61 && firstChar <= 0x7A)\r\n || (firstChar >= 0xC0 && firstChar <= 0xD6)\r\n || (firstChar >= 0xD8 && firstChar <= 0xF6)\r\n || (firstChar >= 0XF8 && firstChar <= 0X2FF)\r\n || (firstChar >= 0x300 && firstChar <= 0x36F)\r\n || (firstChar >= 0x370 && firstChar <= 0x37D)\r\n || (firstChar >= 0x37F && firstChar <= 0X1FFF)\r\n || (firstChar >= 0x200C && firstChar <= 0x200D)\r\n || (firstChar >= 0x203F && firstChar <= 0x2040)\r\n || (firstChar >= 0x2070 && firstChar <= 0x218F)\r\n || (firstChar >= 0x2C00 && firstChar <= 0x2FEF)\r\n || (firstChar >= 0x3001 && firstChar <= 0xD7FF)\r\n || (firstChar >= 0xF900 && firstChar <= 0xFDCF)\r\n || (firstChar >= 0xFDF0 && firstChar <= 0xFFFD)) {\r\n continue;\r\n }\r\n if (i + 1 === str.length) {\r\n return false;\r\n }\r\n // UTF-16 surrogate characters\r\n var secondChar = str.charCodeAt(i + 1);\r\n if ((firstChar >= 0xD800 && firstChar <= 0xDB7F)\r\n && (secondChar >= 0xDC00 && secondChar <= 0xDFFF)) {\r\n i++;\r\n continue;\r\n }\r\n return false;\r\n }\r\n return true;\r\n}", "function isASCIIDigit(c) {\n return c >= 0x30 && c <= 0x39;\n}", "function isPalindrom(text) {\r\n let rText = text.split('').reverse().join('');\r\n let test = text.localeCompare(rText)\r\n\r\n if(test ==0)\r\n return true\r\n else return false\r\n}", "function validateSingleChar(str) {\r\n if (str.length === 0) {\r\n return false;\r\n }\r\n var firstChar = str.charCodeAt(0);\r\n if (str.length === 1) {\r\n return (firstChar === 0x9 || firstChar === 0xA || firstChar === 0xD\r\n || (firstChar >= 0x20 && firstChar <= 0xD7FF)\r\n || (firstChar >= 0xE000 && firstChar <= 0xFFFD));\r\n }\r\n if (str.length !== 2) {\r\n return false;\r\n }\r\n // UTF-16 surrogate characters\r\n var secondChar = str.charCodeAt(1);\r\n return ((firstChar >= 0xD800 && firstChar <= 0xDBFF)\r\n && (secondChar >= 0xDC00 && secondChar <= 0xDFFF));\r\n}", "function isDigitalOrLetter(str)\n{\n\tvar result = true;\n \tif(str == null || str.trim() == \"\") return false;\n\t\n\tstr = str.trim();\n\n for(var i=0; i<str.length; i++)\n {\n var strSub = str.substring(i,i+1); \n if( !((strSub<=\"9\"&&strSub>=\"0\") || \n\t\t (strSub<=\"Z\"&&strSub>=\"A\") || \n\t\t\t(strSub<=\"z\"&&strSub>=\"a\")) )\n {\n\t\t\tresult = false;\n\t\t\tbreak;\n }\n }\n return result ;\t\n}", "function letterCheck(str, letter) { return str.includes(letter) }", "function isLetter(ch) {\n if (ch.match(/[a-zA-Z]/i)) {\n return true;\n } else {\n return false;\n }\n}", "function nonsenseChinesePhrase() {\n // U0530 - U18B0 all unicode (lots of trains for some reason)\n // var word = getRandomKatakana() + \" \" + getRandomKatakana() + \" \" + getRandomKatakana();\n var word = getRandomChineseCharacter() + \" \" + getRandomChineseCharacter();\n word = encodeURIComponent(word);\n return word;\n}", "function testInUpperCaseAlphabet(){\n\t\tvar StringUtils = LanguageModule.StringUtils;\n\t\tvar stringUtils = new StringUtils();\n\t\tvar encodings = stringUtils.stringEncodings;\n\t\tvar lencodings = stringUtils.languageEncodings;\n\t\tvar isUpperCaseInAlphabet1 = stringUtils.isUpperCaseInAlphabet(\"abcdef\", encodings.ASCII, lencodings.ENGLISH);\n\t\tvar isUpperCaseInAlphabet2 = stringUtils.isUpperCaseInAlphabet(\"ABCDEF\", encodings.ASCII, lencodings.ENGLISH);\n\t\tvar isUpperCaseInAlphabet3 = stringUtils.isUpperCaseInAlphabet(\"0123456789\", encodings.ASCII, lencodings.ENGLISH);\n\t\tvar isUpperCaseInAlphabet4 = stringUtils.isUpperCaseInAlphabet(\"g\", encodings.ASCII, lencodings.ENGLISH);\n\t\tvar isUpperCaseInAlphabet5 = stringUtils.isUpperCaseInAlphabet(\"->?\", encodings.ASCII, lencodings.ENGLISH);\n\t\texpect(isUpperCaseInAlphabet1).to.eql(false);\n\t\texpect(isUpperCaseInAlphabet2).to.eql(true);\n\t\texpect(isUpperCaseInAlphabet3).to.eql(false);\n\t\texpect(isUpperCaseInAlphabet4).to.eql(false);\n\t\texpect(isUpperCaseInAlphabet5).to.eql(false);\n\t}", "function isValidReasonPhrase (statusText) {\n\t for (let i = 0; i < statusText.length; ++i) {\n\t const c = statusText.charCodeAt(i);\n\t if (\n\t !(\n\t (\n\t c === 0x09 || // HTAB\n\t (c >= 0x20 && c <= 0x7e) || // SP / VCHAR\n\t (c >= 0x80 && c <= 0xff)\n\t ) // obs-text\n\t )\n\t ) {\n\t return false\n\t }\n\t }\n\t return true\n\t}", "function isDirectionLTR(str,strongFallback){return getDirection(str,strongFallback)===UnicodeBidiDirection.LTR;}", "function testIsInAlphabet(){\n\t\tvar StringUtils = LanguageModule.StringUtils;\n\t\tvar stringUtils = new StringUtils();\n\t\tvar encodings = stringUtils.stringEncodings;\n\t\tvar lencodings = stringUtils.languageEncodings;\n\t\tvar romanceTest1 = stringUtils.isInAlphabet(\"abcdef\", encodings.ASCII, lencodings.ENGLISH);\n\t\tvar romanceTest2 = stringUtils.isInAlphabet(\"ABCDEF\", encodings.ASCII, lencodings.ENGLISH);\n\t\tvar romanceTest3 = stringUtils.isInAlphabet(\"0123456789\", encodings.ASCII, lencodings.ENGLISH);\n\t\tvar romanceTest4 = stringUtils.isInAlphabet(\"g\", encodings.ASCII, lencodings.ENGLISH);\n\t\tvar romanceTest5 = stringUtils.isInAlphabet(\"->?\", encodings.ASCII, lencodings.ENGLISH);\n\t\texpect(romanceTest1).to.eql(true);\n\t\texpect(romanceTest2).to.eql(true);\n\t\texpect(romanceTest3).to.eql(false);\n\t\texpect(romanceTest4).to.eql(true);\n\t\texpect(romanceTest5).to.eql(false);\n\t}", "function isPangram(string){\n let a_z = \"abcdefghijklmnopqrstuvwxyz\";\n let str = string.split('');\n \n for(let i=0; i<str.length; i++){\n let s = str[i].toLowerCase();\n a_z = a_z.replace(s, \"\");\n }\n \n if(a_z.length === 0){\n return true;\n } else {\n return false;\n }\n}", "function isPangram(string) {\n return \"abcdefghijklmnopqrstuvwxyz\"\n .split(\"\")\n .every((x) => string.toLowerCase().includes(x));\n}", "function isWord(str){\n\n\tlet out = true;\n\tif (str.search(/[^\\w\\s]/) != -1){\n\n\t\tout = false;\n\t};\n\treturn out\n}", "static stringToTrytes(str) {\n const encoded = TextHelper.encodeNonASCII(str);\n return encoded ? TrytesHelper.fromAscii(encoded) : \"\";\n }", "function is_safe_font(a) {\n\n if (isUndefined(a)) {\n return false;\n }\n\n if (a.toLowerCase().match(/\\barial\\b|\\barial black\\b|\\barial narrow\\b|\\barial rounded mt bold\\b|\\bavant garde\\b|\\bcalibri\\b|\\bcandara\\b|\\bcentury gothic\\b|\\bfranklin gothic medium\\b|\\bgeneva\\b|\\bfutura\\b|\\bgill sans\\b|\\bhelvetica neue\\b|\\bimpact\\b|\\blucida grande\\b|\\boptima\\b|\\bsegoe ui\\b|\\btahoma\\b|\\btrebuchet ms\\b|\\bverdana\\b|\\bbig caslon\\b|\\bbodoni mt\\b|\\bbook antiqua\\b|\\bcalisto mt\\b|\\bcambria\\b|\\bdidot\\b|\\bgaramond\\b|\\bgeorgia\\b|\\bgoudy old style\\b|\\bhoefler text\\b|\\blucida bright\\b|\\bpalatino\\b|\\bperpetua\\b|\\brockwell\\b|\\brockwell extra bold\\b|\\bbaskerville\\b|\\btimes new roman\\b|\\bconsolas\\b|\\bcourier new\\b|\\blucida console\\b|\\bhelveticaneue\\b/i)) {\n return true;\n } else {\n return false;\n }\n\n }", "function isLetter(str) {\r\n\tif (str.length === 1 && str.match(/[a-z]/i)) {\r\n\t\treturn true;\r\n\t} else {\r\n\t\treturn false;\r\n\t}\r\n}", "function localeTest() {\n var str, t;\n\n // context specific Greek sigma rule\n\n str = 'A\\u03a3!'; // prev is letter, curr is U+03A3 (Greek capital letter sigma), next is not letter\n t = str.toLowerCase();\n print(typeof t, t.length, t.charCodeAt(0), t.charCodeAt(1), t.charCodeAt(2));\n\n str = 'A\\u03a3A'; // should no longer apply\n t = str.toLowerCase();\n print(typeof t, t.length, t.charCodeAt(0), t.charCodeAt(1), t.charCodeAt(2));\n\n // FIXME: add locale specific test and ensure locale specific rules do not apply\n}", "function in_ascii_range(str) {\n for (let i = 0; i < str.length; i++) {\n let c = str.charCodeAt(i);\n \n if ( !(c >= 32 && c <= 127) ) {\n return false;\n }\n }\n return true;\n}", "function isChar(c) {\n return (c >= 0x0001 && c <= 0xD7FF) ||\n (c >= 0xE000 && c <= 0xFFFD) ||\n (c >= 0x10000 && c <= 0x10FFFF);\n}", "function testIsInRomanceAlphabet(){\n\t\tvar StringUtils = LanguageModule.StringUtils;\n\t\tvar stringUtils = new StringUtils();\n\t\tvar encodings = stringUtils.stringEncodings;\n\t\tvar romanceTest1 = stringUtils.isInRomanceAlphabet(\"abcdef\", encodings.ASCII);\n\t\tvar romanceTest2 = stringUtils.isInRomanceAlphabet(\"ABCDEF\", encodings.ASCII);\n\t\tvar romanceTest3 = stringUtils.isInRomanceAlphabet(\"0123456789\", encodings.ASCII);\n\t\tvar romanceTest4 = stringUtils.isInRomanceAlphabet(\"g\", encodings.ASCII);\n\t\tvar romanceTest5 = stringUtils.isInRomanceAlphabet(\"->?\", encodings.ASCII);\n\t\texpect(romanceTest1).to.eql(true);\n\t\texpect(romanceTest2).to.eql(true);\n\t\texpect(romanceTest3).to.eql(false);\n\t\texpect(romanceTest4).to.eql(true);\n\t\texpect(romanceTest5).to.eql(false);\n\t}", "function detectUTF8(txt) {\n if(txt) return txt.match(/([\\xC2-\\xDF][\\x80-\\xBF]|\\xE0[\\xA0-\\xBF][\\x80-\\xBF]|[\\xE1-\\xEF][\\x80-\\xBF][\\x80-\\xBF]|\\xF0[\\x90-\\xBF][\\x80-\\xBF][\\x80-\\xBF]|[\\xF1-\\xF7][\\x80-\\xBF][\\x80-\\xBF][\\x80-\\xBF]|\\xF8[\\x88-\\xBF][\\x80-\\xBF][\\x80-\\xBF][\\x80-\\xBF]|[\\xF9-\\xFB][\\x80-\\xBF][\\x80-\\xBF][\\x80-\\xBF][\\x80-\\xBF]|\\xFC[\\x84-\\xBF][\\x80-\\xBF][\\x80-\\xBF][\\x80-\\xBF][\\x80-\\xBF]|\\xFD[\\x80-\\xBF][\\x80-\\xBF][\\x80-\\xBF][\\x80-\\xBF][\\x80-\\xBF])/) != null;\n return false;\n}", "function isPangram(str){\n const alphArr = ['a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z'];\n let s = str.replace(/[^a-z]/ig, '');\n let strArr = s.toLowerCase().split('');\n strArr.map(char => alphArr.includes(char) && alphArr.splice(alphArr.indexOf(char), 1));\n return !alphArr.length;\n}", "checkLetter(e){\n const phraseJoin = this.phrase.join('');\n return phraseJoin.includes(e.toLowerCase()) ? true : false;\n }", "function arabicSentenceStartCheck(contextParams) {\r\n\t const char = contextParams.current;\r\n\t const prevChar = contextParams.get(-1);\r\n\t return (\r\n\t // ? an arabic char preceded with a non arabic char\r\n\t (isArabicChar(char) || isTashkeelArabicChar(char)) &&\r\n\t !isArabicChar(prevChar)\r\n\t );\r\n\t}", "checkLetter(letter) {\n return this.phrase.includes(letter.textContent);\n }", "function getArabicForm(c) {\n if (c <= 2) { return 0; }\n if (c > 2 && c < 11) { return 1; }\n return 0;\n }", "function isMultibyte(value) {\n return typeof value === 'string' && validator_lib_isMultibyte__WEBPACK_IMPORTED_MODULE_1___default()(value);\n}", "function isAlphabet(x){\n var as = \"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ\";\n return (as.indexOf(x) != -1);\n}", "function isTextSimple(value)\n{\n for(var i = 0; i < value.length; ++ i)\n {\n if(value[i] >= '0' && value[i] <= '9')\n {\n continue;\n }\n if(value[i] >= 'a' && value[i] <= 'z')\n {\n continue;\n }\n if(value[i] >= 'A' && value[i] <= 'Z')\n {\n continue;\n }\n if(value[i] == '_')\n {\n continue;\n }\n return false;\n }\n return true;\n}", "function isValidString(str, alphabet){ \n\tfor(var i=0;i<str.length;i++){ \n\t\tif(alphabet.indexOf(str[i]) == -1){\t\n\t\t\treturn(false); //if invalid\n\t\t}\n\t}\n\treturn(true); //if valid\n}", "function isAlphabetic(string) {\n\treturn isAlphabetic1(string, true);\n}", "function isLetter(str) {\r\n\tvar re = /[^a-zA-Z]/g;\r\n\tif (re.test(str)) {\r\n\t\treturn false;\r\n\t}\r\n\treturn true;\r\n}", "function isValidChar(toCheck) {\n\n var ascii = toCheck.charCodeAt(0)\n\n //check for letters \n if( (ascii > 64 && ascii < 91) || (ascii > 96 && ascii < 123)) {\n return true\n }\n\n //Check for puncuation marks\n if(toCheck === '\\'' || toCheck === \"!\" || toCheck === \".\" || toCheck === \"?\") {\n return true\n } \n\n //Not valid\n return false\n}", "function isHeterogram(string){\n // Dictionary for determining the frequency of characters in the string\n let stringFreq = {};\n\n // Check if the string has more than 20 characters\n if(string.length > 20){\n return false;\n }\n\n // iterate over each character in the string\n for(let i = 0; i < string.length; i++){\n // Check if the character has frequency > 1, character is a number or character is a punctuation.\n if(stringFreq.hasOwnProperty(string.charAt(i)) || !isNaN(string.charAt(i)) || !string.charAt(i).match(/[a-z]/i)){\n return false;\n } else {\n stringFreq[string.charAt(i)] = 1;\n }\n }\n // String is a valid heterogram we can react with. Return true.\n return true;\n}", "function isPangram(string) {\n let list = new Array(26).fill(0); //initialize array\n string = string.split(\" \").join(\"\"); // gets rid of spaces 71\n for (let i = 0; i < string.length; i++) {\n list[string[i].toLowerCase().charCodeAt(0) - 97]++;\n }\n return list;\n //return string.split(\"\").findIndex(num => num == 0) == -1 ? true : false;\n}", "function isAlpha(text) {\n\t\tif (text.length === 1) {\n\t\t\tif (alphabet.indexOf(text) !== false)\n\t\t\t\treturn true;\n\t\t} return false;\n\t}", "function isDirectionRTL(str, strongFallback) {\n\t return getDirection(str, strongFallback) === UnicodeBidiDirection.RTL;\n\t}", "function isLetter(myString){\n return /[a-zA-Z]/.test(myString);\n}", "function isLetters(input){\n for(let i = 0; i < input.length; i++){\n if(input.charAt(i) < 10){\n return false;\n break;\n }\n }\n }", "function validarSoloLetra(string) {\r\n if (string.includes(\"#\") || string.includes(\"$\") || string.includes(\"´\"))\r\n {\r\n return true;\r\n }\r\n }", "function isLetter (c)\n{\nvar lowercaseLetters = \"abcdefghijklmnopqrstuvwxyzáéíóúñü.,\"\nvar uppercaseLetters = \"ABCDEFGHIJKLMNOPQRSTUVWXYZÁÉÍÓÚÑ\"\n return( ( uppercaseLetters.indexOf( c ) != -1 ) ||\n ( lowercaseLetters.indexOf( c ) != -1 ) )\n}", "function isUTF16(data) {\n var i = 0;\n var len = data && data.length;\n var pos = null;\n var b1, b2, next, prev;\n\n if (len < 2) {\n if (data[0] > 0xFF) {\n return false;\n }\n } else {\n b1 = data[0];\n b2 = data[1];\n if (b1 === 0xFF && // BOM (little-endian)\n b2 === 0xFE) {\n return true;\n }\n if (b1 === 0xFE && // BOM (big-endian)\n b2 === 0xFF) {\n return true;\n }\n\n for (; i < len; i++) {\n if (data[i] === 0x00) {\n pos = i;\n break;\n } else if (data[i] > 0xFF) {\n return false;\n }\n }\n\n if (pos === null) {\n return false; // Non ASCII\n }\n\n next = data[pos + 1]; // BE\n if (next !== void 0 && next > 0x00 && next < 0x80) {\n return true;\n }\n\n prev = data[pos - 1]; // LE\n if (prev !== void 0 && prev > 0x00 && prev < 0x80) {\n return true;\n }\n }\n\n return false;\n}", "function isUTF16(data) {\n var i = 0;\n var len = data && data.length;\n var pos = null;\n var b1, b2, next, prev;\n\n if (len < 2) {\n if (data[0] > 0xFF) {\n return false;\n }\n } else {\n b1 = data[0];\n b2 = data[1];\n if (b1 === 0xFF && // BOM (little-endian)\n b2 === 0xFE) {\n return true;\n }\n if (b1 === 0xFE && // BOM (big-endian)\n b2 === 0xFF) {\n return true;\n }\n\n for (; i < len; i++) {\n if (data[i] === 0x00) {\n pos = i;\n break;\n } else if (data[i] > 0xFF) {\n return false;\n }\n }\n\n if (pos === null) {\n return false; // Non ASCII\n }\n\n next = data[pos + 1]; // BE\n if (next !== void 0 && next > 0x00 && next < 0x80) {\n return true;\n }\n\n prev = data[pos - 1]; // LE\n if (prev !== void 0 && prev > 0x00 && prev < 0x80) {\n return true;\n }\n }\n\n return false;\n}", "function isSpecialCharacter(str){\n return /[~`!#$%\\^&*+=\\-\\[\\]\\\\';,/{}|\\\\\":<>\\?]/g.test(str);\n}", "function isJIS (data) {\n var i = 0\n var len = data && data.length\n var b, esc1, esc2\n\n for (; i < len; i++) {\n b = data[i]\n if (b > 0xFF || (b >= 0x80 && b <= 0xFF)) {\n return false\n }\n\n if (b === 0x1B) {\n if (i + 2 >= len) {\n return false\n }\n\n esc1 = data[i + 1]\n esc2 = data[i + 2]\n if (esc1 === 0x24) {\n if (esc2 === 0x28 || // JIS X 0208-1990/2000/2004\n esc2 === 0x40 || // JIS X 0208-1978\n esc2 === 0x42) { // JIS X 0208-1983\n return true\n }\n } else if (esc1 === 0x26 && // JIS X 0208-1990\n esc2 === 0x40) {\n return true\n } else if (esc1 === 0x28) {\n if (esc2 === 0x42 || // ASCII\n esc2 === 0x49 || // JIS X 0201 Halfwidth Katakana\n esc2 === 0x4A) { // JIS X 0201-1976 Roman set\n return true\n }\n }\n }\n }\n\n return false\n }", "function is_alphanum(str) {\n let curr_char\n for (let i = 0; i < str.length; i ++) {\n curr_char = str.charCodeAt(i)\n if (!(curr_char == 95 || curr_char == 46) &&\n !(curr_char > 47 && curr_char < 58) &&\n !(curr_char > 64 && curr_char < 91) &&\n !(curr_char > 96 && curr_char < 123)) {\n return false\n }\n }\n return true\n}", "function isUTF16 (data) {\n var i = 0\n var len = data && data.length\n var pos = null\n var b1, b2, next, prev\n\n if (len < 2) {\n if (data[0] > 0xFF) {\n return false\n }\n } else {\n b1 = data[0]\n b2 = data[1]\n if (b1 === 0xFF && // BOM (little-endian)\n b2 === 0xFE) {\n return true\n }\n if (b1 === 0xFE && // BOM (big-endian)\n b2 === 0xFF) {\n return true\n }\n\n for (; i < len; i++) {\n if (data[i] === 0x00) {\n pos = i\n break\n } else if (data[i] > 0xFF) {\n return false\n }\n }\n\n if (pos === null) {\n return false // Non ASCII\n }\n\n next = data[pos + 1] // BE\n if (next !== void 0 && next > 0x00 && next < 0x80) {\n return true\n }\n\n prev = data[pos - 1] // LE\n if (prev !== void 0 && prev > 0x00 && prev < 0x80) {\n return true\n }\n }\n\n return false\n }", "function isLetter(str) {\n return str.length === 1 && str.match(/[a-z]/i);\n}" ]
[ "0.8350256", "0.68474793", "0.6408627", "0.6272186", "0.6090423", "0.601828", "0.598273", "0.5961693", "0.5850817", "0.5803946", "0.5742258", "0.5692749", "0.568923", "0.56820714", "0.5675699", "0.56548613", "0.5625955", "0.56218815", "0.5614115", "0.5591348", "0.55236053", "0.5523245", "0.552197", "0.550544", "0.5489413", "0.5488293", "0.54572344", "0.54508185", "0.54436487", "0.5442219", "0.5440359", "0.54352593", "0.5434499", "0.5428565", "0.5422777", "0.54032725", "0.5398617", "0.5380725", "0.5367022", "0.5363906", "0.53466696", "0.5339021", "0.53317505", "0.5327631", "0.532569", "0.53252345", "0.5317431", "0.5307891", "0.53077006", "0.5305108", "0.530462", "0.52991545", "0.529859", "0.5296921", "0.5296227", "0.52943635", "0.52813447", "0.527386", "0.5267465", "0.52654153", "0.5249416", "0.5247315", "0.5238213", "0.5236793", "0.5230515", "0.52269894", "0.5220986", "0.52176565", "0.5214097", "0.520591", "0.5202515", "0.5201921", "0.51972634", "0.51849735", "0.5179215", "0.5170057", "0.51583934", "0.51547545", "0.51469755", "0.5130793", "0.5126993", "0.51219785", "0.51199573", "0.51026875", "0.5099486", "0.50993204", "0.50921834", "0.5092042", "0.5091371", "0.5087376", "0.5083014", "0.50763226", "0.50733864", "0.5073165", "0.5073165", "0.50668746", "0.5066318", "0.50658005", "0.5064109", "0.50616896" ]
0.8694472
0
This method will logout the user from the app
function logout() { /* Cleanning up user's history */ PStorage.drop(); PStorage.init(function () { PStorage.set('logout', JSON.stringify({ lat: userModel.get('latitude'), lon: userModel.get('longitude') }), function () { facebookConnectPlugin.logout(function () { location.reload(); }); }); }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "logout () {\n API.User.Logout(AppStorage.getAuthToken())\n .then(() => {\n AppDispatcher.handleAction({\n actionType: 'CLEAR_SESSION'\n })\n AppStorage.clearAll()\n browserHistory.push('/')\n })\n .catch(error => {\n AppSignal.sendError(error)\n AppDispatcher.handleAction({\n actionType: 'CLEAR_SESSION'\n })\n AppStorage.clearAll()\n browserHistory.push('/')\n })\n }", "function logoutAppUser() {\n this.setLoggedInUser(null);\n this.setToken(null);\n }", "function logout() {\n var user = $stamplay.User().Model;\n user.logout();\n }", "function logout(){\n\t\t\tParse.User.logOut();\n\t\t}", "logout() {\n _handleUserLogout();\n userDb.logout(this.user);\n this.userId = null;\n }", "logOut() {\n authContextApi.logOut();\n }", "logout() { Backend.auth.logout(); }", "function logout() {\n setToken(null);\n setCurrentUser(null);\n }", "onLogoutClicked() {\n AuthActions.logoutUser();\n }", "function logoutUser() {\n auth.logout()\n .then(() => {\n sessionStorage.clear();\n showInfo('Logout successful.');\n userLoggedOut();\n }).catch(handleError);\n }", "function logout(context) {\n userModel.logout()\n .then(function () {\n sessionStorage.clear();\n handler.showInfo(`Logout successful.`);\n context.redirect('#/home');\n })\n }", "function logout() {\n setCurrentUser(null);\n setToken(null);\n }", "logOutCurrentUser() {\n var self = this;\n self.auth.signOut();\n }", "logout() {\n this.setAccessToken(null);\n this.user = null;\n }", "logout() {\n this.authenticated = false;\n\n localStorage.removeItem('user');\n }", "function logout()\n {\n setUserData({\n token: undefined,\n user: undefined\n })\n localStorage.setItem(\"auth-token\", \"\")\n }", "function logout() {\n window.Lemonade.Mirror.send('logout', CookieManager.getCookie('loggedIn_user'), CookieManager.getCookie('loggedIn_session'));\n\n Store.AuthStore.dispatch(Auth.LOGOUT_ACTION());\n CookieManager.removeCookie('loggedIn');\n CookieManager.removeCookie('loggedIn_user');\n CookieManager.removeCookie('loggedIn_session');\n}", "logout(){\n\t\tvar self = this;\n\t\t\n\t\tUserHttpService.logout().then(function () {\n\t\t\tself.setState({\n\t\t\t\tuserSession: null\n\t\t\t}, function (){\n\t\t\t\t//redirect to the home page\n\t\t\t\tthis.props.history.push(\"/\");\n\t\t\t});\n\t\t});\t\n\t}", "logout() {\n localStorage.removeItem(\"user\");\n }", "function logOut() {\n FB.logout();\n buttonView('logOut')\n }", "logout() {\n localStorage.removeItem('user');\n }", "logout() {\r\n this.authenticated = false;\r\n localStorage.removeItem(\"islogedin\");\r\n localStorage.removeItem(\"token\");\r\n localStorage.removeItem(\"user\");\r\n }", "function logout(context) {\n userModel.logout()\n .then(function () {\n sessionStorage.clear();\n handler.showInfo(`Successfully logged out!`);\n viewController.renderHomePage(context);\n })\n }", "function logout() {\n client.logout();\n window.location = \"#page-login\";\n }", "function logout() {\n $auth.logout();\n localStorageService.remove(\"currentUser\");\n $state.go('home', {}, {reload: true});\n }", "logout() {\n\t\tUser.users.splice(User.users.indexOf(this), 1); // Remove user from memory.\n\t\t\n\t\tglobals.onLogout(this);\n\t\t\n\t\tthis.#connection.off(\"data\");\n\t\tthis.#connection.off(\"logout\");\n\t\tthis.#connection.leave(\"users\");\n\t\tthis.#connection.on(\"login\", data => User.tryLogin(this.#connection, data));\n\n\t\tthis.#connection.alert({msg:\"Logged out\", type:\"info\"});\n\t\tprint(`Web-CLI user has (been) logged out.`, `User-ID: ${this.id}`, `(Connection-ID: ${this.#connection.id})`);\n\t}", "function logout() {\n\n }", "function logout() {\n TokenService.removeToken();\n self.all = [];\n self.user = {};\n CurrentUser.clearUser();\n $window.location.reload();\n }", "function logout() {\n localStorage.removeItem('user');\n}", "logout() {\n // destroy the session\n localStorage.removeItem('session');\n }", "function logout() {\r\n return auth().signOut();\r\n }", "logout() {\n Backend.logout();\n }", "doLogout() {\n this.user = null;\n }", "logout() {\n $cookies.remove('token');\n currentUser = {};\n }", "function logout() {\n if (Token.has()) {\n $http.get('auth/logout')\n .then(function () {\n AuthEvent.deauthenticated();\n currentUser = {};\n $state.go('login');\n });\n }\n }", "onLogout() {\n\t\tlocalStorage.removeItem('userToken');\n\t}", "function logoutUser() {\n sessionStorage.clear();\n showHideMenuLinks();\n showHomeView();\n}", "function logout() {\n auth.signOut();\n}", "logout () {\n // Clear access token and ID token from local storage\n localStorage.removeItem('access_token')\n localStorage.removeItem('id_token')\n localStorage.removeItem('expires_at')\n this.userProfile = null\n this.authNotifier.emit('authChange', false)\n // navigate to the home route\n router.replace('/')\n }", "function logout() {\n localStorage.removeItem('user');\n $location.path('/');\n }", "function logout() {\n JoblyApi.token = null;\n setCurrentUser(null);\n localStorage.removeItem(\"token\");\n localStorage.removeItem(\"currentUser\");\n }", "logout() {\n fire.auth().signOut();\n }", "function logoutUser() {\n\t\tauth.logout()\n\t\t\t.then(() => {\n\t\t\t\tsessionStorage.clear();\n\t\t\t\tshowInfo('Logout successful.');\n\t\t\t\tuserLoggedOut();\n\t\t\t\tshowView('SignIn');\n\t\t\t}).catch(handleError);\n\t}", "function logout() {\n _basicLogin.logout();\n _handleSuccessLogin(null);\n}", "logout() {\n this.kdAuthService_.logout();\n }", "function logout() {\n let endpoint = \"/Users/logout?access_token=\" + window.localStorage.getItem(\"access_token\");\n let headers = {};\n let payload = {};\n sendRequest(method, endpoint, headers, payload, logoutCallback); // From CRUD.js\n return true;\n}", "function logout(){\n currentUser = null;\n updateHeader();\n toggleView(\"login\");\n}", "function logOut() {\n localStorage[config.data[0].storage_key+'_Session'] = null;\n //clearCart();\n if (config.data[0].platform == 'ios' || config.data[0].platform == 'android') {\n navigator.notification.alert(locale.message.alert[\"sign_out_message\"], function() {}, config.data[0].app_name, locale.message.button[\"close\"]);\n } else {\n alert(locale.message.alert[\"sign_out_message\"]);\n }\n redirectTopage('index.html');\n}", "_logout() {\n this._closeMenu();\n AuthActions.logout();\n }", "logoutUser() {\n // Only call change user if the elevio library has been loaded.\n this._callIfElevioIsLoaded('logoutUser');\n }", "function logout() {\n setToken(\"\");\n ShareBnBApi.token = \"\";\n localStorage.removeItem(\"token\");\n setCurrentUser({});\n }", "function logout()\n {\n\n }", "function logout() {\n if (typeof window !== \"undefined\")\n localStorage.removeItem(localStorageSessionName);\n\n httpService.clearAuthToken();\n}", "function logout() {\n $log.debug(\"logout called\");\n return $auth.logout();\n }", "logout() {\n localStorage.removeItem(\"auth\");\n }", "function logout() {\n authlog('auth0 logging out');\n clearLocalSession(); // return url strips hash and search string to remove\n // any auth creds and prevent double counting of utm\n\n webAuth.logout({\n clientId: AUTH0_CLIENT_ID,\n returnTo: document.location.origin + '/logout/?redirectUri=' + document.location.origin + document.location.pathname\n }, function (err) {\n if (!err) {\n module.exports.trigger('logout');\n }\n });\n}", "function logout() {\n\tcurrent_user_profile_picture_path = \"\";\n\tregisterUserRole(\"anonymous\");\n\tdxRequestInternal(getServerRootPath()+\"api/global_functions/logoutCurrentAccount\",\n\t\t{AuthenticationToken:getAuthenticationToken()},\n\t\tfunction(data_obj) {\n\t\t\tif (data_obj.LogoutResult === true) {\n\t\t\t\tif (!isNative()) {\n\t\t\t\t\tloadUserRoleLandingPage(\"anonymous\");\n\t\t\t\t} else {\n\t\t\t\t\tloadUserRoleLandingPage(\"native_landing\");\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tthrow new Error(\"Could not logout user: \"+JSON.stringify(data_obj));\n\t\t\t}\n\t\t},\n\t\tfunction(data_obj) {\n\t\t\tthrow new Error(\"Could not logout user: \"+JSON.stringify(data_obj));\n\t\t})\n}", "function handleLogout() {\n\t\ttry {\n\t\t\t//Resetting the user info\n\t\t\tuserContext.setUserInfo({ username: \"\", id: \"\" });\n\n\t\t\t//Changing authenticated to false\n\t\t\tuserContext.setIsAuthenticated(false);\n\n\t\t\t//Deleting the JWT from local storage;\n\t\t\tlocalStorage.removeItem(\"auth-token\");\n\t\t} catch (error) {\n\t\t\tconsole.log(error.message);\n\t\t}\n\t}", "function logout() {\n userService.logout()\n .then(function() {\n $location.url(\"\");\n });\n }", "function logout() {\n props.logoutAction();\n cookies.remove('token');\n history.push('/Login')\n }", "logout() {\n FB.logout(function(response) {\n setElements(false);\n }.bind(this));\n }", "function logOut() {\n localStorage.removeItem('idToken');\n localStorage.removeItem('username');\n localStorage.removeItem('profilePicture');\n localStorage.removeItem('userId');\n window.location.href='http://clrksanford.github.io/date-night/';\n}", "function logout(){\n localStorage.removeItem('user_email');\n localStorage.removeItem('user_token');\n localStorage.clear();\n }", "logout() {\n this.setMethod('POST');\n this.setAuth();\n return this.getApiResult(Config.LOGOUT_API);\n }", "logout() {\n\t\tgetRequest(\"/user/logout\");\n\t\tthis.setState({ user: { loginname: \"\", score: \"\", title: \"\" } });\n\t}", "function logOut(){\n clearCurrentUser();\n showLoggedOutView();\n}", "async logout () {\n this.state = 'pending'\n const token = this.rootStore.user.token\n if (!token) {\n this.state = 'done'\n console.info('No user was logged in')\n return\n }\n try {\n await Api({ token }).post('/logout/', {})\n runInAction(() => {\n this.state = 'done'\n })\n this.rootStore.clearUser()\n } catch (err) {\n this.handleError(err)\n }\n }", "logout() {\n localStorage.removeItem(\"AppBrowserState\");\n this.authHelper.logout().then(() => {\n this.setState({\n isAuthenticated: false,\n displayName: ''\n });\n });\n }", "function logout() {\n localStorage.removeItem('token')\n observer.trigger(observer.events.logoutUser);\n}", "logout() {\n localStorage.removeItem(\"token\");\n localStorage.removeItem(\"user\");\n window.location.reload();\n }", "function logout() {\n setToken(); // set token to undefined\n // Clear user\n $localStorage.user = undefined;\n\n // Clear activity filter data\n $localStorage.activityFilterData = undefined;\n\n // Clear form data\n $localStorage.selectedUser = undefined;\n $localStorage.selectedCompany = undefined;\n $localStorage.selectedDomain = undefined;\n $localStorage.userMainAccount = undefined;\n \n clearAuthHeaderForAPI();\n clearAll();\n }", "logOut() {\n localStorage.removeItem('user');\n this.router.navigateByUrl('');\n }", "function logout() {\n\t\tif (Modernizr.localstorage) {\n\t\t\tlocalStorage.removeItem('X-Authorization-Token');\n\t\t}\n\t\t\n\t\twindow.location.href = '/';\n\t}", "static logout() {\n localStorage.removeItem('auth_token');\n localStorage.removeItem('email');\n localStorage.removeItem('userid');\n localStorage.removeItem('username');\n }", "function logout() {\n delete $localStorage.currentUser;\n $window.location.reload();\n }", "function logout() {\n window.sessionStorage.clear()\n window.location.href = window.backend_url + \"logout\";\n }", "logout() {\n\t\tTokenService.destroy();\n\t\t// this.setState({ isAuthed: false });\n\t\tthis.resetState();\n\t\tconsole.log('Logout successful...');\n\t}", "logout() {\n sessionStorage.clear();\n this.showContentIfLoggedIn();\n // Clear data.\n this.secureData = \"\";\n this.reqInfo = {};\n this.username = '';\n this.admin = false;\n // Redirect home and reload that page (sorry for using this easy abd dirty way)\n window.location.href = 'http://localhost:4200/main';\n }", "function logout() {\n Restangular.one('v4/registration/logout').get().then(function() {\n localStorageService.clearAll();\n routingAuthorization.goToLogin();\n });\n }", "function logout() {\n svc.token = null;\n svc.identity = null;\n delete $window.localStorage['authToken']; \n }", "logout() {\n // Redirect to home\n this._$location.path('/login');\n // Close connector\n this._DataBridge.connector.close();\n // Set connection status to false\n this._DataStore.connection.status = false;\n // Show success alert\n this._Alert.successLogout();\n // Reset data in DataBridge service\n this._DataBridge.reset();\n // Reset data in Wallet service\n this._Wallet.reset();\n return;\n }", "function logout() {\n _Configstore2.default.delete(Constants.CONF_APPS_DETAIL);\n _Configstore2.default.delete(Constants.CONF_APPS_LIST);\n _Configstore2.default.delete(Constants.CONF_PASSWORD);\n set(Constants.CONF_PASSWORD, '');\n _Configstore2.default.set(Constants.CONF_IS_LOGGED_IN, false);\n}", "function logout() {\n localStorage.removeItem(\"payment_history\");\n localStorage.removeItem(\"Wallet\");\n localStorage.removeItem(\"new users\");\n sessionStorage.removeItem(\"session\");\n\n window.location.href = \"index.html\";\n }", "function logout() {\n sessionStorage.removeItem('id');\n sessionStorage.removeItem('token');\n sessionStorage.removeItem('registerUser');\n setIsLoggedIn(false);\n }", "function _onLogout() {\n\t sitools.userProfile.LoginUtils.logout();\n\t}", "function logOut(){\n\twindow.location.href = \"Index.html\";\n\tlocalStorage.removeItem(\"CurrentUser\");\n}", "logout() {\n localStorage.removeItem(\"token\");\n localStorage.removeItem(\"userName\");\n }", "function logOut(){\n localStorage.removeItem(\"user\");\n localStorage.removeItem(\"token\");\n templateController();\n}", "function logout() {\n localStorage.removeItem('user');\n window.location.reload(true);\n}", "function logout() {\n //$cookies.remove('token');\n }", "function logout() {\n //$cookies.remove('token');\n }", "function logout() {\r\n if (typeof ParsePushPlugin != 'undefined' && Parse.User.current()) {\r\n ParsePushPlugin.unsubscribe('user_' + Parse.User.current().id, function(msg) {\r\n $log.log('ParsePush unsubscribed')\r\n }, function(e) {\r\n $log.log('ParsePush unsubscribe error ' + e)\r\n })\r\n }\r\n return Parse.User.logOut()\r\n }", "function logout() {\n userService.logout()\n .then(\n $location.url(\"/login\"));\n }", "function signOut() {\n myMSALObj.logout();\n}", "function logout() {\r\n authenticationService.logout();\r\n toastr.success('Goodbye!');\r\n }", "function logout(){\n localStorage.clear();\n window.location.replace(\"https://stavflix.herokuapp.com/client/\");\n }", "static logout() {\n localStorage.removeItem('token');\n\n store.dispatch(sessionLogout());\n\n history.push('/user/login');\n }", "async signOut () {\n const res = await postJSON('/api/logout')\n if (!this.checkResponse(res)) {\n this.page.profileBox.style.display = 'none'\n return\n }\n State.clearAllStore()\n State.removeAuthCK()\n window.location.href = '/login'\n }", "function logout() {\n\n sessionStorage.removeItem('token')\n sessionStorage.removeItem('isLogined')\n sessionStorage.removeItem('userType')\n sessionStorage.removeItem('email')\n toggleLoginVisible(true)\n getKanjiFromDatabase()\n makeModalDisapper('logout')\n \n document.getElementById('greetMsg').innerText = `Hi, User`\n document.getElementById('userDiv').style.display = 'none'\n document.getElementById('homeDiv').style.display = ''\n\n\n}", "function logout() {\n localStorage.removeItem('id_token');\n localStorage.removeItem('AWS.config.credentials');\n authManager.unauthenticate();\n $state.reload();\n }" ]
[ "0.8283051", "0.80184275", "0.79903007", "0.79258305", "0.78486603", "0.78241765", "0.7816034", "0.77667344", "0.77546346", "0.77372015", "0.7719302", "0.7711817", "0.7708241", "0.770657", "0.76942515", "0.7691807", "0.76772714", "0.7668421", "0.7664972", "0.76479816", "0.7641759", "0.76384443", "0.7633636", "0.7627378", "0.76081413", "0.7606993", "0.7586887", "0.757806", "0.75656366", "0.755313", "0.75512433", "0.7545321", "0.7540004", "0.7517657", "0.75168175", "0.7516817", "0.75158685", "0.7515199", "0.7509772", "0.75023925", "0.74743223", "0.7472082", "0.74694264", "0.74641716", "0.74631983", "0.7462295", "0.74616116", "0.74463063", "0.7440998", "0.7440097", "0.74384785", "0.743712", "0.74316716", "0.74167985", "0.74133426", "0.741262", "0.74093187", "0.7407364", "0.74040246", "0.7397343", "0.73918307", "0.7391335", "0.7391014", "0.738099", "0.7375312", "0.73730695", "0.73653924", "0.73653066", "0.7353348", "0.73506254", "0.7348474", "0.7347479", "0.73471224", "0.7343562", "0.73395735", "0.73340845", "0.7333455", "0.73333675", "0.7328234", "0.732017", "0.7319425", "0.73188764", "0.73122936", "0.73111904", "0.73104125", "0.72967833", "0.7286557", "0.7279798", "0.7279416", "0.72777385", "0.72777385", "0.72773945", "0.7269152", "0.7266846", "0.7266635", "0.7254299", "0.7254185", "0.7250568", "0.7248302", "0.724522" ]
0.7567745
28
Check if current is iphone 4
function isIphone4() { return (device.platform == 'iOS' && screen.height == 480); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function isiOS4Plus(){\n\tif (Titanium.Platform.name == 'iPhone OS'){\n\t\tvar version = Titanium.Platform.version.split(\".\");\n\t\tvar major = parseInt(version[0]);\n\t\t// can only test this support on a 3.2+ device\n\t\tif (major >= 4){\n\t\t\treturn true;\n\t\t}\n\t}\n\treturn false;\n}", "function isIphone() {\n \t\treturn !!navigator.userAgent.match(/iPhone/i);\n\t}", "function isiPod(){\r\n\t\treturn(/(iPhone|iPod)/g).test(navigator.userAgent);\r\n\t}", "function iOSVersion() {\n\t\t\tvar oldios = false;\n\t\t\tif((navigator.userAgent.match(/iPhone/i)) || (navigator.userAgent.match(/iPod/i)) || (navigator.userAgent.match(/iPad/i))) {\n\t\t if (navigator.userAgent.match(/OS 4_\\d like Mac OS X/i)) {\n\t\t \toldios = true;\n\t\t\t\t}\n\t\t } else {\n\t\t\t\t oldios = false;\n\t\t }\n\t\t\treturn oldios;\n\t\t}", "function DetectIphone()\n{\n if (uagent.search(deviceIphone) > -1)\n return true;\n else\n return false;\n}", "function DetectIphoneOrIpod()\n\t{\n \tif (DetectIphone())\n \t\treturn true;\n \telse if (DetectIpod())\n \t\treturn true;\n \telse if (DetectIpad())\n \t\treturn true;\n \telse\n \t\treturn false;\n\t}", "function iOS() {\r\n var iDevices = [\r\n 'iPad Simulator',\r\n 'iPhone Simulator',\r\n 'iPod Simulator',\r\n 'iPad',\r\n 'iPhone',\r\n 'iPod'\r\n ];\r\n if (!!navigator.platform) {\r\n while (iDevices.length) {\r\n if (navigator.platform === iDevices.pop()){ return true; }\r\n }\r\n }\r\n return false;\r\n}", "function DetectIphone()\n{\n if (uagent.search(deviceIphone) > -1)\n {\n //The iPod touch says it's an iPhone! So let's disambiguate.\n if (uagent.search(deviceIpod) > -1)\n return false;\n else \n return true;\n }\n else\n return false;\n}", "function iOS() \r\n\t\t{\r\n\t\t\tvar iDevices = ['iPad Simulator','iPhone Simulator','iPod Simulator','iPad','iPhone','iPod'];\r\n\t\t\tvar isSafari = !!navigator.userAgent.match(/Version\\/[\\d\\.]+.*Safari/);\r\n\t\t\t\r\n\t\t\tif (!!navigator.platform) \r\n\t\t\t{\r\n\t\t\t\twhile (iDevices.length) \r\n\t\t\t\t{\r\n\t\t\t\t\tif (navigator.platform === iDevices.pop())\r\n\t\t\t\t\t{ \r\n\t\t\t\t\t\treturn true; \r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tif(isSafari)\r\n\t\t\t{\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\treturn false;\r\n\t\t}", "iOS():boolean {\n\n\t\treturn this.agent.match(/iPhone|iPad|iPod/i) ? true : false;\n\t}", "function DetectTierIphone()\n {\n if (DetectIphoneOrIpod())\n return true;\n if (DetectAndroid())\n return true;\n if (DetectAndroidWebKit())\n return true;\n if (DetectPalmWebOS())\n return true;\n if (DetectGarminNuvifone())\n return true;\n if (DetectMaemoTablet())\n return true;\n else\n return false;\n }", "function DetectIphone()\n\t{\n \t\tif (uagent.search(deviceIphone) > -1)\n \t\treturn true;\n \t\t//document.writeln('<link rel=\"stylesheet\" type=\"text/css\" href=\"style/styles_mobile.css\">');\n \t\telse\n \t\treturn false;\n\t}", "function DetectIpod()\n{\n if (uagent.search(deviceIpod) > -1)\n return true;\n else\n return false;\n}", "function DetectIpod()\n{\n if (uagent.search(deviceIpod) > -1)\n return true;\n else\n return false;\n}", "function DetectIphone()\n{\n if (uagent.search(deviceIphone) > -1)\n {\n //The iPad and iPod Touch say they're an iPhone! So let's disambiguate.\n if (DetectIpad() ||\n DetectIpod())\n return false;\n else\n return true;\n }\n else\n return false;\n}", "function DetectIpod()\n{\n if (uagent.search(deviceIpod) > -1)\n return true;\n else\n return false;\n}", "function isIOS() {\n return /iPad|iPhone|iPod/.test(ua());\n}", "function DetectIphoneOrIpod()\n{\n //We repeat the searches here because some iPods\n // may report themselves as an iPhone, which is ok.\n if (uagent.search(deviceIphone) > -1 ||\n uagent.search(deviceIpod) > -1)\n return true;\n else\n return false;\n}", "function DetectIpad()\n{\n if (uagent.search(deviceIpad) > -1 && DetectWebkit())\n return true;\n else\n return false;\n}", "function DetectIpod()\n\t{\n \t\tif (uagent.search(deviceIpod) > -1)\n \treturn true;\n \t\telse\n \t\treturn false;\n\t}", "function DetectIpad()\n\t{\n\t\tif (uagent.search(deviceIpad) > -1)\n\t\t\treturn true;\n\t\telse\n\t\t\treturn false;\n\t}", "function DetectIphoneOrIpod()\n{\n if (DetectIphone())\n return true;\n /* window.location.replace(\"file:///Users/mitchmac/Documents/github/harvest/mobiletest.html\"); */\n if (DetectIpod())\n return true;\n /* window.location.replace(\"file:///Users/mitchmac/Documents/github/harvest/mobiletest.html\");*/\n else\n return false;\n}", "function DetectIphoneOrIpodOrIPad()\n{\n //We repeat the searches here because some iPods \n // may report themselves as an iPhone, which is ok.\n if (uagent.search(deviceIphone) > -1 ||\n uagent.search(deviceIpod) > -1 ||\n uagent.search(deviceIPad) > -1)\n\n return true;\n else\n return false;\n}", "function isIOS() {\n return /iPhone|iPad|iPod/i.test(window.navigator.userAgent);\n}", "function isIOS() {\n\n var iDevices = [\"iPad\", \"iPhone\", \"iPod\"];\n\n for (var i = 0; i < iDevices.length ; i++ ) {\n \n if( navigator.platform.indexOf(iDevices[i]) !== -1){ \n return true; \n }\n }\n return false;\n}", "function checkIfIOSApp() {\n return app.device.iphone && iscordova;\n}", "function rotationAvailable() {\n var parts;\n\n if ((parts = /AppleWebkit\\/([0-9\\.]+)/i.exec(navigator.userAgent))) {\n var webkitVersion = parseFloat(parts[1]);\n return (webkitVersion > 534.3);\n } else {\n return true;\n }\n }", "function _checkOS() {\n var ua = navigator.userAgent;\n\n if (/Playstation Vita/.test(ua)) {\n device.vita = true;\n } else if (/Kindle/.test(ua) || /\\bKF[A-Z][A-Z]+/.test(ua) || /Silk.*Mobile Safari/.test(ua)) {\n device.kindle = true;\n\n /*\n * This will NOT detect early generations of Kindle Fire, I think there is no reliable way...\n * E.g. \"Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_6_3; en-us; Silk/1.1.0-80) AppleWebKit/533.16 (KHTML, like Gecko) Version/5.0 Safari/533.16 Silk-Accelerated=true\"\n */\n } else if (/Android/.test(ua)) {\n device.android = true;\n } else if (/CrOS/.test(ua)) {\n device.chromeOS = true;\n } else if (/iP[ao]d|iPhone/i.test(ua)) {\n device.iOS = true;\n navigator.appVersion.match(/OS (\\d+)/);\n device.iOSVersion = parseInt(RegExp.$1, 10);\n } else if (/Linux/.test(ua)) {\n device.linux = true;\n } else if (/Mac OS/.test(ua)) {\n device.macOS = true;\n } else if (/Windows/.test(ua)) {\n device.windows = true;\n }\n\n if (/Windows Phone/i.test(ua) || /IEMobile/i.test(ua)) {\n device.android = false;\n device.iOS = false;\n device.macOS = false;\n device.windows = true;\n device.windowsPhone = true;\n }\n\n var silk = /Silk/.test(ua); // detected in browsers\n\n if (device.windows || device.macOS || device.linux && !silk || device.chromeOS) {\n device.desktop = true;\n }\n\n // Windows Phone / Table reset\n if (device.windowsPhone || /Windows NT/i.test(ua) && /Touch/i.test(ua)) {\n device.desktop = false;\n }\n }", "function isHTCMobile() {\n var regExp = new RegExp(\"HTC\", \"i\");\n var test = navigator.userAgent.match(regExp);\n return test;\n}", "function DetectIPad()\n{\n if (uagent.search(deviceIPad) > -1) {\n\treturn true; \n }\n else {\n return false;\n }\n}", "isIos() {\n const userAgent = window.navigator.userAgent.toLowerCase();\n return /iphone|ipad|ipod/.test(userAgent);\n }", "function checkiOS() {\n\t\treturn /iPad|iPhone|iPod/.test(navigator.userAgent) && ! window.MSStream;\n\t}", "function checkiOS() {\n return /iPad|iPhone|iPod/.test(navigator.userAgent) && !window.MSStream;\n }", "function isVR() {\n var check = false;\n (function(a){if(/(android|bb\\d+|meego).+mobile|avantgo|bada\\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i.test(a)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\\-(n|u)|c55\\/|capi|ccwa|cdm\\-|cell|chtm|cldc|cmd\\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\\-s|devi|dica|dmob|do(c|p)o|ds(12|\\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\\-|_)|g1 u|g560|gene|gf\\-5|g\\-mo|go(\\.w|od)|gr(ad|un)|haie|hcit|hd\\-(m|p|t)|hei\\-|hi(pt|ta)|hp( i|ip)|hs\\-c|ht(c(\\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\\-(20|go|ma)|i230|iac( |\\-|\\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\\/)|klon|kpt |kwc\\-|kyo(c|k)|le(no|xi)|lg( g|\\/(k|l|u)|50|54|\\-[a-w])|libw|lynx|m1\\-w|m3ga|m50\\/|ma(te|ui|xo)|mc(01|21|ca)|m\\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\\-2|po(ck|rt|se)|prox|psio|pt\\-g|qa\\-a|qc(07|12|21|32|60|\\-[2-7]|i\\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\\-|oo|p\\-)|sdk\\/|se(c(\\-|0|1)|47|mc|nd|ri)|sgh\\-|shar|sie(\\-|m)|sk\\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\\-|v\\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\\-|tdg\\-|tel(i|m)|tim\\-|t\\-mo|to(pl|sh)|ts(70|m\\-|m3|m5)|tx\\-9|up(\\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\\-|your|zeto|zte\\-/i.test(a.substr(0,4))) check = true;})(navigator.userAgent||navigator.vendor||window.opera);\n return check;\n}", "Nokia ():boolean {\n\n\t\treturn this.agent.match(/Nokia/i) ? true : false;\n\t}", "function isMinIosVersionSupported(){\n if ( !isIos() ) return false;\n let platformVersionArray = iOSversion();\n if ( platformVersionArray ){\n let minVersionSupportedArray = miniOSVersionSupported.split('.').map( (v) => {return parseInt( v )} ); // [11,3]\n let [ minVersionSupported, minSubversionSupported ] = minVersionSupportedArray;\n let [ platformVersion, platformSubversion ] = platformVersionArray;\n console.log(`Device iOS version: ${platformVersion}.${platformSubversion}`);\n console.log('Min iOS verson supported: ' + minVersionSupported);\n if ( platformVersion > minVersionSupported ) {\n return true;\n }\n if ( platformVersion == minVersionSupported && platformSubversion >= minSubversionSupported){\n return true;\n }\n return false;\n } else {\n return false;\n }\n}", "function testOS() {\n var userAgent = navigator.userAgent.toLowerCase();\n if (userAgent.match(/ipad/i) == \"ipad\") {\n return \"ipad\";\n } else if (userAgent.match(/iphone/i) == \"iphone\") {\n return \"iphone\";\n } else if (userAgent.match(/android/i) == \"android\") {\n return \"android\";\n } else {\n return \"win\";\n }\n}", "function isIOS() {\n return !!(navigator.userAgent.match(/iPhone/i) || navigator.userAgent.match(/iPad/i) || navigator.userAgent.match(/iPod/i));\n }", "function _checkBrowser() {\n var ua = navigator.userAgent;\n\n if (/Arora/.test(ua)) {\n device.arora = true;\n } else if (/Edge\\/\\d+/.test(ua)) {\n device.edge = true;\n } else if (/Chrome\\/(\\d+)/.test(ua) && !device.windowsPhone) {\n device.chrome = true;\n device.chromeVersion = parseInt(RegExp.$1, 10);\n } else if (/Epiphany/.test(ua)) {\n device.epiphany = true;\n } else if (/Firefox\\D+(\\d+)/.test(ua)) {\n device.firefox = true;\n device.firefoxVersion = parseInt(RegExp.$1, 10);\n } else if (/AppleWebKit/.test(ua) && device.iOS) {\n device.mobileSafari = true;\n } else if (/MSIE (\\d+\\.\\d+);/.test(ua)) {\n device.ie = true;\n device.ieVersion = parseInt(RegExp.$1, 10);\n } else if (/Midori/.test(ua)) {\n device.midori = true;\n } else if (/Opera/.test(ua)) {\n device.opera = true;\n } else if (/Safari\\/(\\d+)/.test(ua) && !device.windowsPhone) {\n device.safari = true;\n\n if (/Version\\/(\\d+)\\./.test(ua)) {\n device.safariVersion = parseInt(RegExp.$1, 10);\n }\n } else if (/Trident\\/(\\d+\\.\\d+)(.*)rv:(\\d+\\.\\d+)/.test(ua)) {\n device.ie = true;\n device.trident = true;\n device.tridentVersion = parseInt(RegExp.$1, 10);\n device.ieVersion = parseInt(RegExp.$3, 10);\n }\n\n // Silk gets its own if clause because its ua also contains 'Safari'\n if (/Silk/.test(ua)) {\n device.silk = true;\n }\n\n // WebApp mode in iOS\n if (navigator.standalone) {\n device.webApp = true;\n }\n\n if (typeof window.cordova !== 'undefined') {\n device.cordova = true;\n }\n\n if (typeof process !== 'undefined' && typeof require !== 'undefined') {\n device.node = true;\n }\n\n if (device.node && typeof process.versions === 'object') {\n device.nodeWebkit = !!process.versions['node-webkit'];\n\n device.electron = !!process.versions.electron;\n }\n\n if (navigator.isCocoonJS) {\n device.cocoonJS = true;\n }\n\n if (device.cocoonJS) {\n try {\n device.cocoonJSApp = typeof CocoonJS !== 'undefined';\n } catch (error) {\n device.cocoonJSApp = false;\n }\n }\n\n if (typeof window.ejecta !== 'undefined') {\n device.ejecta = true;\n }\n\n if (/Crosswalk/.test(ua)) {\n device.crosswalk = true;\n }\n }", "function isiOS() {\n var iDevices = [\n 'iPad Simulator',\n 'iPhone Simulator',\n 'iPod Simulator',\n 'iPad',\n 'iPhone',\n 'iPod'\n ];\n\n if (!!navigator.platform) {\n while (iDevices.length) {\n if (navigator.platform === iDevices.pop()){ return true; }\n }\n }\n\n return false;\n}", "function is_ios() {\n return /iPad|iPhone|iPod/.test(navigator.userAgent) && !window.MSStream;\n}", "function DetectaIpad(){\n\n if (uagent.search(dispositivoIpad) > -1 && DetectaWebkit())\n\n return true;\n\n else\n\n return false;\n\n}", "function needsFixedSupport() {\n var version = parseFloat(phonon.device.osVersion);\n\n if (phonon.device.os === phonon.device.ANDROID && !isNaN(version) && version < 4.4) {\n return true;\n }\n\n return false;\n }", "function isMobileDevice() {\n return /Mobi/.test(navigator.userAgent);\n}", "function isMobile(){\r\n if (\r\n (navigator.userAgent.match (/Android/i)) ||\r\n (navigator.userAgent.match (/webOS/i)) ||\r\n (navigator.userAgent.match (/Mobi/i)) ||\r\n (navigator.userAgent.match (/iPhone/i)) ||\r\n (navigator.userAgent.match (/iPad/i)) ||\r\n (navigator.userAgent.match (/iPod/i)) ||\r\n (navigator.userAgent.match (/BlackBerry/i)) \r\n ) return 'Mobile';\r\n return 'PC';\r\n }", "function DetectSonyPlaystation()\n{\n if (uagent.search(devicePlaystation))\n return true;\n else\n return false;\n }", "function getDeviceInfo(){\n devicePlatform = device.platform;\n deviceVersion = device.version;\n deviceIsIOS = (devicePlatform == \"iOS\");\n deviceIsAndroid = (devicePlatform == \"android\") || (devicePlatform == \"Android\") || (devicePlatform == \"amazon-fireos\")\n if (deviceIsIOS) {\n if (deviceVersion.indexOf(\"8\") == 0) {\n deviceIOSVersion = 8\n } else if (deviceVersion.indexOf(\"7\") == 0) {\n deviceIOSVersion = 7\n } else if (deviceVersion.indexOf(\"6\") == 0) {\n deviceIOSVersion = 6\n } else if (deviceVersion.indexOf(\"5\") == 0) {\n deviceIOSVersion = 5\n } else {\n deviceIOSVersion = 4 // iOS version <= 4\n }\n }\n}", "IEMobile ():boolean {\n\n\t\tvar trident = this.agent.match(/IEMobile/i);\n\t\tvar windowsphone = this.agent.match(/Windows Phone/i);\n\t\tvar touch = this.agent.match(/touch/i);\n\n\t\treturn trident || windowsphone || touch ? true : false;\n\t}", "function isAppleMobile() {\n var regExp = new RegExp(\"iPhone|iPad|iPod\", \"i\");\n return navigator.userAgent.match(regExp);\n}", "function isIpad() { return (navigator.userAgent.match(/iPad/i)) && (navigator.userAgent.match(/iPad/i)!= null); }", "function isMobile() {\r\n\tvar ua = navigator.userAgent;\r\n\tvar checker = {\r\n\t\tiphone:ua.match(/(iPhone|iPod|iPad)/),\r\n\t\tblackberry:ua.match(/BlackBerry/),\r\n\t\tandroid:ua.match(/Android/)\r\n\t}\r\n\r\n\tif (checker.iphone || checker.blackberry || checker.android) {\r\n\t\treturn true;\r\n\t}\r\n\treturn false;\r\n}", "function MobileSupport() {\n var ua = navigator.userAgent;\n return {\n iphone: ua.match(/(iPhone|iPod|iPad)/),\n blackberry: ua.match(/BlackBerry/),\n android: ua.match(/Android/)\n };\n}", "function detectBuild() {\n var tmp = navigator.userAgent.indexOf('Mobile/') > -1;\n if(tmp) {\n tmp = navigator.userAgent.split('Mobile/');\n if(tmp.length<1) return null;\n return alert(tmp[1].split(' ')[0]);\n }\n return null;\n}", "function navigatorID(id)\r\n{\r\n var detect = navigator.userAgent.toLowerCase();\r\n if(detect.indexOf(id) != -1)\r\n {\r\n \treturn true;\r\n }\t\r\n else\r\n {\r\n \treturn false;\r\n }\r\n}", "get is_ios() {\n\t\tconst ios_list = [ 'iPad Simulator', 'iPhone Simulator', 'iPod Simulator', 'iPad', 'iPhone', 'iPod' ];\n\t\tconst is_ios = ios_list.includes(navigator.platform);\n\t\tconst is_mac = (navigator.userAgent.includes(\"Mac\") && \"ontouchend\" in document);\n\t\treturn is_ios || is_mac;\n\t}", "function IsPC() {\r\n var userAgentInfo = navigator.userAgent;\r\n var Agents = [\"Android\", \"iPhone\", \"SymbianOS\", \"Windows Phone\",\"iPad\", \"iPod\"];\r\n var flag = true;\r\n for (var v = 0; v < Agents.length; v++) {\r\n if (userAgentInfo.indexOf(Agents[v]) > 0) {\r\n flag = false;\r\n break;\r\n }\r\n }\r\n return flag;\r\n}", "function on_mobile_device() { return $(document).width() <= 760 }", "function isIos(){\n console.log(window.navigator.userAgent)\n const userAgent = window.navigator.userAgent.toLowerCase();\n return /iphone|ipad|ipod/.test( userAgent );\n}", "function mustReactToSwipe() {\n return ($.browser.ipad || $.browser.iphone);\n}", "function setDevice() {\n -1 !=\n (navigator.userAgent.indexOf(\"Opera\") || navigator.userAgent.indexOf(\"OPR\"))\n ? alert(\"Opera\")\n : -1 != navigator.userAgent.indexOf(\"Chrome\")\n ? (seek = 1.45)\n : -1 != navigator.userAgent.indexOf(\"Safari\")\n ? (seek = 0)\n : -1 != navigator.userAgent.indexOf(\"Firefox\")\n ? (seek = 0)\n : -1 < navigator.userAgent.indexOf(\"Edge\")\n ? (seek = 0)\n : -1 != navigator.userAgent.indexOf(\"MSIE\") || 1 == !!document.documentMode\n ? alert(\"IE\")\n : alert(\"unknown\");\n}", "function isOnloadSupported() {\n\tvar userAgent = navigator.userAgent;\n\tvar supportedMajor = 535;\n\tvar supportedMinor = 24;\n\tvar match = userAgent.match(/\\ AppleWebKit\\/(\\d+)\\.(\\d+)/);\n\tif (match) {\n\t\tvar major = +match[1];\n\t\tvar minor = +match[2];\n\t\treturn (\n\t\t\t(major === supportedMajor && minor >= supportedMinor) ||\n\t\t\tmajor > supportedMajor\n\t\t);\n\t}\n\t// All other browsers support it\n\treturn true;\n}", "function _checkDevice() {\n device.pixelRatio = window.devicePixelRatio || 1;\n device.iPhone = navigator.userAgent.toLowerCase().indexOf('iphone') !== -1;\n device.iPhone4 = device.pixelRatio === 2 && device.iPhone;\n device.iPad = navigator.userAgent.toLowerCase().indexOf('ipad') !== -1;\n\n if (typeof Int8Array !== 'undefined') {\n device.typedArray = true;\n } else {\n device.typedArray = false;\n }\n\n if (typeof ArrayBuffer !== 'undefined' && typeof Uint8Array !== 'undefined' && typeof Uint32Array !== 'undefined') {\n device.littleEndian = _checkIsLittleEndian();\n device.LITTLE_ENDIAN = device.littleEndian;\n }\n\n device.support32bit = typeof ArrayBuffer !== 'undefined' && typeof Uint8ClampedArray !== 'undefined' && typeof Int32Array !== 'undefined' && device.littleEndian !== null && _checkIsUint8ClampedImageData();\n\n navigator.vibrate = navigator.vibrate || navigator.webkitVibrate || navigator.mozVibrate || navigator.msVibrate;\n\n if (navigator.vibrate) {\n device.vibration = true;\n }\n }", "function DetectSmartphone()\n{\n //First, look for iPhone and iPod Touch.\n if (DetectIphoneOrIpodOrIPad())\n return true;\n\n //Now, look for S60 Open Source Browser on S60 release 3 devices.\n if (DetectS60OssBrowser())\n return true;\n\n //Check for other Symbian devices - older S60, UIQ, other.\n if (DetectSymbianOS())\n return true;\n\n //Check for Windows Mobile devices.\n if (DetectWindowsMobile())\n return true;\n\n //Next, look for a BlackBerry\n if (DetectBlackBerry())\n return true;\n\n //PalmOS.\n if (DetectPalmOS())\n return true;\n\n //Otherwise, return false.\n return false;\n}", "function mobileDetect(){\n var $viewportWidth = $(window).width();\n var mobileThreshold = 500;\n return $viewportWidth < mobileThreshold;\n}", "function isSmartphone() {\n\treturn $(window).height() > $(window).width();\n}", "function isPhone() {\n var mobiles = [\n \"Android\",\n \"iPhone\",\n \"Linux armv8l\",\n \"Linux armv7l\",\n \"Linux aarch64\"\n ];\n if (mobiles.includes(navigator.platform) || /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)) {\n return true;\n }\n return false;\n}", "function isMobileDevice()\r\n\t\t{\r\n\t\t\tvar testExp = new RegExp('Android|webOS|iPhone|iPad|' + 'BlackBerry|Windows Phone|' + 'Opera Mini|IEMobile|Mobile' , 'i');\r\n\t\t \r\n\t\t\tif (testExp.test(navigator.userAgent))\r\n\t\t\t\treturn true;\r\n\t\t\telse\r\n\t\t\t\treturn false;\r\n\t\t}", "isPhone () {\n return !this.isTablet();\n }", "function DetectSmartphone()\n {\n if (DetectIphoneOrIpod())\n return true;\n if (DetectS60OssBrowser())\n return true;\n if (DetectSymbianOS())\n return true;\n if (DetectWindowsMobile())\n return true;\n if (DetectAndroid())\n return true;\n if (DetectBlackBerry())\n return true;\n if (DetectPalmWebOS())\n return true;\n if (DetectPalmOS())\n return true;\n if (DetectGarminNuvifone())\n return true;\n\n //Otherwise, return false.\n return false;\n }", "function is_touch_device() {\n\treturn 'true' == themifyScript.isTouch;\n}", "function checkVersion () {\n if (navigator.platform == 'iPad') {\n _isMobile = false\n $('#interjet-tierra-wrp').css('display', 'block')\n $('#renta-auto-wrp').css('display', 'block')\n $('#estacionamiento-wrp').css('display', 'block')\n $('#apartarhotel-wrp').css('display', 'block')\n } else if (/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent) || $(window).width() < 760) {\n _isMobile = true\n } else {\n _isMobile = false\n }\n // console.log('Estás entrando desde un ' + navigator.platform)\n }", "function detectmob() {\n\n if( navigator.userAgent.match(/Android/i)\n || navigator.userAgent.match(/webOS/i)\n || navigator.userAgent.match(/iPhone/i)\n || navigator.userAgent.match(/iPad/i)\n || navigator.userAgent.match(/iPod/i)\n || navigator.userAgent.match(/BlackBerry/i)\n || navigator.userAgent.match(/Windows Phone/i)\n ){\n return true;\n }\n else {\n return false;\n }\n}", "function detectMobile(){\n\tif(navigator.userAgent.match(/Android/i)\n\t\t\t || navigator.userAgent.match(/webOS/i)\n\t\t\t || navigator.userAgent.match(/iPhone/i)\n\t\t\t || navigator.userAgent.match(/iPad/i)\n\t\t\t || navigator.userAgent.match(/iPod/i)\n\t\t\t || navigator.userAgent.match(/BlackBerry/i)\n\t\t\t || navigator.userAgent.match(/Windows Phone/i)){\n\t\treturn true;\n\t}\n\telse{ return false; }\n}", "function is_touch()\n{\n var device = get_device();\n return device == 'touch';\n}", "function isOnloadSupported() {\n var userAgent = navigator.userAgent\n var supportedMajor = 535\n var supportedMinor = 24\n var match = userAgent.match(/\\ AppleWebKit\\/(\\d+)\\.(\\d+)/)\n if (match) {\n var major = +match[1]\n var minor = +match[2]\n return (\n (major === supportedMajor && minor >= supportedMinor) ||\n major > supportedMajor\n )\n }\n // All other browsers support it\n return true\n}", "function isSmartPhone() {\n if (navigator.userAgent.match(/iPhone|Android.+Mobile/)) {\n return true;\n } else {\n return false;\n }\n}", "Mobile ():boolean {\n\n\t\treturn this.mobile = this.IEMobile() || this.BlackBerry() || this.iOS() || this.Android() || this.Nokia();\n\t}", "isMobile(){\n\t\treturn !!('ontouchstart' in window || navigator.msMaxTouchPoints);\n\t}", "function iOSversion(){\n console.log(window.navigator.platform)\n if (/iP(hone|od|ad)/.test(window.navigator.platform)) {\n // supports iOS 2.0 and later: <http://bit.ly/TJjs1V>\n var v = (window.navigator.appVersion).match(/OS (\\d+)_(\\d+)_?(\\d+)?/);\n return [parseInt(v[1], 10), parseInt(v[2], 10), parseInt(v[3] || 0, 10)];\n }\n}", "function isSmartphone() {\n var returnBool = false;\n if( /Android/i.test(navigator.userAgent) && window.devicePixelRatio > 1) {\n var w = $(window).width() / window.devicePixelRatio;\n console.log(\"Android device >> ratio'd width: \" + w);\n if (w < 480) {\n returnBool = true;\n }\n } else {\n returnBool = /Android|webOS|iPhone|iPod|BlackBerry|IEMobile|Opera Mini|Windows Mobile/i.test(navigator.userAgent)\n }\n\n return returnBool;\n}", "function detect() {\n if ( navigator.userAgent.match(/Windows Phone/i) ) {\n $('body').addClass('ie-mobile');\n }\n }", "function detectTouch() {\n\t\tif (/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)) {\n\t\t\t$isTouch = true;\n\t\t}\n\t}", "function detect(ua){var os={};var browser={};var webkit=ua.match(/Web[kK]it[\\/]{0,1}([\\d.]+)/);var android=ua.match(/(Android);?[\\s\\/]+([\\d.]+)?/);var ipad=ua.match(/(iPad).*OS\\s([\\d_]+)/);var ipod=ua.match(/(iPod)(.*OS\\s([\\d_]+))?/);var iphone=!ipad && ua.match(/(iPhone\\sOS)\\s([\\d_]+)/);var webos=ua.match(/(webOS|hpwOS)[\\s\\/]([\\d.]+)/);var touchpad=webos && ua.match(/TouchPad/);var kindle=ua.match(/Kindle\\/([\\d.]+)/);var silk=ua.match(/Silk\\/([\\d._]+)/);var blackberry=ua.match(/(BlackBerry).*Version\\/([\\d.]+)/);var bb10=ua.match(/(BB10).*Version\\/([\\d.]+)/);var rimtabletos=ua.match(/(RIM\\sTablet\\sOS)\\s([\\d.]+)/);var playbook=ua.match(/PlayBook/);var chrome=ua.match(/Chrome\\/([\\d.]+)/) || ua.match(/CriOS\\/([\\d.]+)/);var firefox=ua.match(/Firefox\\/([\\d.]+)/);var safari=webkit && ua.match(/Mobile\\//) && !chrome;var webview=ua.match(/(iPhone|iPod|iPad).*AppleWebKit(?!.*Safari)/) && !chrome;var ie=ua.match(/MSIE\\s([\\d.]+)/) // IE 11 Trident/7.0; rv:11.0\n || ua.match(/Trident\\/.+?rv:(([\\d.]+))/);var edge=ua.match(/Edge\\/([\\d.]+)/); // IE 12 and 12+\n // Todo: clean this up with a better OS/browser seperation:\n // - discern (more) between multiple browsers on android\n // - decide if kindle fire in silk mode is android or not\n // - Firefox on Android doesn't specify the Android version\n // - possibly devide in os, device and browser hashes\n if(browser.webkit = !!webkit)browser.version = webkit[1];if(android)os.android = true,os.version = android[2];if(iphone && !ipod)os.ios = os.iphone = true,os.version = iphone[2].replace(/_/g,'.');if(ipad)os.ios = os.ipad = true,os.version = ipad[2].replace(/_/g,'.');if(ipod)os.ios = os.ipod = true,os.version = ipod[3]?ipod[3].replace(/_/g,'.'):null;if(webos)os.webos = true,os.version = webos[2];if(touchpad)os.touchpad = true;if(blackberry)os.blackberry = true,os.version = blackberry[2];if(bb10)os.bb10 = true,os.version = bb10[2];if(rimtabletos)os.rimtabletos = true,os.version = rimtabletos[2];if(playbook)browser.playbook = true;if(kindle)os.kindle = true,os.version = kindle[1];if(silk)browser.silk = true,browser.version = silk[1];if(!silk && os.android && ua.match(/Kindle Fire/))browser.silk = true;if(chrome)browser.chrome = true,browser.version = chrome[1];if(firefox)browser.firefox = true,browser.version = firefox[1];if(ie)browser.ie = true,browser.version = ie[1];if(safari && (ua.match(/Safari/) || !!os.ios))browser.safari = true;if(webview)browser.webview = true;if(ie)browser.ie = true,browser.version = ie[1];if(edge)browser.edge = true,browser.version = edge[1];os.tablet = !!(ipad || playbook || android && !ua.match(/Mobile/) || firefox && ua.match(/Tablet/) || ie && !ua.match(/Phone/) && ua.match(/Touch/));os.phone = !!(!os.tablet && !os.ipod && (android || iphone || webos || blackberry || bb10 || chrome && ua.match(/Android/) || chrome && ua.match(/CriOS\\/([\\d.]+)/) || firefox && ua.match(/Mobile/) || ie && ua.match(/Touch/)));return {browser:browser,os:os,node:false, // 原生canvas支持,改极端点了\n // canvasSupported : !(browser.ie && parseFloat(browser.version) < 9)\n canvasSupported:document.createElement('canvas').getContext?true:false, // @see <http://stackoverflow.com/questions/4817029/whats-the-best-way-to-detect-a-touch-screen-device-using-javascript>\n // works on most browsers\n // IE10/11 does not support touch event, and MS Edge supports them but not by\n // default, so we dont check navigator.maxTouchPoints for them here.\n touchEventsSupported:'ontouchstart' in window && !browser.ie && !browser.edge, // <http://caniuse.com/#search=pointer%20event>.\n pointerEventsSupported:'onpointerdown' in window // Firefox supports pointer but not by default,\n // only MS browsers are reliable on pointer events currently.\n && (browser.edge || browser.ie && browser.version >= 10)};}", "function detection() {\n return {\n // User agetn variable\n ua: navigator.userAgent,\n // Detect device type\n deviceType: function () {\n if (this.ua.match(/iPhone/) ||\n this.ua.match(/BlackBerry/) ||\n this.ua.match(/(Windows Phone OS|Windows CE|Windows Mobile)/) ||\n this.ua.match(/Mobile/) ||\n this.ua.match(/(Opera Mini|IEMobile|SonyEricsson|smartphone)/)) {\n return 'mobile';\n } else if(this.ua.match(/iPod/) ||\n this.ua.match(/iPad/) ||\n this.ua.match(/PlayBook/) ||\n this.ua.match(/(GT-P1000|SGH-T849|SHW-M180S)/) ||\n this.ua.match(/Tablet PC/) ||\n this.ua.match(/(PalmOS|PalmSource| Pre\\/)/) ||\n this.ua.match(/(Kindle)/)) {\n return 'tablet';\n } else {\n return 'desktop';\n }\n },\n // Detect operation system\n operationSystem: function() {\n if(this.deviceType() === 'desktop') {\n if(this.ua.search(/Windows/) > -1)\n {\n let tmp = this.ua.toLowerCase(); \n if (tmp.indexOf('windows nt 5.0') > 0) return 'Microsoft Windows 2000';\n if (tmp.indexOf('windows nt 5.1') > 0) return 'Microsoft Windows XP';\n if (tmp.indexOf('windows nt 5.2') > 0) return 'Microsoft Windows Server 2003 or Server 2003 R2';\n if (tmp.indexOf('windows nt 6.0') > 0) return 'Microsoft Windows Vista or Server 2008';\n if (tmp.indexOf('windows nt 6.1') > 0) return 'Microsoft Windows 7 or Server 2008';\n if (tmp.indexOf('windows nt 6.2') > 0) return 'Microsoft Windows 8 or Server 2012';\n if (tmp.indexOf('windows nt 6.3') > 0) return 'Microsoft Windows 8.1 or Server 2012 R2';\n if (tmp.indexOf('windows nt 10') > 0) return 'Microsoft Windows 10 or Server 2016';\n }\n if (this.ua.search('Linux') > -1) return 'Linux';\n if (this.ua.search('Macintosh') > -1) return 'Macintosh';\n if (this.ua.search('Mac OS X') > -1) return 'Mac OS X';\n return 'UnknownDesktopOperatingSystem';\n } else {\n if(this.ua.match(/iPhone/) || this.ua.match(/iPod/) || uaInfo.match(/iPhone/) && !window.MSStream) return 'iOS';\n if(this.ua.match(/BlackBerry/)) return 'BlackBerry OS';\n if(this.ua.match(/(Windows Phone OS|Windows CE|Windows Mobile)/)) return 'Windows Phone';\n if(this.ua.match(/Android/)) return 'Android';\n return 'UnknownMobileOperationgSystem';\n }\n },\n // Check available WebRTC features\n availableWebRTC: function() {\n return !!(navigator.getUserMedia || navigator.webkitGetUserMedia || navigator.mozGetUserMedia);\n },\n // Check webcamera permission\n availableWebCamera: function() {\n return new Promise((resolve) => {\n navigator.getUserMedia = navigator.getUserMedia || navigator.webkitGetUserMedia || navigator.mozGetUserMedia;\n navigator.getUserMedia({video:true},\n function(stream) {\n resolve(true);\n },\n function(error) {\n resolve(false)\n });\n });\n },\n // Check microphone permission\n avaliableMicrophone: function() {\n return new Promise((resolve) => {\n navigator.getUserMedia = navigator.getUserMedia || navigator.webkitGetUserMedia || navigator.mozGetUserMedia;\n navigator.getUserMedia({audio: true},\n function(stream) {\n resolve(true); \n },\n function(error) {\n resolve(false);\n });\n });\n },\n // Get browser name\n browserName: function() {\n if(this.ua.search(/MSIE/) > -1) return 'InternetExplorer';\n\t\t\tif(this.ua.search(/Trident/) > -1) return 'InternetExplorer(Trident)';\n if(this.ua.search(/OPR/) >-1) return 'NewOpera';\n if(this.ua.search(/Yowser/) > -1 ) return 'YandexBrowser';\n if(this.ua.search(/UBrowser/) > -1) return 'UCBrowser';\n if(this.ua.search(/SeaMonkey/) > -1) return 'SeaMonkey';\n if(this.ua.search(/Iceweasel/) > -1) return 'IceWeasel';\n if(this.ua.search(/Opera/) > -1) return 'OldOpera';\n if(this.ua.search(/Firefox/) > -1) return 'Firefox';\n if(this.ua.search(/Vivaldi/) > -1) return 'Vivaldi';\n if(this.ua.search(/Edge/) > -1) return 'Edge';\n if(this.ua.search(/Safari/) > -1 && navigator.vendor.indexOf('Apple') >-1 && this.ua && this.ua.match('CriOS')) return 'Safari';\n if(this.ua.search(/Konqueror/) > -1) return 'Konqueror';\n if (this.ua.search(/Chrome/) > -1 ) return 'GoogleChrome';\n return 'UnknownBrowser';\n },\n // Check enabled cookie\n enabledCookie: navigator.cookieEnabled,\n // Get main browser language\n mainLanguage: navigator.language,\n // Display all information\n uaInLog: function(uaInfo) {\n console.log('This user agent: ', uaInfo);\n console.log('Browser name: ', this.browserName(uaInfo));\n console.log('Operationg system', this.operationSystem(uaInfo));\n console.log('Avaliable WebRTC features: ', this.availableWebRTC());\n console.log('Enabled cookie: ', this.enabledCookie);\n console.log('Main language: ', this.mainLanguage);\n console.log('Device type: ', this.deviceType(uaInfo));\n this.availableWebCamera().then((res) => {\n console.log('Available WebCamera', res);\n });\n this.avaliableMicrophone().then((res) => {\n console.log('Available Microphone', res);\n });\n \n },\n // Get user browser version\n versionBrowser: function() {\n\t\t\tif(this.deviceType() === 'desktop') {\n\t\t\t\tswitch(this.browserName()) {\n\t\t\t\t\tcase 'InternetExplorer(Trident)': return (this.ua.split('Trident/')[1]).split(';')[0];\n\t\t\t\t\tcase 'InternetExplorer': return (this.ua.split('MSIE ')[1]).split(';')[0];\n\t\t\t\t\tcase 'Firefox': return this.ua.split('Firefox/')[1];\n\t\t\t\t\tcase 'NewOpera': return this.ua.split('OPR/')[1];\n\t\t\t\t\tcase 'OldOpera': return this.ua.split('Version/')[1];\n\t\t\t\t\tcase 'GoogleChrome': return (this.ua.split('Chrome/')[1]).split(' ')[0];\n\t\t\t\t\tcase \"Safari\": return (this.ua.split('Version/')[1]).split(' ')[0];\n\t\t\t\t\tcase \"Konqueror\": return (this.ua.split('KHTML/')[1]).split(' ')[0];\n\t\t\t\t\tcase \"IceWeasel\": return (this.ua.split('Iceweasel/')[1]).split(' ')[0];\n\t\t\t\t\tcase \"SeaMonkey\": return this.ua.split('SeaMonkey/')[1];\n\t\t\t\t\tcase 'YaBrowser': return (this.ua.split('YaBrowser/')[1]).split(' ')[0];\n\t\t\t\t\tcase 'UCBrowser': return (this.ua.split('UBrowser/')[1]).split(' ')[0];\n\t\t\t\t\tcase 'Vivaldi': return this.ua.split('Vivaldi/')[1];\n\t\t\t\t\tcase 'UnknownBrowser': return 'UnknownVersion';\n\t\t\t\t}\n\t\t\t}\n\t\t},\n // List of legacy browser\n legacyBrowser: [\n 'InternetExplorer',\n 'Konqueror',\n 'SeaMonkey',\n 'OldOpera'\n ],\n // List of unsupport browser\n notSupported: [\n 'Safari',\n 'Edge'\n ]\n }; \n}", "function getIsApple() {\n if( settings.hasWURFL ) {\n var deviceName = WURFL.complete_device_name.toLowerCase();\n if( deviceName.indexOf( \"apple\" ) > -1 ) {\n return true;\n }\n }\n return false;\n }", "function mobilecheck() {\r\n if (/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)) {\r\n return false;\r\n }\r\n return true;\r\n }", "function isMobileDevice() {\n return (typeof window.orientation !== \"undefined\") || (navigator.userAgent.indexOf('IEMobile') !== -1);\n}", "function checkPlatform(platform) {\n if (platform == \"PSN\" || platform == \"PS5\" || platform == \"PS\" || platform == \"PS4\")\n return \"PS4\";\n\n if (platform == \"XBOX\" || platform == \"X1\") return \"X1\";\n\n if (platform == \"PC\" || platform == \"STEAM\" || platform == \"ORIGIN\") return \"PC\";\n\n if (\n platform == \"SWITCH\" ||\n platform == \"NINTENDO\" ||\n platform == \"NINTENDO SWITCH\" ||\n platform == \"NS\"\n )\n return 1;\n\n return 0;\n }", "function isMobileDevice() {\n return (/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent));\n}", "get enabled()\n {\n return ppixiv.native || !ppixiv.mobile;\n }", "function DetectKindle()\n {\n if (uagent.search(deviceKindle) > -1)\n return true;\n else\n return false;\n }", "function isMobile() {\n return /Mobi/i.test(navigator.userAgent);\n}", "function browser_detection(){\n\tif(navigator.appName == \"Netscape\"){\n\t\treturn \"NET\";\t\n\t}else{\n\t\treturn \"IE\";\n\t}\t\n}", "function isTouchDevice(){\n\treturn \"ontouchstart\" in window;\n}", "function isMobile() {\n return /android|webos|iphone|ipad|ipod|blackberry|iemobile|opera mini/i.test(ua('l'));\n}", "isRealDevice () {\n return false;\n }", "function isMobile() {\n\tif (/iPad|iPhone|Android|webOS|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)) {\n\t\t// Mobile\n\t\treturn true;\n\t} else {\n\t\t// PC\n\t\treturn false;\n\t}\n}", "function isTheDeviceMobile() { \n if( navigator.userAgent.match(/Android/i)\n || navigator.userAgent.match(/webOS/i)\n || navigator.userAgent.match(/iPhone/i)\n || navigator.userAgent.match(/iPad/i)\n || navigator.userAgent.match(/iPod/i)\n || navigator.userAgent.match(/BlackBerry/i)\n || navigator.userAgent.match(/Windows Phone/i)\n ){\n return true;\n }\n else {\n return false;\n }\n}", "function DetectBrowser()\n{\n var browserID = navigator.userAgent.toLowerCase(); \n \n if(browserID.indexOf('msie') != -1)\n {\n IE = true;\n FireFox = false;\n IE7 = false;\n }\n \n if(browserID.indexOf('msie 7.0') != -1)\n { \n IE7 = true;\n }\n \n if(browserID.indexOf('firefox') != -1)\n {\n IE = false;\n FireFox = true; \n IE7 = false;\n } \n \n}", "function DetectXbox()\n {\n if (uagent.search(deviceXbox))\n return true;\n else\n return false;\n }" ]
[ "0.7697221", "0.7130767", "0.70465064", "0.701897", "0.69854647", "0.66621804", "0.665167", "0.6625914", "0.66176546", "0.6596353", "0.6510903", "0.6426261", "0.63970965", "0.63970965", "0.63749546", "0.63593054", "0.6351612", "0.62656015", "0.6253795", "0.6199997", "0.61882365", "0.61684513", "0.61402667", "0.6118177", "0.60603976", "0.5998575", "0.5995637", "0.5992802", "0.59820896", "0.5980401", "0.59749484", "0.5968996", "0.5930332", "0.59292865", "0.59233856", "0.59112465", "0.5910482", "0.5900394", "0.5897433", "0.5858539", "0.5855481", "0.5830541", "0.58255297", "0.58159494", "0.58137405", "0.5804176", "0.57949257", "0.57914716", "0.57899404", "0.57861507", "0.57327366", "0.57326263", "0.57261634", "0.5725566", "0.5714712", "0.5709755", "0.5708001", "0.5703277", "0.5686755", "0.5677217", "0.5670299", "0.56628984", "0.5636836", "0.56255627", "0.5616097", "0.56071985", "0.55848527", "0.55684286", "0.55614644", "0.556109", "0.55540496", "0.5552753", "0.55498713", "0.553329", "0.5521941", "0.5520144", "0.5518809", "0.55130833", "0.55055004", "0.5499651", "0.54994524", "0.54895246", "0.5466893", "0.5466116", "0.54482424", "0.5440477", "0.5437672", "0.5397188", "0.5391863", "0.53902924", "0.5382286", "0.5381111", "0.5379893", "0.53787196", "0.53701454", "0.536811", "0.5367094", "0.5361097", "0.53492326", "0.5338969" ]
0.7868721
0
Check for a winner. Return 0 if no winner or tie yet 1 if it's a tie 2 if HUMAN_PLAYER won 3 if COMPUTER_PLAYER won
function CheckForWinner(game) { // Check for horizontal wins for (i = 0; i <= 6; i += 3) { if (game[i] === HUMAN_PLAYER && game[i + 1] === HUMAN_PLAYER && game[i + 2] === HUMAN_PLAYER) return 2; if (game[i] === COMPUTER_PLAYER && game[i + 1] === COMPUTER_PLAYER && game[i + 2] === COMPUTER_PLAYER) return 3; } // Check for vertical wins for (i = 0; i <= 2; i++) { if (game[i] === HUMAN_PLAYER && game[i + 3] === HUMAN_PLAYER && game[i + 6] === HUMAN_PLAYER) return 2; if (game[i] === COMPUTER_PLAYER && game[i + 3] === COMPUTER_PLAYER && game[i + 6] === COMPUTER_PLAYER) return 3; } // Check for diagonal wins if (CheckDiagonalWin(HUMAN_PLAYER, game)) return 2; if (CheckDiagonalWin(COMPUTER_PLAYER, game)) return 3; // Check for tie for (i = 0; i < BOARD_SIZE; i++) { if (game[i] !== HUMAN_PLAYER && game[i] !== COMPUTER_PLAYER) return 0; } return 1; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function winner() {\n let p1Count = 0;\n let p2Count = 0;\n let retVal = false;\n\n for (y = 0; y < 8; y++)\n for (x = 0; x < 8; x++) {\n if (board[y][x] == PLAYER1)\n p1Count++;\n if (board[y][x] == PLAYER2)\n p2Count++;\n }\n\n DK_SCORE.value = p1Count;\n LT_SCORE.value = p2Count;\n\n if (boxesTaken > 63) {\n if (p1Count > p2Count)\n PopUpMessage(\"Dark Player won\");\n if (p1Count < p2Count)\n PopUpMessage(\"Light Player won\");\n if (p1Count == p2Count)\n PopUpMessage(\"It's a tie!\");\n retVal = true;\n }\n\n return retVal;\n}", "function checkRoundWinner() {\n var activePlayer = players[activePlayerIndex];\n var boardScores = getCurrentBoardRowScores();\n var winningScoreValue = activePlayer.scorePoints * 3;\n var isWinningCombination = boardScores.indexOf(winningScoreValue) > 0;\n\n if (isWinningCombination) {\n activePlayer.winningRounds++;\n return $(document).trigger('roundWinner', activePlayer);\n } else {\n return boardHasEmptySpaces() ? switchActivePlayer() : setTimeout(clearBoard, 800);\n }\n}", "function checkWin() {\n if (userScore === numToMatch) {\n wins++;\n $(\"#wins\").text(\"Success: \" + wins);\n reset();\n } else if (userScore > numToMatch) {\n losses++\n $(\"#losses\").text(\"Fails: \" + losses);\n reset();\n }\n }", "function check_winner() {\r\n var scores = global_scores;\r\n var winning_move;\r\n\r\n for (var i = 0; i < scores.length; i++) {\r\n if (scores[i] == grid_size) {\r\n return 1; // X won\r\n }\r\n else if (scores[i] == -(grid_size)) {\r\n return 2; // O won\r\n }\r\n }\r\n\r\n if (moves == (grid_size * grid_size)) {\r\n return 3; // Draw\r\n }\r\n\r\n return 0; // No winner yet\r\n}", "function checkWinner() { \n console.log(\"checkWinner was called\");\n\n const board = getBoard();\n\n let diagWin = checkDiagonal1(board);\n if (diagWin !== null) return diagWin;\n\n diagWin = checkDiagonal2(board);\n if (diagWin !== null) return diagWin;\n\n const rowWin = checkRow(board);\n if (rowWin !== null) return rowWin;\n\n const colWin = checkColumns(board);\n if( colWin !== null) return colWin;\n\n if (playerCount > 8) \n return \"nobody\";\n else\n return null;\n}", "function whoWon () {\n if (!quiz.isGameOver) {\n return 0\n }\n if (quiz.player1Score > quiz.player2Score) {\n return 1\n } else if (quiz.player1Score < quiz.player2Score) {\n return 2\n } else return 3\n}", "function checkWinner() {\n if(playerPosition <= 0) {\n alert('Player 1 Wins!')\n } else if(compPosition <= 0) {\n alert('Computer Wins!')\n }\n }", "function checkWin () {\n\t\tif (scores[0] === 10) {\n \t\treturn player1;\n } else if (scores[1] === 10) {\n \t\treturn player2;\n } else {\n \t\treturn null;\n }\n}", "function whoWon(){\n if (isGameOver()) {\n if (player1score > player2score) {\n return 1;\n } else if (player2score > player1score) {\n return 2;\n } else if (player1score === player2score) {\n return 3;\n }\n }\n return 0;\n}", "function checkWin(board){\n var winner = 0;\n\n //Check for possible tie\n if (board.indexOf(0) === -1){\n winner = 3;\n }\n //Check for a winner\n winPatterns.forEach(function(value){\n if (board[value[0]] !== 0){\n if(board[value[0]] === board[value[1]] &&\n board[value[1]] === board[value[2]]){\n winner = board[value[0]];\n //Store winning line for animation later\n winLine = value;\n }\n }\n });\n return winner; //1 for human, 2 for comp, 3 for tie\n}", "function winnerCheck() {\n \n\t //result is defaulted to \"no winner\"\n var result = \"no winner\";\n \n //if both players' healths are less than 1 or equal to 0 or less, then both players die at the end of the round.\n if (fighters[0].health < 1 && fighters[1].health < 1) {\n result = \"Both Fighters Die!\";\n \n\t\t//otherwise if player 1's health is less than 1 or equal to 0 or less, then player 2 is declared the winner of the fight.\n } else if (fighters[0].health < 1) {\n result = fighters[1].name + \" WINS!!!\";\n \n\t\t//otherwise if player 2's health is less than 1 or equal to 0 or less, then player 1 is declared the winner of the fight.\n } else if (fighters[1].health < 1) {\n result = fighters[0].name + \" WINS!!!\";\n }\n\t\t//return the value of the result variable outside of the function.\n return result;\n }", "function winner() {\n\tif (playerPoints == 5) {\n\t\tplayerPoints = 0;\n\t\tcomputerPoints = 0;\n\t\treturn \"You won! Let's play again!\";\n\t} else if (computerPoints == 5) {\n\t\tcomputerPoints = 0;\n\t\tplayerPoints = 0;\n\t\treturn \"Game Over! Let's play again!\";\n\t} else {\n\t\treturn \"First to 5 points wins! Let's Go!\";\n\t}\n}", "function checkForWinner() {\n\n if (playerChoice === puterChoice) {\n result.innerText = \"tie\"\n } else if (playerChoice === \"scissors\" && puterChoice === \"paper\"\n || playerChoice === \"paper\" && puterChoice === \"rock\"\n || playerChoice === \"rock\" && puterChoice === \"scissors\") {\n playerScoreUpdate()\n result.innerText = \"you win\"\n } else {\n result.innerText = \"you lose\"\n puterScoreUpdate\n }\n}", "function winnerCheck(){\r\t\t// check using a console.log() if this function is working \r\t\t// console.log(\"in winnerCheck FN\");\r\r\t\t// create a \"no winner\" outcome and set it to a variable named result\r\t\tvar result = \"no winner\";\r\r\t\t// use a conditional statement to check if both players' health fell below 0\r\t\tif (p1[2] < 1 && p2[2] < 1) {\r\t\t\t// if above is true, both players lose\r\t\t\tresult = \"You both lost\";\r\t\t\t// since they both didn't lost then check if one of the players' health is below 0 to determine the loser and the other the winner\r\t\t} else if (p1[2] < 1) {\r\t\t\tresult = p2[0] + \" Wins!\";\r\t\t} else if (p2[2] < 1) {\r\t\t\tresult = p1[0] + \" Wins!\";\r\t\t}\r\t\t// return the value to the result variable to make this function reuseable\r\t\treturn result;\r\t}", "function winnerCheck(){\r\n var result=\"no winner\";\r\n if (playerOne[2]<1 && playerTwo[2]<1)\r\n {\r\n result = \"You Both Die\";\r\n } else if(playerOne[2]<1){\r\n result =playerTwo[0]+\" WINS!!!\"\r\n } else if (playerTwo[2]<1)\r\n {\r\n result = playerOne[0]+\" WINS!!!\"\r\n };\r\n return result;\r\n }", "function checkWin() {\n if ((userGuess === \"r\") && (opponentGuess === \"s\")) {\n wins++;\n } else if ((userGuess === \"r\") && (opponentGuess === \"p\")) {\n losses++;\n } else if ((userGuess === \"s\") && (opponentGuess === \"r\")) {\n losses++;\n } else if ((userGuess === \"s\") && (opponentGuess === \"p\")) {\n wins++;\n } else if ((userGuess === \"p\") && (opponentGuess === \"r\")) {\n wins++;\n } else if ((userGuess === \"p\") && (opponentGuess === \"s\")) {\n losses++;\n } else if (userGuess === opponentGuess) {\n ties++;\n }\n}", "function getWinner() {\n \n // var token = [\"x\", \"o\"];\n // for (var i = 0; i < tokens.length; i++)\n // var t = tokens[i];\n // var winner_found = false\n // if \n\n // if(t == \"x\") {\n // // player 1 wins, increase p1 score, return\n // } else {\n // //player 2 wins, increase p2 score, return\n // }\n\n // checks for x win\n if (\n ((self.gameBoard.boxes[0].isX) \n && (self.gameBoard.boxes[1].isX) \n && (self.gameBoard.boxes[2].isX)) \n || ((self.gameBoard.boxes[3].isX) \n && (self.gameBoard.boxes[4].isX) \n && (self.gameBoard.boxes[5].isX)) \n || ((self.gameBoard.boxes[6].isX)\n && (self.gameBoard.boxes[7].isX) \n && (self.gameBoard.boxes[8].isX)) \n || ((self.gameBoard.boxes[0].isX) \n && (self.gameBoard.boxes[3].isX) \n && (self.gameBoard.boxes[6].isX)) \n || ((self.gameBoard.boxes[1].isX) \n && (self.gameBoard.boxes[4].isX) \n && (self.gameBoard.boxes[7].isX)) \n || ((self.gameBoard.boxes[2].isX) \n && (self.gameBoard.boxes[5].isX) \n && (self.gameBoard.boxes[8].isX)) \n || ((self.gameBoard.boxes[0].isX) \n && (self.gameBoard.boxes[4].isX) \n && (self.gameBoard.boxes[8].isX)) \n || ((self.gameBoard.boxes[2].isX) \n && (self.gameBoard.boxes[4].isX) \n && (self.gameBoard.boxes[6].isX))\n ){\n /*\n changes gameStatus & p1 score if x has won\n stops looking for a win or tie\n */\n self.gameBoard.gameStatus = self.gameBoard.player1.myName + \" wins!\";\n self.gameBoard.p1++;\n self.gameBoard.$save(self.gameBoard.p1);\n return;\n }\n \n // checks for o win\n if (\n ((self.gameBoard.boxes[0].isO) \n && (self.gameBoard.boxes[1].isO) \n && (self.gameBoard.boxes[2].isO)) \n || ((self.gameBoard.boxes[3].isO) \n && (self.gameBoard.boxes[4].isO) \n && (self.gameBoard.boxes[5].isO)) \n || ((self.gameBoard.boxes[6].isO) \n && (self.gameBoard.boxes[7].isO) \n && (self.gameBoard.boxes[8].isO)) \n || ((self.gameBoard.boxes[0].isO) \n && (self.gameBoard.boxes[3].isO) \n && (self.gameBoard.boxes[6].isO)) \n || ((self.gameBoard.boxes[1].isO) \n && (self.gameBoard.boxes[4].isO) \n && (self.gameBoard.boxes[7].isO)) \n || ((self.gameBoard.boxes[2].isO) \n && (self.gameBoard.boxes[5].isO) \n && (self.gameBoard.boxes[8].isO)) \n || ((self.gameBoard.boxes[0].isO) \n && (self.gameBoard.boxes[4].isO) \n && (self.gameBoard.boxes[8].isO)) \n || ((self.gameBoard.boxes[2].isO) \n && (self.gameBoard.boxes[4].isO) \n && (self.gameBoard.boxes[6].isO))\n ){\n /*\n changes gameStatus & p2 score if o has won\n stops looking for a win or tie\n */\n self.gameBoard.gameStatus = self.gameBoard.player2.myName + \" wins!\";\n self.gameBoard.p2++;\n self.gameBoard.$save(self.gameBoard.p2);\n return;\n }\n \n // checks for tie\n var cellEmpty = false;\n for (var i = 0; i < self.gameBoard.boxes.length; i++) {\n if ((self.gameBoard.boxes[i].isX === false) \n && (self.gameBoard.boxes[i].isO === false)) {\n cellEmpty = true;\n }\n }\n if (cellEmpty === false) {\n /*\n changes gameStatus & tie count if it is a tie\n */\n self.gameBoard.gameStatus = \"It's a tie!\"\n self.gameBoard.$save(self.gameBoard.gameStatus);\n self.gameBoard.tie++;\n self.gameBoard.$save(self.gameBoard.tie);\n }\n \n }", "function checkForWinner(){\n let bestInSecs = toSeconds(bestTime);\n let isWinner = newTotalSeconds <= bestInSecs;\n isWinner ? ifWon() : ifLost(); // Performs win or lose function based on win \n}", "function findWinner() {\n if (computerScore >= 121) {\n state = \"computerWon\";\n gameSequence();\n return true;\n } else if (playerScore >= 121) {\n state = \"playerWon\";\n gameSequence();\n return true;\n } else {\n return false;\n }\n\n}", "function checkWinner(user, computer) {\n gamePlayed++;\n var verdict;\n\n if (user == computer) {\n gameDraw++;\n verdict = 'draw';\n }\n if (\n user == \"paper\" && computer == \"rock\" ||\n user == \"rock\" && computer == \"scissors\" ||\n user == \"scissors\" && computerPlay == \"paper\"\n ) {\n gameWon++;\n verdict = 'win';\n }\n if (\n computer == \"paper\" && user == \"rock\" ||\n computer == \"rock\" && user == \"scissors\" ||\n computer == \"scissors\" && user == \"paper\"\n ) {\n gameLost++;\n verdict = 'lose';\n }\n\n updateScoreDisplay(gameDraw, gameWon, gameLost, gamePlayed);\n $(\"#game-result\").html(\"You \" + verdict + \"!\").hide().fadeIn(3000);\n}", "function checkWinner() {\n let winner = null;\n\n // horizontal\n for (let i = 0; i < 3; i++) {\n if (threeConnected(Board[i][0], Board[i][1], Board[i][2])) {\n winner = Board[i][0];\n }\n }\n\n // Vertical\n for (let i = 0; i < 3; i++) {\n if (threeConnected(Board[0][i], Board[1][i], Board[2][i])) {\n winner = Board[0][i];\n }\n }\n\n // Diagonal\n if (threeConnected(Board[0][0], Board[1][1], Board[2][2])) {\n winner = Board[0][0];\n }\n if (threeConnected (Board[2][0], Board[1][1], Board[0][2])) {\n winner = Board[2][0];\n }\n\n let openSpots = 0;\n for (let i = 0; i < 3; i++) {\n for (let j = 0; j < 3; j++) {\n if (Board[i][j] == '') {\n openSpots++;\n }\n }\n }\n\n if (winner == null && openSpots == 0) {\n return 'tie';\n } else {\n return winner;\n }\n}", "function whoWon () {\n if (!quiz.isGameOver) return 0\n if (quiz.player1Points > quiz.player2Points) return 1\n if (quiz.player1Points < quiz.player2Points) return 2\n return 3\n}", "function winnerCheck(){\n console.log(\"in winnerCheck function\");\n\n var result = \"no winner yet\";\n\n\n if (players[0].health < 1 && players[1].health < 1) {\n result=\"Draw\";\n } else if (players[0].health < 1) {\n result = players[1].name + \" Wins!!!\";\n } else if (players[1].health < 1) {\n result = players[0].name + \" Wins!!!\";\n }\n\n return result;\n }", "function checkWinOrLoss() {\n if (totalScore === randomNumToGuess) { // We have a winner\n wins++;\n initializeGame()\n }\n else if (totalScore > randomNumToGuess) { // We have a loser\n losses++;\n initializeGame();\n }\n else {\n updateUI;\n }\n }", "function winnerCheck(){\n \t// v Create a variable with a string value stating that there is no winner;\n var result=\"no winner\";\n // v Create an if statement that compares player healths to see if they're both under 1\n if (playerOne[2]<1 && playerTwo[2]<1)\n {\n result = \"You Both Die\"; // If this is the case, the result should be a string with something like \"You Both Die\";\n } else if(playerOne[2]<1){ // If not, just check if player 1's health is less than 1\n result =playerTwo[0]+\" WINS!!!\" // And then return something like \"(Player 2 name) wins\"\n } else if (playerTwo[2]<1) // If not, just check player 2's health\n {\n result = playerOne[0]+\" WINS!!!\" // And, if that's the case, return something like \"(Player 1 name) wins\"\n };\n return result; // Return the result\n }", "function winnerCheck(){\n\t\tconsole.log(\"in winnerCheck FN\");\n\t\t//local variable which could be overriden by the following conditional statement\n\t\tvar result=\"no winner\";\n\t\t\n\t\t//conditional statement which checks for a winner\n\t\tif(fighter1[2]<1&&fighter2[2]<1){ //if fighter ones health, stored in index 2, is less than 1 && fighter twos health, stored in index 2, is less than 1\n\t\t\tresult = \"You Both Die\";\t\n\t\t}else if(fighter1[2]<1){ //if fighter1's health is less than 1, \n\t\t\tresult =fighter2[0]+\" \"+\"WINS!!!\"\n\t\t}else if(fighter2[2]<1){ //if fighter2' health is less than 1,\n\t\t\tresult=fighter1[0]+\" \"+\"WINS!!!\"\n\t\t};\n\t\t//sets result for winnerCheck function\n\t\treturn result;\n\t}", "function whoWon(){\n\n if ((playerOneChoice === \"Rock\") || (playerOneChoice === \"Paper\") || (playerOneChoice === \"Scissors\")) {\n\n // This logic determines the outcome of the game (win/loss/tie), and increments the appropriate counter.\n if ((playerOneChoice === \"Rock\") && (playerTwoChoice === \"Scissors\")) {\n playerOneWins++;\n playerTwoLosses++;\n $(\"#results\").html(playerOneName + \" wins!\");\n }\n else if ((playerOneChoice === \"Rock\") && (playerTwoChoice === \"Paper\")) {\n playerOneLosses++;\n playerTwoWin++;\n }\n else if ((playerOneChoice === \"Scissors\") && (playerTwoChoice === \"Rock\")) {\n playerOneLosses++;\n playerTwoWin++;\n }\n else if ((playerOneChoice === \"Scissors\") && (playerTwoChoice === \"Paper\")) {\n playerOneWins++;\n playerTwoLosses++;\n }\n else if ((playerOneChoice === \"Paper\") && (playerTwoChoice === \"Rock\")) {\n playerOneWins++;\n playerTwoLosses++;\n }\n else if ((playerOneChoice === \"Paper\") && (playerTwoChoice === \"Scissors\")) {\n playerOneLosses++;\n playerTwoWin++;\n }\n else if (playerOneChoice === playerTwoChoice) {\n ties++;\n }\n }\n\n }", "function checkWinner() {\n\t// Check if all cells are active\n\tlet count = 0;\n\tfor (let cell of gridCells) {\n\t\tif (cell.classList.contains(\"active\")) {\n\t\t\tcount++;\n\t\t }\n\t\t}\n\t// If all cells are active and no winner is found below, there's a tie (ie. gameStatus remains \"tie\")\n\tif (count === 9) {\n\t gameStatus = \"Tie\";\n\t// Otherwise the game is still going\n\t} else {\n\t gameStatus = \"Playing\";\n\t}\n\t\n\t// Iterate through all winning combos to see if a winner exists\n\tfor (let i = 0; i < winningCombos.length; i++) {\n\t\tif (\n\t\t\twinningCombos[i][0].textContent === playerX.playerChoice\n\t\t\t&& winningCombos[i][1].textContent === playerX.playerChoice\n\t\t\t&& winningCombos[i][2].textContent === playerX.playerChoice\n \t) \n\t\t{\n\t\t\t// If a winner, set the board to game over\n\t\t\tgameStatus = \"Win X\";\n\t\t\tgameOver();\t\n \t} \n\t\telse if (\n\t\t\twinningCombos[i][0].textContent === playerO.playerChoice\n\t\t\t&& winningCombos[i][1].textContent === playerO.playerChoice\n\t\t\t&& winningCombos[i][2].textContent === playerO.playerChoice\n\t\t) \n\t\t{\n\t\t\t// If a winner, set the board to game over\n\t\t\tgameStatus = \"Win O\";\n\t\t\tgameOver();\t\n\t\t}\n \t}\n}", "function decideWinner(playerSelection, computerSelection) {\n if (playerSelection == computerSelection) return 0;\n if (\n (playerSelection == \"rock\" && computerSelection == \"scissor\") ||\n (playerSelection == \"paper\" && computerSelection == \"rock\") ||\n (playerSelection == \"scissor\" && computerSelection == \"paper\")\n ) {\n return 1;\n } else {\n return -1;\n }\n}", "function winner() {\n let hasWinner = false;\n let playerNumber = -1; // -1 for no winner\n let gameOver = false;\n let gameWinner = \"none\";\n\n if (winnerX()) { //Detect Whether X has won the game\n hasWinner = true;\n playerNumber = 1;\n player1Score++;\n }\n else if (winnerO()) { //Detect Whether X has won the game\n hasWinner = true;\n playerNumber = 2;\n player2Score++;\n }\n //Determine if all cells of the board are filled (Tie)\n else if (allFilled()) {\n hasWinner = \"Tie\";\n playerNumber = \"Tie\";\n }\n else\n hasWinner = false\n\n //Check for gameover\n // -A player has more wins than half the total rounds\n //Add 1 to the score because the value hasn't been updated yet\n if (playerNumber != -1) {\n //If the winner is player 1 or 2, check if the score before and after updating (+1) wins the game\n if (player1Score >= Math.floor((span_bestOf.innerText / 2) + 1)) { //Player 1 has won the game\n gameOver = true;\n }\n else if (player2Score >= Math.floor((span_bestOf.innerText / 2) + 1)) { //Player 2 has won the game\n gameOver = true;\n }\n else if (currentRound >= span_bestOf.innerText) { //The maximum rounds have been reached and the game is tied\n gameOver = true;\n }\n }\n\n if (gameOver) {\n if (player1Score > player2Score)\n gameWinner = \"player 1\";\n else if (player2Score > player1Score)\n gameWinner = \"player 2\";\n else\n gameWinner = \"Tie\";\n }\n\n\n const winnerData = {\n hasWinner,\n playerNumber,\n gameOver,\n gameWinner\n }\n\n return winnerData;\n\n}", "function checkWin(){\n\t//ROW WIN CONDITIONS\nif (oneV === twoV && twoV === threeV && oneV === threeV) {\n\tconsole.log('WINNER');\n\twhoPlayerTemp = (whoPlayer+'Wins');\n\tconsole.log(whoPlayerTemp);\n\t\tif (whoPlayerTemp === \"playerOneWins\") {\n\t\tplayerOneWins += 1;\n\t\t} else {\n\t\t\tplayerTwoWins +=1;\n\t\t}\n\t} else if (fourV === fiveV && fourV === sixV && fiveV === sixV) {\n\tconsole.log('WINNER');\n\twhoPlayerTemp = (whoPlayer+'Wins');\n\t\tif (whoPlayerTemp === \"playerOneWins\") {\n\t\t\tplayerOneWins += 1;\n\t\t} else {\n\t\t\tplayerTwoWins +=1;\n\t\t}\n\t} else if (sevenV === eightV && sevenV === nineV && eightV === nineV) {\n\tconsole.log('WINNER');\n\twhoPlayerTemp = (whoPlayer+'Wins');\n\t\tif (whoPlayerTemp === \"playerOneWins\") {\n\t\t\tplayerOneWins += 1;\n\t\t} else {\n\t\t\tplayerTwoWins +=1;\n\t\t}\n\t//COLUMN WIN CONDITIONS\n\t} else if (oneV === fourV && oneV === sevenV && fourV === sevenV) {\n\tconsole.log('WINNER');\n\twhoPlayerTemp = (whoPlayer+'Wins');\n\t\tif (whoPlayerTemp === \"playerOneWins\") {\n\t\t\tplayerOneWins += 1;\n\t\t} else {\n\t\t\tplayerTwoWins +=1;\n\t\t}\n\t} else if (twoV === fiveV && twoV === eightV && fiveV === eightV) {\n\tconsole.log('WINNER');\n\twhoPlayerTemp = (whoPlayer+'Wins');\n\t\tif (whoPlayerTemp === \"playerOneWins\") {\n\t\t\tplayerOneWins += 1;\n\t\t} else {\n\t\t\tplayerTwoWins +=1;\n\t\t}\n\t} else if (threeV === sixV && threeV === nineV && sixV === nineV) {\n\tconsole.log('WINNER');\n\twhoPlayerTemp = (whoPlayer+'Wins');\n\t\tif (whoPlayerTemp === \"playerOneWins\") {\n\t\t\tplayerOneWins += 1;\n\t\t} else {\n\t\t\tplayerTwoWins +=1;\n\t\t}\n\t//CROSS WIN CONDITIONS\n\t} else if (oneV === fiveV && oneV === nineV && fiveV === nineV) {\n\tconsole.log('WINNER');\n\twhoPlayerTemp = (whoPlayer+'Wins');\n\t\tif (whoPlayerTemp === \"playerOneWins\") {\n\t\t\tplayerOneWins += 1;\n\t\t} else {\n\t\t\tplayerTwoWins +=1;\n\t\t}\n\t} else if (threeV === fiveV && threeV === sevenV && fiveV === sevenV) {\n\tconsole.log('WINNER');\n\twhoPlayerTemp = (whoPlayer+'Wins');\n\t\tif (whoPlayerTemp === \"playerOneWins\") {\n\t\t\tplayerOneWins += 1;\n\t\t} else {\n\t\t\tplayerTwoWins +=1;\n\t\t}\n\t}\n\t$('#p2Score').text(playerTwoWins);\n\t$('#p1Score').text(playerOneWins);\n\t// checkTie();\n\tbestOfFiveWinner();\n}", "function didYouWin() {\n if (cells[0].textContent == player && cells[1].textContent == player && cells[2].textContent == player) {\n declareWinner(player);\n } else if (cells[3].textContent == player && cells[4].textContent == player && cells[5].textContent == player) {\n declareWinner(player);\n } else if (cells[6].textContent == player && cells[7].textContent == player && cells[8].textContent == player) {\n declareWinner(player);\n } else if (cells[0].textContent == player && cells[3].textContent == player && cells[6].textContent == player) {\n declareWinner(player);\n } else if (cells[1].textContent == player && cells[4].textContent == player && cells[7].textContent == player) {\n declareWinner(player);\n } else if (cells[2].textContent == player && cells[5].textContent == player && cells[8].textContent == player) {\n declareWinner(player);\n } else if (cells[0].textContent == player && cells[4].textContent == player && cells[8].textContent == player) {\n declareWinner(player);\n } else if (cells[2].textContent == player && cells[4].textContent == player && cells[6].textContent == player) {\n declareWinner(player);\n } else {\n // If no one wins the game on this move, check for a tie --\n tieGame();\n }\n}", "function winning(player){\n\treturn (\n\t\t(board[0] == player && board[1] == player && board[2] == player) ||\n\t\t(board[3] == player && board[4] == player && board[5] == player) ||\n\t\t(board[6] == player && board[7] == player && board[8] == player) ||\n\t\t(board[0] == player && board[3] == player && board[6] == player) ||\n\t\t(board[1] == player && board[4] == player && board[7] == player) ||\n\t\t(board[2] == player && board[5] == player && board[8] == player) ||\n\t\t(board[0] == player && board[4] == player && board[8] == player) ||\n\t\t(board[2] == player && board[4] == player && board[6] == player)\n\t)\n\t\t\n}", "function winnerCheck(){\n \n //default result is no winner\n var result = \"no winner\";\n \n //if both players health becomes 0 or less there is a TIE\n if (playerOneHealth < 1 && playerTwoHealth <1 ){\n result = \"You Both Die\";\n \n //if one player's health reaches 0 or less they are the LOSER \n }else if(playerOneHealth<1){\n result = playerTwoName + \" WINS!!!\"\n }else if(playerTwoHealth<1){\n result = playerOneName + \" WINS!!!\"\n };\n \n //returns results to fight function\n return result;\n}", "function checkWinner() {\n if(resistanceWins == 3) {\n winner = true;\n return true;\n } else if(spyWins == 3) {\n return true;\n }\n return false;\n}", "function checkWinner(board) {\n let winner = null\n\n // horizontal\n for (let i = 0; i < 3; i++) {\n if (equals3(board[i][0], board[i][1], board[i][2])) {\n winner = board[i][0]\n }\n }\n\n // Vertical\n for (let i = 0; i < 3; i++) {\n if (equals3(board[0][i], board[1][i], board[2][i])) {\n winner = board[0][i]\n }\n }\n\n // Diagonal\n if (equals3(board[0][0], board[1][1], board[2][2])) {\n winner = board[0][0]\n }\n if (equals3(board[2][0], board[1][1], board[0][2])) {\n winner = board[2][0]\n }\n\n let openSpots = 0\n for (let i = 0; i < 3; i++) {\n for (let j = 0; j < 3; j++) {\n if (board[i][j] === AI_CONSTANTS.EMPTY) {\n openSpots++\n }\n }\n }\n\n if (winner === null && openSpots === 0) {\n return AI_CONSTANTS.TIE\n } else {\n return winner\n }\n}", "function isWinner() {\n\n\t\tvar winner = false;\n\t\tif (threeInaRow(0,1,2,turn) ||\n\t\t\tthreeInaRow(3,4,5, turn) ||\n\t\t\tthreeInaRow(6,7,8, turn) ||\n\t\t\tthreeInaRow(0,3,6, turn) ||\n\t\t\tthreeInaRow(1,4,7, turn) ||\n\t\t\tthreeInaRow(2,5,8, turn) ||\n\t\t\tthreeInaRow(0,4,8, turn) ||\n\t\t\tthreeInaRow(2,4,6, turn)) {\n\t\t\twinner = true;\n\t\t\t}\n\t\treturn winner;\n\t\t}", "checkWin(player) {\n for (let i = 0; i < 3; i++) {\n //check horizontal wins\n if (player._letter === this._board[i][0] &&\n player._letter === this._board[i][1] &&\n player._letter === this._board[i][2]) {\n return true;\n }\n //check vertical wins\n if (player._letter === this._board[0][i] &&\n player._letter === this._board[1][i] &&\n player._letter === this._board[2][i]) {\n return true;\n }\n }\n\n //check wins on the diagonals\n if (player._letter === this._board[0][0] &&\n player._letter === this._board[1][1] &&\n player._letter === this._board[2][2]) {\n return true;\n }\n\n if (player._letter === this._board[0][2] &&\n player._letter === this._board[1][1] &&\n player._letter === this._board[2][0]) {\n return true;\n }\n\n //Check for a tie\n if (this._board.toString().length === 17) {\n return 'tie';\n }\n }", "function findWinner(thePlayer){\n\tvar winner = '';\t\n\tconsole.log(' findWinner board: ', board);\n\tif(returnTheWinner(thePlayer, board[0], board[1], board[2])){\n\t\twinner = turn;\n\t}\n\tif(returnTheWinner(thePlayer, board[3], board[4], board[5])){\n\t\twinner = turn;\n\t}\n\tif(returnTheWinner(thePlayer, board[6], board[7], board[8])){\n\t\twinner = turn;\n\t}\n\tif(returnTheWinner(thePlayer, board[0], board[4], board[8])){\n\t\twinner = turn;\n\t}\n\tif(returnTheWinner(thePlayer, board[2], board[4], board[6])){\n\t\twinner = turn;\n\t}\n\tif(returnTheWinner(thePlayer, board[0], board[3], board[6])){\n\t\twinner = turn;\n\t}\n\tif(returnTheWinner(thePlayer, board[1], board[4], board[7])){\n\t\twinner = turn;\n\t}\n\tif(returnTheWinner(thePlayer, board[2], board[5], board[8])){\n\t\twinner = turn;\n\t}\n\t\n\tif(winner != ''){\n\t\tendGame(winner);\t\t\t\n\t}\n\telse if(count == 9){\n\t\tResult.render('tie','Tie!' );\n\t\t//disableAll();\t\n\t}\n\telse{ changeTurn();}\n}//end function", "function checkForWinner() {\n if (state.userScore >= state.firstTo) {\n displayWinner('You are')\n } else if (state.computerScore >= state.firstTo) {\n displayWinner('Computer is')\n }\n}", "function computeWinner(){\n let winner;\n\n if(P1.score <= 21){\n if(P1.score > P2.score || P2.score>21){\n blackjackGame.win++;\n winner = P1;\n }else if(P1.score < P2.score){\n blackjackGame.loss++;\n winner = P2;\n }else if(P1.score === P2.score){\n blackjackGame.draw++;\n }\n }else if(P1.score > 21 && P2.score <=21){\n blackjackGame.loss++;\n winner = P2;\n }else if(P1.score > 21 && P2.score > 21){\n blackjackGame.draw++;\n }\n return winner;\n}", "function checkWinner() {\n const board = checkBoard();\n // win values\n const exesWin = 6;\n const ohsWin = 15;\n let turnsTaken = 0;\n\n // winning conditions\n const rowOne = board[0] + board[1] + board[2];\n const rowTwo = board[3] + board[4] + board[5];\n const rowThree = board[6] + board[7] + board[8];\n const colOne = board[0] + board[3] + board[6];\n const colTwo = board[1] + board[4] + board[7];\n const colThree = board[2] + board[5] + board[8];\n const diagOne = board[2] + board[4] + board[6];\n const diagTwo = board[0] + board[4] + board[8];\n\n // see if the board is full.\n for (let i = 0; i < board.length; i++) {\n if (board[i] !== 0) {\n turnsTaken++;\n }\n }\n\n // if board is full, there is a tie\n if (turnsTaken === 9) {\n winnerAlert(3);\n\n } else if (rowOne === exesWin || rowTwo === exesWin || rowThree === exesWin ||\n colOne === exesWin || colTwo === exesWin || colThree === exesWin ||\n diagOne === exesWin || diagTwo === exesWin) {\n\n winnerAlert(1);\n\n } else if (rowOne === ohsWin || rowTwo === ohsWin || rowThree === ohsWin ||\n colOne === ohsWin || colTwo === ohsWin || colThree === ohsWin ||\n diagOne === ohsWin || diagTwo === ohsWin) {\n\n winnerAlert(2);\n }\n}", "function checkWinner(player, computer) {\n if(player === computer) {\n return \"Draw\";\n }\n if (player === \"Rock\") {\n if (computer === \"Paper\") {\n return \"Computer\";\n }else {\n return \"Player\";\n }\n }\n if(player === \"Paper\") {\n if (computer === \"Scissors\") {\n return \"Computer\";\n }else {\n return \"Player\";\n }\n }\n if (player === \"Scissors\") {\n if (computer === \"Rock\") {\n return \"Computer\";\n }else {\n return \"Player\";\n }\n }\n \n}", "function hasWon() {\t\n\tif (leftHand.hasClass('rock') && rightHand.hasClass('scissors') ||\n\t\tleftHand.hasClass('paper') && rightHand.hasClass('rock') ||\n\t\tleftHand.hasClass('scissors') && rightHand.hasClass('paper')){\n\t\tplayerOneWin += 1;\n\t\tround += 1;\n\t\tleft.addClass('spinLeft').removeClass('alt leftLose');\n\t\tright.addClass('rightLose').removeClass('alt');\n\t\t$('#oneWinner').addClass('alt');\n\t} else if (rightHand.hasClass('rock') && leftHand.hasClass('scissors') ||\n\t\t\t \trightHand.hasClass('paper') && leftHand.hasClass('rock') ||\n\t\t\t\trightHand.hasClass('scissors') && leftHand.hasClass('paper')) {\n\t\tplayerTwoWin += 1;\n\t\tround += 1;\n\t\tright.addClass('spinRight').removeClass('alt rightLose');\n\t\tleft.addClass('leftLose').removeClass('alt');\n\t\t$('#twoWinner').addClass('alt');\n\t} else {\n\t\tleft.addClass('spinLeft').removeClass('alt leftLose');\n\t\tright.addClass('spinRight').removeClass('alt rightLose');\n\t\t$('#tie').addClass('alt');\n\t}\n\t// Adds score depending on win state\n\t$('#playerOneScore').text(playerOneWin);\n\t$('#playerTwoScore').text(playerTwoWin);\n\n\tsetTimeout(function(){\n\t\twinAll();\n\t}, 2000);\n\n\t//If player gets 5 wins the page reloads\n\tfunction winAll(){\n\t\tif (playerOneWin === 3) {\n\t\t\talert('Player One Wins! Click ok to restart.');\n\t\t\tlocation.reload();\n\t\t} else if (playerTwoWin === 3) {\n\t\t\talert('Player Two Wins! Click ok to restart');\n\t\t\tlocation.reload();\n\t\t}\n\t}\n}", "function checkIfWon () {\n if (chosenNumber === currentTotalCounter) {\n winsCounter ++;\n gamesWonElement.innerHTML = winsCounter;\n // maybe add a won alert?\n restart ();\n } else if (currentTotalCounter > chosenNumber) {\n lossCounter ++;\n gamesLossElement.innerHTML = lossCounter;\n // maybe add a loss alert?\n restart ();\n }\n }", "function checkWinner(board) {\n for (var i = 0; i < winningCombos.length; i++) {\n var combo = winningCombos[i];\n if (playerOccupiesCircles('X', combo, board)) {\n updateScoreboard();\n return 'X';\n }\n if (playerOccupiesCircles('O', combo, board)) {\n updateScoreboard();\n return 'O';\n }\n }\n return null;\n}", "function decideWinner() {\n let winner;\n if (YOU.score <= 21) {\n if (YOU.score > DEALER.score || (DEALER.score > 21)) {\n console.log('you win');\n winner = YOU;\n BlackJack['win']++;\n\n } else if (YOU.score < DEALER.score) {\n console.log('you lost');\n winner = DEALER;\n BlackJack['loss']++;\n\n } else if (YOU.score === DEALER.score) {\n console.log('you drew!');\n BlackJack['draw']++;\n\n }\n\n } else if (YOU.score > 21 && (DEALER.score <= 21)) {\n console.log('you lost!');\n winner = DEALER;\n BlackJack['loss']++;\n\n\n } else if (YOU.score > 21 && (DEALER.score > 21)) {\n console.log('you drew!');\n BlackJack['draw']++;\n\n }\n console.log('winner is :', winner);\n return winner;\n}", "function getWinner() {\n\n\t\t\t\tif (self.tictactoe.winner == 1) {\t\t\t\t\t\t// if player 1 wins...\n\t\t\t\t\tself.tictactoe.p1score++;\t\t\t\t\t\t\t\t\t// increment score for player 1\n\t\t\t\t\tself.tictactoe.p1wins = true;\t\t\t\t\t\t\t// set p1wins to true to display Player 1 Wins in div with ng-class\n\t\t\t\t\t$timeout(self.clearGrid, 1000);\t\t\t\t\t\t// clear grid after 1 second\n\t\t\t\t}\n\n\t\t\t\telse if (self.tictactoe.winner == 2) {\t\t\t// if player 2 wins...\n\t\t\t\t\tself.tictactoe.p2score++;\t\t\t\t\t\t\t\t\t// increment score for player 2\n\t\t\t\t\tself.tictactoe.p2wins = true;\t\t\t\t\t\t\t// set p2wins to true to display Player 2 Wins in div with ng-class\n\t\t\t\t\t$timeout(self.clearGrid, 1000);\t\t\t\t\t\t// clear grid after 1 second\n\t\t\t\t}\n\n\t\t\t\telse if (self.tictactoe.winner === false && self.tictactoe.gridSize == 9 && self.tictactoe.counter == 9) {\n\t\t\t\t\tself.tictactoe.tie = true;\n\t\t\t\t\t$timeout(self.clearGrid, 1000);\n\t\t\t\t}\n\t\t\t\telse if (self.tictactoe.winner === false && self.tictactoe.gridSize == 16 && self.tictactoe.counter == 16) {\n\t\t\t\t\tself.tictactoe.tie = true;\n\t\t\t\t\t$timeout(self.clearGrid, 1000);\n\t\t\t\t}\n\t\t\t\telse if (self.tictactoe.winner === false && self.tictactoe.gridSize == 25 && self.tictactoe.counter == 25) {\n\t\t\t\t\tself.tictactoe.tie = true;\n\t\t\t\t\t$timeout(self.clearGrid, 1000);\n\t\t\t\t}\n\t\t\t\tself.tictactoe.$save();\n\t\t\t}", "function testWinner(board, player) {\n // capture the value needed for a victory\n const winSum = (player === 2) ? 6 : 15;\n const tie = (player === 0) ? true : false;\n const testBoard = board.slice(0);\n\n // win conditions\n const rowOne = testBoard[0] + testBoard[1] + testBoard[2];\n const rowTwo = testBoard[3] + testBoard[4] + testBoard[5];\n const rowThree = testBoard[6] + testBoard[7] + testBoard[8];\n const colOne = testBoard[0] + testBoard[3] + testBoard[6];\n const colTwo = testBoard[1] + testBoard[4] + testBoard[7];\n const colThree = testBoard[2] + testBoard[5] + testBoard[8];\n const diagOne = testBoard[2] + testBoard[4] + testBoard[6];\n const diagTwo = testBoard[0] + testBoard[4] + testBoard[8];\n\n if (tie) { // test for a tie if tie is true\n for (let i = 0; i < board.length; i++) {\n if (board[i] === 0) {\n return false;\n }\n }\n return true;\n\n } else if ((rowOne === winSum) || (rowTwo === winSum) || (rowThree === winSum) ||\n (colOne === winSum) || (colTwo === winSum) || (colThree === winSum) ||\n (diagOne === winSum) || (diagTwo === winSum) ) {\n\n return true;\n } else {\n return false;\n }\n}", "function checkWinner(result){\n result.match('xxx') ? gameOver('Player 1') : result.match('ooo') ? gameOver('Player 2') : null;\n}", "function checkWinner() {\n if (winner != e) return;\n for (var i = 0; i < 3; i++)\n if (board[i][0] == board[i][1] && board[i][1] == board[i][2])\n if (board[i][0] != e) winner = currPlayer;\n for (var i = 0; i < 3; i++)\n if (board[0][i] == board[1][i] && board[1][i] == board[2][i])\n if (board[0][i] != e) winner = currPlayer;\n if (board[0][0] == board[1][1] && board[1][1] == board[2][2])\n if (board[0][0] != e) winner = currPlayer;\n if (board[0][2] == board[1][1] && board[1][1] == board[2][0])\n if (board[1][1] != e) winner = currPlayer;\n if (checkFull() && winner == e) winner = tie;\n //print(winner);\n}", "function findWinner(player, computer){\n if(player < computer) return \"win\";\n else if (computer < player) return \"lose\";\n else return \"tie\";\n\n}", "function checkWinner (board) {\n // check for winning conditions\n for (let i = 0; i < winningCoords.length; i++) {\n if (checkCoords(board, 'O', winningCoords[i])) {\n return {\n coords: winningCoords[i],\n player: 'O'\n }\n } else if (checkCoords(board, 'X', winningCoords[i])) {\n return {\n coords: winningCoords[i],\n player: 'X'\n }\n }\n }\n\n // check for a tie\n if (board.join('').length === 9) {\n return 'tie'\n }\n\n return null\n}", "function checkForWinner(rank) {\n var dealerValue = kortuverte(rankadealer);\n var playerValue = kortuverte(rank);\n var diffPlayer = Math.sqrt(Math.pow(21 - playerValue, 2));\n var diffDealer = Math.sqrt(Math.pow(21 - dealerValue, 2));\n if (playerValue > 21) {\n return 1;\n } else if (dealerValue > 21) {\n return 0;\n } else if (diffPlayer > diffDealer) {\n return 1;\n } else if (diffPlayer < diffDealer) {\n return 0;\n } else return 2;\n}", "check_winner() {\n //check all horizontal\n let player_won = false;\n let winner;\n let where_string;\n if (this.check_winner_row(0)) {\n player_won = true;\n winner = this.board_spaces[0].get_top();\n where_string = 'on row 1';\n } else if (this.check_winner_row(4)) {\n player_won = true;\n winner = this.board_spaces[4].get_top();\n where_string = 'on row 2';\n } else if (this.check_winner_row(8)) {\n player_won = true;\n winner = this.board_spaces[8].get_top();\n where_string = 'on row 3';\n } else if (this.check_winner_row(12)) {\n player_won = true;\n winner = this.board_spaces[12].get_top();\n where_string = 'on row 4';\n }\n //check all vertical\n else if (this.check_winner_column(0)) {\n player_won = true;\n winner = this.board_spaces[0].get_top();\n where_string = 'on column 1';\n } else if (this.check_winner_column(1)) {\n player_won = true;\n winner = this.board_spaces[1].get_top();\n where_string = 'on column 2';\n } else if (this.check_winner_column(2)) {\n player_won = true;\n winner = this.board_spaces[2].get_top();\n where_string = 'on column 3';\n } else if (this.check_winner_column(3)) {\n player_won = true;\n winner = this.board_spaces[3].get_top();\n where_string = 'on column 4';\n }\n //check diagonals\n else if (this.check_winner_diagonal_left(0)) {\n player_won = true;\n winner = this.board_spaces[0].get_top();\n where_string = 'on the top left diagonal';\n } else if (this.check_winner_diagonal_right(3)) {\n player_won = true;\n winner = this.board_spaces[3].get_top();\n where_string = 'on the top right diagonal';\n }\n if (player_won) {\n alert(`Player ${winner} won ${where_string}`)\n }\n }", "function checkWinner() {\n\n // Select any random icon \n const computerChoice = pickRandomChoice();\n \n // Display user and computer choice\n updateSelection(user_select, userChoice);\n updateSelection(computer_select, computerChoice);\n\n //GAME RULES \n // Draw game if user and computer have the same choice\n if(userChoice === computerChoice){ \n winner.innerText = 'draw';\n }\n\n // Check if User Win \n else if(\n (userChoice === 'paper' && computerChoice === 'rock') || (userChoice === 'rock' && computerChoice === 'scissors')\n ||\n (userChoice === 'scissors' && computerChoice === 'paper')\n ) {\n // Display User Win\n updateScore();\n winner.innerText = 'you win';\n }\n \n // Else Computer Win\n else {\n \n // Display User Lost\n updateComscore();\n winner.innerText = 'you loss';\n }\n}", "function getWinner(){\n if(scores.redPieceCount === 0){\n scores.winner = scores.player2;\n message.innerHTML = `Player 2 Wins!!`\n }else if(scores.blackPieceCount === 0){\n scores.winner = scores.player1;\n message.innerHTML = `Player 1 Wins!!`\n }\n}", "function getWinner(){\n if(player1.score > player2.score){\n winner = \"Player1\"\n } else if(player2.score > player1.score){\n winner = \"Player2\";\n } else {\n winner = \"Draw\"\n }\n return winner;\n }", "function winnerCheck(n, playerName) {\r\n\r\n\t\tif (\r\n\r\n\t\t\t(grid[0][0] == n && grid[0][1] == n && grid[0][2] == n) ||\r\n\t\t\t(grid[1][0] == n && grid[1][1] == n && grid[1][2] == n) ||\r\n\t\t\t(grid[2][0] == n && grid[2][1] == n && grid[2][2] == n) ||\r\n\r\n\t\t\t(grid[0][0] == n && grid[1][0] == n && grid[2][0] == n) ||\r\n\t\t\t(grid[0][1] == n && grid[1][1] == n && grid[2][1] == n) ||\r\n\t\t\t(grid[0][2] == n && grid[1][2] == n && grid[2][2] == n) ||\r\n\r\n\t\t\t(grid[0][0] == n && grid[1][1] == n && grid[2][2] == n) ||\r\n\t\t\t(grid[0][2] == n && grid[1][1] == n && grid[2][0] == n)\r\n\r\n\r\n\t\t) {\r\n\r\n\t\t\tif (playerName === player1Name) {\r\n\r\n\t\t\t\t$('.popWindow').css('display', 'block')\r\n\r\n\t\t\t\t$('.close').click(function () {\r\n\r\n\t\t\t\t\t$('.popWindow').css('display', 'none')\r\n\r\n\t\t\t\t});\r\n\r\n\t\t\t\t$('#msg').text(playerName + \" won the game!\");\r\n\r\n\t\t\t} else {\r\n\r\n\t\t\t\t$('.popWindow').css('display', 'block')\r\n\r\n\t\t\t\t$('.close').click(function () {\r\n\r\n\t\t\t\t\t$('.popWindow').css('display', 'none')\r\n\r\n\t\t\t\t});\r\n\r\n\t\t\t\t$('#msg').text(playerName + \" won the game!\")\r\n\r\n\t\t\t}\r\n\r\n\t\t\twinner = 1;\r\n\t\t\tcount = 0;\r\n//Changes the play button from Start Game to Play Again\r\n\t\t\t$(\"#playButton\").text(\"Play again\");\r\n\r\n\t\t\treturn true;\r\n\t\t}\r\n\r\n\t\treturn false;\r\n\t}", "function checkWin(score){\n\tif (score == 3){\n\t\t// X has won the game\n\t\treturn 1;\n\t} else if (score == -3){\n\t\t// O has won the game\n\t\treturn -1;\n\t} else {\n\t\t// no one has won the game\n\t\treturn 0;\n\t}\n}", "function winnerCheck(){ //check for winner\n\n var result = \"no winner\"; //if there isn't a winner, return no winner result\n\n if(playerOneHealth<1 && playerTwoHealth<1) { //if both player's health is below 1\n result = \"You both die.\"; //show that they both died\n }else if(playerOneHealth < 1){ //if player one's health is less than 1\n result = playerTwoName + \" WINS!!!\"; //show player two wins\n }else if(playerTwoHealth < 1){ //if player two's health is less than 1\n result = playerOneName + \" WINS!!!\"; //show player one wins\n }; //close out else/if statement\n\n return result; //return the result of the function\n\n }", "function checkWinner(player, column, height, board) {\r\n let winner = \"Congratulations player:\" + player + \" won!!\"\r\n if ( checkAbove(player, column, height, board) \r\n || checkRow(player, height, board) \r\n || checkBackSlashDiagonal(player, column, height, board) \r\n || checkForwardSlashDiagonal(player, column, height, board)) {\r\n drawWinner(board, player)\r\n return console.log(winner)\r\n } else if (checkTie(board)) {\r\n return $('h2').text(`It's a tie!`)\r\n }\r\n}", "function checkForWinner (playerScore) {\n\n\twinningCombos.forEach((combo) => {\n\t\tlet score = 0;\n\n\t\tcombo.forEach((num) => {\n\t\t\tif (playerScore.includes(num)) {\n\t\t\t\tscore++\n\n\t\t\t}\n\t\t})\n\n\t\tif(score >= 3 && playerScore === orangeScore) {\n\t\t\tplayer1.hasWon = true;\n\t\t\tendGame();\n\n\t\t} else if (score >= 3 && playerScore === blueScore) {\n\t\t\tplayer2.hasWon = true;\n\t\t\tendGame();\n\t\t } \n\t})\n}", "function computeWinner() {\n\n // TODO: Compare date numerology with the active roster\n // TODO: Push numerology values to the json object file.\n var num = Math.floor(Math.random() * 2);\n if(num === 0) {\n return 0;\n } else if(num === 1) {\n return 1;\n }\n}", "function wins () {\n\n \tvar wins = playersTotalScore === randomNumber;\n \twins = wins + 1\n\n $(\"#wins\").text(\"wins++\");\n }", "function winCheck() {\n if (userScore === computerPick) {\n wins++;\n $(\"#wins\").html(\"Wins: \" + wins);\n alert(\"Winning isn’t everything, it’s the ONLY thing\");\n newGame();\n }\n\n else if (userScore > computerPick) {\n losses++;\n $(\"#losses\").html(\"Losses: \" + losses);\n alert(\"...if you ain't first, you're last\");\n newGame();\n };\n }", "function CheckWinner(){\n // player X\n // 00 10 20\n if(board[0][0] === players[0] && board[1][0] === players[0] && board[2][0] === players[0]){\n console.log(players[0] + ' WIN !!!')\n createP('X WIN !!')\n game = 'end'\n noLoop()\n }\n // 01 11 21\n else if(board[0][1] === players[0] && board[1][1] === players[0] && board[2][1] === players[0]){\n console.log(players[0] + ' WIN !!!')\n game = 'end'\n createP('X WIN !!')\n noLoop()\n }\n // 02 12 22\n else if(board[0][2] === players[0] && board[1][2] === players[0] && board[2][2] === players[0]){\n console.log(players[0] + ' WIN !!!')\n game = 'end'\n winner = players[0]\n createP('X WIN !!')\n noLoop()\n }\n // 00 01 02\n else if(board[0][0] === players[0] && board[0][1] === players[0] && board[0][2] === players[0]){\n console.log(players[0] + ' WIN !!!')\n createP(player[0],' WIN !!')\n game = 'end'\n winner = players[0]\n createP('X WIN !!')\n noLoop()\n }\n // 10 11 12\n else if(board[1][0] === players[0] && board[1][1] === players[0] && board[1][2] === players[0]){\n console.log(players[0] + ' WIN !!!')\n game = 'end'\n winner = players[0]\n createP('X WIN !!')\n noLoop()\n }\n // 20 21 22\n else if(board[2][0] === players[0] && board[2][1] === players[0] && board[2][2] === players[0]){\n console.log(players[0] + ' WIN !!!')\n game = 'end'\n winner = players[0]\n createP('X WIN !!')\n noLoop()\n }\n // 00 11 22\n else if(board[0][0] === players[0] && board[1][1] === players[0] && board[2][2] === players[0]){\n console.log(players[0] + ' WIN !!!')\n game = 'end'\n winner = players[0]\n createP('X WIN !!')\n noLoop()\n }\n // 20 11 02\n else if(board[2][0] === players[0] && board[1][1] === players[0] && board[0][2] === players[0]){\n console.log(players[0] + ' WIN !!!')\n game = 'end'\n winner = players[0]\n createP('X WIN !!')\n noLoop()\n }\n\n // player O\n // 00 10 20\n if(board[0][0] === players[1] && board[1][0] === players[1] && board[2][0] === players[1]){\n console.log(players[1] + ' WIN !!!')\n game = 'end'\n winner = players[1]\n createP('O WIN !!')\n noLoop()\n }\n // 01 11 21\n else if(board[0][1] === players[1] && board[1][1] === players[1] && board[2][1] === players[1]){\n console.log(players[1] + ' WIN !!!')\n game = 'end'\n winner = players[1]\n createP('O WIN !!')\n noLoop()\n }\n // 02 12 22\n else if(board[0][2] === players[1] && board[1][2] === players[1] && board[2][2] === players[1]){\n console.log(players[1] + ' WIN !!!')\n game = 'end'\n winner = players[1]\n createP('O WIN !!')\n noLoop()\n }\n // 00 01 02\n else if(board[0][0] === players[1] && board[0][1] === players[1] && board[0][2] === players[1]){\n console.log(players[1] + ' WIN !!!')\n game = 'end'\n winner = players[1]\n createP('O WIN !!')\n noLoop()\n }\n // 10 11 12\n else if(board[1][0] === players[1] && board[1][1] === players[1] && board[1][2] === players[1]){\n console.log(players[1] + ' WIN !!!')\n game = 'end'\n winner = players[1]\n createP('O WIN !!')\n noLoop()\n }\n // 20 21 22\n else if(board[2][0] === players[1] && board[2][1] === players[1] && board[2][2] === players[1]){\n console.log(players[1] + ' WIN !!!')\n game = 'end'\n winner = players[1]\n createP('O WIN !!')\n noLoop()\n }\n // 00 11 22\n else if(board[0][0] === players[1] && board[1][1] === players[1] && board[2][2] === players[1]){\n console.log(players[1] + ' WIN !!!')\n game = 'end'\n winner = players[1]\n createP('O WIN !!')\n noLoop()\n }\n // 20 11 02\n else if(board[2][0] === players[1] && board[1][1] === players[1] && board[0][2] === players[1]){\n console.log(players[1] + ' WIN !!!')\n game = 'end'\n winner = players[1]\n createP('O WIN !!')\n noLoop()\n }\n else if(longMatch === 9 && winner === null){\n console.log('DRAW !!!!')\n game = 'end'\n createP('DRAW !!')\n noLoop()\n }\n}", "function checkWinner(gameField) {\n // check for horizontal win\n for (var i = 0; i < 5; i++) {\n if (gameField[i][0] !== null && gameField[i][0] === gameField[i][1] && gameField[i][1] === gameField[i][2] && gameField[i][2] === gameField[i][3] && gameField[i][3] === gameField[i][4]) {\n return true;\n }\n } // check for vertical win\n\n\n for (var j = 0; j < 5; j++) {\n if (gameField[0][j] !== null && gameField[0][j] === gameField[1][j] && gameField[0][j] === gameField[2][j] && gameField[0][j] === gameField[3][j] && gameField[0][j] === gameField[4][j]) {\n return 1;\n }\n } // check for diagonal top-left-bottom-right\n\n\n if (gameField[0][0] !== null && gameField[0][0] === gameField[1][1] && gameField[0][0] === gameField[2][2] && gameField[0][0] === gameField[3][3] && gameField[0][0] === gameField[4][4]) {\n return 1;\n } // check for diagonal bottom-left-top-right\n\n\n if (gameField[4][0] !== null && gameField[4][0] === gameField[3][1] && gameField[4][0] === gameField[2][2] && gameField[4][0] === gameField[1][3] && gameField[4][0] === gameField[0][4]) {\n return 1;\n }\n\n return 0;\n} // Function for checking 3 by 3 grid for a tie", "function judgeWinner(play1, play2) {\n\n if (play1.name === play2.name ||\n play1.wins.includes(play2.name) && play2.wins.includes(play1.name)) {\n return gameWinner.DRAW;\n }\n\n let winner = play1.wins.includes(play2.name);\n\n if (winner) {\n return gameWinner.PLAYER1;\n } else if (!winner) {\n return gameWinner.PLAYER2;\n }\n\n return winner;\n}", "function compTryToWin() {\n for (var i = 0; i < winners.length; i++) {\n if (board[winners[i][0]] == compChoice && board[winners[i][1]] == compChoice && board[winners[i][2]] == \"\") {\n return winners[i][2];\n }\n else if (board[winners[i][0]] == compChoice && board[winners[i][2]] == compChoice && board[winners[i][1]] == \"\") {\n return winners[i][1];\n }\n else if (board[winners[i][1]] == compChoice && board[winners[i][2]] == compChoice && board[winners[i][0]] == \"\") {\n return winners[i][0];\n } \n }\n return false;\n}", "function playRound(player1Selection, player2Selection) {\n var player1HasWon = true;\n var tied = false;\n player1Selection = player1Selection.toUpperCase();\n player2Selection = player2Selection.toUpperCase();\n if (player1Selection === 'ROCK' && player2Selection === 'PAPER') {\n player1HasWon = false;\n }\n\n if (player1Selection === 'SCISSORS' && player2Selection === 'ROCK') {\n player1HasWon = false;\n }\n\n if (player1Selection === 'PAPER' && player2Selection === 'SCISSORS') {\n player1HasWon = false;\n }\n\n if (player1Selection === player2Selection) {\n tied = true;\n }\n\n if (tied) {\n return 3;\n }\n\n if (player1HasWon) {\n return 1;\n } else {\n return 2;\n }\n}", "function checkForGameWin(player)\n{\n //Check for win\n //Down left column\n if(wonCells[0][0] == player && wonCells[0][1] == player && wonCells[0][2] == player)\n return player;\n //Down middle column\n if(wonCells[1][0] == player && wonCells[1][1] == player && wonCells[1][2] == player)\n return player;\n //Down right column\n if(wonCells[2][0] == player && wonCells[2][1] == player && wonCells[2][2] == player)\n return player;\n //Across top row\n if(wonCells[0][0] == player && wonCells[1][0] == player && wonCells[2][0] == player)\n return player; \n //Across middle row\n if(wonCells[0][1] == player && wonCells[1][1] == player && wonCells[2][1] == player)\n return player;\n //Across bottom row\n if(wonCells[0][2] == player && wonCells[1][2] == player && wonCells[2][2] == player)\n return player; \n //Top left to bottom right\n if(wonCells[0][0] == player && wonCells[1][1] == player && wonCells[2][2] == player)\n return player;\n //Top right to bottom left\n if(wonCells[0][2] == player && wonCells[1][1] == player && wonCells[2][0] == player)\n return player; \n \n //If no win, check for tie\n var countOfWonCells = 0;\n for(var i = 0; i < 3; i++)\n {\n for(var j = 0; j < 3; j++)\n {\n if(wonCells[i][j] != 0)\n countOfWonCells++;\n }\n }\n\n if(countOfWonCells == 9)\n return -1;\n else\n return 0;\n}", "function decideWinner() {\n\tgameOver = true;\n\tcardOpacity();\n\tif (player1.score > 21 && player2.score > 21) {\n\t\ttextTitle.textContent = \"No one won!\";\n\t\tdrawSound.play();\n\t\tplayer1.draws++;\n\t\tplayer2.draws++;\n\t\tdocument.querySelector(\".player1-draws\").textContent = player1.draws;\n\t\tdocument.querySelector(\".player2-draws\").textContent = player2.draws;\n\t} else if (player1.score > 21) {\n\t\ttextTitle.textContent = \"Player 2 won!\";\n\t\tlossSound.play();\n\t\tplayer2.wins++;\n\t\tplayer1.losses++;\n\t\tdocument.querySelector(\".player1-losses\").textContent = player1.losses;\n\t\tdocument.querySelector(\".player2-wins\").textContent = player2.wins;\n\t} else if (player2.score > 21) {\n\t\ttextTitle.textContent = \"Player 1 won!\";\n\t\twinSound.play();\n\t\tplayer1.wins++;\n\t\tplayer2.losses++;\n\t\tdocument.querySelector(\".player1-wins\").textContent = player1.wins;\n\t\tdocument.querySelector(\".player2-losses\").textContent = player2.losses;\n\t} else {\n\t\tconst player1Complement = 21 - player1.score;\n\t\tconst player2Complement = 21 - player2.score;\n\t\tif (player1Complement < player2Complement) {\n\t\t\ttextTitle.textContent = \"Player 1 won!\";\n\t\t\twinSound.play();\n\t\t\tplayer1.wins++;\n\t\t\tplayer2.losses++;\n\t\t\tdocument.querySelector(\".player1-wins\").textContent = player1.wins;\n\t\t\tdocument.querySelector(\".player2-losses\").textContent = player2.losses;\n\t\t} else if (player2Complement < player1Complement) {\n\t\t\ttextTitle.textContent = \"Player 2 won!\";\n\t\t\tlossSound.play();\n\t\t\tplayer2.wins++;\n\t\t\tplayer1.losses++;\n\t\t\tdocument.querySelector(\".player1-losses\").textContent = player1.losses;\n\t\t\tdocument.querySelector(\".player2-wins\").textContent = player2.wins;\n\t\t} else {\n\t\t\ttextTitle.textContent = \"Draw\";\n\t\t\tdrawSound.play();\n\t\t\tplayer1.draws++;\n\t\t\tplayer2.draws++;\n\t\t\tdocument.querySelector(\".player1-draws\").textContent = player1.draws;\n\t\t\tdocument.querySelector(\".player2-draws\").textContent = player2.draws;\n\t\t}\n\t}\n}", "function score(winner) {\n if (winner === \"win\") {\n userScore++;\n console.log(\n `The score is Player: ${userScore} vs Computer ${computerScore}`\n );\n } else if (winner === \"lose\") {\n computerScore++;\n console.log(\n `The score is Player: ${userScore} vs Computer ${computerScore}`\n );\n } else {\n console.log(\n `The score is Player: ${userScore} vs Computer ${computerScore}`\n );\n }\n}", "function winnerCheck(){\n\tconsole.log(\"Inside winnerCheck Function\"); //This logs to the console that the winnerCheck function is currently happening \n\t\t//Inside the winner check function\n\t\tvar result = \"No Winner!\"; //Default state of 'result' variable is that ther is no winner\n\t\t//If either player's health has gone lower than 1, result variable will return that both players have died to the result variable, which will alert the user\n\t\tif(kabal[0].health < 1 && kratos[0].health < 1){\n\t\t\t\n\t\t\tresult = \"You Both Die.\";\n\t\t\t\n\t\t}else if(kratos[0].health < 1){\n\t\t\t\n\t\t\tresult = kratos[0].health + \" Wins!\"\n\t\t\t\n\t\t}else if(kratos[0].health < 1){\n\t\t\t\n\t\t\tresult = kabal[0].health + \" Wins!\"\n\t\t\t\n\t\t}; //Ends the if-else for winnerCheck \n\t\t\n\t\treturn result; //Returns the results of the winner check\n\t}", "function winner() {\n var playerTotal = playerHand.calculatePoints();\n if (playerHand.calculatePoints() < dealerHand.calculatePoints()) {\n var dealerTotal = dealerHand.calculatePoints();\n $('#messages').append('Dealer wins');\n $('#again-button').show();\n $('#hit-button, #stand-button').attr('disabled', true);\n } else if (dealerHand.calculatePoints() < playerHand.calculatePoints()) {\n $('#messages').append('You win!');\n $('#again-button').show();\n $('#hit-button, #stand-button').attr('disabled', true);\n } else {\n $('#messages').append('Push');\n }\n }", "function winner() {\n win++;\n $('#wins-text').text(win);\n reset();\n random();\n }", "function checkWin(player) {\n // Variables to keep track of win, start at true and are proved false\n var horizontalWin = true;\n var verticalWin = true;\n var d1Win = true;\n var d2Win = true;\n\n // Check horizontally\n for(var cIndex = 0; cIndex < NUM_COLS; cIndex++) {\n // Check each column at the same row value\n if(!boxes[row][cIndex].classList.contains(player)) {\n horizontalWin = false;\n }\n }\n\n // Check vertically\n for(var rIndex = 0; rIndex < NUM_ROWS; rIndex++) {\n // Check each row at the same column value\n if(!boxes[rIndex][column].classList.contains(player)) {\n verticalWin = false;\n }\n }\n\n // Check if the latest piece was placed in a position that could win\n // diagonally\n if((row === column) || (Math.abs(row - column) === NUM_ROWS - 1)) {\n for(var d = 0; d < NUM_ROWS; d++) {\n // Check diagonally from top left to bottom right\n if(!boxes[d][d].classList.contains(player)) {\n d1Win = false;\n }\n\n // Check diagonally from bottom left to top right\n if(!boxes[NUM_ROWS - d - 1][d].classList.contains(player)) {\n d2Win = false;\n }\n }\n }\n\n // Couldn't have won diagonally\n else {\n d1Win = false;\n d2Win = false;\n }\n\n //console.log(\"H: \" + horizontalWin + \", V: \" + verticalWin + \", D: \" + d1Win + \", \" + d2Win);\n\n // Player wins\n if(horizontalWin || verticalWin || d1Win || d2Win) {\n if(player === xClass) {\n victoryText.textContent = \"X Player Wins!\";\n // Increase score of X player\n xScore.textContent = Number(xScore.textContent) + 1\n }\n else {\n victoryText.textContent = \"O Player Wins!\";\n // Increase score of O player\n oScore.textContent = Number(oScore.textContent) + 1\n }\n\n $(victoryText).show('slow');\n gameOver = true;\n return true;\n }\n\n // If all spaces are taken and nobody has won\n if(boxCount === NUM_ROWS * NUM_COLS) {\n victoryText.textContent = \"Cat's Game\";\n $(victoryText).show('slow');\n gameOver = true;\n }\n\n // Didn't win... yet\n return false;\n\n }", "function getWinner(choice1, choice2) {\n // 0 beats 2 beats 1 beats 0\n // (0+2)%3 =2|(2+2)%3 = 1|(1+2)%3 = 0\n if (choice1 == choice2) {\n // tie\n return 0;\n } else if ((choice1 + 2)%3 == choice2) {\n // choice1 wins\n return 1;\n } else {\n // choice2 wins\n return 2;\n }\n}", "function winnerCheck(){\n console.log(\"In the winner check function\");\n var result=\"no winner\";\n if (fighter1[2]<1 && fighter2[2]<1) //if player 1 health is less than one AND player 2 health is less than 1, then there will be a result that both players die\n {\n\n result = \"You Both Die\";//If there is a No Winner, then announce it is a tied game and both players die\n } else if(fighter1[2]<1){ //if above condition is not met, then if player 1 health is less than one, then player 2 wins\n result =fighter2[0]+\" WINS!!!\"\n } else if (fighter2[2]<1) //if above condition is not met, then if player 2 health is less than one, then player 1 wins\n {\n result = fighter1[0]+\" WINS!!!\"\n };\n return result; //return winnerCheck information to results variable to use that information again\n }", "function computerWinner()\n{\n let winner ;\n if(PLAYER['score'] <= 21){\n // condition : higher score than dealer or when dealer busts but your are winner.\n if(PLAYER['score'] > DEALER['score'] || (DEALER['score']>21))\n {\n cardGame['win']++;\n winner = PLAYER;\n }\n else if(PLAYER['score'] < DEALER['score']){\n cardGame['loss']++;\n winner = DEALER;\n }\n else if(PLAYER['score'] === DEALER['score']){\n cardGame['draw']++;\n winner= 'draw'\n }\n }\n else if(PLAYER['score'] < DEALER['score'])\n {\n cardGame['loss']++;\n winner = DEALER;\n }\nelse if(PLAYER['score'] > 21 && DEALER['score'] <=21 )\n {\n cardGame['loss']++;\n winner = DEALER;\n \n }\n else if(PLAYER['score'] > 21 && DEALER['score'] > 21 ){\n cardGame['draw']++;\n winner = 'draw'\n \n }\n console.log('winner is',winner) ;\n return winner; \n}", "function computeWinner() {\n let winner;\n\n if (YOU[\"score\"] <= 21) {\n // conditions: higher score than dealer or dealer busts but your 21 or less\n if (YOU[\"score\"] > DEALER[\"score\"] || DEALER[\"score\"] > 21) {\n blcakjackGame[\"wins\"]++;\n winner = YOU;\n } else if (YOU[\"score\"] < DEALER[\"score\"]) {\n blcakjackGame[\"losses\"]++;\n winner = DEALER;\n } else if (YOU[\"score\"] === DEALER[\"score\"]) {\n blcakjackGame[\"draws\"]++;\n }\n //condition when user bust but dealer dosent\n } else if (YOU[\"score\"] > 21 && DEALER[\"score\"] <= 21) {\n blcakjackGame[\"losses\"]++;\n winner = DEALER;\n }\n //condition when you and dealer both bust\n else if (YOU[\"score\"] > 21 && DEALER[\"score\"] > 21) {\n blcakjackGame[\"draws\"]++;\n }\n console.log(blcakjackGame);\n return winner;\n}", "function check_winner(){ //NOT FUNCTIONING YET //see if there's a winner\n\tconsole.log(\"check winner run\"); \n\tconsole.log('value of i is _'+ i);\n\tfor(var i = 0; i < win_options.length; i++){\n\t\tfor(var j=0; j <win_options[i].length; j++){\n\t\n\t\t\tif(player_clicks[win_options[i][0]]==player_clicks[win_options[i][1]]\n\t\t\t\t&&\n\t\t\t\tplayer_clicks[win_options[i][1]]==player_clicks[win_options[i][2]]){\n\t\t\t\twin_confirmation();\n\t\t\t\twinner_found = 1;\n\t\t\t\tbreak;\n\t\t\t\t}\n\t\t}\n\t}\n}", "function checkFinish()\r\n {\r\n player = currentPlayer();\r\n\r\n if(completeRow = isRowComplete(player))\r\n {\r\n highlightWinningCells(_ROW, completeRow);\r\n }\r\n\r\n if(completeCol = isColumnComplete(player))\r\n {\r\n highlightWinningCells(_COL, completeCol);\r\n }\r\n\r\n if(completeDiagonal_1 = isDiagonalComplete(player, _FIRST_DIAGONAL))\r\n {\r\n highlightWinningCells(_DIAGONAL, completeDiagonal_1);\r\n }\r\n\r\n if(completeDiagonal_2 = isDiagonalComplete(player, _SECOND_DIAGONAL))\r\n {\r\n highlightWinningCells(_DIAGONAL, completeDiagonal_2);\r\n }\r\n\r\n if( completeRow || completeCol || completeDiagonal_1 || completeDiagonal_2 )\r\n {\r\n congratulate(player);\r\n finalize();\r\n\r\n // It returns the player number just in case in the next extensions of the program, we decide to store the players' scores.\r\n // Otherwise, simply return suffices.\r\n return player;\r\n }\r\n\r\n // The following will be executed only if there is no winner (based on the result of the code above).\r\n if(isTableFull())\r\n {\r\n congratulate(_BOTH);\r\n finalize();\r\n return _BOTH;\r\n }\r\n\r\n return 0;\r\n }", "function declareWinner() {\n\n if (gameOn === true) {\n if (winner(board, player)) {\n winnerMsg.innerHTML = \"Player wins!\";\n gameOn = false;\n playerWins.innerHTML = playerWinsNum++;\n } else if (winner(board, computer)) {\n winnerMsg.innerHTML = \"Computer wins!\";\n gameOn = false;\n computerWins.innerHTML = computerWinsNum++;\n } else if (validMoves().length === 0) {\n winnerMsg.innerHTML = \"It's a draw!\";\n gameOn = false;\n draws.innerHTML = drawsNum++;\n }\n }\n}", "function checkWinsLosses() {\n if (score === random) {\n wins++;\n $(\"#wins\").text(wins);\n reset();\n } else if (score > random) {\n losses++;\n $(\"#losses\").text(losses);\n reset();\n }\n }", "function winner() {\n (totalScore === randomNumber) \n wins = wins + 1;\n $(\"#totalWins\").html(\"Wins: \" + wins); \n $(\"#score\").html(\"Your total score is: 0\");\n }", "function winLossChecker(){\n if (userScore === targetScore)\n {\n winCount++;\n gameReset();\n }\n else if (userScore > targetScore){\n lossCount++;\n gameReset();\n }\n}", "function checkWinner(){\n \n\n //var result = '';\n //var userCounter = 0;\n \n //Iterate through win condition array\n /*for (var i = 0; i < winCondition.length; i++ ){\n //Checks winCondition first, player selections second.\n //Iterate through userChoices array \n for(var x = 0; x < userChoices.length; x++){\n result = $.inArray(userChoices[x], winCondition[i]);\n console.log(userChoices[x] + 'userChoice' + winCondition[i])\n console.log('result: ' + result);\n //First control flow: Increment userCounter if userChoices are found within winCondition array. \n if (result !== -1) {\n userCounter++;\n console.log(\"userCounter: \" + userCounter);\n } \n if (userCounter == 3) {\n alert('You win!');\n break;\n }\n };\n };\n\n \n*/ \n //outline all win conditions. Tried other methods. Really wanted to use array comparison, but couldn't\n //find a way to make it happen. \n //Win conditions for 'x' player\n if ($('#zero').hasClass('x') && $('#one').hasClass('x') && $('#two').hasClass('x') || \n $('#three').hasClass('x') && $('#four').hasClass('x') && $('#five').hasClass('x') ||\n $('#six').hasClass('x') && $('#seven').hasClass('x') && $('#eight').hasClass('x') ||\n $('#zero').hasClass('x') && $('#three').hasClass('x') && $('#six').hasClass('x') ||\n $('#zero').hasClass('x') && $('#four').hasClass('x') && $('#eight').hasClass('x') ||\n $('#one').hasClass('x') && $('#four').hasClass('x') && $('#seven').hasClass('x') ||\n $('#two').hasClass('x') && $('#five').hasClass('x') && $('#eight').hasClass('x') ||\n $('#two').hasClass('x') && $('#four').hasClass('x') && $('#six').hasClass('x')\n ) {\n winner = 'You won!';\n $(\"#player-score\").html(parseInt($(\"#player-score\").html(), 10)+1);\n //Win conditions for 'o' player\n } else if ($('#zero').hasClass('o') && $('#one').hasClass('o') && $('#two').hasClass('o') || \n $('#three').hasClass('o') && $('#four').hasClass('o') && $('#five').hasClass('o') ||\n $('#six').hasClass('o') && $('#seven').hasClass('o') && $('#eight').hasClass('o') ||\n $('#zero').hasClass('o') && $('#three').hasClass('o') && $('#six').hasClass('o') ||\n $('#zero').hasClass('o') && $('#four').hasClass('o') && $('#eight').hasClass('o') ||\n $('#one').hasClass('o') && $('#four').hasClass('o') && $('#seven').hasClass('o') ||\n $('#two').hasClass('o') && $('#five').hasClass('o') && $('#eight').hasClass('o') ||\n $('#two').hasClass('o') && $('#four').hasClass('o') && $('#six').hasClass('o')\n ) {\n winner = 'Computer won!';\n $(\"#opponent-score\").html(parseInt($(\"#opponent-score\").html(), 10)+1);\n //If board is full with no win conditions outlined above\n } else if(countTurn >= 9){\n alert('Cat scratch fever.');\n //Add to cat-record score\n $(\"#cat-record\").html(parseInt($(\"#cat-record\").html(), 10)+1);\n }\n\n }", "function updateScore(winner) {\n winner === \"human\" ? humanScore++ : computerScore++;\n}", "function winner() {\n\nif (TL === \"x\" && TM === \"x\" && TR === \"x\") return \"one\"\nif (ML === \"x\" && MM === \"x\" && MR === \"x\") return \"one\"\nif (BL === \"x\" && BM === \"x\" && BR === \"x\") return \"one\"\n\nif (TL === \"x\" && ML === \"x\" && BL === \"x\") return \"one\"\nif (TM === \"x\" && MM === \"x\" && BM === \"x\") return \"one\"\nif (TR === \"x\" && MR === \"x\" && BR === \"x\") return \"one\"\n\nif (TL === \"x\" && MM === \"x\" && BR === \"x\") return \"one\"\nif (TR === \"x\" && MM === \"x\" && BL === \"x\") return \"one\"\n\n\nif (TL === \"o\" && TM === \"o\" && TR === \"o\") return \"two\"\nif (ML === \"o\" && MM === \"o\" && MR === \"o\") return \"two\"\nif (BL === \"o\" && BM === \"o\" && BR === \"o\") return \"two\"\n\nif (TL === \"o\" && ML === \"o\" && BL === \"o\") return \"two\"\nif (TM === \"o\" && MM === \"o\" && BM === \"o\") return \"two\"\nif (TR === \"o\" && MR === \"o\" && BR === \"o\") return \"two\"\n\nif (TL === \"o\" && MM === \"o\" && BR === \"o\") return \"two\"\nif (TR === \"o\" && MM === \"o\" && BL === \"o\") return \"two\"\n\n}", "function check(){\n if(score < compNum){\n return;\n }\n if (score == compNum){\n alert(\"win!\");\n wins ++;\n $(\"#wins\").text(wins);\n roundReset();\n }\n if(score > compNum) {\n alert(\"lose!\");\n losses ++;\n $(\"#losses\").text(losses);\n roundReset();\n }\n }", "function checkGameStatus() {\r\n\tnumTurns++; //count turns\r\n\t\r\n\t//check for tie\r\n\tif (numTurns == 9) {\r\n\t\tgameStatus = \"Tie Game\";\r\n\t}//numTurns\r\n\t\r\n\t//check window\r\n\tif (checkWin()) {\r\n\t\tgameStatus = currentPlayer + \" wins!\";\r\n\t}//check wins\r\n\r\n\t//switch current player\r\n\tcurrentPlayer = (currentPlayer == \"X\" ? \"O\" : \"X\" );\r\n}//checkGameStatus", "function checkWin(a, b) {\n const total = 1 + checkDirection(a) + checkDirection(b);\n if (total >= 4 && total < 5) {\n return that.currentPlayer;\n } else {\n return null;\n }\n }", "function checkForWin(player) {\n\tlet g = gameBoard.bigGrid;\n\n\t// Check for 3 in a row on big board\n\tif (\n\t\t(g.A1 === g.A2 && g.A1 === g.A3 && g.A1) ||\n\t\t(g.B1 === g.B2 && g.B1 === g.B3 && g.B1) ||\n\t\t(g.C1 === g.C2 && g.C1 === g.C3 && g.C1) ||\n\t\t(g.A1 === g.B1 && g.A1 === g.C1 && g.A1) ||\n\t\t(g.A2 === g.B2 && g.A2 === g.C2 && g.A2) ||\n\t\t(g.A3 === g.B3 && g.A3 === g.C3 && g.A3) ||\n\t\t(g.A1 === g.B2 && g.A1 === g.C3 && g.A1) ||\n\t\t(g.C1 === g.B2 && g.C1 === g.A3 && g.C1)\n\t) {\n\t\t$('#turn').text(`${player} Wins`);\n\t}\n\n\t// Check for tie game on big board\n\telse if (\n\t\tg.A1 && g.A2 && g.A3 && g.B1 && g.B2 && g.B3 && g.C1 && g.C2 && g.C3\n\t) {\n\t\t$('#turn').text(`It's a Tie Game!`);\n\t}\n\n\t$('#gameBoard').css('background-color', 'rgb(128, 128, 128)');\n}", "function getWinner(board) {\n\n // Check if someone won\n vals = [true, false];\n var allNotNull = true;\n for (var k = 0; k < vals.length; k++) {\n var value = vals[k];\n // Check rows, columns, and diagonals\n var diagonalComplete1 = true;\n var diagonalComplete2 = true;\n for (var i = 0; i < 3; i++) {\n if (board[i][i] != value) {\n diagonalComplete1 = false;\n }\n if (board[2 - i][i] != value) {\n diagonalComplete2 = false;\n }\n var rowComplete = true;\n var colComplete = true;\n for (var j = 0; j < 3; j++) {\n if (board[i][j] != value) {\n rowComplete = false;\n }\n if (board[j][i] != value) {\n colComplete = false;\n }\n if (board[i][j] == null) {\n allNotNull = false;\n }\n }\n if (rowComplete || colComplete) {\n return value ? 1 : 0;\n \n }\n }\n if (diagonalComplete1 || diagonalComplete2) { \n return value ? 1 : 0;\n }\n }\n if (allNotNull) {\n return -1;\n }\n return null;\n }", "judgeWinner(houseChoice, playerChoice) {\n\t\tconst values = {\n\t\t\tpaper: 0,\n\t\t\tscissors: 1,\n\t\t\trock: 2\n\t\t};\n\n\t\tconst difference = values[playerChoice] - values[houseChoice];\n\n\t\tlet outcome = \"\";\n\n\t\tif ((difference > 0 && difference !== 2) || difference === -2) {\n\t\t\tthis.props.increaseScore();\n\t\t\toutcome = \"YOU WIN\";\n\t\t} else if (difference === 0) {\n\t\t\toutcome = \"DRAW\";\n\t\t} else {\n\t\t\toutcome = \"YOU LOSE\";\n\t\t}\n\n\t\tthis.setState({\n\t\t\tgameResult: outcome\n\t\t});\n\t}", "function computeWinner(){\r\n let winner;\r\n if(YOU['score'] <= 21){\r\n if(YOU['score'] > DEALER['score'] || (DEALER['score']>21))\r\n {\r\n blackjackGame['wins']++;\r\n winner=YOU;\r\n }else if(YOU['score'] < DEALER['score']){\r\n blackjackGame['losses']++;\r\n winner=DEALER\r\n }\r\n else if(YOU['score'] === DEALER['score'])\r\n {\r\n blackjackGame['draws']++;\r\n }\r\n }\r\n // condition: when user bust but dealer doesn't\r\n else if (YOU['score'] > 21 && DEALER['score'] <= 21){\r\n blackjackGame['losses']++;\r\n winner=DEALER;\r\n }\r\n // condition when you and the dealer both bust\r\n else if(YOU['score'] > 21 && DEALER['score'] >21){\r\n blackjackGame['draws']++;\r\n }\r\n console.log(blackjackGame);\r\n return winner;\r\n \r\n}", "isWinner(player) {\n return TTTGame.POSSIBLE_WINNING_ROWS.some(row => {\n return this.board.countMarkersFor(player, row) === 3;\n })\n }", "checkForWin() {\n if (this.numMafia <= 0) { this.gameState = TOWN_WIN; }\n if (this.getInnocentPlayerCount() <= 0) { this.gameState = MAFIA_WIN; }\n }" ]
[ "0.78480136", "0.75217175", "0.7479912", "0.74710375", "0.7462633", "0.74580777", "0.740019", "0.73903704", "0.7380191", "0.7378169", "0.7371717", "0.7367642", "0.73641163", "0.7343658", "0.7327018", "0.7275864", "0.7241801", "0.72415525", "0.72330844", "0.72119546", "0.72059757", "0.71942395", "0.7183195", "0.718077", "0.7166011", "0.7157171", "0.71438736", "0.714285", "0.7141082", "0.71270263", "0.7125283", "0.711265", "0.71098626", "0.70993596", "0.7076541", "0.70743525", "0.7063821", "0.7057334", "0.7051538", "0.70484865", "0.7036659", "0.70190644", "0.7010555", "0.7008136", "0.69989395", "0.69981974", "0.6990708", "0.6990253", "0.6973613", "0.6971732", "0.6971113", "0.6965744", "0.69604963", "0.6946601", "0.69422805", "0.6941284", "0.69361895", "0.6928776", "0.6922773", "0.69167745", "0.6910915", "0.6908306", "0.69042635", "0.6904009", "0.68999934", "0.6893569", "0.6886307", "0.6883838", "0.6879766", "0.68784887", "0.68665385", "0.68587196", "0.685801", "0.68565047", "0.68559086", "0.6848916", "0.6843505", "0.6836546", "0.6819814", "0.68176407", "0.6816639", "0.68154037", "0.6808168", "0.6806844", "0.67942506", "0.67929345", "0.6789872", "0.67892045", "0.67838913", "0.6781671", "0.6780418", "0.6779521", "0.67725205", "0.67710733", "0.67709893", "0.6763372", "0.67593503", "0.67589635", "0.6757229", "0.67569876" ]
0.7880573
0
Takes in a object with properties : id, x, y upper_length, lower_length, upper_width, lower_width,
constructor(params) { this.id = params.id; this.upper_length = params.upper_length; this.upper_width = params.upper_width; this.lower_length = params.lower_length; this.lower_width = params.lower_width; this.score = 0; this.fitness = 0; this.parents = []; this.colors = []; this.params = params; this.brain = new NeuralNetwork(4, 100, 2); this.init(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "constructor(x, y, width, height) {\n //TO-DO\n }", "constructor(object) {\n super();\n this.id = generateId();\n this.height = null;\n this.width = null;\n this.length = null;\n this.x = null;\n this.y = null;\n this.z = null;\n this.rotateable = false;\n this.stackable = false;\n this.isRotated = false;\n this.group = null;\n this.desc = null;\n this.seqNr = null;\n if (object != null && typeof (object) != \"undefined\") {\n if (object._Height != null && typeof (object._Height) != \"undefined\") {\n this.height = object._Height;\n }\n if (object._Width != null && typeof (object._Width) != \"undefined\") {\n this.width = object._Width;\n }\n if (object._Length != null && typeof (object._Length) != \"undefined\") {\n this.length = object._Length;\n }\n if (object._X != null && typeof (object._X) != \"undefined\") {\n this.x = object._X;\n }\n if (object._Y != null && typeof (object._Y) != \"undefined\") {\n this.y = object._Y;\n }\n if (object._Z != null && typeof (object._Z) != \"undefined\") {\n this.z = object._Z;\n }\n if (object._Group != null && typeof (object._Group) != \"undefined\") {\n this.group = object._Group;\n }\n if (object._Desc != null && typeof (object._Desc) != \"undefined\") {\n this.desc = object._Desc;\n }\n if (object._Stack != null && typeof (object._Stack) != \"undefined\") {\n this.stackable = object._Stack;\n }\n if (object._Rotate != null && typeof (object._Rotate) != \"undefined\") {\n this.rotateable = object._Rotate;\n }\n if (object._IsRotated != null && typeof (object._IsRotated) != \"undefined\") {\n this.isRotated = object._IsRotated;\n }\n if (object._SequenceNr != null && typeof (object._SequenceNr) != \"undefined\") {\n this.seqNr = object._SequenceNr;\n }\n }\n }", "constructor(x,y,width,height){\n this.#x = x;\n this.#y = y;\n this.#halfWidth = width/2;\n this.#halfHeight = height/2;\n }", "constructor(x, y) {\n this.x = x;\n this.y = y;\n this.w = 100;\n this.h = 40;\n this.fillColor = color(255, 76, 39);\n this.id = 1;\n }", "constructor(name, x, y) {\n this.name = name;\n this.x = x;\n this.y = y;\n this.w = 50;\n this.h = 50;\n this.ax = x;\n this.ay = y;\n }", "constructor(x, y) {\n this.position = { x: x, y: y };\n this.size = {x: 5, y:5};\n }", "function calcArea(obj){\n return obj.base * obj.height/2;\n}", "constructor(height, width) {\r\n this.height = height;\r\n this.width = width;\r\n }", "function n(e,t,a,l){return{x:e,y:t,width:a,height:l}}", "constructor(height, width) {\n this.height = height;\n this.width = width;\n }", "constructor(width, height){\r\n this.width = width;\r\n this.height = height;\r\n }", "get bounds () {\n const xMin = Math.min.apply(null, this.pointArr.map(pt => pt.x))\n const yMin = Math.min.apply(null, this.pointArr.map(pt => pt.y))\n const xMax = Math.max.apply(null, this.pointArr.map(pt => pt.x))\n const yMax = Math.max.apply(null, this.pointArr.map(pt => pt.y))\n\n return {\n x: xMin,\n y: yMin,\n width: xMax - xMin,\n height: yMax - yMax\n }\n }", "constructor(x, y, width, height, color) {\r\n this.x = x;\r\n this.y = y;\r\n this.width = width;\r\n this.height = height;\r\n this.color = color;\r\n }", "function getBoundariesFor(obj) {\r\n\t\treturn {\r\n\t\t\ttop: obj.center.y - (obj.size.height / 2.5),\r\n\t\t\tbottom: obj.center.y + (obj.size.height / 2.5),\r\n\t\t\tleft: obj.center.x - (obj.size.width / 2.5),\r\n\t\t\tright: obj.center.x + (obj.size.width / 2.5)\r\n\t\t};\r\n\t}", "constructor(x, y, weight, tail, floor, width) {\n this.x = x;\n this.y = y;\n this.weight = weight;\n this.tail = tail;\n this.floor = floor;\n this.width = width;\n }", "constructor(x, y, width, height, color) {\n this.x = x;\n this.y = y;\n this.width = width;\n this.height = height;\n this.color = color;\n }", "function make_rect(tl, br) {\n return { \n \"x\" : tl.x,\n \"y\" : tl.y,\n \"width\" : br.x - tl.x,\n \"height\" : br.y - tl.y,\n };\n}", "function boundArea(x, y, w, h){\n\tthis.x = x;\n\tthis.y = y;\n\tthis.w = w;\n\tthis.h = h;\n}", "constructor(myleft = 0.0, mytop = 0.0, myright = 0.0, mybottom = 0.0, id = -1)\n {\n Object.defineProperty(this, 'm_dTop', {\n value: mytop,\n writable: false,\n enumerable: true,\n configurable: true,\n });\n\n Object.defineProperty(this, 'm_dRight', {\n value: myright,\n writable: false,\n enumerable: true,\n configurable: true,\n });\n\n Object.defineProperty(this, 'm_dLeft', {\n value: myleft,\n writable: false,\n enumerable: true,\n configurable: true,\n });\n\n Object.defineProperty(this, 'm_dBottom', {\n value: mybottom,\n writable: false,\n enumerable: true,\n configurable: true,\n });\n\n Object.defineProperty(this, 'm_iID', {\n value: id,\n writable: false,\n enumerable: true,\n configurable: true,\n });\n\n Object.defineProperty(this, 'm_vCenter', {\n value: new Phaser.Point((this.m_dLeft + this.m_dRight) * 0.5, (this.m_dTop + this.m_dBottom) * 0.5),\n writable: false,\n enumerable: true,\n configurable: true,\n });\n\n Object.defineProperty(this, 'm_dWidth', {\n value: Math.abs(this.m_dRight - this.m_dLeft),\n writable: false,\n enumerable: true,\n configurable: true,\n });\n\n Object.defineProperty(this, 'm_dHeight', {\n value: Math.abs(this.m_dBottom - this.m_dRight),\n writable: false,\n enumerable: true,\n configurable: true,\n });\n }", "constructor(object) {\n super();\n this.goods = [];\n this.height = null;\n this.width = null;\n this.length = null;\n this.x = 0.0;\n this.y = 0.0;\n this.z = 0.0;\n if (object != null && typeof (object) != \"undefined\") {\n if (object._Height != null && typeof (object._Height) != \"undefined\") {\n this.height = object._Height;\n }\n if (object._Width != null && typeof (object._Width) != \"undefined\") {\n this.width = object._Width;\n }\n if (object._Length != null && typeof (object._Length) != \"undefined\") {\n this.length = object._Length;\n }\n if (object._Goods != null && typeof (object._Goods) != \"undefined\") {\n for (var index in object._Goods) {\n var g = new Good(object._Goods[index]);\n this.addGood(g);\n }\n }\n }\n }", "function rect(x, y, w, h) {\n this.x = x;\n this.y = y;\n this.w = w;\n this.h = h;\n }", "update() {\n var self = this;\n\n var updateOne = function (obj) {\n var left = undefined;\n var bottom = undefined;\n var right = undefined;\n var top = undefined;\n\n\n if (obj.length !== undefined) {\n if (typeof(obj) == \"string\") {\n obj = obj.split(\",\");\n }\n self.left = parseFloat(obj[0]);\n self.bottom = parseFloat(obj[1]);\n self.right = parseFloat(obj[2]);\n self.top = parseFloat(obj[3]);\n } else {\n if (obj.getBounds !== undefined) {\n obj = obj.getBounds();\n }\n\n if (obj.left !== undefined) {\n left = obj.left;\n }\n if (obj.bottom !== undefined) {\n bottom = obj.bottom;\n }\n if (obj.right !== undefined) {\n right = obj.right;\n }\n if (obj.top !== undefined) {\n top = obj.top;\n }\n }\n\n if (left) {\n left = parseFloat(left);\n }\n if (bottom) {\n bottom = parseFloat(bottom);\n }\n if (right) {\n right = parseFloat(right);\n }\n if (top) {\n top = parseFloat(top);\n }\n\n if (left !== undefined) {\n self.left = left;\n }\n if (bottom !== undefined) {\n self.bottom = bottom;\n }\n if (right !== undefined) {\n self.right = right;\n }\n if (top !== undefined) {\n self.top = top;\n }\n };\n\n for (var i = 0; i < arguments.length; i++) {\n updateOne(arguments[i]);\n }\n }", "function id_to_xy(id) {\n return { x: Math.floor((id - 1) / COL), y: (id - 1) % COL };\n}", "function BoundingDimensions(width, height) {\n this.width = width;\n this.height = height;\n}", "function BoundingDimensions(width, height) {\n this.width = width;\n this.height = height;\n}", "function BoundingDimensions(width, height) {\n this.width = width;\n this.height = height;\n}", "constructor(width=10, height=10, x=0, y=0) {\n this.width = width;\n this.height = height;\n this.x = x;\n this.y = y;\n this.xHitBox = this.width/2\n this.yHitBox = this.height/2\n }", "constructor(x,y,w,h)\n {\n super();\n this.x=x;\n this.y=y;\n this.w=w;\n this.h=h;\n }", "function createNewFixedPoint(id) {\n\t\treturn { \n\t\t\tid : id, \n\t\t\tx : addRemoveArea.width * 0.3, \n\t\t\ty : height - addRemoveArea.height * 0.3 \n\t\t};\n\t}", "function init(x, y, width, height, data) {\n return COG.extend({\n x: x,\n y: y,\n width: width,\n height: height\n }, data);\n }", "function Rectangle(w, h){\n this.w = w;\n this.h = h;\n }", "function Rect(point, width, height) {\n this.point = point;\n this.width = width; \n this.height = height;\n}", "constructor(x, y, w, h) {\n this.minimumSize = {w: 128, h: 128};\n this.x = x;\n this.y = y;\n this.w = w;\n this.h = h;\n this.quads = [\n [], // 0: top left\n [], // 1: top right\n [], // 2: bottom left\n [] // 3: bottom right\n ];\n }", "function Rectangle(length, width) {\n this.length = length;\n this.width = width\n}", "function Rectangle(left,top,right,bottom){this.left=left;this.top=top;this.right=right;this.bottom=bottom;}", "get rect() {\n return {\n x: this.x - this.width / 2,\n y: this.y - this.height / 2,\n width: this.width,\n height: this.height,\n };\n }", "function arrangeSize( obj, x, y, z ) {\n\n\t\tif (y > Y_SIZE) obj.scale.y *= Y_SIZE / y;\n\t\tif (x > X_SIZE) obj.scale.x *= X_SIZE / x;\t\n\t\tif (z > Z_SIZE) obj.scale.z *= Z_SIZE / z;\n\t\t\n\t\treturn obj;\n\t}", "bbox() {\n var maxX = -Infinity;\n var maxY = -Infinity;\n var minX = Infinity;\n var minY = Infinity;\n this.forEach(function (el) {\n maxX = Math.max(el[0], maxX);\n maxY = Math.max(el[1], maxY);\n minX = Math.min(el[0], minX);\n minY = Math.min(el[1], minY);\n });\n return {\n x: minX,\n y: minY,\n width: maxX - minX,\n height: maxY - minY\n };\n }", "constructor(width = 2, height = 1) { //vai assumir estes valores se nao dissermos que valores as propriedades vao ter, como no myRectangle2\n this.width = width //nao precisa de ter os mesmos nomes, é so pra ser mais facil.\n this.height = height\n this._color = \"#FFFFFF\" //propriedade privada, nao quero alterar a cor fora. usar apenas o underscore dentro da class, nunca fora.\n }", "constructor(x, y, width, height) {\n this.pos = createVector(x, y);\n this.topLeft = createVector(x, y);\n this.width = width;\n this.height = height;\n }", "constructor(id, props){\n super(id, props);\n\n //category, row, column, spanrows, spancols\n\n this.row = props.row;\n this.column = props.col;\n this.spanRows = props.spanRows;\n this.spanCols = props.spanCols;\n \n\n }", "function Rectangle(length, width) {\n this.length = length;\n this.width = width;\n}", "constructor(x_,y_,id_){\n this.x=x_;\n this.y=y_;\n this.id=id_;\n this.zone=floor(this.id/7);\n this.mogoID=-1;\n }", "function GetXandYCoordinate(id){\n id = \"\"+id;\n return {y : id[0],x : id[1]};\n}", "function Rectangle(width, height) {\n this.width = width;\n this.height = height;\n}", "function getPos(obj) {\n var offsets = obj.offset();\n objHeight = obj.height();\n objWidth = obj.width();\n excldH = objHeight/3; //Caculating 10% height\n top = offsets.top,\n left = offsets.left,\n bottom = top+objHeight,\n right = left+objWidth\n}", "function Rectangle(width, height) {\n this.width = width;\n this.height = height;\n}", "function Rectangle(width, height) {\n this.width = width;\n this.height = height;\n}", "function getPos(obj) {\n\t\tvar offsets = obj.offset();\n\t\tobjHeight = obj.height();\n\t\tobjWidth = obj.width();\n\t\texcldH = objHeight / 3; //Caculating 10% height\n\t\t(top = offsets.top),\n\t\t\t(left = offsets.left),\n\t\t\t(bottom = top + objHeight),\n\t\t\t(right = left + objWidth);\n\t}", "setRectangle() {\n this.gene = makeRectangle(this.size, this.size - 10);\n }", "bbox() {\n let width = this.box.attr(\"width\");\n let height = this.box.attr(\"height\");\n let x = this.box.attr(\"x\");\n let y = this.box.attr(\"y\");\n let cy = y + height / 2;\n let cx = x + width / 2;\n\n return {\n width: width,\n height: height,\n x: x,\n y: y,\n cx: cx,\n cy: cy\n };\n }", "function Origin(){\n this.x = midWidth;\n this.y = midHeight;\n}", "function OldRectangles(width, height) {\n this.width = width;\n this.height = height;\n}", "function Rectangles( aside, heihgt){\n this.aside = aside;\n this.heihgt = heihgt;\n}", "constructor(length, width, height) {\n\n super(length, width)\n //super calls parent class's constructor(the rectangle constructor to establish length and width properties)--need this if adding PROPERTIES\n this.height = height\n\n }", "rect(...args) {\n let x = 0, y = 0, w = 1, h = 1;\n let a = args[0];\n if (typeof a == \"object\") {\n w = args[1] != undefined ? args[1] : 1;\n h = args[2] != undefined ? args[2] : w;\n x = a[0] || 0;\n y = a[1] || 0;\n } else if (typeof a == \"number\") {\n w = a;\n h = args[1] != undefined ? args[1] : w;\n }\n ctx.fillRect(x-w*0.5, y-h*0.5, w, h);\n return this;\n }", "function Map(width, height, backgroundURL){\n\tthis.width = width;\n\tthis.height = height;\n\tthis.backgroundURL = backgroundURL;\n\tthis.territory = [];\n\tthis.territory.width = this.width;\n\tthis.territory.height = this.height;\n\tthis.territory.getAt = getAt;\n\tthis.territory.setAt = setAt;\n\tthis.territory.remove = remove;\n\tthis.territory.iterate = iterate;\n\tthis.content = [];\n\tthis.content.width = this.width;\n\tthis.content.height = this.height;\n\tthis.content.getAt = getAt;\n\tthis.content.setAt = setAt;\n\tthis.content.remove = remove;\n\tthis.content.iterate = iterate;\n\tthis.objects = [];\n\tthis.objects.width = this.width;\n\tthis.objects.height = this.height;\n\tthis.objects.iterate = iterate;\n\tthis.verticalEdges = [];\n\tthis.verticalEdges.width = this.width;\n\tthis.verticalEdges.height = this.height - 1;\n\tthis.verticalEdges.getAt = getAt;\n\tthis.verticalEdges.setAt = setAt;\n\tthis.verticalEdges.remove = remove;\n\tthis.verticalEdges.iterate = iterate;\n\tthis.horizontalEdges = [];\n\tthis.horizontalEdges.width = this.width - 1;\n\tthis.horizontalEdges.height = this.height;\n\tthis.horizontalEdges.getAt = getAt;\n\tthis.horizontalEdges.setAt = setAt;\n\tthis.horizontalEdges.remove = remove;\n\tthis.horizontalEdges.iterate = iterate;\n\t\n\tfunction getAt(x, y){\n\t\tif(this[x]){\n\t\t\treturn this[x][y];\n\t\t}\n\t}\n\tfunction setAt(x, y, obj){\n\t\tif(x < 0 || y < 0 || x >= this.width || y >= this.height){\n\t\t\treturn;\n\t\t}\n\t\tif(!this[x]){\n\t\t\tthis[x] = [];\n\t\t}\n\t\tthis[x][y] = obj;\n\t}\n\tfunction remove(x, y){\n\t\tif(this[x] && this[x][y]){\n\t\t\tdelete this[x][y];\n\t\t}\n\t}\n\tfunction iterate(callback){\n\t\tthis.forEach(function(column, columnNum){\n\t\t\tif(column)\n\t\t\t\tcolumn.forEach(function (item, rowNum){\n\t\t\t\t\tif(item)\n\t\t\t\t\t\tcallback(item, columnNum, rowNum);\n\t\t\t\t});\n\t\t});\n\t}\n}", "function O(){!f&&b.points&&(f=Atalasoft.Utils.__calcPathBounds(b.points));var e=b.points?f:b;return{x:e.x,y:e.y,width:e.width,height:e.height}}", "constructor(args) {\n super();\n args = args || {}\n this.CONSTRUCTOR_ID = 0xaed6dbb2;\n this.SUBCLASS_OF_ID = 0x6bbb2fd;\n\n this.n = args.n;\n this.x = args.x;\n this.y = args.y;\n this.zoom = args.zoom;\n }", "function boundingBox(x,y,xextent,yextent)\n{\n \n this.x1=x;\n this.y1=y;\n this.x2=x+xextent;\n this.y2=y+yextent;\n this.toString=function(){ return 'boundingBox(('+this.x1+','+this.y1+'),('+this.x2+','+this.y2+'))'; }\n}", "function rectangle(id,x,y,width,height,source, speed, hp, drop){\n\tthis.id = id;\n\tthis.maxHp = hp;\n\tthis.currHp = hp;\n\tthis.r = width / 2;\n\tthis.mx=0\n\tthis.my=0\n\tthis.sx=x\n\tthis.sy=y\n\tthis.x=x;\n\tthis.y=y;\n\tthis.width=width;\n\tthis.height=height;\n\tthis.cx=0;\n\tthis.cy=0;\n\tthis.d=0;\n\tthis.speed= speed;\n\tthis.angle=0;\n\tthis.midX = this.x + this.width / 2;\n\tthis.midY = this.y + this.height / 2;\n\tthis.source = source;\n\tthis.drop=drop; \n\tthis.timer=2000;\n\t\n\tthis.potions= new Array();\n\tthis.plant = 0;\n\tthis.teeth = 0;\n\tthis.eye = 0;\n\tthis.choc = 0;\n\t\n\tthis.Draw = function(context){\n\t\tcontext.drawImage(this.source, this.midX, this.midY, this.width, this.height);\n\t}\n}", "function Rect(x, y, w, h) {\n this.x = x;\n this.y = y;\n this.width = w;\n this.height = h;\n}", "init() {\n this.x = 200;\n this.y = 410; \n }", "constructor(numWide, numHigh, startx, starty, endx, endy) {\r\n this.numSqWide = numWide;\r\n this.numSqHigh = numHigh;\r\n this.width = endx - startx;\r\n this.height = endy - starty;\r\n this.squarewidth = this.width / this.squares_wide;\r\n this.squareheight = this.width / this.squares_high;\r\n\r\n this.objects = []; // to hold all objects that are playing on this board\r\n //this.settings = this will hold the settings for the various games, Snake will hold speed, controls? , wa\r\n }", "function Rect(x, y, w, h) {\n this.x = x; this.y = y;\n this.w = w; this.h = h;\n}", "function foodInfo(x, y){\n this.left = x - foodR;\n this.right = x + foodR;\n this.top = y - foodR;\n this.bottom = y + foodR;\n this.x = x;\n this.y = y;\n}", "function Bird(init_x, init_y, size_w) {\n this.x = init_x;\n this.y = init_y;\n this.w = size_w;\n this.h = size_w;\n\n\n}", "_getNonTransformedDimensions() {\n // Object dimensions\n return new fabric.Point(this.width, this.height).scalarAdd(\n this.padding + boundingBoxPadding\n )\n }", "function Rectangle2D(settings){var _this=this;// Avoid checking every time if the object exists\nif(settings==null){settings={};}_this=_super.call(this,settings)||this;if(settings.size!=null){_this.size=settings.size;}else if(settings.width||settings.height){var size=new BABYLON.Size(settings.width,settings.height);_this.size=size;}//let size = settings.size || (new Size((settings.width === null) ? null : (settings.width || 10), (settings.height === null) ? null : (settings.height || 10)));\nvar roundRadius=settings.roundRadius==null?0:settings.roundRadius;var borderThickness=settings.borderThickness==null?1:settings.borderThickness;//this.size = size;\n_this.roundRadius=roundRadius;_this.borderThickness=borderThickness;return _this;}", "function LineShape(x, y, length, isHorizontal)\r\n{\r\n this.X = x; this.Y = y; this.Length = length; this.IsHorizontal = isHorizontal; \r\n}", "function constrain(obj) {\n if (obj.x < 0) {\n obj.x = 0;\n //the five comes from the border width\n } else if (obj.x > windowX - obj.diameter - 5) {\n obj.x = windowX - obj.diameter - 5;\n }\n if (obj.y < 0) {\n obj.y = 0;\n } else if (obj.y > windowY - obj.diameter - 5) {\n obj.y = windowY - obj.diameter - 5;\n }\n}", "function Rectangle(a, b) {\r\n this.length=a\r\n this.width=b\r\n this. perimeter=2*(a+b)\r\n this.area=a*b\r\n \r\n}", "function drawRectangle(value) {\n var width = value.width;\n var length = value.length;\n}", "function box(x,y,width,height){\n this.x = x;\n this.y = y;\n this.width = width;\n this.height = height;\n}", "function BoundingBoxRect() { }", "get localBounds() {\n return {\n x: this.x, //I changed this, it was \"x: 0,\"\n y: this.y, //I changed this, it was \"y: 0,\"\n width: this.width,\n height: this.height\n } \n }", "constructor(x, y) {\n this.SPACING = 150;\n this.WIDTH = 50;\n \n this.x = x;\n this.y = y;\n this.top = y;\n this.bottom = this.top + this.SPACING;\n this.hitBird = false;\n this.colorClosest = false;\n }", "function RectangleUpdater( x_func = object => object.x\n , y_func = object => object.y\n , width_func = object => object.width\n , height_func = object => object.height\n ){\n return function(rectangle_object){\n rectangle_object.x = x_func(rectangle_object);\n rectangle_object.y = y_func(rectangle_object);\n rectangle_object.width = width_func(rectangle_object);\n rectangle_object.height = height_func(rectangle_object);\n return rectangle_object;\n };\n}", "setSize() {\n this.size.D1 = this.shape.D1*this.unit.X;\n this.size.D2 = this.shape.D2*this.unit.Y;\n }", "constrain(x, y, scale) {\n scale || (scale = this.state.scale);\n\n if (this.state.size.width * scale > this.props.width) {\n minX = (this.state.size.width * scale - this.props.width) * -1;\n maxX = 0;\n } else {\n minX = 0;\n maxX = this.props.width - this.state.size.width * scale;\n }\n\n if (this.state.size.height * scale > this.props.height) {\n minY = (this.state.size.height * scale - this.props.height) * -1;\n maxY = 0;\n } else {\n minY = 0;\n maxY = this.props.height - this.state.size.height * scale;\n }\n\n x = Math.max(x, minX);\n x = Math.min(x, maxX);\n\n y = Math.max(y, minY);\n y = Math.min(y, maxY);\n\n return {\n x: x,\n y: y\n };\n }", "function shape(){\n constructor(){\n this.height='13CM';\n this.length='12CM';\n this.area='256CM2';\n } \n shape.getteArea.function()={\n return area;\n }\n \n}", "function Rectangle(length, width) {\n\tthis.length = length;\n\tthis.width = width;\n}", "drawVariables(x, y , w, h) {\n this.x = x;\n this.y = y;\n this.w = w;\n this.h = h;\n }", "_objectEventListener() {\r\n // CLASS REFERENCE\r\n let that = this;\r\n\r\n let x = this.attribute.getXAttribute();\r\n let y = this.attribute.getYAttribute();\r\n let width = this.attribute.getWidthAttribute();\r\n let height = this.attribute.getHeightAttribute();\r\n let angle = this.attribute.getAngleAttribute();\r\n let opacity = this.attribute.getOpacityAttribute();\r\n\r\n x.on('change', function () {\r\n let value = d3.select(this).property('value');\r\n let string = d3.select('.active[data-map-object]').style('transform')\r\n let numbers = string.match(/[+-]?\\d+/g).map(Number);\r\n let xValue = numbers[4], yValue = numbers[5];\r\n d3.select('.active[data-map-object]').attr('transform', `translate(${value},${yValue})`)\r\n // console.log(\"x and y: \",xValue,typeof xValue,\" | \",yValue,typeof yValue);\r\n })\r\n\r\n y.on('change', function () {\r\n let value = d3.select(this).property('value');\r\n let string = d3.select('.active[data-map-object]').style('transform')\r\n let numbers = string.match(/[+-]?\\d+/g).map(Number);\r\n let xValue = numbers[4], yValue = numbers[5];\r\n d3.select('.active[data-map-object]').attr('transform', `translate(${xValue},${value})`)\r\n // console.log(string, numbers, \"x and y: \", xValue, typeof xValue, \" | \", yValue, typeof yValue, `translate(${xValue},${value})`);\r\n })\r\n\r\n opacity.on('change', function () {\r\n let value = d3.select(this).property('value');\r\n d3.select('.range-value').text(value);\r\n\r\n d3.select('.svg-object.active[data-object]').style('opacity', value);\r\n })\r\n\r\n }", "function Rectangle(rect, idCC, idLine){\n this.rect = rect;\n this.idCC = idCC;\n this.idLine = idLine;\n this.visible = true;\n this.selected = false;\n this.labeled = false;\n this.hover = false;\n}", "constructor(element) {\n this.element = element;\n const rect = this.boundingRect;\n this.width = rect.width;\n this.height = rect.height;\n this.size = Math.max(this.width, this.height);\n }", "function Rect( x,y,w,h ) {\n\n this.x = x;\n this.y = y;\n this.w = w;\n this.h = h;\n\n }", "function setPropertiesToObject() {\n let name = document.getElementById('name')\n let width = document.getElementById('width')\n let height = document.getElementById('height')\n let stroke = document.getElementById('stroke')\n let fill = document.getElementById('fill')\n let transform = document.getElementById('transform')\n let rotate = document.getElementById('rotate')\n let scale = document.getElementById('scale')\n\n if (objectSelected > -1) {\n if (objects[objectSelected].type === 'box') {\n objects[objectSelected].name = name.value\n objects[objectSelected].width = parseInt(width.value)\n objects[objectSelected].height = parseInt(height.value)\n objects[objectSelected].stroke = stroke.value\n objects[objectSelected].fill = fill.value\n objects[objectSelected].angleRotation = parseInt(rotate.value)\n Math.setTranslate(objects[objectSelected], parseFloat(transform.value.split(',')[0]), parseFloat(transform.value.split(',')[1]))\n Math.setRotate(objects[objectSelected], rotate.value)\n Math.setScale(objects[objectSelected], parseFloat(scale.value.split(',')[0]), parseFloat(scale.value.split(',')[1]))\n } else if (objects[objectSelected].type === 'circle') {\n objects[objectSelected].name = name.value\n objects[objectSelected].stroke = stroke.value\n objects[objectSelected].fill = fill.value\n objects[objectSelected].angleRotation = parseInt(rotate.value)\n Math.setTranslate(objects[objectSelected], parseFloat(transform.value.split(',')[0]), parseFloat(transform.value.split(',')[1]))\n Math.setRotate(objects[objectSelected], rotate.value)\n Math.setScale(objects[objectSelected], parseFloat(scale.value.split(',')[0]), parseFloat(scale.value.split(',')[1]))\n }\n }\n init()\n drawObjects()\n }", "function getBox(o) {\n return {\n xMin: o.position.x,\n xMax: o.position.x + o.width,\n yMin: o.position.y,\n yMax: o.position.y + o.height\n };\n }", "function rect(x,y,w,h){\r\n var rect = {\r\n filly:ctx.fillRect(x,y,w,h),\r\n stroky:ctx.strokeRect(x,y,w,h)\r\n };\r\n return rect;\r\n}", "get values() {\n return {\n x: this.x,\n y: this.y,\n scaleX: this.scaleX,\n scaleY: this.scaleY,\n rotation: this.rotation,\n opacity: this.opacity\n };\n }", "function Rect (x1, y1, x2, y2) {\n \n \n this.left = x1;\n this.right = x2;\n this.top = y1;\n this.bottom = y2;\n}", "constructor(w,h) {\n this.width = w;\n this.height = h;\n this.x = 0;\n this.vx = 1;\n this.speed = 10;\n this.y = height - this.height/2;\n }", "getObjectRelativePosition(id) {\n\n\t\tlet sceneWidth = this.#_augmentaScene.scene.x;\n\t\tlet sceneHeight = this.#_augmentaScene.scene.y;\n\n\t\tlet posX = this.#_augmentaObjects[id].centroid.x / sceneWidth + 0.5;\n\t\tlet posY = this.#_augmentaObjects[id].centroid.y / sceneHeight + 0.5;\n\n\t\treturn (posX,posY);\n\t}", "makeShape(){\n rect(this.x, this.y, this.w, this.w);\n }", "function Rectangle(height, width) {\n this.height = height;\n this.width = width;\n this.calcArea = function() {\n return this.height * this.width;\n };\n this.height = height;\n this.width = width;\n this.calcPerimeter = function() {\n return 2 * (this.height +this.width);\n };\n\n}", "constructor(x,y,w,h,clr){\n this.x = x;\n this.y = y;\n this.w = w;\n this.h = h;\n this.clr = clr;\n}", "constructor(x, y, w, h, angle) {\n super(createVector(x + w / 2, y + h / 2));\n this.x = x;\n this.y = y;\n this.w = w;\n this.h = h;\n this.angle = angle;\n\n this.pixelVectorPositions = [];\n this.calculateVectorsAndSetShape();//calculates the corners based on the x,y,w,h and angle\n this.fixtureType = \"rectangle\";\n\n }", "setSize(_width, _height) {\n const _argLen = arguments.length;\n // Using width and height:\n if (_argLen === 2) {\n }\n // Using a point:\n else if (_argLen === 1 && _width.hasAncestor && _width.hasAncestor(HPoint)) {\n const _point = _width;\n _width = _point.x;\n _height = _point.y;\n }\n // From a rect:\n else if (_argLen === 1 && _width.hasAncestor && _width.hasAncestor(HRect)) {\n const _rect = _width;\n _width = _rect.width;\n _height = _rect.height;\n }\n this.right = this.left + _width;\n this.bottom = this.top + _height;\n this.updateSecondaryValues();\n return this;\n }", "constructor(pos) {\n this.pos = pos;\n this.width = 32;\n this.height = 32;\n this.type = 'Banana';\n }", "function getBox(o) {\n return {\n xMin: o.position.x,\n xMax: o.position.x + o.width,\n yMin: o.position.y,\n yMax: o.position.y + o.height\n };\n }" ]
[ "0.6228857", "0.61937153", "0.61926013", "0.61665106", "0.61344993", "0.6131567", "0.6123765", "0.6071952", "0.604115", "0.6017006", "0.5995639", "0.5983979", "0.5977931", "0.5955038", "0.59372693", "0.59342206", "0.5928847", "0.589736", "0.58938646", "0.58667487", "0.58385235", "0.5830866", "0.5830662", "0.5828784", "0.5828784", "0.5828784", "0.5813428", "0.58116055", "0.5794995", "0.5788007", "0.57862157", "0.57861376", "0.5780414", "0.5775146", "0.57632774", "0.5762337", "0.5761201", "0.57498527", "0.57356477", "0.5717678", "0.57158047", "0.5693132", "0.56856495", "0.56845665", "0.5679483", "0.56513727", "0.56433165", "0.56433165", "0.56194675", "0.5619323", "0.5613712", "0.56130886", "0.56127393", "0.5601908", "0.5590805", "0.558665", "0.5578399", "0.55575866", "0.5533241", "0.5519945", "0.5518825", "0.5518054", "0.55174595", "0.5494119", "0.5491028", "0.5487161", "0.5485702", "0.5478488", "0.54779", "0.54775524", "0.54724693", "0.5463303", "0.54523456", "0.54497683", "0.54494786", "0.5448605", "0.54368937", "0.5432051", "0.54314274", "0.5430814", "0.54117364", "0.5403723", "0.5403166", "0.5401197", "0.5386665", "0.53860885", "0.5383408", "0.53806573", "0.5380345", "0.53787094", "0.5376212", "0.5371045", "0.5368101", "0.5366323", "0.53659946", "0.53656596", "0.53629965", "0.5362155", "0.5360511", "0.535865", "0.53543806" ]
0.0
-1
hex to txt nick name
function hex2txt(hex) { try {return decodeURIComponent(hex.replace(/(..)/g,'%$1'));} catch (e) {return "";} }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function format(nick) {\r\n\treturn nick.substr(0, 1).toString().toUpperCase() + nick.substr(1);\r\n}", "function readUid(){\n checkLen(16);\n var res = hexBlock(0, 4, true) + '-' + hexBlock(4, 2, true) + '-' + hexBlock(6, 2, true) + '-' + hexBlock(8, 2) + '-' + hexBlock(10, 6);\n pos += 16;\n return res;\n }", "function getUsernameColor (username) {\n // Compute hash code\n var hash = 7;\n for (var i = 0; i < username.length; i++) {\n hash = username.charCodeAt(i) + (hash << 5) - hash;\n }\n // Calculate color\n var index = Math.abs(hash % TEXTCOLORS.length);\n return TEXTCOLORS[index];\n }", "function newNick(message) {\n let newName = message.content.substr(6).toString()\n message.member.setNickname(newName)\n .catch(console.error)\n console.log(newName)\n message.reply(\"love the new look, \" + message.member.nickname)\n}", "function getFullUserName(nick, user, host) {\n return nick + \"!\" + user + \"@\" + host;\n }", "getNick() {\n if (this.isLoggedIn()) {\n let token = this.getIdToken();\n let decoded = decode(token);\n\n if (decoded.nick !== \"undefined\") {\n return decoded.nick;\n }\n }\n return false;\n }", "function _hex(n) {\n var str = n.toString(16).toUpperCase();\n return str.length == 2 ? str : '0' + str;\n}", "function getUsernameColor(){\n\t\tvar colore;\n\t\tvar nmCasuale = function (){\n\t\t\tvar j = Math.floor( Math.random() * 255);\n\t\t\treturn j;\n\t\t}\n\t\tcolore = \"rgb(\"+nmCasuale()+\",\" +nmCasuale()+ \",\" +nmCasuale()+\")\";\n\t\treturn colore;\n\t}", "function hex2string(hexx) {\n var str = '';\n for (var i = 0; i < hexx.length; i++)\n str += String.fromCharCode(hexx[i], 10)[0];\n return str;\n}", "function getUsernameColor (username) {\n // Compute hash code\n var hash = 7;\n for (var i = 0; i < username.length; i++) {\n hash = username.charCodeAt(i) + (hash << 5) - hash;\n }\n // Calculate color\n var index = Math.abs(hash % COLORS.length);\n return COLORS[index];\n }", "function getUsernameColor (username) {\n // Compute hash code\n var hash = 7;\n for (var i = 0; i < username.length; i++) {\n hash = username.charCodeAt(i) + (hash << 5) - hash;\n }\n // Calculate color\n var index = Math.abs(hash % COLORS.length);\n return COLORS[index];\n }", "function getUsernameColor (username) {\n // Compute hash code\n var hash = 7;\n for (var i = 0; i < username.length; i++) {\n hash = username.charCodeAt(i) + (hash << 5) - hash;\n }\n // Calculate color\n var index = Math.abs(hash % COLORS.length);\n return COLORS[index];\n }", "function getUsernameColor (username) {\n // Compute hash code\n var hash = 7;\n for (var i = 0; i < username.length; i++) {\n hash = username.charCodeAt(i) + (hash << 5) - hash;\n }\n // Calculate color\n var index = Math.abs(hash % COLORS.length);\n return COLORS[index];\n }", "function getUsernameColor (username) {\n // Compute hash code\n var hash = 7;\n for (var i = 0; i < username.length; i++) {\n hash = username.charCodeAt(i) + (hash << 5) - hash;\n }\n // Calculate color\n var index = Math.abs(hash % COLORS.length);\n return COLORS[index];\n }", "function getUsernameColor (username) {\n // Compute hash code\n var hash = 7;\n for (var i = 0; i < username.length; i++) {\n hash = username.charCodeAt(i) + (hash << 5) - hash;\n }\n // Calculate color\n var index = Math.abs(hash % COLORS.length);\n return COLORS[index];\n }", "function getUsernameColor (username) {\n // Compute hash code\n var hash = 7\n for (var i = 0; i < username.length; i++) {\n hash = username.charCodeAt(i) + (hash << 5) - hash\n }\n // Calculate color\n var index = Math.abs(hash % COLORS.length)\n return COLORS[index]\n }", "function tohex(n, npos) {\n if (n < 0) {\n n = 0xFFFFFFFF + n + 1;\n }\n return (\"00000000\" + n.toString(16).toUpperCase()).substr(-npos);\n }", "set nickName (value) {\n this._nickName = value\n /**\n * @event IrcUser#nickName\n */\n this.emit('nickName')\n }", "byte2Hex(n) {\r\n const nybHexString = '0123456789ABCDEF';\r\n return String(nybHexString.substr((n >> 4) & 0x0F,1)) + nybHexString.substr(n & 0x0F,1);\r\n }", "function getUsernameColor (username) {\n\t// Compute hash code\n\tvar hash = 7;\n\tfor (var i = 0; i < username.length; i++) {\n\t\thash = username.charCodeAt(i) + (hash << 5) - hash;\n\t}\n\t// Calculate color\n\tvar index = Math.abs(hash % COLORS.length);\n\treturn COLORS[index];\n}", "function getUsernameColor(username) {\n // Compute hash code\n var hash = 7\n for (var i = 0; i < username.length; i++) {\n hash = username.charCodeAt(i) + (hash << 5) - hash\n }\n // Calculate color\n var index = Math.abs(hash % COLORS.length)\n return COLORS[index]\n}", "function changeNickname() {\n userLog.name = command[1]; // je change le nickname de l'utilisateur\n }", "function getUsernameColor (username) {\r\n // Compute hash code\r\n var hash = 7;\r\n for (var i = 0; i < username.length; i++) {\r\n hash = username.charCodeAt(i) + (hash << 5) - hash;\r\n }\r\n // Calculate color\r\n var index = Math.abs(hash % COLORS.length);\r\n return COLORS[index];\r\n}", "function getNick() {\n var nick = document.getElementById('nick').value;\n window.localStorage.setItem('nick', nick);\n }", "function in_hex() {\n let backend = entrada_selecionada();\n let s = NaN;\n do {\n s = parseInt(prompt(\"Insira uma word de quatro nibbles como 00A0 ou F0DA.\",\n \"0000\"), 16);\n } while (isNaN(s));\n backend.inserir(s);\n update_entrada();\n}", "function getUsernameColor (username) {\n // Compute hash code\n var hash = 7;\n for (var i = 0; i < username.length; i++) {\n hash = username.charCodeAt(i) + (hash << 5) - hash;\n }\n // Calculate color\n var index = Math.abs(hash % COLORS.length);\n return COLORS[index];\n }", "function getNicknameColor() {\n var index = Math.floor(Math.random()*nickColors.length);\n\n return nickColors[index];\n }", "function getUsernameColor(username) {\n // Compute hash code\n var hash = 7;\n for (var i = 0; i < username.length; i++) {\n hash = username.charCodeAt(i) + (hash << 5) - hash;\n }\n // Calculate color\n var index = Math.abs(hash % COLORS.length);\n return COLORS[index];\n }", "function getUsernameColor(username) {\n // Compute hash code\n var hash = 7;\n for (var i = 0; i < username.length; i++) {\n hash = username.charCodeAt(i) + (hash << 5) - hash;\n }\n // Calculate color\n var index = Math.abs(hash % COLORS.length);\n return COLORS[index];\n }", "hexString() {\n let uintArr = new Uint8Array(this.buf);\n let out = \"\";\n for (let byte of uintArr) {\n out += ('0' + byte.toString(16)).slice(-2) + \" \";\n }\n return out;\n }", "function randomUsername() {\n var size = randomNumber(1, 16); // Min. username size is 1, Max. username size is 16\n var username = '';\n var possible = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789!@$&_.';\n\n for (var i = 0; i < size; i++)\n username += possible.charAt(Math.floor(Math.random() * possible.length));\n\n return username;\n}", "function getUsernameColor (username) {\n\t\t\t// Compute hash code\n\t\t\tvar hash = 7;\n\t\t\tfor (var i = 0; i < username.length; i++) {\n\t\t\t\thash = username.charCodeAt(i) + (hash << 5) - hash;\n\t\t\t}\n\t\t\t// Calculate color\n\t\t\tvar index = Math.abs(hash % COLORS.length);\n\t\t\treturn COLORS[index];\n\t\t}", "function formatSocialUsername() {\n return randtoken.generate(10);\n}", "function __hex($num) {\r\nvar str = \"\";\r\nfor(var j = 7; j >= 0; j--)\r\nstr += _chars.charAt(($num >> (j * 4)) & 0x0F);\r\nreturn str;\r\n}", "function byte2Hex(n) {\n var nybHexString = \"0123456789ABCDEF\";\n return String(nybHexString.substr((n >> 4) & 0x0F,1)) + nybHexString.substr(n & 0x0F,1);\n }", "function safeUsername() {\n return os.userInfo().username.replace(/[^\\w+=,.@-]/g, '@');\n}", "function setNick() {\r\n $('#txt')\r\n .prop('disabled', '')\r\n .attr('placeholder', 'Ange chattnamn...')\r\n .focus()\r\n .keyup(function(event){\r\n var txt = $('#txt').val();\r\n if(event.keyCode === 13 && txt !== ''){\r\n wsSend('nick:' + txt);\r\n disableWriting();\r\n }\r\n });\r\n }", "static text_id(board_data) {\n // simulate v3 URL to provide a text identifier\n return `/${board_data.owner.username}/` +\n board_data.name.toLowerCase().replaceAll(' ', '-') + '/';\n }", "function GenerateAccountWithMnemonic(n) {\n // Create a RED node\n RED.nodes.createNode(this,n);\n\n // copy \"this\" object in case we need it in context of callbacks of other functions.\n var node = this;\n // create a msg object\n var msg = {};\n\n // when an input is recieved\n this.on('input', function (msg) {\n var mnemonic;\n //get set mnemonic and check it is at least 24 words long\n if (this.credentials.mnemonic != null){\n if (this.credentials.mnemonic.match(/^\\s*\\S+(?:\\s+\\S+){23,}\\s*$/gm))\n mnemonic = this.credentials.mnemonic;\n else {\n node.error(\"Mnemonic is not 24 words or more\");\n return;\n }\n }\n\n try {\n XRPLib.generateAccountWithMnemonic(mnemonic).then((response) => {\n msg.payload = response;\n this.send(msg);\n });\n\n } catch (error) {\n node.error(error);\n return;\n }\n });\n\n this.on(\"close\", function() {\n // Called when the node is shutdown - eg on redeploy.\n // Allows ports to be closed, connections dropped etc.\n // eg: node.client.disconnect();\n });\n }", "toHexString(allow3Char = false) {\n return '#' + this.toHex(allow3Char);\n }", "function setNick(nick, room) {\n let nickOcurrences = room._nickOcurrences;\n let actualNick = nick;\n\n let n = nickOcurrences[nick];\n if(!n || n <= 0) n = 1;\n else {\n n++;\n actualNick = nick+'#'+n;\n }\n\n nickOcurrences[nick] = n;\n\n room.players.push(actualNick);\n\n return actualNick;\n}", "function SJOIN_Nick(str) {\n\tif (!str)\n\t\treturn 0;\n\n\tthis.isop = false;\n\tthis.isvoice = false;\n\tif (str[0] == \"@\") {\n\t\tthis.isop = true;\n\t\tstr = str.slice(1);\n\t}\n\tif (str[0] == \"+\") {\n\t\tthis.isvoice = true;\n\t\tstr = str.slice(1);\n\t}\n\tthis.nick = str;\n}", "function randomNickname() {\n var name = names[(Math.random() * names.length) | 0];\n return name + '_' + (1980 + ((Math.random() * 30) | 0));\n}", "function frameFromUsername(username, maxFrame) {\n\tlet checksum = username.split(\"\").reduce(function(a,b){a=((a<<5)-a)+b.charCodeAt(0);return a&a},0);\n\treturn Math.abs(checksum % maxFrame);\n}", "function genUser() {\n\tvar text = \"\";\n var possible = \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789\";\n var name = [];\n for(var i = 0; i < (Math.ceil(Math.random()*6) + 4); i++)\n \tname.push(possible.charAt(Math.floor(Math.random() * possible.length)));\n\n\treturn name.join('');\n}", "getName() {\n let name = this.getDeviceName(); // SHRGBW2#1234#1\n let ip = this.getIP(); // 192.168.11.1\n let deviceid = this.getDeviceId(); // shellyplug-s-12345\n let id = this.getId(); // shellyplug-s-12345\n return ip + ' (' + deviceid + ' / ' + id + ' / ' + name + ')';\n }", "function getUsernameColor(userName) {\n // Compute hash code\n var hash = 7;\n for (var i = 0; i < userName.length; i++) {\n hash = userName.charCodeAt(i) + (hash << 5) - hash;\n }\n // Calculate color\n var index = Math.abs(hash % COLORS.length);\n return COLORS[index];\n}", "function maskify2(cc) {\n var maskedString = \"\";\n for(var i = 0; i < cc.length; i++) {\n if(i < cc.length - 4) {\n maskedString = maskedString + \"#\";\n } else {\n maskedString = maskedString + cc.charAt(i);\n console.log(\"char\",cc.charAt(i))\n };\n }\n return maskedString;\n}", "function toHex(nbr, len) {\n return (\"0\"+(Number(nbr).toString(16))).slice(-len).toUpperCase()\n}", "static getAHexCharacter() {\n const characters = [\n '0', '1', '2', '3',\n '4', '5', '6', '7',\n '8', '9', 'A', 'B',\n 'C', 'D', 'E', 'F',\n ];\n\n const randomNumber = this.generateRandomNumber(characters.length);\n\n return characters[randomNumber];\n }", "function maskify(cc) {\n var lastLetters = cc.slice(-4);\n var replaced = cc.replace(/./g, \"#\").substring(0, cc.length - 4);\n var encryptedWord = replaced + lastLetters;\n \n return encryptedWord;\n}", "function maskify3(cc) {\n let masked = '';\n for (let i = 0; i < cc.length; i++) {\n const letter = cc[i];\n if (i < cc.length - 4) {\n masked += '#';\n } else {\n masked += letter;;\n }\n } \n return masked;\n}", "function formatHex(t) { //char\n // not compatible with GWT...\n // return String.format(\"\\\\u%04x\", (int)t);\n var sb = '';\n sb += '\\\\u';\n var s = t.charCodeAt(0).toString(16);\n for (var i = s.length; i < 4; i++) {\n sb += '0';\n }\n sb += s;\n return sb;\n }", "function binaryNibbleToAsciiHexDigit(nibble) {\r\n var charCode;\r\n var str = \"\";\r\n\r\n if ((nibble >= 0) && (nibble <= 9)) {\r\n charCode = (\"0\".charCodeAt(0)) + nibble;\r\n str += String.fromCharCode(charCode);\r\n }\r\n else if ((nibble >= 10) && (nibble <= 15)) {\r\n charCode = (\"A\".charCodeAt(0)) + (nibble - 10);\r\n str += String.fromCharCode(charCode);\r\n }\r\n \r\n return str;\r\n}", "function maskify(cc) {\n d=cc.split('')\n for(i=0;i<d.length-4;i++){d[i]='#'}\n return d.join('')\n }", "function randomHex() {\r\n let out = \"#\";\r\n const hexLetters = \"0123456789abcdef\"\r\n\r\n for(i = 0;i < 6;i++) {\r\n // chooses one random letter 6 times\r\n out += hexLetters[util.randInt(hexLetters.length)]\r\n }\r\n\r\n return out;\r\n}", "function maskify (cc) {\n cc = cc.split('')\n for (let i = 0; i < cc.length - 4; i++) {\n cc[i] = '#'\n }\n cc = cc.join('')\n return cc\n}", "function makeHex(n) {\n let hex_chr = '0123456789ABCDEF'.split('');\n let s = '';\n for (let index = 0; index < 4; index++)\n s += hex_chr[(n >> (index * 8 + 4)) & 0x0F]\n + hex_chr[(n >> (index * 8)) & 0x0F];\n return s;\n}", "function maskify(cc) {\n cc = cc.split('');\n let result = '';\n for(let num = 0; num < cc.length; num++){\n if(num <= cc.length - 5){\n result += '#';\n }\n else{\n result += cc[num];\n }\n }\n return result;\n}", "function writeNameNE() {\n\t\tvar namesp = document.createElement(\"span\");\n\t\tnamesp.setAttribute(\"id\", this.id + \"name\");\n\t\tvar elem = document.getElementById(this.id).appendChild(namesp);\n\t\telem.style.position = \"absolute\";\n\t\tif (this.nameLocation == NAME_UP) {\n\t\t\telem.style.top = 0;\n\t\t\telem.style.paddingTop = \"1px\";\n\t\t} else if (this.nameLocation == NAME_DOWN) {\n\t\t\telem.style.top = this.height - 20;\n\t\t\telem.style.paddingTop = \"7px\";\n\t\t} else if (this.nameLocation == NAME_CENTER) {\n\t\t\telem.style.top = this.height / 2 - 10;\n\t\t\telem.style.paddingTop = \"5px\";\n\t\t}\n\t\telem.style.left = 0;\n\t\telem.style.width = this.width;\n\t\telem.style.height = 20;\n\t\telem.style.zIndex = 7;\n\t\telem.style.cursor = \"move\";\n\t\telem.style.color = this.textColor;\n\t\telem.style.textAlign = \"center\";\n\t\telem.style.fontFamily = \"Arial\";\n\t\telem.style.fontSize = \"10px\";\n\t\telem.innerText = this.name;\n\t\telem.parentObj = this;\n\t}", "function saveemoji(txt,no,type){\n\n\tvar base64Data = txt.replace(/^data:image\\/png;base64,/, \"\");\n\tvar\tbinaryData = new Buffer(base64Data, 'base64');\n\n\tfs.writeFileSync(path+type+no+\".png\", binaryData, 'base64', function(err) {\n\t \t console.log(err);\n\t});\n\treturn (path+type+no+\".png\")\n}", "function maskify(cc) {\n var maskedString = \"\";\n for(var i = 0; i < cc.length; i++) {\n if(i < cc.length - 4) {\n maskedString = maskedString + \"#\";\n } else {\n maskedString = maskedString + cc.charAt(i);\n };\n }\n return maskedString;\n }", "function goodbyePrefix(id) {\n\treturn \"0x\" + id.toString(16);\n}", "function getRandomUsername() {\r\n const vowels = \"aeiou\";\r\n const consonants = \"bcdfghjklmnpqrstvwxyz\";\r\n const name = \" \".repeat(randomBetween(3,6)).split(\"\");\r\n return name.map((c, i) => {\r\n if(i % 2 === 1) {\r\n return consonants[randomBetween(0, consonants.length-1)];\r\n }\r\n else {\r\n return vowels[randomBetween(0, vowels.length-1)];\r\n }\r\n }).join(\"\");\r\n }", "function hexaEncode(s) {\r\n var result = \"\";\r\n var sl = s.length;\r\n var i = 0;\r\n while (i < sl) {\r\n result += digitToHex(s.charCodeAt(i));\r\n i++;\r\n }\r\n return result;\r\n}", "function addr2hex( addr ) {\n return num2hex((addr>>8)&0xff)+num2hex(addr&0xff);\n}", "get nickName () {\n return this._nickName\n }", "function maskify(cc) {\n return cc.slice(0, -4).replace(/./g, '#') + cc.slice(-4);\n}", "assignGuestName (socket, guestNumber, nickNames, namesUsed) {\n const name = `Guest_${guestNumber}`;\n nickNames[socket.id] = name;\n socket.emit('nameResult', {\n success: true,\n name\n });\n namesUsed.push(name);\n return guestNumber + 1;\n }", "function getSpeciesName(mon) {\n\t//name is everything before the last ' @'\n\tconst parts = mon.split(' @');\n\tconst namePart = parts.slice(0, parts.length - 1)\n\t\t.reduce((acc, x) => acc + x);\n\t//check for nickname\n\tif(namePart[namePart.length-1] === ')') {\n\t\t//after the last '(', before the ')' after that\n\t\tconst speciesParts = namePart.split('(');\n\t\treturn speciesParts[speciesParts.length-1].split(')')[0]\n\t}\n\treturn namePart;\n}", "function getName(source, charNumber) {\n source.screen += charNumber;\n }", "function generateNewUsername() {\n var text = \"\";\n var alphabet = \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz\";\n //for loop\n for(let i=0; i <10; i++)\n text += alphabet.charAt(Math.floor(Math.random() * alphabet.length));\n return text;\n }", "function byte2Hex(n) {\n var nybHexString = \"0123456789ABCDEF\";\n return String(nybHexString.substr((n >> 4) & 0x0F,1)) + nybHexString.substr(n & 0x0F,1);\n}", "function byte2Hex(n) {\n var nybHexString = \"0123456789ABCDEF\";\n return String(nybHexString.substr((n >> 4) & 0x0F,1)) + nybHexString.substr(n & 0x0F,1);\n}", "function addNick(obj){\n\t$('#msg').val($('#msg').val() + '[' + obj.innerText + ']');\n\t$('#msg').focus();\n}", "async function updateNickname(guild, coin) {\n const testdata = await fetch(`https://api.pancakeswap.info/api/tokens/${pancake}`).then(response => response.text()); // get data as raw\n let realdata = JSON.parse(testdata) // convert data to json\n mprice = (realdata['data']['price'] * multiplier).toFixed(5);\n return guild.me.setNickname(`$${mprice}`);\n}", "hexToString(dec) {\n\t\treturn \"#\" + (dec + Math.pow(16, 6)).toString(16).substr(-6);\n\t}", "function makeHex(){\n\tvar hax = ''; // define variable to collect values to be used as hexadecimal\n\tfor (var y = 0;y<6;y++){ // there are 6 values in a hexadecimal, so loop 6 times\n\t\tvar single = random(); // execute random function 6x to get random values\n\t\thax = hax + single; // collect the 6 values and turn into a single string\n\t}\n\treturn \"#\"+hax; // add a \"#\" symnbol to make it legit hexadecimal\n}", "function makeid()\n{\n\tvar text = \"\";\n\tvar possible = \"ABCDEF0123456789\";\n\tfor(var i=0;i<6;i++)\n\t\ttext += possible.charAt(Math.floor(Math.random() * possible.length));\n\treturn text;\n}", "function GenUsername(length) {\r\n var result = '';\r\n var characters = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789';\r\n var charactersLength = characters.length;\r\n for ( var i = 0; i < length; i++ ) {\r\n result += characters.charAt(Math.floor(Math.random() * charactersLength));\r\n }\r\n return result;\r\n }", "function maskify(cc) {\n cc = cc.split(\"\");\n for(var i = 0; i < cc.length - 4; i++){\n cc[i] = \"#\";\n}\n\ncc = cc.join(\"\");\nreturn cc\n}", "function index_string(index, elem) {\n\tvar str = \"\";\n\tif (index < 9) {\n\t\tstr = '[0' + (index+1) + ']' + elem.nickname;\n\t} else {\n\t\tstr = '[' + (index+1) + ']' + elem.nickname;\n\t}\n\treturn str;\n}", "function displaySecret( input_hex ) {\n const charset = _discordCrypt.__getBraille().splice( 16, 64 );\n let output = '';\n\n for ( let i = 0; i < parseInt( input_hex.length / 2 ); i++ )\n output += charset[ parseInt( input_hex.substr( i * 2, 2 ) ) & ( charset.length - 1 ) ];\n\n return output;\n }", "function setCardNicknames(cardSectionSelector, cardDigitsSelector, cardNameSelector) {\n const cardNames = document.querySelectorAll(cardSectionSelector);\n\n chrome.storage.sync.get(['cardData'], (result) => {\n const {cardData} = result;\n cardNames.forEach((card) => {\n const cardName = card.querySelector(cardNameSelector);\n\n const cardLastFour = card.querySelector(cardDigitsSelector).textContent;\n const cardLastFourHash = forge_sha256( formatCardDigits(cardLastFour) );\n \n const cardNickname = cardData[cardLastFourHash];\n\n if(cardNickname) {\n cardName.textContent = cardNickname;\n }\n\n })\n })\n\n}", "i2nam(k) {\n\treturn [\"a\", \"b\", \"c\", \"d\", \"e\", \"f\", \"g\", \"h\"][k >> 3] + ((k & 7) + 1);\n }", "static toSimpleHex(serverHex) {\n return serverHex.split(\"'\").join('').replace(/^(0x)/, '');\n }", "function setBasicName(bytes, name) {\n if (name === \"\") {\n // Pick anything.\n name = \"A\";\n }\n // Make a copy for modifying.\n const newName = new Uint8Array(bytes);\n if (newName[0] === exports.BASIC_TAPE_HEADER_BYTE &&\n newName[1] === exports.BASIC_TAPE_HEADER_BYTE &&\n newName[2] === exports.BASIC_TAPE_HEADER_BYTE &&\n newName.length > 3) {\n newName[3] = name.charCodeAt(0);\n }\n else if (newName[0] === exports.BASIC_HEADER_BYTE &&\n newName.length > 1) {\n newName[1] = name.charCodeAt(0);\n }\n return newName;\n}", "function qname(m)\r\n{\r\n\treturn \"\\x22\" + m + \"\\x22\";\r\n}", "function ascii_to_hex() {\r\n\tvar outResult = '';\r\n\tvar inValue = input.value;\r\n\tfor (var i = 0; i < inValue.length; i++) {\r\n\t\toutResult += inValue.charCodeAt(i).toString(16).toUpperCase();\r\n\t}\r\n\toutput.value = outResult;\r\n}", "toHex() {\n const value = this.value.toString(16).toUpperCase();\n return new Hex(`#${value}`);\n }", "function hex_sha1(s){\n\n return binb2hex(core_sha1(AlignSHA1(s)));\n\n }", "encodeLine(username, password) {\n username = username.substring(0, 255);\n password = password.substring(0, 255);\n return btoa(\"\\u0000\" + username + \"\\u0000\" + password); // base64 encode\n }", "function convertToHex(n) {\n return Number(n).toString(16);\n}", "function assignGuestName(socket, guestNumber, nickNames, namesUsed) {\n // Genera un nuovo guest name\n var name = 'Ospite_' + guestNumber;\n // Associa al nuovo nome l' ID della connessione\n nickNames[socket.id] = name;\n // Comunica all'utente il suo nome\n socket.emit('nameResult', {\n success : true,\n name : name\n });\n\n // Inserisci nella lista namesUsed il nuovo nome generato in maniera tale che non sia\n // più utilizzato\n\n namesUsed.push(name);\n // Incrementa la variabile guestNumber per generare un nuovo nome in futuro\n return guestNumber + 1;\n\n}", "function createtrackingid() {\n const possible = \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789\";\n var text = \"\";\n for(var i = 0; i < 16; i++) {\n text += possible.charAt(Math.floor(Math.random() *possible.length));\n }\n return text;\n }", "function fullHex(hex) {\n return hex.length == 4 ? ['#', hex.substring(1, 2), hex.substring(1, 2), hex.substring(2, 3), hex.substring(2, 3), hex.substring(3, 4), hex.substring(3, 4)].join('') : hex;\n }", "function characterId(name) {\n return name + \"-character\";\n}", "function hex(what)\n{\n // adjust negative numbers\n if (what < 0)\n what = 0xFFFFFFFF + what + 1;\n // convert to hexadecimal string\n var result = what.toString(16);\n // add leading zeros\n return ('0000000' + result).slice(-8);\n}", "function ctl(ch){return String.fromCharCode(ch.charCodeAt(0)-64);}", "toHexString(byteArray) {\n return byteArray.map(byte => {\n return ('0' + (byte & 0xFF).toString(16)).slice(-2);\n }).join('')\n }" ]
[ "0.62929416", "0.5909532", "0.5857183", "0.5844864", "0.5654054", "0.5618606", "0.5614762", "0.5571979", "0.5565805", "0.55225474", "0.55225474", "0.55225474", "0.55225474", "0.55225474", "0.55225474", "0.54763854", "0.54755914", "0.5473135", "0.54678863", "0.54677844", "0.54661393", "0.5449215", "0.5433053", "0.54273665", "0.5424569", "0.542321", "0.5421506", "0.5416621", "0.5416621", "0.5413877", "0.53874195", "0.53871006", "0.53849584", "0.53699046", "0.53476673", "0.5341322", "0.5338341", "0.5337858", "0.5331747", "0.53223056", "0.53174853", "0.53124535", "0.5292745", "0.5288664", "0.5287196", "0.52832055", "0.528121", "0.52636313", "0.52475584", "0.5245075", "0.5236412", "0.52347445", "0.5226893", "0.5226425", "0.52188784", "0.52128303", "0.5208109", "0.5199838", "0.5199081", "0.5168945", "0.5159052", "0.5155977", "0.5154067", "0.5153082", "0.51521695", "0.51519614", "0.5149853", "0.5147566", "0.51450664", "0.5142817", "0.51427805", "0.51421875", "0.5131911", "0.5131911", "0.51300824", "0.5124763", "0.5124401", "0.51219237", "0.5118607", "0.5113133", "0.51110566", "0.5092423", "0.50847185", "0.5082539", "0.5080117", "0.5076025", "0.50704324", "0.50685185", "0.5060193", "0.5057964", "0.5056067", "0.5055477", "0.5055377", "0.50533223", "0.5049202", "0.50471616", "0.504574", "0.50411475", "0.5039724", "0.5027925" ]
0.62971675
0