You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

2 lines
268 KiB
JavaScript

1 year ago
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var defaultCurveSegments=200;function rafFactory(){var r=Date.now(),a=1e3/60;return function(t){var e=Date.now(),i=Math.min(1e3/24,Math.max(a,e-r+a)),s=setTimeout(function(){t(e+i)},i);return r=e+i,s}}var raf=rafFactory();function createSizedArray(t){return Array.apply(null,{length:t})}function createTypedArray(t,e){return"float32"===t?new Float32Array(e):"int16"===t?new Int16Array(e):"uint8c"===t?new Uint8ClampedArray(e):null}function createTag(t){var e={};switch(t){case"canvas":return e.getContext=function(){},e;default:return e}}function randomString(t,e){void 0===e&&(e="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890");var i=void 0,s="";for(i=t;0<i;--i)s+=e[Math.round(Math.random()*(e.length-1))];return s}var subframeEnabled=!0;function getDescriptor(t,e){return Object.getOwnPropertyDescriptor(t,e)}function getEnvObj(){return"undefined"!=typeof wx&&"getSystemInfo"in wx&&"function"==typeof wx.getSystemInfo?wx:"undefined"!=typeof my&&"function"==typeof my.getSystemInfo?my:"undefined"!=typeof swan&&"function"==typeof swan.getSystemInfo?swan:"undefined"!=typeof qq&&"function"==typeof qq.getSystemInfo?qq:"undefined"!=typeof tt&&"function"==typeof tt.getSystemInfo?tt:void console.log("in uni")}var _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},classCallCheck=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")},createClass=function(){function s(t,e){for(var i=0;i<e.length;i++){var s=e[i];s.enumerable=s.enumerable||!1,s.configurable=!0,"value"in s&&(s.writable=!0),Object.defineProperty(t,s.key,s)}}return function(t,e,i){return e&&s(t.prototype,e),i&&s(t,i),t}}(),_extends=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var i=arguments[e];for(var s in i)Object.prototype.hasOwnProperty.call(i,s)&&(t[s]=i[s])}return t},get=function t(e,i,s){null===e&&(e=Function.prototype);var r=Object.getOwnPropertyDescriptor(e,i);if(void 0===r){var a=Object.getPrototypeOf(e);return null===a?void 0:t(a,i,s)}if("value"in r)return r.value;var n=r.get;return void 0!==n?n.call(s):void 0},inherits=function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)},possibleConstructorReturn=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e},slicedToArray=function(t,e){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return function(t,e){var i=[],s=!0,r=!1,a=void 0;try{for(var n,o=t[Symbol.iterator]();!(s=(n=o.next()).done)&&(i.push(n.value),!e||i.length!==e);s=!0);}catch(t){r=!0,a=t}finally{try{!s&&o.return&&o.return()}finally{if(r)throw a}}return i}(t,e);throw new TypeError("Invalid attempt to destructure non-iterable instance")},ALI_OBJ=getEnvObj(),handleSuccess=function(t,e,i){var s=1<arguments.length&&void 0!==e?e:noop,r=i;if(t.success){var a=r,n=t.success;t.success=function(t){var e=s(t)||t;n.call(a,e)}}};function noop(){}var wxToAliApi={request:function(t){var e=changeOpts(0<arguments.length&&void 0!==t?t:{},{header:"headers"});return handleSuccess(e,function(t){return changeOpts(t,{headers:"header",status:"statusCode"})}),ALI_OBJ.canIUse("request")?ALI_OBJ.request(e):ALI_OBJ.httpRequest(e)},downloadFile:function(t){var e=changeOpts(0<arguments.length&&void 0!==t?t:{});return handleSuccess(e,function(t){return changeOpts(t,{apFilePath:"tempFilePath"})}),ALI_OBJ.downloadFile(e)}};function changeOpts(i){var s=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{},t=2<arguments.length&&void 0!==arguments[2]?arguments[2]:{},r={};return Object.keys(i).forEach(function(t){var e=Object.prot