reflekt 1.0.1 → 1.0.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/{Accessor.rb → accessor.rb} +0 -0
- data/lib/{Execution.rb → action.rb} +12 -12
- data/lib/action_stack.rb +44 -0
- data/lib/{Clone.rb → clone.rb} +4 -4
- data/lib/{Config.rb → config.rb} +2 -1
- data/lib/{Control.rb → control.rb} +23 -12
- data/lib/experiment.rb +81 -0
- data/lib/meta.rb +71 -0
- data/lib/meta/{ArrayMeta.rb → array_meta.rb} +2 -2
- data/lib/meta/{BooleanMeta.rb → boolean_meta.rb} +2 -2
- data/lib/meta/{FloatMeta.rb → float_meta.rb} +2 -2
- data/lib/meta/{IntegerMeta.rb → integer_meta.rb} +2 -2
- data/lib/meta/null_meta.rb +34 -0
- data/lib/meta/{StringMeta.rb → string_meta.rb} +2 -2
- data/lib/{MetaBuilder.rb → meta_builder.rb} +3 -2
- data/lib/reflection.rb +148 -0
- data/lib/{Reflekt.rb → reflekt.rb} +44 -44
- data/lib/{Renderer.rb → renderer.rb} +0 -0
- data/lib/{Rule.rb → rule.rb} +1 -1
- data/lib/{RuleSet.rb → rule_set.rb} +26 -20
- data/lib/{Aggregator.rb → rule_set_aggregator.rb} +44 -22
- data/lib/rules/{ArrayRule.rb → array_rule.rb} +1 -1
- data/lib/rules/{BooleanRule.rb → boolean_rule.rb} +6 -4
- data/lib/rules/{FloatRule.rb → float_rule.rb} +1 -1
- data/lib/rules/{IntegerRule.rb → integer_rule.rb} +1 -1
- data/lib/rules/null_rule.rb +33 -0
- data/lib/rules/{StringRule.rb → string_rule.rb} +1 -1
- data/lib/web/bundle.js +2 -2
- data/lib/web/package-lock.json +3 -3
- data/lib/web/package.json +1 -1
- data/lib/web/server.js +5 -5
- metadata +30 -27
- data/lib/Meta.rb +0 -39
- data/lib/Reflection.rb +0 -186
- data/lib/ShadowStack.rb +0 -44
@@ -5,14 +5,14 @@
|
|
5
5
|
# @pattern Singleton
|
6
6
|
#
|
7
7
|
# @hierachy
|
8
|
-
# 1.
|
8
|
+
# 1. RuleSetAggregator <- YOU ARE HERE
|
9
9
|
# 2. RuleSet
|
10
10
|
# 3. Rule
|
11
11
|
################################################################################
|
12
12
|
|
13
|
-
|
13
|
+
require_relative 'rule_set'
|
14
14
|
|
15
|
-
class
|
15
|
+
class RuleSetAggregator
|
16
16
|
|
17
17
|
##
|
18
18
|
# @param meta_map [Hash] The rules that apply to each meta type.
|
@@ -46,24 +46,13 @@ class Aggregator
|
|
46
46
|
# INPUT
|
47
47
|
##
|
48
48
|
|
49
|
-
|
49
|
+
# Singular null input.
|
50
|
+
if control["inputs"].nil?
|
51
|
+
train_input(klass, method, nil, 0)
|
52
|
+
# Multiple inputs.
|
53
|
+
else
|
50
54
|
control["inputs"].each_with_index do |meta, arg_num|
|
51
|
-
|
52
|
-
# TODO: Remove once "Fix Rowdb.get(path)" bug fixed.
|
53
|
-
meta = meta.transform_keys(&:to_sym)
|
54
|
-
# Deserialize meta type to symbol.
|
55
|
-
meta[:type] = meta[:type].to_sym
|
56
|
-
|
57
|
-
# Get rule set.
|
58
|
-
rule_set = get_input_rule_set(klass, method, arg_num)
|
59
|
-
if rule_set.nil?
|
60
|
-
rule_set = RuleSet.new(@meta_map)
|
61
|
-
set_input_rule_set(klass, method, arg_num, rule_set)
|
62
|
-
end
|
63
|
-
|
64
|
-
# Train on metadata.
|
65
|
-
rule_set.train(meta)
|
66
|
-
|
55
|
+
train_input(klass, method, meta, arg_num)
|
67
56
|
end
|
68
57
|
end
|
69
58
|
|
@@ -79,16 +68,33 @@ class Aggregator
|
|
79
68
|
end
|
80
69
|
|
81
70
|
# Train on metadata.
|
82
|
-
output_rule_set.train(control["output"])
|
71
|
+
output_rule_set.train(Meta.deserialize(control["output"]))
|
83
72
|
|
84
73
|
end
|
85
74
|
|
86
75
|
end
|
87
76
|
|
77
|
+
def train_input(klass, method, meta, arg_num)
|
78
|
+
|
79
|
+
# Get deserialized meta.
|
80
|
+
meta = Meta.deserialize(meta)
|
81
|
+
|
82
|
+
# Get rule set.
|
83
|
+
rule_set = get_input_rule_set(klass, method, arg_num)
|
84
|
+
if rule_set.nil?
|
85
|
+
rule_set = RuleSet.new(@meta_map)
|
86
|
+
set_input_rule_set(klass, method, arg_num, rule_set)
|
87
|
+
end
|
88
|
+
|
89
|
+
# Train on metadata.
|
90
|
+
rule_set.train(meta)
|
91
|
+
|
92
|
+
end
|
93
|
+
|
88
94
|
##
|
89
95
|
# Validate inputs.
|
90
96
|
#
|
91
|
-
# @stage Called when validating a reflection.
|
97
|
+
# @stage Called when validating a control reflection.
|
92
98
|
# @param inputs [Array] The method's arguments.
|
93
99
|
# @param input_rule_sets [Array] The RuleSets to validate each input with.
|
94
100
|
##
|
@@ -177,6 +183,7 @@ class Aggregator
|
|
177
183
|
FalseClass => BooleanRule,
|
178
184
|
Float => FloatRule,
|
179
185
|
Integer => IntegerRule,
|
186
|
+
NilClass => NullRule,
|
180
187
|
String => StringRule
|
181
188
|
}
|
182
189
|
|
@@ -184,6 +191,21 @@ class Aggregator
|
|
184
191
|
|
185
192
|
end
|
186
193
|
|
194
|
+
def self.testable?(args, input_rule_sets)
|
195
|
+
|
196
|
+
args.each_with_index do |arg, arg_num|
|
197
|
+
|
198
|
+
rule_type = value_to_rule_type(arg)
|
199
|
+
if input_rule_sets[arg_num].rules[rule_type].nil?
|
200
|
+
return false
|
201
|
+
end
|
202
|
+
|
203
|
+
end
|
204
|
+
|
205
|
+
return true
|
206
|
+
|
207
|
+
end
|
208
|
+
|
187
209
|
##############################################################################
|
188
210
|
# HELPERS
|
189
211
|
##############################################################################
|
@@ -1,5 +1,5 @@
|
|
1
1
|
require 'set'
|
2
|
-
|
2
|
+
require_relative '../rule'
|
3
3
|
|
4
4
|
class BooleanRule < Rule
|
5
5
|
|
@@ -27,14 +27,16 @@ class BooleanRule < Rule
|
|
27
27
|
# @param value [Boolean]
|
28
28
|
##
|
29
29
|
def test(value)
|
30
|
-
|
30
|
+
|
31
|
+
# Booleans are stored as strings.
|
32
|
+
@booleans.include? value.to_s
|
33
|
+
|
31
34
|
end
|
32
35
|
|
33
36
|
def result()
|
34
37
|
{
|
35
38
|
:type => @type,
|
36
|
-
:
|
37
|
-
:is_false => @booleans.include?
|
39
|
+
:booleans => @booleans
|
38
40
|
}
|
39
41
|
end
|
40
42
|
|
@@ -0,0 +1,33 @@
|
|
1
|
+
require_relative '../rule'
|
2
|
+
|
3
|
+
class NullRule < Rule
|
4
|
+
|
5
|
+
def initialize()
|
6
|
+
@type = :null
|
7
|
+
end
|
8
|
+
|
9
|
+
##
|
10
|
+
# @param meta [NullMeta]
|
11
|
+
##
|
12
|
+
def train(meta)
|
13
|
+
# No need to train as NullMeta is always nil.
|
14
|
+
end
|
15
|
+
|
16
|
+
##
|
17
|
+
# @param value [NilClass]
|
18
|
+
##
|
19
|
+
def test(value)
|
20
|
+
value.nil?
|
21
|
+
end
|
22
|
+
|
23
|
+
def result()
|
24
|
+
{
|
25
|
+
:type => @type
|
26
|
+
}
|
27
|
+
end
|
28
|
+
|
29
|
+
def random()
|
30
|
+
nil
|
31
|
+
end
|
32
|
+
|
33
|
+
end
|
data/lib/web/bundle.js
CHANGED
@@ -1,9 +1,9 @@
|
|
1
|
-
!function(e){var t=window.webpackHotUpdate;window.webpackHotUpdate=function(e,n){!function(e,t){if(!x[e]||!w[e])return;for(var n in w[e]=!1,t)Object.prototype.hasOwnProperty.call(t,n)&&(m[n]=t[n]);0==--v&&0===b&&T()}(e,n),t&&t(e,n)};var n,r=!0,o="3227ca4e9f837032c16e",i={},a=[],l=[];function u(e){var t=O[e];if(!t)return N;var r=function(r){return t.hot.active?(O[r]?-1===O[r].parents.indexOf(e)&&O[r].parents.push(e):(a=[e],n=r),-1===t.children.indexOf(r)&&t.children.push(r)):(console.warn("[HMR] unexpected require("+r+") from disposed module "+e),a=[]),N(r)},o=function(e){return{configurable:!0,enumerable:!0,get:function(){return N[e]},set:function(t){N[e]=t}}};for(var i in N)Object.prototype.hasOwnProperty.call(N,i)&&"e"!==i&&"t"!==i&&Object.defineProperty(r,i,o(i));return r.e=function(e){return"ready"===f&&d("prepare"),b++,N.e(e).then(t,(function(e){throw t(),e}));function t(){b--,"prepare"===f&&(g[e]||S(e),0===b&&0===v&&T())}},r.t=function(e,t){return 1&t&&(e=r(e)),N.t(e,-2&t)},r}function c(t){var r={_acceptedDependencies:{},_declinedDependencies:{},_selfAccepted:!1,_selfDeclined:!1,_selfInvalidated:!1,_disposeHandlers:[],_main:n!==t,active:!0,accept:function(e,t){if(void 0===e)r._selfAccepted=!0;else if("function"==typeof e)r._selfAccepted=e;else if("object"==typeof e)for(var n=0;n<e.length;n++)r._acceptedDependencies[e[n]]=t||function(){};else r._acceptedDependencies[e]=t||function(){}},decline:function(e){if(void 0===e)r._selfDeclined=!0;else if("object"==typeof e)for(var t=0;t<e.length;t++)r._declinedDependencies[e[t]]=!0;else r._declinedDependencies[e]=!0},dispose:function(e){r._disposeHandlers.push(e)},addDisposeHandler:function(e){r._disposeHandlers.push(e)},removeDisposeHandler:function(e){var t=r._disposeHandlers.indexOf(e);t>=0&&r._disposeHandlers.splice(t,1)},invalidate:function(){switch(this._selfInvalidated=!0,f){case"idle":(m={})[t]=e[t],d("ready");break;case"ready":C(t);break;case"prepare":case"check":case"dispose":case"apply":(y=y||[]).push(t)}},check:E,apply:_,status:function(e){if(!e)return f;s.push(e)},addStatusHandler:function(e){s.push(e)},removeStatusHandler:function(e){var t=s.indexOf(e);t>=0&&s.splice(t,1)},data:i[t]};return n=void 0,r}var s=[],f="idle";function d(e){f=e;for(var t=0;t<s.length;t++)s[t].call(null,e)}var p,m,h,y,v=0,b=0,g={},w={},x={};function k(e){return+e+""===e?+e:e}function E(e){if("idle"!==f)throw new Error("check() is only allowed in idle status");return r=e,d("check"),(t=1e4,t=t||1e4,new Promise((function(e,n){if("undefined"==typeof XMLHttpRequest)return n(new Error("No browser support"));try{var r=new XMLHttpRequest,i=N.p+""+o+".hot-update.json";r.open("GET",i,!0),r.timeout=t,r.send(null)}catch(e){return n(e)}r.onreadystatechange=function(){if(4===r.readyState)if(0===r.status)n(new Error("Manifest request to "+i+" timed out."));else if(404===r.status)e();else if(200!==r.status&&304!==r.status)n(new Error("Manifest request to "+i+" failed."));else{try{var t=JSON.parse(r.responseText)}catch(e){return void n(e)}e(t)}}}))).then((function(e){if(!e)return d(P()?"ready":"idle"),null;w={},g={},x=e.c,h=e.h,d("prepare");var t=new Promise((function(e,t){p={resolve:e,reject:t}}));m={};return S(0),"prepare"===f&&0===b&&0===v&&T(),t}));var t}function S(e){x[e]?(w[e]=!0,v++,function(e){var t=document.createElement("script");t.charset="utf-8",t.src=N.p+""+e+"."+o+".hot-update.js",document.head.appendChild(t)}(e)):g[e]=!0}function T(){d("ready");var e=p;if(p=null,e)if(r)Promise.resolve().then((function(){return _(r)})).then((function(t){e.resolve(t)}),(function(t){e.reject(t)}));else{var t=[];for(var n in m)Object.prototype.hasOwnProperty.call(m,n)&&t.push(k(n));e.resolve(t)}}function _(t){if("ready"!==f)throw new Error("apply() is only allowed in ready status");return function t(r){var l,u,c,s,f;function p(e){for(var t=[e],n={},r=t.map((function(e){return{chain:[e],id:e}}));r.length>0;){var o=r.pop(),i=o.id,a=o.chain;if((s=O[i])&&(!s.hot._selfAccepted||s.hot._selfInvalidated)){if(s.hot._selfDeclined)return{type:"self-declined",chain:a,moduleId:i};if(s.hot._main)return{type:"unaccepted",chain:a,moduleId:i};for(var l=0;l<s.parents.length;l++){var u=s.parents[l],c=O[u];if(c){if(c.hot._declinedDependencies[i])return{type:"declined",chain:a.concat([u]),moduleId:i,parentId:u};-1===t.indexOf(u)&&(c.hot._acceptedDependencies[i]?(n[u]||(n[u]=[]),v(n[u],[i])):(delete n[u],t.push(u),r.push({chain:a.concat([u]),id:u})))}}}}return{type:"accepted",moduleId:e,outdatedModules:t,outdatedDependencies:n}}function v(e,t){for(var n=0;n<t.length;n++){var r=t[n];-1===e.indexOf(r)&&e.push(r)}}P();var b={},g=[],w={},E=function(){console.warn("[HMR] unexpected require("+T.moduleId+") to disposed module")};for(var S in m)if(Object.prototype.hasOwnProperty.call(m,S)){var T;f=k(S),T=m[S]?p(f):{type:"disposed",moduleId:S};var _=!1,C=!1,j=!1,R="";switch(T.chain&&(R="\nUpdate propagation: "+T.chain.join(" -> ")),T.type){case"self-declined":r.onDeclined&&r.onDeclined(T),r.ignoreDeclined||(_=new Error("Aborted because of self decline: "+T.moduleId+R));break;case"declined":r.onDeclined&&r.onDeclined(T),r.ignoreDeclined||(_=new Error("Aborted because of declined dependency: "+T.moduleId+" in "+T.parentId+R));break;case"unaccepted":r.onUnaccepted&&r.onUnaccepted(T),r.ignoreUnaccepted||(_=new Error("Aborted because "+f+" is not accepted"+R));break;case"accepted":r.onAccepted&&r.onAccepted(T),C=!0;break;case"disposed":r.onDisposed&&r.onDisposed(T),j=!0;break;default:throw new Error("Unexception type "+T.type)}if(_)return d("abort"),Promise.reject(_);if(C)for(f in w[f]=m[f],v(g,T.outdatedModules),T.outdatedDependencies)Object.prototype.hasOwnProperty.call(T.outdatedDependencies,f)&&(b[f]||(b[f]=[]),v(b[f],T.outdatedDependencies[f]));j&&(v(g,[T.moduleId]),w[f]=E)}var D,z=[];for(u=0;u<g.length;u++)f=g[u],O[f]&&O[f].hot._selfAccepted&&w[f]!==E&&!O[f].hot._selfInvalidated&&z.push({module:f,parents:O[f].parents.slice(),errorHandler:O[f].hot._selfAccepted});d("dispose"),Object.keys(x).forEach((function(e){!1===x[e]&&function(e){delete installedChunks[e]}(e)}));var I,M,F=g.slice();for(;F.length>0;)if(f=F.pop(),s=O[f]){var A={},L=s.hot._disposeHandlers;for(c=0;c<L.length;c++)(l=L[c])(A);for(i[f]=A,s.hot.active=!1,delete O[f],delete b[f],c=0;c<s.children.length;c++){var U=O[s.children[c]];U&&((D=U.parents.indexOf(f))>=0&&U.parents.splice(D,1))}}for(f in b)if(Object.prototype.hasOwnProperty.call(b,f)&&(s=O[f]))for(M=b[f],c=0;c<M.length;c++)I=M[c],(D=s.children.indexOf(I))>=0&&s.children.splice(D,1);d("apply"),void 0!==h&&(o=h,h=void 0);for(f in m=void 0,w)Object.prototype.hasOwnProperty.call(w,f)&&(e[f]=w[f]);var H=null;for(f in b)if(Object.prototype.hasOwnProperty.call(b,f)&&(s=O[f])){M=b[f];var V=[];for(u=0;u<M.length;u++)if(I=M[u],l=s.hot._acceptedDependencies[I]){if(-1!==V.indexOf(l))continue;V.push(l)}for(u=0;u<V.length;u++){l=V[u];try{l(M)}catch(e){r.onErrored&&r.onErrored({type:"accept-errored",moduleId:f,dependencyId:M[u],error:e}),r.ignoreErrored||H||(H=e)}}}for(u=0;u<z.length;u++){var W=z[u];f=W.module,a=W.parents,n=f;try{N(f)}catch(e){if("function"==typeof W.errorHandler)try{W.errorHandler(e)}catch(t){r.onErrored&&r.onErrored({type:"self-accept-error-handler-errored",moduleId:f,error:t,originalError:e}),r.ignoreErrored||H||(H=t),H||(H=e)}else r.onErrored&&r.onErrored({type:"self-accept-errored",moduleId:f,error:e}),r.ignoreErrored||H||(H=e)}}if(H)return d("fail"),Promise.reject(H);if(y)return t(r).then((function(e){return g.forEach((function(t){e.indexOf(t)<0&&e.push(t)})),e}));return d("idle"),new Promise((function(e){e(g)}))}(t=t||{})}function P(){if(y)return m||(m={}),y.forEach(C),y=void 0,!0}function C(t){Object.prototype.hasOwnProperty.call(m,t)||(m[t]=e[t])}var O={};function N(t){if(O[t])return O[t].exports;var n=O[t]={i:t,l:!1,exports:{},hot:c(t),parents:(l=a,a=[],l),children:[]};return e[t].call(n.exports,n,n.exports,u(t)),n.l=!0,n.exports}N.m=e,N.c=O,N.d=function(e,t,n){N.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},N.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},N.t=function(e,t){if(1&t&&(e=N(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(N.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)N.d(n,r,function(t){return e[t]}.bind(null,r));return n},N.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return N.d(t,"a",t),t},N.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},N.p="/dist/",N.h=function(){return o},u(33)(N.s=33)}([function(e,t,n){"use strict";e.exports=n(34)},function(e,t,n){"use strict";e.exports=n(39)},function(e,t,n){"use strict";var r,o=function(){return void 0===r&&(r=Boolean(window&&document&&document.all&&!window.atob)),r},i=function(){var e={};return function(t){if(void 0===e[t]){var n=document.querySelector(t);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(e){n=null}e[t]=n}return e[t]}}(),a=[];function l(e){for(var t=-1,n=0;n<a.length;n++)if(a[n].identifier===e){t=n;break}return t}function u(e,t){for(var n={},r=[],o=0;o<e.length;o++){var i=e[o],u=t.base?i[0]+t.base:i[0],c=n[u]||0,s="".concat(u," ").concat(c);n[u]=c+1;var f=l(s),d={css:i[1],media:i[2],sourceMap:i[3]};-1!==f?(a[f].references++,a[f].updater(d)):a.push({identifier:s,updater:y(d,t),references:1}),r.push(s)}return r}function c(e){var t=document.createElement("style"),r=e.attributes||{};if(void 0===r.nonce){var o=n.nc;o&&(r.nonce=o)}if(Object.keys(r).forEach((function(e){t.setAttribute(e,r[e])})),"function"==typeof e.insert)e.insert(t);else{var a=i(e.insert||"head");if(!a)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");a.appendChild(t)}return t}var s,f=(s=[],function(e,t){return s[e]=t,s.filter(Boolean).join("\n")});function d(e,t,n,r){var o=n?"":r.media?"@media ".concat(r.media," {").concat(r.css,"}"):r.css;if(e.styleSheet)e.styleSheet.cssText=f(t,o);else{var i=document.createTextNode(o),a=e.childNodes;a[t]&&e.removeChild(a[t]),a.length?e.insertBefore(i,a[t]):e.appendChild(i)}}function p(e,t,n){var r=n.css,o=n.media,i=n.sourceMap;if(o?e.setAttribute("media",o):e.removeAttribute("media"),i&&"undefined"!=typeof btoa&&(r+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(i))))," */")),e.styleSheet)e.styleSheet.cssText=r;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(r))}}var m=null,h=0;function y(e,t){var n,r,o;if(t.singleton){var i=h++;n=m||(m=c(t)),r=d.bind(null,n,i,!1),o=d.bind(null,n,i,!0)}else n=c(t),r=p.bind(null,n,t),o=function(){!function(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e)}(n)};return r(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap)return;r(e=t)}else o()}}e.exports=function(e,t){(t=t||{}).singleton||"boolean"==typeof t.singleton||(t.singleton=o());var n=u(e=e||[],t);return function(e){if(e=e||[],"[object Array]"===Object.prototype.toString.call(e)){for(var r=0;r<n.length;r++){var o=l(n[r]);a[o].references--}for(var i=u(e,t),c=0;c<n.length;c++){var s=l(n[c]);0===a[s].references&&(a[s].updater(),a.splice(s,1))}n=i}}}},function(e,t,n){"use strict";e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var n=e(t);return t[2]?"@media ".concat(t[2]," {").concat(n,"}"):n})).join("")},t.i=function(e,n,r){"string"==typeof e&&(e=[[null,e,""]]);var o={};if(r)for(var i=0;i<this.length;i++){var a=this[i][0];null!=a&&(o[a]=!0)}for(var l=0;l<e.length;l++){var u=[].concat(e[l]);r&&o[u[0]]||(n&&(u[2]?u[2]="".concat(n," and ").concat(u[2]):u[2]=n),t.push(u))}},t}},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(0),o=n.n(r).a.createContext(!1)},function(e,t){e.exports=function(e){if(!e.webpackPolyfill){var t=Object.create(e);t.children||(t.children=[]),Object.defineProperty(t,"loaded",{enumerable:!0,get:function(){return t.l}}),Object.defineProperty(t,"id",{enumerable:!0,get:function(){return t.i}}),Object.defineProperty(t,"exports",{enumerable:!0}),t.webpackPolyfill=1}return t}},function(e,t,n){"use strict";n.r(t);var r=n(3),o=n.n(r)()((function(e){return e[1]}));o.push([e.i,".alert{padding:1rem;background:#bdd7ec;border:1px solid #339aec}.alert.error{background:#ffc6c1;border:1px solid #ff6969}.alert.success{background:#c3ffbd;border:1px solid #3eb641}",""]),t.default=o},function(e,t,n){"use strict";n.r(t);var r=n(3),o=n.n(r)()((function(e){return e[1]}));o.push([e.i,".type-switch{margin:0 auto}.type-switch button{font-size:.95rem;font-weight:bold;background:#fff;text-shadow:1px 1px 1px #f8f8f8;padding:1rem 1.5rem;border:none;border-radius:0}.type-switch button:hover{cursor:pointer}.type-switch button.active{color:#fff;background:#333;text-shadow:1px 1px 1px #000}.type-switch button:first-child{border-top-left-radius:5px;border-bottom-left-radius:5px}.type-switch button:last-child{border-top-right-radius:5px;border-bottom-right-radius:5px}",""]),t.default=o},function(e,t,n){"use strict";n.r(t);var r=n(3),o=n.n(r)()((function(e){return e[1]}));o.push([e.i,"#header{background:#eee;border-bottom:1px solid #c9c9c9}#header .container{display:flex;flex-direction:row;align-items:center;padding:1rem}#header #logo{width:50px}#header #title{display:none}#header #write-mode{display:flex;align-items:center;padding:.9rem 1rem;border:1px solid #ccc;border-radius:5px;background:linear-gradient(180deg, #fff 0%, #ddd 100%)}#header #write-mode:hover{cursor:pointer;background:linear-gradient(0deg, #fff 0%, #ddd 100%)}#header #write-mode label{font-weight:bold;text-shadow:1px 1px 1px #fff}",""]),t.default=o},function(e,t,n){"use strict";n.r(t);var r=n(3),o=n.n(r)()((function(e){return e[1]}));o.push([e.i,".meta:not(:last-child){margin-right:.5rem}.meta__attributes{display:flex;flex-direction:row;list-style:none;padding-left:0;margin:0}.meta-attribute{padding-left:1rem;padding-right:1rem;border-right:1px solid #ccc}.meta-attribute:first-child{padding-left:0 !important}.meta-attribute:last-child{padding-right:0;border-right:0}.meta-attribute label{display:block;font-weight:bold;text-transform:capitalize;padding-bottom:.1rem}.meta-attribute pre{margin:0}.meta-none{color:#555;font-style:italic}",""]),t.default=o},function(e,t,n){"use strict";n.r(t);var r=n(3),o=n.n(r)()((function(e){return e[1]}));o.push([e.i,".reflection{border-left:5px solid #ccc;background:#efefef;margin-right:1rem;margin-left:11px;margin-bottom:1px;overflow:hidden;transition:max-height .5s ease-out,opacity 1s linear;max-height:999px}.reflection.hidden{opacity:0;max-height:0}.reflection:last-child{margin-bottom:1rem}.reflection.pass{border-left-color:#3eb641;background-color:#c3ffbd}.reflection.fail{border-left-color:#ff6969;background-color:#ffc6c1}.reflection.neutral{border-left-color:#339aec;background-color:#bdd7ec}.reflection .reflection__summary{display:flex;align-items:center;flex-direction:row;padding:1rem}.reflection .reflection__summary .title{color:#777;font-weight:bold;margin-right:1rem}.reflection .reflection__summary .method{font-weight:bold;margin-right:1rem}.reflection .reflection__summary .actions{margin-left:auto}.reflection .reflection__details{padding:1rem;background:#fff}",""]),t.default=o},function(e,t,n){"use strict";n.r(t);var r=n(3),o=n.n(r)()((function(e){return e[1]}));o.push([e.i,".io{display:flex;flex-direction:row;align-items:center;padding:.75rem 1rem;border:1px solid #aaa;border-radius:5px}.io:not(:last-child){margin-bottom:.5rem}.io h4{margin:0;color:#777;font-size:1.2rem;font-weight:normal;margin-right:1.25rem}",""]),t.default=o},function(e,t,n){"use strict";n.r(t);var r=n(3),o=n.n(r)()((function(e){return e[1]}));o.push([e.i,".execution{background:#333;margin-bottom:1px;border-left:5px solid #ccc;opacity:1;overflow:hidden;transition:max-height .5s ease-out,opacity 1s linear}.execution:hover{background:#444545}.execution.hidden{opacity:0;max-height:0}.execution.pass{border-left-color:#3eb641}.execution.pass .status{color:#3eb641}.execution.fail{border-left-color:#ff6969}.execution.fail .status{color:#ff6969}.execution.neutral{border-left-color:#339aec}.execution.neutral .status{color:#339aec}.execution.open{background:#333;border-left-color:#333}.execution--summary{display:flex;align-items:center;flex-direction:row;padding:1rem;padding-left:11px}.execution--summary:hover{cursor:pointer}.execution--summary .timestamp{color:#fff}.execution--summary .status{margin-left:auto;font-weight:bold;text-transform:uppercase}.execution--details{overflow:auto}",""]),t.default=o},function(e,t,n){"use strict";n.r(t);var r=n(3),o=n.n(r)()((function(e){return e[1]}));o.push([e.i,".actions{margin-left:auto}.actions button{border:none;color:#fff;background:#000;padding:.5rem 1rem;margin-left:.5rem;border-radius:.25rem}.actions button:hover{cursor:pointer;background:#222}.actions button.keep{background:#45487e}.actions button.delete{background:#7e3837}.actions button.disabled{background:#555}.actions button.disabled:hover{background:#555;cursor:not-allowed}",""]),t.default=o},function(e,t,n){"use strict";n.r(t);var r=n(3),o=n.n(r)()((function(e){return e[1]}));o.push([e.i,"",""]),t.default=o},function(e,t,n){"use strict";n.r(t);var r=n(3),o=n.n(r)()((function(e){return e[1]}));o.push([e.i,"body{padding:0;margin:0;font-family:Arial;background:#fefefe}.container{max-width:1200px;margin:0 auto;padding:1rem}",""]),t.default=o},function(e,t,n){"use strict";(function(e){var r=n(0),o=n.n(r),i=n(1);n(42);function a(e){return(a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function l(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,o=!1,i=void 0;try{for(var a,l=e[Symbol.iterator]();!(r=(a=l.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,i=e}finally{try{r||null==l.return||l.return()}finally{if(o)throw i}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return u(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return u(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function u(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function c(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function s(e,t){return(s=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function f(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=p(e);if(t){var o=p(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return d(this,n)}}function d(e,t){return!t||"object"!==a(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function p(e){return(p=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var m=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&s(e,t)}(a,e);var t,n,r,i=f(a);function a(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),i.call(this,e)}return t=a,(n=[{key:"render",value:function(){var e=this;return o.a.createElement("div",{className:"meta"},o.a.createElement("ul",{className:"meta__attributes"},Object.entries(this.props.meta).map((function(t){var n=l(t,2),r=n[0];return n[1],o.a.createElement("li",{className:"meta-attribute",key:"meta-attribute-".concat(r)},o.a.createElement("label",null,r,":"),o.a.createElement("span",{className:"value"},e.props.meta[r]))}))))}}])&&c(t.prototype,n),r&&c(t,r),a}(o.a.Component);t.a=Object(i.hot)(e)(m)}).call(this,n(5)(e))},function(e,t,n){"use strict";!function e(){if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE){0;try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(e){console.error(e)}}}(),e.exports=n(35)},function(e,t,n){"use strict";(function(e){var r=n(0),o=n.n(r),i=n(1),a=n(28);function l(e){return(l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function u(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function c(e,t){return(c=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function s(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=d(e);if(t){var o=d(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return f(this,n)}}function f(e,t){return!t||"object"!==l(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function d(e){return(d=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var p=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&c(e,t)}(l,e);var t,n,r,i=s(l);function l(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,l),(t=i.call(this,e)).state={},t.create_executions(e.reflections),t}return t=l,(n=[{key:"create_executions",value:function(e){var t={};e.forEach((function(e){if(null==e.base_id){var n="".concat(e.exe_id,"-").concat(e.ref_num);t[n]={id:e.exe_id,number:e.ref_num,status:"pass",timestamp:e.time,reflections:[e]}}else n="".concat(e.base_id,"-").concat(e.ref_num),t[n].reflections.push(e);"fail"==e.status&&(t[n].status="fail")}));var n=[];Object.values(t).forEach((function(e){n.push(e)}));var r=n.sort((function(e,t){return e.timestamp<t.timestamp?1:-1}));this.state.executions=r}},{key:"render",value:function(){return o.a.createElement("div",{id:"executions"},this.state.executions.map((function(e,t){return o.a.createElement(a.a,{execution:e,key:e.id+"-"+e.number})})))}}])&&u(t.prototype,n),r&&u(t,r),l}(o.a.Component);t.a=Object(i.hot)(e)(p)}).call(this,n(5)(e))},function(e,t,n){"use strict";
|
1
|
+
!function(e){var t=window.webpackHotUpdate;window.webpackHotUpdate=function(e,n){!function(e,t){if(!x[e]||!w[e])return;for(var n in w[e]=!1,t)Object.prototype.hasOwnProperty.call(t,n)&&(m[n]=t[n]);0==--v&&0===b&&T()}(e,n),t&&t(e,n)};var n,r=!0,o="5caa4f52f5a14d0a0bb2",i={},a=[],l=[];function u(e){var t=O[e];if(!t)return N;var r=function(r){return t.hot.active?(O[r]?-1===O[r].parents.indexOf(e)&&O[r].parents.push(e):(a=[e],n=r),-1===t.children.indexOf(r)&&t.children.push(r)):(console.warn("[HMR] unexpected require("+r+") from disposed module "+e),a=[]),N(r)},o=function(e){return{configurable:!0,enumerable:!0,get:function(){return N[e]},set:function(t){N[e]=t}}};for(var i in N)Object.prototype.hasOwnProperty.call(N,i)&&"e"!==i&&"t"!==i&&Object.defineProperty(r,i,o(i));return r.e=function(e){return"ready"===f&&d("prepare"),b++,N.e(e).then(t,(function(e){throw t(),e}));function t(){b--,"prepare"===f&&(g[e]||S(e),0===b&&0===v&&T())}},r.t=function(e,t){return 1&t&&(e=r(e)),N.t(e,-2&t)},r}function c(t){var r={_acceptedDependencies:{},_declinedDependencies:{},_selfAccepted:!1,_selfDeclined:!1,_selfInvalidated:!1,_disposeHandlers:[],_main:n!==t,active:!0,accept:function(e,t){if(void 0===e)r._selfAccepted=!0;else if("function"==typeof e)r._selfAccepted=e;else if("object"==typeof e)for(var n=0;n<e.length;n++)r._acceptedDependencies[e[n]]=t||function(){};else r._acceptedDependencies[e]=t||function(){}},decline:function(e){if(void 0===e)r._selfDeclined=!0;else if("object"==typeof e)for(var t=0;t<e.length;t++)r._declinedDependencies[e[t]]=!0;else r._declinedDependencies[e]=!0},dispose:function(e){r._disposeHandlers.push(e)},addDisposeHandler:function(e){r._disposeHandlers.push(e)},removeDisposeHandler:function(e){var t=r._disposeHandlers.indexOf(e);t>=0&&r._disposeHandlers.splice(t,1)},invalidate:function(){switch(this._selfInvalidated=!0,f){case"idle":(m={})[t]=e[t],d("ready");break;case"ready":C(t);break;case"prepare":case"check":case"dispose":case"apply":(y=y||[]).push(t)}},check:E,apply:_,status:function(e){if(!e)return f;s.push(e)},addStatusHandler:function(e){s.push(e)},removeStatusHandler:function(e){var t=s.indexOf(e);t>=0&&s.splice(t,1)},data:i[t]};return n=void 0,r}var s=[],f="idle";function d(e){f=e;for(var t=0;t<s.length;t++)s[t].call(null,e)}var p,m,h,y,v=0,b=0,g={},w={},x={};function k(e){return+e+""===e?+e:e}function E(e){if("idle"!==f)throw new Error("check() is only allowed in idle status");return r=e,d("check"),(t=1e4,t=t||1e4,new Promise((function(e,n){if("undefined"==typeof XMLHttpRequest)return n(new Error("No browser support"));try{var r=new XMLHttpRequest,i=N.p+""+o+".hot-update.json";r.open("GET",i,!0),r.timeout=t,r.send(null)}catch(e){return n(e)}r.onreadystatechange=function(){if(4===r.readyState)if(0===r.status)n(new Error("Manifest request to "+i+" timed out."));else if(404===r.status)e();else if(200!==r.status&&304!==r.status)n(new Error("Manifest request to "+i+" failed."));else{try{var t=JSON.parse(r.responseText)}catch(e){return void n(e)}e(t)}}}))).then((function(e){if(!e)return d(P()?"ready":"idle"),null;w={},g={},x=e.c,h=e.h,d("prepare");var t=new Promise((function(e,t){p={resolve:e,reject:t}}));m={};return S(0),"prepare"===f&&0===b&&0===v&&T(),t}));var t}function S(e){x[e]?(w[e]=!0,v++,function(e){var t=document.createElement("script");t.charset="utf-8",t.src=N.p+""+e+"."+o+".hot-update.js",document.head.appendChild(t)}(e)):g[e]=!0}function T(){d("ready");var e=p;if(p=null,e)if(r)Promise.resolve().then((function(){return _(r)})).then((function(t){e.resolve(t)}),(function(t){e.reject(t)}));else{var t=[];for(var n in m)Object.prototype.hasOwnProperty.call(m,n)&&t.push(k(n));e.resolve(t)}}function _(t){if("ready"!==f)throw new Error("apply() is only allowed in ready status");return function t(r){var l,u,c,s,f;function p(e){for(var t=[e],n={},r=t.map((function(e){return{chain:[e],id:e}}));r.length>0;){var o=r.pop(),i=o.id,a=o.chain;if((s=O[i])&&(!s.hot._selfAccepted||s.hot._selfInvalidated)){if(s.hot._selfDeclined)return{type:"self-declined",chain:a,moduleId:i};if(s.hot._main)return{type:"unaccepted",chain:a,moduleId:i};for(var l=0;l<s.parents.length;l++){var u=s.parents[l],c=O[u];if(c){if(c.hot._declinedDependencies[i])return{type:"declined",chain:a.concat([u]),moduleId:i,parentId:u};-1===t.indexOf(u)&&(c.hot._acceptedDependencies[i]?(n[u]||(n[u]=[]),v(n[u],[i])):(delete n[u],t.push(u),r.push({chain:a.concat([u]),id:u})))}}}}return{type:"accepted",moduleId:e,outdatedModules:t,outdatedDependencies:n}}function v(e,t){for(var n=0;n<t.length;n++){var r=t[n];-1===e.indexOf(r)&&e.push(r)}}P();var b={},g=[],w={},E=function(){console.warn("[HMR] unexpected require("+T.moduleId+") to disposed module")};for(var S in m)if(Object.prototype.hasOwnProperty.call(m,S)){var T;f=k(S),T=m[S]?p(f):{type:"disposed",moduleId:S};var _=!1,C=!1,j=!1,R="";switch(T.chain&&(R="\nUpdate propagation: "+T.chain.join(" -> ")),T.type){case"self-declined":r.onDeclined&&r.onDeclined(T),r.ignoreDeclined||(_=new Error("Aborted because of self decline: "+T.moduleId+R));break;case"declined":r.onDeclined&&r.onDeclined(T),r.ignoreDeclined||(_=new Error("Aborted because of declined dependency: "+T.moduleId+" in "+T.parentId+R));break;case"unaccepted":r.onUnaccepted&&r.onUnaccepted(T),r.ignoreUnaccepted||(_=new Error("Aborted because "+f+" is not accepted"+R));break;case"accepted":r.onAccepted&&r.onAccepted(T),C=!0;break;case"disposed":r.onDisposed&&r.onDisposed(T),j=!0;break;default:throw new Error("Unexception type "+T.type)}if(_)return d("abort"),Promise.reject(_);if(C)for(f in w[f]=m[f],v(g,T.outdatedModules),T.outdatedDependencies)Object.prototype.hasOwnProperty.call(T.outdatedDependencies,f)&&(b[f]||(b[f]=[]),v(b[f],T.outdatedDependencies[f]));j&&(v(g,[T.moduleId]),w[f]=E)}var D,z=[];for(u=0;u<g.length;u++)f=g[u],O[f]&&O[f].hot._selfAccepted&&w[f]!==E&&!O[f].hot._selfInvalidated&&z.push({module:f,parents:O[f].parents.slice(),errorHandler:O[f].hot._selfAccepted});d("dispose"),Object.keys(x).forEach((function(e){!1===x[e]&&function(e){delete installedChunks[e]}(e)}));var I,M,F=g.slice();for(;F.length>0;)if(f=F.pop(),s=O[f]){var A={},L=s.hot._disposeHandlers;for(c=0;c<L.length;c++)(l=L[c])(A);for(i[f]=A,s.hot.active=!1,delete O[f],delete b[f],c=0;c<s.children.length;c++){var U=O[s.children[c]];U&&((D=U.parents.indexOf(f))>=0&&U.parents.splice(D,1))}}for(f in b)if(Object.prototype.hasOwnProperty.call(b,f)&&(s=O[f]))for(M=b[f],c=0;c<M.length;c++)I=M[c],(D=s.children.indexOf(I))>=0&&s.children.splice(D,1);d("apply"),void 0!==h&&(o=h,h=void 0);for(f in m=void 0,w)Object.prototype.hasOwnProperty.call(w,f)&&(e[f]=w[f]);var H=null;for(f in b)if(Object.prototype.hasOwnProperty.call(b,f)&&(s=O[f])){M=b[f];var V=[];for(u=0;u<M.length;u++)if(I=M[u],l=s.hot._acceptedDependencies[I]){if(-1!==V.indexOf(l))continue;V.push(l)}for(u=0;u<V.length;u++){l=V[u];try{l(M)}catch(e){r.onErrored&&r.onErrored({type:"accept-errored",moduleId:f,dependencyId:M[u],error:e}),r.ignoreErrored||H||(H=e)}}}for(u=0;u<z.length;u++){var W=z[u];f=W.module,a=W.parents,n=f;try{N(f)}catch(e){if("function"==typeof W.errorHandler)try{W.errorHandler(e)}catch(t){r.onErrored&&r.onErrored({type:"self-accept-error-handler-errored",moduleId:f,error:t,originalError:e}),r.ignoreErrored||H||(H=t),H||(H=e)}else r.onErrored&&r.onErrored({type:"self-accept-errored",moduleId:f,error:e}),r.ignoreErrored||H||(H=e)}}if(H)return d("fail"),Promise.reject(H);if(y)return t(r).then((function(e){return g.forEach((function(t){e.indexOf(t)<0&&e.push(t)})),e}));return d("idle"),new Promise((function(e){e(g)}))}(t=t||{})}function P(){if(y)return m||(m={}),y.forEach(C),y=void 0,!0}function C(t){Object.prototype.hasOwnProperty.call(m,t)||(m[t]=e[t])}var O={};function N(t){if(O[t])return O[t].exports;var n=O[t]={i:t,l:!1,exports:{},hot:c(t),parents:(l=a,a=[],l),children:[]};return e[t].call(n.exports,n,n.exports,u(t)),n.l=!0,n.exports}N.m=e,N.c=O,N.d=function(e,t,n){N.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},N.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},N.t=function(e,t){if(1&t&&(e=N(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(N.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)N.d(n,r,function(t){return e[t]}.bind(null,r));return n},N.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return N.d(t,"a",t),t},N.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},N.p="/dist/",N.h=function(){return o},u(33)(N.s=33)}([function(e,t,n){"use strict";e.exports=n(34)},function(e,t,n){"use strict";e.exports=n(39)},function(e,t,n){"use strict";var r,o=function(){return void 0===r&&(r=Boolean(window&&document&&document.all&&!window.atob)),r},i=function(){var e={};return function(t){if(void 0===e[t]){var n=document.querySelector(t);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(e){n=null}e[t]=n}return e[t]}}(),a=[];function l(e){for(var t=-1,n=0;n<a.length;n++)if(a[n].identifier===e){t=n;break}return t}function u(e,t){for(var n={},r=[],o=0;o<e.length;o++){var i=e[o],u=t.base?i[0]+t.base:i[0],c=n[u]||0,s="".concat(u," ").concat(c);n[u]=c+1;var f=l(s),d={css:i[1],media:i[2],sourceMap:i[3]};-1!==f?(a[f].references++,a[f].updater(d)):a.push({identifier:s,updater:y(d,t),references:1}),r.push(s)}return r}function c(e){var t=document.createElement("style"),r=e.attributes||{};if(void 0===r.nonce){var o=n.nc;o&&(r.nonce=o)}if(Object.keys(r).forEach((function(e){t.setAttribute(e,r[e])})),"function"==typeof e.insert)e.insert(t);else{var a=i(e.insert||"head");if(!a)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");a.appendChild(t)}return t}var s,f=(s=[],function(e,t){return s[e]=t,s.filter(Boolean).join("\n")});function d(e,t,n,r){var o=n?"":r.media?"@media ".concat(r.media," {").concat(r.css,"}"):r.css;if(e.styleSheet)e.styleSheet.cssText=f(t,o);else{var i=document.createTextNode(o),a=e.childNodes;a[t]&&e.removeChild(a[t]),a.length?e.insertBefore(i,a[t]):e.appendChild(i)}}function p(e,t,n){var r=n.css,o=n.media,i=n.sourceMap;if(o?e.setAttribute("media",o):e.removeAttribute("media"),i&&"undefined"!=typeof btoa&&(r+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(i))))," */")),e.styleSheet)e.styleSheet.cssText=r;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(r))}}var m=null,h=0;function y(e,t){var n,r,o;if(t.singleton){var i=h++;n=m||(m=c(t)),r=d.bind(null,n,i,!1),o=d.bind(null,n,i,!0)}else n=c(t),r=p.bind(null,n,t),o=function(){!function(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e)}(n)};return r(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap)return;r(e=t)}else o()}}e.exports=function(e,t){(t=t||{}).singleton||"boolean"==typeof t.singleton||(t.singleton=o());var n=u(e=e||[],t);return function(e){if(e=e||[],"[object Array]"===Object.prototype.toString.call(e)){for(var r=0;r<n.length;r++){var o=l(n[r]);a[o].references--}for(var i=u(e,t),c=0;c<n.length;c++){var s=l(n[c]);0===a[s].references&&(a[s].updater(),a.splice(s,1))}n=i}}}},function(e,t,n){"use strict";e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var n=e(t);return t[2]?"@media ".concat(t[2]," {").concat(n,"}"):n})).join("")},t.i=function(e,n,r){"string"==typeof e&&(e=[[null,e,""]]);var o={};if(r)for(var i=0;i<this.length;i++){var a=this[i][0];null!=a&&(o[a]=!0)}for(var l=0;l<e.length;l++){var u=[].concat(e[l]);r&&o[u[0]]||(n&&(u[2]?u[2]="".concat(n," and ").concat(u[2]):u[2]=n),t.push(u))}},t}},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(0),o=n.n(r).a.createContext(!1)},function(e,t){e.exports=function(e){if(!e.webpackPolyfill){var t=Object.create(e);t.children||(t.children=[]),Object.defineProperty(t,"loaded",{enumerable:!0,get:function(){return t.l}}),Object.defineProperty(t,"id",{enumerable:!0,get:function(){return t.i}}),Object.defineProperty(t,"exports",{enumerable:!0}),t.webpackPolyfill=1}return t}},function(e,t,n){"use strict";n.r(t);var r=n(3),o=n.n(r)()((function(e){return e[1]}));o.push([e.i,".alert{padding:1rem;background:#bdd7ec;border:1px solid #339aec}.alert.error{background:#ffc6c1;border:1px solid #d04800}.alert.success{background:#c3ffbd;border:1px solid #3eb641}",""]),t.default=o},function(e,t,n){"use strict";n.r(t);var r=n(3),o=n.n(r)()((function(e){return e[1]}));o.push([e.i,"@media(min-width: 600px){.type-switch{position:absolute;left:0;right:0;text-align:center}}.type-switch button{font-size:.95rem;font-weight:bold;background:#fff;text-shadow:1px 1px 1px #f8f8f8;padding:1rem 1.5rem;border:none;border-radius:0}.type-switch button:hover{cursor:pointer}.type-switch button.active{color:#fff;background:#333;text-shadow:1px 1px 1px #000}.type-switch button:first-child{border-top-left-radius:5px;border-bottom-left-radius:5px}.type-switch button:last-child{border-top-right-radius:5px;border-bottom-right-radius:5px}",""]),t.default=o},function(e,t,n){"use strict";n.r(t);var r=n(3),o=n.n(r)()((function(e){return e[1]}));o.push([e.i,"#header{background:#eee;border-bottom:1px solid #c9c9c9}#header .container{display:flex;flex-direction:row;align-items:center;justify-content:space-between;padding:1rem;position:relative}#header #logo{width:50px}#header #title{display:none}#header #write-mode{display:flex;align-items:center;padding:.9rem 1rem;border:1px solid #ccc;border-radius:5px;background:linear-gradient(180deg, #fff 0%, #ddd 100%)}#header #write-mode:hover{cursor:pointer;background:linear-gradient(0deg, #fff 0%, #ddd 100%)}#header #write-mode label{font-weight:bold;text-shadow:1px 1px 1px #fff}",""]),t.default=o},function(e,t,n){"use strict";n.r(t);var r=n(3),o=n.n(r)()((function(e){return e[1]}));o.push([e.i,".meta:not(:last-child){margin-right:.5rem}.meta__attributes{display:flex;flex-direction:row;list-style:none;padding-left:0;margin:0}.meta-attribute{padding-left:1rem;padding-right:1rem;border-right:1px solid #ccc}.meta-attribute:first-child{padding-left:0 !important}.meta-attribute:last-child{padding-right:0;border-right:0}.meta-attribute label{display:block;font-weight:bold;text-transform:capitalize;padding-bottom:.1rem}.meta-attribute pre{margin:0}.meta-none{color:#555;font-style:italic}",""]),t.default=o},function(e,t,n){"use strict";n.r(t);var r=n(3),o=n.n(r)()((function(e){return e[1]}));o.push([e.i,".reflection{border-left:5px solid #ccc;background:#efefef;margin-bottom:1px;overflow:hidden;transition:max-height .5s ease-out,opacity 1s linear;max-height:999px}.reflection.hidden{opacity:0;max-height:0}.reflection:last-child{margin-bottom:1rem}.reflection.pass{border-left-color:#3eb641;background-color:#c3ffbd}.reflection.fail{border-left-color:#d04800;background-color:#ffc6c1}.reflection.neutral{border-left-color:#339aec;background-color:#bdd7ec}.reflection .reflection__summary{display:flex;align-items:center;flex-direction:row;padding:1rem}.reflection .reflection__summary .title{color:#777;font-weight:bold;margin-right:1rem}.reflection .reflection__summary .method{font-weight:bold;margin-right:1rem}.reflection .reflection__summary .actions{margin-left:auto}.reflection .reflection__details{padding:1rem;background:#fff}",""]),t.default=o},function(e,t,n){"use strict";n.r(t);var r=n(3),o=n.n(r)()((function(e){return e[1]}));o.push([e.i,".io{display:flex;flex-direction:row;align-items:center;padding:.75rem 1rem;border:1px solid #aaa;border-radius:5px}.io:not(:last-child){margin-bottom:.5rem}.io h4{margin:0;color:#777;font-size:1.2rem;font-weight:normal;margin-right:1.25rem}",""]),t.default=o},function(e,t,n){"use strict";n.r(t);var r=n(3),o=n.n(r)()((function(e){return e[1]}));o.push([e.i,".execution{background:#333;margin-bottom:1px;border-left:10px solid #ccc;padding-left:2px;padding-right:12px;opacity:1;overflow:hidden;transition:max-height .5s ease-out,opacity 1s linear}.execution:hover{background:#444545}.execution.hidden{opacity:0;max-height:0}.execution.pass{border-left-color:#3eb641}.execution.pass .status{color:#3eb641}.execution.fail{border-left-color:#d04800}.execution.fail .status{color:#d04800}.execution.neutral{border-left-color:#339aec}.execution.neutral .status{color:#339aec}.execution.open{background:#333;border-left-color:#333}.execution--summary{display:flex;align-items:center;flex-direction:row;justify-content:space-between;padding:1rem 0;padding-left:10px;position:relative}.execution--summary:hover{cursor:pointer}.execution--summary .timestamp{color:#fff}.execution--summary .control-label{font-weight:bold;color:#339aec;text-transform:uppercase;pointer-events:none}@media(min-width: 600px){.execution--summary .control-label{position:absolute;left:0;right:0;text-align:center}}.execution--summary .status{text-align:right;font-weight:bold;text-transform:uppercase}.execution--details{overflow:auto}",""]),t.default=o},function(e,t,n){"use strict";n.r(t);var r=n(3),o=n.n(r)()((function(e){return e[1]}));o.push([e.i,".actions button{border:none;color:#fff;background:#000;padding:.5rem 1rem;margin-left:.5rem;border-radius:.25rem}.actions button:hover{cursor:pointer;background:#222}.actions button.keep{background:#45487e}.actions button.delete{background:#7e3837}.actions button.disabled{background:#555}.actions button.disabled:hover{background:#555;cursor:not-allowed}",""]),t.default=o},function(e,t,n){"use strict";n.r(t);var r=n(3),o=n.n(r)()((function(e){return e[1]}));o.push([e.i,"",""]),t.default=o},function(e,t,n){"use strict";n.r(t);var r=n(3),o=n.n(r)()((function(e){return e[1]}));o.push([e.i,"body{padding:0;margin:0;font-family:Arial;background:#fefefe}.container{max-width:1200px;margin:0 auto;padding:1rem}",""]),t.default=o},function(e,t,n){"use strict";(function(e){var r=n(0),o=n.n(r),i=n(1);n(42);function a(e){return(a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function l(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,o=!1,i=void 0;try{for(var a,l=e[Symbol.iterator]();!(r=(a=l.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,i=e}finally{try{r||null==l.return||l.return()}finally{if(o)throw i}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return u(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return u(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function u(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function c(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function s(e,t){return(s=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function f(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=p(e);if(t){var o=p(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return d(this,n)}}function d(e,t){return!t||"object"!==a(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function p(e){return(p=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var m=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&s(e,t)}(a,e);var t,n,r,i=f(a);function a(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),i.call(this,e)}return t=a,(n=[{key:"render",value:function(){var e=this;return o.a.createElement("div",{className:"meta"},o.a.createElement("ul",{className:"meta__attributes"},Object.entries(this.props.meta).map((function(t){var n=l(t,2),r=n[0];return n[1],o.a.createElement("li",{className:"meta-attribute",key:"meta-attribute-".concat(r)},o.a.createElement("label",null,r,":"),o.a.createElement("span",{className:"value"},e.props.meta[r]))}))))}}])&&c(t.prototype,n),r&&c(t,r),a}(o.a.Component);t.a=Object(i.hot)(e)(m)}).call(this,n(5)(e))},function(e,t,n){"use strict";!function e(){if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE){0;try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(e){console.error(e)}}}(),e.exports=n(35)},function(e,t,n){"use strict";(function(e){var r=n(0),o=n.n(r),i=n(1),a=n(28);function l(e){return(l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function u(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function c(e,t){return(c=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function s(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=d(e);if(t){var o=d(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return f(this,n)}}function f(e,t){return!t||"object"!==l(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function d(e){return(d=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var p=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&c(e,t)}(l,e);var t,n,r,i=s(l);function l(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,l),(t=i.call(this,e)).state={},t.create_executions(e.reflections),t}return t=l,(n=[{key:"create_executions",value:function(e){var t={};e.forEach((function(e){var n="".concat(e.eid,"-").concat(e.num);t.hasOwnProperty(n)?t[n].reflections.push(e):(t[n]={id:e.eid,number:e.num,status:"pass",timestamp:e.time,reflections:[e]},t[n].is_control=!1,0===e.num&&(t[n].is_control=!0)),"fail"==e.status&&(t[n].status="fail")}));var n=[];Object.values(t).forEach((function(e){n.push(e)}));var r=n.sort((function(e,t){return e.timestamp<t.timestamp?1:-1}));this.state.executions=r}},{key:"render",value:function(){return o.a.createElement("div",{id:"executions"},this.state.executions.map((function(e,t){return o.a.createElement(a.a,{execution:e,key:e.id+"-"+e.number})})))}}])&&u(t.prototype,n),r&&u(t,r),l}(o.a.Component);t.a=Object(i.hot)(e)(p)}).call(this,n(5)(e))},function(e,t,n){"use strict";
|
2
2
|
/*
|
3
3
|
object-assign
|
4
4
|
(c) Sindre Sorhus
|
5
5
|
@license MIT
|
6
|
-
*/var r=Object.getOwnPropertySymbols,o=Object.prototype.hasOwnProperty,i=Object.prototype.propertyIsEnumerable;function a(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map((function(e){return t[e]})).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach((function(e){r[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(e){return!1}}()?Object.assign:function(e,t){for(var n,l,u=a(e),c=1;c<arguments.length;c++){for(var s in n=Object(arguments[c]))o.call(n,s)&&(u[s]=n[s]);if(r){l=r(n);for(var f=0;f<l.length;f++)i.call(n,l[f])&&(u[l[f]]=n[l[f]])}}return u}},function(e,t,n){"use strict";var r=n(2),o=n.n(r),i=n(10),a={insert:"head",singleton:!1},l=o()(i.default,a);if(!i.default.locals||e.hot.invalidate){var u=i.default.locals;e.hot.accept(10,function(t){i=n(10),function(e,t,n){if(!e&&t||e&&!t)return!1;var r;for(r in e)if((!n||"default"!==r)&&e[r]!==t[r])return!1;for(r in t)if(!(n&&"default"===r||e[r]))return!1;return!0}(u,i.default.locals,void 0)?(u=i.default.locals,l(i.default)):e.hot.invalidate()}.bind(this))}e.hot.dispose((function(){l()}));i.default.locals},function(e,t,n){"use strict";var r=n(2),o=n.n(r),i=n(11),a={insert:"head",singleton:!1},l=o()(i.default,a);if(!i.default.locals||e.hot.invalidate){var u=i.default.locals;e.hot.accept(11,function(t){i=n(11),function(e,t,n){if(!e&&t||e&&!t)return!1;var r;for(r in e)if((!n||"default"!==r)&&e[r]!==t[r])return!1;for(r in t)if(!(n&&"default"===r||e[r]))return!1;return!0}(u,i.default.locals,void 0)?(u=i.default.locals,l(i.default)):e.hot.invalidate()}.bind(this))}e.hot.dispose((function(){l()}));i.default.locals},function(e,t,n){"use strict";var r=n(2),o=n.n(r),i=n(12),a={insert:"head",singleton:!1},l=o()(i.default,a);if(!i.default.locals||e.hot.invalidate){var u=i.default.locals;e.hot.accept(12,function(t){i=n(12),function(e,t,n){if(!e&&t||e&&!t)return!1;var r;for(r in e)if((!n||"default"!==r)&&e[r]!==t[r])return!1;for(r in t)if(!(n&&"default"===r||e[r]))return!1;return!0}(u,i.default.locals,void 0)?(u=i.default.locals,l(i.default)):e.hot.invalidate()}.bind(this))}e.hot.dispose((function(){l()}));i.default.locals},function(e,t,n){"use strict";var r=n(2),o=n.n(r),i=n(13),a={insert:"head",singleton:!1},l=o()(i.default,a);if(!i.default.locals||e.hot.invalidate){var u=i.default.locals;e.hot.accept(13,function(t){i=n(13),function(e,t,n){if(!e&&t||e&&!t)return!1;var r;for(r in e)if((!n||"default"!==r)&&e[r]!==t[r])return!1;for(r in t)if(!(n&&"default"===r||e[r]))return!1;return!0}(u,i.default.locals,void 0)?(u=i.default.locals,l(i.default)):e.hot.invalidate()}.bind(this))}e.hot.dispose((function(){l()}));i.default.locals},function(e,t,n){"use strict";(function(e){var r=n(0),o=n.n(r),i=(n(17),n(1)),a=n(4),l=n(25),u=n(26),c=n(18),s=n(30);n(43),n(44);function f(e){return(f="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function d(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,o=!1,i=void 0;try{for(var a,l=e[Symbol.iterator]();!(r=(a=l.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,i=e}finally{try{r||null==l.return||l.return()}finally{if(o)throw i}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return p(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return p(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function p(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function m(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function h(e,t){return(h=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function y(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=g(e);if(t){var o=g(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return v(this,n)}}function v(e,t){return!t||"object"!==f(t)&&"function"!=typeof t?b(e):t}function b(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function g(e){return(g=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function w(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var x=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&h(e,t)}(f,e);var t,n,r,i=y(f);function f(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,f),w(b(t=i.call(this,e)),"addAlert",(function(e,n){var r={type:e,message:n},o=t.state.alerts;o.push(r),t.setState({alerts:o})})),w(b(t),"switchType",(function(e){var n={};Object.entries(t.state.types).forEach((function(t,r){var o=d(t,2),i=o[0],a=o[1];a.active=i===e,n[i]=a})),t.setState({types:n}),"reflection"==e?t.setState({results:o.a.createElement(c.a,{reflections:t.state.db.reflections})}):"control"==e&&t.setState({results:o.a.createElement(s.a,{controls:t.state.db.controls})})})),t.state={},t.state.db={},t.state.alerts=[],t.state.results=[],t.state.writeMode=!1,t.state.types={reflection:{title:"Reflections",active:!0},control:{title:"Controls",active:!1}},"file:"!=window.location.protocol&&(t.state.writeMode=!0),t}return t=f,(n=[{key:"componentDidMount",value:function(){var e=this;window.addEventListener("load",(function(t){try{e.setState({db:JSON.parse(db)}),console.log("DATA:"),console.log(e.state.db)}catch(t){e.addAlert("error","Couldn't load database.")}null!=db&&e.setState({results:o.a.createElement(c.a,{reflections:e.state.db.reflections})})}))}},{key:"render",value:function(){return o.a.createElement(o.a.Fragment,null,o.a.createElement(a.a.Provider,{value:this.state.writeMode},o.a.createElement(u.a,{types:this.state.types,switchType:this.switchType}),o.a.createElement("div",{className:"container"},0!=this.state.alerts.length?o.a.createElement(l.a,{alerts:this.state.alerts}):null,o.a.createElement("main",{id:"content"},this.state.results))))}}])&&m(t.prototype,n),r&&m(t,r),f}(r.Component);t.a=Object(i.hot)(e)(x)}).call(this,n(5)(e))},function(e,t,n){"use strict";(function(e){var r=n(0),o=n.n(r),i=n(1);n(38);function a(e){return(a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function l(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function u(e,t){return(u=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function c(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=f(e);if(t){var o=f(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return s(this,n)}}function s(e,t){return!t||"object"!==a(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function f(e){return(f=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var d=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&u(e,t)}(a,e);var t,n,r,i=c(a);function a(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),i.call(this,e)}return t=a,(n=[{key:"render",value:function(){return o.a.createElement("div",{id:"alerts"},this.props.alerts.map((function(e,t){return o.a.createElement("div",{className:"alert ".concat(e.type),key:"alert-".concat(t)},e.message)})))}}])&&l(t.prototype,n),r&&l(t,r),a}(o.a.Component);t.a=Object(i.hot)(e)(d)}).call(this,n(5)(e))},function(e,t,n){"use strict";(function(e){var r=n(0),o=n.n(r),i=n(1),a=n(4),l=n(27);n(41);function u(e){return(u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function c(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function s(e,t){return(s=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function f(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=p(e);if(t){var o=p(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return d(this,n)}}function d(e,t){return!t||"object"!==u(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function p(e){return(p=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var m,h,y,v=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&s(e,t)}(a,e);var t,n,r,i=f(a);function a(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),i.call(this,e)}return t=a,(n=[{key:"render",value:function(){var e="Read-Only";return 1==this.context&&(e="Read/Write"),o.a.createElement("header",{id:"header"},o.a.createElement("div",{className:"container"},o.a.createElement("svg",{id:"logo",enableBackground:"new 0 0 500 500",viewBox:"0 0 500 500",xmlns:"http://www.w3.org/2000/svg"},o.a.createElement("path",{d:"m307.5 80.5h-115l-57.5 205h230z",fill:"#0047d0"}),o.a.createElement("path",{d:"m178 76.5-53.1-44-117.9 139 116 112z",fill:"#d04800"}),o.a.createElement("path",{d:"m190.4 467.5h115l57.5-168h-229z",fill:"#0047d0",opacity:".7"}),o.a.createElement("path",{d:"m177 467.5-81-85-92-197 115 113z",fill:"#d04800",opacity:".7"}),o.a.createElement("g",{fill:"#008c33"},o.a.createElement("path",{d:"m322 76.5 53.1-44 118 139-116 112z"}),o.a.createElement("path",{d:"m320 467.5 84-85 92-197-117 113z",opacity:".7"}))),o.a.createElement("h1",{id:"title"},"Reflekt"),o.a.createElement(l.a,{types:this.props.types,switchType:this.props.switchType}),o.a.createElement("div",{id:"write-mode",className:this.context?"read-write":"read-only"},o.a.createElement("label",null,e),o.a.createElement("div",{className:"icon"}))))}}])&&c(t.prototype,n),r&&c(t,r),a}(o.a.Component);m=v,h="contextType",y=a.a,h in m?Object.defineProperty(m,h,{value:y,enumerable:!0,configurable:!0,writable:!0}):m[h]=y,t.a=Object(i.hot)(e)(v)}).call(this,n(5)(e))},function(e,t,n){"use strict";(function(e){var r=n(0),o=n.n(r),i=n(1);n(40);function a(e){return(a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function l(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,o=!1,i=void 0;try{for(var a,l=e[Symbol.iterator]();!(r=(a=l.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,i=e}finally{try{r||null==l.return||l.return()}finally{if(o)throw i}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return u(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return u(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function u(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function c(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function s(e,t){return(s=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function f(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=m(e);if(t){var o=m(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return d(this,n)}}function d(e,t){return!t||"object"!==a(t)&&"function"!=typeof t?p(e):t}function p(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function m(e){return(m=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var h=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&s(e,t)}(a,e);var t,n,r,i=f(a);function a(e){var t,n,r,o;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),t=i.call(this,e),n=p(t),o=function(e,n){t.props.switchType(e)},(r="activate")in n?Object.defineProperty(n,r,{value:o,enumerable:!0,configurable:!0,writable:!0}):n[r]=o,t}return t=a,(n=[{key:"render",value:function(){var e=this;return o.a.createElement("div",{className:"type-switch"},Object.entries(this.props.types).map((function(t){var n=l(t,2),r=n[0],i=n[1];return o.a.createElement("button",{key:"switch-type-".concat(r),onClick:function(t){return e.activate(r,t)},className:i.active?"active":null},i.title)})))}}])&&c(t.prototype,n),r&&c(t,r),a}(o.a.Component);t.a=Object(i.hot)(e)(h)}).call(this,n(5)(e))},function(e,t,n){"use strict";(function(e){var r=n(0),o=n.n(r),i=n(1),a=n(4),l=n(29);n(22);function u(e){return(u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function c(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function s(e,t){return(s=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function f(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=m(e);if(t){var o=m(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return d(this,n)}}function d(e,t){return!t||"object"!==u(t)&&"function"!=typeof t?p(e):t}function p(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function m(e){return(m=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function h(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var y=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&s(e,t)}(a,e);var t,n,r,i=f(a);function a(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),h(p(t=i.call(this,e)),"toggle",(function(){t.setState((function(e){return{open:!e.open}}))})),h(p(t),"hide",(function(e){t.setState({hidden:!0})})),t.state={open:!1,status:e.execution.status,hidden:!1},t}return t=a,(n=[{key:"render",value:function(){return o.a.createElement("div",{className:"execution ".concat(this.state.status," ").concat(this.state.open?"open":"closed"," ").concat(this.state.hidden?" hidden":" visible")},o.a.createElement("div",{className:"execution--summary",onClick:this.toggle},o.a.createElement("div",{className:"timestamp"},new Intl.DateTimeFormat("default",{year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"}).format(1e3*this.props.execution.timestamp)),o.a.createElement("div",{className:"status"},this.props.execution.status)),o.a.createElement("div",{className:"execution--details"},this.state.open?this.props.execution.reflections.map((function(e,t){return o.a.createElement(l.a,{reflection:e,key:"reflection-".concat(e.ref_id)})})):null))}}])&&c(t.prototype,n),r&&c(t,r),a}(o.a.Component);h(y,"contextType",a.a),t.a=Object(i.hot)(e)(y)}).call(this,n(5)(e))},function(e,t,n){"use strict";(function(e){var r=n(0),o=n.n(r),i=n(1),a=n(4),l=n(16);n(20),n(21);function u(e){return(u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function c(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function s(e,t){return(s=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function f(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=m(e);if(t){var o=m(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return d(this,n)}}function d(e,t){return!t||"object"!==u(t)&&"function"!=typeof t?p(e):t}function p(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function m(e){return(m=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function h(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var y=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&s(e,t)}(a,e);var t,n,r,i=f(a);function a(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),h(p(t=i.call(this,e)),"hide",(function(e){t.setState({hidden:!0})})),t.state={status:e.reflection.status,hidden:!1},t}return t=a,(n=[{key:"render",value:function(){return o.a.createElement("div",{className:"reflection "+this.state.status+(this.state.hidden?" hidden":" visible")},o.a.createElement("div",{className:"reflection__summary"},o.a.createElement("span",{className:"title"},this.props.reflection.class),o.a.createElement("span",{className:"method"},this.props.reflection.method,"()")),o.a.createElement("div",{className:"reflection__details"},o.a.createElement("div",{className:"io",id:"inputs"},o.a.createElement("h4",null,"Input"),null!=this.props.reflection.inputs?this.props.reflection.inputs.map((function(e,t){return o.a.createElement(l.a,{meta:e,key:"meta-".concat(t)})})):o.a.createElement("strong",{className:"meta-none"},"none")),o.a.createElement("div",{className:"io",id:"output"},o.a.createElement("h4",null,"Output"),null!=this.props.reflection.output?o.a.createElement(l.a,{meta:this.props.reflection.output}):o.a.createElement("strong",{className:"meta-none"},"none"))))}}])&&c(t.prototype,n),r&&c(t,r),a}(o.a.Component);h(y,"contextType",a.a),t.a=Object(i.hot)(e)(y)}).call(this,n(5)(e))},function(e,t,n){"use strict";(function(e){var r=n(0),o=n.n(r),i=n(1),a=n(31);function l(e){return(l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function u(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function c(e,t){return(c=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function s(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=d(e);if(t){var o=d(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return f(this,n)}}function f(e,t){return!t||"object"!==l(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function d(e){return(d=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var p=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&c(e,t)}(l,e);var t,n,r,i=s(l);function l(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,l),(t=i.call(this,e)).state={},t.create_executions(e.controls),t}return t=l,(n=[{key:"create_executions",value:function(e){var t={};e.forEach((function(e){null==e.base_id?t[e.exe_id]={id:e.exe_id,status:"pass",timestamp:e.time,controls:[e]}:t[e.base_id].controls.push(e)}));var n=[];Object.values(t).forEach((function(e){n.push(e)}));var r=n.sort((function(e,t){return e.timestamp<t.timestamp?1:-1}));this.state.executions=r}},{key:"render",value:function(){return o.a.createElement("div",{id:"executions"},this.state.executions.map((function(e,t){return o.a.createElement(a.a,{execution:e,key:e.id})})))}}])&&u(t.prototype,n),r&&u(t,r),l}(o.a.Component);t.a=Object(i.hot)(e)(p)}).call(this,n(5)(e))},function(e,t,n){"use strict";(function(e){var r=n(0),o=n.n(r),i=n(1),a=n(4),l=n(32);n(22),n(23);function u(e){return(u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function c(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function s(e,t){return(s=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function f(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=m(e);if(t){var o=m(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return d(this,n)}}function d(e,t){return!t||"object"!==u(t)&&"function"!=typeof t?p(e):t}function p(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function m(e){return(m=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function h(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var y=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&s(e,t)}(a,e);var t,n,r,i=f(a);function a(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),h(p(t=i.call(this,e)),"toggle",(function(){t.setState((function(e){return{open:!e.open}}))})),h(p(t),"delete_controls",(function(e,n){n.stopPropagation();var r={method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({exe_id:e})};fetch("/controls/delete",r).then((function(n){return t.hide(e)}))})),h(p(t),"hide",(function(e){t.setState({hidden:!0})})),t.state={open:!1,hidden:!1},t}return t=a,(n=[{key:"render",value:function(){var e=this;return o.a.createElement("div",{className:"execution neutral ".concat(this.state.open?"open":"closed"," ").concat(this.state.hidden?" hidden":" visible")},o.a.createElement("div",{className:"execution--summary",onClick:this.toggle},o.a.createElement("div",{className:"timestamp"},new Intl.DateTimeFormat("default",{year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"}).format(1e3*this.props.execution.timestamp)),o.a.createElement("div",{className:"actions"},o.a.createElement("button",{className:"delete "+(this.context?"enabled":"disabled"),onClick:function(t){return e.delete_controls(e.props.execution.id,t)}},"Delete"))),o.a.createElement("div",{className:"execution--details"},this.state.open?this.props.execution.controls.map((function(e,t){return o.a.createElement(l.a,{control:e,key:"control-".concat(e.ref_id)})})):null))}}])&&c(t.prototype,n),r&&c(t,r),a}(o.a.Component);h(y,"contextType",a.a),t.a=Object(i.hot)(e)(y)}).call(this,n(5)(e))},function(e,t,n){"use strict";(function(e){var r=n(0),o=n.n(r),i=n(1),a=n(4),l=n(16);n(20),n(23),n(21);function u(e){return(u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function c(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function s(e,t){return(s=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function f(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=m(e);if(t){var o=m(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return d(this,n)}}function d(e,t){return!t||"object"!==u(t)&&"function"!=typeof t?p(e):t}function p(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function m(e){return(m=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function h(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var y=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&s(e,t)}(a,e);var t,n,r,i=f(a);function a(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),h(p(t=i.call(this,e)),"hide",(function(e){t.setState({hidden:!0})})),h(p(t),"delete",(function(e,n){var r={method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({ref_id:e})};fetch("/control/delete",r).then((function(n){return t.hide(e)}))})),t.state={hidden:!1},t}return t=a,(n=[{key:"render",value:function(){var e=this;return o.a.createElement("div",{className:"reflection neutral"+(this.state.hidden?" hidden":" visible")},o.a.createElement("div",{className:"reflection__summary"},o.a.createElement("span",{className:"title"},this.props.control.class),o.a.createElement("span",{className:"method"},this.props.control.method,"()"),null!=this.props.control.base_id?o.a.createElement("div",{className:"actions"},o.a.createElement("button",{className:"delete "+(this.context?"enabled":"disabled"),onClick:function(t){return e.delete(e.props.control.ref_id,t)}},"Delete")):null),o.a.createElement("div",{className:"reflection__details"},o.a.createElement("div",{className:"io",id:"inputs"},o.a.createElement("h4",null,"Input"),null!=this.props.control.inputs?this.props.control.inputs.map((function(e,t){return o.a.createElement(l.a,{meta:e,key:"meta-".concat(t)})})):o.a.createElement("strong",{className:"meta-none"},"none")),o.a.createElement("div",{className:"io",id:"output"},o.a.createElement("h4",null,"Output"),null!=this.props.control.output?o.a.createElement(l.a,{meta:this.props.control.output}):o.a.createElement("strong",{className:"meta-none"},"none"))))}}])&&c(t.prototype,n),r&&c(t,r),a}(o.a.Component);h(y,"contextType",a.a),t.a=Object(i.hot)(e)(y)}).call(this,n(5)(e))},function(e,t,n){"use strict";n.r(t);var r=n(0),o=n.n(r),i=n(17),a=n.n(i),l=n(24);a.a.render(o.a.createElement(l.a,null),document.getElementById("root"))},function(e,t,n){"use strict";
|
6
|
+
*/var r=Object.getOwnPropertySymbols,o=Object.prototype.hasOwnProperty,i=Object.prototype.propertyIsEnumerable;function a(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map((function(e){return t[e]})).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach((function(e){r[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(e){return!1}}()?Object.assign:function(e,t){for(var n,l,u=a(e),c=1;c<arguments.length;c++){for(var s in n=Object(arguments[c]))o.call(n,s)&&(u[s]=n[s]);if(r){l=r(n);for(var f=0;f<l.length;f++)i.call(n,l[f])&&(u[l[f]]=n[l[f]])}}return u}},function(e,t,n){"use strict";var r=n(2),o=n.n(r),i=n(10),a={insert:"head",singleton:!1},l=o()(i.default,a);if(!i.default.locals||e.hot.invalidate){var u=i.default.locals;e.hot.accept(10,function(t){i=n(10),function(e,t,n){if(!e&&t||e&&!t)return!1;var r;for(r in e)if((!n||"default"!==r)&&e[r]!==t[r])return!1;for(r in t)if(!(n&&"default"===r||e[r]))return!1;return!0}(u,i.default.locals,void 0)?(u=i.default.locals,l(i.default)):e.hot.invalidate()}.bind(this))}e.hot.dispose((function(){l()}));i.default.locals},function(e,t,n){"use strict";var r=n(2),o=n.n(r),i=n(11),a={insert:"head",singleton:!1},l=o()(i.default,a);if(!i.default.locals||e.hot.invalidate){var u=i.default.locals;e.hot.accept(11,function(t){i=n(11),function(e,t,n){if(!e&&t||e&&!t)return!1;var r;for(r in e)if((!n||"default"!==r)&&e[r]!==t[r])return!1;for(r in t)if(!(n&&"default"===r||e[r]))return!1;return!0}(u,i.default.locals,void 0)?(u=i.default.locals,l(i.default)):e.hot.invalidate()}.bind(this))}e.hot.dispose((function(){l()}));i.default.locals},function(e,t,n){"use strict";var r=n(2),o=n.n(r),i=n(12),a={insert:"head",singleton:!1},l=o()(i.default,a);if(!i.default.locals||e.hot.invalidate){var u=i.default.locals;e.hot.accept(12,function(t){i=n(12),function(e,t,n){if(!e&&t||e&&!t)return!1;var r;for(r in e)if((!n||"default"!==r)&&e[r]!==t[r])return!1;for(r in t)if(!(n&&"default"===r||e[r]))return!1;return!0}(u,i.default.locals,void 0)?(u=i.default.locals,l(i.default)):e.hot.invalidate()}.bind(this))}e.hot.dispose((function(){l()}));i.default.locals},function(e,t,n){"use strict";var r=n(2),o=n.n(r),i=n(13),a={insert:"head",singleton:!1},l=o()(i.default,a);if(!i.default.locals||e.hot.invalidate){var u=i.default.locals;e.hot.accept(13,function(t){i=n(13),function(e,t,n){if(!e&&t||e&&!t)return!1;var r;for(r in e)if((!n||"default"!==r)&&e[r]!==t[r])return!1;for(r in t)if(!(n&&"default"===r||e[r]))return!1;return!0}(u,i.default.locals,void 0)?(u=i.default.locals,l(i.default)):e.hot.invalidate()}.bind(this))}e.hot.dispose((function(){l()}));i.default.locals},function(e,t,n){"use strict";(function(e){var r=n(0),o=n.n(r),i=(n(17),n(1)),a=n(4),l=n(25),u=n(26),c=n(18),s=n(30);n(43),n(44);function f(e){return(f="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function d(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,o=!1,i=void 0;try{for(var a,l=e[Symbol.iterator]();!(r=(a=l.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,i=e}finally{try{r||null==l.return||l.return()}finally{if(o)throw i}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return p(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return p(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function p(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function m(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function h(e,t){return(h=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function y(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=g(e);if(t){var o=g(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return v(this,n)}}function v(e,t){return!t||"object"!==f(t)&&"function"!=typeof t?b(e):t}function b(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function g(e){return(g=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function w(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var x=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&h(e,t)}(f,e);var t,n,r,i=y(f);function f(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,f),w(b(t=i.call(this,e)),"addAlert",(function(e,n){var r={type:e,message:n},o=t.state.alerts;o.push(r),t.setState({alerts:o})})),w(b(t),"switchType",(function(e){var n={};Object.entries(t.state.types).forEach((function(t,r){var o=d(t,2),i=o[0],a=o[1];a.active=i===e,n[i]=a})),t.setState({types:n}),"reflection"==e?t.setState({results:o.a.createElement(c.a,{reflections:t.state.db.reflections})}):"control"==e&&t.setState({results:o.a.createElement(s.a,{controls:t.state.db.controls})})})),t.state={},t.state.db={},t.state.alerts=[],t.state.results=[],t.state.writeMode=!1,t.state.types={reflection:{title:"Reflections",active:!0},control:{title:"Controls",active:!1}},"file:"!=window.location.protocol&&(t.state.writeMode=!0),t}return t=f,(n=[{key:"componentDidMount",value:function(){var e=this;window.addEventListener("load",(function(t){try{e.setState({db:JSON.parse(db)}),console.log("DATA:"),console.log(e.state.db)}catch(t){e.addAlert("error","Couldn't load database.")}null!=db&&e.setState({results:o.a.createElement(c.a,{reflections:e.state.db.reflections})})}))}},{key:"render",value:function(){return o.a.createElement(o.a.Fragment,null,o.a.createElement(a.a.Provider,{value:this.state.writeMode},o.a.createElement(u.a,{types:this.state.types,switchType:this.switchType}),o.a.createElement("div",{className:"container"},0!=this.state.alerts.length?o.a.createElement(l.a,{alerts:this.state.alerts}):null,o.a.createElement("main",{id:"content"},this.state.results))))}}])&&m(t.prototype,n),r&&m(t,r),f}(r.Component);t.a=Object(i.hot)(e)(x)}).call(this,n(5)(e))},function(e,t,n){"use strict";(function(e){var r=n(0),o=n.n(r),i=n(1);n(38);function a(e){return(a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function l(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function u(e,t){return(u=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function c(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=f(e);if(t){var o=f(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return s(this,n)}}function s(e,t){return!t||"object"!==a(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function f(e){return(f=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var d=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&u(e,t)}(a,e);var t,n,r,i=c(a);function a(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),i.call(this,e)}return t=a,(n=[{key:"render",value:function(){return o.a.createElement("div",{id:"alerts"},this.props.alerts.map((function(e,t){return o.a.createElement("div",{className:"alert ".concat(e.type),key:"alert-".concat(t)},e.message)})))}}])&&l(t.prototype,n),r&&l(t,r),a}(o.a.Component);t.a=Object(i.hot)(e)(d)}).call(this,n(5)(e))},function(e,t,n){"use strict";(function(e){var r=n(0),o=n.n(r),i=n(1),a=n(4),l=n(27);n(41);function u(e){return(u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function c(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function s(e,t){return(s=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function f(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=p(e);if(t){var o=p(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return d(this,n)}}function d(e,t){return!t||"object"!==u(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function p(e){return(p=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var m,h,y,v=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&s(e,t)}(a,e);var t,n,r,i=f(a);function a(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),i.call(this,e)}return t=a,(n=[{key:"render",value:function(){var e="Read-Only";return 1==this.context&&(e="Read/Write"),o.a.createElement("header",{id:"header"},o.a.createElement("div",{className:"container"},o.a.createElement("svg",{id:"logo",enableBackground:"new 0 0 500 500",viewBox:"0 0 500 500",xmlns:"http://www.w3.org/2000/svg"},o.a.createElement("path",{d:"m307.5 80.5h-115l-57.5 205h230z",fill:"#0047d0"}),o.a.createElement("path",{d:"m178 76.5-53.1-44-117.9 139 116 112z",fill:"#d04800"}),o.a.createElement("path",{d:"m190.4 467.5h115l57.5-168h-229z",fill:"#0047d0",opacity:".7"}),o.a.createElement("path",{d:"m177 467.5-81-85-92-197 115 113z",fill:"#d04800",opacity:".7"}),o.a.createElement("g",{fill:"#008c33"},o.a.createElement("path",{d:"m322 76.5 53.1-44 118 139-116 112z"}),o.a.createElement("path",{d:"m320 467.5 84-85 92-197-117 113z",opacity:".7"}))),o.a.createElement("h1",{id:"title"},"Reflekt"),o.a.createElement(l.a,{types:this.props.types,switchType:this.props.switchType}),o.a.createElement("div",{id:"write-mode",className:this.context?"read-write":"read-only"},o.a.createElement("label",null,e),o.a.createElement("div",{className:"icon"}))))}}])&&c(t.prototype,n),r&&c(t,r),a}(o.a.Component);m=v,h="contextType",y=a.a,h in m?Object.defineProperty(m,h,{value:y,enumerable:!0,configurable:!0,writable:!0}):m[h]=y,t.a=Object(i.hot)(e)(v)}).call(this,n(5)(e))},function(e,t,n){"use strict";(function(e){var r=n(0),o=n.n(r),i=n(1);n(40);function a(e){return(a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function l(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,o=!1,i=void 0;try{for(var a,l=e[Symbol.iterator]();!(r=(a=l.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,i=e}finally{try{r||null==l.return||l.return()}finally{if(o)throw i}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return u(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return u(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function u(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function c(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function s(e,t){return(s=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function f(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=m(e);if(t){var o=m(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return d(this,n)}}function d(e,t){return!t||"object"!==a(t)&&"function"!=typeof t?p(e):t}function p(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function m(e){return(m=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var h=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&s(e,t)}(a,e);var t,n,r,i=f(a);function a(e){var t,n,r,o;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),t=i.call(this,e),n=p(t),o=function(e,n){t.props.switchType(e)},(r="activate")in n?Object.defineProperty(n,r,{value:o,enumerable:!0,configurable:!0,writable:!0}):n[r]=o,t}return t=a,(n=[{key:"render",value:function(){var e=this;return o.a.createElement("div",{className:"type-switch"},Object.entries(this.props.types).map((function(t){var n=l(t,2),r=n[0],i=n[1];return o.a.createElement("button",{key:"switch-type-".concat(r),onClick:function(t){return e.activate(r,t)},className:i.active?"active":null},i.title)})))}}])&&c(t.prototype,n),r&&c(t,r),a}(o.a.Component);t.a=Object(i.hot)(e)(h)}).call(this,n(5)(e))},function(e,t,n){"use strict";(function(e){var r=n(0),o=n.n(r),i=n(1),a=n(4),l=n(29);n(22);function u(e){return(u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function c(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function s(e,t){return(s=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function f(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=m(e);if(t){var o=m(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return d(this,n)}}function d(e,t){return!t||"object"!==u(t)&&"function"!=typeof t?p(e):t}function p(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function m(e){return(m=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function h(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var y=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&s(e,t)}(a,e);var t,n,r,i=f(a);function a(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),h(p(t=i.call(this,e)),"toggle",(function(){t.setState((function(e){return{open:!e.open}}))})),h(p(t),"hide",(function(e){t.setState({hidden:!0})})),t.state={open:!1,status:e.execution.status,hidden:!1},t}return t=a,(n=[{key:"render",value:function(){return o.a.createElement("div",{className:"execution ".concat(this.state.status," ").concat(this.state.open?"open":"closed"," ").concat(this.state.hidden?" hidden":" visible")},o.a.createElement("div",{className:"execution--summary",onClick:this.toggle},o.a.createElement("div",{className:"timestamp"},new Intl.DateTimeFormat("default",{year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"}).format(1e3*this.props.execution.timestamp)),this.props.execution.is_control?o.a.createElement("div",{className:"control-label"},"New Control"):null,o.a.createElement("div",{className:"status"},this.props.execution.status)),o.a.createElement("div",{className:"execution--details"},this.state.open?this.props.execution.reflections.map((function(e,t){return o.a.createElement(l.a,{reflection:e,key:"reflection-".concat(e.rid)})})):null))}}])&&c(t.prototype,n),r&&c(t,r),a}(o.a.Component);h(y,"contextType",a.a),t.a=Object(i.hot)(e)(y)}).call(this,n(5)(e))},function(e,t,n){"use strict";(function(e){var r=n(0),o=n.n(r),i=n(1),a=n(4),l=n(16);n(20),n(21);function u(e){return(u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function c(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function s(e,t){return(s=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function f(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=m(e);if(t){var o=m(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return d(this,n)}}function d(e,t){return!t||"object"!==u(t)&&"function"!=typeof t?p(e):t}function p(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function m(e){return(m=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function h(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var y=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&s(e,t)}(a,e);var t,n,r,i=f(a);function a(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),h(p(t=i.call(this,e)),"hide",(function(e){t.setState({hidden:!0})})),t.state={status:e.reflection.status,hidden:!1},t}return t=a,(n=[{key:"render",value:function(){return o.a.createElement("div",{className:"reflection "+this.state.status+(this.state.hidden?" hidden":" visible")},o.a.createElement("div",{className:"reflection__summary"},o.a.createElement("span",{className:"title"},this.props.reflection.class),o.a.createElement("span",{className:"method"},this.props.reflection.method,"()")),o.a.createElement("div",{className:"reflection__details"},o.a.createElement("div",{className:"io",id:"inputs"},o.a.createElement("h4",null,"Input"),null!=this.props.reflection.inputs?this.props.reflection.inputs.map((function(e,t){return o.a.createElement(l.a,{meta:e,key:"meta-".concat(t)})})):o.a.createElement("strong",{className:"meta-none"},"none")),o.a.createElement("div",{className:"io",id:"output"},o.a.createElement("h4",null,"Output"),null!=this.props.reflection.output?o.a.createElement(l.a,{meta:this.props.reflection.output}):o.a.createElement("strong",{className:"meta-none"},"none"))))}}])&&c(t.prototype,n),r&&c(t,r),a}(o.a.Component);h(y,"contextType",a.a),t.a=Object(i.hot)(e)(y)}).call(this,n(5)(e))},function(e,t,n){"use strict";(function(e){var r=n(0),o=n.n(r),i=n(1),a=n(31);function l(e){return(l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function u(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function c(e,t){return(c=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function s(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=d(e);if(t){var o=d(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return f(this,n)}}function f(e,t){return!t||"object"!==l(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function d(e){return(d=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var p=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&c(e,t)}(l,e);var t,n,r,i=s(l);function l(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,l),(t=i.call(this,e)).state={},t.create_executions(e.controls),t}return t=l,(n=[{key:"create_executions",value:function(e){var t={};e.forEach((function(e){t.hasOwnProperty(e.eid)?t[e.eid].controls.push(e):t[e.eid]={id:e.eid,status:"pass",timestamp:e.time,controls:[e]}}));var n=[];Object.values(t).forEach((function(e){n.push(e)}));var r=n.sort((function(e,t){return e.timestamp<t.timestamp?1:-1}));this.state.executions=r}},{key:"render",value:function(){return o.a.createElement("div",{id:"executions"},this.state.executions.map((function(e,t){return o.a.createElement(a.a,{execution:e,key:e.id})})))}}])&&u(t.prototype,n),r&&u(t,r),l}(o.a.Component);t.a=Object(i.hot)(e)(p)}).call(this,n(5)(e))},function(e,t,n){"use strict";(function(e){var r=n(0),o=n.n(r),i=n(1),a=n(4),l=n(32);n(22),n(23);function u(e){return(u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function c(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function s(e,t){return(s=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function f(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=m(e);if(t){var o=m(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return d(this,n)}}function d(e,t){return!t||"object"!==u(t)&&"function"!=typeof t?p(e):t}function p(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function m(e){return(m=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function h(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var y=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&s(e,t)}(a,e);var t,n,r,i=f(a);function a(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),h(p(t=i.call(this,e)),"toggle",(function(){t.setState((function(e){return{open:!e.open}}))})),h(p(t),"delete_controls",(function(e,n){n.stopPropagation();var r={method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({aid:e})};fetch("/controls/delete",r).then((function(n){return t.hide(e)}))})),h(p(t),"hide",(function(e){t.setState({hidden:!0})})),t.state={open:!1,hidden:!1},t}return t=a,(n=[{key:"render",value:function(){var e=this;return o.a.createElement("div",{className:"execution neutral ".concat(this.state.open?"open":"closed"," ").concat(this.state.hidden?" hidden":" visible")},o.a.createElement("div",{className:"execution--summary",onClick:this.toggle},o.a.createElement("div",{className:"timestamp"},new Intl.DateTimeFormat("default",{year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"}).format(1e3*this.props.execution.timestamp)),o.a.createElement("div",{className:"control-label"},"Control"),o.a.createElement("div",{className:"actions"},o.a.createElement("button",{className:"delete "+(this.context?"enabled":"disabled"),onClick:function(t){return e.delete_controls(e.props.execution.id,t)}},"Delete"))),o.a.createElement("div",{className:"execution--details"},this.state.open?this.props.execution.controls.map((function(e,t){return o.a.createElement(l.a,{control:e,key:"control-".concat(e.rid)})})):null))}}])&&c(t.prototype,n),r&&c(t,r),a}(o.a.Component);h(y,"contextType",a.a),t.a=Object(i.hot)(e)(y)}).call(this,n(5)(e))},function(e,t,n){"use strict";(function(e){var r=n(0),o=n.n(r),i=n(1),a=n(4),l=n(16);n(20),n(23),n(21);function u(e){return(u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function c(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function s(e,t){return(s=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function f(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=m(e);if(t){var o=m(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return d(this,n)}}function d(e,t){return!t||"object"!==u(t)&&"function"!=typeof t?p(e):t}function p(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function m(e){return(m=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function h(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var y=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&s(e,t)}(a,e);var t,n,r,i=f(a);function a(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),h(p(t=i.call(this,e)),"hide",(function(e){t.setState({hidden:!0})})),h(p(t),"delete",(function(e,n){var r={method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({rid:e})};fetch("/control/delete",r).then((function(n){return t.hide(e)}))})),t.state={hidden:!1},t}return t=a,(n=[{key:"render",value:function(){var e=this;return o.a.createElement("div",{className:"reflection neutral"+(this.state.hidden?" hidden":" visible")},o.a.createElement("div",{className:"reflection__summary"},o.a.createElement("span",{className:"title"},this.props.control.class),o.a.createElement("span",{className:"method"},this.props.control.method,"()"),null!=this.props.control.eid?o.a.createElement("div",{className:"actions"},o.a.createElement("button",{className:"delete "+(this.context?"enabled":"disabled"),onClick:function(t){return e.delete(e.props.control.rid,t)}},"Delete")):null),o.a.createElement("div",{className:"reflection__details"},o.a.createElement("div",{className:"io",id:"inputs"},o.a.createElement("h4",null,"Input"),null!=this.props.control.inputs?this.props.control.inputs.map((function(e,t){return o.a.createElement(l.a,{meta:e,key:"meta-".concat(t)})})):o.a.createElement("strong",{className:"meta-none"},"none")),o.a.createElement("div",{className:"io",id:"output"},o.a.createElement("h4",null,"Output"),null!=this.props.control.output?o.a.createElement(l.a,{meta:this.props.control.output}):o.a.createElement("strong",{className:"meta-none"},"none"))))}}])&&c(t.prototype,n),r&&c(t,r),a}(o.a.Component);h(y,"contextType",a.a),t.a=Object(i.hot)(e)(y)}).call(this,n(5)(e))},function(e,t,n){"use strict";n.r(t);var r=n(0),o=n.n(r),i=n(17),a=n.n(i),l=n(24);a.a.render(o.a.createElement(l.a,null),document.getElementById("root"))},function(e,t,n){"use strict";
|
7
7
|
/** @license React v16.13.1
|
8
8
|
* react.production.min.js
|
9
9
|
*
|
data/lib/web/package-lock.json
CHANGED
@@ -607,9 +607,9 @@
|
|
607
607
|
"integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4="
|
608
608
|
},
|
609
609
|
"ini": {
|
610
|
-
"version": "1.3.
|
611
|
-
"resolved": "https://registry.npmjs.org/ini/-/ini-1.3.
|
612
|
-
"integrity": "sha512-
|
610
|
+
"version": "1.3.8",
|
611
|
+
"resolved": "https://registry.npmjs.org/ini/-/ini-1.3.8.tgz",
|
612
|
+
"integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==",
|
613
613
|
"dev": true
|
614
614
|
},
|
615
615
|
"ipaddr.js": {
|
data/lib/web/package.json
CHANGED
data/lib/web/server.js
CHANGED
@@ -56,19 +56,19 @@ var save_db = (db) => {
|
|
56
56
|
app.post('/controls/delete', (req, res) => {
|
57
57
|
|
58
58
|
// Get execution ID that controls share.
|
59
|
-
var
|
59
|
+
var aid = req.body.aid;
|
60
60
|
|
61
61
|
// Get database.
|
62
62
|
db = load_db();
|
63
63
|
|
64
64
|
// Delete controls.
|
65
65
|
for (let [index, control] of db.controls.entries()) {
|
66
|
-
if (control.
|
66
|
+
if (control.aid == aid) {
|
67
67
|
console.log("DELETE CONTROL:");
|
68
68
|
console.log(db.controls[index]);
|
69
69
|
db.controls.splice(index, 1);
|
70
70
|
}
|
71
|
-
if (control.base_id != null && control.base_id ==
|
71
|
+
if (control.base_id != null && control.base_id == aid) {
|
72
72
|
console.log("DELETE:");
|
73
73
|
console.log(db.controls[index]);
|
74
74
|
db.controls.splice(index, 1);
|
@@ -86,14 +86,14 @@ app.post('/controls/delete', (req, res) => {
|
|
86
86
|
app.post('/control/delete', (req, res) => {
|
87
87
|
|
88
88
|
// Get control ID.
|
89
|
-
|
89
|
+
rid = req.body.rid;
|
90
90
|
|
91
91
|
// Get database.
|
92
92
|
db = load_db();
|
93
93
|
|
94
94
|
// Delete control.
|
95
95
|
for (let [index, control] of db.controls.entries()) {
|
96
|
-
if (control.r ==
|
96
|
+
if (control.r == rid) {
|
97
97
|
console.log("DELETE CONTROL:")
|
98
98
|
console.log(db.controls[index]);
|
99
99
|
db.controls.splice(index, 1);
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: reflekt
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Maedi Prichard
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-12-
|
11
|
+
date: 2020-12-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rowdb
|
@@ -30,30 +30,33 @@ executables: []
|
|
30
30
|
extensions: []
|
31
31
|
extra_rdoc_files: []
|
32
32
|
files:
|
33
|
-
- lib/
|
34
|
-
- lib/
|
35
|
-
- lib/
|
36
|
-
- lib/
|
37
|
-
- lib/
|
38
|
-
- lib/
|
39
|
-
- lib/
|
40
|
-
- lib/
|
41
|
-
- lib/
|
42
|
-
- lib/
|
43
|
-
- lib/
|
44
|
-
- lib/
|
45
|
-
- lib/
|
46
|
-
- lib/
|
47
|
-
- lib/
|
48
|
-
- lib/
|
49
|
-
- lib/
|
50
|
-
- lib/
|
51
|
-
- lib/
|
52
|
-
- lib/
|
53
|
-
- lib/
|
54
|
-
- lib/rules/
|
55
|
-
- lib/rules/
|
56
|
-
- lib/rules/
|
33
|
+
- lib/accessor.rb
|
34
|
+
- lib/action.rb
|
35
|
+
- lib/action_stack.rb
|
36
|
+
- lib/clone.rb
|
37
|
+
- lib/config.rb
|
38
|
+
- lib/control.rb
|
39
|
+
- lib/experiment.rb
|
40
|
+
- lib/meta.rb
|
41
|
+
- lib/meta/array_meta.rb
|
42
|
+
- lib/meta/boolean_meta.rb
|
43
|
+
- lib/meta/float_meta.rb
|
44
|
+
- lib/meta/integer_meta.rb
|
45
|
+
- lib/meta/null_meta.rb
|
46
|
+
- lib/meta/string_meta.rb
|
47
|
+
- lib/meta_builder.rb
|
48
|
+
- lib/reflection.rb
|
49
|
+
- lib/reflekt.rb
|
50
|
+
- lib/renderer.rb
|
51
|
+
- lib/rule.rb
|
52
|
+
- lib/rule_set.rb
|
53
|
+
- lib/rule_set_aggregator.rb
|
54
|
+
- lib/rules/array_rule.rb
|
55
|
+
- lib/rules/boolean_rule.rb
|
56
|
+
- lib/rules/float_rule.rb
|
57
|
+
- lib/rules/integer_rule.rb
|
58
|
+
- lib/rules/null_rule.rb
|
59
|
+
- lib/rules/string_rule.rb
|
57
60
|
- lib/web/README.md
|
58
61
|
- lib/web/bundle.js
|
59
62
|
- lib/web/gitignore.txt
|
@@ -80,7 +83,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
80
83
|
- !ruby/object:Gem::Version
|
81
84
|
version: '0'
|
82
85
|
requirements: []
|
83
|
-
rubygems_version: 3.
|
86
|
+
rubygems_version: 3.0.3
|
84
87
|
signing_key:
|
85
88
|
specification_version: 4
|
86
89
|
summary: Reflective testing.
|
data/lib/Meta.rb
DELETED
@@ -1,39 +0,0 @@
|
|
1
|
-
################################################################################
|
2
|
-
# Metadata for input and output.
|
3
|
-
#
|
4
|
-
# @pattern Abstract class
|
5
|
-
# @see lib/meta for each meta.
|
6
|
-
#
|
7
|
-
# @hierachy
|
8
|
-
# 1. Execution
|
9
|
-
# 2. Reflection
|
10
|
-
# 3. Meta <- YOU ARE HERE
|
11
|
-
################################################################################
|
12
|
-
|
13
|
-
class Meta
|
14
|
-
|
15
|
-
##
|
16
|
-
# Each meta defines its type.
|
17
|
-
##
|
18
|
-
def initialize()
|
19
|
-
@type = nil
|
20
|
-
end
|
21
|
-
|
22
|
-
##
|
23
|
-
# Each meta loads values.
|
24
|
-
#
|
25
|
-
# @param value [Dynamic]
|
26
|
-
##
|
27
|
-
def load(value)
|
28
|
-
end
|
29
|
-
|
30
|
-
##
|
31
|
-
# Each meta provides metadata.
|
32
|
-
#
|
33
|
-
# @return [Hash]
|
34
|
-
##
|
35
|
-
def result()
|
36
|
-
{}
|
37
|
-
end
|
38
|
-
|
39
|
-
end
|
data/lib/Reflection.rb
DELETED
@@ -1,186 +0,0 @@
|
|
1
|
-
################################################################################
|
2
|
-
# A snapshot of simulated data.
|
3
|
-
#
|
4
|
-
# @nomenclature
|
5
|
-
# args, inputs/output and meta represent different stages of a value.
|
6
|
-
#
|
7
|
-
# @hierachy
|
8
|
-
# 1. Execution
|
9
|
-
# 2. Reflection <- YOU ARE HERE
|
10
|
-
# 3. Meta
|
11
|
-
################################################################################
|
12
|
-
|
13
|
-
require 'Clone'
|
14
|
-
require 'MetaBuilder'
|
15
|
-
|
16
|
-
class Reflection
|
17
|
-
|
18
|
-
attr_reader :status
|
19
|
-
|
20
|
-
##
|
21
|
-
# Create a Reflection.
|
22
|
-
#
|
23
|
-
# @status
|
24
|
-
# - :pass The reflection passes the rules.
|
25
|
-
# - :fail The reflection fails the rules or produces a system error.
|
26
|
-
# - :error The control reflection produces a system error.
|
27
|
-
#
|
28
|
-
# @param execution [Execution] The Execution that created this Reflection.
|
29
|
-
# @param number [Integer] Multiple Reflections can be created per Execution.
|
30
|
-
# @param aggregator [Aggregator] The aggregated RuleSet for this class/method.
|
31
|
-
##
|
32
|
-
def initialize(execution, number, aggregator)
|
33
|
-
|
34
|
-
@execution = execution
|
35
|
-
@unique_id = execution.unique_id + number
|
36
|
-
@number = number
|
37
|
-
|
38
|
-
# Dependency.
|
39
|
-
@aggregator = aggregator
|
40
|
-
|
41
|
-
# Caller.
|
42
|
-
@klass = execution.klass
|
43
|
-
@method = execution.method
|
44
|
-
|
45
|
-
# Metadata.
|
46
|
-
@inputs = nil
|
47
|
-
@output = nil
|
48
|
-
|
49
|
-
# Clone the execution's calling object.
|
50
|
-
# TODO: Abstract away into Clone class.
|
51
|
-
@clone = execution.caller_object.clone
|
52
|
-
|
53
|
-
# Result.
|
54
|
-
@status = :pass
|
55
|
-
@time = Time.now.to_i
|
56
|
-
@message = nil
|
57
|
-
|
58
|
-
end
|
59
|
-
|
60
|
-
##
|
61
|
-
# Reflect on a method.
|
62
|
-
#
|
63
|
-
# Creates a shadow execution.
|
64
|
-
# @param *args [Dynamic] The method's arguments.
|
65
|
-
##
|
66
|
-
def reflect(*args)
|
67
|
-
|
68
|
-
# Get aggregated rule sets.
|
69
|
-
input_rule_sets = @aggregator.get_input_rule_sets(@klass, @method)
|
70
|
-
output_rule_set = @aggregator.get_output_rule_set(@klass, @method)
|
71
|
-
|
72
|
-
# When arguments exist.
|
73
|
-
unless args.size == 0
|
74
|
-
|
75
|
-
# When aggregated rule sets exist.
|
76
|
-
unless input_rule_sets.nil?
|
77
|
-
|
78
|
-
# Randomize arguments from rule sets.
|
79
|
-
args = randomize(args, input_rule_sets)
|
80
|
-
|
81
|
-
# Validate arguments against aggregated rule sets.
|
82
|
-
unless @aggregator.test_inputs(args, input_rule_sets)
|
83
|
-
@status = :fail
|
84
|
-
end
|
85
|
-
|
86
|
-
end
|
87
|
-
|
88
|
-
# Create metadata for each argument.
|
89
|
-
# TODO: Create metadata for other inputs such as properties on the instance.
|
90
|
-
@inputs = MetaBuilder.create_many(args)
|
91
|
-
|
92
|
-
end
|
93
|
-
|
94
|
-
# Action method with new/old arguments.
|
95
|
-
begin
|
96
|
-
|
97
|
-
# Run reflection.
|
98
|
-
output = @clone.send(@method, *args)
|
99
|
-
@output = MetaBuilder.create(output)
|
100
|
-
|
101
|
-
# Validate output with aggregated control rule sets.
|
102
|
-
unless output_rule_set.nil?
|
103
|
-
unless @aggregator.test_output(output, output_rule_set)
|
104
|
-
@status = :fail
|
105
|
-
end
|
106
|
-
end
|
107
|
-
|
108
|
-
# When a system error occurs.
|
109
|
-
rescue StandardError => message
|
110
|
-
|
111
|
-
@status = :fail
|
112
|
-
@message = message
|
113
|
-
|
114
|
-
end
|
115
|
-
|
116
|
-
end
|
117
|
-
|
118
|
-
##
|
119
|
-
# Create random values for each argument from control reflections.
|
120
|
-
#
|
121
|
-
# @param args [Dynamic] The arguments to create random values for.
|
122
|
-
# @param input_rule_sets [Array] Aggregated rule sets for each argument.
|
123
|
-
#
|
124
|
-
# @return [Dynamic] Random arguments.
|
125
|
-
##
|
126
|
-
def randomize(args, input_rule_sets)
|
127
|
-
|
128
|
-
random_args = []
|
129
|
-
|
130
|
-
args.each_with_index do |arg, arg_num|
|
131
|
-
|
132
|
-
rule_type = Aggregator.value_to_rule_type(arg)
|
133
|
-
agg_rule = input_rule_sets[arg_num].rules[rule_type]
|
134
|
-
|
135
|
-
random_args << agg_rule.random()
|
136
|
-
|
137
|
-
end
|
138
|
-
|
139
|
-
return random_args
|
140
|
-
|
141
|
-
end
|
142
|
-
|
143
|
-
##
|
144
|
-
# Get the results of the reflection.
|
145
|
-
#
|
146
|
-
# @return [Hash] Reflection metadata.
|
147
|
-
##
|
148
|
-
def result()
|
149
|
-
|
150
|
-
# The ID of the first execution in the ShadowStack.
|
151
|
-
base_id = nil
|
152
|
-
unless @execution.base == nil
|
153
|
-
base_id = @execution.base.unique_id
|
154
|
-
end
|
155
|
-
|
156
|
-
# Build reflection.
|
157
|
-
reflection = {
|
158
|
-
:base_id => base_id,
|
159
|
-
:exe_id => @execution.unique_id,
|
160
|
-
:ref_id => @unique_id,
|
161
|
-
:ref_num => @number,
|
162
|
-
:time => @time,
|
163
|
-
:class => @klass,
|
164
|
-
:method => @method,
|
165
|
-
:status => @status,
|
166
|
-
:message => @message,
|
167
|
-
:inputs => nil,
|
168
|
-
:output => nil,
|
169
|
-
}
|
170
|
-
|
171
|
-
unless @inputs.nil?
|
172
|
-
reflection[:inputs] = []
|
173
|
-
@inputs.each do |meta|
|
174
|
-
reflection[:inputs] << meta.result()
|
175
|
-
end
|
176
|
-
end
|
177
|
-
|
178
|
-
unless @output.nil?
|
179
|
-
reflection[:output] = @output.result()
|
180
|
-
end
|
181
|
-
|
182
|
-
return reflection
|
183
|
-
|
184
|
-
end
|
185
|
-
|
186
|
-
end
|