")[0],
+ Zb = wa.textContent !== k,
+ ac = /<.*?>/g,
+ Qa = l.util.throttle,
+ Ub = [],
+ x = Array.prototype,
+ dc = function (a) {
+ var b, c, d = l.settings,
+ e = h.map(d, function (a) {
+ return a.nTable
+ });
+ if (a) {
+ if (a.nTable && a.oApi) return [a];
+ if (a.nodeName && a.nodeName.toLowerCase() === "table") {
+ b = h.inArray(a, e);
+ return b !== -1 ? [d[b]] : null
+ }
+ if (a && typeof a.settings === "function") return a.settings().toArray();
+ typeof a === "string" ? c = h(a) : a instanceof h && (c = a)
+ } else return [];
+ if (c) return c.map(function () {
+ b = h.inArray(this, e);
+ return b !== -1 ? d[b] : null
+ }).toArray()
+ };
+ r = function (a, b) {
+ if (!(this instanceof r)) return new r(a, b);
+ var c = [],
+ d = function (a) {
+ (a = dc(a)) && c.push.apply(c, a)
+ };
+ if (Array.isArray(a))
+ for (var e = 0, f = a.length; e <
+ f; e++) d(a[e]);
+ else d(a);
+ this.context = ra(c);
+ b && h.merge(this, b);
+ this.selector = {
+ rows: null,
+ cols: null,
+ opts: null
+ };
+ r.extend(this, this, Ub)
+ };
+ l.Api = r;
+ h.extend(r.prototype, {
+ any: function () {
+ return this.count() !== 0
+ },
+ concat: x.concat,
+ context: [],
+ count: function () {
+ return this.flatten().length
+ },
+ each: function (a) {
+ for (var b = 0, c = this.length; b < c; b++) a.call(this, this[b], b, this);
+ return this
+ },
+ eq: function (a) {
+ var b = this.context;
+ return b.length > a ? new r(b[a], this[a]) : null
+ },
+ filter: function (a) {
+ var b = [];
+ if (x.filter) b = x.filter.call(this,
+ a, this);
+ else
+ for (var c = 0, d = this.length; c < d; c++) a.call(this, this[c], c, this) && b.push(this[c]);
+ return new r(this.context, b)
+ },
+ flatten: function () {
+ var a = [];
+ return new r(this.context, a.concat.apply(a, this.toArray()))
+ },
+ join: x.join,
+ indexOf: x.indexOf || function (a, b) {
+ for (var c = b || 0, d = this.length; c < d; c++)
+ if (this[c] === a) return c;
+ return -1
+ },
+ iterator: function (a, b, c, d) {
+ var e = [],
+ f, g, j, i, h, m = this.context,
+ l, o, u = this.selector;
+ if (typeof a === "string") {
+ d = c;
+ c = b;
+ b = a;
+ a = false
+ }
+ g = 0;
+ for (j = m.length; g < j; g++) {
+ var t = new r(m[g]);
+ if (b ===
+ "table") {
+ f = c.call(t, m[g], g);
+ f !== k && e.push(f)
+ } else if (b === "columns" || b === "rows") {
+ f = c.call(t, m[g], this[g], g);
+ f !== k && e.push(f)
+ } else if (b === "column" || b === "column-rows" || b === "row" || b === "cell") {
+ o = this[g];
+ b === "column-rows" && (l = Da(m[g], u.opts));
+ i = 0;
+ for (h = o.length; i < h; i++) {
+ f = o[i];
+ f = b === "cell" ? c.call(t, m[g], f.row, f.column, g, i) : c.call(t, m[g], f, g, i, l);
+ f !== k && e.push(f)
+ }
+ }
+ }
+ if (e.length || d) {
+ a = new r(m, a ? e.concat.apply([], e) : e);
+ b = a.selector;
+ b.rows = u.rows;
+ b.cols = u.cols;
+ b.opts = u.opts;
+ return a
+ }
+ return this
+ },
+ lastIndexOf: x.lastIndexOf ||
+ function (a, b) {
+ return this.indexOf.apply(this.toArray.reverse(), arguments)
+ },
+ length: 0,
+ map: function (a) {
+ var b = [];
+ if (x.map) b = x.map.call(this, a, this);
+ else
+ for (var c = 0, d = this.length; c < d; c++) b.push(a.call(this, this[c], c));
+ return new r(this.context, b)
+ },
+ pluck: function (a) {
+ return this.map(function (b) {
+ return b[a]
+ })
+ },
+ pop: x.pop,
+ push: x.push,
+ reduce: x.reduce || function (a, b) {
+ return jb(this, a, b, 0, this.length, 1)
+ },
+ reduceRight: x.reduceRight || function (a, b) {
+ return jb(this, a, b, this.length - 1, -1, -1)
+ },
+ reverse: x.reverse,
+ selector: null,
+ shift: x.shift,
+ slice: function () {
+ return new r(this.context, this)
+ },
+ sort: x.sort,
+ splice: x.splice,
+ toArray: function () {
+ return x.slice.call(this)
+ },
+ to$: function () {
+ return h(this)
+ },
+ toJQuery: function () {
+ return h(this)
+ },
+ unique: function () {
+ return new r(this.context, ra(this))
+ },
+ unshift: x.unshift
+ });
+ r.extend = function (a, b, c) {
+ if (c.length && b && (b instanceof r || b.__dt_wrapper)) {
+ var d, e, f, g = function (a, b, c) {
+ return function () {
+ var d = b.apply(a, arguments);
+ r.extend(d, d, c.methodExt);
+ return d
+ }
+ };
+ d = 0;
+ for (e = c.length; d < e; d++) {
+ f = c[d];
+ b[f.name] =
+ f.type === "function" ? g(a, f.val, f) : f.type === "object" ? {} : f.val;
+ b[f.name].__dt_wrapper = true;
+ r.extend(a, b[f.name], f.propExt)
+ }
+ }
+ };
+ r.register = o = function (a, b) {
+ if (Array.isArray(a))
+ for (var c = 0, d = a.length; c < d; c++) r.register(a[c], b);
+ else
+ for (var e = a.split("."), f = Ub, g, j, c = 0, d = e.length; c < d; c++) {
+ g = (j = e[c].indexOf("()") !== -1) ? e[c].replace("()", "") : e[c];
+ var i;
+ a: {
+ i = 0;
+ for (var k = f.length; i < k; i++)
+ if (f[i].name === g) {
+ i = f[i];
+ break a
+ } i = null
+ }
+ if (!i) {
+ i = {
+ name: g,
+ val: {},
+ methodExt: [],
+ propExt: [],
+ type: "object"
+ };
+ f.push(i)
+ }
+ if (c === d - 1) {
+ i.val =
+ b;
+ i.type = typeof b === "function" ? "function" : h.isPlainObject(b) ? "object" : "other"
+ } else f = j ? i.methodExt : i.propExt
+ }
+ };
+ r.registerPlural = u = function (a, b, c) {
+ r.register(a, c);
+ r.register(b, function () {
+ var a = c.apply(this, arguments);
+ return a === this ? this : a instanceof r ? a.length ? Array.isArray(a[0]) ? new r(a.context, a[0]) : a[0] : k : a
+ })
+ };
+ var Vb = function (a, b) {
+ if (Array.isArray(a)) return h.map(a, function (a) {
+ return Vb(a, b)
+ });
+ if (typeof a === "number") return [b[a]];
+ var c = h.map(b, function (a) {
+ return a.nTable
+ });
+ return h(c).filter(a).map(function () {
+ var a =
+ h.inArray(this, c);
+ return b[a]
+ }).toArray()
+ };
+ o("tables()", function (a) {
+ return a !== k && a !== null ? new r(Vb(a, this.context)) : this
+ });
+ o("table()", function (a) {
+ var a = this.tables(a),
+ b = a.context;
+ return b.length ? new r(b[0]) : a
+ });
+ u("tables().nodes()", "table().node()", function () {
+ return this.iterator("table", function (a) {
+ return a.nTable
+ }, 1)
+ });
+ u("tables().body()", "table().body()", function () {
+ return this.iterator("table", function (a) {
+ return a.nTBody
+ }, 1)
+ });
+ u("tables().header()", "table().header()", function () {
+ return this.iterator("table",
+ function (a) {
+ return a.nTHead
+ }, 1)
+ });
+ u("tables().footer()", "table().footer()", function () {
+ return this.iterator("table", function (a) {
+ return a.nTFoot
+ }, 1)
+ });
+ u("tables().containers()", "table().container()", function () {
+ return this.iterator("table", function (a) {
+ return a.nTableWrapper
+ }, 1)
+ });
+ o("draw()", function (a) {
+ return this.iterator("table", function (b) {
+ if (a === "page") P(b);
+ else {
+ typeof a === "string" && (a = a === "full-hold" ? false : true);
+ T(b, a === false)
+ }
+ })
+ });
+ o("page()", function (a) {
+ return a === k ? this.page.info().page : this.iterator("table",
+ function (b) {
+ Va(b, a)
+ })
+ });
+ o("page.info()", function () {
+ if (this.context.length === 0) return k;
+ var a = this.context[0],
+ b = a._iDisplayStart,
+ c = a.oFeatures.bPaginate ? a._iDisplayLength : -1,
+ d = a.fnRecordsDisplay(),
+ e = c === -1;
+ return {
+ page: e ? 0 : Math.floor(b / c),
+ pages: e ? 1 : Math.ceil(d / c),
+ start: b,
+ end: a.fnDisplayEnd(),
+ length: c,
+ recordsTotal: a.fnRecordsTotal(),
+ recordsDisplay: d,
+ serverSide: y(a) === "ssp"
+ }
+ });
+ o("page.len()", function (a) {
+ return a === k ? this.context.length !== 0 ? this.context[0]._iDisplayLength : k : this.iterator("table", function (b) {
+ Ta(b,
+ a)
+ })
+ });
+ var Wb = function (a, b, c) {
+ if (c) {
+ var d = new r(a);
+ d.one("draw", function () {
+ c(d.ajax.json())
+ })
+ }
+ if (y(a) == "ssp") T(a, b);
+ else {
+ D(a, true);
+ var e = a.jqXHR;
+ e && e.readyState !== 4 && e.abort();
+ ta(a, [], function (c) {
+ pa(a);
+ for (var c = ua(a, c), d = 0, e = c.length; d < e; d++) O(a, c[d]);
+ T(a, b);
+ D(a, false)
+ })
+ }
+ };
+ o("ajax.json()", function () {
+ var a = this.context;
+ if (a.length > 0) return a[0].json
+ });
+ o("ajax.params()", function () {
+ var a = this.context;
+ if (a.length > 0) return a[0].oAjaxData
+ });
+ o("ajax.reload()", function (a, b) {
+ return this.iterator("table",
+ function (c) {
+ Wb(c, b === false, a)
+ })
+ });
+ o("ajax.url()", function (a) {
+ var b = this.context;
+ if (a === k) {
+ if (b.length === 0) return k;
+ b = b[0];
+ return b.ajax ? h.isPlainObject(b.ajax) ? b.ajax.url : b.ajax : b.sAjaxSource
+ }
+ return this.iterator("table", function (b) {
+ h.isPlainObject(b.ajax) ? b.ajax.url = a : b.ajax = a
+ })
+ });
+ o("ajax.url().load()", function (a, b) {
+ return this.iterator("table", function (c) {
+ Wb(c, b === false, a)
+ })
+ });
+ var bb = function (a, b, c, d, e) {
+ var f = [],
+ g, j, i, h, m, l;
+ i = typeof b;
+ if (!b || i === "string" || i === "function" || b.length === k) b = [b];
+ i = 0;
+ for (h = b.length; i < h; i++) {
+ j = b[i] && b[i].split && !b[i].match(/[\[\(:]/) ? b[i].split(",") : [b[i]];
+ m = 0;
+ for (l = j.length; m < l; m++)(g = c(typeof j[m] === "string" ? j[m].trim() : j[m])) && g.length && (f = f.concat(g))
+ }
+ a = v.selector[a];
+ if (a.length) {
+ i = 0;
+ for (h = a.length; i < h; i++) f = a[i](d, e, f)
+ }
+ return ra(f)
+ },
+ cb = function (a) {
+ a || (a = {});
+ if (a.filter && a.search === k) a.search = a.filter;
+ return h.extend({
+ search: "none",
+ order: "current",
+ page: "all"
+ }, a)
+ },
+ db = function (a) {
+ for (var b = 0, c = a.length; b < c; b++)
+ if (a[b].length > 0) {
+ a[0] = a[b];
+ a[0].length = 1;
+ a.length =
+ 1;
+ a.context = [a.context[b]];
+ return a
+ } a.length = 0;
+ return a
+ },
+ Da = function (a, b) {
+ var c, d, e, f = [],
+ g = a.aiDisplay;
+ e = a.aiDisplayMaster;
+ var j = b.search;
+ c = b.order;
+ d = b.page;
+ if (y(a) == "ssp") return j === "removed" ? [] : Z(0, e.length);
+ if (d == "current") {
+ c = a._iDisplayStart;
+ for (d = a.fnDisplayEnd(); c < d; c++) f.push(g[c])
+ } else if (c == "current" || c == "applied")
+ if (j == "none") f = e.slice();
+ else if (j == "applied") f = g.slice();
+ else {
+ if (j == "removed") {
+ var i = {};
+ c = 0;
+ for (d = g.length; c < d; c++) i[g[c]] = null;
+ f = h.map(e, function (a) {
+ return !i.hasOwnProperty(a) ?
+ a : null
+ })
+ }
+ } else if (c == "index" || c == "original") {
+ c = 0;
+ for (d = a.aoData.length; c < d; c++)
+ if (j == "none") f.push(c);
+ else {
+ e = h.inArray(c, g);
+ (e === -1 && j == "removed" || e >= 0 && j == "applied") && f.push(c)
+ }
+ }
+ return f
+ };
+ o("rows()", function (a, b) {
+ if (a === k) a = "";
+ else if (h.isPlainObject(a)) {
+ b = a;
+ a = ""
+ }
+ var b = cb(b),
+ c = this.iterator("table", function (c) {
+ var e = b,
+ f;
+ return bb("row", a, function (a) {
+ var b = Pb(a),
+ i = c.aoData;
+ if (b !== null && !e) return [b];
+ f || (f = Da(c, e));
+ if (b !== null && h.inArray(b, f) !== -1) return [b];
+ if (a === null || a === k || a === "") return f;
+ if (typeof a ===
+ "function") return h.map(f, function (b) {
+ var c = i[b];
+ return a(b, c._aData, c.nTr) ? b : null
+ });
+ if (a.nodeName) {
+ var b = a._DT_RowIndex,
+ n = a._DT_CellIndex;
+ if (b !== k) return i[b] && i[b].nTr === a ? [b] : [];
+ if (n) return i[n.row] && i[n.row].nTr === a.parentNode ? [n.row] : [];
+ b = h(a).closest("*[data-dt-row]");
+ return b.length ? [b.data("dt-row")] : []
+ }
+ if (typeof a === "string" && a.charAt(0) === "#") {
+ b = c.aIds[a.replace(/^#/, "")];
+ if (b !== k) return [b.idx]
+ }
+ b = Sb(ka(c.aoData, f, "nTr"));
+ return h(b).filter(a).map(function () {
+ return this._DT_RowIndex
+ }).toArray()
+ },
+ c, e)
+ }, 1);
+ c.selector.rows = a;
+ c.selector.opts = b;
+ return c
+ });
+ o("rows().nodes()", function () {
+ return this.iterator("row", function (a, b) {
+ return a.aoData[b].nTr || k
+ }, 1)
+ });
+ o("rows().data()", function () {
+ return this.iterator(true, "rows", function (a, b) {
+ return ka(a.aoData, b, "_aData")
+ }, 1)
+ });
+ u("rows().cache()", "row().cache()", function (a) {
+ return this.iterator("row", function (b, c) {
+ var d = b.aoData[c];
+ return a === "search" ? d._aFilterData : d._aSortData
+ }, 1)
+ });
+ u("rows().invalidate()", "row().invalidate()", function (a) {
+ return this.iterator("row",
+ function (b, c) {
+ ea(b, c, a)
+ })
+ });
+ u("rows().indexes()", "row().index()", function () {
+ return this.iterator("row", function (a, b) {
+ return b
+ }, 1)
+ });
+ u("rows().ids()", "row().id()", function (a) {
+ for (var b = [], c = this.context, d = 0, e = c.length; d < e; d++)
+ for (var f = 0, g = this[d].length; f < g; f++) {
+ var h = c[d].rowIdFn(c[d].aoData[this[d][f]]._aData);
+ b.push((a === true ? "#" : "") + h)
+ }
+ return new r(c, b)
+ });
+ u("rows().remove()", "row().remove()", function () {
+ var a = this;
+ this.iterator("row", function (b, c, d) {
+ var e = b.aoData,
+ f = e[c],
+ g, h, i, n, m;
+ e.splice(c, 1);
+ g = 0;
+ for (h = e.length; g < h; g++) {
+ i = e[g];
+ m = i.anCells;
+ if (i.nTr !== null) i.nTr._DT_RowIndex = g;
+ if (m !== null) {
+ i = 0;
+ for (n = m.length; i < n; i++) m[i]._DT_CellIndex.row = g
+ }
+ }
+ qa(b.aiDisplayMaster, c);
+ qa(b.aiDisplay, c);
+ qa(a[d], c, false);
+ b._iRecordsDisplay > 0 && b._iRecordsDisplay--;
+ Ua(b);
+ c = b.rowIdFn(f._aData);
+ c !== k && delete b.aIds[c]
+ });
+ this.iterator("table", function (a) {
+ for (var c = 0, d = a.aoData.length; c < d; c++) a.aoData[c].idx = c
+ });
+ return this
+ });
+ o("rows.add()", function (a) {
+ var b = this.iterator("table", function (b) {
+ var c, f, g, h = [];
+ f = 0;
+ for (g =
+ a.length; f < g; f++) {
+ c = a[f];
+ c.nodeName && c.nodeName.toUpperCase() === "TR" ? h.push(oa(b, c)[0]) : h.push(O(b, c))
+ }
+ return h
+ }, 1),
+ c = this.rows(-1);
+ c.pop();
+ h.merge(c, b);
+ return c
+ });
+ o("row()", function (a, b) {
+ return db(this.rows(a, b))
+ });
+ o("row().data()", function (a) {
+ var b = this.context;
+ if (a === k) return b.length && this.length ? b[0].aoData[this[0]]._aData : k;
+ var c = b[0].aoData[this[0]];
+ c._aData = a;
+ Array.isArray(a) && (c.nTr && c.nTr.id) && N(b[0].rowId)(a, c.nTr.id);
+ ea(b[0], this[0], "data");
+ return this
+ });
+ o("row().node()", function () {
+ var a =
+ this.context;
+ return a.length && this.length ? a[0].aoData[this[0]].nTr || null : null
+ });
+ o("row.add()", function (a) {
+ a instanceof h && a.length && (a = a[0]);
+ var b = this.iterator("table", function (b) {
+ return a.nodeName && a.nodeName.toUpperCase() === "TR" ? oa(b, a)[0] : O(b, a)
+ });
+ return this.row(b[0])
+ });
+ var eb = function (a, b) {
+ var c = a.context;
+ if (c.length)
+ if ((c = c[0].aoData[b !== k ? b : a[0]]) && c._details) {
+ c._details.remove();
+ c._detailsShow = k;
+ c._details = k
+ }
+ },
+ Xb = function (a, b) {
+ var c = a.context;
+ if (c.length && a.length) {
+ var d = c[0].aoData[a[0]];
+ if (d._details) {
+ (d._detailsShow = b) ? d._details.insertAfter(d.nTr): d._details.detach();
+ var e = c[0],
+ f = new r(e),
+ g = e.aoData;
+ f.off("draw.dt.DT_details column-visibility.dt.DT_details destroy.dt.DT_details");
+ if (C(g, "_details").length > 0) {
+ f.on("draw.dt.DT_details", function (a, b) {
+ e === b && f.rows({
+ page: "current"
+ }).eq(0).each(function (a) {
+ a = g[a];
+ a._detailsShow && a._details.insertAfter(a.nTr)
+ })
+ });
+ f.on("column-visibility.dt.DT_details", function (a, b) {
+ if (e === b)
+ for (var c, d = W(b), f = 0, h = g.length; f < h; f++) {
+ c = g[f];
+ c._details &&
+ c._details.children("td[colspan]").attr("colspan", d)
+ }
+ });
+ f.on("destroy.dt.DT_details", function (a, b) {
+ if (e === b)
+ for (var c = 0, d = g.length; c < d; c++) g[c]._details && eb(f, c)
+ })
+ }
+ }
+ }
+ };
+ o("row().child()", function (a, b) {
+ var c = this.context;
+ if (a === k) return c.length && this.length ? c[0].aoData[this[0]]._details : k;
+ if (a === true) this.child.show();
+ else if (a === false) eb(this);
+ else if (c.length && this.length) {
+ var d = c[0],
+ c = c[0].aoData[this[0]],
+ e = [],
+ f = function (a, b) {
+ if (Array.isArray(a) || a instanceof h)
+ for (var c = 0, k = a.length; c < k; c++) f(a[c],
+ b);
+ else if (a.nodeName && a.nodeName.toLowerCase() === "tr") e.push(a);
+ else {
+ c = h("
").addClass(b);
+ h("td", c).addClass(b).html(a)[0].colSpan = W(d);
+ e.push(c[0])
+ }
+ };
+ f(a, b);
+ c._details && c._details.detach();
+ c._details = h(e);
+ c._detailsShow && c._details.insertAfter(c.nTr)
+ }
+ return this
+ });
+ o(["row().child.show()", "row().child().show()"], function () {
+ Xb(this, true);
+ return this
+ });
+ o(["row().child.hide()", "row().child().hide()"], function () {
+ Xb(this, false);
+ return this
+ });
+ o(["row().child.remove()", "row().child().remove()"],
+ function () {
+ eb(this);
+ return this
+ });
+ o("row().child.isShown()", function () {
+ var a = this.context;
+ return a.length && this.length ? a[0].aoData[this[0]]._detailsShow || false : false
+ });
+ var ec = /^([^:]+):(name|visIdx|visible)$/,
+ Yb = function (a, b, c, d, e) {
+ for (var c = [], d = 0, f = e.length; d < f; d++) c.push(B(a, e[d], b));
+ return c
+ };
+ o("columns()", function (a, b) {
+ if (a === k) a = "";
+ else if (h.isPlainObject(a)) {
+ b = a;
+ a = ""
+ }
+ var b = cb(b),
+ c = this.iterator("table", function (c) {
+ var e = a,
+ f = b,
+ g = c.aoColumns,
+ j = C(g, "sName"),
+ i = C(g, "nTh");
+ return bb("column", e, function (a) {
+ var b =
+ Pb(a);
+ if (a === "") return Z(g.length);
+ if (b !== null) return [b >= 0 ? b : g.length + b];
+ if (typeof a === "function") {
+ var e = Da(c, f);
+ return h.map(g, function (b, f) {
+ return a(f, Yb(c, f, 0, 0, e), i[f]) ? f : null
+ })
+ }
+ var k = typeof a === "string" ? a.match(ec) : "";
+ if (k) switch (k[2]) {
+ case "visIdx":
+ case "visible":
+ b = parseInt(k[1], 10);
+ if (b < 0) {
+ var l = h.map(g, function (a, b) {
+ return a.bVisible ? b : null
+ });
+ return [l[l.length + b]]
+ }
+ return [ba(c, b)];
+ case "name":
+ return h.map(j, function (a, b) {
+ return a === k[1] ? b : null
+ });
+ default:
+ return []
+ }
+ if (a.nodeName && a._DT_CellIndex) return [a._DT_CellIndex.column];
+ b = h(i).filter(a).map(function () {
+ return h.inArray(this, i)
+ }).toArray();
+ if (b.length || !a.nodeName) return b;
+ b = h(a).closest("*[data-dt-column]");
+ return b.length ? [b.data("dt-column")] : []
+ }, c, f)
+ }, 1);
+ c.selector.cols = a;
+ c.selector.opts = b;
+ return c
+ });
+ u("columns().header()", "column().header()", function () {
+ return this.iterator("column", function (a, b) {
+ return a.aoColumns[b].nTh
+ }, 1)
+ });
+ u("columns().footer()", "column().footer()", function () {
+ return this.iterator("column", function (a, b) {
+ return a.aoColumns[b].nTf
+ }, 1)
+ });
+ u("columns().data()",
+ "column().data()",
+ function () {
+ return this.iterator("column-rows", Yb, 1)
+ });
+ u("columns().dataSrc()", "column().dataSrc()", function () {
+ return this.iterator("column", function (a, b) {
+ return a.aoColumns[b].mData
+ }, 1)
+ });
+ u("columns().cache()", "column().cache()", function (a) {
+ return this.iterator("column-rows", function (b, c, d, e, f) {
+ return ka(b.aoData, f, a === "search" ? "_aFilterData" : "_aSortData", c)
+ }, 1)
+ });
+ u("columns().nodes()", "column().nodes()", function () {
+ return this.iterator("column-rows", function (a, b, c, d, e) {
+ return ka(a.aoData,
+ e, "anCells", b)
+ }, 1)
+ });
+ u("columns().visible()", "column().visible()", function (a, b) {
+ var c = this,
+ d = this.iterator("column", function (b, c) {
+ if (a === k) return b.aoColumns[c].bVisible;
+ var d = b.aoColumns,
+ j = d[c],
+ i = b.aoData,
+ n, m, l;
+ if (a !== k && j.bVisible !== a) {
+ if (a) {
+ var o = h.inArray(true, C(d, "bVisible"), c + 1);
+ n = 0;
+ for (m = i.length; n < m; n++) {
+ l = i[n].nTr;
+ d = i[n].anCells;
+ l && l.insertBefore(d[c], d[o] || null)
+ }
+ } else h(C(b.aoData, "anCells", c)).detach();
+ j.bVisible = a
+ }
+ });
+ a !== k && this.iterator("table", function (d) {
+ ga(d, d.aoHeader);
+ ga(d, d.aoFooter);
+ d.aiDisplay.length || h(d.nTBody).find("td[colspan]").attr("colspan", W(d));
+ za(d);
+ c.iterator("column", function (c, d) {
+ t(c, null, "column-visibility", [c, d, a, b])
+ });
+ (b === k || b) && c.columns.adjust()
+ });
+ return d
+ });
+ u("columns().indexes()", "column().index()", function (a) {
+ return this.iterator("column", function (b, c) {
+ return a === "visible" ? ca(b, c) : c
+ }, 1)
+ });
+ o("columns.adjust()", function () {
+ return this.iterator("table", function (a) {
+ aa(a)
+ }, 1)
+ });
+ o("column.index()", function (a, b) {
+ if (this.context.length !== 0) {
+ var c = this.context[0];
+ if (a === "fromVisible" || a === "toData") return ba(c, b);
+ if (a === "fromData" || a === "toVisible") return ca(c, b)
+ }
+ });
+ o("column()", function (a, b) {
+ return db(this.columns(a, b))
+ });
+ o("cells()", function (a, b, c) {
+ if (h.isPlainObject(a))
+ if (a.row === k) {
+ c = a;
+ a = null
+ } else {
+ c = b;
+ b = null
+ } if (h.isPlainObject(b)) {
+ c = b;
+ b = null
+ }
+ if (b === null || b === k) return this.iterator("table", function (b) {
+ var d = a,
+ e = cb(c),
+ f = b.aoData,
+ g = Da(b, e),
+ i = Sb(ka(f, g, "anCells")),
+ j = h(Tb([], i)),
+ l, n = b.aoColumns.length,
+ o, u, r, t, w, v;
+ return bb("cell", d, function (a) {
+ var c = typeof a ===
+ "function";
+ if (a === null || a === k || c) {
+ o = [];
+ u = 0;
+ for (r = g.length; u < r; u++) {
+ l = g[u];
+ for (t = 0; t < n; t++) {
+ w = {
+ row: l,
+ column: t
+ };
+ if (c) {
+ v = f[l];
+ a(w, B(b, l, t), v.anCells ? v.anCells[t] : null) && o.push(w)
+ } else o.push(w)
+ }
+ }
+ return o
+ }
+ if (h.isPlainObject(a)) return a.column !== k && a.row !== k && h.inArray(a.row, g) !== -1 ? [a] : [];
+ c = j.filter(a).map(function (a, b) {
+ return {
+ row: b._DT_CellIndex.row,
+ column: b._DT_CellIndex.column
+ }
+ }).toArray();
+ if (c.length || !a.nodeName) return c;
+ v = h(a).closest("*[data-dt-row]");
+ return v.length ? [{
+ row: v.data("dt-row"),
+ column: v.data("dt-column")
+ }] : []
+ }, b, e)
+ });
+ var d = c ? {
+ page: c.page,
+ order: c.order,
+ search: c.search
+ } : {},
+ e = this.columns(b, d),
+ f = this.rows(a, d),
+ g, j, i, l, d = this.iterator("table", function (a, b) {
+ var c = [];
+ g = 0;
+ for (j = f[b].length; g < j; g++) {
+ i = 0;
+ for (l = e[b].length; i < l; i++) c.push({
+ row: f[b][g],
+ column: e[b][i]
+ })
+ }
+ return c
+ }, 1),
+ d = c && c.selected ? this.cells(d, c) : d;
+ h.extend(d.selector, {
+ cols: b,
+ rows: a,
+ opts: c
+ });
+ return d
+ });
+ u("cells().nodes()", "cell().node()", function () {
+ return this.iterator("cell", function (a, b, c) {
+ return (a = a.aoData[b]) && a.anCells ? a.anCells[c] : k
+ }, 1)
+ });
+ o("cells().data()", function () {
+ return this.iterator("cell", function (a, b, c) {
+ return B(a, b, c)
+ }, 1)
+ });
+ u("cells().cache()", "cell().cache()", function (a) {
+ a = a === "search" ? "_aFilterData" : "_aSortData";
+ return this.iterator("cell", function (b, c, d) {
+ return b.aoData[c][a][d]
+ }, 1)
+ });
+ u("cells().render()", "cell().render()", function (a) {
+ return this.iterator("cell", function (b, c, d) {
+ return B(b, c, d, a)
+ }, 1)
+ });
+ u("cells().indexes()", "cell().index()", function () {
+ return this.iterator("cell", function (a, b, c) {
+ return {
+ row: b,
+ column: c,
+ columnVisible: ca(a,
+ c)
+ }
+ }, 1)
+ });
+ u("cells().invalidate()", "cell().invalidate()", function (a) {
+ return this.iterator("cell", function (b, c, d) {
+ ea(b, c, a, d)
+ })
+ });
+ o("cell()", function (a, b, c) {
+ return db(this.cells(a, b, c))
+ });
+ o("cell().data()", function (a) {
+ var b = this.context,
+ c = this[0];
+ if (a === k) return b.length && c.length ? B(b[0], c[0].row, c[0].column) : k;
+ lb(b[0], c[0].row, c[0].column, a);
+ ea(b[0], c[0].row, "data", c[0].column);
+ return this
+ });
+ o("order()", function (a, b) {
+ var c = this.context;
+ if (a === k) return c.length !== 0 ? c[0].aaSorting : k;
+ typeof a === "number" ?
+ a = [
+ [a, b]
+ ] : a.length && !Array.isArray(a[0]) && (a = Array.prototype.slice.call(arguments));
+ return this.iterator("table", function (b) {
+ b.aaSorting = a.slice()
+ })
+ });
+ o("order.listener()", function (a, b, c) {
+ return this.iterator("table", function (d) {
+ Oa(d, a, b, c)
+ })
+ });
+ o("order.fixed()", function (a) {
+ if (!a) {
+ var b = this.context,
+ b = b.length ? b[0].aaSortingFixed : k;
+ return Array.isArray(b) ? {
+ pre: b
+ } : b
+ }
+ return this.iterator("table", function (b) {
+ b.aaSortingFixed = h.extend(true, {}, a)
+ })
+ });
+ o(["columns().order()", "column().order()"], function (a) {
+ var b =
+ this;
+ return this.iterator("table", function (c, d) {
+ var e = [];
+ h.each(b[d], function (b, c) {
+ e.push([c, a])
+ });
+ c.aaSorting = e
+ })
+ });
+ o("search()", function (a, b, c, d) {
+ var e = this.context;
+ return a === k ? e.length !== 0 ? e[0].oPreviousSearch.sSearch : k : this.iterator("table", function (e) {
+ e.oFeatures.bFilter && ha(e, h.extend({}, e.oPreviousSearch, {
+ sSearch: a + "",
+ bRegex: b === null ? false : b,
+ bSmart: c === null ? true : c,
+ bCaseInsensitive: d === null ? true : d
+ }), 1)
+ })
+ });
+ u("columns().search()", "column().search()", function (a, b, c, d) {
+ return this.iterator("column",
+ function (e, f) {
+ var g = e.aoPreSearchCols;
+ if (a === k) return g[f].sSearch;
+ if (e.oFeatures.bFilter) {
+ h.extend(g[f], {
+ sSearch: a + "",
+ bRegex: b === null ? false : b,
+ bSmart: c === null ? true : c,
+ bCaseInsensitive: d === null ? true : d
+ });
+ ha(e, e.oPreviousSearch, 1)
+ }
+ })
+ });
+ o("state()", function () {
+ return this.context.length ? this.context[0].oSavedState : null
+ });
+ o("state.clear()", function () {
+ return this.iterator("table", function (a) {
+ a.fnStateSaveCallback.call(a.oInstance, a, {})
+ })
+ });
+ o("state.loaded()", function () {
+ return this.context.length ? this.context[0].oLoadedState :
+ null
+ });
+ o("state.save()", function () {
+ return this.iterator("table", function (a) {
+ za(a)
+ })
+ });
+ l.versionCheck = l.fnVersionCheck = function (a) {
+ for (var b = l.version.split("."), a = a.split("."), c, d, e = 0, f = a.length; e < f; e++) {
+ c = parseInt(b[e], 10) || 0;
+ d = parseInt(a[e], 10) || 0;
+ if (c !== d) return c > d
+ }
+ return true
+ };
+ l.isDataTable = l.fnIsDataTable = function (a) {
+ var b = h(a).get(0),
+ c = false;
+ if (a instanceof l.Api) return true;
+ h.each(l.settings, function (a, e) {
+ var f = e.nScrollHead ? h("table", e.nScrollHead)[0] : null,
+ g = e.nScrollFoot ? h("table", e.nScrollFoot)[0] :
+ null;
+ if (e.nTable === b || f === b || g === b) c = true
+ });
+ return c
+ };
+ l.tables = l.fnTables = function (a) {
+ var b = false;
+ if (h.isPlainObject(a)) {
+ b = a.api;
+ a = a.visible
+ }
+ var c = h.map(l.settings, function (b) {
+ if (!a || a && h(b.nTable).is(":visible")) return b.nTable
+ });
+ return b ? new r(c) : c
+ };
+ l.camelToHungarian = J;
+ o("$()", function (a, b) {
+ var c = this.rows(b).nodes(),
+ c = h(c);
+ return h([].concat(c.filter(a).toArray(), c.find(a).toArray()))
+ });
+ h.each(["on", "one", "off"], function (a, b) {
+ o(b + "()", function () {
+ var a = Array.prototype.slice.call(arguments);
+ a[0] =
+ h.map(a[0].split(/\s/), function (a) {
+ return !a.match(/\.dt\b/) ? a + ".dt" : a
+ }).join(" ");
+ var d = h(this.tables().nodes());
+ d[b].apply(d, a);
+ return this
+ })
+ });
+ o("clear()", function () {
+ return this.iterator("table", function (a) {
+ pa(a)
+ })
+ });
+ o("settings()", function () {
+ return new r(this.context, this.context)
+ });
+ o("init()", function () {
+ var a = this.context;
+ return a.length ? a[0].oInit : null
+ });
+ o("data()", function () {
+ return this.iterator("table", function (a) {
+ return C(a.aoData, "_aData")
+ }).flatten()
+ });
+ o("destroy()", function (a) {
+ a = a || false;
+ return this.iterator("table", function (b) {
+ var c = b.nTableWrapper.parentNode,
+ d = b.oClasses,
+ e = b.nTable,
+ f = b.nTBody,
+ g = b.nTHead,
+ j = b.nTFoot,
+ i = h(e),
+ f = h(f),
+ k = h(b.nTableWrapper),
+ m = h.map(b.aoData, function (a) {
+ return a.nTr
+ }),
+ o;
+ b.bDestroying = true;
+ t(b, "aoDestroyCallback", "destroy", [b]);
+ a || (new r(b)).columns().visible(true);
+ k.off(".DT").find(":not(tbody *)").off(".DT");
+ h(E).off(".DT-" + b.sInstance);
+ if (e != g.parentNode) {
+ i.children("thead").detach();
+ i.append(g)
+ }
+ if (j && e != j.parentNode) {
+ i.children("tfoot").detach();
+ i.append(j)
+ }
+ b.aaSorting = [];
+ b.aaSortingFixed = [];
+ ya(b);
+ h(m).removeClass(b.asStripeClasses.join(" "));
+ h("th, td", g).removeClass(d.sSortable + " " + d.sSortableAsc + " " + d.sSortableDesc + " " + d.sSortableNone);
+ f.children().detach();
+ f.append(m);
+ g = a ? "remove" : "detach";
+ i[g]();
+ k[g]();
+ if (!a && c) {
+ c.insertBefore(e, b.nTableReinsertBefore);
+ i.css("width", b.sDestroyWidth).removeClass(d.sTable);
+ (o = b.asDestroyStripes.length) && f.children().each(function (a) {
+ h(this).addClass(b.asDestroyStripes[a % o])
+ })
+ }
+ c = h.inArray(b, l.settings);
+ c !== -1 && l.settings.splice(c,
+ 1)
+ })
+ });
+ h.each(["column", "row", "cell"], function (a, b) {
+ o(b + "s().every()", function (a) {
+ var d = this.selector.opts,
+ e = this;
+ return this.iterator(b, function (f, g, h, i, l) {
+ a.call(e[b](g, b === "cell" ? h : d, b === "cell" ? d : k), g, h, i, l)
+ })
+ })
+ });
+ o("i18n()", function (a, b, c) {
+ var d = this.context[0],
+ a = S(a)(d.oLanguage);
+ a === k && (a = b);
+ c !== k && h.isPlainObject(a) && (a = a[c] !== k ? a[c] : a._);
+ return a.replace("%d", c)
+ });
+ l.version = "1.10.24";
+ l.settings = [];
+ l.models = {};
+ l.models.oSearch = {
+ bCaseInsensitive: !0,
+ sSearch: "",
+ bRegex: !1,
+ bSmart: !0
+ };
+ l.models.oRow = {
+ nTr: null,
+ anCells: null,
+ _aData: [],
+ _aSortData: null,
+ _aFilterData: null,
+ _sFilterRow: null,
+ _sRowStripe: "",
+ src: null,
+ idx: -1
+ };
+ l.models.oColumn = {
+ idx: null,
+ aDataSort: null,
+ asSorting: null,
+ bSearchable: null,
+ bSortable: null,
+ bVisible: null,
+ _sManualType: null,
+ _bAttrSrc: !1,
+ fnCreatedCell: null,
+ fnGetData: null,
+ fnSetData: null,
+ mData: null,
+ mRender: null,
+ nTh: null,
+ nTf: null,
+ sClass: null,
+ sContentPadding: null,
+ sDefaultContent: null,
+ sName: null,
+ sSortDataType: "std",
+ sSortingClass: null,
+ sSortingClassJUI: null,
+ sTitle: null,
+ sType: null,
+ sWidth: null,
+ sWidthOrig: null
+ };
+ l.defaults = {
+ aaData: null,
+ aaSorting: [
+ [0, "asc"]
+ ],
+ aaSortingFixed: [],
+ ajax: null,
+ aLengthMenu: [10, 25, 50, 100],
+ aoColumns: null,
+ aoColumnDefs: null,
+ aoSearchCols: [],
+ asStripeClasses: null,
+ bAutoWidth: !0,
+ bDeferRender: !1,
+ bDestroy: !1,
+ bFilter: !0,
+ bInfo: !0,
+ bLengthChange: !0,
+ bPaginate: !0,
+ bProcessing: !1,
+ bRetrieve: !1,
+ bScrollCollapse: !1,
+ bServerSide: !1,
+ bSort: !0,
+ bSortMulti: !0,
+ bSortCellsTop: !1,
+ bSortClasses: !0,
+ bStateSave: !1,
+ fnCreatedRow: null,
+ fnDrawCallback: null,
+ fnFooterCallback: null,
+ fnFormatNumber: function (a) {
+ return a.toString().replace(/\B(?=(\d{3})+(?!\d))/g,
+ this.oLanguage.sThousands)
+ },
+ fnHeaderCallback: null,
+ fnInfoCallback: null,
+ fnInitComplete: null,
+ fnPreDrawCallback: null,
+ fnRowCallback: null,
+ fnServerData: null,
+ fnServerParams: null,
+ fnStateLoadCallback: function (a) {
+ try {
+ return JSON.parse((a.iStateDuration === -1 ? sessionStorage : localStorage).getItem("DataTables_" + a.sInstance + "_" + location.pathname))
+ } catch (b) {
+ return {}
+ }
+ },
+ fnStateLoadParams: null,
+ fnStateLoaded: null,
+ fnStateSaveCallback: function (a, b) {
+ try {
+ (a.iStateDuration === -1 ? sessionStorage : localStorage).setItem("DataTables_" +
+ a.sInstance + "_" + location.pathname, JSON.stringify(b))
+ } catch (c) {}
+ },
+ fnStateSaveParams: null,
+ iStateDuration: 7200,
+ iDeferLoading: null,
+ iDisplayLength: 10,
+ iDisplayStart: 0,
+ iTabIndex: 0,
+ oClasses: {},
+ oLanguage: {
+ oAria: {
+ sSortAscending: ": activate to sort column ascending",
+ sSortDescending: ": activate to sort column descending"
+ },
+ oPaginate: {
+ sFirst: "First",
+ sLast: "Last",
+ sNext: "Berikutnya",
+ sPrevious: "Sebelumnya"
+ },
+ sEmptyTable: "Tidak ada data dalam tabel",
+ sInfo: "Menampilkan _START_ sampai _END_ dari _TOTAL_ total data",
+ sInfoEmpty: "Menampilkan 0 sampai 0 dari 0 total data",
+ sInfoFiltered: "(difilter dari total _MAX_ data)",
+ sInfoPostFix: "",
+ sDecimal: "",
+ sThousands: ",",
+ sLengthMenu: "_MENU_ Data per halaman",
+ sLoadingRecords: "Loading...",
+ sProcessing: "Processing...",
+ sSearch: "",
+ sSearchPlaceholder: "Pencarian...",
+ sUrl: "",
+ sZeroRecords: "Tidak ada data dalam tabel"
+ },
+ oSearch: h.extend({}, l.models.oSearch),
+ sAjaxDataProp: "data",
+ sAjaxSource: null,
+ sDom: "lfrtip",
+ searchDelay: null,
+ sPaginationType: "simple_numbers",
+ sScrollX: "",
+ sScrollXInner: "",
+ sScrollY: "",
+ sServerMethod: "GET",
+ renderer: null,
+ rowId: "DT_RowId"
+ };
+ $(l.defaults);
+ l.defaults.column = {
+ aDataSort: null,
+ iDataSort: -1,
+ asSorting: ["asc", "desc"],
+ bSearchable: !0,
+ bSortable: !0,
+ bVisible: !0,
+ fnCreatedCell: null,
+ mData: null,
+ mRender: null,
+ sCellType: "td",
+ sClass: "",
+ sContentPadding: "",
+ sDefaultContent: null,
+ sName: "",
+ sSortDataType: "std",
+ sTitle: null,
+ sType: null,
+ sWidth: null
+ };
+ $(l.defaults.column);
+ l.models.oSettings = {
+ oFeatures: {
+ bAutoWidth: null,
+ bDeferRender: null,
+ bFilter: null,
+ bInfo: null,
+ bLengthChange: null,
+ bPaginate: null,
+ bProcessing: null,
+ bServerSide: null,
+ bSort: null,
+ bSortMulti: null,
+ bSortClasses: null,
+ bStateSave: null
+ },
+ oScroll: {
+ bCollapse: null,
+ iBarWidth: 0,
+ sX: null,
+ sXInner: null,
+ sY: null
+ },
+ oLanguage: {
+ fnInfoCallback: null
+ },
+ oBrowser: {
+ bScrollOversize: !1,
+ bScrollbarLeft: !1,
+ bBounding: !1,
+ barWidth: 0
+ },
+ ajax: null,
+ aanFeatures: [],
+ aoData: [],
+ aiDisplay: [],
+ aiDisplayMaster: [],
+ aIds: {},
+ aoColumns: [],
+ aoHeader: [],
+ aoFooter: [],
+ oPreviousSearch: {},
+ aoPreSearchCols: [],
+ aaSorting: null,
+ aaSortingFixed: [],
+ asStripeClasses: null,
+ asDestroyStripes: [],
+ sDestroyWidth: 0,
+ aoRowCallback: [],
+ aoHeaderCallback: [],
+ aoFooterCallback: [],
+ aoDrawCallback: [],
+ aoRowCreatedCallback: [],
+ aoPreDrawCallback: [],
+ aoInitComplete: [],
+ aoStateSaveParams: [],
+ aoStateLoadParams: [],
+ aoStateLoaded: [],
+ sTableId: "",
+ nTable: null,
+ nTHead: null,
+ nTFoot: null,
+ nTBody: null,
+ nTableWrapper: null,
+ bDeferLoading: !1,
+ bInitialised: !1,
+ aoOpenRows: [],
+ sDom: null,
+ searchDelay: null,
+ sPaginationType: "two_button",
+ iStateDuration: 0,
+ aoStateSave: [],
+ aoStateLoad: [],
+ oSavedState: null,
+ oLoadedState: null,
+ sAjaxSource: null,
+ sAjaxDataProp: null,
+ bAjaxDataGet: !0,
+ jqXHR: null,
+ json: k,
+ oAjaxData: k,
+ fnServerData: null,
+ aoServerParams: [],
+ sServerMethod: null,
+ fnFormatNumber: null,
+ aLengthMenu: null,
+ iDraw: 0,
+ bDrawing: !1,
+ iDrawError: -1,
+ _iDisplayLength: 10,
+ _iDisplayStart: 0,
+ _iRecordsTotal: 0,
+ _iRecordsDisplay: 0,
+ oClasses: {},
+ bFiltered: !1,
+ bSorted: !1,
+ bSortCellsTop: null,
+ oInit: null,
+ aoDestroyCallback: [],
+ fnRecordsTotal: function () {
+ return y(this) == "ssp" ? this._iRecordsTotal * 1 : this.aiDisplayMaster.length
+ },
+ fnRecordsDisplay: function () {
+ return y(this) == "ssp" ? this._iRecordsDisplay * 1 : this.aiDisplay.length
+ },
+ fnDisplayEnd: function () {
+ var a = this._iDisplayLength,
+ b = this._iDisplayStart,
+ c = b + a,
+ d = this.aiDisplay.length,
+ e = this.oFeatures,
+ f = e.bPaginate;
+ return e.bServerSide ? f === false || a === -1 ? b + d : Math.min(b + a, this._iRecordsDisplay) : !f || c > d || a === -1 ? d : c
+ },
+ oInstance: null,
+ sInstance: null,
+ iTabIndex: 0,
+ nScrollHead: null,
+ nScrollFoot: null,
+ aLastSort: [],
+ oPlugins: {},
+ rowIdFn: null,
+ rowId: null
+ };
+ l.ext = v = {
+ buttons: {},
+ classes: {},
+ builder: "-source-",
+ errMode: "alert",
+ feature: [],
+ search: [],
+ selector: {
+ cell: [],
+ column: [],
+ row: []
+ },
+ internal: {},
+ legacy: {
+ ajax: null
+ },
+ pager: {},
+ renderer: {
+ pageButton: {},
+ header: {}
+ },
+ order: {},
+ type: {
+ detect: [],
+ search: {},
+ order: {}
+ },
+ _unique: 0,
+ fnVersionCheck: l.fnVersionCheck,
+ iApiIndex: 0,
+ oJUIClasses: {},
+ sVersion: l.version
+ };
+ h.extend(v, {
+ afnFiltering: v.search,
+ aTypes: v.type.detect,
+ ofnSearch: v.type.search,
+ oSort: v.type.order,
+ afnSortData: v.order,
+ aoFeatures: v.feature,
+ oApi: v.internal,
+ oStdClasses: v.classes,
+ oPagination: v.pager
+ });
+ h.extend(l.ext.classes, {
+ sTable: "dataTable",
+ sNoFooter: "no-footer",
+ sPageButton: "paginate_button",
+ sPageButtonActive: "current",
+ sPageButtonDisabled: "disabled",
+ sStripeOdd: "odd",
+ sStripeEven: "even",
+ sRowEmpty: "dataTables_empty",
+ sWrapper: "dataTables_wrapper",
+ sFilter: "dataTables_filter",
+ sInfo: "dataTables_info",
+ sPaging: "dataTables_paginate paging_",
+ sLength: "dataTables_length",
+ sProcessing: "dataTables_processing",
+ sSortAsc: "sorting_asc",
+ sSortDesc: "sorting_desc",
+ sSortable: "sorting",
+ sSortableAsc: "sorting_desc_disabled",
+ sSortableDesc: "sorting_asc_disabled",
+ sSortableNone: "sorting_disabled",
+ sSortColumn: "sorting_",
+ sFilterInput: "",
+ sLengthSelect: "",
+ sScrollWrapper: "dataTables_scroll",
+ sScrollHead: "dataTables_scrollHead",
+ sScrollHeadInner: "dataTables_scrollHeadInner",
+ sScrollBody: "dataTables_scrollBody",
+ sScrollFoot: "dataTables_scrollFoot",
+ sScrollFootInner: "dataTables_scrollFootInner",
+ sHeaderTH: "",
+ sFooterTH: "",
+ sSortJUIAsc: "",
+ sSortJUIDesc: "",
+ sSortJUI: "",
+ sSortJUIAscAllowed: "",
+ sSortJUIDescAllowed: "",
+ sSortJUIWrapper: "",
+ sSortIcon: "",
+ sJUIHeader: "",
+ sJUIFooter: ""
+ });
+ var Mb = l.ext.pager;
+ h.extend(Mb, {
+ simple: function () {
+ return ["previous", "next"]
+ },
+ full: function () {
+ return ["first", "previous", "next", "last"]
+ },
+ numbers: function (a, b) {
+ return [ja(a,
+ b)]
+ },
+ simple_numbers: function (a, b) {
+ return ["previous", ja(a, b), "next"]
+ },
+ full_numbers: function (a, b) {
+ return ["first", "previous", ja(a, b), "next", "last"]
+ },
+ first_last_numbers: function (a, b) {
+ return ["first", ja(a, b), "last"]
+ },
+ _numbers: ja,
+ numbers_length: 7
+ });
+ h.extend(!0, l.ext.renderer, {
+ pageButton: {
+ _: function (a, b, c, d, e, f) {
+ var g = a.oClasses,
+ j = a.oLanguage.oPaginate,
+ i = a.oLanguage.oAria.paginate || {},
+ l, m, o = 0,
+ s = function (b, d) {
+ var k, u, t, r, v = g.sPageButtonDisabled,
+ w = function (b) {
+ Va(a, b.data.action, true)
+ };
+ k = 0;
+ for (u = d.length; k <
+ u; k++) {
+ r = d[k];
+ if (Array.isArray(r)) {
+ t = h("<" + (r.DT_el || "div") + "/>").appendTo(b);
+ s(t, r)
+ } else {
+ l = null;
+ m = r;
+ t = a.iTabIndex;
+ switch (r) {
+ case "ellipsis":
+ b.append('
… ');
+ break;
+ case "first":
+ l = j.sFirst;
+ if (e === 0) {
+ t = -1;
+ m = m + (" " + v)
+ }
+ break;
+ case "previous":
+ l = j.sPrevious;
+ if (e === 0) {
+ t = -1;
+ m = m + (" " + v)
+ }
+ break;
+ case "next":
+ l = j.sNext;
+ if (f === 0 || e === f - 1) {
+ t = -1;
+ m = m + (" " + v)
+ }
+ break;
+ case "last":
+ l = j.sLast;
+ if (f === 0 || e === f - 1) {
+ t = -1;
+ m = m + (" " + v)
+ }
+ break;
+ default:
+ l = a.fnFormatNumber(r + 1);
+ m = e === r ? g.sPageButtonActive :
+ ""
+ }
+ if (l !== null) {
+ t = h("
", {
+ "class": g.sPageButton + " " + m,
+ "aria-controls": a.sTableId,
+ "aria-label": i[r],
+ "data-dt-idx": o,
+ tabindex: t,
+ id: c === 0 && typeof r === "string" ? a.sTableId + "_" + r : null
+ }).html(l).appendTo(b);
+ Xa(t, {
+ action: r
+ }, w);
+ o++
+ }
+ }
+ }
+ },
+ u;
+ try {
+ u = h(b).find(H.activeElement).data("dt-idx")
+ } catch (t) {}
+ s(h(b).empty(), d);
+ u !== k && h(b).find("[data-dt-idx=" + u + "]").trigger("focus")
+ }
+ }
+ });
+ h.extend(l.ext.type.detect, [function (a, b) {
+ var c = b.oLanguage.sDecimal;
+ return ab(a, c) ? "num" + c : null
+ }, function (a) {
+ if (a && !(a instanceof Date) &&
+ !bc.test(a)) return null;
+ var b = Date.parse(a);
+ return b !== null && !isNaN(b) || M(a) ? "date" : null
+ }, function (a, b) {
+ var c = b.oLanguage.sDecimal;
+ return ab(a, c, true) ? "num-fmt" + c : null
+ }, function (a, b) {
+ var c = b.oLanguage.sDecimal;
+ return Rb(a, c) ? "html-num" + c : null
+ }, function (a, b) {
+ var c = b.oLanguage.sDecimal;
+ return Rb(a, c, true) ? "html-num-fmt" + c : null
+ }, function (a) {
+ return M(a) || typeof a === "string" && a.indexOf("<") !== -1 ? "html" : null
+ }]);
+ h.extend(l.ext.type.search, {
+ html: function (a) {
+ return M(a) ? a : typeof a === "string" ? a.replace(Ob,
+ " ").replace(Ca, "") : ""
+ },
+ string: function (a) {
+ return M(a) ? a : typeof a === "string" ? a.replace(Ob, " ") : a
+ }
+ });
+ var Ba = function (a, b, c, d) {
+ if (a !== 0 && (!a || a === "-")) return -Infinity;
+ b && (a = Qb(a, b));
+ if (a.replace) {
+ c && (a = a.replace(c, ""));
+ d && (a = a.replace(d, ""))
+ }
+ return a * 1
+ };
+ h.extend(v.type.order, {
+ "date-pre": function (a) {
+ a = Date.parse(a);
+ return isNaN(a) ? -Infinity : a
+ },
+ "html-pre": function (a) {
+ return M(a) ? "" : a.replace ? a.replace(/<.*?>/g, "").toLowerCase() : a + ""
+ },
+ "string-pre": function (a) {
+ return M(a) ? "" : typeof a === "string" ? a.toLowerCase() :
+ !a.toString ? "" : a.toString()
+ },
+ "string-asc": function (a, b) {
+ return a < b ? -1 : a > b ? 1 : 0
+ },
+ "string-desc": function (a, b) {
+ return a < b ? 1 : a > b ? -1 : 0
+ }
+ });
+ Fa("");
+ h.extend(!0, l.ext.renderer, {
+ header: {
+ _: function (a, b, c, d) {
+ h(a.nTable).on("order.dt.DT", function (e, f, g, h) {
+ if (a === f) {
+ e = c.idx;
+ b.removeClass(d.sSortAsc + " " + d.sSortDesc).addClass(h[e] == "asc" ? d.sSortAsc : h[e] == "desc" ? d.sSortDesc : c.sSortingClass)
+ }
+ })
+ },
+ jqueryui: function (a, b, c, d) {
+ h("
").addClass(d.sSortJUIWrapper).append(b.contents()).append(h(" ").addClass(d.sSortIcon +
+ " " + c.sSortingClassJUI)).appendTo(b);
+ h(a.nTable).on("order.dt.DT", function (e, f, g, h) {
+ if (a === f) {
+ e = c.idx;
+ b.removeClass(d.sSortAsc + " " + d.sSortDesc).addClass(h[e] == "asc" ? d.sSortAsc : h[e] == "desc" ? d.sSortDesc : c.sSortingClass);
+ b.find("span." + d.sSortIcon).removeClass(d.sSortJUIAsc + " " + d.sSortJUIDesc + " " + d.sSortJUI + " " + d.sSortJUIAscAllowed + " " + d.sSortJUIDescAllowed).addClass(h[e] == "asc" ? d.sSortJUIAsc : h[e] == "desc" ? d.sSortJUIDesc : c.sSortingClassJUI)
+ }
+ })
+ }
+ }
+ });
+ var fb = function (a) {
+ return typeof a === "string" ? a.replace(/&/g,
+ "&").replace(//g, ">").replace(/"/g, """) : a
+ };
+ l.render = {
+ number: function (a, b, c, d, e) {
+ return {
+ display: function (f) {
+ if (typeof f !== "number" && typeof f !== "string") return f;
+ var g = f < 0 ? "-" : "",
+ h = parseFloat(f);
+ if (isNaN(h)) return fb(f);
+ h = h.toFixed(c);
+ f = Math.abs(h);
+ h = parseInt(f, 10);
+ f = c ? b + (f - h).toFixed(c).substring(2) : "";
+ return g + (d || "") + h.toString().replace(/\B(?=(\d{3})+(?!\d))/g, a) + f + (e || "")
+ }
+ }
+ },
+ text: function () {
+ return {
+ display: fb,
+ filter: fb
+ }
+ }
+ };
+ h.extend(l.ext.internal, {
+ _fnExternApiFunc: Nb,
+ _fnBuildAjax: ta,
+ _fnAjaxUpdate: nb,
+ _fnAjaxParameters: wb,
+ _fnAjaxUpdateDraw: xb,
+ _fnAjaxDataSrc: ua,
+ _fnAddColumn: Ga,
+ _fnColumnOptions: la,
+ _fnAdjustColumnSizing: aa,
+ _fnVisibleToColumnIndex: ba,
+ _fnColumnIndexToVisible: ca,
+ _fnVisbleColumns: W,
+ _fnGetColumns: na,
+ _fnColumnTypes: Ia,
+ _fnApplyColumnDefs: kb,
+ _fnHungarianMap: $,
+ _fnCamelToHungarian: J,
+ _fnLanguageCompat: Ea,
+ _fnBrowserDetect: ib,
+ _fnAddData: O,
+ _fnAddTr: oa,
+ _fnNodeToDataIndex: function (a, b) {
+ return b._DT_RowIndex !== k ? b._DT_RowIndex : null
+ },
+ _fnNodeToColumnIndex: function (a,
+ b, c) {
+ return h.inArray(c, a.aoData[b].anCells)
+ },
+ _fnGetCellData: B,
+ _fnSetCellData: lb,
+ _fnSplitObjNotation: La,
+ _fnGetObjectDataFn: S,
+ _fnSetObjectDataFn: N,
+ _fnGetDataMaster: Ma,
+ _fnClearTable: pa,
+ _fnDeleteIndex: qa,
+ _fnInvalidate: ea,
+ _fnGetRowElements: Ka,
+ _fnCreateTr: Ja,
+ _fnBuildHead: mb,
+ _fnDrawHead: ga,
+ _fnDraw: P,
+ _fnReDraw: T,
+ _fnAddOptionsHtml: pb,
+ _fnDetectHeader: fa,
+ _fnGetUniqueThs: sa,
+ _fnFeatureHtmlFilter: rb,
+ _fnFilterComplete: ha,
+ _fnFilterCustom: Ab,
+ _fnFilterColumn: zb,
+ _fnFilter: yb,
+ _fnFilterCreateSearch: Ra,
+ _fnEscapeRegex: Sa,
+ _fnFilterData: Bb,
+ _fnFeatureHtmlInfo: ub,
+ _fnUpdateInfo: Eb,
+ _fnInfoMacros: Fb,
+ _fnInitialise: ia,
+ _fnInitComplete: va,
+ _fnLengthChange: Ta,
+ _fnFeatureHtmlLength: qb,
+ _fnFeatureHtmlPaginate: vb,
+ _fnPageChange: Va,
+ _fnFeatureHtmlProcessing: sb,
+ _fnProcessingDisplay: D,
+ _fnFeatureHtmlTable: tb,
+ _fnScrollDraw: ma,
+ _fnApplyToChildren: I,
+ _fnCalculateColumnWidths: Ha,
+ _fnThrottle: Qa,
+ _fnConvertToWidth: Gb,
+ _fnGetWidestNode: Hb,
+ _fnGetMaxLenString: Ib,
+ _fnStringToCss: w,
+ _fnSortFlatten: Y,
+ _fnSort: ob,
+ _fnSortAria: Kb,
+ _fnSortListener: Wa,
+ _fnSortAttachListener: Oa,
+ _fnSortingClasses: ya,
+ _fnSortData: Jb,
+ _fnSaveState: za,
+ _fnLoadState: Lb,
+ _fnSettingsFromNode: Aa,
+ _fnLog: K,
+ _fnMap: F,
+ _fnBindAction: Xa,
+ _fnCallbackReg: z,
+ _fnCallbackFire: t,
+ _fnLengthOverflow: Ua,
+ _fnRenderer: Pa,
+ _fnDataSource: y,
+ _fnRowAttributes: Na,
+ _fnExtend: Ya,
+ _fnCalculateEnd: function () {}
+ });
+ h.fn.dataTable = l;
+ l.$ = h;
+ h.fn.dataTableSettings = l.settings;
+ h.fn.dataTableExt = l.ext;
+ h.fn.DataTable = function (a) {
+ return h(this).dataTable(a).api()
+ };
+ h.each(l, function (a, b) {
+ h.fn.DataTable[a] = b
+ });
+ return h.fn.dataTable
+});
diff --git a/imt/public/favicon.ico b/imt/public/favicon.ico
new file mode 100644
index 0000000..e69de29
diff --git a/imt/public/img/makanan.png b/imt/public/img/makanan.png
new file mode 100644
index 0000000..a4d51a4
Binary files /dev/null and b/imt/public/img/makanan.png differ
diff --git a/imt/public/index.php b/imt/public/index.php
new file mode 100644
index 0000000..1d69f3a
--- /dev/null
+++ b/imt/public/index.php
@@ -0,0 +1,55 @@
+make(Kernel::class);
+
+$response = $kernel->handle(
+ $request = Request::capture()
+)->send();
+
+$kernel->terminate($request, $response);
diff --git a/imt/public/js/app.js b/imt/public/js/app.js
new file mode 100644
index 0000000..5edcc7c
--- /dev/null
+++ b/imt/public/js/app.js
@@ -0,0 +1,23172 @@
+/******/ (() => { // webpackBootstrap
+/******/ var __webpack_modules__ = ({
+
+/***/ "./node_modules/alpinejs/dist/module.esm.js":
+/*!**************************************************!*\
+ !*** ./node_modules/alpinejs/dist/module.esm.js ***!
+ \**************************************************/
+/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
+
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ Alpine: () => (/* binding */ src_default),
+/* harmony export */ "default": () => (/* binding */ module_default)
+/* harmony export */ });
+// packages/alpinejs/src/scheduler.js
+var flushPending = false;
+var flushing = false;
+var queue = [];
+var lastFlushedIndex = -1;
+function scheduler(callback) {
+ queueJob(callback);
+}
+function queueJob(job) {
+ if (!queue.includes(job))
+ queue.push(job);
+ queueFlush();
+}
+function dequeueJob(job) {
+ let index = queue.indexOf(job);
+ if (index !== -1 && index > lastFlushedIndex)
+ queue.splice(index, 1);
+}
+function queueFlush() {
+ if (!flushing && !flushPending) {
+ flushPending = true;
+ queueMicrotask(flushJobs);
+ }
+}
+function flushJobs() {
+ flushPending = false;
+ flushing = true;
+ for (let i = 0; i < queue.length; i++) {
+ queue[i]();
+ lastFlushedIndex = i;
+ }
+ queue.length = 0;
+ lastFlushedIndex = -1;
+ flushing = false;
+}
+
+// packages/alpinejs/src/reactivity.js
+var reactive;
+var effect;
+var release;
+var raw;
+var shouldSchedule = true;
+function disableEffectScheduling(callback) {
+ shouldSchedule = false;
+ callback();
+ shouldSchedule = true;
+}
+function setReactivityEngine(engine) {
+ reactive = engine.reactive;
+ release = engine.release;
+ effect = (callback) => engine.effect(callback, { scheduler: (task) => {
+ if (shouldSchedule) {
+ scheduler(task);
+ } else {
+ task();
+ }
+ } });
+ raw = engine.raw;
+}
+function overrideEffect(override) {
+ effect = override;
+}
+function elementBoundEffect(el) {
+ let cleanup2 = () => {
+ };
+ let wrappedEffect = (callback) => {
+ let effectReference = effect(callback);
+ if (!el._x_effects) {
+ el._x_effects = /* @__PURE__ */ new Set();
+ el._x_runEffects = () => {
+ el._x_effects.forEach((i) => i());
+ };
+ }
+ el._x_effects.add(effectReference);
+ cleanup2 = () => {
+ if (effectReference === void 0)
+ return;
+ el._x_effects.delete(effectReference);
+ release(effectReference);
+ };
+ return effectReference;
+ };
+ return [wrappedEffect, () => {
+ cleanup2();
+ }];
+}
+function watch(getter, callback) {
+ let firstTime = true;
+ let oldValue;
+ let effectReference = effect(() => {
+ let value = getter();
+ JSON.stringify(value);
+ if (!firstTime) {
+ queueMicrotask(() => {
+ callback(value, oldValue);
+ oldValue = value;
+ });
+ } else {
+ oldValue = value;
+ }
+ firstTime = false;
+ });
+ return () => release(effectReference);
+}
+
+// packages/alpinejs/src/utils/dispatch.js
+function dispatch(el, name, detail = {}) {
+ el.dispatchEvent(
+ new CustomEvent(name, {
+ detail,
+ bubbles: true,
+ // Allows events to pass the shadow DOM barrier.
+ composed: true,
+ cancelable: true
+ })
+ );
+}
+
+// packages/alpinejs/src/utils/walk.js
+function walk(el, callback) {
+ if (typeof ShadowRoot === "function" && el instanceof ShadowRoot) {
+ Array.from(el.children).forEach((el2) => walk(el2, callback));
+ return;
+ }
+ let skip = false;
+ callback(el, () => skip = true);
+ if (skip)
+ return;
+ let node = el.firstElementChild;
+ while (node) {
+ walk(node, callback, false);
+ node = node.nextElementSibling;
+ }
+}
+
+// packages/alpinejs/src/utils/warn.js
+function warn(message, ...args) {
+ console.warn(`Alpine Warning: ${message}`, ...args);
+}
+
+// packages/alpinejs/src/lifecycle.js
+var started = false;
+function start() {
+ if (started)
+ warn("Alpine has already been initialized on this page. Calling Alpine.start() more than once can cause problems.");
+ started = true;
+ if (!document.body)
+ warn("Unable to initialize. Trying to load Alpine before `` is available. Did you forget to add `defer` in Alpine's `
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/imt/resources/views/includes/style.blade.php b/imt/resources/views/includes/style.blade.php
new file mode 100644
index 0000000..480594e
--- /dev/null
+++ b/imt/resources/views/includes/style.blade.php
@@ -0,0 +1,98 @@
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/imt/resources/views/layouts/app.blade.php b/imt/resources/views/layouts/app.blade.php
new file mode 100644
index 0000000..d5729ff
--- /dev/null
+++ b/imt/resources/views/layouts/app.blade.php
@@ -0,0 +1,21 @@
+
+
+
+ @include('includes.meta')
+
+ @yield('title')
+
+ @include('includes.style')
+
+ @stack('after-style')
+
+
+
+ @yield('content')
+ @stack('before-script')
+
+ @include('includes.script')
+
+ @stack('after-script')
+
+
\ No newline at end of file
diff --git a/imt/resources/views/layouts/guest.blade.php b/imt/resources/views/layouts/guest.blade.php
new file mode 100644
index 0000000..ddf8d0d
--- /dev/null
+++ b/imt/resources/views/layouts/guest.blade.php
@@ -0,0 +1,29 @@
+
+
+
+
+
+
+
+ {{ config('app.name', 'Laravel') }}
+
+
+
+
+
+
+
+
+
+
+
diff --git a/imt/resources/views/layouts/main.blade.php b/imt/resources/views/layouts/main.blade.php
new file mode 100644
index 0000000..9cb715a
--- /dev/null
+++ b/imt/resources/views/layouts/main.blade.php
@@ -0,0 +1,23 @@
+
+
+
+ @include('includes.meta')
+
+ @yield('title')
+
+ @include('includes.style')
+
+ @stack('after-style')
+
+
+
+
+ @include('includes.navbar')
+ @yield('content')
+ @stack('before-script')
+
+ @include('includes.script')
+
+ @stack('after-script')
+
+
\ No newline at end of file
diff --git a/imt/resources/views/layouts/navigation.blade.php b/imt/resources/views/layouts/navigation.blade.php
new file mode 100644
index 0000000..38540c5
--- /dev/null
+++ b/imt/resources/views/layouts/navigation.blade.php
@@ -0,0 +1,100 @@
+
+
+
+
+
+
+
+
+
+
+
+ {{ __('Dashboard') }}
+
+
+
+
+
+
+
+
+
+ {{ Auth::user()->name }}
+
+
+
+
+
+
+
+ {{ __('Profile') }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ __('Dashboard') }}
+
+
+
+
+
+
+
{{ Auth::user()->name }}
+
{{ Auth::user()->email }}
+
+
+
+
+ {{ __('Profile') }}
+
+
+
+
+
+
+
+
diff --git a/imt/resources/views/pages/home/index.blade.php b/imt/resources/views/pages/home/index.blade.php
new file mode 100644
index 0000000..d17900d
--- /dev/null
+++ b/imt/resources/views/pages/home/index.blade.php
@@ -0,0 +1,61 @@
+@extends('layouts.main')
+
+@section('title', $title = 'Dashboard')
+
+@section('content')
+
+
+
+
+
+
{{ $pasien }}
+
Data Pasien
+
+
+
+
+
+
+
+
+
+
+
{{ $kriteria }}
+
Data Kriteria
+
+
+
+
+
+
+
+
+
+
+
{{ $makanan }}
+
Alternatif Makanan
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Penjelasan Singkat
+
+ Aplikasi SPK (Sistem Pendukung Keputusan) Rekomendasi menu makanan merupakan sebuah aplikasi yang dirancang untuk memberikan rekomendasi menu makanan yang sesuai bagi pengguna. Aplikasi ini menggunakan metode SAW (Simple Additive Weighting) dalam proses pengambilan keputusan. Metode SAW adalah salah satu metode yang digunakan dalam SPK untuk memberikan bobot pada setiap kriteria yang digunakan dalam pengambilan keputusan.
+
+
+
+
+
+@endsection
diff --git a/imt/resources/views/pages/kriteria/create.blade.php b/imt/resources/views/pages/kriteria/create.blade.php
new file mode 100644
index 0000000..472c1af
--- /dev/null
+++ b/imt/resources/views/pages/kriteria/create.blade.php
@@ -0,0 +1,75 @@
+@extends('layouts.main')
+
+@section('title', $title = 'Tambah Data Kriteria')
+
+@section('content')
+
+
+
Tambah Data Kriteria
+
+
+
+@endsection
diff --git a/imt/resources/views/pages/kriteria/edit.blade.php b/imt/resources/views/pages/kriteria/edit.blade.php
new file mode 100644
index 0000000..5070329
--- /dev/null
+++ b/imt/resources/views/pages/kriteria/edit.blade.php
@@ -0,0 +1,74 @@
+@extends('layouts.main')
+
+@section('title', $title = 'Edit Data Kriteria')
+
+@section('content')
+
+
+
Data Kriteria
+
Edit Data Kriteria
+
+
+
+@endsection
diff --git a/imt/resources/views/pages/kriteria/index.blade.php b/imt/resources/views/pages/kriteria/index.blade.php
new file mode 100644
index 0000000..e0b8138
--- /dev/null
+++ b/imt/resources/views/pages/kriteria/index.blade.php
@@ -0,0 +1,55 @@
+@extends('layouts.main')
+
+@section('title', $title = 'Data Kriteria')
+
+@section('content')
+
+
+
Data Kriteria
+
+
+
+
+
+
+
+
+ No
+ Kode
+ Nama
+ Tipe Kriteria
+ Bobot
+ Aksi
+
+
+
+ @foreach ($kriterias as $key => $kriteria)
+
+ {{ $key+1 }}
+ {{ $kriteria->kode }}
+ {{ $kriteria->nama }}
+ {{ $kriteria->tipeKriteria->nama }}
+ {{ str_replace('.', ',', $kriteria->bobot) }}
+
+
+ Edit
+
+
+ Delete
+
+
+
+ @endforeach
+
+
+
+
+
+
+
+@endsection
+
diff --git a/imt/resources/views/pages/makanan/create.blade.php b/imt/resources/views/pages/makanan/create.blade.php
new file mode 100644
index 0000000..3049955
--- /dev/null
+++ b/imt/resources/views/pages/makanan/create.blade.php
@@ -0,0 +1,175 @@
+@extends('layouts.main')
+
+@section('title', $title = 'Tambah Makanan Alternatif')
+
+@section('content')
+
+
+
Tambah Makanan Alternatif
+
+
+
+@endsection
diff --git a/imt/resources/views/pages/makanan/detail.blade.php b/imt/resources/views/pages/makanan/detail.blade.php
new file mode 100644
index 0000000..8059b58
--- /dev/null
+++ b/imt/resources/views/pages/makanan/detail.blade.php
@@ -0,0 +1,810 @@
+@extends('layouts.main')
+
+@section('title', $title = 'Detail Alternatif Makanan')
+
+@section('content')
+
+
+
Alternatif Makanan
+
Detail Alternatif Makanan / {{ $makanan->nama }}
+
+
+
+
+
+
+
+
+ {{-- pagi --}}
+
+
+
+ Tambah
+
+ {{-- modal tambah makanan pagi --}}
+
+
+
+
+
+
+ Pagi
+ Berat
+ Kalori
+ Aksi
+
+
+
+ @foreach ($detailMakanan as $detail)
+ @if ($detail->waktu == 'Pagi')
+
+ {{ $detail->nama_makanan }}
+ {{ $detail->berat }}
+ {{ $detail->kalori }}
+
+
+ Edit
+
+ {{-- edit modal makanan pagi --}}
+
+
+ Delete
+
+
+
+ @endif
+ @endforeach
+
+
+
+
+
+ {{-- snack pagi --}}
+
+
+
+ Tambah
+
+ {{-- modal tambah snack pagi --}}
+
+
+
+
+
+
+
+ Snack Pagi
+ Berat
+ Kalori
+ Aksi
+
+
+
+ @foreach ($detailMakanan as $detail)
+ @if ($detail->waktu == 'Snack Pagi')
+
+ {{ $detail->nama_makanan }}
+ {{ $detail->berat }}
+ {{ $detail->kalori }}
+
+
+ Edit
+
+ {{-- edit modal snack pagi --}}
+
+
+ Delete
+
+
+
+ @endif
+ @endforeach
+
+
+
+
+
+ {{-- siang --}}
+
+
+
+ Tambah
+
+ {{-- modal tambah siang --}}
+
+
+
+
+
+
+
+ Siang
+ Berat
+ Kalori
+ Aksi
+
+
+
+ @foreach ($detailMakanan as $detail)
+ @if ($detail->waktu == 'Siang')
+
+ {{ $detail->nama_makanan }}
+ {{ $detail->berat }}
+ {{ $detail->kalori }}
+
+
+ Edit
+
+ {{-- edit modal snack pagi --}}
+
+
+ Delete
+
+
+
+ @endif
+ @endforeach
+
+
+
+
+
+ {{-- snack siang --}}
+
+
+
+ Tambah
+
+ {{-- modal tambah snack snacksiang --}}
+
+
+
+
+
+
+
+ Snack Siang
+ Berat
+ Kalori
+ Aksi
+
+
+
+ @foreach ($detailMakanan as $detail)
+ @if ($detail->waktu == 'Snack Siang')
+
+ {{ $detail->nama_makanan }}
+ {{ $detail->berat }}
+ {{ $detail->kalori }}
+
+
+ Edit
+
+ {{-- edit modal snack snacksiang --}}
+
+
+ Delete
+
+
+
+ @endif
+ @endforeach
+
+
+
+
+
+ {{-- malam --}}
+
+
+
+ Tambah
+
+ {{-- modal tambah malam --}}
+
+
+
+
+
+
+
+ Malam
+ Berat
+ Kalori
+ Aksi
+
+
+
+ @foreach ($detailMakanan as $detail)
+ @if ($detail->waktu == 'Malam')
+
+ {{ $detail->nama_makanan }}
+ {{ $detail->berat }}
+ {{ $detail->kalori }}
+
+
+ Edit
+
+ {{-- edit modal snack pagi --}}
+
+
+ Delete
+
+
+
+ @endif
+ @endforeach
+
+
+
+
+
+ {{-- total kalori --}}
+
+
+
+
+
+ Total
+ {{ $count }}
+
+
+
+
+
+
+
+
+
+
+
+@endsection
diff --git a/imt/resources/views/pages/makanan/edit.blade.php b/imt/resources/views/pages/makanan/edit.blade.php
new file mode 100644
index 0000000..4ee7ed4
--- /dev/null
+++ b/imt/resources/views/pages/makanan/edit.blade.php
@@ -0,0 +1,176 @@
+@extends('layouts.main')
+
+@section('title', $title = 'Edit Makanan Alternatif')
+
+@section('content')
+
+
+
Edit Makanan Alternatif
+
+
+
+@endsection
diff --git a/imt/resources/views/pages/makanan/index.blade.php b/imt/resources/views/pages/makanan/index.blade.php
new file mode 100644
index 0000000..bb53a1c
--- /dev/null
+++ b/imt/resources/views/pages/makanan/index.blade.php
@@ -0,0 +1,53 @@
+@extends('layouts.main')
+
+@section('title', $title = 'Data Makanan')
+
+@section('content')
+
+
+
Alternatif Makanan
+
+
+
+
+
+
+
+
+ No
+ Kalori
+ Alternatif
+ Aksi
+
+
+
+ @foreach ($makanan as $key => $value)
+
+ {{ $key+1 }}
+ {{ $value->kode }}
+ {{ $value->alternatif }}
+
+
+ Detail
+
+
+ Edit
+
+
+ Delete
+
+
+
+ @endforeach
+
+
+
+
+
+
+@endsection
+
diff --git a/imt/resources/views/pages/pasien/create.blade.php b/imt/resources/views/pages/pasien/create.blade.php
new file mode 100644
index 0000000..72cadb9
--- /dev/null
+++ b/imt/resources/views/pages/pasien/create.blade.php
@@ -0,0 +1,125 @@
+@extends('layouts.main')
+
+@section('title', $title = 'Tambah Data Pasien')
+
+@section('content')
+
+
+
Tambah Data Pasien
+
+
+
+@endsection
diff --git a/imt/resources/views/pages/pasien/detail.blade.php b/imt/resources/views/pages/pasien/detail.blade.php
new file mode 100644
index 0000000..01bb44c
--- /dev/null
+++ b/imt/resources/views/pages/pasien/detail.blade.php
@@ -0,0 +1,59 @@
+@extends('layouts.main')
+
+@section('title', $title = 'Detail Data Pasien')
+
+@section('content')
+
+
+
Data Pasien
+
Detail Data Pasien / {{ $pasien->nama }}
+
+
+
+@endsection
diff --git a/imt/resources/views/pages/pasien/edit.blade.php b/imt/resources/views/pages/pasien/edit.blade.php
new file mode 100644
index 0000000..c5d1a1e
--- /dev/null
+++ b/imt/resources/views/pages/pasien/edit.blade.php
@@ -0,0 +1,126 @@
+@extends('layouts.main')
+
+@section('title', $title = 'Edit Data Pasien')
+
+@section('content')
+
+
+
Data Pasien
+
Edit Data Pasien / {{ $pasien->nama }}
+
+
+
+@endsection
diff --git a/imt/resources/views/pages/pasien/index.blade.php b/imt/resources/views/pages/pasien/index.blade.php
new file mode 100644
index 0000000..cab2564
--- /dev/null
+++ b/imt/resources/views/pages/pasien/index.blade.php
@@ -0,0 +1,61 @@
+@extends('layouts.main')
+
+@section('title', $title = 'Data Pasien')
+
+@section('content')
+
+
+
Data Pasien
+
+
+
+
+
+
+
+
+ No
+ Nama
+ Jenis Kelamin
+ Aktivitas
+ Kadar Gula Darah
+ Aksi
+
+
+
+ @foreach ($pasiens as $key => $pasien)
+
+ {{ $key+1 }}
+ {{ $pasien->nama }}
+ {{ $pasien->jenisKelamin->jenis_kelamin }}
+ {{ $pasien->aktivitas->nama }}
+ {{ $pasien->kadarGula->kadar_gula }}
+
+
+ Detail
+
+
+ Edit
+
+
+ Delete
+
+
+ Proses
+
+
+
+ @endforeach
+
+
+
+
+
+
+
+@endsection
+
diff --git a/imt/resources/views/pages/perhitungan/cetak.blade.php b/imt/resources/views/pages/perhitungan/cetak.blade.php
new file mode 100644
index 0000000..41f4dbd
--- /dev/null
+++ b/imt/resources/views/pages/perhitungan/cetak.blade.php
@@ -0,0 +1,125 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Rekomendasi Alternatif Makanan
+
+
+ Berdasarkan perhitungan menggunakan Sistem Pendukung Keputusan (SPK)
+ menggunakan metode Simple Additive Weighting (SAW) dengan melakukan penilaian
+ terhadap kriteria pada masing-masing alternatif makanan.
+
+
+
+
Nama : {{ $pasien->nama }}
+
Kebutuhan Kalori : {{ $pasien->kebutuhanKalori->kebutuhan_kalori }}
+
+
+
+ Waktu
+ Makanan
+ Berat (g)
+ Kalori
+
+ @foreach ($pagi as $key1 => $detail)
+
+ @if($key1 == 0)
+ Pagi
+ @else
+
+ @endif
+ {{ $detail->nama_makanan }}
+ {{ $detail->berat }}
+ {{ $detail->kalori }}
+
+ @endforeach
+ @foreach ($snackpagi as $key2 => $detail)
+
+ @if($key2 == 0)
+ Snack Pagi
+ @else
+
+ @endif
+ {{ $detail->nama_makanan }}
+ {{ $detail->berat }}
+ {{ $detail->kalori }}
+
+ @endforeach
+ @foreach ($siang as $key3 => $detail)
+
+ @if($key3 == 0)
+ Siang
+ @else
+
+ @endif
+ {{ $detail->nama_makanan }}
+ {{ $detail->berat }}
+ {{ $detail->kalori }}
+
+ @endforeach
+ @foreach ($snacksiang as $key4 => $detail)
+
+ @if($key4 == 0)
+ Snack Siang
+ @else
+
+ @endif
+ {{ $detail->nama_makanan }}
+ {{ $detail->berat }}
+ {{ $detail->kalori }}
+
+ @endforeach
+ @foreach ($malam as $key5 => $detail)
+
+ @if($key5 == 0)
+ Malam
+ @else
+
+ @endif
+ {{ $detail->nama_makanan }}
+ {{ $detail->berat }}
+ {{ $detail->kalori }}
+
+ @endforeach
+
+
+
+
+
+
+
+
+
diff --git a/imt/resources/views/pages/perhitungan/index.blade.php b/imt/resources/views/pages/perhitungan/index.blade.php
new file mode 100644
index 0000000..2c14ed2
--- /dev/null
+++ b/imt/resources/views/pages/perhitungan/index.blade.php
@@ -0,0 +1,266 @@
+@extends('layouts.main')
+
+@section('title', $title = 'Proses Perhitungan')
+
+@section('content')
+
+
+
Proses Perhitungan
+
+
+
+ {{--
--}}
+
1. Data Masing-Masing Menu Terhadap Kriteria
+
+
+
+
+ No
+ Alternatif
+ Karbohidrat
+ Lemak
+ Protein
+ Serat
+
+
+
+ @foreach ($makanan as $key => $value)
+
+ {{ $key+1 }}
+ {{ $value->alternatif }}
+ @foreach ($value->kriteria_makanan as $key => $item)
+ {{ $item->nilai }}
+ @endforeach
+
+ @endforeach
+
+
+
+
+
+
+ MIN
+
+
+
+
+
+
+
+ MAX
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{--
--}}
+
2. Nilai Normalisasi
+
+
+
+
+ No
+ Alternatif
+ Karbohidrat
+ Lemak
+ Protein
+ Serat
+
+
+
+ @foreach ($makanan as $key => $value)
+
+ {{ $key+1 }}
+ {{ $value->alternatif }}
+
+
+
+
+
+ @endforeach
+
+
+
+
+
+
+
+
+ {{--
--}}
+
3. Perankingan Menu
+
+
+
+
+ No
+ Alternatif
+ Karbohidrat
+ Lemak
+ Protein
+ Serat
+ Hasil
+ Ranking
+ Cetak
+
+
+
+ @foreach ($makanan as $key => $value)
+
+ {{ $key+1 }}
+ {{ $value->alternatif }}
+
+
+
+
+
+
+
+ Cetak
+
+
+ @endforeach
+
+
+
+
+
+
+@endsection
+
+
+
+
diff --git a/imt/resources/views/profile/edit.blade.php b/imt/resources/views/profile/edit.blade.php
new file mode 100644
index 0000000..d370007
--- /dev/null
+++ b/imt/resources/views/profile/edit.blade.php
@@ -0,0 +1,66 @@
+@extends('layouts.main')
+
+@section('title', $title = 'Edit Data Profile')
+
+@section('content')
+
+@endsection
diff --git a/imt/routes/api.php b/imt/routes/api.php
new file mode 100644
index 0000000..eb6fa48
--- /dev/null
+++ b/imt/routes/api.php
@@ -0,0 +1,19 @@
+get('/user', function (Request $request) {
+ return $request->user();
+});
diff --git a/imt/routes/auth.php b/imt/routes/auth.php
new file mode 100644
index 0000000..1040b51
--- /dev/null
+++ b/imt/routes/auth.php
@@ -0,0 +1,59 @@
+group(function () {
+ Route::get('register', [RegisteredUserController::class, 'create'])
+ ->name('register');
+
+ Route::post('register', [RegisteredUserController::class, 'store']);
+
+ Route::get('login', [AuthenticatedSessionController::class, 'create'])
+ ->name('login');
+
+ Route::post('login', [AuthenticatedSessionController::class, 'store']);
+
+ Route::get('forgot-password', [PasswordResetLinkController::class, 'create'])
+ ->name('password.request');
+
+ Route::post('forgot-password', [PasswordResetLinkController::class, 'store'])
+ ->name('password.email');
+
+ Route::get('reset-password/{token}', [NewPasswordController::class, 'create'])
+ ->name('password.reset');
+
+ Route::post('reset-password', [NewPasswordController::class, 'store'])
+ ->name('password.store');
+});
+
+Route::middleware('auth')->group(function () {
+ Route::get('verify-email', EmailVerificationPromptController::class)
+ ->name('verification.notice');
+
+ Route::get('verify-email/{id}/{hash}', VerifyEmailController::class)
+ ->middleware(['signed', 'throttle:6,1'])
+ ->name('verification.verify');
+
+ Route::post('email/verification-notification', [EmailVerificationNotificationController::class, 'store'])
+ ->middleware('throttle:6,1')
+ ->name('verification.send');
+
+ Route::get('confirm-password', [ConfirmablePasswordController::class, 'show'])
+ ->name('password.confirm');
+
+ Route::post('confirm-password', [ConfirmablePasswordController::class, 'store']);
+
+ Route::put('password', [PasswordController::class, 'update'])->name('password.update');
+
+ Route::post('logout', [AuthenticatedSessionController::class, 'destroy'])
+ ->name('logout');
+});
diff --git a/imt/routes/channels.php b/imt/routes/channels.php
new file mode 100644
index 0000000..5d451e1
--- /dev/null
+++ b/imt/routes/channels.php
@@ -0,0 +1,18 @@
+id === (int) $id;
+});
diff --git a/imt/routes/console.php b/imt/routes/console.php
new file mode 100644
index 0000000..e05f4c9
--- /dev/null
+++ b/imt/routes/console.php
@@ -0,0 +1,19 @@
+comment(Inspiring::quote());
+})->purpose('Display an inspiring quote');
diff --git a/imt/routes/web.php b/imt/routes/web.php
new file mode 100644
index 0000000..2d029b6
--- /dev/null
+++ b/imt/routes/web.php
@@ -0,0 +1,74 @@
+ ['verified', 'auth']], function () {
+ Route::get('/home', [DashboardController::class, 'index'])->name('home');
+});
+
+//Data Pasien
+Route::group(['middleware' => ['verified', 'auth']], function () {
+ Route::get('/home/datapasien', [PasienController::class, 'index'])->name('pasien.index');
+ Route::get('/home/datapasien/create', [PasienController::class, 'create'])->name('pasien.create');
+ Route::post('/home/datapasien/store', [PasienController::class, 'store'])->name('pasien.store');
+ Route::get('/home/datapasien/edit/{id}', [PasienController::class, 'edit'])->name('pasien.edit');
+ Route::post('/home/datapasien/update/{id}', [PasienController::class, 'update'])->name('pasien.update');
+ Route::get('/home/datapasien/show/{id}', [PasienController::class, 'show'])->name('pasien.show');
+ Route::get('/home/datapasien/destroy/{id}', [PasienController::class, 'destroy'])->name('pasien.destroy');
+});
+
+//Makanan
+Route::group(['middleware' => ['verified', 'auth']], function () {
+ Route::get('/home/makanan', [MakananController::class, 'index'])->name('makanan.index');
+ Route::get('/home/makanan/create', [MakananController::class, 'create'])->name('makanan.create');
+ Route::post('/home/makanan/store', [MakananController::class, 'store'])->name('makanan.store');
+ Route::get('/home/makanan/edit/{id}', [MakananController::class, 'edit'])->name('makanan.edit');
+ Route::post('/home/makanan/update/{id}', [MakananController::class, 'update'])->name('makanan.update');
+ Route::get('/home/makanan/show/{id}', [MakananController::class, 'show'])->name('makanan.show');
+ Route::get('/home/makanan/destroy/{id}', [MakananController::class, 'destroy'])->name('makanan.destroy');
+ Route::post('/home/makanan/store/detailmakanan/{idMakanan}', [MakananController::class, 'storeDetailMakanan'])->name('makanan.tambahdetailmakanan');
+ Route::get('/home/makanan/destroy/detailmakanan/{id}/{idMakanan}', [MakananController::class, 'destroyDetailMakanan'])->name('makanan.destroydetailmakanan');
+ Route::post('/home/makanan/update/detailmakanan/{id}/{idMakanan}', [MakananController::class, 'updateDetailMakanan'])->name('makanan.updatedetailmakanan');
+});
+
+//kriteria
+Route::group(['middleware' => ['verified', 'auth']], function () {
+ Route::get('/home/kriteria', [KriteriaController::class, 'index'])->name('kriteria.index');
+ Route::get('/home/kriteria/create', [KriteriaController::class, 'create'])->name('kriteria.create');
+ Route::post('/home/kriteria/store', [KriteriaController::class, 'store'])->name('kriteria.store');
+ Route::get('/home/kriteria/edit/{id}', [KriteriaController::class, 'edit'])->name('kriteria.edit');
+ Route::post('/home/kriteria/update/{id}', [KriteriaController::class, 'update'])->name('kriteria.update');
+ Route::get('/home/kriteria/destroy/{id}', [KriteriaController::class, 'destroy'])->name('kriteria.destroy');
+});
+
+Route::get('/home/perhitungan/{id}', [PerhitunganController::class, 'index'])->name('perhitungan.index');
+Route::get('/home/perhitungan/cetak/{id}/{pasien}', [PerhitunganController::class, 'cetak'])->name('cetak.index');
+
+Route::group(['middleware' => ['verified', 'auth']], function () {
+ Route::get('/home/profile/{id}', [ProfileController::class, 'edit'])->name('profile.edit');
+ Route::post('/home/profile/{id}', [ProfileController::class, 'update'])->name('profile.update');
+});
+
+require __DIR__ . '/auth.php';
diff --git a/imt/storage/app/.gitignore b/imt/storage/app/.gitignore
new file mode 100644
index 0000000..8f4803c
--- /dev/null
+++ b/imt/storage/app/.gitignore
@@ -0,0 +1,3 @@
+*
+!public/
+!.gitignore
diff --git a/imt/storage/app/public/.gitignore b/imt/storage/app/public/.gitignore
new file mode 100644
index 0000000..d6b7ef3
--- /dev/null
+++ b/imt/storage/app/public/.gitignore
@@ -0,0 +1,2 @@
+*
+!.gitignore
diff --git a/imt/storage/framework/.gitignore b/imt/storage/framework/.gitignore
new file mode 100644
index 0000000..05c4471
--- /dev/null
+++ b/imt/storage/framework/.gitignore
@@ -0,0 +1,9 @@
+compiled.php
+config.php
+down
+events.scanned.php
+maintenance.php
+routes.php
+routes.scanned.php
+schedule-*
+services.json
diff --git a/imt/storage/framework/cache/.gitignore b/imt/storage/framework/cache/.gitignore
new file mode 100644
index 0000000..01e4a6c
--- /dev/null
+++ b/imt/storage/framework/cache/.gitignore
@@ -0,0 +1,3 @@
+*
+!data/
+!.gitignore
diff --git a/imt/storage/framework/cache/data/.gitignore b/imt/storage/framework/cache/data/.gitignore
new file mode 100644
index 0000000..d6b7ef3
--- /dev/null
+++ b/imt/storage/framework/cache/data/.gitignore
@@ -0,0 +1,2 @@
+*
+!.gitignore
diff --git a/imt/storage/framework/sessions/.gitignore b/imt/storage/framework/sessions/.gitignore
new file mode 100644
index 0000000..d6b7ef3
--- /dev/null
+++ b/imt/storage/framework/sessions/.gitignore
@@ -0,0 +1,2 @@
+*
+!.gitignore
diff --git a/imt/storage/framework/testing/.gitignore b/imt/storage/framework/testing/.gitignore
new file mode 100644
index 0000000..d6b7ef3
--- /dev/null
+++ b/imt/storage/framework/testing/.gitignore
@@ -0,0 +1,2 @@
+*
+!.gitignore
diff --git a/imt/storage/framework/views/.gitignore b/imt/storage/framework/views/.gitignore
new file mode 100644
index 0000000..d6b7ef3
--- /dev/null
+++ b/imt/storage/framework/views/.gitignore
@@ -0,0 +1,2 @@
+*
+!.gitignore
diff --git a/imt/storage/logs/.gitignore b/imt/storage/logs/.gitignore
new file mode 100644
index 0000000..d6b7ef3
--- /dev/null
+++ b/imt/storage/logs/.gitignore
@@ -0,0 +1,2 @@
+*
+!.gitignore
diff --git a/imt/tailwind.config.js b/imt/tailwind.config.js
new file mode 100644
index 0000000..cc2dc6d
--- /dev/null
+++ b/imt/tailwind.config.js
@@ -0,0 +1,20 @@
+const defaultTheme = require('tailwindcss/defaultTheme');
+
+/** @type {import('tailwindcss').Config} */
+module.exports = {
+ content: [
+ './vendor/laravel/framework/src/Illuminate/Pagination/resources/views/*.blade.php',
+ './storage/framework/views/*.php',
+ './resources/views/**/*.blade.php',
+ ],
+
+ theme: {
+ extend: {
+ fontFamily: {
+ sans: ['Figtree', ...defaultTheme.fontFamily.sans],
+ },
+ },
+ },
+
+ plugins: [require('@tailwindcss/forms')],
+};
diff --git a/imt/tests/CreatesApplication.php b/imt/tests/CreatesApplication.php
new file mode 100644
index 0000000..547152f
--- /dev/null
+++ b/imt/tests/CreatesApplication.php
@@ -0,0 +1,22 @@
+make(Kernel::class)->bootstrap();
+
+ return $app;
+ }
+}
diff --git a/imt/tests/Feature/Auth/AuthenticationTest.php b/imt/tests/Feature/Auth/AuthenticationTest.php
new file mode 100644
index 0000000..2d0eeed
--- /dev/null
+++ b/imt/tests/Feature/Auth/AuthenticationTest.php
@@ -0,0 +1,45 @@
+get('/login');
+
+ $response->assertStatus(200);
+ }
+
+ public function test_users_can_authenticate_using_the_login_screen(): void
+ {
+ $user = User::factory()->create();
+
+ $response = $this->post('/login', [
+ 'email' => $user->email,
+ 'password' => 'password',
+ ]);
+
+ $this->assertAuthenticated();
+ $response->assertRedirect(RouteServiceProvider::HOME);
+ }
+
+ public function test_users_can_not_authenticate_with_invalid_password(): void
+ {
+ $user = User::factory()->create();
+
+ $this->post('/login', [
+ 'email' => $user->email,
+ 'password' => 'wrong-password',
+ ]);
+
+ $this->assertGuest();
+ }
+}
diff --git a/imt/tests/Feature/Auth/EmailVerificationTest.php b/imt/tests/Feature/Auth/EmailVerificationTest.php
new file mode 100644
index 0000000..ba19d9c
--- /dev/null
+++ b/imt/tests/Feature/Auth/EmailVerificationTest.php
@@ -0,0 +1,65 @@
+create([
+ 'email_verified_at' => null,
+ ]);
+
+ $response = $this->actingAs($user)->get('/verify-email');
+
+ $response->assertStatus(200);
+ }
+
+ public function test_email_can_be_verified(): void
+ {
+ $user = User::factory()->create([
+ 'email_verified_at' => null,
+ ]);
+
+ Event::fake();
+
+ $verificationUrl = URL::temporarySignedRoute(
+ 'verification.verify',
+ now()->addMinutes(60),
+ ['id' => $user->id, 'hash' => sha1($user->email)]
+ );
+
+ $response = $this->actingAs($user)->get($verificationUrl);
+
+ Event::assertDispatched(Verified::class);
+ $this->assertTrue($user->fresh()->hasVerifiedEmail());
+ $response->assertRedirect(RouteServiceProvider::HOME.'?verified=1');
+ }
+
+ public function test_email_is_not_verified_with_invalid_hash(): void
+ {
+ $user = User::factory()->create([
+ 'email_verified_at' => null,
+ ]);
+
+ $verificationUrl = URL::temporarySignedRoute(
+ 'verification.verify',
+ now()->addMinutes(60),
+ ['id' => $user->id, 'hash' => sha1('wrong-email')]
+ );
+
+ $this->actingAs($user)->get($verificationUrl);
+
+ $this->assertFalse($user->fresh()->hasVerifiedEmail());
+ }
+}
diff --git a/imt/tests/Feature/Auth/PasswordConfirmationTest.php b/imt/tests/Feature/Auth/PasswordConfirmationTest.php
new file mode 100644
index 0000000..ff85721
--- /dev/null
+++ b/imt/tests/Feature/Auth/PasswordConfirmationTest.php
@@ -0,0 +1,44 @@
+create();
+
+ $response = $this->actingAs($user)->get('/confirm-password');
+
+ $response->assertStatus(200);
+ }
+
+ public function test_password_can_be_confirmed(): void
+ {
+ $user = User::factory()->create();
+
+ $response = $this->actingAs($user)->post('/confirm-password', [
+ 'password' => 'password',
+ ]);
+
+ $response->assertRedirect();
+ $response->assertSessionHasNoErrors();
+ }
+
+ public function test_password_is_not_confirmed_with_invalid_password(): void
+ {
+ $user = User::factory()->create();
+
+ $response = $this->actingAs($user)->post('/confirm-password', [
+ 'password' => 'wrong-password',
+ ]);
+
+ $response->assertSessionHasErrors();
+ }
+}
diff --git a/imt/tests/Feature/Auth/PasswordResetTest.php b/imt/tests/Feature/Auth/PasswordResetTest.php
new file mode 100644
index 0000000..4a26065
--- /dev/null
+++ b/imt/tests/Feature/Auth/PasswordResetTest.php
@@ -0,0 +1,71 @@
+get('/forgot-password');
+
+ $response->assertStatus(200);
+ }
+
+ public function test_reset_password_link_can_be_requested(): void
+ {
+ Notification::fake();
+
+ $user = User::factory()->create();
+
+ $this->post('/forgot-password', ['email' => $user->email]);
+
+ Notification::assertSentTo($user, ResetPassword::class);
+ }
+
+ public function test_reset_password_screen_can_be_rendered(): void
+ {
+ Notification::fake();
+
+ $user = User::factory()->create();
+
+ $this->post('/forgot-password', ['email' => $user->email]);
+
+ Notification::assertSentTo($user, ResetPassword::class, function ($notification) {
+ $response = $this->get('/reset-password/'.$notification->token);
+
+ $response->assertStatus(200);
+
+ return true;
+ });
+ }
+
+ public function test_password_can_be_reset_with_valid_token(): void
+ {
+ Notification::fake();
+
+ $user = User::factory()->create();
+
+ $this->post('/forgot-password', ['email' => $user->email]);
+
+ Notification::assertSentTo($user, ResetPassword::class, function ($notification) use ($user) {
+ $response = $this->post('/reset-password', [
+ 'token' => $notification->token,
+ 'email' => $user->email,
+ 'password' => 'password',
+ 'password_confirmation' => 'password',
+ ]);
+
+ $response->assertSessionHasNoErrors();
+
+ return true;
+ });
+ }
+}
diff --git a/imt/tests/Feature/Auth/PasswordUpdateTest.php b/imt/tests/Feature/Auth/PasswordUpdateTest.php
new file mode 100644
index 0000000..ca28c6c
--- /dev/null
+++ b/imt/tests/Feature/Auth/PasswordUpdateTest.php
@@ -0,0 +1,51 @@
+create();
+
+ $response = $this
+ ->actingAs($user)
+ ->from('/profile')
+ ->put('/password', [
+ 'current_password' => 'password',
+ 'password' => 'new-password',
+ 'password_confirmation' => 'new-password',
+ ]);
+
+ $response
+ ->assertSessionHasNoErrors()
+ ->assertRedirect('/profile');
+
+ $this->assertTrue(Hash::check('new-password', $user->refresh()->password));
+ }
+
+ public function test_correct_password_must_be_provided_to_update_password(): void
+ {
+ $user = User::factory()->create();
+
+ $response = $this
+ ->actingAs($user)
+ ->from('/profile')
+ ->put('/password', [
+ 'current_password' => 'wrong-password',
+ 'password' => 'new-password',
+ 'password_confirmation' => 'new-password',
+ ]);
+
+ $response
+ ->assertSessionHasErrorsIn('updatePassword', 'current_password')
+ ->assertRedirect('/profile');
+ }
+}
diff --git a/imt/tests/Feature/Auth/RegistrationTest.php b/imt/tests/Feature/Auth/RegistrationTest.php
new file mode 100644
index 0000000..30829b1
--- /dev/null
+++ b/imt/tests/Feature/Auth/RegistrationTest.php
@@ -0,0 +1,32 @@
+get('/register');
+
+ $response->assertStatus(200);
+ }
+
+ public function test_new_users_can_register(): void
+ {
+ $response = $this->post('/register', [
+ 'name' => 'Test User',
+ 'email' => 'test@example.com',
+ 'password' => 'password',
+ 'password_confirmation' => 'password',
+ ]);
+
+ $this->assertAuthenticated();
+ $response->assertRedirect(RouteServiceProvider::HOME);
+ }
+}
diff --git a/imt/tests/Feature/ExampleTest.php b/imt/tests/Feature/ExampleTest.php
new file mode 100644
index 0000000..78ccc21
--- /dev/null
+++ b/imt/tests/Feature/ExampleTest.php
@@ -0,0 +1,21 @@
+get('/');
+
+ $response->assertStatus(200);
+ }
+}
diff --git a/imt/tests/Feature/ProfileTest.php b/imt/tests/Feature/ProfileTest.php
new file mode 100644
index 0000000..252fdcc
--- /dev/null
+++ b/imt/tests/Feature/ProfileTest.php
@@ -0,0 +1,99 @@
+create();
+
+ $response = $this
+ ->actingAs($user)
+ ->get('/profile');
+
+ $response->assertOk();
+ }
+
+ public function test_profile_information_can_be_updated(): void
+ {
+ $user = User::factory()->create();
+
+ $response = $this
+ ->actingAs($user)
+ ->patch('/profile', [
+ 'name' => 'Test User',
+ 'email' => 'test@example.com',
+ ]);
+
+ $response
+ ->assertSessionHasNoErrors()
+ ->assertRedirect('/profile');
+
+ $user->refresh();
+
+ $this->assertSame('Test User', $user->name);
+ $this->assertSame('test@example.com', $user->email);
+ $this->assertNull($user->email_verified_at);
+ }
+
+ public function test_email_verification_status_is_unchanged_when_the_email_address_is_unchanged(): void
+ {
+ $user = User::factory()->create();
+
+ $response = $this
+ ->actingAs($user)
+ ->patch('/profile', [
+ 'name' => 'Test User',
+ 'email' => $user->email,
+ ]);
+
+ $response
+ ->assertSessionHasNoErrors()
+ ->assertRedirect('/profile');
+
+ $this->assertNotNull($user->refresh()->email_verified_at);
+ }
+
+ public function test_user_can_delete_their_account(): void
+ {
+ $user = User::factory()->create();
+
+ $response = $this
+ ->actingAs($user)
+ ->delete('/profile', [
+ 'password' => 'password',
+ ]);
+
+ $response
+ ->assertSessionHasNoErrors()
+ ->assertRedirect('/');
+
+ $this->assertGuest();
+ $this->assertNull($user->fresh());
+ }
+
+ public function test_correct_password_must_be_provided_to_delete_account(): void
+ {
+ $user = User::factory()->create();
+
+ $response = $this
+ ->actingAs($user)
+ ->from('/profile')
+ ->delete('/profile', [
+ 'password' => 'wrong-password',
+ ]);
+
+ $response
+ ->assertSessionHasErrorsIn('userDeletion', 'password')
+ ->assertRedirect('/profile');
+
+ $this->assertNotNull($user->fresh());
+ }
+}
diff --git a/imt/tests/TestCase.php b/imt/tests/TestCase.php
new file mode 100644
index 0000000..2932d4a
--- /dev/null
+++ b/imt/tests/TestCase.php
@@ -0,0 +1,10 @@
+assertTrue(true);
+ }
+}
diff --git a/imt/vite.config.js b/imt/vite.config.js
new file mode 100644
index 0000000..89f26f5
--- /dev/null
+++ b/imt/vite.config.js
@@ -0,0 +1,14 @@
+import { defineConfig } from 'vite';
+import laravel from 'laravel-vite-plugin';
+
+export default defineConfig({
+ plugins: [
+ laravel({
+ input: [
+ 'resources/css/app.css',
+ 'resources/js/app.js',
+ ],
+ refresh: true,
+ }),
+ ],
+});
diff --git a/imt/webpack.mix.js b/imt/webpack.mix.js
new file mode 100644
index 0000000..2a22dc1
--- /dev/null
+++ b/imt/webpack.mix.js
@@ -0,0 +1,17 @@
+const mix = require('laravel-mix');
+
+/*
+ |--------------------------------------------------------------------------
+ | Mix Asset Management
+ |--------------------------------------------------------------------------
+ |
+ | Mix provides a clean, fluent API for defining some Webpack build steps
+ | for your Laravel applications. By default, we are compiling the CSS
+ | file for the application as well as bundling up all the JS files.
+ |
+ */
+
+mix.js('resources/js/app.js', 'public/js')
+ .postCss('resources/css/app.css', 'public/css', [
+ //
+ ]);