kwabs22 commited on
Commit
a30137d
·
1 Parent(s): 87e8df9

Nested Comments added -Moving Dot Space and Pydroid video next

Browse files
Files changed (2) hide show
  1. bundle.js +1398 -1
  2. style.css +0 -28
bundle.js CHANGED
@@ -1,2 +1,1399 @@
1
- var app=function(){"use strict";function t(){}function n(t){return t()}function e(){return Object.create(null)}function o(t){t.forEach(n)}function r(t){return"function"==typeof t}function c(t,n){return t!=t?n==n:t!==n||t&&"object"==typeof t||"function"==typeof t}function i(t,n){t.appendChild(n)}function u(t,n,e){t.insertBefore(n,e||null)}function l(t){t.parentNode&&t.parentNode.removeChild(t)}function s(t){return document.createElement(t)}function a(t){return document.createTextNode(t)}function f(){return a(" ")}function d(t,n,e,o){return t.addEventListener(n,e,o),()=>t.removeEventListener(n,e,o)}function h(t,n,e){null==e?t.removeAttribute(n):t.getAttribute(n)!==e&&t.setAttribute(n,e)}function p(t,n,e){for(let e=0;e<t.options.length;e+=1){const o=t.options[e];if(o.__value===n)return void(o.selected=!0)}e&&void 0===n||(t.selectedIndex=-1)}let $;function g(t){$=t}function m(t){(function(){if(!$)throw new Error("Function called outside component initialization");return $})().$$.on_mount.push(t)}const v=[],_=[];let b=[];const y=[],x=Promise.resolve();let k=!1;function w(t){b.push(t)}const E=new Set;let S=0;function j(){if(0!==S)return;const t=$;do{try{for(;S<v.length;){const t=v[S];S++,g(t),A(t.$$)}}catch(t){throw v.length=0,S=0,t}for(g(null),v.length=0,S=0;_.length;)_.pop()();for(let t=0;t<b.length;t+=1){const n=b[t];E.has(n)||(E.add(n),n())}b.length=0}while(v.length);for(;y.length;)y.pop()();k=!1,E.clear(),g(t)}function A(t){if(null!==t.fragment){t.update(),o(t.before_update);const n=t.dirty;t.dirty=[-1],t.fragment&&t.fragment.p(t.ctx,n),t.after_update.forEach(w)}}const C=new Set;let O;function H(t,n){t&&t.i&&(C.delete(t),t.i(n))}function L(t,e,c,i){const{fragment:u,after_update:l}=t.$$;u&&u.m(e,c),i||w((()=>{const e=t.$$.on_mount.map(n).filter(r);t.$$.on_destroy?t.$$.on_destroy.push(...e):o(e),t.$$.on_mount=[]})),l.forEach(w)}function M(t,n){const e=t.$$;null!==e.fragment&&(!function(t){const n=[],e=[];b.forEach((o=>-1===t.indexOf(o)?n.push(o):e.push(o))),e.forEach((t=>t())),b=n}(e.after_update),o(e.on_destroy),e.fragment&&e.fragment.d(n),e.on_destroy=e.fragment=null,e.ctx=[])}function N(t,n){-1===t.$$.dirty[0]&&(v.push(t),k||(k=!0,x.then(j)),t.$$.dirty.fill(0)),t.$$.dirty[n/31|0]|=1<<n%31}function T(n,r,c,i,u,s,a,f=[-1]){const d=$;g(n);const h=n.$$={fragment:null,ctx:[],props:s,update:t,not_equal:u,bound:e(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(r.context||(d?d.$$.context:[])),callbacks:e(),dirty:f,skip_bound:!1,root:r.target||d.$$.root};a&&a(h.root);let p=!1;if(h.ctx=c?c(n,r.props||{},((t,e,...o)=>{const r=o.length?o[0]:e;return h.ctx&&u(h.ctx[t],h.ctx[t]=r)&&(!h.skip_bound&&h.bound[t]&&h.bound[t](r),p&&N(n,t)),e})):[],h.update(),p=!0,o(h.before_update),h.fragment=!!i&&i(h.ctx),r.target){if(r.hydrate){const t=function(t){return Array.from(t.childNodes)}(r.target);h.fragment&&h.fragment.l(t),t.forEach(l)}else h.fragment&&h.fragment.c();r.intro&&H(n.$$.fragment),L(n,r.target,r.anchor,r.customElement),j()}g(d)}class F{$destroy(){M(this,1),this.$destroy=t}$on(n,e){if(!r(e))return t;const o=this.$$.callbacks[n]||(this.$$.callbacks[n]=[]);return o.push(e),()=>{const t=o.indexOf(e);-1!==t&&o.splice(t,1)}}$set(t){var n;this.$$set&&(n=t,0!==Object.keys(n).length)&&(this.$$.skip_bound=!0,this.$$set(t),this.$$.skip_bound=!1)}}function V(t,n,e){const o=t.slice();return o[3]=n[e],o}function q(n){let e,o,r=n[3]+"";return{c(){e=s("option"),o=a(r),e.__value=n[3],e.value=e.__value},m(t,n){u(t,e,n),i(e,o)},p:t,d(t){t&&l(e)}}}function B(n){let e,r,c,a,$,g,m,v,_,b,y=n[1],x=[];for(let t=0;t<y.length;t+=1)x[t]=q(V(n,y,t));return{c(){e=s("h1"),e.textContent="AI Vision Assistant - Auto prompt HF agent + Cohere + Object detection",r=f(),c=s("video"),c.innerHTML='<track kind="captions" src="path/to/your/captions/file.vtt" srclang="en" label="English"/>',a=f(),$=s("div"),g=s("button"),g.textContent="Verb Test",m=f(),v=s("select");for(let t=0;t<x.length;t+=1)x[t].c();h(c,"id","videoCanvas"),h(c,"width","1080"),h(c,"height","1780"),c.autoplay=!0,void 0===n[0]&&w((()=>n[2].call(v))),h($,"id","frameForButtons")},m(t,o){u(t,e,o),u(t,r,o),u(t,c,o),u(t,a,o),u(t,$,o),i($,g),i($,m),i($,v);for(let t=0;t<x.length;t+=1)x[t]&&x[t].m(v,null);p(v,n[0],!0),_||(b=[d(g,"click",I),d(v,"change",n[2])],_=!0)},p(t,[n]){if(2&n){let e;for(y=t[1],e=0;e<y.length;e+=1){const o=V(t,y,e);x[e]?x[e].p(o,n):(x[e]=q(o),x[e].c(),x[e].m(v,null))}for(;e<x.length;e+=1)x[e].d(1);x.length=y.length}3&n&&p(v,t[0])},i:t,o:t,d(t){t&&l(e),t&&l(r),t&&l(c),t&&l(a),t&&l($),function(t,n){for(let e=0;e<t.length;e+=1)t[e]&&t[e].d(n)}(x,t),_=!1,o(b)}}}function I(){}function z(t,n,e){let o="Stove - lu",r=["Stove - lu","Refrigerator - bingxiang","Spoon - shao"];return m((()=>{})),[o,r,function(){o=function(t){const n=t.querySelector(":checked");return n&&n.__value}(this),e(0,o),e(1,r)}]}class P extends F{constructor(t){super(),T(this,t,z,B,c,{})}}function R(t){let n,e,o,r,c,d,p,$,g,m,v,_;return v=new P({}),{c(){var i;n=s("main"),e=s("h1"),o=a("Hello "),r=a(t[0]),c=a("!"),d=f(),p=s("p"),p.innerHTML='Visit the <a href="https://svelte.dev/tutorial">Svelte tutorial</a> to learn how to build Svelte apps.',$=f(),g=s("h1"),g.textContent="My new component test",m=f(),(i=v.$$.fragment)&&i.c(),h(e,"class","svelte-1tky8bj"),h(g,"class","svelte-1tky8bj"),h(n,"class","svelte-1tky8bj")},m(t,l){u(t,n,l),i(n,e),i(e,o),i(e,r),i(e,c),i(n,d),i(n,p),i(n,$),i(n,g),i(n,m),L(v,n,null),_=!0},p(t,[n]){(!_||1&n)&&function(t,n){n=""+n,t.data!==n&&(t.data=n)}(r,t[0])},i(t){_||(H(v.$$.fragment,t),_=!0)},o(t){!function(t,n,e,o){if(t&&t.o){if(C.has(t))return;C.add(t),O.c.push((()=>{C.delete(t),o&&(e&&t.d(1),o())})),t.o(n)}else o&&o()}(v.$$.fragment,t),_=!1},d(t){t&&l(n),M(v)}}}function D(t,n,e){let{name:o}=n;return t.$$set=t=>{"name"in t&&e(0,o=t.name)},[o]}return new class extends F{constructor(t){super(),T(this,t,D,R,c,{name:0})}}({target:document.body,props:{name:"world"}})}();
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2
  //# sourceMappingURL=bundle.js.map
 
1
+
2
+ (function(l, r) { if (!l || l.getElementById('livereloadscript')) return; r = l.createElement('script'); r.async = 1; r.src = '//' + (self.location.host || 'localhost').split(':')[0] + ':35729/livereload.js?snipver=1'; r.id = 'livereloadscript'; l.getElementsByTagName('head')[0].appendChild(r) })(self.document);
3
+ var app = (function () {
4
+ 'use strict';
5
+
6
+ function noop() { }
7
+ function add_location(element, file, line, column, char) {
8
+ element.__svelte_meta = {
9
+ loc: { file, line, column, char }
10
+ };
11
+ }
12
+ function run(fn) {
13
+ return fn();
14
+ }
15
+ function blank_object() {
16
+ return Object.create(null);
17
+ }
18
+ function run_all(fns) {
19
+ fns.forEach(run);
20
+ }
21
+ function is_function(thing) {
22
+ return typeof thing === 'function';
23
+ }
24
+ function safe_not_equal(a, b) {
25
+ return a != a ? b == b : a !== b || ((a && typeof a === 'object') || typeof a === 'function');
26
+ }
27
+ let src_url_equal_anchor;
28
+ function src_url_equal(element_src, url) {
29
+ if (!src_url_equal_anchor) {
30
+ src_url_equal_anchor = document.createElement('a');
31
+ }
32
+ src_url_equal_anchor.href = url;
33
+ return element_src === src_url_equal_anchor.href;
34
+ }
35
+ function is_empty(obj) {
36
+ return Object.keys(obj).length === 0;
37
+ }
38
+ function append(target, node) {
39
+ target.appendChild(node);
40
+ }
41
+ function insert(target, node, anchor) {
42
+ target.insertBefore(node, anchor || null);
43
+ }
44
+ function detach(node) {
45
+ if (node.parentNode) {
46
+ node.parentNode.removeChild(node);
47
+ }
48
+ }
49
+ function destroy_each(iterations, detaching) {
50
+ for (let i = 0; i < iterations.length; i += 1) {
51
+ if (iterations[i])
52
+ iterations[i].d(detaching);
53
+ }
54
+ }
55
+ function element(name) {
56
+ return document.createElement(name);
57
+ }
58
+ function text(data) {
59
+ return document.createTextNode(data);
60
+ }
61
+ function space() {
62
+ return text(' ');
63
+ }
64
+ function empty() {
65
+ return text('');
66
+ }
67
+ function comment(content) {
68
+ return document.createComment(content);
69
+ }
70
+ function listen(node, event, handler, options) {
71
+ node.addEventListener(event, handler, options);
72
+ return () => node.removeEventListener(event, handler, options);
73
+ }
74
+ function attr(node, attribute, value) {
75
+ if (value == null)
76
+ node.removeAttribute(attribute);
77
+ else if (node.getAttribute(attribute) !== value)
78
+ node.setAttribute(attribute, value);
79
+ }
80
+ function children(element) {
81
+ return Array.from(element.childNodes);
82
+ }
83
+ function set_input_value(input, value) {
84
+ input.value = value == null ? '' : value;
85
+ }
86
+ function set_style(node, key, value, important) {
87
+ if (value == null) {
88
+ node.style.removeProperty(key);
89
+ }
90
+ else {
91
+ node.style.setProperty(key, value, important ? 'important' : '');
92
+ }
93
+ }
94
+ function select_option(select, value, mounting) {
95
+ for (let i = 0; i < select.options.length; i += 1) {
96
+ const option = select.options[i];
97
+ if (option.__value === value) {
98
+ option.selected = true;
99
+ return;
100
+ }
101
+ }
102
+ if (!mounting || value !== undefined) {
103
+ select.selectedIndex = -1; // no option should be selected
104
+ }
105
+ }
106
+ function select_value(select) {
107
+ const selected_option = select.querySelector(':checked');
108
+ return selected_option && selected_option.__value;
109
+ }
110
+ function custom_event(type, detail, { bubbles = false, cancelable = false } = {}) {
111
+ const e = document.createEvent('CustomEvent');
112
+ e.initCustomEvent(type, bubbles, cancelable, detail);
113
+ return e;
114
+ }
115
+
116
+ let current_component;
117
+ function set_current_component(component) {
118
+ current_component = component;
119
+ }
120
+ function get_current_component() {
121
+ if (!current_component)
122
+ throw new Error('Function called outside component initialization');
123
+ return current_component;
124
+ }
125
+ /**
126
+ * The `onMount` function schedules a callback to run as soon as the component has been mounted to the DOM.
127
+ * It must be called during the component's initialisation (but doesn't need to live *inside* the component;
128
+ * it can be called from an external module).
129
+ *
130
+ * `onMount` does not run inside a [server-side component](/docs#run-time-server-side-component-api).
131
+ *
132
+ * https://svelte.dev/docs#run-time-svelte-onmount
133
+ */
134
+ function onMount(fn) {
135
+ get_current_component().$$.on_mount.push(fn);
136
+ }
137
+
138
+ const dirty_components = [];
139
+ const binding_callbacks = [];
140
+ let render_callbacks = [];
141
+ const flush_callbacks = [];
142
+ const resolved_promise = /* @__PURE__ */ Promise.resolve();
143
+ let update_scheduled = false;
144
+ function schedule_update() {
145
+ if (!update_scheduled) {
146
+ update_scheduled = true;
147
+ resolved_promise.then(flush);
148
+ }
149
+ }
150
+ function add_render_callback(fn) {
151
+ render_callbacks.push(fn);
152
+ }
153
+ // flush() calls callbacks in this order:
154
+ // 1. All beforeUpdate callbacks, in order: parents before children
155
+ // 2. All bind:this callbacks, in reverse order: children before parents.
156
+ // 3. All afterUpdate callbacks, in order: parents before children. EXCEPT
157
+ // for afterUpdates called during the initial onMount, which are called in
158
+ // reverse order: children before parents.
159
+ // Since callbacks might update component values, which could trigger another
160
+ // call to flush(), the following steps guard against this:
161
+ // 1. During beforeUpdate, any updated components will be added to the
162
+ // dirty_components array and will cause a reentrant call to flush(). Because
163
+ // the flush index is kept outside the function, the reentrant call will pick
164
+ // up where the earlier call left off and go through all dirty components. The
165
+ // current_component value is saved and restored so that the reentrant call will
166
+ // not interfere with the "parent" flush() call.
167
+ // 2. bind:this callbacks cannot trigger new flush() calls.
168
+ // 3. During afterUpdate, any updated components will NOT have their afterUpdate
169
+ // callback called a second time; the seen_callbacks set, outside the flush()
170
+ // function, guarantees this behavior.
171
+ const seen_callbacks = new Set();
172
+ let flushidx = 0; // Do *not* move this inside the flush() function
173
+ function flush() {
174
+ // Do not reenter flush while dirty components are updated, as this can
175
+ // result in an infinite loop. Instead, let the inner flush handle it.
176
+ // Reentrancy is ok afterwards for bindings etc.
177
+ if (flushidx !== 0) {
178
+ return;
179
+ }
180
+ const saved_component = current_component;
181
+ do {
182
+ // first, call beforeUpdate functions
183
+ // and update components
184
+ try {
185
+ while (flushidx < dirty_components.length) {
186
+ const component = dirty_components[flushidx];
187
+ flushidx++;
188
+ set_current_component(component);
189
+ update(component.$$);
190
+ }
191
+ }
192
+ catch (e) {
193
+ // reset dirty state to not end up in a deadlocked state and then rethrow
194
+ dirty_components.length = 0;
195
+ flushidx = 0;
196
+ throw e;
197
+ }
198
+ set_current_component(null);
199
+ dirty_components.length = 0;
200
+ flushidx = 0;
201
+ while (binding_callbacks.length)
202
+ binding_callbacks.pop()();
203
+ // then, once components are updated, call
204
+ // afterUpdate functions. This may cause
205
+ // subsequent updates...
206
+ for (let i = 0; i < render_callbacks.length; i += 1) {
207
+ const callback = render_callbacks[i];
208
+ if (!seen_callbacks.has(callback)) {
209
+ // ...so guard against infinite loops
210
+ seen_callbacks.add(callback);
211
+ callback();
212
+ }
213
+ }
214
+ render_callbacks.length = 0;
215
+ } while (dirty_components.length);
216
+ while (flush_callbacks.length) {
217
+ flush_callbacks.pop()();
218
+ }
219
+ update_scheduled = false;
220
+ seen_callbacks.clear();
221
+ set_current_component(saved_component);
222
+ }
223
+ function update($$) {
224
+ if ($$.fragment !== null) {
225
+ $$.update();
226
+ run_all($$.before_update);
227
+ const dirty = $$.dirty;
228
+ $$.dirty = [-1];
229
+ $$.fragment && $$.fragment.p($$.ctx, dirty);
230
+ $$.after_update.forEach(add_render_callback);
231
+ }
232
+ }
233
+ /**
234
+ * Useful for example to execute remaining `afterUpdate` callbacks before executing `destroy`.
235
+ */
236
+ function flush_render_callbacks(fns) {
237
+ const filtered = [];
238
+ const targets = [];
239
+ render_callbacks.forEach((c) => fns.indexOf(c) === -1 ? filtered.push(c) : targets.push(c));
240
+ targets.forEach((c) => c());
241
+ render_callbacks = filtered;
242
+ }
243
+ const outroing = new Set();
244
+ let outros;
245
+ function transition_in(block, local) {
246
+ if (block && block.i) {
247
+ outroing.delete(block);
248
+ block.i(local);
249
+ }
250
+ }
251
+ function transition_out(block, local, detach, callback) {
252
+ if (block && block.o) {
253
+ if (outroing.has(block))
254
+ return;
255
+ outroing.add(block);
256
+ outros.c.push(() => {
257
+ outroing.delete(block);
258
+ if (callback) {
259
+ if (detach)
260
+ block.d(1);
261
+ callback();
262
+ }
263
+ });
264
+ block.o(local);
265
+ }
266
+ else if (callback) {
267
+ callback();
268
+ }
269
+ }
270
+ function create_component(block) {
271
+ block && block.c();
272
+ }
273
+ function mount_component(component, target, anchor, customElement) {
274
+ const { fragment, after_update } = component.$$;
275
+ fragment && fragment.m(target, anchor);
276
+ if (!customElement) {
277
+ // onMount happens before the initial afterUpdate
278
+ add_render_callback(() => {
279
+ const new_on_destroy = component.$$.on_mount.map(run).filter(is_function);
280
+ // if the component was destroyed immediately
281
+ // it will update the `$$.on_destroy` reference to `null`.
282
+ // the destructured on_destroy may still reference to the old array
283
+ if (component.$$.on_destroy) {
284
+ component.$$.on_destroy.push(...new_on_destroy);
285
+ }
286
+ else {
287
+ // Edge case - component was destroyed immediately,
288
+ // most likely as a result of a binding initialising
289
+ run_all(new_on_destroy);
290
+ }
291
+ component.$$.on_mount = [];
292
+ });
293
+ }
294
+ after_update.forEach(add_render_callback);
295
+ }
296
+ function destroy_component(component, detaching) {
297
+ const $$ = component.$$;
298
+ if ($$.fragment !== null) {
299
+ flush_render_callbacks($$.after_update);
300
+ run_all($$.on_destroy);
301
+ $$.fragment && $$.fragment.d(detaching);
302
+ // TODO null out other refs, including component.$$ (but need to
303
+ // preserve final state?)
304
+ $$.on_destroy = $$.fragment = null;
305
+ $$.ctx = [];
306
+ }
307
+ }
308
+ function make_dirty(component, i) {
309
+ if (component.$$.dirty[0] === -1) {
310
+ dirty_components.push(component);
311
+ schedule_update();
312
+ component.$$.dirty.fill(0);
313
+ }
314
+ component.$$.dirty[(i / 31) | 0] |= (1 << (i % 31));
315
+ }
316
+ function init(component, options, instance, create_fragment, not_equal, props, append_styles, dirty = [-1]) {
317
+ const parent_component = current_component;
318
+ set_current_component(component);
319
+ const $$ = component.$$ = {
320
+ fragment: null,
321
+ ctx: [],
322
+ // state
323
+ props,
324
+ update: noop,
325
+ not_equal,
326
+ bound: blank_object(),
327
+ // lifecycle
328
+ on_mount: [],
329
+ on_destroy: [],
330
+ on_disconnect: [],
331
+ before_update: [],
332
+ after_update: [],
333
+ context: new Map(options.context || (parent_component ? parent_component.$$.context : [])),
334
+ // everything else
335
+ callbacks: blank_object(),
336
+ dirty,
337
+ skip_bound: false,
338
+ root: options.target || parent_component.$$.root
339
+ };
340
+ append_styles && append_styles($$.root);
341
+ let ready = false;
342
+ $$.ctx = instance
343
+ ? instance(component, options.props || {}, (i, ret, ...rest) => {
344
+ const value = rest.length ? rest[0] : ret;
345
+ if ($$.ctx && not_equal($$.ctx[i], $$.ctx[i] = value)) {
346
+ if (!$$.skip_bound && $$.bound[i])
347
+ $$.bound[i](value);
348
+ if (ready)
349
+ make_dirty(component, i);
350
+ }
351
+ return ret;
352
+ })
353
+ : [];
354
+ $$.update();
355
+ ready = true;
356
+ run_all($$.before_update);
357
+ // `false` as a special case of no DOM component
358
+ $$.fragment = create_fragment ? create_fragment($$.ctx) : false;
359
+ if (options.target) {
360
+ if (options.hydrate) {
361
+ const nodes = children(options.target);
362
+ // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
363
+ $$.fragment && $$.fragment.l(nodes);
364
+ nodes.forEach(detach);
365
+ }
366
+ else {
367
+ // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
368
+ $$.fragment && $$.fragment.c();
369
+ }
370
+ if (options.intro)
371
+ transition_in(component.$$.fragment);
372
+ mount_component(component, options.target, options.anchor, options.customElement);
373
+ flush();
374
+ }
375
+ set_current_component(parent_component);
376
+ }
377
+ /**
378
+ * Base class for Svelte components. Used when dev=false.
379
+ */
380
+ class SvelteComponent {
381
+ $destroy() {
382
+ destroy_component(this, 1);
383
+ this.$destroy = noop;
384
+ }
385
+ $on(type, callback) {
386
+ if (!is_function(callback)) {
387
+ return noop;
388
+ }
389
+ const callbacks = (this.$$.callbacks[type] || (this.$$.callbacks[type] = []));
390
+ callbacks.push(callback);
391
+ return () => {
392
+ const index = callbacks.indexOf(callback);
393
+ if (index !== -1)
394
+ callbacks.splice(index, 1);
395
+ };
396
+ }
397
+ $set($$props) {
398
+ if (this.$$set && !is_empty($$props)) {
399
+ this.$$.skip_bound = true;
400
+ this.$$set($$props);
401
+ this.$$.skip_bound = false;
402
+ }
403
+ }
404
+ }
405
+
406
+ function dispatch_dev(type, detail) {
407
+ document.dispatchEvent(custom_event(type, Object.assign({ version: '3.59.2' }, detail), { bubbles: true }));
408
+ }
409
+ function append_dev(target, node) {
410
+ dispatch_dev('SvelteDOMInsert', { target, node });
411
+ append(target, node);
412
+ }
413
+ function insert_dev(target, node, anchor) {
414
+ dispatch_dev('SvelteDOMInsert', { target, node, anchor });
415
+ insert(target, node, anchor);
416
+ }
417
+ function detach_dev(node) {
418
+ dispatch_dev('SvelteDOMRemove', { node });
419
+ detach(node);
420
+ }
421
+ function listen_dev(node, event, handler, options, has_prevent_default, has_stop_propagation, has_stop_immediate_propagation) {
422
+ const modifiers = options === true ? ['capture'] : options ? Array.from(Object.keys(options)) : [];
423
+ if (has_prevent_default)
424
+ modifiers.push('preventDefault');
425
+ if (has_stop_propagation)
426
+ modifiers.push('stopPropagation');
427
+ if (has_stop_immediate_propagation)
428
+ modifiers.push('stopImmediatePropagation');
429
+ dispatch_dev('SvelteDOMAddEventListener', { node, event, handler, modifiers });
430
+ const dispose = listen(node, event, handler, options);
431
+ return () => {
432
+ dispatch_dev('SvelteDOMRemoveEventListener', { node, event, handler, modifiers });
433
+ dispose();
434
+ };
435
+ }
436
+ function attr_dev(node, attribute, value) {
437
+ attr(node, attribute, value);
438
+ if (value == null)
439
+ dispatch_dev('SvelteDOMRemoveAttribute', { node, attribute });
440
+ else
441
+ dispatch_dev('SvelteDOMSetAttribute', { node, attribute, value });
442
+ }
443
+ function set_data_dev(text, data) {
444
+ data = '' + data;
445
+ if (text.data === data)
446
+ return;
447
+ dispatch_dev('SvelteDOMSetData', { node: text, data });
448
+ text.data = data;
449
+ }
450
+ function validate_each_argument(arg) {
451
+ if (typeof arg !== 'string' && !(arg && typeof arg === 'object' && 'length' in arg)) {
452
+ let msg = '{#each} only iterates over array-like objects.';
453
+ if (typeof Symbol === 'function' && arg && Symbol.iterator in arg) {
454
+ msg += ' You can use a spread to convert this iterable into an array.';
455
+ }
456
+ throw new Error(msg);
457
+ }
458
+ }
459
+ function validate_slots(name, slot, keys) {
460
+ for (const slot_key of Object.keys(slot)) {
461
+ if (!~keys.indexOf(slot_key)) {
462
+ console.warn(`<${name}> received an unexpected slot "${slot_key}".`);
463
+ }
464
+ }
465
+ }
466
+ /**
467
+ * Base class for Svelte components with some minor dev-enhancements. Used when dev=true.
468
+ */
469
+ class SvelteComponentDev extends SvelteComponent {
470
+ constructor(options) {
471
+ if (!options || (!options.target && !options.$$inline)) {
472
+ throw new Error("'target' is a required option");
473
+ }
474
+ super();
475
+ }
476
+ $destroy() {
477
+ super.$destroy();
478
+ this.$destroy = () => {
479
+ console.warn('Component was already destroyed'); // eslint-disable-line no-console
480
+ };
481
+ }
482
+ $capture_state() { }
483
+ $inject_state() { }
484
+ }
485
+
486
+ /* src\VideoGradioComponentBrainstorming.svelte generated by Svelte v3.59.2 */
487
+ const file$2 = "src\\VideoGradioComponentBrainstorming.svelte";
488
+
489
+ function get_each_context$1(ctx, list, i) {
490
+ const child_ctx = ctx.slice();
491
+ child_ctx[4] = list[i];
492
+ return child_ctx;
493
+ }
494
+
495
+ // (39:4) {#each kitchenOptions as option}
496
+ function create_each_block$1(ctx) {
497
+ let option;
498
+ let t_value = /*option*/ ctx[4] + "";
499
+ let t;
500
+
501
+ const block = {
502
+ c: function create() {
503
+ option = element("option");
504
+ t = text(t_value);
505
+ option.__value = /*option*/ ctx[4];
506
+ option.value = option.__value;
507
+ add_location(option, file$2, 39, 6, 1076);
508
+ },
509
+ m: function mount(target, anchor) {
510
+ insert_dev(target, option, anchor);
511
+ append_dev(option, t);
512
+ },
513
+ p: noop,
514
+ d: function destroy(detaching) {
515
+ if (detaching) detach_dev(option);
516
+ }
517
+ };
518
+
519
+ dispatch_dev("SvelteRegisterBlock", {
520
+ block,
521
+ id: create_each_block$1.name,
522
+ type: "each",
523
+ source: "(39:4) {#each kitchenOptions as option}",
524
+ ctx
525
+ });
526
+
527
+ return block;
528
+ }
529
+
530
+ function create_fragment$2(ctx) {
531
+ let h1;
532
+ let t1;
533
+ let video;
534
+ let track;
535
+ let track_src_value;
536
+ let t2;
537
+ let div;
538
+ let button;
539
+ let t4;
540
+ let select;
541
+ let mounted;
542
+ let dispose;
543
+ let each_value = /*kitchenOptions*/ ctx[1];
544
+ validate_each_argument(each_value);
545
+ let each_blocks = [];
546
+
547
+ for (let i = 0; i < each_value.length; i += 1) {
548
+ each_blocks[i] = create_each_block$1(get_each_context$1(ctx, each_value, i));
549
+ }
550
+
551
+ const block = {
552
+ c: function create() {
553
+ h1 = element("h1");
554
+ h1.textContent = "AI Vision Assistant - Auto prompt HF agent + Cohere + Object detection";
555
+ t1 = space();
556
+ video = element("video");
557
+ track = element("track");
558
+ t2 = space();
559
+ div = element("div");
560
+ button = element("button");
561
+ button.textContent = "Verb Test";
562
+ t4 = space();
563
+ select = element("select");
564
+
565
+ for (let i = 0; i < each_blocks.length; i += 1) {
566
+ each_blocks[i].c();
567
+ }
568
+
569
+ add_location(h1, file$2, 26, 0, 606);
570
+ attr_dev(track, "kind", "captions");
571
+ if (!src_url_equal(track.src, track_src_value = "path/to/your/captions/file.vtt")) attr_dev(track, "src", track_src_value);
572
+ attr_dev(track, "srclang", "en");
573
+ attr_dev(track, "label", "English");
574
+ add_location(track, file$2, 31, 4, 780);
575
+ attr_dev(video, "id", "videoCanvas");
576
+ attr_dev(video, "width", "1080");
577
+ attr_dev(video, "height", "1780");
578
+ video.autoplay = true;
579
+ add_location(video, file$2, 29, 0, 712);
580
+ add_location(button, file$2, 36, 2, 944);
581
+ if (/*selectedOption*/ ctx[0] === void 0) add_render_callback(() => /*select_change_handler*/ ctx[2].call(select));
582
+ add_location(select, file$2, 37, 2, 994);
583
+ attr_dev(div, "id", "frameForButtons");
584
+ add_location(div, file$2, 35, 0, 914);
585
+ },
586
+ l: function claim(nodes) {
587
+ throw new Error("options.hydrate only works if the component was compiled with the `hydratable: true` option");
588
+ },
589
+ m: function mount(target, anchor) {
590
+ insert_dev(target, h1, anchor);
591
+ insert_dev(target, t1, anchor);
592
+ insert_dev(target, video, anchor);
593
+ append_dev(video, track);
594
+ insert_dev(target, t2, anchor);
595
+ insert_dev(target, div, anchor);
596
+ append_dev(div, button);
597
+ append_dev(div, t4);
598
+ append_dev(div, select);
599
+
600
+ for (let i = 0; i < each_blocks.length; i += 1) {
601
+ if (each_blocks[i]) {
602
+ each_blocks[i].m(select, null);
603
+ }
604
+ }
605
+
606
+ select_option(select, /*selectedOption*/ ctx[0], true);
607
+
608
+ if (!mounted) {
609
+ dispose = [
610
+ listen_dev(button, "click", testText, false, false, false, false),
611
+ listen_dev(select, "change", /*select_change_handler*/ ctx[2])
612
+ ];
613
+
614
+ mounted = true;
615
+ }
616
+ },
617
+ p: function update(ctx, [dirty]) {
618
+ if (dirty & /*kitchenOptions*/ 2) {
619
+ each_value = /*kitchenOptions*/ ctx[1];
620
+ validate_each_argument(each_value);
621
+ let i;
622
+
623
+ for (i = 0; i < each_value.length; i += 1) {
624
+ const child_ctx = get_each_context$1(ctx, each_value, i);
625
+
626
+ if (each_blocks[i]) {
627
+ each_blocks[i].p(child_ctx, dirty);
628
+ } else {
629
+ each_blocks[i] = create_each_block$1(child_ctx);
630
+ each_blocks[i].c();
631
+ each_blocks[i].m(select, null);
632
+ }
633
+ }
634
+
635
+ for (; i < each_blocks.length; i += 1) {
636
+ each_blocks[i].d(1);
637
+ }
638
+
639
+ each_blocks.length = each_value.length;
640
+ }
641
+
642
+ if (dirty & /*selectedOption, kitchenOptions*/ 3) {
643
+ select_option(select, /*selectedOption*/ ctx[0]);
644
+ }
645
+ },
646
+ i: noop,
647
+ o: noop,
648
+ d: function destroy(detaching) {
649
+ if (detaching) detach_dev(h1);
650
+ if (detaching) detach_dev(t1);
651
+ if (detaching) detach_dev(video);
652
+ if (detaching) detach_dev(t2);
653
+ if (detaching) detach_dev(div);
654
+ destroy_each(each_blocks, detaching);
655
+ mounted = false;
656
+ run_all(dispose);
657
+ }
658
+ };
659
+
660
+ dispatch_dev("SvelteRegisterBlock", {
661
+ block,
662
+ id: create_fragment$2.name,
663
+ type: "component",
664
+ source: "",
665
+ ctx
666
+ });
667
+
668
+ return block;
669
+ }
670
+
671
+ function testText() {
672
+
673
+ } // Logic for 'verb test' button
674
+
675
+ function ocrTest() {
676
+
677
+ } // Logic for 'Test OCR' button
678
+
679
+ function instance$2($$self, $$props, $$invalidate) {
680
+ let { $$slots: slots = {}, $$scope } = $$props;
681
+ validate_slots('VideoGradioComponentBrainstorming', slots, []);
682
+ let selectedOption = 'Stove - lu'; // default value
683
+ let kitchenOptions = ['Stove - lu', 'Refrigerator - bingxiang', 'Spoon - shao']; /* ... other options ... */
684
+
685
+ // Image source
686
+ let imageSrc = 'path_to_your_image/Blooms-Taxonomy-650x366.jpg';
687
+
688
+ // Video stream setup
689
+ onMount(() => {
690
+
691
+ }); // Initialize video stream here
692
+
693
+ const writable_props = [];
694
+
695
+ Object.keys($$props).forEach(key => {
696
+ if (!~writable_props.indexOf(key) && key.slice(0, 2) !== '$$' && key !== 'slot') console.warn(`<VideoGradioComponentBrainstorming> was created with unknown prop '${key}'`);
697
+ });
698
+
699
+ function select_change_handler() {
700
+ selectedOption = select_value(this);
701
+ $$invalidate(0, selectedOption);
702
+ $$invalidate(1, kitchenOptions);
703
+ }
704
+
705
+ $$self.$capture_state = () => ({
706
+ onMount,
707
+ selectedOption,
708
+ kitchenOptions,
709
+ testText,
710
+ ocrTest,
711
+ imageSrc
712
+ });
713
+
714
+ $$self.$inject_state = $$props => {
715
+ if ('selectedOption' in $$props) $$invalidate(0, selectedOption = $$props.selectedOption);
716
+ if ('kitchenOptions' in $$props) $$invalidate(1, kitchenOptions = $$props.kitchenOptions);
717
+ if ('imageSrc' in $$props) imageSrc = $$props.imageSrc;
718
+ };
719
+
720
+ if ($$props && "$$inject" in $$props) {
721
+ $$self.$inject_state($$props.$$inject);
722
+ }
723
+
724
+ return [selectedOption, kitchenOptions, select_change_handler];
725
+ }
726
+
727
+ class VideoGradioComponentBrainstorming extends SvelteComponentDev {
728
+ constructor(options) {
729
+ super(options);
730
+ init(this, options, instance$2, create_fragment$2, safe_not_equal, {});
731
+
732
+ dispatch_dev("SvelteRegisterComponent", {
733
+ component: this,
734
+ tagName: "VideoGradioComponentBrainstorming",
735
+ options,
736
+ id: create_fragment$2.name
737
+ });
738
+ }
739
+ }
740
+
741
+ // Unique ID creation requires a high quality random # generator. In the browser we therefore
742
+ // require the crypto API and do not support built-in fallback to lower quality random number
743
+ // generators (like Math.random()).
744
+ let getRandomValues;
745
+ const rnds8 = new Uint8Array(16);
746
+ function rng() {
747
+ // lazy load so that environments that need to polyfill have a chance to do so
748
+ if (!getRandomValues) {
749
+ // getRandomValues needs to be invoked in a context where "this" is a Crypto implementation.
750
+ getRandomValues = typeof crypto !== 'undefined' && crypto.getRandomValues && crypto.getRandomValues.bind(crypto);
751
+
752
+ if (!getRandomValues) {
753
+ throw new Error('crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported');
754
+ }
755
+ }
756
+
757
+ return getRandomValues(rnds8);
758
+ }
759
+
760
+ /**
761
+ * Convert array of 16 byte values to UUID string format of the form:
762
+ * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX
763
+ */
764
+
765
+ const byteToHex = [];
766
+
767
+ for (let i = 0; i < 256; ++i) {
768
+ byteToHex.push((i + 0x100).toString(16).slice(1));
769
+ }
770
+
771
+ function unsafeStringify(arr, offset = 0) {
772
+ // Note: Be careful editing this code! It's been tuned for performance
773
+ // and works in ways you may not expect. See https://github.com/uuidjs/uuid/pull/434
774
+ return byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + '-' + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + '-' + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + '-' + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + '-' + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]];
775
+ }
776
+
777
+ const randomUUID = typeof crypto !== 'undefined' && crypto.randomUUID && crypto.randomUUID.bind(crypto);
778
+ var native = {
779
+ randomUUID
780
+ };
781
+
782
+ function v4(options, buf, offset) {
783
+ if (native.randomUUID && !buf && !options) {
784
+ return native.randomUUID();
785
+ }
786
+
787
+ options = options || {};
788
+ const rnds = options.random || (options.rng || rng)(); // Per 4.4, set bits for version and `clock_seq_hi_and_reserved`
789
+
790
+ rnds[6] = rnds[6] & 0x0f | 0x40;
791
+ rnds[8] = rnds[8] & 0x3f | 0x80; // Copy bytes to buffer, if provided
792
+
793
+ if (buf) {
794
+ offset = offset || 0;
795
+
796
+ for (let i = 0; i < 16; ++i) {
797
+ buf[offset + i] = rnds[i];
798
+ }
799
+
800
+ return buf;
801
+ }
802
+
803
+ return unsafeStringify(rnds);
804
+ }
805
+
806
+ /* src\NestedCommentsTestfromReact.svelte generated by Svelte v3.59.2 */
807
+ const file$1 = "src\\NestedCommentsTestfromReact.svelte";
808
+
809
+ function get_each_context(ctx, list, i) {
810
+ const child_ctx = ctx.slice();
811
+ child_ctx[6] = list[i];
812
+ return child_ctx;
813
+ }
814
+
815
+ function get_each_context_1(ctx, list, i) {
816
+ const child_ctx = ctx.slice();
817
+ child_ctx[9] = list[i];
818
+ return child_ctx;
819
+ }
820
+
821
+ // (29:12) {#if comment.items}
822
+ function create_if_block(ctx) {
823
+ let each_1_anchor;
824
+ let each_value_1 = /*comment*/ ctx[6].items;
825
+ validate_each_argument(each_value_1);
826
+ let each_blocks = [];
827
+
828
+ for (let i = 0; i < each_value_1.length; i += 1) {
829
+ each_blocks[i] = create_each_block_1(get_each_context_1(ctx, each_value_1, i));
830
+ }
831
+
832
+ const block = {
833
+ c: function create() {
834
+ for (let i = 0; i < each_blocks.length; i += 1) {
835
+ each_blocks[i].c();
836
+ }
837
+
838
+ each_1_anchor = empty();
839
+ },
840
+ m: function mount(target, anchor) {
841
+ for (let i = 0; i < each_blocks.length; i += 1) {
842
+ if (each_blocks[i]) {
843
+ each_blocks[i].m(target, anchor);
844
+ }
845
+ }
846
+
847
+ insert_dev(target, each_1_anchor, anchor);
848
+ },
849
+ p: function update(ctx, dirty) {
850
+ if (dirty & /*comments*/ 1) {
851
+ each_value_1 = /*comment*/ ctx[6].items;
852
+ validate_each_argument(each_value_1);
853
+ let i;
854
+
855
+ for (i = 0; i < each_value_1.length; i += 1) {
856
+ const child_ctx = get_each_context_1(ctx, each_value_1, i);
857
+
858
+ if (each_blocks[i]) {
859
+ each_blocks[i].p(child_ctx, dirty);
860
+ } else {
861
+ each_blocks[i] = create_each_block_1(child_ctx);
862
+ each_blocks[i].c();
863
+ each_blocks[i].m(each_1_anchor.parentNode, each_1_anchor);
864
+ }
865
+ }
866
+
867
+ for (; i < each_blocks.length; i += 1) {
868
+ each_blocks[i].d(1);
869
+ }
870
+
871
+ each_blocks.length = each_value_1.length;
872
+ }
873
+ },
874
+ d: function destroy(detaching) {
875
+ destroy_each(each_blocks, detaching);
876
+ if (detaching) detach_dev(each_1_anchor);
877
+ }
878
+ };
879
+
880
+ dispatch_dev("SvelteRegisterBlock", {
881
+ block,
882
+ id: create_if_block.name,
883
+ type: "if",
884
+ source: "(29:12) {#if comment.items}",
885
+ ctx
886
+ });
887
+
888
+ return block;
889
+ }
890
+
891
+ // (30:16) {#each comment.items as item}
892
+ function create_each_block_1(ctx) {
893
+ let div;
894
+ let t0_value = /*item*/ ctx[9].title + "";
895
+ let t0;
896
+ let t1;
897
+
898
+ const block = {
899
+ c: function create() {
900
+ div = element("div");
901
+ t0 = text(t0_value);
902
+ t1 = space();
903
+ add_location(div, file$1, 30, 20, 1088);
904
+ },
905
+ m: function mount(target, anchor) {
906
+ insert_dev(target, div, anchor);
907
+ append_dev(div, t0);
908
+ insert_dev(target, t1, anchor);
909
+ },
910
+ p: function update(ctx, dirty) {
911
+ if (dirty & /*comments*/ 1 && t0_value !== (t0_value = /*item*/ ctx[9].title + "")) set_data_dev(t0, t0_value);
912
+ },
913
+ d: function destroy(detaching) {
914
+ if (detaching) detach_dev(div);
915
+ if (detaching) detach_dev(t1);
916
+ }
917
+ };
918
+
919
+ dispatch_dev("SvelteRegisterBlock", {
920
+ block,
921
+ id: create_each_block_1.name,
922
+ type: "each",
923
+ source: "(30:16) {#each comment.items as item}",
924
+ ctx
925
+ });
926
+
927
+ return block;
928
+ }
929
+
930
+ // (23:4) {#each comments as comment}
931
+ function create_each_block(ctx) {
932
+ let div1;
933
+ let div0;
934
+ let span;
935
+ let t0_value = /*comment*/ ctx[6].title + "";
936
+ let t0;
937
+ let t1;
938
+ let button;
939
+ let t3;
940
+ let t4;
941
+ let div1_key_value;
942
+ let mounted;
943
+ let dispose;
944
+
945
+ function click_handler() {
946
+ return /*click_handler*/ ctx[5](/*comment*/ ctx[6]);
947
+ }
948
+
949
+ let if_block = /*comment*/ ctx[6].items && create_if_block(ctx);
950
+
951
+ const block = {
952
+ c: function create() {
953
+ div1 = element("div");
954
+ div0 = element("div");
955
+ span = element("span");
956
+ t0 = text(t0_value);
957
+ t1 = space();
958
+ button = element("button");
959
+ button.textContent = "Add Reply";
960
+ t3 = space();
961
+ if (if_block) if_block.c();
962
+ t4 = space();
963
+ attr_dev(span, "class", "text");
964
+ add_location(span, file$1, 25, 16, 818);
965
+ add_location(button, file$1, 26, 16, 877);
966
+ attr_dev(div0, "class", "card");
967
+ add_location(div0, file$1, 24, 12, 782);
968
+ attr_dev(div1, "key", div1_key_value = /*comment*/ ctx[6].id);
969
+ set_style(div1, "margin-left", "20px");
970
+ add_location(div1, file$1, 23, 8, 719);
971
+ },
972
+ m: function mount(target, anchor) {
973
+ insert_dev(target, div1, anchor);
974
+ append_dev(div1, div0);
975
+ append_dev(div0, span);
976
+ append_dev(span, t0);
977
+ append_dev(div0, t1);
978
+ append_dev(div0, button);
979
+ append_dev(div1, t3);
980
+ if (if_block) if_block.m(div1, null);
981
+ append_dev(div1, t4);
982
+
983
+ if (!mounted) {
984
+ dispose = listen_dev(button, "click", click_handler, false, false, false, false);
985
+ mounted = true;
986
+ }
987
+ },
988
+ p: function update(new_ctx, dirty) {
989
+ ctx = new_ctx;
990
+ if (dirty & /*comments*/ 1 && t0_value !== (t0_value = /*comment*/ ctx[6].title + "")) set_data_dev(t0, t0_value);
991
+
992
+ if (/*comment*/ ctx[6].items) {
993
+ if (if_block) {
994
+ if_block.p(ctx, dirty);
995
+ } else {
996
+ if_block = create_if_block(ctx);
997
+ if_block.c();
998
+ if_block.m(div1, t4);
999
+ }
1000
+ } else if (if_block) {
1001
+ if_block.d(1);
1002
+ if_block = null;
1003
+ }
1004
+
1005
+ if (dirty & /*comments*/ 1 && div1_key_value !== (div1_key_value = /*comment*/ ctx[6].id)) {
1006
+ attr_dev(div1, "key", div1_key_value);
1007
+ }
1008
+ },
1009
+ d: function destroy(detaching) {
1010
+ if (detaching) detach_dev(div1);
1011
+ if (if_block) if_block.d();
1012
+ mounted = false;
1013
+ dispose();
1014
+ }
1015
+ };
1016
+
1017
+ dispatch_dev("SvelteRegisterBlock", {
1018
+ block,
1019
+ id: create_each_block.name,
1020
+ type: "each",
1021
+ source: "(23:4) {#each comments as comment}",
1022
+ ctx
1023
+ });
1024
+
1025
+ return block;
1026
+ }
1027
+
1028
+ function create_fragment$1(ctx) {
1029
+ let div1;
1030
+ let div0;
1031
+ let input;
1032
+ let t0;
1033
+ let button;
1034
+ let t2;
1035
+ let mounted;
1036
+ let dispose;
1037
+ let each_value = /*comments*/ ctx[0];
1038
+ validate_each_argument(each_value);
1039
+ let each_blocks = [];
1040
+
1041
+ for (let i = 0; i < each_value.length; i += 1) {
1042
+ each_blocks[i] = create_each_block(get_each_context(ctx, each_value, i));
1043
+ }
1044
+
1045
+ const block = {
1046
+ c: function create() {
1047
+ div1 = element("div");
1048
+ div0 = element("div");
1049
+ input = element("input");
1050
+ t0 = space();
1051
+ button = element("button");
1052
+ button.textContent = "Post Comment";
1053
+ t2 = space();
1054
+
1055
+ for (let i = 0; i < each_blocks.length; i += 1) {
1056
+ each_blocks[i].c();
1057
+ }
1058
+
1059
+ attr_dev(input, "type", "text");
1060
+ attr_dev(input, "placeholder", "Add a comment");
1061
+ add_location(input, file$1, 19, 8, 530);
1062
+ add_location(button, file$1, 20, 8, 613);
1063
+ add_location(div0, file$1, 18, 4, 515);
1064
+ attr_dev(div1, "id", "comment-container");
1065
+ add_location(div1, file$1, 17, 0, 481);
1066
+ },
1067
+ l: function claim(nodes) {
1068
+ throw new Error("options.hydrate only works if the component was compiled with the `hydratable: true` option");
1069
+ },
1070
+ m: function mount(target, anchor) {
1071
+ insert_dev(target, div1, anchor);
1072
+ append_dev(div1, div0);
1073
+ append_dev(div0, input);
1074
+ set_input_value(input, /*newComment*/ ctx[1]);
1075
+ append_dev(div0, t0);
1076
+ append_dev(div0, button);
1077
+ append_dev(div1, t2);
1078
+
1079
+ for (let i = 0; i < each_blocks.length; i += 1) {
1080
+ if (each_blocks[i]) {
1081
+ each_blocks[i].m(div1, null);
1082
+ }
1083
+ }
1084
+
1085
+ if (!mounted) {
1086
+ dispose = [
1087
+ listen_dev(input, "input", /*input_input_handler*/ ctx[4]),
1088
+ listen_dev(button, "click", /*addComment*/ ctx[2], false, false, false, false)
1089
+ ];
1090
+
1091
+ mounted = true;
1092
+ }
1093
+ },
1094
+ p: function update(ctx, [dirty]) {
1095
+ if (dirty & /*newComment*/ 2 && input.value !== /*newComment*/ ctx[1]) {
1096
+ set_input_value(input, /*newComment*/ ctx[1]);
1097
+ }
1098
+
1099
+ if (dirty & /*comments, addReply, prompt*/ 9) {
1100
+ each_value = /*comments*/ ctx[0];
1101
+ validate_each_argument(each_value);
1102
+ let i;
1103
+
1104
+ for (i = 0; i < each_value.length; i += 1) {
1105
+ const child_ctx = get_each_context(ctx, each_value, i);
1106
+
1107
+ if (each_blocks[i]) {
1108
+ each_blocks[i].p(child_ctx, dirty);
1109
+ } else {
1110
+ each_blocks[i] = create_each_block(child_ctx);
1111
+ each_blocks[i].c();
1112
+ each_blocks[i].m(div1, null);
1113
+ }
1114
+ }
1115
+
1116
+ for (; i < each_blocks.length; i += 1) {
1117
+ each_blocks[i].d(1);
1118
+ }
1119
+
1120
+ each_blocks.length = each_value.length;
1121
+ }
1122
+ },
1123
+ i: noop,
1124
+ o: noop,
1125
+ d: function destroy(detaching) {
1126
+ if (detaching) detach_dev(div1);
1127
+ destroy_each(each_blocks, detaching);
1128
+ mounted = false;
1129
+ run_all(dispose);
1130
+ }
1131
+ };
1132
+
1133
+ dispatch_dev("SvelteRegisterBlock", {
1134
+ block,
1135
+ id: create_fragment$1.name,
1136
+ type: "component",
1137
+ source: "",
1138
+ ctx
1139
+ });
1140
+
1141
+ return block;
1142
+ }
1143
+
1144
+ function instance$1($$self, $$props, $$invalidate) {
1145
+ let { $$slots: slots = {}, $$scope } = $$props;
1146
+ validate_slots('NestedCommentsTestfromReact', slots, []);
1147
+ let comments = [];
1148
+ let newComment = '';
1149
+
1150
+ const addComment = () => {
1151
+ $$invalidate(0, comments = [
1152
+ ...comments,
1153
+ {
1154
+ id: v4(),
1155
+ title: newComment,
1156
+ items: []
1157
+ }
1158
+ ]);
1159
+
1160
+ $$invalidate(1, newComment = '');
1161
+ };
1162
+
1163
+ const addReply = (comment, replyText) => {
1164
+ comment.items.push({
1165
+ id: v4(),
1166
+ title: replyText,
1167
+ items: []
1168
+ });
1169
+
1170
+ $$invalidate(0, comments = [...comments]);
1171
+ };
1172
+
1173
+ const writable_props = [];
1174
+
1175
+ Object.keys($$props).forEach(key => {
1176
+ if (!~writable_props.indexOf(key) && key.slice(0, 2) !== '$$' && key !== 'slot') console.warn(`<NestedCommentsTestfromReact> was created with unknown prop '${key}'`);
1177
+ });
1178
+
1179
+ function input_input_handler() {
1180
+ newComment = this.value;
1181
+ $$invalidate(1, newComment);
1182
+ }
1183
+
1184
+ const click_handler = comment => addReply(comment, prompt('Enter your reply'));
1185
+
1186
+ $$self.$capture_state = () => ({
1187
+ comment,
1188
+ uuidv4: v4,
1189
+ comments,
1190
+ newComment,
1191
+ addComment,
1192
+ addReply
1193
+ });
1194
+
1195
+ $$self.$inject_state = $$props => {
1196
+ if ('comments' in $$props) $$invalidate(0, comments = $$props.comments);
1197
+ if ('newComment' in $$props) $$invalidate(1, newComment = $$props.newComment);
1198
+ };
1199
+
1200
+ if ($$props && "$$inject" in $$props) {
1201
+ $$self.$inject_state($$props.$$inject);
1202
+ }
1203
+
1204
+ return [comments, newComment, addComment, addReply, input_input_handler, click_handler];
1205
+ }
1206
+
1207
+ class NestedCommentsTestfromReact extends SvelteComponentDev {
1208
+ constructor(options) {
1209
+ super(options);
1210
+ init(this, options, instance$1, create_fragment$1, safe_not_equal, {});
1211
+
1212
+ dispatch_dev("SvelteRegisterComponent", {
1213
+ component: this,
1214
+ tagName: "NestedCommentsTestfromReact",
1215
+ options,
1216
+ id: create_fragment$1.name
1217
+ });
1218
+ }
1219
+ }
1220
+
1221
+ /* src\App.svelte generated by Svelte v3.59.2 */
1222
+ const file = "src\\App.svelte";
1223
+
1224
+ function create_fragment(ctx) {
1225
+ let main;
1226
+ let h10;
1227
+ let t0;
1228
+ let t1;
1229
+ let t2;
1230
+ let t3;
1231
+ let p;
1232
+ let t4;
1233
+ let a;
1234
+ let t6;
1235
+ let t7;
1236
+ let h11;
1237
+ let t9;
1238
+ let nestedcommentstestfromreact;
1239
+ let t10;
1240
+ let videogradiocomponentbrainstorming;
1241
+ let current;
1242
+ nestedcommentstestfromreact = new NestedCommentsTestfromReact({ $$inline: true });
1243
+ videogradiocomponentbrainstorming = new VideoGradioComponentBrainstorming({ $$inline: true });
1244
+
1245
+ const block = {
1246
+ c: function create() {
1247
+ main = element("main");
1248
+ h10 = element("h1");
1249
+ t0 = text("Hello ");
1250
+ t1 = text(/*name*/ ctx[0]);
1251
+ t2 = text("!");
1252
+ t3 = space();
1253
+ p = element("p");
1254
+ t4 = text("Visit the ");
1255
+ a = element("a");
1256
+ a.textContent = "Svelte tutorial";
1257
+ t6 = text(" to learn how to build Svelte apps.");
1258
+ t7 = space();
1259
+ h11 = element("h1");
1260
+ h11.textContent = "My new component test";
1261
+ t9 = space();
1262
+ create_component(nestedcommentstestfromreact.$$.fragment);
1263
+ t10 = space();
1264
+ create_component(videogradiocomponentbrainstorming.$$.fragment);
1265
+ attr_dev(h10, "class", "svelte-1tky8bj");
1266
+ add_location(h10, file, 8, 1, 221);
1267
+ attr_dev(a, "href", "https://svelte.dev/tutorial");
1268
+ add_location(a, file, 9, 14, 258);
1269
+ add_location(p, file, 9, 1, 245);
1270
+ attr_dev(h11, "class", "svelte-1tky8bj");
1271
+ add_location(h11, file, 11, 1, 357);
1272
+ attr_dev(main, "class", "svelte-1tky8bj");
1273
+ add_location(main, file, 7, 0, 213);
1274
+ },
1275
+ l: function claim(nodes) {
1276
+ throw new Error("options.hydrate only works if the component was compiled with the `hydratable: true` option");
1277
+ },
1278
+ m: function mount(target, anchor) {
1279
+ insert_dev(target, main, anchor);
1280
+ append_dev(main, h10);
1281
+ append_dev(h10, t0);
1282
+ append_dev(h10, t1);
1283
+ append_dev(h10, t2);
1284
+ append_dev(main, t3);
1285
+ append_dev(main, p);
1286
+ append_dev(p, t4);
1287
+ append_dev(p, a);
1288
+ append_dev(p, t6);
1289
+ append_dev(main, t7);
1290
+ append_dev(main, h11);
1291
+ append_dev(main, t9);
1292
+ mount_component(nestedcommentstestfromreact, main, null);
1293
+ append_dev(main, t10);
1294
+ mount_component(videogradiocomponentbrainstorming, main, null);
1295
+ current = true;
1296
+ },
1297
+ p: function update(ctx, [dirty]) {
1298
+ if (!current || dirty & /*name*/ 1) set_data_dev(t1, /*name*/ ctx[0]);
1299
+ },
1300
+ i: function intro(local) {
1301
+ if (current) return;
1302
+ transition_in(nestedcommentstestfromreact.$$.fragment, local);
1303
+ transition_in(videogradiocomponentbrainstorming.$$.fragment, local);
1304
+ current = true;
1305
+ },
1306
+ o: function outro(local) {
1307
+ transition_out(nestedcommentstestfromreact.$$.fragment, local);
1308
+ transition_out(videogradiocomponentbrainstorming.$$.fragment, local);
1309
+ current = false;
1310
+ },
1311
+ d: function destroy(detaching) {
1312
+ if (detaching) detach_dev(main);
1313
+ destroy_component(nestedcommentstestfromreact);
1314
+ destroy_component(videogradiocomponentbrainstorming);
1315
+ }
1316
+ };
1317
+
1318
+ dispatch_dev("SvelteRegisterBlock", {
1319
+ block,
1320
+ id: create_fragment.name,
1321
+ type: "component",
1322
+ source: "",
1323
+ ctx
1324
+ });
1325
+
1326
+ return block;
1327
+ }
1328
+
1329
+ function instance($$self, $$props, $$invalidate) {
1330
+ let { $$slots: slots = {}, $$scope } = $$props;
1331
+ validate_slots('App', slots, []);
1332
+ let { name } = $$props;
1333
+
1334
+ $$self.$$.on_mount.push(function () {
1335
+ if (name === undefined && !('name' in $$props || $$self.$$.bound[$$self.$$.props['name']])) {
1336
+ console.warn("<App> was created without expected prop 'name'");
1337
+ }
1338
+ });
1339
+
1340
+ const writable_props = ['name'];
1341
+
1342
+ Object.keys($$props).forEach(key => {
1343
+ if (!~writable_props.indexOf(key) && key.slice(0, 2) !== '$$' && key !== 'slot') console.warn(`<App> was created with unknown prop '${key}'`);
1344
+ });
1345
+
1346
+ $$self.$$set = $$props => {
1347
+ if ('name' in $$props) $$invalidate(0, name = $$props.name);
1348
+ };
1349
+
1350
+ $$self.$capture_state = () => ({
1351
+ name,
1352
+ VideoGradioComponentBrainstorming,
1353
+ NestedCommentsTestfromReact
1354
+ });
1355
+
1356
+ $$self.$inject_state = $$props => {
1357
+ if ('name' in $$props) $$invalidate(0, name = $$props.name);
1358
+ };
1359
+
1360
+ if ($$props && "$$inject" in $$props) {
1361
+ $$self.$inject_state($$props.$$inject);
1362
+ }
1363
+
1364
+ return [name];
1365
+ }
1366
+
1367
+ class App extends SvelteComponentDev {
1368
+ constructor(options) {
1369
+ super(options);
1370
+ init(this, options, instance, create_fragment, safe_not_equal, { name: 0 });
1371
+
1372
+ dispatch_dev("SvelteRegisterComponent", {
1373
+ component: this,
1374
+ tagName: "App",
1375
+ options,
1376
+ id: create_fragment.name
1377
+ });
1378
+ }
1379
+
1380
+ get name() {
1381
+ throw new Error("<App>: Props cannot be read directly from the component instance unless compiling with 'accessors: true' or '<svelte:options accessors/>'");
1382
+ }
1383
+
1384
+ set name(value) {
1385
+ throw new Error("<App>: Props cannot be set directly on the component instance unless compiling with 'accessors: true' or '<svelte:options accessors/>'");
1386
+ }
1387
+ }
1388
+
1389
+ const app = new App({
1390
+ target: document.body,
1391
+ props: {
1392
+ name: 'world'
1393
+ }
1394
+ });
1395
+
1396
+ return app;
1397
+
1398
+ })();
1399
  //# sourceMappingURL=bundle.js.map
style.css DELETED
@@ -1,28 +0,0 @@
1
- body {
2
- padding: 2rem;
3
- font-family: -apple-system, BlinkMacSystemFont, "Arial", sans-serif;
4
- }
5
-
6
- h1 {
7
- font-size: 16px;
8
- margin-top: 0;
9
- }
10
-
11
- p {
12
- color: rgb(107, 114, 128);
13
- font-size: 15px;
14
- margin-bottom: 10px;
15
- margin-top: 5px;
16
- }
17
-
18
- .card {
19
- max-width: 620px;
20
- margin: 0 auto;
21
- padding: 16px;
22
- border: 1px solid lightgray;
23
- border-radius: 16px;
24
- }
25
-
26
- .card p:last-child {
27
- margin-bottom: 0;
28
- }