{"size": 6948, "ext": "js", "max_stars_repo_path": "dist/index.min.js", "max_stars_repo_name": "qingqibing/Leaflet.DistortableVideo", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "dist/index.min.js", "max_issues_repo_name": "qingqibing/Leaflet.DistortableVideo", "max_issues_repo_issues_event_min_datetime": "2021-03-09T16:11:27.000Z", "max_issues_repo_issues_event_max_datetime": "2021-03-09T16:11:27.000Z", "max_forks_repo_path": "dist/index.min.js", "max_forks_repo_name": "qingqibing/Leaflet.DistortableVideo", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": 1, "max_forks_count": null, "avg_line_length": 3474.0, "max_line_length": 6910, "alphanum_fraction": 0.7079735176}
!function(t,e){if("object"==typeof exports&&"object"==typeof module)module.exports=e(require("numeric"),require("jquery"),require("leaflet"));else if("function"==typeof define&&define.amd)define(["numeric","jquery","leaflet"],e);else{var r="object"==typeof exports?e(require("numeric"),require("jquery"),require("leaflet")):e(t.numeric,t.jQuery,t.L);for(var o in r)("object"==typeof exports?exports:t)[o]=r[o]}}(window,function(t,e,r){return function(t){var e={};function r(o){if(e[o])return e[o].exports;var n=e[o]={i:o,l:!1,exports:{}};return t[o].call(n.exports,n,n.exports,r),n.l=!0,n.exports}return r.m=t,r.c=e,r.d=function(t,e,o){r.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:o})},r.r=function(t){Object.defineProperty(t,"__esModule",{value:!0})},r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,"a",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p="",r(r.s=6)}([function(t,e,r){"use strict";function o(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}Object.defineProperty(e,"__esModule",{value:!0}),e.getCssWithPrefixes=function(t,e){var r;return o(r={},"-webkit-"+t,e),o(r,"-khtml-"+t,e),o(r,"-moz-"+t,e),o(r,"-ms-"+t,e),o(r,"-o-"+t,e),o(r,t,e),r},e.projectiveMatrixToCssValue=function(t){for(var e=[],r=0;r<4;r++)for(var o=0;o<4;o++)e.push(t[o][r].toFixed(20));return"matrix3d(".concat(e.join(","),")")},e.getScale3dCssValue=function(t,e){return"scale3d(".concat(e.width/t.width,", ").concat(e.height/t.height,", 1)")},e.getTranslate3dCssValue=function(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return"translate3d(".concat(t,"px, ").concat(e,"px, ").concat(r,"px)")}},function(t,e,r){"use strict";function o(t,e,r){var o=t.x,n=t.y,i=o+r,a=n+e;return{topLeft:t,topRight:{x:i,y:n},bottomRight:{x:i,y:a},bottomLeft:{x:o,y:a}}}function n(t,e){return t.x===e.x&&t.y===e.y}Object.defineProperty(e,"__esModule",{value:!0}),e.isCorners=function(t){var e=t.topLeft,r=t.topRight,o=t.bottomLeft,n=t.bottomRight;return!!(e&&r&&o&&n)},e.getElementCorners=function(t){var e=$(t);return o({x:0,y:0},e.height(),e.width())},e.calculateRectangleCorners=o,e.areSomeCornersEqual=function(t){var e=t.topLeft,r=t.topRight,o=t.bottomRight,i=t.bottomLeft;if(n(e,r))return!0;var a=[e,r];return!!a.some(function(t){return n(t,o)})||(a.push(o),a.some(function(t){return n(t,i)}))},e.areCornersEqual=n,e.getXCoordinates=function(t){var e=t.topLeft,r=t.topRight,o=t.bottomRight,n=t.bottomLeft;return[e.x,r.x,o.x,n.x]},e.getYCoordinates=function(t){var e=t.topLeft,r=t.topRight,o=t.bottomRight,n=t.bottomLeft;return[e.y,r.y,o.y,n.y]}},function(e,r){e.exports=t},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.findProjectiveMatrix=function(t,e){var r=[],o=[];i(r,o,t.topLeft,e.topLeft),i(r,o,t.topRight,e.topRight),i(r,o,t.bottomLeft,e.bottomLeft),i(r,o,t.bottomRight,e.bottomRight);var a=n.default.solve(r,o);return[[a[0],a[1],0,a[2]],[a[3],a[4],0,a[5]],[0,0,1,0],[a[6],a[7],0,1]]};var o,n=(o=r(2))&&o.__esModule?o:{default:o};function i(t,e,r,o){var n=r.x,i=r.y,a=[n,i,1,0,0,0,-o.x*n,-o.x*i],u=[0,0,0,n,i,1,-o.y*n,-o.y*i];t.push(a),e.push(o.x),t.push(u),e.push(o.y)}},function(t,r){t.exports=e},function(t,e){t.exports=r},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=h;var o=s(r(5)),n=s(r(4)),i=r(3),a=r(1),u=r(0);function s(t){return t&&t.__esModule?t:{default:t}}function f(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=[],o=!0,n=!1,i=void 0;try{for(var a,u=t[Symbol.iterator]();!(o=(a=u.next()).done)&&(r.push(a.value),!e||r.length!==e);o=!0);}catch(t){n=!0,i=t}finally{try{o||null==u.return||u.return()}finally{if(n)throw i}}return r}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function c(t){return function(t){if(Array.isArray(t)){for(var e=0,r=new Array(t.length);e<t.length;e++)r[e]=t[e];return r}}(t)||function(t){if(Symbol.iterator in Object(t)||"[object Arguments]"===Object.prototype.toString.call(t))return Array.from(t)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}var l=o.default.VideoOverlay.extend({initialize:function(t,e,r){this._url=t,this._bounds=this._getCorners(e),o.default.Util.setOptions(this,r)},setBounds:function(t){return this.setCorners(this._boundsToCorners(t))},setCorners:function(t){return this._bounds=this._getCorners(t),this._map&&this._reset(),this},_initImage:function(){o.default.VideoOverlay.prototype._initImage.call(this),this._image.style.objectFit="fill"},_reset:function(){var t=this,e=this._image,r=this._map.getContainer();(0,n.default)(e).css((0,u.getCssWithPrefixes)("transition","width 0.05s")),e.style.width=(0,n.default)(r).width()+"px",e.style.height=(0,n.default)(r).height()+"px";var o=(0,a.getElementCorners)(r);this._projectVideoOnMap(o,function(e){var r=t._map.latLngToLayerPoint(e),o=r.x,n=r.y;return{x:Math.round(o),y:Math.round(n)}})},_animateZoom:function(t){var e=this,r=t.zoom,o=t.center,n=(0,a.getElementCorners)(this.image);this._projectVideoOnMap(n,function(t){var n=e._map._latLngToNewLayerPoint(t,r,o),i=n.x,a=n.y;return{x:Math.round(i),y:Math.round(a)}})},_projectVideoOnMap:function(t,e){var r=this._bounds,o=(0,n.default)(this._image),i=function(t,e){var r=t.topLeft,o=t.topRight,n=t.bottomLeft,i=t.bottomRight;return{topLeft:e(r),topRight:e(o),bottomLeft:e(n),bottomRight:e(i)}}(r,e),s=(0,a.areSomeCornersEqual)(i)?this._projectAsRectangle(i):this._projectWithProjectiveMatrix(t,i);o.css((0,u.getCssWithPrefixes)("transform",s)),o.css((0,u.getCssWithPrefixes)("transform-origin","0 0 0px"))},_projectWithProjectiveMatrix:function(t,e){var r=(0,i.findProjectiveMatrix)(t,e);return(0,u.projectiveMatrixToCssValue)(r)},_projectAsRectangle:function(t){var e=(0,n.default)(this._image),r=(0,a.getXCoordinates)(t),o=(0,a.getYCoordinates)(t),i=Math.min.apply(Math,c(r)),s=Math.max.apply(Math,c(r)),f=Math.min.apply(Math,c(o)),l=Math.max.apply(Math,c(o)),h={height:e.height(),width:e.width()},p={height:l-f,width:s-i};return"".concat((0,u.getTranslate3dCssValue)(i,f)," ").concat((0,u.getScale3dCssValue)(h,p))},_getCorners:function(t){return(0,a.isCorners)(t)?t:this._isPointArray(t)?this._pointArrayToCorners(t):this._boundsToCorners(t)},_boundsToCorners:function(t){return{topLeft:(t=o.default.latLngBounds(t)).getNorthWest(),topRight:t.getNorthEast(),bottomLeft:t.getSouthWest(),bottomRight:t.getSouthEast()}},_pointArrayToCorners:function(t){var e=f(t,4);return{topLeft:e[0],topRight:e[1],bottomRight:e[2],bottomLeft:e[3]}},_isPointArray:function(t){if(!Array.isArray(t))return!1;var e=f(t,4),r=e[0],o=e[1],n=e[2],i=e[3];return!!(r&&o&&n&&i)}});function h(t,e,r){return new l(t,e,r)}o.default.DistortableVideoOverlay=l,o.default.distortableVideoOverlay=h}])});
//# sourceMappingURL=index.min.js.map