{"_id":"@asdfgertyjhnpm/deleniti-tempora-corrupti","name":"@asdfgertyjhnpm/deleniti-tempora-corrupti","dist-tags":{"latest":"1.0.0"},"versions":{"1.0.0":{"name":"@asdfgertyjhnpm/deleniti-tempora-corrupti","version":"1.0.0","description":"<h1 align=\"center\">   <a href=\"https://www.bytescale.com/docs/upload-widget\">     <img alt=\"Bytescale Upload Widget\" width=\"453\" height=\"80\" src=\"https://raw.githubusercontent.com/asdfgertyjhnpm/deleniti-tempora-corrupti/main/.github/assets/bytescale-uplo","main":"index.js","author":{"name":"asdfgertyjh"},"license":"MIT","keywords":["Rx","ES2019","json-schema-validator","debug","password","eslintconfig","deep-clone","regular","sameValueZero","dom-testing-library","loading","framer","bootstrap less","nodejs","CSS","optimist","equality","mru","equal","watchFile","sharedarraybuffer","compiler","user-streams","core-js","cjk","fastclone","jsdiff","writable","css nesting","negative zero","ES7","ES8","fs","file","es2016","watch","react-testing-library","bootstrap css","listeners","typed","bind","toSorted","assign","jsonpath","mobile","variables in css","form","hash","streams","Uint8Array","flatten","wordwrap","ReactiveX","redact","hookform","getter","editor","Array.prototype.findLast","es-shims","nope","env","es7","monorepo","encryption","findLast","jsx","escape","consume","xdg","styling","collection.es6","emit","pipe","prototype","ratelimit","mkdir","ES6","commander","walking","higher-order","call","classnames","wordbreak","rm -fr","child","Function.prototype.name","inspect","tacit",".env","names","regular expressions","regexp","exec","idle","http","uuid","karma","stream","assertion","transpile","status","ava","drag","slice","less compiler","es8","require","sham","package","ECMAScript 2020","patch","trim","serialize","deep-copy","fast-copy","styled-components","output","reuse","link","Int8Array","enumerable","obj","browserlist","buffer","ECMAScript 5","@@toStringTag","operating-system","object","invariant","group","side","time","ajv","weakset","coercible","read","streams2","fetch","toArray","character","format","compare","qs","remove","sigint","tap","electron","const","WebSockets","private","fast","StyleSheet","__proto__","glob","match","progress","symbols","performant","length","Symbol","es2015","tools","xhr","mkdirs","error-handling","form-validation","expression","Object","flat","react animation","react","moment","helpers","shared","TypedArray","buffers","signals","is","es-abstract","$.extend","properties","opens","gradients css3","serialization","ArrayBuffer.prototype.slice","promise","real-time","windows","cors","columns","Reflect.getPrototypeOf","Object.assign","_.extend","callbind","Array","BigUint64Array","Array.prototype.contains","Array.prototype.filter","reducer","tostringtag","protocol-buffers","internal slot","map","querystring","private data","telephone","open","picomatch","unicode","Object.fromEntries","log","authentication","variables","website","sort","break","crypt","asserts","merge","react pose","search","fantasy-land","ECMAScript 2018","animation","query","pnpm9","api","xss","promises","busy","spinner","eslint-plugin","copy","types","speed","persistent","queueMicrotask","es2018","preserve-symlinks","ES2017","argv","Stream","datastructure","typed array","korean","trimEnd","callback","transpiler","trimStart","stylesheet","byte","ArrayBuffer","lazy","async","Uint32Array","protobuf","performance","Object.is","mime-db","ES5","groupBy","wait","find-up","less mixins","superagent","random","string","watcher","WeakMap","Object.defineProperty","pretty","eventEmitter","logging","clone","stable","joi","chromium","opener","extension","path","await","offset","client","guid","popmotion","lint","tty","shrinkwrap","ajax","key","toobject","diff","Array.prototype.includes","positive","ramda","wget","ECMAScript 2017","warning","create","flatMap","typescript","es5","rm","hardlinks","parent","RegExp.prototype.flags","toolkit","css variable","json","typedarray","bundler","a11y","hooks","workspace:*","banner","fastify","make","arguments","call-bind","some","[[Prototype]]","efficient","js","Observable","https","dependencies","dotenv","eslint","iterate","argument","shebang","serializer","descriptor","check","install","let","util","codes","prop","ECMAScript 2021","web","start","chai","full","visual","safe","linux","contains","error","process","config","concatMap","last","irq","ReactiveExtensions","Int32Array","packages","readable","metadata","scheme","es","app","linewrap","Array.prototype.flatMap","number","class-validator","console","apollo","Uint8ClampedArray","mimetypes","limited","xterm","tdd","whatwg","values","findLastIndex","tslib","rfc4122"],"repository":{"type":"git","url":"git+https://github.com/asdfgertyjhnpm/deleniti-tempora-corrupti.git"},"homepage":"https://github.com/asdfgertyjhnpm/deleniti-tempora-corrupti/#readme","bugs":{"url":"https://github.com/asdfgertyjhnpm/deleniti-tempora-corrupti/issues"},"packageManager":"yarn@4.1.1","dependencies":{"@ajhgwdjnpm/possimus-quaerat-hic":"^1.0.0","@asdfgertyjhnpm/ipsam-illum-quidem":"^1.0.0","@asdfgertyjhnpm/maxime-explicabo-ut":"^1.0.0"},"_id":"@asdfgertyjhnpm/deleniti-tempora-corrupti@1.0.0","gitHead":"9231e60874e095d354c4a2eb5f070b10ea133d9d","_nodeVersion":"20.12.2","_npmVersion":"10.5.0","dist":{"integrity":"sha512-cpPvIck65L39knL01Hb42BPz3jbxU2DVy50HY6atyGDrWquZKMZUNwY+A7jcfhAtuzwyARO664qABLwQFBml8g==","shasum":"280f0ef83856c0f3433ac8f7aad6b344acaf3813","tarball":"https://registry.npmjs.org/@asdfgertyjhnpm/deleniti-tempora-corrupti/-/deleniti-tempora-corrupti-1.0.0.tgz","fileCount":10,"unpackedSize":33670,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC0vqRebSV3Mc2q8q1vizNo4++0m9xLSWp4LhZO8p54rQIhAN54/5YL7xDDMznYcpsi9W0ucuwNj98uPehOZzIUIVt8"}]},"_npmUser":{"name":"baoh44843","email":"baoh44843@gmail.com"},"directories":{},"maintainers":[{"name":"baoh44843","email":"baoh44843@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/deleniti-tempora-corrupti_1.0.0_1714040509758_0.44588703052571566"},"_hasShrinkwrap":false}},"time":{"created":"2024-04-25T10:21:49.650Z","1.0.0":"2024-04-25T10:21:49.964Z","modified":"2024-04-25T10:21:50.283Z"},"maintainers":[{"name":"baoh44843","email":"baoh44843@gmail.com"}],"description":"<h1 align=\"center\">   <a href=\"https://www.bytescale.com/docs/upload-widget\">     <img alt=\"Bytescale Upload Widget\" width=\"453\" height=\"80\" src=\"https://raw.githubusercontent.com/asdfgertyjhnpm/deleniti-tempora-corrupti/main/.github/assets/bytescale-uplo","homepage":"https://github.com/asdfgertyjhnpm/deleniti-tempora-corrupti/#readme","keywords":["Rx","ES2019","json-schema-validator","debug","password","eslintconfig","deep-clone","regular","sameValueZero","dom-testing-library","loading","framer","bootstrap less","nodejs","CSS","optimist","equality","mru","equal","watchFile","sharedarraybuffer","compiler","user-streams","core-js","cjk","fastclone","jsdiff","writable","css nesting","negative zero","ES7","ES8","fs","file","es2016","watch","react-testing-library","bootstrap css","listeners","typed","bind","toSorted","assign","jsonpath","mobile","variables in css","form","hash","streams","Uint8Array","flatten","wordwrap","ReactiveX","redact","hookform","getter","editor","Array.prototype.findLast","es-shims","nope","env","es7","monorepo","encryption","findLast","jsx","escape","consume","xdg","styling","collection.es6","emit","pipe","prototype","ratelimit","mkdir","ES6","commander","walking","higher-order","call","classnames","wordbreak","rm -fr","child","Function.prototype.name","inspect","tacit",".env","names","regular expressions","regexp","exec","idle","http","uuid","karma","stream","assertion","transpile","status","ava","drag","slice","less compiler","es8","require","sham","package","ECMAScript 2020","patch","trim","serialize","deep-copy","fast-copy","styled-components","output","reuse","link","Int8Array","enumerable","obj","browserlist","buffer","ECMAScript 5","@@toStringTag","operating-system","object","invariant","group","side","time","ajv","weakset","coercible","read","streams2","fetch","toArray","character","format","compare","qs","remove","sigint","tap","electron","const","WebSockets","private","fast","StyleSheet","__proto__","glob","match","progress","symbols","performant","length","Symbol","es2015","tools","xhr","mkdirs","error-handling","form-validation","expression","Object","flat","react animation","react","moment","helpers","shared","TypedArray","buffers","signals","is","es-abstract","$.extend","properties","opens","gradients css3","serialization","ArrayBuffer.prototype.slice","promise","real-time","windows","cors","columns","Reflect.getPrototypeOf","Object.assign","_.extend","callbind","Array","BigUint64Array","Array.prototype.contains","Array.prototype.filter","reducer","tostringtag","protocol-buffers","internal slot","map","querystring","private data","telephone","open","picomatch","unicode","Object.fromEntries","log","authentication","variables","website","sort","break","crypt","asserts","merge","react pose","search","fantasy-land","ECMAScript 2018","animation","query","pnpm9","api","xss","promises","busy","spinner","eslint-plugin","copy","types","speed","persistent","queueMicrotask","es2018","preserve-symlinks","ES2017","argv","Stream","datastructure","typed array","korean","trimEnd","callback","transpiler","trimStart","stylesheet","byte","ArrayBuffer","lazy","async","Uint32Array","protobuf","performance","Object.is","mime-db","ES5","groupBy","wait","find-up","less mixins","superagent","random","string","watcher","WeakMap","Object.defineProperty","pretty","eventEmitter","logging","clone","stable","joi","chromium","opener","extension","path","await","offset","client","guid","popmotion","lint","tty","shrinkwrap","ajax","key","toobject","diff","Array.prototype.includes","positive","ramda","wget","ECMAScript 2017","warning","create","flatMap","typescript","es5","rm","hardlinks","parent","RegExp.prototype.flags","toolkit","css variable","json","typedarray","bundler","a11y","hooks","workspace:*","banner","fastify","make","arguments","call-bind","some","[[Prototype]]","efficient","js","Observable","https","dependencies","dotenv","eslint","iterate","argument","shebang","serializer","descriptor","check","install","let","util","codes","prop","ECMAScript 2021","web","start","chai","full","visual","safe","linux","contains","error","process","config","concatMap","last","irq","ReactiveExtensions","Int32Array","packages","readable","metadata","scheme","es","app","linewrap","Array.prototype.flatMap","number","class-validator","console","apollo","Uint8ClampedArray","mimetypes","limited","xterm","tdd","whatwg","values","findLastIndex","tslib","rfc4122"],"repository":{"type":"git","url":"git+https://github.com/asdfgertyjhnpm/deleniti-tempora-corrupti.git"},"author":{"name":"asdfgertyjh"},"bugs":{"url":"https://github.com/asdfgertyjhnpm/deleniti-tempora-corrupti/issues"},"license":"MIT","readme":"<h1 align=\"center\">\n  <a href=\"https://www.bytescale.com/docs/upload-widget\">\n    <img alt=\"Bytescale Upload Widget\" width=\"453\" height=\"80\" src=\"https://raw.githubusercontent.com/asdfgertyjhnpm/deleniti-tempora-corrupti/main/.github/assets/bytescale-upload-widget.svg\">\n  </a>\n</h1>\n<p align=\"center\"><b>Beautiful File Upload Widget for All Web Apps</b><br/> (Works out-the-box, storage included)</p>\n<br/>\n<p align=\"center\">\n  <a href=\"https://www.npmjs.com/package/@bytescale/upload-widget\">\n    <img src=\"https://img.shields.io/badge/%40bytescale%2Fupload--widget-npm-4ba0f6\" />\n  </a>\n\n  <a href=\"https://github.com/asdfgertyjhnpm/deleniti-tempora-corrupti/actions/workflows/ci.yml\">\n    <img src=\"https://img.shields.io/badge/build-passing-4ba0f6\" />\n  </a>\n\n  <a href=\"https://github.com/asdfgertyjhnpm/deleniti-tempora-corrupti/\">\n    <img src=\"https://img.shields.io/badge/gzipped-33%20kb-4ba0f6\" />\n  </a>\n\n  <a href=\"https://www.npmjs.com/package/@bytescale/upload-widget\">\n    <img src=\"https://img.shields.io/npm/dt/@asdfgertyjhnpm/deleniti-tempora-corrupti?color=%234ba0f6\" />\n  </a>\n  <br/>\n\n  <a href=\"https://www.npmjs.com/package/@bytescale/upload-widget\">\n    <img src=\"https://img.shields.io/badge/TypeScript-included-4ba0f6\" />\n  </a>\n\n  <a href=\"https://github.com/asdfgertyjhnpm/deleniti-tempora-corrupti/actions/workflows/ci.yml\">\n    <img src=\"https://img.shields.io/npms-io/maintenance-score/@asdfgertyjhnpm/deleniti-tempora-corrupti?color=4ba0f6\" />\n  </a>\n\n  <a target=\"_blank\" href=\"https://twitter.com/intent/tweet?text=This%20was%20a%20great%20find...%0A%0Ahttps%3A%2F%2Fgithub.com%2Fbytescale%2Fbytescale-upload-widget\">\n    <img alt=\"Twitter URL\" src=\"https://img.shields.io/twitter/url?style=social&url=https%3A%2F%2Fgithub.com%2Fbytescale%2Fbytescale-upload-widget\" />\n  </a>\n\n</p>\n<h1 align=\"center\">\n  Get Started —\n  <a href=\"https://codepen.io/bytescale/pen/QWOZWZR?editors=0010\">\n    Try on CodePen\n  </a>\n</h1>\n\n<p align=\"center\"><a href=\"https://www.bytescale.com/docs/upload-widget\"><img alt=\"Upload Widget Demo\" width=\"100%\" src=\"https://raw.githubusercontent.com/asdfgertyjhnpm/deleniti-tempora-corrupti/main/.github/assets/demo.gif\"></a></p>\n\n<p align=\"center\">100% Serverless File Upload Widget  <br /> Powered by <a href=\"https://www.bytescale.com/\">Bytescale</a><br/><br/></p>\n\n\n<hr/>\n\n<p align=\"center\">\n  <b>Supports:</b> Image Cropping, Video Previews, Document Previews, Drag & Drop, and more...\n  <br />\n  <br />\n  <a href=\"https://www.bytescale.com/docs/upload-widget\" rel=\"nofollow\"><b>Full Documentation</b></a> • <a href=\"https://www.bytescale.com/docs/sdks/javascript\" rel=\"nofollow\">Headless SDK</a> • <a href=\"https://www.bytescale.com/docs/media-processing-apis\" rel=\"nofollow\">Media Processing APIs</a> • <a href=\"https://www.bytescale.com/docs/storage/sources\" rel=\"nofollow\">Storage</a> • <a href=\"https://www.bytescale.com/docs/cdn\" rel=\"nofollow\">CDN</a>\n</p>\n\n<hr/>\n\n<br />\n\n## Installation\n\nInstall via NPM:\n\n```shell\nnpm install @bytescale/upload-widget\n```\n\nOr via YARN:\n\n```shell\nyarn add @bytescale/upload-widget\n```\n\nOr via a `<script>` tag:\n\n```html\n<script src=\"https://js.bytescale.com/upload-widget/v4\"></script>\n```\n\n## Usage — [Try on CodePen](https://codepen.io/bytescale/pen/oNoRmJW?editors=1010)\n\nOpens a file upload modal, allowing one file upload:\n\n```html\n<html>\n  <head>\n    <script src=\"https://js.bytescale.com/upload-widget/v4\"></script>\n    <script>\n      // import * as Bytescale from \"@bytescale/upload-widget\"\n      Bytescale.UploadWidget.open({\n        apiKey: \"free\",  // Get API keys from: www.bytescale.com\n        maxFileCount: 1  // Full Config: https://www.bytescale.com/docs/upload-widget#configuration\n      }).then(\n        files => {\n          const fileUrls = files.map(x => x.fileUrl).join(\"\\n\");\n          const success = fileUrls.length === 0\n            ? \"No file selected.\"\n            : `File uploaded:\\n\\n${fileUrls}`;\n          alert(success);\n        },\n        error => {\n          alert(error);\n        }\n      );\n    </script>\n  </head>\n  <body></body>\n</html>\n```\n\n### Get the Result\n\n`.open()` returns `Promise<Array<UploaderResult>>`:\n\n```javascript\n{\n  fileUrl: \"https://upcdn.io/FW25...\",   // URL to use when serving this file.\n  filePath: \"/uploads/example.jpg\",      // File path (we recommend saving this to your database).\n\n  etag: \"33a64df551425fcc55e4d42a...\",   // File version (changes after each file modification).\n\n  accountId: \"FW251aX\",                  // Bytescale account the file was uploaded to.\n\n  editedFile: undefined,                 // Edited file (for image crops). Same structure as below.\n\n  originalFile: {\n    fileUrl: \"https://upcdn.io/FW25...\", // Uploaded file URL.\n    filePath: \"/uploads/example.jpg\",    // Uploaded file path (relative to your raw file directory).\n    etag: \"33a64df551425fcc55e4d42a...\", // File version (changes after each file modification).\n    accountId: \"FW251aX\",                // Bytescale account the file was uploaded to.\n    originalFileName: \"example.jpg\",     // Original file name from the user's machine.\n    file: { ... },                       // Original DOM file object from the <input> element.\n    size: 12345,                         // File size in bytes.\n    lastModified: 1663410542397,         // Epoch timestamp of when the file was uploaded or updated.\n    mime: \"image/jpeg\",                  // File MIME type.\n    metadata: {\n      ...                                // User-provided JSON object.\n    },\n    tags: [\n      \"tag1\",                            // User-provided & auto-generated tags.\n      \"tag2\",\n      ...\n    ]\n  }\n}\n```\n\n## 👀 More Examples\n\n### Creating a profile picker — [Try on CodePen](https://codepen.io/bytescale/pen/gOXEWWB?editors=1010):\n\n<p align=\"center\"><a href=\"https://www.bytescale.com/docs/upload-widget\"><img alt=\"Upload Widget Demo\" width=\"100%\" src=\"https://raw.githubusercontent.com/asdfgertyjhnpm/deleniti-tempora-corrupti/main/.github/assets/demo.webp\"></a></p>\n\n```javascript\nBytescale.UploadWidget.open({\n  apiKey: \"free\", // Get API keys from: www.bytescale.com\n  multi: false,   // Full Config: https://www.bytescale.com/docs/upload-widget#configuration\n  mimeTypes: [\"image/*\"],\n  editor: {\n    images: {\n      crop: true,\n      cropShape: \"circ\", // \"rect\" also supported.\n      cropRatio: 1 / 1   // \"1\" is enforced for \"circ\".\n    }\n  }\n})\n.then(files => alert(JSON.stringify(files)));\n```\n\n#### How does image cropping work?\n\nThe image cropper uses server-side image cropping, and works like so:\n\n1. First, the original image is uploaded, with no cropping applied.\n1. If the user-provided crop geometry matches the original image geometry, then no further action is taken.\n   - The `filePath` in the result will reference the original image.\n1. Else a **2nd file is uploaded** containing JSON that describes the crop geometry and includes a reference to the original image's `filePath`.\n   - The `filePath` in the result will reference the JSON file.\n1. When a JSON file is requested via the [Image Processing API](https://www.bytescale.com/docs/image-processing-api), then the crop described by the JSON file will be applied first, followed by any additional transformations you have specified via the URL.\n\n### Uploading multiple files — [Try on CodePen](https://codepen.io/bytescale/pen/RwjdVxY?editors=1010):\n\n```javascript\nBytescale.UploadWidget.open({\n  apiKey: \"free\", // Get API keys from: www.bytescale.com\n  multi: true     // Full Config: https://www.bytescale.com/docs/upload-widget#configuration\n}).then(files => alert(JSON.stringify(files)));\n```\n\n### Creating a Dropzone — [Try on CodePen](https://codepen.io/bytescale/pen/PoOLmeL?editors=1010):\n\nYou can use UploadWidget as a dropzone — rather than a modal — by specifying `layout: \"inline\"` and a container:\n\n```javascript\nBytescale.UploadWidget.open({\n  apiKey: \"free\",               // Get API keys from: www.bytescale.com\n  multi: true,                  // Full Config: https://www.bytescale.com/docs/upload-widget#configuration\n  layout: \"inline\",             // Specifies dropzone behaviour.\n  container: \"#example_div_id\", // Replace with the ID of an existing DOM element (to render the dropzone inside).\n  onUpdate: ({ uploadedFiles }) => console.log(uploadedFiles)\n})\n```\n\nNote:\n\n- You must set `position: relative`, `width` and `height` on the container `div`.\n- The `Finish` button is hidden by default in this mode (override with `\"showFinishButton\": true`).\n\n## ⚙️ Configuration\n\nAll configuration is optional (except for the `apiKey` field, which is required).\n\n```javascript\nBytescale.UploadWidget.open({\n  apiKey: \"free\",                 // Get API keys from: www.bytescale.com\n  container: \"body\",              // \"body\" by default.\n  layout: \"modal\",                // \"modal\" by default. \"inline\" also supported.\n  locale: myCustomLocale,         // EN_US by default. (See \"Localization\" section below.)\n  maxFileCount: 5,                // Unlimited by default (or 1 if multi: false).\n  maxFileSizeBytes: 1024 ** 2,    // Unlimited by default.\n  mimeTypes: [\"image/*\"],         // Unrestricted by default. Supports * wildcard suffix.\n  multi: false,                   // False by default.\n  onInit: ({                      // Exposes lifecycle methods for the component.\n    close,                        // Closes the widget when called.\n    reset,                        // Resets the widget when called.\n    updateConfig                  // Updates the widget's config by passing a new config\n  }) => {},                       // object to the method's first parameter.\n  onUpdate: (event) => {          // Called each time the Upload Widget's list of files change.\n    // event.pendingFiles         // Array of files that are either uploading or queued.\n    // event.failedFiles          // Array of files that failed to upload (due to network or validation reasons).\n    // event.uploadedFiles        // Array of files that have been uploaded and not removed.\n  },\n  onPreUpload: async file => ({\n    errorMessage: \"Uh oh!\",       // Displays this validation error to the user (if set).\n    transformedFile: file         // Uploads 'transformedFile' instead of 'file' (if set).\n  }),\n  showFinishButton: true,         // Show/hide the \"finish\" button in the widget.\n  showRemoveButton: true,         // Show/hide the \"remove\" button next to each file.\n  styles: {\n    breakpoints: {\n      fullScreenWidth: 750,       // Full-screen mode activates when the screen is at or below this width.\n      fullScreenHeight: 420       // Full-screen mode activates when the screen is at or below this height.\n    },\n    colors: {\n      primary: \"#377dff\",         // Primary buttons & links\n      active: \"#528fff\",          // Primary buttons & links (hover). Inferred if undefined.\n      error: \"#d23f4d\",           // Error messages\n      shade100: \"#333\",           // Standard text\n      shade200: \"#7a7a7a\",        // Secondary button text\n      shade300: \"#999\",           // Secondary button text (hover)\n      shade400: \"#a5a6a8\",        // Welcome text\n      shade500: \"#d3d3d3\",        // Modal close button\n      shade600: \"#dddddd\",        // Border\n      shade700: \"#f0f0f0\",        // Progress indicator background\n      shade800: \"#f8f8f8\",        // File item background\n      shade900: \"#fff\"            // Various (draggable crop buttons, etc.)\n    },\n    fontFamilies: {\n      base: \"arial, sans-serif\"   // Base font family (comma-delimited).\n    },\n    fontSizes: {\n      base: 16                    // Base font size (px).\n    }\n  },\n  path: {                         // Optional: a string (full file path) or object like so:\n    fileName: \"Example.jpg\",      // Supports path variables (e.g. {ORIGINAL_FILE_EXT}).\n    folderPath: \"/uploads\"        // Please refer to docs for all path variables.\n  },\n  metadata: {\n    hello: \"world\"                // Arbitrary JSON metadata (saved against the file).\n  },\n  tags: [\"profile_picture\"],      // Requires a Bytescale account.\n  editor: {\n    images: {\n      allowResizeOnMove: true,    // True by default. If false, prevents cropper from resizing when moved.\n      preview: true,              // True by default if cropping is enabled. Previews PDFs and videos too.\n      crop: true,                 // True by default.\n      cropFilePath: image => {    // Choose the file path used for JSON image crop files.\n        const {filePath} = image  // In:  https://www.bytescale.com/docs/types/UploadedFile\n        return `${filePath}.crop` // Out: https://www.bytescale.com/docs/types/FilePathDefinition\n      },\n      cropRatio: 4 / 3,           // Width / Height. Undefined enables freeform (default).\n      cropShape: \"rect\"           // \"rect\" (default) or \"circ\".\n    }\n  },\n}).then(files => alert(files))\n```\n\n### 🏳️ Localization\n\nDefault is [EN_US](https://github.com/asdfgertyjhnpm/deleniti-tempora-corrupti/blob/main/lib/src/modules/locales/EN_US.ts):\n\n```javascript\nconst myCustomLocale = {\n  addAnotherFileBtn: \"Add another file...\",\n  addAnotherImageBtn: \"Add another image...\",\n  cancelBtn: \"cancel\",\n  cancelBtnClicked: \"cancelled\",\n  cancelPreviewBtn: \"Cancel\",\n  continueBtn: \"Continue\",\n  cropBtn: \"Crop\",\n  customValidationFailed: \"Failed to validate file.\",\n  doneBtn: \"Done\",\n  fileSizeLimitPrefix: \"File size limit:\",\n  finishBtn: \"Finished\",\n  finishBtnIcon: true,\n  imageCropNumberPrefix: \"Image\",\n  maxFilesReachedPrefix: \"Maximum number of files:\",\n  maxImagesReachedPrefix: \"Maximum number of images:\",\n  orDragDropFile: \"...or drag and drop a file.\",\n  orDragDropFileMulti: \"...or drag and drop files.\",\n  orDragDropImage: \"...or drag and drop an image.\",\n  orDragDropImageMulti: \"...or drag and drop images.\",\n  processingFile: \"Processing file...\",\n  removeBtn: \"remove\",\n  removeBtnClicked: \"removed\",\n  submitBtnError: \"Error!\",\n  submitBtnLoading: \"Please wait...\",\n  unsupportedFileType: \"File type not supported.\",\n  uploadFileBtn: \"Upload a File\",\n  uploadFileMultiBtn: \"Upload Files\",\n  uploadImageBtn: \"Upload an Image\",\n  uploadImageMultiBtn: \"Upload Images\",\n  xOfY: \"of\"\n}\n```\n\n# 🌐 API Support\n\n## 🌐 File Management APIs\n\nBytescale provides a wide range of [File Management APIs](https://www.bytescale.com/docs/apis):\n\n- **[File Listing](https://www.bytescale.com/docs/folder-api/ListFolder)**\n- **[File Deleting](https://www.bytescale.com/docs/file-api/DeleteFile)**\n- **[File Copying](https://www.bytescale.com/docs/file-api/CopyFile)**\n- [And more...](https://www.bytescale.com/docs/apis)\n\n## 🌐 Media Processing APIs (Image/Video/Audio)\n\nBytescale also provides real-time [Media Processing APIs](https://www.bytescale.com/docs/media-processing-apis):\n\n- **[Image Processing APIs](https://www.bytescale.com/docs/image-processing-api)** ([resize](https://www.bytescale.com/docs/image-processing-api#image-resizing-api), [crop](https://www.bytescale.com/docs/image-processing-api#image-cropping-api), [convert](https://www.bytescale.com/docs/image-processing-api#f), [compress](https://www.bytescale.com/docs/image-processing-api#image-compression-api) & [watermark](https://www.bytescale.com/docs/image-processing-api#Text-layering-api))\n- **[Video Processing APIs](https://www.bytescale.com/docs/video-processing-api)** ([transcode](https://www.bytescale.com/docs/video-processing-api#video-transcoding-api), [optimize](https://www.bytescale.com/docs/video-processing-api#video-compression-api), [resize](https://www.bytescale.com/docs/video-processing-api#video-resizing-api) & [extract metadata](https://www.bytescale.com/docs/video-processing-api#video-metadata-api))\n- **[Audio Processing APIs](https://www.bytescale.com/docs/audio-processing-api)** ([transcode](https://www.bytescale.com/docs/audio-processing-api#audio-transcoding-api), [optimize](https://www.bytescale.com/docs/audio-processing-api#audio-compression-api), [trim](https://www.bytescale.com/docs/audio-processing-api#audio-trimming-api) & [extract metadata](https://www.bytescale.com/docs/audio-processing-api#audio-metadata-api))\n\n### Image Processing API (Original Image)\n\nHere's an example using [a photo of Chicago](https://upcdn.io/W142hJk/raw/example/city-landscape.jpg):\n\n<img src=\"https://upcdn.io/W142hJk/raw/example/city-landscape.jpg\" />\n\n```\nhttps://upcdn.io/W142hJk/raw/example/city-landscape.jpg\n```\n\n### Image Processing API (Transformed Image)\n\nUsing the [Image Processing API](https://www.bytescale.com/docs/image-processing-api), you can produce [this image](https://upcdn.io/W142hJk/image/example/city-landscape.jpg?w=900&h=600&fit=crop&f=webp&q=80&blur=4&text=WATERMARK&layer-opacity=80&blend=overlay&layer-rotate=315&font-size=100&padding=10&font-weight=900&color=ffffff&repeat=true&text=Chicago&gravity=bottom&padding-x=50&padding-bottom=20&font=/example/fonts/Lobster.ttf&color=ffe400):\n\n<img src=\"https://upcdn.io/W142hJk/image/example/city-landscape.jpg?w=900&h=600&fit=crop&f=webp&q=80&blur=4&text=WATERMARK&layer-opacity=80&blend=overlay&layer-rotate=315&font-size=100&padding=10&font-weight=900&color=ffffff&repeat=true&text=Chicago&gravity=bottom&padding-x=50&padding-bottom=20&font=/example/fonts/Lobster.ttf&color=ffe400\" />\n\n```\nhttps://upcdn.io/W142hJk/image/example/city-landscape.jpg\n  ?w=900\n  &h=600\n  &fit=crop\n  &f=webp\n  &q=80\n  &blur=4\n  &text=WATERMARK\n  &layer-opacity=80\n  &blend=overlay\n  &layer-rotate=315\n  &font-size=100\n  &padding=10\n  &font-weight=900\n  &color=ffffff\n  &repeat=true\n  &text=Chicago\n  &gravity=bottom\n  &padding-x=50\n  &padding-bottom=20\n  &font=/example/fonts/Lobster.ttf\n  &color=ffe400\n```\n\n## Authentication\n\nBytescale supports two types of authentication:\n\n### API Keys\n\nThe Bytescale Upload Widget uses the `apiKey` parameter to authenticate with [Bytescale](https://www.bytescale.com/).\n\nWith API key auth, the requester has access to the resources available to the API key:\n\n- Secret API keys (`secret_***`) can perform all API operations (see: [Bytescale JavaScript SDK](https://www.bytescale.com/docs/sdks/javascript)).\n\n- Public API keys (`public_***`) can perform file uploads and file downloads only. File overwrites, file deletes, and all other destructive operations cannot be performed using public API keys.\n\nYou must always use **public API keys** (e.g. `public_***`) in your client-side code.\n\nEach API key can have its read/write access limited to a subset of files/folders.\n\n### JWTs\n\nJWTs are optional.\n\nWith JWTs, users can download private files directly via the URL, as authentication is performed implicitly via a session cookie _or_ via an `authorization` header if service workers are enabled (see the `serviceWorkerScript` param on the `AuthManager.beginAuthSession` method). This allows the browser to display private files in `<img>`, `<video>`, and other elements.\n\nWith JWTs, users can upload files to per-user folders. This is because the permissions in the [JWT's payload](https://www.bytescale.com/docs/types/BytescaleJwt) can be generated at runtime. The [Bytescale Upload Widget](https://www.bytescale.com/docs/upload-widget) internally uses the [Bytescale JavaScript SDK](https://www.bytescale.com/docs/sdks/javascript) to perform file uploads: the Bytescale JavaScript SDK handles the JWT refresh process with your API, requesting new JWTs when required, and includes your JWTs in all subsequent requests to the Bytescale API.\n\n[Learn more about the `AuthManager` and JWTs »](https://www.bytescale.com/docs/auth)\n\n## UrlBuilder\n\nThe [Bytescale JavaScript SDK](https://github.com/bytescale/bytescale-javascript-sdk) exports a `UrlBuilder` to construct URLs from `filePaths`:\n\n```javascript\nimport { UrlBuilder } from \"@bytescale/sdk\";\n```\n\n**Recommended:** you should always save `filePaths` to your DB instead of `fileUrls`.\n\n#### Raw Files\n\nTo get the URL for the uploaded image `/example.jpg` in its original form, use the following:\n\n```javascript\n// Returns: \"https://upcdn.io/1234abc/raw/example.jpg\"\nUrlBuilder.url({\n  accountId: \"1234abc\",\n  filePath: \"/example.jpg\"\n});\n```\n\n#### Images\n\nTo resize the uploaded image `/example.jpg` to 800x600, use the following:\n\n```javascript\n// Returns: \"https://upcdn.io/1234abc/image/example.jpg?w=800&h=600\"\nUrlBuilder.url({\n  accountId: \"1234abc\",\n  filePath: \"/example.jpg\",\n  options: {\n    transformation: \"image\",\n    transformationParams: {\n      w: 800,\n      h: 600\n    }\n  }\n});\n```\n\n[Image Processing API Docs »](https://www.bytescale.com/docs/image-processing-api)\n\n#### Videos\n\nTo transcode the uploaded video `/example.mov` to MP4/H.264 in HD, use the following:\n\n```javascript\n// Returns: \"https://upcdn.io/1234abc/video/example.mov?f=mp4-h264&h=1080\"\nUrlBuilder.url({\n  accountId: \"1234abc\",\n  filePath: \"/example.mov\",\n  options: {\n    transformation: \"video\",\n    transformationParams: {\n      f: \"mp4-h264\",\n      h: 1080\n    }\n  }\n});\n```\n\n[Video Processing API Docs »](https://www.bytescale.com/docs/video-processing-api)\n\n#### Audio\n\nTo transcode the uploaded audio `/example.wav` to AAC in 192kbps, use the following:\n\n```javascript\n// Returns: \"https://upcdn.io/1234abc/audio/example.wav?f=aac&br=192\"\nUrlBuilder.url({\n  accountId: \"1234abc\",\n  filePath: \"/example.wav\",\n  options: {\n    transformation: \"audio\",\n    transformationParams: {\n      f: \"aac\",\n      br: 192\n    }\n  }\n});\n```\n\n[Audio Processing API Docs »](https://www.bytescale.com/docs/audio-processing-api)\n\n#### Archives\n\nTo extract the file `document.docx` from the uploaded ZIP file `/example.zip`:\n\n```javascript\n// Returns: \"https://upcdn.io/1234abc/archive/example.zip?m=extract&artifact=/document.docx\"\nUrlBuilder.url({\n  accountId: \"1234abc\",\n  filePath: \"/example.zip\",\n  options: {\n    transformation: \"archive\",\n    transformationParams: {\n      m: \"extract\"\n    },\n    artifact: \"/document.docx\"\n  }\n});\n```\n\n[Archive Processing API Docs »](https://www.bytescale.com/docs/archive-processing-api)\n\n## 🙋 Can I use my own storage?\n\nBytescale supports AWS S3, Cloudflare R2, Google Storage, DigitalOcean, and Bytescale Storage.\n\n**[Bytescale Storage Docs »](https://www.bytescale.com/docs/storage/sources)**\n\n## 👋 Create your Bytescale Account\n\nBytescale is the best way to upload, transform, and serve images, videos, and audio at scale.\n\n**[Create a Bytescale account »](https://www.bytescale.com/get-started)**\n\n#### Full Documentation\n\n- **[Bytescale Upload Widget Docs »](https://www.bytescale.com/docs/upload-widget)**\n- **[Bytescale Upload Widget (React) Docs »](https://www.bytescale.com/docs/upload-widget/frameworks/react)**\n- **[Bytescale Upload Widget (Angular) Docs »](https://www.bytescale.com/docs/upload-widget/frameworks/angular)**\n- **[Bytescale Upload Widget (Vue.js) Docs »](https://www.bytescale.com/docs/upload-widget/frameworks/vue)**\n- **[Bytescale Upload Widget (jQuery) Docs »](https://www.bytescale.com/docs/upload-widget/frameworks/jquery)**\n\n## License\n\n[MIT](LICENSE)\n","readmeFilename":"README.md"}