diff --git a/.gitignore b/.gitignore index 3c3629e..3ce1789 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ node_modules +/package-lock.json diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..25682e0 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,3 @@ +FROM nginx:alpine +COPY default.conf /etc/nginx/conf.d/default.conf +EXPOSE 80 \ No newline at end of file diff --git a/css/bootstrap-switch.min.css b/app/css/bootstrap-switch.min.css similarity index 100% rename from css/bootstrap-switch.min.css rename to app/css/bootstrap-switch.min.css diff --git a/css/bootstrap.min.css b/app/css/bootstrap.min.css similarity index 100% rename from css/bootstrap.min.css rename to app/css/bootstrap.min.css diff --git a/css/font-awesome.min.css b/app/css/font-awesome.min.css similarity index 100% rename from css/font-awesome.min.css rename to app/css/font-awesome.min.css diff --git a/css/fontello.css b/app/css/fontello.css similarity index 100% rename from css/fontello.css rename to app/css/fontello.css diff --git a/css/fontello.min.css b/app/css/fontello.min.css similarity index 100% rename from css/fontello.min.css rename to app/css/fontello.min.css diff --git a/css/jquery-confirm.min.css b/app/css/jquery-confirm.min.css similarity index 100% rename from css/jquery-confirm.min.css rename to app/css/jquery-confirm.min.css diff --git a/css/jquery-editable-select.min.css b/app/css/jquery-editable-select.min.css similarity index 100% rename from css/jquery-editable-select.min.css rename to app/css/jquery-editable-select.min.css diff --git a/css/menu.css b/app/css/menu.css similarity index 100% rename from css/menu.css rename to app/css/menu.css diff --git a/css/slider.1.css b/app/css/slider.1.css similarity index 100% rename from css/slider.1.css rename to app/css/slider.1.css diff --git a/css/slider.css b/app/css/slider.css similarity index 100% rename from css/slider.css rename to app/css/slider.css diff --git a/css/snackbar.css b/app/css/snackbar.css similarity index 100% rename from css/snackbar.css rename to app/css/snackbar.css diff --git a/css/style.css b/app/css/style.css similarity index 85% rename from css/style.css rename to app/css/style.css index ae13b79..f471bf7 100644 --- a/css/style.css +++ b/app/css/style.css @@ -60,6 +60,19 @@ height: 100%; } /*body{ background-color: #2c3e50; }*/ +.btn-bs-button{ + position:relative; +} +.btn-bs-button input[type="button"]{ + position: absolute; + top: -9999999; + filter: alpha(opacity=0); + opacity: 0; + width:0; + height:0; + outline: none; + cursor: inherit; +} .btn-bs-file{ position:relative; } @@ -107,4 +120,8 @@ .no-pl{ padding-left: 0px!important; +} + +#toolbar{ + width: 100px; } \ No newline at end of file diff --git a/css/svg.css b/app/css/svg.css similarity index 100% rename from css/svg.css rename to app/css/svg.css diff --git a/css/svg.select.min.css b/app/css/svg.select.min.css similarity index 100% rename from css/svg.select.min.css rename to app/css/svg.select.min.css diff --git a/css/taggle.min.css b/app/css/taggle.min.css similarity index 100% rename from css/taggle.min.css rename to app/css/taggle.min.css diff --git a/css/tags.css b/app/css/tags.css similarity index 100% rename from css/tags.css rename to app/css/tags.css diff --git a/fonts/fontello.eot b/app/fonts/fontello.eot similarity index 100% rename from fonts/fontello.eot rename to app/fonts/fontello.eot diff --git a/fonts/fontello.svg b/app/fonts/fontello.svg similarity index 100% rename from fonts/fontello.svg rename to app/fonts/fontello.svg diff --git a/fonts/fontello.ttf b/app/fonts/fontello.ttf similarity index 100% rename from fonts/fontello.ttf rename to app/fonts/fontello.ttf diff --git a/fonts/fontello.woff b/app/fonts/fontello.woff similarity index 100% rename from fonts/fontello.woff rename to app/fonts/fontello.woff diff --git a/fonts/fontello.woff2 b/app/fonts/fontello.woff2 similarity index 100% rename from fonts/fontello.woff2 rename to app/fonts/fontello.woff2 diff --git a/img/favicons/android-icon-144x144.png b/app/img/favicons/android-icon-144x144.png similarity index 100% rename from img/favicons/android-icon-144x144.png rename to app/img/favicons/android-icon-144x144.png diff --git a/img/favicons/android-icon-192x192.png b/app/img/favicons/android-icon-192x192.png similarity index 100% rename from img/favicons/android-icon-192x192.png rename to app/img/favicons/android-icon-192x192.png diff --git a/img/favicons/android-icon-36x36.png b/app/img/favicons/android-icon-36x36.png similarity index 100% rename from img/favicons/android-icon-36x36.png rename to app/img/favicons/android-icon-36x36.png diff --git a/img/favicons/android-icon-48x48.png b/app/img/favicons/android-icon-48x48.png similarity index 100% rename from img/favicons/android-icon-48x48.png rename to app/img/favicons/android-icon-48x48.png diff --git a/img/favicons/android-icon-72x72.png b/app/img/favicons/android-icon-72x72.png similarity index 100% rename from img/favicons/android-icon-72x72.png rename to app/img/favicons/android-icon-72x72.png diff --git a/img/favicons/android-icon-96x96.png b/app/img/favicons/android-icon-96x96.png similarity index 100% rename from img/favicons/android-icon-96x96.png rename to app/img/favicons/android-icon-96x96.png diff --git a/img/favicons/apple-icon-114x114.png b/app/img/favicons/apple-icon-114x114.png similarity index 100% rename from img/favicons/apple-icon-114x114.png rename to app/img/favicons/apple-icon-114x114.png diff --git a/img/favicons/apple-icon-120x120.png b/app/img/favicons/apple-icon-120x120.png similarity index 100% rename from img/favicons/apple-icon-120x120.png rename to app/img/favicons/apple-icon-120x120.png diff --git a/img/favicons/apple-icon-144x144.png b/app/img/favicons/apple-icon-144x144.png similarity index 100% rename from img/favicons/apple-icon-144x144.png rename to app/img/favicons/apple-icon-144x144.png diff --git a/img/favicons/apple-icon-152x152.png b/app/img/favicons/apple-icon-152x152.png similarity index 100% rename from img/favicons/apple-icon-152x152.png rename to app/img/favicons/apple-icon-152x152.png diff --git a/img/favicons/apple-icon-180x180.png b/app/img/favicons/apple-icon-180x180.png similarity index 100% rename from img/favicons/apple-icon-180x180.png rename to app/img/favicons/apple-icon-180x180.png diff --git a/img/favicons/apple-icon-57x57.png b/app/img/favicons/apple-icon-57x57.png similarity index 100% rename from img/favicons/apple-icon-57x57.png rename to app/img/favicons/apple-icon-57x57.png diff --git a/img/favicons/apple-icon-60x60.png b/app/img/favicons/apple-icon-60x60.png similarity index 100% rename from img/favicons/apple-icon-60x60.png rename to app/img/favicons/apple-icon-60x60.png diff --git a/img/favicons/apple-icon-72x72.png b/app/img/favicons/apple-icon-72x72.png similarity index 100% rename from img/favicons/apple-icon-72x72.png rename to app/img/favicons/apple-icon-72x72.png diff --git a/img/favicons/apple-icon-76x76.png b/app/img/favicons/apple-icon-76x76.png similarity index 100% rename from img/favicons/apple-icon-76x76.png rename to app/img/favicons/apple-icon-76x76.png diff --git a/img/favicons/apple-icon-precomposed.png b/app/img/favicons/apple-icon-precomposed.png similarity index 100% rename from img/favicons/apple-icon-precomposed.png rename to app/img/favicons/apple-icon-precomposed.png diff --git a/img/favicons/apple-icon.png b/app/img/favicons/apple-icon.png similarity index 100% rename from img/favicons/apple-icon.png rename to app/img/favicons/apple-icon.png diff --git a/img/favicons/browserconfig.xml b/app/img/favicons/browserconfig.xml similarity index 100% rename from img/favicons/browserconfig.xml rename to app/img/favicons/browserconfig.xml diff --git a/img/favicons/favicon-16x16.png b/app/img/favicons/favicon-16x16.png similarity index 100% rename from img/favicons/favicon-16x16.png rename to app/img/favicons/favicon-16x16.png diff --git a/img/favicons/favicon-32x32.png b/app/img/favicons/favicon-32x32.png similarity index 100% rename from img/favicons/favicon-32x32.png rename to app/img/favicons/favicon-32x32.png diff --git a/img/favicons/favicon-96x96.png b/app/img/favicons/favicon-96x96.png similarity index 100% rename from img/favicons/favicon-96x96.png rename to app/img/favicons/favicon-96x96.png diff --git a/img/favicons/favicon.ico b/app/img/favicons/favicon.ico similarity index 100% rename from img/favicons/favicon.ico rename to app/img/favicons/favicon.ico diff --git a/img/favicons/manifest.json b/app/img/favicons/manifest.json similarity index 100% rename from img/favicons/manifest.json rename to app/img/favicons/manifest.json diff --git a/img/favicons/ms-icon-144x144.png b/app/img/favicons/ms-icon-144x144.png similarity index 100% rename from img/favicons/ms-icon-144x144.png rename to app/img/favicons/ms-icon-144x144.png diff --git a/img/favicons/ms-icon-150x150.png b/app/img/favicons/ms-icon-150x150.png similarity index 100% rename from img/favicons/ms-icon-150x150.png rename to app/img/favicons/ms-icon-150x150.png diff --git a/img/favicons/ms-icon-310x310.png b/app/img/favicons/ms-icon-310x310.png similarity index 100% rename from img/favicons/ms-icon-310x310.png rename to app/img/favicons/ms-icon-310x310.png diff --git a/img/favicons/ms-icon-70x70.png b/app/img/favicons/ms-icon-70x70.png similarity index 100% rename from img/favicons/ms-icon-70x70.png rename to app/img/favicons/ms-icon-70x70.png diff --git a/img/githubribon.png b/app/img/githubribon.png similarity index 100% rename from img/githubribon.png rename to app/img/githubribon.png diff --git a/app/img/icons/bee.png b/app/img/icons/bee.png new file mode 100644 index 0000000..79d2864 Binary files /dev/null and b/app/img/icons/bee.png differ diff --git a/app/img/icons/bee.svg b/app/img/icons/bee.svg new file mode 100644 index 0000000..47ef204 --- /dev/null +++ b/app/img/icons/bee.svg @@ -0,0 +1,2 @@ + + diff --git a/img/icons/circle.svg b/app/img/icons/circle.svg similarity index 100% rename from img/icons/circle.svg rename to app/img/icons/circle.svg diff --git a/img/icons/clock.svg b/app/img/icons/clock.svg similarity index 100% rename from img/icons/clock.svg rename to app/img/icons/clock.svg diff --git a/app/img/icons/download.svg b/app/img/icons/download.svg new file mode 100644 index 0000000..a4dd792 --- /dev/null +++ b/app/img/icons/download.svg @@ -0,0 +1,38 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/img/icons/files-white.png b/app/img/icons/files-white.png similarity index 100% rename from img/icons/files-white.png rename to app/img/icons/files-white.png diff --git a/img/icons/keyboard.svg b/app/img/icons/keyboard.svg similarity index 100% rename from img/icons/keyboard.svg rename to app/img/icons/keyboard.svg diff --git a/img/icons/menu.svg b/app/img/icons/menu.svg similarity index 100% rename from img/icons/menu.svg rename to app/img/icons/menu.svg diff --git a/img/icons/move.svg b/app/img/icons/move.svg similarity index 100% rename from img/icons/move.svg rename to app/img/icons/move.svg diff --git a/img/icons/open.png b/app/img/icons/open.png similarity index 100% rename from img/icons/open.png rename to app/img/icons/open.png diff --git a/img/icons/point.svg b/app/img/icons/point.svg similarity index 100% rename from img/icons/point.svg rename to app/img/icons/point.svg diff --git a/img/icons/polygon.svg b/app/img/icons/polygon.svg similarity index 100% rename from img/icons/polygon.svg rename to app/img/icons/polygon.svg diff --git a/img/icons/rectangle.svg b/app/img/icons/rectangle.svg similarity index 100% rename from img/icons/rectangle.svg rename to app/img/icons/rectangle.svg diff --git a/img/icons/zoomin.svg b/app/img/icons/zoomin.svg similarity index 100% rename from img/icons/zoomin.svg rename to app/img/icons/zoomin.svg diff --git a/img/icons/zoomout.svg b/app/img/icons/zoomout.svg similarity index 100% rename from img/icons/zoomout.svg rename to app/img/icons/zoomout.svg diff --git a/img/imglab-autosuggestion.gif b/app/img/imglab-autosuggestion.gif old mode 100755 new mode 100644 similarity index 100% rename from img/imglab-autosuggestion.gif rename to app/img/imglab-autosuggestion.gif diff --git a/img/imglab-fpp.gif b/app/img/imglab-fpp.gif old mode 100755 new mode 100644 similarity index 100% rename from img/imglab-fpp.gif rename to app/img/imglab-fpp.gif diff --git a/img/imglab-polygon.gif b/app/img/imglab-polygon.gif old mode 100755 new mode 100644 similarity index 100% rename from img/imglab-polygon.gif rename to app/img/imglab-polygon.gif diff --git a/img/imglab.png b/app/img/imglab.png similarity index 100% rename from img/imglab.png rename to app/img/imglab.png diff --git a/img/imglab_logo.png b/app/img/imglab_logo.png similarity index 100% rename from img/imglab_logo.png rename to app/img/imglab_logo.png diff --git a/img/imglab_vision.png b/app/img/imglab_vision.png similarity index 100% rename from img/imglab_vision.png rename to app/img/imglab_vision.png diff --git a/img/left-paddle-white.png b/app/img/left-paddle-white.png similarity index 100% rename from img/left-paddle-white.png rename to app/img/left-paddle-white.png diff --git a/img/left-paddle.png b/app/img/left-paddle.png similarity index 100% rename from img/left-paddle.png rename to app/img/left-paddle.png diff --git a/img/right-paddle-white.png b/app/img/right-paddle-white.png similarity index 100% rename from img/right-paddle-white.png rename to app/img/right-paddle-white.png diff --git a/img/right-paddle.png b/app/img/right-paddle.png similarity index 100% rename from img/right-paddle.png rename to app/img/right-paddle.png diff --git a/img/support_patreon.svg b/app/img/support_patreon.svg similarity index 98% rename from img/support_patreon.svg rename to app/img/support_patreon.svg index 710e8d5..593124d 100644 --- a/img/support_patreon.svg +++ b/app/img/support_patreon.svg @@ -1,68 +1,68 @@ - - - - -support - - - - - - - - - - - - - - - - - - - - - - - - - + + + + +support + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/img/support_paypal.svg b/app/img/support_paypal.svg similarity index 98% rename from img/support_paypal.svg rename to app/img/support_paypal.svg index 0a916a3..871ab11 100644 --- a/img/support_paypal.svg +++ b/app/img/support_paypal.svg @@ -1,90 +1,90 @@ - - - - -support - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + +support + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/index.html b/app/index.html similarity index 68% rename from index.html rename to app/index.html index 460db95..39854be 100644 --- a/index.html +++ b/app/index.html @@ -2,6 +2,7 @@ + @@ -20,20 +21,7 @@ - - - - - ImgLab - Image Annotation tool + BeeHive - Image Annotation tool @@ -53,14 +41,15 @@ - - - + + + - + + @@ -73,16 +62,16 @@
- - - - Img Lab + + 玉蜂谷
- Donate - +
@@ -118,10 +107,10 @@ - + - + @@ -130,7 +119,8 @@ - + + @@ -140,6 +130,8 @@ + + - + - + + + + + - - + diff --git a/js/Face++DataParser.js b/app/js/Face++DataParser.js similarity index 100% rename from js/Face++DataParser.js rename to app/js/Face++DataParser.js diff --git a/js/FaceBox.js b/app/js/FaceBox.js similarity index 100% rename from js/FaceBox.js rename to app/js/FaceBox.js diff --git a/app/js/app.js b/app/js/app.js new file mode 100644 index 0000000..fa159dc --- /dev/null +++ b/app/js/app.js @@ -0,0 +1,173 @@ +function showSnackBar(msg) { + // Get the snackbar DIV + $("#snackbar").text(msg); + $("#snackbar").addClass("show"); + + // After 3 seconds, remove the show class from DIV + setTimeout(function () { + $("#snackbar").removeClass("show"); + $("#snackbar").text(""); + }, 3000); +} + +//get mouse cordinates on image +function getCordinates(event, element) { + var rect = element[0].getBoundingClientRect(); + var x = Math.round(event.pageX - rect.left); + var y = Math.round(event.pageY - rect.top); + return { + x: x, + y: y + }; +} + +function logout() { + localStorage.removeItem('beevalley_login'); + window.location = pluginsStore.beenest.host; +} + +// aidition beenest publick methods +function axiosClient() { + // axios.defaults.withCredentials = true; + var instance = axios.create({ + baseURL: pluginsStore.beenest.baseURL, + // headers: {Authorization: 'Bearer ' + pluginsStore.beenest.token,}, + withCredentials: true + }); + instance.interceptors.response.use(function(response) { + //对响应数据做些事 + return response; + }, function(error) { + //请求错误时做些事 + if (error.response.status === 401) { + alert('登陆过期。'); + logout(); + } else if (error.response.status === 403 && error.response.data && error.response.data.error.code === "16") { + alert('尚余其它类型任务未完成,无法请求此类型新任务。'); + } else if (error.response.status === 403) { + alert('未授权操作。请关注公众号“淘然视界”,联系客服获取权限。'); + } else { + alert('系统错误,请稍候重试。'); + } + return Promise.reject(error); + }); + return instance; +} + +function updateDimentions(imgFileSrc, imageDataObject) { + var img = new Image(); + img.onload = function() { + imageDataObject.size = { + width : this.width, + height : this.height, + scaledWidth: this.width, + scaledHeight: this.height, + imageScale: 1 + } + //给全局添加画框 + if(imageDataObject.workType === 'count'){ + if (!imageDataObject.preloadedShapes) { + imageDataObject.preloadedShapes = []; + } + var backgroundShape = { + "id" : imageDataObject.name + '_global', + "type" : 'rect', + "points": [0, 0, imageDataObject.size.width, imageDataObject.size.height], + "editable": false + }; + if(imageDataObject.preloadedFeaturePoints){ + backgroundShape.featurePoints = imageDataObject.preloadedFeaturePoints; + } + imageDataObject.preloadedShapes.push(backgroundShape); + } + addImgToStore(imageDataObject); + } + img.src = imgFileSrc; +} + +function readImageBlob(blob, imgData) { + var reader = new FileReader(); + reader.onload = function(e) { + imgData['src'] = e.target.result; + updateDimentions(e.target.result, imgData); + } + reader.onloadend = function(e) { + } + reader.readAsDataURL(blob); +} + + +/** + * Search an item in array based on id property. + * returns index of the item + * @param {Array} arr + * @param {string} itemId + */ +function indexOf(arr, property, val){ + for(var i=0; i 1) { + xx = x2; + yy = y2; + } + else { + xx = x1 + param * C; + yy = y1 + param * D; + } + + var dx = x - xx; + var dy = y - yy; + return Math.sqrt(dx * dx + dy * dy); + } + + function deleteAndNextImage(selectedImageName) { + + delete labellingData[ selectedImageName ]; + imgSelected = Object.keys(labellingData).length > 0 ? labellingData[Object.keys(labellingData)[0]] : {size: {}, shapes: []}; + riot.mount('workarea'); + + } + + function clearAllImages() { + imgSelected = {size: {}, shapes: []}; + Object.keys(labellingData).forEach(function (prop) { + delete labellingData[prop]; + }); + riot.mount('workarea'); + } \ No newline at end of file diff --git a/app/js/config.js b/app/js/config.js new file mode 100644 index 0000000..352b811 --- /dev/null +++ b/app/js/config.js @@ -0,0 +1,178 @@ +var tools = { + labelling : { + "tool-point" : { + type: "point", + title : "数点标注", + desp : "Create a feature point inside the concave polygon or boundary box", + icon : "point.svg", + drawable : true, + // actions: ["landmark"], + create : function(e,container){ + var canvasOffset = myCanvas.node.getBoundingClientRect(); + return getPointToDraw(e,container,canvasOffset); + }, + validate: function(el){ + return true; + } + }, + // "tool-circle" : { + // type: "circle", + // title : "Circle", + // desp : "Create a circle", + // icon : "circle.svg", + // drawable : true, + // create : function(){ + // var circle = myCanvas.nested().circle().radius().addClass('labelcircle shape')/* .draw() */; + // circle.resize(); + // circle.parent().draggable(); + // return circle; + // }, + // validate: function(el){ + // return Number.parseInt(el.attr("r")) > 3; + // } + // }, + "tool-rectangle" : { + type: "rect", + title : "方框标注", + desp : "Create a Boundary boxrectangle", + icon : "rectangle.svg", + drawable : true, + create : function(){ + var rect = myCanvas.nested().rect().addClass('labelbox shape')/* .draw() */; + rect.resize(); + rect.parent().draggable(); + return rect; + }, + validate: function(el){ + return Number.parseInt(el.attr("width")) > 3; + }, + } + // , + // "tool-polygon" : { + // type: "poly", + // title : "Polygon", + // desp : "Create a concave polygon", + // icon : "polygon.svg", + // drawable : true, + // create : function(){//TODO: bug: creating duplicate points + // var poly = myCanvas.nested().polygon().addClass('labelpolygon shape')/* .draw() */; + // poly.resize(); + // poly.parent().draggable(); + + // poly.on('drawstart', function(e){ + // document.addEventListener('keydown', function(e){ + // if(e.keyCode == 13){ + // poly.draw('done'); + // poly.off('drawstart'); + + // poly.on('dblclick', function(event){ + // if(selectedTool.type === "poly"){ + // var points = myCanvas.point(event.x, event.y); + // var polyArray = poly.array().valueOf(); + // for(var p_i=0; p_i< polyArray.length; p_i++){ + // var point1 = polyArray[ p_i]; + // var point2 = []; + + // if(i === length -1 ){ + // point2 = polyArray[ 0]; + // }else{ + // point2 = polyArray[ p_i + 1 ]; + // } + // var distance = pDistance(point1[0], point1[1], point2[0], point2[1], points.x, points.y); + // if(distance < 11){ + // polyArray.splice(p_i+1, 0, [points.x, points.y] ); + // poly.plot(polyArray); + // break; + // } + // } + // } + // }) + // } + // }); + // }); + + // return poly; + // }, + // validate: function(el){ + // return true; + // }, + // } + }, + canvas : { + "tool-beenest": { + title : "任务面板", + desp : "BeeNest Control Panel", + icon : "bee.png", + actions : ["beenest"] + }, + "tool-audition": { + title : "审核面板", + desp : "audit panel", + icon : "bee.png", + actions : ["auditing"] + }, + "tool-move" : { + title : "移动目标", + desp : "Move an element or the entire workarea", + icon : "move.svg", + type : "move" + }, + // "tool-zoom" : { + // title : "缩放", + // desp : "Enlarge the workarea", + // icon_font : "icon-zoom-in", + // actions : ["zoom"] + // }, + "tool-light" : { + title : "亮度", + desp : "Highlight the labels", + icon_font : "icon-lightbulb", + actions : ["lightbulb"] + } + } +}; + +function getPointToDraw(position,container,canvasOffset){ + var containerOffset = { + x: container.parent().attr("x"), + y: container.parent().attr("y") + } + var point = container.parent().circle().radius(appConfig.featurePointSize).attr({ cx: position.x - canvasOffset.x - containerOffset.x, cy: position.y - canvasOffset.y - containerOffset.y}).addClass('labelpoint'); + point.draggable(); + return point; +} +var imgSelected = ""; +var selectedElements = []; +var copiedElements; +var selectedTool = null, selectedElement = null; +var alreadyDrawing = false; + +var plugins = { + // "facepp" : { + // title: "Face Plus Plus", + // tagName: 'facepp' + // }, + "setPoint" : { + title: "点半径设置", + tagName: "setPoint" + }, + "logout" : { + title: "登出", + tagName: "logout" + } +} +var pluginsStore = { + // "facepp" : { + // }, + "beenest": { + baseURL: "https://api.todview.com/v1/", + host: "http://bee-valley.todview.com" + }, +} + +var suggestedCategories = ["dog", "cat", "car", "vehicle", "truck", "animal", "building", "person"]; +var suggestedTags = []; +var suggestedAttributes = { + "gender" : ["male", "female", "other"], + "color" : ["red", "green", "blue", "orange", "yellow", "white", "black"], +}; diff --git a/js/contributors.js b/app/js/contributors.js similarity index 100% rename from js/contributors.js rename to app/js/contributors.js diff --git a/js/dataloader.js b/app/js/dataloader.js similarity index 100% rename from js/dataloader.js rename to app/js/dataloader.js diff --git a/js/dlib.js b/app/js/dlib.js similarity index 100% rename from js/dlib.js rename to app/js/dlib.js diff --git a/js/dlibDataHandler.js b/app/js/dlibDataHandler.js similarity index 100% rename from js/dlibDataHandler.js rename to app/js/dlibDataHandler.js diff --git a/js/fileOperation.js b/app/js/fileOperation.js similarity index 100% rename from js/fileOperation.js rename to app/js/fileOperation.js diff --git a/js/labelFileLoader.js b/app/js/labelFileLoader.js similarity index 100% rename from js/labelFileLoader.js rename to app/js/labelFileLoader.js diff --git a/js/labels.js b/app/js/labels.js similarity index 100% rename from js/labels.js rename to app/js/labels.js diff --git a/js/nimnObjStructure.js b/app/js/nimnObjStructure.js similarity index 100% rename from js/nimnObjStructure.js rename to app/js/nimnObjStructure.js diff --git a/js/openfile.js b/app/js/openfile.js similarity index 100% rename from js/openfile.js rename to app/js/openfile.js diff --git a/js/prompt.js b/app/js/prompt.js similarity index 64% rename from js/prompt.js rename to app/js/prompt.js index f57c4f0..05a03a6 100644 --- a/js/prompt.js +++ b/app/js/prompt.js @@ -1,25 +1,25 @@ -$(function(){ - $.confirm({ - title: '', - content: '
' - + '

Imglab is an open source free to use application.

' - + '

Please consider small donation for support.

' - + '

Give us a star on GitHub or showcase your project as a motivation.

', - escapeKey: true, - backgroundDismiss: true, - buttons: { - confirm: { - text: "Donate", - action : function () { - displayDonationPrompt(); - } - }, - leave : { - text: "Umm! may be next time." - } - } - }); -}); +// $(function(){ +// $.confirm({ +// title: '', +// content: '
' +// + '

Imglab is an open source free to use application.

' +// + '

Please consider small donation for support.

' +// + '

Give us a star on GitHub or showcase your project as a motivation.

', +// escapeKey: true, +// backgroundDismiss: true, +// buttons: { +// confirm: { +// text: "Donate", +// action : function () { +// displayDonationPrompt(); +// } +// }, +// leave : { +// text: "Umm! may be next time." +// } +// } +// }); +// }); function displayDonationPrompt(){ $.dialog({ diff --git a/js/savefile.js b/app/js/savefile.js similarity index 100% rename from js/savefile.js rename to app/js/savefile.js diff --git a/js/settings.js b/app/js/settings.js similarity index 96% rename from js/settings.js rename to app/js/settings.js index b3c4106..859dd26 100644 --- a/js/settings.js +++ b/app/js/settings.js @@ -4,7 +4,7 @@ var appConfig = { enable : true, deleteIfExported: true, //Mark the data as saved when exported as nimn format, and delte the copy from browser cache. }, - featurePointSize: 3, + featurePointSize: 10, zoomStepSize: 0.1 }; function displaySettingsModal(){ diff --git a/js/slider.js b/app/js/slider.js similarity index 100% rename from js/slider.js rename to app/js/slider.js diff --git a/js/store.js b/app/js/store.js similarity index 70% rename from js/store.js rename to app/js/store.js index e4da682..98b2991 100644 --- a/js/store.js +++ b/app/js/store.js @@ -63,38 +63,48 @@ function updateShapeDetailInStore(shapeId, bbox, points){ bbox && (shapes[index].bbox = bbox); points && (shapes[index].points = points); } -function attachShapeToImg(id, type, bbox, points){ - labellingData[ imgSelected.name ].shapes.push( { +function attachShapeToImg(id, type, bbox, points, img, editable = true, featurePoints = []){ + var targetImg = img ? img : imgSelected; + labellingData[ targetImg.name ].shapes.push( { "id" : id, "label" : "unlabelled", "type" : type, "points": points, + "editable" :editable, "bbox" : bbox || { - "x": 0, - "y": 0, - "w": 0, - "h": 0 }, + "x": 0, + "y": 0, + "w": 0, + "h": 0 }, "attributes": [], "tags": [], - "featurePoints": [], + "featurePoints": featurePoints, "zoomScale" : 1, - "defaultZoomScale": 1/imgSelected.size.imageScale//this scale is in relation with the image scale + "defaultZoomScale": 1/targetImg.size.imageScale//this scale is in relation with the image scale } ); } -function addImgToStore(imgname, size) { +function addImgToStore(imageDataObject) { //If we already have this image data in localstorage, //don't initialize its properties + var imgname = imageDataObject.name; if(!labellingData[imgname]){ - labellingData[imgname] = { + labellingData[imgname] = Object.assign({ //"path" : "", "imagename": imgname, "attributes": [], "tags": [], - "size" : { - "width": size.width, - "height": size.height - }, + // "size" : { + // "width": size.width, + // "height": size.height + // }, + // "imageSrc": imageSrc, "shapes": [] + }, imageDataObject); + if (imageDataObject.preloadedShapes) { + for (var shapeIndex in imageDataObject.preloadedShapes) { + var shape = imageDataObject.preloadedShapes[shapeIndex]; + attachShapeToImg(shape.id, shape.type, null, shape.points, labellingData[imgname], shape.editable, shape.featurePoints); + } } } } diff --git a/app/js/storePersistor.js b/app/js/storePersistor.js new file mode 100644 index 0000000..e3b8aa0 --- /dev/null +++ b/app/js/storePersistor.js @@ -0,0 +1,51 @@ +//Maintains synchrony between the store and the browser local storage + +/* + * If there is work saved in local storage, it will retrieve it. + * Otherwise, it'll return an empty json {} + */ +function confirmUserToLoadBrowserCache(){ + // var localStorageData = localStorage.getItem("labellingData"); + // if(localStorageData){ + // try{ + // var localStorageData = JSON.parse(localStorageData); + // if(Object.keys(localStorageData).length > 0){ + // $.confirm({ + // title: "Recovery", + // content : 'You\'ve prioously saved data. Would you like to restore that?', + // buttons : { + // confirm: { + // text : 'Yes', + // action: function () { + // labellingData = localStorageData; + // } + // }, + // cancel: { + // text : 'No', + // action: function () { + // //no action + // } + // } + // } + // }) + // } + // }catch(e){ + // } + // } + // var beenestApiToken = localStorage.getItem("beenest_api_token"); + // if(beenestApiToken){ + // pluginsStore.beenest.token = beenestApiToken; + // } +} + +function clearCache(){ + localStorage.clear(); +} + +//Every 5 seconds, save the current data in localStorage +var synchToBrowser = function() { + // localStorage.setItem("labellingData", JSON.stringify(labellingData)); +}; +window.setInterval( synchToBrowser , appConfig.autosave.syncingInterval); + +setTimeout(confirmUserToLoadBrowserCache,1000); \ No newline at end of file diff --git a/js/thirdparty/Blob.js b/app/js/thirdparty/Blob.js similarity index 100% rename from js/thirdparty/Blob.js rename to app/js/thirdparty/Blob.js diff --git a/js/thirdparty/FileSaver.min.js b/app/js/thirdparty/FileSaver.min.js similarity index 100% rename from js/thirdparty/FileSaver.min.js rename to app/js/thirdparty/FileSaver.min.js diff --git a/app/js/thirdparty/axios.min.js b/app/js/thirdparty/axios.min.js new file mode 100644 index 0000000..69cc188 --- /dev/null +++ b/app/js/thirdparty/axios.min.js @@ -0,0 +1,9 @@ +/* axios v0.18.0 | (c) 2018 by Matt Zabriskie */ +!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.axios=t():e.axios=t()}(this,function(){return function(e){function t(r){if(n[r])return n[r].exports;var o=n[r]={exports:{},id:r,loaded:!1};return e[r].call(o.exports,o,o.exports,t),o.loaded=!0,o.exports}var n={};return t.m=e,t.c=n,t.p="",t(0)}([function(e,t,n){e.exports=n(1)},function(e,t,n){"use strict";function r(e){var t=new s(e),n=i(s.prototype.request,t);return o.extend(n,s.prototype,t),o.extend(n,t),n}var o=n(2),i=n(3),s=n(5),u=n(6),a=r(u);a.Axios=s,a.create=function(e){return r(o.merge(u,e))},a.Cancel=n(23),a.CancelToken=n(24),a.isCancel=n(20),a.all=function(e){return Promise.all(e)},a.spread=n(25),e.exports=a,e.exports.default=a},function(e,t,n){"use strict";function r(e){return"[object Array]"===R.call(e)}function o(e){return"[object ArrayBuffer]"===R.call(e)}function i(e){return"undefined"!=typeof FormData&&e instanceof FormData}function s(e){var t;return t="undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&e.buffer instanceof ArrayBuffer}function u(e){return"string"==typeof e}function a(e){return"number"==typeof e}function c(e){return"undefined"==typeof e}function f(e){return null!==e&&"object"==typeof e}function p(e){return"[object Date]"===R.call(e)}function d(e){return"[object File]"===R.call(e)}function l(e){return"[object Blob]"===R.call(e)}function h(e){return"[object Function]"===R.call(e)}function m(e){return f(e)&&h(e.pipe)}function y(e){return"undefined"!=typeof URLSearchParams&&e instanceof URLSearchParams}function w(e){return e.replace(/^\s*/,"").replace(/\s*$/,"")}function g(){return("undefined"==typeof navigator||"ReactNative"!==navigator.product)&&("undefined"!=typeof window&&"undefined"!=typeof document)}function v(e,t){if(null!==e&&"undefined"!=typeof e)if("object"!=typeof e&&(e=[e]),r(e))for(var n=0,o=e.length;n + * @license MIT + */ +e.exports=function(e){return null!=e&&(n(e)||r(e)||!!e._isBuffer)}},function(e,t,n){"use strict";function r(e){this.defaults=e,this.interceptors={request:new s,response:new s}}var o=n(6),i=n(2),s=n(17),u=n(18);r.prototype.request=function(e){"string"==typeof e&&(e=i.merge({url:arguments[0]},arguments[1])),e=i.merge(o,{method:"get"},this.defaults,e),e.method=e.method.toLowerCase();var t=[u,void 0],n=Promise.resolve(e);for(this.interceptors.request.forEach(function(e){t.unshift(e.fulfilled,e.rejected)}),this.interceptors.response.forEach(function(e){t.push(e.fulfilled,e.rejected)});t.length;)n=n.then(t.shift(),t.shift());return n},i.forEach(["delete","get","head","options"],function(e){r.prototype[e]=function(t,n){return this.request(i.merge(n||{},{method:e,url:t}))}}),i.forEach(["post","put","patch"],function(e){r.prototype[e]=function(t,n,r){return this.request(i.merge(r||{},{method:e,url:t,data:n}))}}),e.exports=r},function(e,t,n){"use strict";function r(e,t){!i.isUndefined(e)&&i.isUndefined(e["Content-Type"])&&(e["Content-Type"]=t)}function o(){var e;return"undefined"!=typeof XMLHttpRequest?e=n(8):"undefined"!=typeof process&&(e=n(8)),e}var i=n(2),s=n(7),u={"Content-Type":"application/x-www-form-urlencoded"},a={adapter:o(),transformRequest:[function(e,t){return s(t,"Content-Type"),i.isFormData(e)||i.isArrayBuffer(e)||i.isBuffer(e)||i.isStream(e)||i.isFile(e)||i.isBlob(e)?e:i.isArrayBufferView(e)?e.buffer:i.isURLSearchParams(e)?(r(t,"application/x-www-form-urlencoded;charset=utf-8"),e.toString()):i.isObject(e)?(r(t,"application/json;charset=utf-8"),JSON.stringify(e)):e}],transformResponse:[function(e){if("string"==typeof e)try{e=JSON.parse(e)}catch(e){}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,validateStatus:function(e){return e>=200&&e<300}};a.headers={common:{Accept:"application/json, text/plain, */*"}},i.forEach(["delete","get","head"],function(e){a.headers[e]={}}),i.forEach(["post","put","patch"],function(e){a.headers[e]=i.merge(u)}),e.exports=a},function(e,t,n){"use strict";var r=n(2);e.exports=function(e,t){r.forEach(e,function(n,r){r!==t&&r.toUpperCase()===t.toUpperCase()&&(e[t]=n,delete e[r])})}},function(e,t,n){"use strict";var r=n(2),o=n(9),i=n(12),s=n(13),u=n(14),a=n(10),c="undefined"!=typeof window&&window.btoa&&window.btoa.bind(window)||n(15);e.exports=function(e){return new Promise(function(t,f){var p=e.data,d=e.headers;r.isFormData(p)&&delete d["Content-Type"];var l=new XMLHttpRequest,h="onreadystatechange",m=!1;if("undefined"==typeof window||!window.XDomainRequest||"withCredentials"in l||u(e.url)||(l=new window.XDomainRequest,h="onload",m=!0,l.onprogress=function(){},l.ontimeout=function(){}),e.auth){var y=e.auth.username||"",w=e.auth.password||"";d.Authorization="Basic "+c(y+":"+w)}if(l.open(e.method.toUpperCase(),i(e.url,e.params,e.paramsSerializer),!0),l.timeout=e.timeout,l[h]=function(){if(l&&(4===l.readyState||m)&&(0!==l.status||l.responseURL&&0===l.responseURL.indexOf("file:"))){var n="getAllResponseHeaders"in l?s(l.getAllResponseHeaders()):null,r=e.responseType&&"text"!==e.responseType?l.response:l.responseText,i={data:r,status:1223===l.status?204:l.status,statusText:1223===l.status?"No Content":l.statusText,headers:n,config:e,request:l};o(t,f,i),l=null}},l.onerror=function(){f(a("Network Error",e,null,l)),l=null},l.ontimeout=function(){f(a("timeout of "+e.timeout+"ms exceeded",e,"ECONNABORTED",l)),l=null},r.isStandardBrowserEnv()){var g=n(16),v=(e.withCredentials||u(e.url))&&e.xsrfCookieName?g.read(e.xsrfCookieName):void 0;v&&(d[e.xsrfHeaderName]=v)}if("setRequestHeader"in l&&r.forEach(d,function(e,t){"undefined"==typeof p&&"content-type"===t.toLowerCase()?delete d[t]:l.setRequestHeader(t,e)}),e.withCredentials&&(l.withCredentials=!0),e.responseType)try{l.responseType=e.responseType}catch(t){if("json"!==e.responseType)throw t}"function"==typeof e.onDownloadProgress&&l.addEventListener("progress",e.onDownloadProgress),"function"==typeof e.onUploadProgress&&l.upload&&l.upload.addEventListener("progress",e.onUploadProgress),e.cancelToken&&e.cancelToken.promise.then(function(e){l&&(l.abort(),f(e),l=null)}),void 0===p&&(p=null),l.send(p)})}},function(e,t,n){"use strict";var r=n(10);e.exports=function(e,t,n){var o=n.config.validateStatus;n.status&&o&&!o(n.status)?t(r("Request failed with status code "+n.status,n.config,null,n.request,n)):e(n)}},function(e,t,n){"use strict";var r=n(11);e.exports=function(e,t,n,o,i){var s=new Error(e);return r(s,t,n,o,i)}},function(e,t){"use strict";e.exports=function(e,t,n,r,o){return e.config=t,n&&(e.code=n),e.request=r,e.response=o,e}},function(e,t,n){"use strict";function r(e){return encodeURIComponent(e).replace(/%40/gi,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}var o=n(2);e.exports=function(e,t,n){if(!t)return e;var i;if(n)i=n(t);else if(o.isURLSearchParams(t))i=t.toString();else{var s=[];o.forEach(t,function(e,t){null!==e&&"undefined"!=typeof e&&(o.isArray(e)?t+="[]":e=[e],o.forEach(e,function(e){o.isDate(e)?e=e.toISOString():o.isObject(e)&&(e=JSON.stringify(e)),s.push(r(t)+"="+r(e))}))}),i=s.join("&")}return i&&(e+=(e.indexOf("?")===-1?"?":"&")+i),e}},function(e,t,n){"use strict";var r=n(2),o=["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"];e.exports=function(e){var t,n,i,s={};return e?(r.forEach(e.split("\n"),function(e){if(i=e.indexOf(":"),t=r.trim(e.substr(0,i)).toLowerCase(),n=r.trim(e.substr(i+1)),t){if(s[t]&&o.indexOf(t)>=0)return;"set-cookie"===t?s[t]=(s[t]?s[t]:[]).concat([n]):s[t]=s[t]?s[t]+", "+n:n}}),s):s}},function(e,t,n){"use strict";var r=n(2);e.exports=r.isStandardBrowserEnv()?function(){function e(e){var t=e;return n&&(o.setAttribute("href",t),t=o.href),o.setAttribute("href",t),{href:o.href,protocol:o.protocol?o.protocol.replace(/:$/,""):"",host:o.host,search:o.search?o.search.replace(/^\?/,""):"",hash:o.hash?o.hash.replace(/^#/,""):"",hostname:o.hostname,port:o.port,pathname:"/"===o.pathname.charAt(0)?o.pathname:"/"+o.pathname}}var t,n=/(msie|trident)/i.test(navigator.userAgent),o=document.createElement("a");return t=e(window.location.href),function(n){var o=r.isString(n)?e(n):n;return o.protocol===t.protocol&&o.host===t.host}}():function(){return function(){return!0}}()},function(e,t){"use strict";function n(){this.message="String contains an invalid character"}function r(e){for(var t,r,i=String(e),s="",u=0,a=o;i.charAt(0|u)||(a="=",u%1);s+=a.charAt(63&t>>8-u%1*8)){if(r=i.charCodeAt(u+=.75),r>255)throw new n;t=t<<8|r}return s}var o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";n.prototype=new Error,n.prototype.code=5,n.prototype.name="InvalidCharacterError",e.exports=r},function(e,t,n){"use strict";var r=n(2);e.exports=r.isStandardBrowserEnv()?function(){return{write:function(e,t,n,o,i,s){var u=[];u.push(e+"="+encodeURIComponent(t)),r.isNumber(n)&&u.push("expires="+new Date(n).toGMTString()),r.isString(o)&&u.push("path="+o),r.isString(i)&&u.push("domain="+i),s===!0&&u.push("secure"),document.cookie=u.join("; ")},read:function(e){var t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove:function(e){this.write(e,"",Date.now()-864e5)}}}():function(){return{write:function(){},read:function(){return null},remove:function(){}}}()},function(e,t,n){"use strict";function r(){this.handlers=[]}var o=n(2);r.prototype.use=function(e,t){return this.handlers.push({fulfilled:e,rejected:t}),this.handlers.length-1},r.prototype.eject=function(e){this.handlers[e]&&(this.handlers[e]=null)},r.prototype.forEach=function(e){o.forEach(this.handlers,function(t){null!==t&&e(t)})},e.exports=r},function(e,t,n){"use strict";function r(e){e.cancelToken&&e.cancelToken.throwIfRequested()}var o=n(2),i=n(19),s=n(20),u=n(6),a=n(21),c=n(22);e.exports=function(e){r(e),e.baseURL&&!a(e.url)&&(e.url=c(e.baseURL,e.url)),e.headers=e.headers||{},e.data=i(e.data,e.headers,e.transformRequest),e.headers=o.merge(e.headers.common||{},e.headers[e.method]||{},e.headers||{}),o.forEach(["delete","get","head","post","put","patch","common"],function(t){delete e.headers[t]});var t=e.adapter||u.adapter;return t(e).then(function(t){return r(e),t.data=i(t.data,t.headers,e.transformResponse),t},function(t){return s(t)||(r(e),t&&t.response&&(t.response.data=i(t.response.data,t.response.headers,e.transformResponse))),Promise.reject(t)})}},function(e,t,n){"use strict";var r=n(2);e.exports=function(e,t,n){return r.forEach(n,function(n){e=n(e,t)}),e}},function(e,t){"use strict";e.exports=function(e){return!(!e||!e.__CANCEL__)}},function(e,t){"use strict";e.exports=function(e){return/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(e)}},function(e,t){"use strict";e.exports=function(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}},function(e,t){"use strict";function n(e){this.message=e}n.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},n.prototype.__CANCEL__=!0,e.exports=n},function(e,t,n){"use strict";function r(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");var t;this.promise=new Promise(function(e){t=e});var n=this;e(function(e){n.reason||(n.reason=new o(e),t(n.reason))})}var o=n(23);r.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},r.source=function(){var e,t=new r(function(t){e=t});return{token:t,cancel:e}},e.exports=r},function(e,t){"use strict";e.exports=function(e){return function(t){return e.apply(null,t)}}}])}); +//# sourceMappingURL=axios.min.map \ No newline at end of file diff --git a/js/thirdparty/bootstrap-switch.min.js b/app/js/thirdparty/bootstrap-switch.min.js similarity index 100% rename from js/thirdparty/bootstrap-switch.min.js rename to app/js/thirdparty/bootstrap-switch.min.js diff --git a/js/thirdparty/bootstrap.min.js b/app/js/thirdparty/bootstrap.min.js similarity index 100% rename from js/thirdparty/bootstrap.min.js rename to app/js/thirdparty/bootstrap.min.js diff --git a/js/thirdparty/fxp.js b/app/js/thirdparty/fxp.js similarity index 100% rename from js/thirdparty/fxp.js rename to app/js/thirdparty/fxp.js diff --git a/js/thirdparty/jquery-confirm.min.js b/app/js/thirdparty/jquery-confirm.min.js similarity index 100% rename from js/thirdparty/jquery-confirm.min.js rename to app/js/thirdparty/jquery-confirm.min.js diff --git a/js/thirdparty/jquery-editable-select.min.js b/app/js/thirdparty/jquery-editable-select.min.js similarity index 100% rename from js/thirdparty/jquery-editable-select.min.js rename to app/js/thirdparty/jquery-editable-select.min.js diff --git a/js/thirdparty/jquery-ui.min.js b/app/js/thirdparty/jquery-ui.min.js similarity index 100% rename from js/thirdparty/jquery-ui.min.js rename to app/js/thirdparty/jquery-ui.min.js diff --git a/js/thirdparty/jquery.min.js b/app/js/thirdparty/jquery.min.js similarity index 100% rename from js/thirdparty/jquery.min.js rename to app/js/thirdparty/jquery.min.js diff --git a/js/thirdparty/jsplumb.min.js b/app/js/thirdparty/jsplumb.min.js similarity index 100% rename from js/thirdparty/jsplumb.min.js rename to app/js/thirdparty/jsplumb.min.js diff --git a/js/thirdparty/nimn.js b/app/js/thirdparty/nimn.js similarity index 100% rename from js/thirdparty/nimn.js rename to app/js/thirdparty/nimn.js diff --git a/app/js/thirdparty/riot+compiler.min.js b/app/js/thirdparty/riot+compiler.min.js new file mode 100644 index 0000000..6222ce4 --- /dev/null +++ b/app/js/thirdparty/riot+compiler.min.js @@ -0,0 +1,2 @@ +/* Riot v3.12.0, @license MIT */ +var e,t;e=this,t=function(){"use strict";function s(e,t){return(t||document).querySelector(e)}var t,r,x=[],_={},a="yield",y="__global_mixin",A="riot-",u=["ref","data-ref"],p="data-is",f="if",d="each",n="no-reorder",O="show",N="hide",i="key",b="__riot-events__",c="string",F="object",o="undefined",l="function",h="http://www.w3.org/1999/xlink",m="http://www.w3.org/2000/svg",g=/^xlink:(\w+)/,v=typeof window===o?void 0:window,w=/^on/,E=/([-\w]+) ?= ?(?:"([^"]*)|'([^']*)|({[^}]*}))/g,C={viewbox:"viewBox",preserveaspectratio:"preserveAspectRatio"},j=/^(?:disabled|checked|readonly|required|allowfullscreen|auto(?:focus|play)|compact|controls|default|formnovalidate|hidden|ismap|itemscope|loop|multiple|muted|no(?:resize|shade|validate|wrap)?|open|reversed|seamless|selected|sortable|truespeed|typemustmatch)$/,S=0|(v&&v.document||{}).documentMode;function k(e){return"svg"===e?document.createElementNS(m,e):document.createElement(e)}function T(e,t,r){var n=g.exec(t);n&&n[1]?e.setAttributeNS(h,n[1],r):e.setAttribute(t,r)}var e,L,I={},R=!1;v&&(e=k("style"),L=s("style[type=riot]"),T(e,"type","text/css"),L?(L.id&&(e.id=L.id),L.parentNode.replaceChild(e,L)):document.head.appendChild(e),r=(t=e).styleSheet);var M={styleNode:t,add:function(e,t){I[t]=e,R=!0},inject:function(){if(v&&R){R=!1;var e=Object.keys(I).map(function(e){return I[e]}).join("\n");r?r.cssText=e:t.innerHTML=e}},remove:function(e){delete I[e],R=!0}},P=function(){var u=["case","default","do","else","in","instanceof","prefix","return","typeof","void","yield"],c=u.reduce(function(e,t){return e+t.slice(-1)},""),l=/^\/(?=[^*>/])[^[/\\]*(?:(?:\\.|\[(?:\\.|[^\]\\]*)*\])[^[\\/]*)*?\/[gimuy]*/,p=/[$\w]/;function f(e,t){for(;0<=--t&&/\s/.test(e[t]););return t}return function(e,t){var r=/.*/g,n=r.lastIndex=t++,i=r.exec(e)[0].match(l);if(i){var o=n+i[0].length,s=e[n=f(e,n)];if(n<0||~"[{(,;:?=|&!^~>%*/".indexOf(s))return o;if("."===s)"."===e[n-1]&&(t=o);else if("+"===s||"-"===s)(e[--n]!==s||(n=f(e,n))<0||!p.test(e[n]))&&(t=o);else if(~c.indexOf(s)){for(var a=n+1;0<=--n&&p.test(e[n]););~u.indexOf(e.slice(n+1,a))&&(t=o)}}return t}}(),$=function(e){var t,r,n="g",i=/"[^"\\]*(?:\\[\S\s][^"\\]*)*"|'[^'\\]*(?:\\[\S\s][^'\\]*)*'|`[^`\\]*(?:\\[\S\s][^`\\]*)*`/g,o=i.source+"|"+/(?:\breturn\s+|(?:[$\w\)\]]|\+\+|--)\s*(\/)(?![*\/]))/.source+"|"+/\/(?=[^*\/])[^[\/\\]*(?:(?:\[(?:\\.|[^\]\\]*)*\]|\\.)[^[\/\\]*)*?([^<]\/)[gim]*/.source,s=RegExp("[\\x00-\\x1F<>a-zA-Z0-9'\",;\\\\]"),a=/(?=[[\]()*+?.^$|])/g,u=i.source+"|"+/(\/)(?![*\/])/.source,x={"(":RegExp("([()])|"+u,n),"[":RegExp("([[\\]])|"+u,n),"{":RegExp("([{}])|"+u,n)},c="{ }",l=["{","}","{","}",/{[^}]*}/,/\\([{}])/g,/\\({)|{/g,RegExp("\\\\(})|([[({])|(})|"+u,n),c,/^\s*{\^?\s*([$\w]+)(?:\s*,\s*(\S+))?\s+in\s+(\S.*)\s*}/,/(^|[^\\]){=[\S\s]*?}/],p=void 0,y=[];function f(e){return e}function d(e,t){return t||(t=y),new RegExp(e.source.replace(/{/g,t[2]).replace(/}/g,t[3]),e.global?n:"")}function h(e){if(e===c)return l;var t=e.split(" ");if(2!==t.length||s.test(e))throw new Error('Unsupported brackets "'+e+'"');return(t=t.concat(e.replace(a,"\\").split(" ")))[4]=d(1 %s",e.riotData.tagName||"Unknown tag",this.tmpl),console.log(this.data))}.bind({data:t,tmpl:e})):e}n.hasExpr=$.hasExpr,n.loopKeys=$.loopKeys,n.clearCache=function(){r={}},n.errorHandler=null;var a=/\u2057/g,u=/\u2057(\d+)~/g;var l=/^(?:(-?[_A-Za-z\xA0-\xFF][-\w\xA0-\xFF]*)|\u2057(\d+)~):/,p={"(":/[()]/g,"[":/[[\]]/g,"{":/[{}]/g};function c(o,e,t){if(o=o.replace(/\s+/g," ").trim().replace(/\ ?([[\({},?\.:])\ ?/g,"$1")){for(var r,n=[],i=0;o&&(r=o.match(l))&&!r.index;){var s,a,u=/,|([[{(])|$/g;for(o=RegExp.rightContext,s=r[2]?t[r[2]].slice(1,-1).trim().replace(/\s+/g," "):r[1];a=(r=u.exec(o))[1];)c(a,u);a=o.slice(0,r.index),o=RegExp.rightContext,n[i++]=d(a,1,s)}o=i?1'+t+"","application/xml").documentElement,!0);e.appendChild(n)}else e.innerHTML=t}function Y(e,t){if(e)for(var r;r=E.exec(e);)t(r[1].toLowerCase(),r[2]||r[3]||r[4])}function ee(){return document.createDocumentFragment()}function te(e,t,r){e.insertBefore(t,r.parentNode&&r)}function re(r){return Object.keys(r).reduce(function(e,t){return e+" "+t+": "+r[t]+";"},"")}function ne(e,t,r){if(e){var n,i=t(e,r);if(!1===i)return;for(e=e.firstChild;e;)n=e.nextSibling,ne(e,t,i),e=n}}var ie=Object.freeze({$$:G,$:s,createDOMPlaceholder:K,mkEl:k,setAttr:T,toggleVisibility:W,getAttr:J,remAttr:Q,setInnerHTML:X,walkAttrs:Y,createFrag:ee,safeInsert:te,styleObjectToString:re,walkNodes:ne});function oe(e){return V(e)||null===e}function se(e){return oe(e)||""===e}function ae(e){return typeof e===l}function ue(e){return e&&typeof e===F}function ce(e){var t=e.ownerSVGElement;return!!t||null===t}function le(e){return Array.isArray(e)||e instanceof Array}function pe(e){return j.test(e)}function fe(e){return typeof e===c}var de=Object.freeze({isBlank:se,isFunction:ae,isObject:ue,isSvg:ce,isWritable:B,isArray:le,isBoolAttr:pe,isNil:oe,isString:fe,isUndefined:V});function he(e,t){return-1!==e.indexOf(t)}function me(e,t){for(var r=e?e.length:0,n=0;n|>([\S\s]*?)<\/yield\s*>|>)/gi,Se=/]*)['"]\s*>([\S\s]*?)<\/yield\s*>/gi,ke=/|>([\S\s]*?)<\/yield\s*>)/gi,Te={tr:"tbody",th:"tr",td:"tr",col:"colgroup"},Le=S&&S<10?/^(?:t(?:body|head|foot|[rhd])|caption|col(?:group)?|opt(?:ion|group))$/:/^(?:t(?:body|head|foot|[rhd])|caption|col(?:group)?)$/,Ie="div",Re="svg";function Me(e,t,r){var n=e&&e.match(/^\s*<([-\w]+)/),i=n&&n[1].toLowerCase(),o=k(r?Re:Ie);return e=function(e,r){if(!Ce.test(e))return e;var n={};return r=r&&r.replace(Se,function(e,t,r){return n[t]=n[t]||r,""}).trim(),e.replace(ke,function(e,t,r){return n[t]||r||""}).replace(je,function(e,t){return r||t||""})}(e,t),Le.test(i)?o=function(e,t,r){var n="o"===r[0],i=n?"select>":"table>";if(e.innerHTML="<"+i+t.trim()+"=$.length,m=c&&p||!c&&!d||!I[r];m?((d=vt(k,{parent:O,isLoop:!0,isAnonymous:M,tagName:S,root:A.cloneNode(M),item:n,index:r},R)).mount(),h?function(e,t){t?Ue.call(this,e):e.appendChild(this.root)}.apply(d,[v||y,P]):function(e,t,r){r?Ue.apply(this,[e,t]):te(e,this.root,t.root)}.apply(d,[y,I[r],P]),h||$.splice(r,0,n),I.splice(r,0,d),T&&Ae(O.tags,S,d,!0)):f!==r&&c&&((C||he(g,$[f]))&&(function(e,t,r){r?ot.apply(this,[e,t]):te(e,this.root,t.root)}.apply(d,[y,I[r],P]),I.splice(r,0,I.splice(f,1)[0]),$.splice(r,0,$.splice(f,1)[0])),N.pos&&(d[N.pos]=r),!T&&d.tags&&function(t){var r=this;me(Object.keys(this.tags),function(e){it.apply(r.tags[e],[e,t])})}.call(d,r)),q(d.__,{item:n,index:r,parent:O}),b[r]=u,m||d.update(n)}else _++}),function(e,t,r){for(var n=t.length,i=e.length-r;i)[\S\s]*?-->/.source+"|"+zt,"g"),Bt=/<(-?[A-Za-z][-\w\xA0-\xFF]*)(?:\s+([^"'/>]*(?:(?:"[^"]*"|'[^']*'|\/[^>])[^'"/>]*)*)|\s*)(\/?)>/g,qt=/>[ \t]+<(-?[A-Za-z]|\/[-A-Za-z])/g,Dt=["style","src","d","value"],Zt=/^(?:input|img|br|wbr|hr|area|base|col|embed|keygen|link|meta|param|source|track)$/,Gt=/]*|"[^"]*")*)?>([\S\s]+?)<\/pre\s*>/gi,Kt=/^"(?:number|date(?:time)?|time|month|email|color)\b/i,Wt=/^\s*import(?!\w)(?:(?:\s|[^\s'"])*)['|"].*\n?/gm,Jt=/[ \t]+$/gm,Qt=Lt(/@#\d/,"x01"),Xt=Lt(/@#(\d+)/g,"x01"),Yt="#",er="⁗",tr='"',rr="'";function nr(e){var t,r=Vt;for(1!==e.indexOf("\r")&&(e=e.replace(/\r\n?/g,"\n")),r.lastIndex=0;t=r.exec(e);)"<"===t[0][0]&&(e=RegExp.leftContext+RegExp.rightContext,r.lastIndex=t[3]+1);return e}function ir(e,t){var r,n,i,o=[];for(Ut.lastIndex=0,e=e.replace(/\s+/g," ");r=Ut.exec(e);){var s=r[1].toLowerCase(),a=r[2];a?(a[0]!==tr&&(a=tr+(a[0]===rr?a.slice(1,-1):a)+tr),"type"===s&&Kt.test(a)?n=a:(Qt.test(a)&&("value"===s&&(i=1),-1!==Dt.indexOf(s)&&(s="riot-"+s)),o.push(s+"="+a))):o.push(s)}return n&&(i&&(n=tr+t._bp[0]+rr+n.slice(1,-1)+rr+t._bp[1]+tr),o.push("type="+n)),o.join(" ")}function or(e,t,r){var n=r._bp;if(e&&n[4].test(e)){for(var i,o=t.expr&&(t.parser||t.type)?lr:0,s=$.split(e,0,n),a=1;a"}),!t.whitespace){var r=[];/]/.test(e)&&(e=e.replace(Gt,function(e){return r.push(e),""})),e=e.trim().replace(/\s+/g," "),r.length&&(e=e.replace(/\u0002/g,function(){return r.shift()}))}return t.compact&&(e=e.replace(qt,"><$1")),sr(e,i).replace(Jt,"")}var ur=/^[ \t]*(((?:async|\*)\s*)?([$_A-Za-z][$\w]*))\s*\([^()]*\)\s*{/m;function cr(e){var t,r,n,i,o,s,a=[],u=RegExp,c=function(e,t){for(var r,n,i,o,s,a,u=new RegExp(Mt,"g"),c=$.skipRegex,l=0|t,p=[[]],f=[],d=u,h=d.lastIndex=l;a=d.exec(e);){if(o=a.index,s=d.lastIndex,n="",i=a[1]){if("{"===i)f.push("}");else if("}"===i){if(f.pop()!==i)throw new Error("Unexpected '}'");"`"===f[f.length-1]&&(i=f.pop())}else"/"===i&&o+1<(s=c(e,o))&&(n=e.slice(o,s));"`"===i&&(s=$t(e,s,f),n=e.slice(o,s),d=f.length?r||(r=new RegExp(Pt,"g")):u)}else"/"===(n=a[0])[0]?(n="*"===n[1]?" ":"",e=e.slice(l,o)+n+e.slice(s),s=o+n.length,n=""):2===n.length&&(n="");n&&(p[0].push(e.slice(h,o)),p.push(n),h=s),d.lastIndex=s}return p[0].push(e.slice(h)),p}(e);for(e=c.shift().join("<%>");t=e.match(ur);)a.push(u.leftContext),n=l(e=u.rightContext),i=t[1],o=t[2]||"",s=t[3],s=(r=!/^(?:if|while|for|switch|catch|function)$/.test(s))?t[0].replace(i,"this."+s+" ="+o+" function"):t[0],a.push(s,e.slice(0,n)),e=e.slice(n),r&&!/^\s*.\s*bind\b/.test(e)&&a.push(".bind(this)");return a.length&&(e=a.join("")+e),c.length&&(e=e.replace(/<%>/g,function(){return c.shift()})),e;function l(e){for(var t=/[{}]/g,r=1;r&&t.exec(e);)"{"===e[t.lastIndex-1]?++r:--r;return r?e.length:t.lastIndex}}function lr(e,t,r,n,i){return/\S/.test(e)?(r||(r=t.type),(t.parser||r&&It._req("js."+r,!0)||cr)(e,n,i).replace(/\r\n?/g,"\n").replace(Jt,"")):""}var pr=RegExp("([{}]|^)[; ]*((?:[^@ ;{}][^{}]*)?[^@ ;{}:] ?)(?={)|"+zt,"g");function fr(e,t,r,n){var i,o;(n=n||{},r)&&("css"!==r&&(e=It._req("css."+r,!0)(t,e,n.parserOpts||{},n.url)));return e=e.replace($.R_MLCOMMS,"").replace(/\s+/g," ").trim(),t&&(i=t,o=":scope",e=e.replace(pr,function(e,t,r){return r?(r=r.replace(/[^,]+/g,function(e){var t=e.trim();return 0===t.indexOf(i)?e:t&&"from"!==t&&"to"!==t&&"%"!==t.slice(-1)?t=t.indexOf(o)<0?i+" "+t+',[data-is="'+i+'"] '+t:t.replace(o,i)+","+t.replace(o,'[data-is="'+i+'"]'):e}),t?t+" "+r:r):e})),e}var dr=/\stype\s*=\s*(?:(['"])(.+?)\1|(\S+))/i,hr="\\s*=\\s*("+Ht+"|{[^}]+}|\\S+)",mr=/\/>\n|^<(?:\/?-?[A-Za-z][-\w\xA0-\xFF]*\s*|-?[A-Za-z][-\w\xA0-\xFF]*\s+[-\w:\xA0-\xFF][\S\s]*?)>\n/;function gr(e,t){return e?(e=rr+e.replace(/\\/g,"\\\\").replace(/'/g,"\\'")+rr,t&&-1!==e.indexOf("\n")?e.replace(/\n/g,"\\n"):e):"''"}function vr(e){if(e){var t=e.match(dr);if(t=t&&(t[2]||t[3]))return t.replace("text/","")}return""}function xr(e,t){if(e){var r=e.match(RegExp("\\s"+t+hr,"i"));if(r=r&&r[1])return/^['"]/.test(r)?r.slice(1,-1):r}return""}function yr(e){var t=xr(e,"options").replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,'"').replace(/'/g,"'");return t?JSON.parse(t):null}var br=RegExp(/^([ \t]*)<(-?[A-Za-z][-\w\xA0-\xFF]*)(?:\s+([^'"/>]+(?:(?:@|\/[^>])[^'"/>]*)*)|\s*)?(?:\/>|>[ \t]*\n?([\S\s]*)^\1<\/\2\s*>|>(.*)<\/\2\s*>)/.source.replace("@",Ht),"gim"),wr=/]*)?>\n?([\S\s]*?)<\/script\s*>/gi,_r=/]*)?>\n?([\S\s]*?)<\/style\s*>/gi;var Ar,Or,Nr={compile:function(e,b,w){var _,A=[],t=e;b||(b={}),b.parserOptions=Ft({template:{},js:{},style:{}},b.parserOptions||{}),_=b.exclude?function(e){return b.exclude.indexOf(e)<0}:function(){return 1},w||(w="");var r,n,i,o,O=$.array(b.brackets);return b.template&&(r=t,n=w,i=b.template,o=b.parserOptions.template,t=It._req("html."+i,!0)(r,o,n)),t=nr(t).replace(br,function(e,t,l,r,n,i){var o,s,a,u,c,p,f,d,h="",m="",g="",v="",x=[];if(x._bp=O,l=l.toLowerCase(),r=r&&_("attribs")?sr(ir(or(r,b,x),x),x):"",(n||(n=i))&&/\S/.test(n))if(i)_("html")&&(g=ar(i,b,x));else{var y=function(e){if(/<[-\w]/.test(e))for(var t,r=e.lastIndexOf("<"),n=e.length;-1!==r;){if(t=e.slice(r,n).match(mr))return r+=t.index+t[0].length,"<-/>\n"===(t=e.slice(0,r)).slice(-5)&&(t=t.slice(0,-5)),[t,e.slice(r)];n=r,r=e.lastIndexOf("<",r-1)}return["",e]}((n=(n=(n=n.replace(RegExp("^"+t,"gm"),"")).replace(wr,function(e,t,r){if(_("js")){var n=(i=r,o=b,a=w,u=vr(s=t),c=xr(s,"src"),l=Ft({},o.parserOptions.js),!c&&lr(i,o,u,Ft(l,yr(s)),a));n&&(h+=(h?"\n":"")+n)}var i,o,s,a,u,c,l;return""})).replace(_r,function(e,t,r){var n,i,o,s,a,u,c;return _("css")&&(m+=(m?" ":"")+(n=r,o=t,s=w,a=l,u=Ft({},(i=b).parserOptions.style),c={parserOpts:Ft(u,yr(o)),url:s},fr(n,a,vr(o)||i.style,c))),""})).replace(Jt,""));_("html")&&(g=ar(y[0],b,x)),_("js")&&((n=lr(y[1],b,null,null,w))&&(h+=(h?"\n":"")+n),h=h.replace(Wt,function(e){return v+=e.trim()+"\n",""}))}return h=/\S/.test(h)?h.replace(/\n{3,}/g,"\n\n"):"",b.entities?(A.push({tagName:l,html:g,css:m,attribs:r,js:h,imports:v}),""):(o=l,s=g,a=m,u=r,c=h,p=v,f=b.debug?",\n ":", ",d="});",c&&"\n"!==c.slice(-1)&&(d="\n"+d),p+"riot.tag2('"+o+rr+f+gr(s,1)+f+gr(a)+f+gr(u)+", function(opts) {\n"+c+d)}),b.entities?A:t},compileHTML:function(e,t,r){return Array.isArray(t)?(r=t,t={}):(r||(r=[]),t||(t={})),r._bp=$.array(t.brackets),ar(nr(e),t,r)},compileCSS:function(e,t,r){return t&&"object"==typeof t?(r=t,t=""):r||(r={}),fr(e,r.tagName,t,r)},compileJS:function(e,t,r,n){return"string"==typeof t&&(n=r,r=t,t={}),r&&"object"==typeof r&&(n=r,r=""),n||(n={}),lr(e,t||{},r,n.parserOptions,n.url)},parsers:It,version:"v3.5.1"};function Er(e,t,r){var n=new XMLHttpRequest;n.onreadystatechange=function(){4===n.readyState&&(200===n.status||!n.status&&n.responseText.length?t(n.responseText,r,e):Sr.error('"'+e+'" not found'))},n.onerror=function(e){return Sr.error(e)},n.open("GET",e,!0),n.send("")}function Cr(e,t){if(typeof e===c){var r=k("script"),n=document.documentElement;t&&(e+="\n//# sourceURL="+t+".js"),r.text=e,n.appendChild(r),n.removeChild(r)}}var jr=Nr.parsers;function Sr(e,i,t){if(typeof e===c){if(ue(i)&&(t=i,i=!1),/^\s*/])[^[/\\]*(?:(?:\\.|\[(?:\\.|[^\]\\]*)*\])[^[\\/]*)*?\/[gimuy]*/,f=/[$\w]/;function p(t,e){for(;0<=--e&&/\s/.test(t[e]););return e}return function(t,e){var n=/.*/g,r=n.lastIndex=e++,i=n.exec(t)[0].match(c);if(i){var o=r+i[0].length,a=t[r=p(t,r)];if(r<0||~"[{(,;:?=|&!^~>%*/".indexOf(a))return o;if("."===a)"."===t[r-1]&&(e=o);else if("+"===a||"-"===a)(t[--r]!==a||(r=p(t,r))<0||!f.test(t[r]))&&(e=o);else if(~l.indexOf(a)){for(var s=r+1;0<=--r&&f.test(t[r]););~u.indexOf(t.slice(r+1,s))&&(e=o)}}return e}}(),H=function(t){var e,n,r="g",i=/"[^"\\]*(?:\\[\S\s][^"\\]*)*"|'[^'\\]*(?:\\[\S\s][^'\\]*)*'|`[^`\\]*(?:\\[\S\s][^`\\]*)*`/g,o=i.source+"|"+/(?:\breturn\s+|(?:[$\w\)\]]|\+\+|--)\s*(\/)(?![*\/]))/.source+"|"+/\/(?=[^*\/])[^[\/\\]*(?:(?:\[(?:\\.|[^\]\\]*)*\]|\\.)[^[\/\\]*)*?([^<]\/)[gim]*/.source,a=RegExp("[\\x00-\\x1F<>a-zA-Z0-9'\",;\\\\]"),s=/(?=[[\]()*+?.^$|])/g,u=i.source+"|"+/(\/)(?![*\/])/.source,y={"(":RegExp("([()])|"+u,r),"[":RegExp("([[\\]])|"+u,r),"{":RegExp("([{}])|"+u,r)},l="{ }",c=["{","}","{","}",/{[^}]*}/,/\\([{}])/g,/\\({)|{/g,RegExp("\\\\(})|([[({])|(})|"+u,r),l,/^\s*{\^?\s*([$\w]+)(?:\s*,\s*(\S+))?\s+in\s+(\S.*)\s*}/,/(^|[^\\]){=[\S\s]*?}/],f=void 0,_=[];function p(t){return t}function d(t,e){return e||(e=_),new RegExp(t.source.replace(/{/g,e[2]).replace(/}/g,e[3]),t.global?r:"")}function h(t){if(t===l)return c;var e=t.split(" ");if(2!==e.length||a.test(t))throw new Error('Unsupported brackets "'+t+'"');return(e=e.concat(t.replace(s,"\\").split(" ")))[4]=d(1 %s",t.riotData.tagName||"Unknown tag",this.tmpl),console.log(this.data))}.bind({data:e,tmpl:t})):t}r.hasExpr=H.hasExpr,r.loopKeys=H.loopKeys,r.clearCache=function(){n={}},r.errorHandler=null;var s=/\u2057/g,u=/\u2057(\d+)~/g;var c=/^(?:(-?[_A-Za-z\xA0-\xFF][-\w\xA0-\xFF]*)|\u2057(\d+)~):/,f={"(":/[()]/g,"[":/[[\]]/g,"{":/[{}]/g};function l(o,t,e){if(o=o.replace(/\s+/g," ").trim().replace(/\ ?([[\({},?\.:])\ ?/g,"$1")){for(var n,r=[],i=0;o&&(n=o.match(c))&&!n.index;){var a,s,u=/,|([[{(])|$/g;for(o=RegExp.rightContext,a=n[2]?e[n[2]].slice(1,-1).trim().replace(/\s+/g," "):n[1];s=(n=u.exec(o))[1];)l(s,u);s=o.slice(0,n.index),o=RegExp.rightContext,r[i++]=d(s,1,a)}o=i?1'+e+"","application/xml").documentElement,!0);t.appendChild(r)}else t.innerHTML=e}function tt(t,e){if(t)for(var n;n=O.exec(t);)e(n[1].toLowerCase(),n[2]||n[3]||n[4])}function et(){return document.createDocumentFragment()}function nt(t,e,n){t.insertBefore(e,n.parentNode&&n)}function rt(n){return Object.keys(n).reduce(function(t,e){return t+" "+e+": "+n[e]+";"},"")}function it(t,e,n){if(t){var r,i=e(t,n);if(!1===i)return;for(t=t.firstChild;t;)r=t.nextSibling,it(t,e,i),t=r}}var ot=Object.freeze({$$:Z,$:a,createDOMPlaceholder:G,mkEl:T,setAttr:j,toggleVisibility:Q,getAttr:J,remAttr:X,setInnerHTML:Y,walkAttrs:tt,createFrag:et,safeInsert:nt,styleObjectToString:rt,walkNodes:it});function at(t){return D(t)||null===t}function st(t){return at(t)||""===t}function ut(t){return typeof t===c}function lt(t){return t&&typeof t===$}function ct(t){var e=t.ownerSVGElement;return!!e||null===e}function ft(t){return Array.isArray(t)||t instanceof Array}function pt(t){return E.test(t)}function dt(t){return typeof t===o}var ht=Object.freeze({isBlank:st,isFunction:ut,isObject:lt,isSvg:ct,isWritable:F,isArray:ft,isBoolAttr:pt,isNil:at,isString:dt,isUndefined:D});function mt(t,e){return-1!==t.indexOf(e)}function gt(t,e){for(var n=t?t.length:0,r=0;r|>([\S\s]*?)<\/yield\s*>|>)/gi,Tt=/]*)['"]\s*>([\S\s]*?)<\/yield\s*>/gi,jt=/|>([\S\s]*?)<\/yield\s*>)/gi,Mt={tr:"tbody",th:"tr",td:"tr",col:"colgroup"},St=L&&L<10?/^(?:t(?:body|head|foot|[rhd])|caption|col(?:group)?|opt(?:ion|group))$/:/^(?:t(?:body|head|foot|[rhd])|caption|col(?:group)?)$/,It="div",Rt="svg";function Pt(t,e,n){var r=t&&t.match(/^\s*<([-\w]+)/),i=r&&r[1].toLowerCase(),o=T(n?Rt:It);return t=function(t,n){if(!Et.test(t))return t;var r={};return n=n&&n.replace(Tt,function(t,e,n){return r[e]=r[e]||n,""}).trim(),t.replace(jt,function(t,e,n){return r[e]||n||""}).replace(Lt,function(t,e){return n||e||""})}(t,e),St.test(i)?o=function(t,e,n){var r="o"===n[0],i=r?"select>":"table>";if(t.innerHTML="<"+i+e.trim()+"=V.length,m=l&&f||!l&&!d||!S[n];m?((d=ye(T,{parent:A,isLoop:!0,isAnonymous:R,tagName:L,root:N.cloneNode(R),item:r,index:n},I)).mount(),h?function(t,e){e?zt.call(this,t):t.appendChild(this.root)}.apply(d,[v||_,P]):function(t,e,n){n?zt.apply(this,[t,e]):nt(t,this.root,e.root)}.apply(d,[_,S[n],P]),h||V.splice(n,0,r),S.splice(n,0,d),j&&At(A.tags,L,d,!0)):p!==n&&l&&((k||mt(g,V[p]))&&(function(t,e,n){n?ae.apply(this,[t,e]):nt(t,this.root,e.root)}.apply(d,[_,S[n],P]),S.splice(n,0,S.splice(p,1)[0]),V.splice(n,0,V.splice(p,1)[0])),C.pos&&(d[C.pos]=n),!j&&d.tags&&function(e){var n=this;gt(Object.keys(this.tags),function(t){oe.apply(n.tags[t],[t,e])})}.call(d,n)),K(d.__,{item:r,index:n,parent:A}),x[n]=u,m||d.update(r)}else w++}),function(t,e,n){for(var r=e.length,i=t.length-n;i +
+ + + + + +
+ + \ No newline at end of file diff --git a/app/tags/actions/beenest-action.tag.html b/app/tags/actions/beenest-action.tag.html new file mode 100644 index 0000000..c2e8f71 --- /dev/null +++ b/app/tags/actions/beenest-action.tag.html @@ -0,0 +1,181 @@ + +
+ + + + +
+ +
\ No newline at end of file diff --git a/tags/actions/landmark-action.tag.html b/app/tags/actions/landmark-action.tag.html similarity index 100% rename from tags/actions/landmark-action.tag.html rename to app/tags/actions/landmark-action.tag.html diff --git a/tags/actions/lightbulb-action.tag.html b/app/tags/actions/lightbulb-action.tag.html similarity index 100% rename from tags/actions/lightbulb-action.tag.html rename to app/tags/actions/lightbulb-action.tag.html diff --git a/tags/actions/zoom-action.tag.html b/app/tags/actions/zoom-action.tag.html similarity index 100% rename from tags/actions/zoom-action.tag.html rename to app/tags/actions/zoom-action.tag.html diff --git a/tags/attributes-list.tag.html b/app/tags/attributes-list.tag.html similarity index 100% rename from tags/attributes-list.tag.html rename to app/tags/attributes-list.tag.html diff --git a/app/tags/images-slider.tag.html b/app/tags/images-slider.tag.html new file mode 100644 index 0000000..e6b4744 --- /dev/null +++ b/app/tags/images-slider.tag.html @@ -0,0 +1,242 @@ + + + +
+ + + +
+
+
+ + + +
+
+
+ + + +
+ + + +
diff --git a/tags/label-panel.tag.html b/app/tags/label-panel.tag.html similarity index 100% rename from tags/label-panel.tag.html rename to app/tags/label-panel.tag.html diff --git a/tags/menu.tag.html b/app/tags/menu.tag.html similarity index 97% rename from tags/menu.tag.html rename to app/tags/menu.tag.html index 5115d48..8adfe5e 100644 --- a/tags/menu.tag.html +++ b/app/tags/menu.tag.html @@ -15,7 +15,7 @@ diff --git a/tags/pluginWindow.tag.html b/app/tags/pluginWindow.tag.html similarity index 86% rename from tags/pluginWindow.tag.html rename to app/tags/pluginWindow.tag.html index 1d8fd03..d41af71 100644 --- a/tags/pluginWindow.tag.html +++ b/app/tags/pluginWindow.tag.html @@ -29,7 +29,9 @@ -
+
+ +
+ \ No newline at end of file diff --git a/tags/plugins/facepp.tag.html b/app/tags/plugins/facepp.tag.html similarity index 100% rename from tags/plugins/facepp.tag.html rename to app/tags/plugins/facepp.tag.html diff --git a/tags/pluginsMenu.tag.html b/app/tags/pluginsMenu.tag.html similarity index 61% rename from tags/pluginsMenu.tag.html rename to app/tags/pluginsMenu.tag.html index 63ec170..8c26f1f 100644 --- a/tags/pluginsMenu.tag.html +++ b/app/tags/pluginsMenu.tag.html @@ -1,13 +1,18 @@