!function(){"use strict";angular.module("view.file",["view.file.tpls","cb.x2js","com.2fdevs.videogular","com.2fdevs.videogular.plugins.controls","hljs","ngJsonExplorer","ngSanitize","RecursionHelper"])}(),function(){"use strict";function n(n,e,i,l){var t=this;t.trustUri=function(n){e.trustAsResourceUrl(n)},t.load=function(e){var t=i.get(e);t?angular.isArray(t)?(n.loading=!1,n.json=JSON.parse(t[1])):t.then(function(e){n.json=JSON.parse(e.data)}):l.get(e,{cache:i,transformResponse:function(n,e){return n}}).then(function(e){n.loading=!1,n.json=JSON.parse(e.data)})}}angular.module("view.file").controller("FriendlyJsonCtrl",n),n.$inject=["$scope","$sce","$templateCache","$http"]}(),function(){"use strict";function n(n){function e(n,e){var i;return i=e.template?e.template:"/view-file-ng/friendly-json.html"}return{restrict:"E",controller:"FriendlyJsonCtrl",controllerAs:"ctrl",scope:{uri:"=?",json:"=?"},templateUrl:e,compile:function(e){return n.compile(e,function(n,e,i,l){n.loading=!0,n.$watch("uri",function(n){n&&l.load(n)})})}}}angular.module("view.file").directive("friendlyJson",n).filter("isObject",function(){return function(n){return angular.isObject(n)}}).filter("isArray",function(){return function(n){return angular.isArray(n)}}).filter("isFunction",function(){return function(n){return angular.isFunction(n)}}),n.$inject=["RecursionHelper"]}(),function(){"use strict";function n(n,e,i,l,t){var o=this;o.trustUri=function(n){e.trustAsResourceUrl(n)},o.load=function(e){var t=i.get(e);t?angular.isArray(t)?(n.loading=!1,o.parse(t[1])):t.then(function(e){n.loading=!1,o.parse(e.data)}):l.get(e,{cache:i,transformResponse:function(n,e){return n}}).then(function(e){n.loading=!1,o.parse(e.data)})},o.parse=function(e){n.json=t.xml_str2json(e)}}angular.module("view.file").controller("FriendlyXmlCtrl",n),n.$inject=["$scope","$sce","$templateCache","$http","x2js"]}(),function(){"use strict";function n(n){function e(n,e){var i;return i=e.template?e.template:"/view-file-ng/friendly-json.html"}return{restrict:"E",controller:"FriendlyXmlCtrl",controllerAs:"ctrl",scope:{uri:"=?",xml:"=?"},templateUrl:e,compile:function(e){return n.compile(e,function(n,e,i,l){n.loading=!0,n.$watch("uri",function(n){n&&l.load(n)}),n.$watch("xml",function(n){n&&l.parse(n)})})}}}angular.module("view.file").directive("friendlyXml",n),n.$inject=["RecursionHelper"]}(),function(){"use strict";function n(n,e){return function(i,l,t){i.$watch(function(n){return n.$eval(t.includeSafe)},function(i){n.get(i).then(function(n){var i=n.data;l.html(e(i))})})}}angular.module("view.file").directive("includeSafe",n),n.$inject=["$http","$sanitize"]}(),function(){"use strict";function n(n){function e(e,i,l,t,o){return n.open(angular.extend({templateUrl:e+"",controller:["$scope","$uibModalInstance","title","ctrl","validate",function(n,e,i,l,t){n.title=i,n.ctrl=l,n.alerts=[],n.ok=function(){t&&(n.alerts=t(n)),0===n.alerts.length&&e.close(n.ctrl)},n.cancel=function(){e.dismiss("cancel")}}],size:"lg",resolve:{title:function(){return i},ctrl:function(){return l},validate:function(){return t||function(n){var e=[];return n.form&&angular.forEach(n.form.$error,function(n,i){angular.forEach(n,function(n,l){e.push(i+": "+(n.$name||l))})}),e}}}},o)).result}var i={show:e};return i}angular.module("view.file").service("ModalService",["$uibModal",n])}(),function(){"use strict";function n(n,e,i,l,t){var o=this;o.trustUri=function(n){e.trustAsResourceUrl(n)},o.loadHljs=function(e){n.loading=!i.get(e),n.loading?l.get(e,{cache:i,transformResponse:function(n,e){return n}}).then(function(i){n.loading=!1,n.hljsUri=e}):n.hljsUri=e},o.showModal=function(){n.allowModal&&t.show("/view-file-ng/show-file.modal.html",null,n)},o.toggleCode=function(){n.showCode=!n.showCode}}angular.module("view.file").controller("ViewFileCtrl",n),n.$inject=["$scope","$sce","$templateCache","$http","ModalService"]}(),function(){"use strict";function n(){function n(n,e){return void 0!==n?n===!0||"true"===n:e}function e(n){var e="other";return/\/[x]?html/.test(n)?e="html":/[\+\/]json$/.test(n)?e="json":/[\+\/]xml$/.test(n)?e="xml":/^(audio|image|text|video|xml)\//.test(n)?e=n.split("/")[0]:/^application\//.test(n),e}function i(n,e){var i;return i=e.template?e.template:"/view-file-ng/view-file.html"}return{restrict:"E",controller:"ViewFileCtrl",controllerAs:"ctrl",scope:{data:"=?",uri:"=?",contentType:"=",_allowModal:"@allowModal",_controls:"@controls",downloadUri:"=?",fileName:"=?",_showCode:"@showCode",_trustUri:"@trustUri"},templateUrl:i,link:function(i,l,t,o){i.allowModal=n(i._allowModal,!0),i.controls=n(i._controls,i.allowModal||!!i.downloadUri),i.showCode=n(i._showCode,!1),i.trustUri=n(i._trustUri,!1),t.uri?(i.loading=!0,i.$watch("uri",function(n){n&&(i.fileName=i.fileName||n.split("/").pop(),i.fileType=e(i.contentType),i.trustUri&&o.trustUri(n),"xml"===i.fileType?o.loadHljs(n):i.loading=!1)})):(i.loading=!1,i.fileType=e(i.contentType))}}}angular.module("view.file").directive("viewFile",n)}(),function(){"use strict";angular.module("view.file").directive("viewObject",["$compile",function(n){return{restrict:"E",link:function(e,i,l){var t=' data="'+e.$eval(l.data)+'"',o=l.type?' type="'+e.$eval(l.type)+'"':"",r=l.height?' height="'+e.$eval(l.height)+'"':"",a=l.width?' width="'+e.$eval(l.width)+'"':"",s=i.html();i.html('"+s+""),n(i.contents())(e)}}}])}(),function(n){try{n=angular.module("view.file.tpls")}catch(e){n=angular.module("view.file.tpls",[])}n.run(["$templateCache",function(n){n.put("/view-file-ng/friendly-json.html",'
\n \n
{{ key.startsWith(\'__\') ? key.replace(\'__\', \'\') : key }}
\n \n
{{ val !== \'\' ? val : \' \' }}
\n \n \n \n
{{ val.join(\', \') }}
\n \n
 
\n \n
\n \n \n
\n \n
\n \n {{ v !== \'\' ? v : \' \' }}\n \n
\n
\n
\n
\n')}])}(),function(n){try{n=angular.module("view.file.tpls")}catch(e){n=angular.module("view.file.tpls",[])}n.run(["$templateCache",function(n){n.put("/view-file-ng/show-file.modal.html",'
\n \n \n \n
')}])}(),function(n){try{n=angular.module("view.file.tpls")}catch(e){n=angular.module("view.file.tpls",[])}n.run(["$templateCache",function(n){n.put("/view-file-ng/view-file.html",'
\n
\n
\n \n\n \n\n
\n \n
\n
\n\n
\n
\n Loading... \n
\n\n
\n \n
\n \n \n \n \n {{ currentTime | date:\'mm:ss\' }}\n \n \n \n {{ timeLeft | date:\'mm:ss\' }}\n \n \n \n \n \n \n \n
\n
\n Data view not supported for audio and video\n
\n\n \n
\n
\n
\n
\n
\n
\n
\n
\n \n
\n
\n \n
\n
\n\n \n
\n \n
\n
\n Data view not supported for images\n
\n\n \n
\n
\n \n
\n
\n \n
\n
\n \n
\n
\n \n
\n
\n\n \n
\n
\n \n
\n
\n \n
\n
\n \n
\n
\n \n
\n
\n\n \n \n Download\n
Alert: cannnot display this file!
\n
\n
\n Data view not supported for binaries\n
\n
\n
\n\n
\n
')}])}();