@bigbinary/neeto-editor 1.38.10 → 1.38.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (38) hide show
  1. package/dist/Attachments.js +3 -3
  2. package/dist/Editor.js +6 -4
  3. package/dist/Editor.js.map +1 -1
  4. package/dist/FormikEditor.js +3 -3
  5. package/dist/Menu.js +2 -2
  6. package/dist/{chunk-5c874a66.js → chunk-17c1b4e1.js} +23 -13
  7. package/dist/chunk-17c1b4e1.js.map +1 -0
  8. package/dist/{chunk-8199190a.js → chunk-32e353fe.js} +859 -15
  9. package/dist/chunk-32e353fe.js.map +1 -0
  10. package/dist/{chunk-785530ec.js → chunk-8b1f773d.js} +4 -4
  11. package/dist/{chunk-785530ec.js.map → chunk-8b1f773d.js.map} +1 -1
  12. package/dist/chunk-b66ef3a3.js +513 -0
  13. package/dist/chunk-b66ef3a3.js.map +1 -0
  14. package/dist/cjs/Attachments.cjs.js +3 -3
  15. package/dist/cjs/Editor.cjs.js +8 -6
  16. package/dist/cjs/Editor.cjs.js.map +1 -1
  17. package/dist/cjs/FormikEditor.cjs.js +3 -3
  18. package/dist/cjs/Menu.cjs.js +2 -2
  19. package/dist/cjs/{chunk-7d9a9ed1.cjs.js → chunk-938306ec.cjs.js} +852 -4
  20. package/dist/cjs/chunk-938306ec.cjs.js.map +1 -0
  21. package/dist/cjs/chunk-b5a7673a.cjs.js +529 -0
  22. package/dist/cjs/chunk-b5a7673a.cjs.js.map +1 -0
  23. package/dist/cjs/{chunk-969635f1.cjs.js → chunk-eb6c9e4e.cjs.js} +101 -101
  24. package/dist/cjs/{chunk-969635f1.cjs.js.map → chunk-eb6c9e4e.cjs.js.map} +1 -1
  25. package/dist/cjs/{chunk-534531c3.cjs.js → chunk-fd7976a0.cjs.js} +28 -18
  26. package/dist/cjs/chunk-fd7976a0.cjs.js.map +1 -0
  27. package/dist/cjs/index.cjs.js +5 -5
  28. package/dist/editor-stats.html +1 -1
  29. package/dist/index.js +5 -5
  30. package/package.json +1 -1
  31. package/dist/chunk-5c874a66.js.map +0 -1
  32. package/dist/chunk-8199190a.js.map +0 -1
  33. package/dist/chunk-b6d4a09a.js +0 -1356
  34. package/dist/chunk-b6d4a09a.js.map +0 -1
  35. package/dist/cjs/chunk-534531c3.cjs.js.map +0 -1
  36. package/dist/cjs/chunk-5b0bae44.cjs.js +0 -1373
  37. package/dist/cjs/chunk-5b0bae44.cjs.js.map +0 -1
  38. package/dist/cjs/chunk-7d9a9ed1.cjs.js.map +0 -1
@@ -1,4 +1,4 @@
1
- import { useEffect } from 'react';
1
+ import React__default, { useEffect } from 'react';
2
2
  import _toConsumableArray from '@babel/runtime/helpers/toConsumableArray';
3
3
  import _slicedToArray from '@babel/runtime/helpers/slicedToArray';
4
4
  import _objectWithoutProperties from '@babel/runtime/helpers/objectWithoutProperties';
@@ -16,10 +16,11 @@ import { create as create$1 } from 'zustand';
16
16
  import _createClass from '@babel/runtime/helpers/createClass';
17
17
  import _classCallCheck from '@babel/runtime/helpers/classCallCheck';
18
18
  import { c as commonjsGlobal, g as getDefaultExportFromCjs } from './chunk-65f73e5a.js';
19
- import { t } from 'i18next';
19
+ import { t as t$1 } from 'i18next';
20
20
  import { LeftAlign, CenterAlign, RightAlign, Delete } from '@bigbinary/neeto-icons';
21
21
  import { globalProps } from '@bigbinary/neeto-commons-frontend/initializers';
22
22
  import { D as DIRECT_UPLOAD_ENDPOINT } from './chunk-edd8b9fe.js';
23
+ import _extends from '@babel/runtime/helpers/extends';
23
24
 
24
25
  var useDropFiles = function useDropFiles(_ref) {
25
26
  var dropTargetRef = _ref.dropTargetRef,
@@ -7354,18 +7355,18 @@ var buildImageOptions = function buildImageOptions() {
7354
7355
  return [{
7355
7356
  Icon: LeftAlign,
7356
7357
  alignPos: "left",
7357
- optionName: t("neetoEditor.menu.alignLeft")
7358
+ optionName: t$1("neetoEditor.menu.alignLeft")
7358
7359
  }, {
7359
7360
  Icon: CenterAlign,
7360
7361
  alignPos: "center",
7361
- optionName: t("neetoEditor.menu.alignCenter")
7362
+ optionName: t$1("neetoEditor.menu.alignCenter")
7362
7363
  }, {
7363
7364
  Icon: RightAlign,
7364
7365
  alignPos: "right",
7365
- optionName: t("neetoEditor.menu.alignRight")
7366
+ optionName: t$1("neetoEditor.menu.alignRight")
7366
7367
  }, {
7367
7368
  Icon: Delete,
7368
- optionName: t("neetoEditor.menu.delete")
7369
+ optionName: t$1("neetoEditor.menu.delete")
7369
7370
  }];
7370
7371
  };
7371
7372
  var getTabs = function getTabs(mediaUploader, unsplashApiKey) {
@@ -7389,15 +7390,15 @@ var showWarningToastr = function showWarningToastr(_ref) {
7389
7390
  maxFileSize = _config$restrictions.maxFileSize;
7390
7391
  if (unSupportedFilesCount > 0 || largeFilesCount > 0) {
7391
7392
  if (unSupportedFilesCount > 0) {
7392
- Toastr.error(t("neetoEditor.error.fileNotAllowed"));
7393
+ Toastr.error(t$1("neetoEditor.error.fileNotAllowed"));
7393
7394
  }
7394
7395
  if (largeFilesCount > 0) {
7395
- Toastr.error(t("neetoEditor.error.fileIsTooLarge", {
7396
+ Toastr.error(t$1("neetoEditor.error.fileIsTooLarge", {
7396
7397
  maxFileSize: convertToFileSize(maxFileSize)
7397
7398
  }));
7398
7399
  }
7399
7400
  } else if (selectedFiles.length < initialFiles.length) {
7400
- Toastr.warning(t("neetoEditor.attachments.maxNumberOfFiles", {
7401
+ Toastr.warning(t$1("neetoEditor.attachments.maxNumberOfFiles", {
7401
7402
  entity: maxNumberOfFiles
7402
7403
  }));
7403
7404
  }
@@ -7438,7 +7439,7 @@ var selectFiles = function selectFiles(_ref2) {
7438
7439
  var canAddFile = shouldAddFile(config);
7439
7440
  var remainingAttachments = maxNumberOfFiles - previousAttachmentsCount;
7440
7441
  if (remainingAttachments <= 0) {
7441
- Toastr.warning(t("neetoEditor.attachments.maxNumberOfFiles", {
7442
+ Toastr.warning(t$1("neetoEditor.attachments.maxNumberOfFiles", {
7442
7443
  entity: maxNumberOfFiles
7443
7444
  }));
7444
7445
  return [];
@@ -7628,7 +7629,7 @@ var useFileUploader = function useFileUploader(_ref) {
7628
7629
  };
7629
7630
  };
7630
7631
 
7631
- var propTypes = {exports: {}};
7632
+ var propTypes$1 = {exports: {}};
7632
7633
 
7633
7634
  /**
7634
7635
  * Copyright (c) 2013-present, Facebook, Inc.
@@ -7713,11 +7714,854 @@ var factoryWithThrowingShims = function() {
7713
7714
  {
7714
7715
  // By explicitly using `prop-types` you are opting into new production behavior.
7715
7716
  // http://fb.me/prop-types-in-prod
7716
- propTypes.exports = factoryWithThrowingShims();
7717
+ propTypes$1.exports = factoryWithThrowingShims();
7717
7718
  }
7718
7719
 
7719
- var propTypesExports = propTypes.exports;
7720
+ var propTypesExports = propTypes$1.exports;
7720
7721
  var PropTypes = /*@__PURE__*/getDefaultExportFromCjs(propTypesExports);
7721
7722
 
7722
- export { ALLOWED_IMAGE_TYPES as A, DirectUpload as D, PropTypes as P, useDropFiles as a, buildImageOptions as b, ALLOWED_VIDEO_TYPES as c, directUploadsApi as d, convertToFileSize as e, DEFAULT_IMAGE_UPLOAD_CONFIG as f, DEFAULT_VIDEO_UPLOAD_CONFIG as g, getTabs as h, commonjsRequire as i, propTypesExports as p, useFileUploader as u };
7723
- //# sourceMappingURL=chunk-8199190a.js.map
7723
+ var r={grad:.9,turn:360,rad:360/(2*Math.PI)},t=function(r){return "string"==typeof r?r.length>0:"number"==typeof r},n=function(r,t,n){return void 0===t&&(t=0),void 0===n&&(n=Math.pow(10,t)),Math.round(n*r)/n+0},e=function(r,t,n){return void 0===t&&(t=0),void 0===n&&(n=1),r>n?n:r>t?r:t},u=function(r){return (r=isFinite(r)?r%360:0)>0?r:r+360},a=function(r){return {r:e(r.r,0,255),g:e(r.g,0,255),b:e(r.b,0,255),a:e(r.a)}},o=function(r){return {r:n(r.r),g:n(r.g),b:n(r.b),a:n(r.a,3)}},i=/^#([0-9a-f]{3,8})$/i,s=function(r){var t=r.toString(16);return t.length<2?"0"+t:t},h=function(r){var t=r.r,n=r.g,e=r.b,u=r.a,a=Math.max(t,n,e),o=a-Math.min(t,n,e),i=o?a===t?(n-e)/o:a===n?2+(e-t)/o:4+(t-n)/o:0;return {h:60*(i<0?i+6:i),s:a?o/a*100:0,v:a/255*100,a:u}},b=function(r){var t=r.h,n=r.s,e=r.v,u=r.a;t=t/360*6,n/=100,e/=100;var a=Math.floor(t),o=e*(1-n),i=e*(1-(t-a)*n),s=e*(1-(1-t+a)*n),h=a%6;return {r:255*[e,i,o,o,s,e][h],g:255*[s,e,e,i,o,o][h],b:255*[o,o,s,e,e,i][h],a:u}},g=function(r){return {h:u(r.h),s:e(r.s,0,100),l:e(r.l,0,100),a:e(r.a)}},d=function(r){return {h:n(r.h),s:n(r.s),l:n(r.l),a:n(r.a,3)}},f=function(r){return b((n=(t=r).s,{h:t.h,s:(n*=((e=t.l)<50?e:100-e)/100)>0?2*n/(e+n)*100:0,v:e+n,a:t.a}));var t,n,e;},c=function(r){return {h:(t=h(r)).h,s:(u=(200-(n=t.s))*(e=t.v)/100)>0&&u<200?n*e/100/(u<=100?u:200-u)*100:0,l:u/2,a:t.a};var t,n,e,u;},l=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s*,\s*([+-]?\d*\.?\d+)%\s*,\s*([+-]?\d*\.?\d+)%\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,p=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s+([+-]?\d*\.?\d+)%\s+([+-]?\d*\.?\d+)%\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,v=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,m=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,y={string:[[function(r){var t=i.exec(r);return t?(r=t[1]).length<=4?{r:parseInt(r[0]+r[0],16),g:parseInt(r[1]+r[1],16),b:parseInt(r[2]+r[2],16),a:4===r.length?n(parseInt(r[3]+r[3],16)/255,2):1}:6===r.length||8===r.length?{r:parseInt(r.substr(0,2),16),g:parseInt(r.substr(2,2),16),b:parseInt(r.substr(4,2),16),a:8===r.length?n(parseInt(r.substr(6,2),16)/255,2):1}:null:null},"hex"],[function(r){var t=v.exec(r)||m.exec(r);return t?t[2]!==t[4]||t[4]!==t[6]?null:a({r:Number(t[1])/(t[2]?100/255:1),g:Number(t[3])/(t[4]?100/255:1),b:Number(t[5])/(t[6]?100/255:1),a:void 0===t[7]?1:Number(t[7])/(t[8]?100:1)}):null},"rgb"],[function(t){var n=l.exec(t)||p.exec(t);if(!n)return null;var e,u,a=g({h:(e=n[1],u=n[2],void 0===u&&(u="deg"),Number(e)*(r[u]||1)),s:Number(n[3]),l:Number(n[4]),a:void 0===n[5]?1:Number(n[5])/(n[6]?100:1)});return f(a)},"hsl"]],object:[[function(r){var n=r.r,e=r.g,u=r.b,o=r.a,i=void 0===o?1:o;return t(n)&&t(e)&&t(u)?a({r:Number(n),g:Number(e),b:Number(u),a:Number(i)}):null},"rgb"],[function(r){var n=r.h,e=r.s,u=r.l,a=r.a,o=void 0===a?1:a;if(!t(n)||!t(e)||!t(u))return null;var i=g({h:Number(n),s:Number(e),l:Number(u),a:Number(o)});return f(i)},"hsl"],[function(r){var n=r.h,a=r.s,o=r.v,i=r.a,s=void 0===i?1:i;if(!t(n)||!t(a)||!t(o))return null;var h=function(r){return {h:u(r.h),s:e(r.s,0,100),v:e(r.v,0,100),a:e(r.a)}}({h:Number(n),s:Number(a),v:Number(o),a:Number(s)});return b(h)},"hsv"]]},N=function(r,t){for(var n=0;n<t.length;n++){var e=t[n][0](r);if(e)return [e,t[n][1]]}return [null,void 0]},x=function(r){return "string"==typeof r?N(r.trim(),y.string):"object"==typeof r&&null!==r?N(r,y.object):[null,void 0]},M=function(r,t){var n=c(r);return {h:n.h,s:e(n.s+100*t,0,100),l:n.l,a:n.a}},H=function(r){return (299*r.r+587*r.g+114*r.b)/1e3/255},$=function(r,t){var n=c(r);return {h:n.h,s:n.s,l:e(n.l+100*t,0,100),a:n.a}},j=function(){function r(r){this.parsed=x(r)[0],this.rgba=this.parsed||{r:0,g:0,b:0,a:1};}return r.prototype.isValid=function(){return null!==this.parsed},r.prototype.brightness=function(){return n(H(this.rgba),2)},r.prototype.isDark=function(){return H(this.rgba)<.5},r.prototype.isLight=function(){return H(this.rgba)>=.5},r.prototype.toHex=function(){return r=o(this.rgba),t=r.r,e=r.g,u=r.b,i=(a=r.a)<1?s(n(255*a)):"","#"+s(t)+s(e)+s(u)+i;var r,t,e,u,a,i;},r.prototype.toRgb=function(){return o(this.rgba)},r.prototype.toRgbString=function(){return r=o(this.rgba),t=r.r,n=r.g,e=r.b,(u=r.a)<1?"rgba("+t+", "+n+", "+e+", "+u+")":"rgb("+t+", "+n+", "+e+")";var r,t,n,e,u;},r.prototype.toHsl=function(){return d(c(this.rgba))},r.prototype.toHslString=function(){return r=d(c(this.rgba)),t=r.h,n=r.s,e=r.l,(u=r.a)<1?"hsla("+t+", "+n+"%, "+e+"%, "+u+")":"hsl("+t+", "+n+"%, "+e+"%)";var r,t,n,e,u;},r.prototype.toHsv=function(){return r=h(this.rgba),{h:n(r.h),s:n(r.s),v:n(r.v),a:n(r.a,3)};var r;},r.prototype.invert=function(){return w({r:255-(r=this.rgba).r,g:255-r.g,b:255-r.b,a:r.a});var r;},r.prototype.saturate=function(r){return void 0===r&&(r=.1),w(M(this.rgba,r))},r.prototype.desaturate=function(r){return void 0===r&&(r=.1),w(M(this.rgba,-r))},r.prototype.grayscale=function(){return w(M(this.rgba,-1))},r.prototype.lighten=function(r){return void 0===r&&(r=.1),w($(this.rgba,r))},r.prototype.darken=function(r){return void 0===r&&(r=.1),w($(this.rgba,-r))},r.prototype.rotate=function(r){return void 0===r&&(r=15),this.hue(this.hue()+r)},r.prototype.alpha=function(r){return "number"==typeof r?w({r:(t=this.rgba).r,g:t.g,b:t.b,a:r}):n(this.rgba.a,3);var t;},r.prototype.hue=function(r){var t=c(this.rgba);return "number"==typeof r?w({h:r,s:t.s,l:t.l,a:t.a}):n(t.h)},r.prototype.isEqual=function(r){return this.toHex()===w(r).toHex()},r}(),w=function(r){return r instanceof j?r:new j(r)},S=[],k=function(r){r.forEach(function(r){S.indexOf(r)<0&&(r(j,y),S.push(r));});};
7724
+
7725
+ function namesPlugin(e,f){var a={white:"#ffffff",bisque:"#ffe4c4",blue:"#0000ff",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",antiquewhite:"#faebd7",aqua:"#00ffff",azure:"#f0ffff",whitesmoke:"#f5f5f5",papayawhip:"#ffefd5",plum:"#dda0dd",blanchedalmond:"#ffebcd",black:"#000000",gold:"#ffd700",goldenrod:"#daa520",gainsboro:"#dcdcdc",cornsilk:"#fff8dc",cornflowerblue:"#6495ed",burlywood:"#deb887",aquamarine:"#7fffd4",beige:"#f5f5dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkkhaki:"#bdb76b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",peachpuff:"#ffdab9",darkmagenta:"#8b008b",darkred:"#8b0000",darkorchid:"#9932cc",darkorange:"#ff8c00",darkslateblue:"#483d8b",gray:"#808080",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",deeppink:"#ff1493",deepskyblue:"#00bfff",wheat:"#f5deb3",firebrick:"#b22222",floralwhite:"#fffaf0",ghostwhite:"#f8f8ff",darkviolet:"#9400d3",magenta:"#ff00ff",green:"#008000",dodgerblue:"#1e90ff",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",blueviolet:"#8a2be2",forestgreen:"#228b22",lawngreen:"#7cfc00",indianred:"#cd5c5c",indigo:"#4b0082",fuchsia:"#ff00ff",brown:"#a52a2a",maroon:"#800000",mediumblue:"#0000cd",lightcoral:"#f08080",darkturquoise:"#00ced1",lightcyan:"#e0ffff",ivory:"#fffff0",lightyellow:"#ffffe0",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",linen:"#faf0e6",mediumaquamarine:"#66cdaa",lemonchiffon:"#fffacd",lime:"#00ff00",khaki:"#f0e68c",mediumseagreen:"#3cb371",limegreen:"#32cd32",mediumspringgreen:"#00fa9a",lightskyblue:"#87cefa",lightblue:"#add8e6",midnightblue:"#191970",lightpink:"#ffb6c1",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",mintcream:"#f5fffa",lightslategray:"#778899",lightslategrey:"#778899",navajowhite:"#ffdead",navy:"#000080",mediumvioletred:"#c71585",powderblue:"#b0e0e6",palegoldenrod:"#eee8aa",oldlace:"#fdf5e6",paleturquoise:"#afeeee",mediumturquoise:"#48d1cc",mediumorchid:"#ba55d3",rebeccapurple:"#663399",lightsteelblue:"#b0c4de",mediumslateblue:"#7b68ee",thistle:"#d8bfd8",tan:"#d2b48c",orchid:"#da70d6",mediumpurple:"#9370db",purple:"#800080",pink:"#ffc0cb",skyblue:"#87ceeb",springgreen:"#00ff7f",palegreen:"#98fb98",red:"#ff0000",yellow:"#ffff00",slateblue:"#6a5acd",lavenderblush:"#fff0f5",peru:"#cd853f",palevioletred:"#db7093",violet:"#ee82ee",teal:"#008080",slategray:"#708090",slategrey:"#708090",aliceblue:"#f0f8ff",darkseagreen:"#8fbc8f",darkolivegreen:"#556b2f",greenyellow:"#adff2f",seagreen:"#2e8b57",seashell:"#fff5ee",tomato:"#ff6347",silver:"#c0c0c0",sienna:"#a0522d",lavender:"#e6e6fa",lightgreen:"#90ee90",orange:"#ffa500",orangered:"#ff4500",steelblue:"#4682b4",royalblue:"#4169e1",turquoise:"#40e0d0",yellowgreen:"#9acd32",salmon:"#fa8072",saddlebrown:"#8b4513",sandybrown:"#f4a460",rosybrown:"#bc8f8f",darksalmon:"#e9967a",lightgoldenrodyellow:"#fafad2",snow:"#fffafa",lightgrey:"#d3d3d3",lightgray:"#d3d3d3",dimgray:"#696969",dimgrey:"#696969",olivedrab:"#6b8e23",olive:"#808000"},r={};for(var d in a)r[a[d]]=d;var l={};e.prototype.toName=function(f){if(!(this.rgba.a||this.rgba.r||this.rgba.g||this.rgba.b))return "transparent";var d,i,n=r[this.toHex()];if(n)return n;if(null==f?void 0:f.closest){var o=this.toRgb(),t=1/0,b="black";if(!l.length)for(var c in a)l[c]=new e(a[c]).toRgb();for(var g in a){var u=(d=o,i=l[g],Math.pow(d.r-i.r,2)+Math.pow(d.g-i.g,2)+Math.pow(d.b-i.b,2));u<t&&(t=u,b=g);}return b}};f.string.push([function(f){var r=f.toLowerCase(),d="transparent"===r?"#0000":a[r];return d?new e(d).toRgb():null},"name"]);}
7726
+
7727
+ /**
7728
+ * lodash (Custom Build) <https://lodash.com/>
7729
+ * Build: `lodash modularize exports="npm" -o ./`
7730
+ * Copyright jQuery Foundation and other contributors <https://jquery.org/>
7731
+ * Released under MIT license <https://lodash.com/license>
7732
+ * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
7733
+ * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
7734
+ */
7735
+
7736
+ /** Used as references for various `Number` constants. */
7737
+ var INFINITY = 1 / 0;
7738
+
7739
+ /** `Object#toString` result references. */
7740
+ var symbolTag = '[object Symbol]';
7741
+
7742
+ /** Detect free variable `global` from Node.js. */
7743
+ var freeGlobal = typeof commonjsGlobal == 'object' && commonjsGlobal && commonjsGlobal.Object === Object && commonjsGlobal;
7744
+
7745
+ /** Detect free variable `self`. */
7746
+ var freeSelf = typeof self == 'object' && self && self.Object === Object && self;
7747
+
7748
+ /** Used as a reference to the global object. */
7749
+ var root = freeGlobal || freeSelf || Function('return this')();
7750
+
7751
+ /** Used for built-in method references. */
7752
+ var objectProto = Object.prototype;
7753
+
7754
+ /** Used to generate unique IDs. */
7755
+ var idCounter = 0;
7756
+
7757
+ /**
7758
+ * Used to resolve the
7759
+ * [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring)
7760
+ * of values.
7761
+ */
7762
+ var objectToString = objectProto.toString;
7763
+
7764
+ /** Built-in value references. */
7765
+ var Symbol = root.Symbol;
7766
+
7767
+ /** Used to convert symbols to primitives and strings. */
7768
+ var symbolProto = Symbol ? Symbol.prototype : undefined,
7769
+ symbolToString = symbolProto ? symbolProto.toString : undefined;
7770
+
7771
+ /**
7772
+ * The base implementation of `_.toString` which doesn't convert nullish
7773
+ * values to empty strings.
7774
+ *
7775
+ * @private
7776
+ * @param {*} value The value to process.
7777
+ * @returns {string} Returns the string.
7778
+ */
7779
+ function baseToString(value) {
7780
+ // Exit early for strings to avoid a performance hit in some environments.
7781
+ if (typeof value == 'string') {
7782
+ return value;
7783
+ }
7784
+ if (isSymbol(value)) {
7785
+ return symbolToString ? symbolToString.call(value) : '';
7786
+ }
7787
+ var result = (value + '');
7788
+ return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;
7789
+ }
7790
+
7791
+ /**
7792
+ * Checks if `value` is object-like. A value is object-like if it's not `null`
7793
+ * and has a `typeof` result of "object".
7794
+ *
7795
+ * @static
7796
+ * @memberOf _
7797
+ * @since 4.0.0
7798
+ * @category Lang
7799
+ * @param {*} value The value to check.
7800
+ * @returns {boolean} Returns `true` if `value` is object-like, else `false`.
7801
+ * @example
7802
+ *
7803
+ * _.isObjectLike({});
7804
+ * // => true
7805
+ *
7806
+ * _.isObjectLike([1, 2, 3]);
7807
+ * // => true
7808
+ *
7809
+ * _.isObjectLike(_.noop);
7810
+ * // => false
7811
+ *
7812
+ * _.isObjectLike(null);
7813
+ * // => false
7814
+ */
7815
+ function isObjectLike(value) {
7816
+ return !!value && typeof value == 'object';
7817
+ }
7818
+
7819
+ /**
7820
+ * Checks if `value` is classified as a `Symbol` primitive or object.
7821
+ *
7822
+ * @static
7823
+ * @memberOf _
7824
+ * @since 4.0.0
7825
+ * @category Lang
7826
+ * @param {*} value The value to check.
7827
+ * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.
7828
+ * @example
7829
+ *
7830
+ * _.isSymbol(Symbol.iterator);
7831
+ * // => true
7832
+ *
7833
+ * _.isSymbol('abc');
7834
+ * // => false
7835
+ */
7836
+ function isSymbol(value) {
7837
+ return typeof value == 'symbol' ||
7838
+ (isObjectLike(value) && objectToString.call(value) == symbolTag);
7839
+ }
7840
+
7841
+ /**
7842
+ * Converts `value` to a string. An empty string is returned for `null`
7843
+ * and `undefined` values. The sign of `-0` is preserved.
7844
+ *
7845
+ * @static
7846
+ * @memberOf _
7847
+ * @since 4.0.0
7848
+ * @category Lang
7849
+ * @param {*} value The value to process.
7850
+ * @returns {string} Returns the string.
7851
+ * @example
7852
+ *
7853
+ * _.toString(null);
7854
+ * // => ''
7855
+ *
7856
+ * _.toString(-0);
7857
+ * // => '-0'
7858
+ *
7859
+ * _.toString([1, 2, 3]);
7860
+ * // => '1,2,3'
7861
+ */
7862
+ function toString(value) {
7863
+ return value == null ? '' : baseToString(value);
7864
+ }
7865
+
7866
+ /**
7867
+ * Generates a unique ID. If `prefix` is given, the ID is appended to it.
7868
+ *
7869
+ * @static
7870
+ * @since 0.1.0
7871
+ * @memberOf _
7872
+ * @category Util
7873
+ * @param {string} [prefix=''] The value to prefix the ID with.
7874
+ * @returns {string} Returns the unique ID.
7875
+ * @example
7876
+ *
7877
+ * _.uniqueId('contact_');
7878
+ * // => 'contact_104'
7879
+ *
7880
+ * _.uniqueId();
7881
+ * // => '105'
7882
+ */
7883
+ function uniqueId(prefix) {
7884
+ var id = ++idCounter;
7885
+ return toString(prefix) + id;
7886
+ }
7887
+
7888
+ var lodash_uniqueid = uniqueId;
7889
+
7890
+ var uniqueId$1 = /*@__PURE__*/getDefaultExportFromCjs(lodash_uniqueid);
7891
+
7892
+ var glyphs = {
7893
+ '3d': /*#__PURE__*/React__default.createElement("path", {
7894
+ d: "M18 14.625V3.375L9 0 0 3.375v11.25L9 18l9-3.375zM9 2.136l5.918 2.22-5.98 2.242-5.919-2.22L9 2.137zM2 13.239V5.065l6.438 2.414v8.174L2 13.24zM9.438 15.7L16 13.239V5.018l-6.563 2.46V15.7z",
7895
+ transform: "translate(15 10)",
7896
+ fillRule: "evenodd"
7897
+ }),
7898
+ acrobat: /*#__PURE__*/React__default.createElement("path", {
7899
+ d: "M10.15 1.095C9.938.33 9.42-.051 8.984.005c-.528.068-1.09.382-1.314.876-.63 1.416.685 5.582.887 6.279-1.28 3.863-5.66 11.5-7.806 12.017-.045-.505.225-1.965 3.055-3.785.146-.157.315-.348.393-.472-2.392 1.168-5.492 3.044-3.628 4.448.102.079.259.146.439.213 1.426.528 3.425-1.201 5.435-5.121 2.213-.73 3.999-1.28 6.526-1.662 2.762 1.875 4.616 2.257 5.874 1.774.348-.135.898-.573 1.055-1.145-1.022 1.258-3.414.382-5.323-.82 1.763-.191 3.582-.303 4.369-.056 1 .314.965.808.954.876.079-.27.191-.708-.022-1.056-.842-1.37-4.706-.573-6.11-.427-2.212-1.336-3.74-3.717-4.358-5.436.573-2.212 1.19-3.818.742-5.413zm-.954 4.638C8.826 4.42 8.309 1.5 9.14.556c1.628.932.618 3.144.056 5.177zm3.044 6.514c-2.134.393-3.583.944-5.66 1.764.617-1.202 1.785-4.268 2.346-6.29.787 1.573 1.741 3.111 3.314 4.526z",
7900
+ transform: "translate(14 9)",
7901
+ fillRule: "evenodd"
7902
+ }),
7903
+ android: /*#__PURE__*/React__default.createElement("path", {
7904
+ d: "M17.6,9.48l1.84-3.18c0.16-0.31,0.04-0.69-0.26-0.85c-0.29-0.15-0.65-0.06-0.83,0.22l-1.88,3.24 c-2.86-1.21-6.08-1.21-8.94,0L5.65,5.67c-0.19-0.29-0.58-0.38-0.87-0.2C4.5,5.65,4.41,6.01,4.56,6.3L6.4,9.48 C3.3,11.25,1.28,14.44,1,18h22C22.72,14.44,20.7,11.25,17.6,9.48z M7,15.25c-0.69,0-1.25-0.56-1.25-1.25 c0-0.69,0.56-1.25,1.25-1.25S8.25,13.31,8.25,14C8.25,14.69,7.69,15.25,7,15.25z M17,15.25c-0.69,0-1.25-0.56-1.25-1.25 c0-0.69,0.56-1.25,1.25-1.25s1.25,0.56,1.25,1.25C18.25,14.69,17.69,15.25,17,15.25z",
7905
+ transform: "translate(12 8)"
7906
+ }),
7907
+ audio: /*#__PURE__*/React__default.createElement("path", {
7908
+ d: "M.25 4.75v4.5h3L7 13V1L3.25 4.75h-3zM10.375 7A3.375 3.375 0 0 0 8.5 3.977v6.037A3.355 3.355 0 0 0 10.375 7zM8.5.421v1.545A5.254 5.254 0 0 1 12.25 7a5.254 5.254 0 0 1-3.75 5.032v1.545A6.747 6.747 0 0 0 13.75 7 6.747 6.747 0 0 0 8.5.421z",
7909
+ transform: "translate(17 12)",
7910
+ fillRule: "evenodd"
7911
+ }),
7912
+ binary: /*#__PURE__*/React__default.createElement("path", {
7913
+ d: "M2.338 6.112c1.192 0 1.928-1.072 1.928-2.68 0-1.56-.576-2.504-1.8-2.504C1.274.928.538 2 .538 3.608c0 1.56.576 2.504 1.8 2.504zM1.61 3.408c0-1.008.24-1.568.776-1.568.376 0 .616.336.728.888l-1.504.776v-.096zM2.418 5.2c-.368 0-.608-.32-.72-.856l1.496-.768v.056c0 1.008-.24 1.568-.776 1.568zm7.03.8l.088-.944H8.36V.896L7.272.984v.592l-1.184.112.024.824h1.16v2.544h-1.32V6zm5.199 0l.088-.944h-1.176V.896L12.47.984v.592l-1.184.112.024.824h1.16v2.544h-1.32V6zM4.25 14l.088-.944H3.162v-4.16l-1.088.088v.592L.89 9.688l.024.824h1.16v2.544H.754V14zm5.198 0l.088-.944H8.36v-4.16l-1.088.088v.592l-1.184.112.024.824h1.16v2.544h-1.32V14zm3.287.112c1.192 0 1.928-1.072 1.928-2.68 0-1.56-.576-2.504-1.8-2.504-1.192 0-1.928 1.072-1.928 2.68 0 1.56.576 2.504 1.8 2.504zm-.728-2.704c0-1.008.24-1.568.776-1.568.376 0 .616.336.728.888l-1.504.776v-.096zm.808 1.792c-.368 0-.608-.32-.72-.856l1.496-.768v.056c0 1.008-.24 1.568-.776 1.568z",
7914
+ transform: "translate(16 11)",
7915
+ fillRule: "evenodd"
7916
+ }),
7917
+ code: /*#__PURE__*/React__default.createElement("path", {
7918
+ d: "M4.078 13.67c-1.875-.527-2.812-1.738-2.812-3.634V9.49C1.266 8.437.844 7.911 0 7.911V6.138c.844 0 1.266-.529 1.266-1.586v-.64c.015-.938.257-1.696.726-2.274C2.466 1.06 3.162.64 4.078.38l.492 1.375c-.656.25-.997.95-1.023 2.102v.695c0 1.167-.482 1.99-1.445 2.469.963.479 1.445 1.304 1.445 2.476v.688c.026 1.15.367 1.851 1.023 2.101l-.492 1.383zm7.844 0c1.875-.527 2.812-1.738 2.812-3.634V9.49c0-1.052.422-1.578 1.266-1.578V6.138c-.844 0-1.266-.529-1.266-1.586v-.64c-.015-.938-.257-1.696-.726-2.274-.474-.578-1.17-.998-2.086-1.258l-.492 1.375c.656.25.997.95 1.023 2.102v.695c0 1.167.482 1.99 1.445 2.469-.963.479-1.445 1.304-1.445 2.476v.688c-.026 1.15-.367 1.851-1.023 2.101l.492 1.383z",
7919
+ transform: "translate(16 13)",
7920
+ fillRule: "evenodd"
7921
+ }),
7922
+ code2: /*#__PURE__*/React__default.createElement("path", {
7923
+ d: "M7.4 10.6L2.8 6l4.6-4.6L6 0 0 6l6 6 1.4-1.4zm5.2 0L17.2 6l-4.6-4.6L14 0l6 6-6 6-1.4-1.4z",
7924
+ transform: "translate(14 14)",
7925
+ fillRule: "evenodd"
7926
+ }),
7927
+ compressed: /*#__PURE__*/React__default.createElement("path", {
7928
+ d: "M.25 0A.25.25 0 0 0 0 .25v1.5c0 .138.112.25.25.25h1.5A.25.25 0 0 0 2 1.75V.25A.25.25 0 0 0 1.75 0H.25zM1 17a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h2a1 1 0 0 0 1-1v-6a1 1 0 0 0-1-1H1zm0 4v3h2v-3H1zM2 2.25A.25.25 0 0 1 2.25 2h1.5a.25.25 0 0 1 .25.25v1.5a.25.25 0 0 1-.25.25h-1.5A.25.25 0 0 1 2 3.75v-1.5zM.25 4a.25.25 0 0 0-.25.25v1.5c0 .138.112.25.25.25h1.5A.25.25 0 0 0 2 5.75v-1.5A.25.25 0 0 0 1.75 4H.25zM2 6.25A.25.25 0 0 1 2.25 6h1.5a.25.25 0 0 1 .25.25v1.5a.25.25 0 0 1-.25.25h-1.5A.25.25 0 0 1 2 7.75v-1.5zM.25 8a.25.25 0 0 0-.25.25v1.5c0 .138.112.25.25.25h1.5A.25.25 0 0 0 2 9.75v-1.5A.25.25 0 0 0 1.75 8H.25zM2 10.25a.25.25 0 0 1 .25-.25h1.5a.25.25 0 0 1 .25.25v1.5a.25.25 0 0 1-.25.25h-1.5a.25.25 0 0 1-.25-.25v-1.5zM.25 12a.25.25 0 0 0-.25.25v1.5c0 .138.112.25.25.25h1.5a.25.25 0 0 0 .25-.25v-1.5a.25.25 0 0 0-.25-.25H.25zM2 14.25a.25.25 0 0 1 .25-.25h1.5a.25.25 0 0 1 .25.25v1.5a.25.25 0 0 1-.25.25h-1.5a.25.25 0 0 1-.25-.25v-1.5z",
7929
+ transform: "translate(15 1)",
7930
+ fillRule: "evenodd"
7931
+ }),
7932
+ document: /*#__PURE__*/React__default.createElement("path", {
7933
+ d: "M12 4H0v2h12V4zM0 10h18V8H0v2zM0 0v2h18V0H0z",
7934
+ transform: "translate(15 15)",
7935
+ fillRule: "evenodd"
7936
+ }),
7937
+ drive: /*#__PURE__*/React__default.createElement("path", {
7938
+ d: "M2.199.289A.5.5 0 0 1 2.652 0h8.696a.5.5 0 0 1 .453.289l1.867 4a.5.5 0 0 1-.453.711H.785a.5.5 0 0 1-.453-.711l1.867-4zM13 6H1a.752.752 0 0 0-.75.75v4.5c0 .412.338.75.75.75h12c.412 0 .75-.338.75-.75v-4.5A.752.752 0 0 0 13 6zm-9.75 4.5c-.825 0-1.5-.675-1.5-1.5s.675-1.5 1.5-1.5 1.5.675 1.5 1.5-.675 1.5-1.5 1.5z",
7939
+ transform: "translate(17 13)",
7940
+ fillRule: "evenodd"
7941
+ }),
7942
+ font: /*#__PURE__*/React__default.createElement("path", {
7943
+ d: "M3.722 8.702l-.686 1.89c-.053.14-.094.28-.123.421-.03.135-.044.252-.044.352 0 .304.097.527.29.668.2.14.501.21.905.21h.414V13H.083v-.756h.343c.176 0 .325-.018.448-.053a.81.81 0 0 0 .334-.22c.1-.105.193-.249.281-.43.094-.182.197-.416.308-.704L5.787.15h1.406l4.07 11.136c.07.187.14.343.21.466.077.123.165.222.264.298.1.07.214.12.343.15.129.03.281.044.457.044h.237V13H7.826v-.756h.413c.72 0 1.081-.287 1.081-.862 0-.1-.014-.202-.044-.307a3.274 3.274 0 0 0-.105-.36l-.72-2.013H3.72zM7.009 4.65c-.188-.533-.36-1.031-.519-1.494a15.92 15.92 0 0 1-.378-1.354 7.12 7.12 0 0 1-.15.633 16.95 16.95 0 0 1-.395 1.283c-.082.229-.175.484-.28.765L4.063 7.796h4.061L7.009 4.65zm8.411 5.74c0 .562.117.984.351 1.265.24.275.61.413 1.108.413.363 0 .691-.059.984-.176.3-.117.551-.284.756-.5.211-.218.372-.481.483-.792.112-.31.168-.656.168-1.037V8.104l-1.152.053c-.51.023-.937.088-1.283.193-.34.1-.615.243-.826.43a1.546 1.546 0 0 0-.457.678c-.088.27-.132.58-.132.931zm2.18-6.32c-.346 0-.627.05-.844.15a1.182 1.182 0 0 0-.501.404 1.594 1.594 0 0 0-.237.624c-.041.24-.062.5-.062.782-.498 0-.879-.085-1.143-.255-.257-.17-.386-.463-.386-.879 0-.31.085-.574.255-.79.17-.218.401-.393.694-.528.299-.14.644-.243 1.037-.308a7.76 7.76 0 0 1 1.257-.097c.55 0 1.031.056 1.441.167.41.106.753.282 1.029.528.275.246.48.568.615.967.14.392.21.876.21 1.45v4.667c0 .252.021.46.062.624a.928.928 0 0 0 .194.395c.088.1.202.17.343.211.146.041.319.062.518.062h.053V13H19.7l-.281-1.547h-.15c-.187.252-.369.483-.544.694-.176.211-.37.393-.58.545-.211.152-.452.27-.721.352a3.053 3.053 0 0 1-.958.131c-.399 0-.77-.058-1.116-.175a2.369 2.369 0 0 1-.888-.519 2.516 2.516 0 0 1-.58-.896c-.14-.364-.211-.791-.211-1.284 0-.955.34-1.664 1.02-2.127.68-.462 1.707-.714 3.084-.755l1.495-.053V6.285a6.93 6.93 0 0 0-.053-.888 1.778 1.778 0 0 0-.229-.703 1.14 1.14 0 0 0-.51-.457c-.216-.111-.51-.167-.878-.167z",
7944
+ transform: "translate(13 12)",
7945
+ fillRule: "evenodd"
7946
+ }),
7947
+ image: /*#__PURE__*/React__default.createElement("path", {
7948
+ d: "M13 0L9.25 5l2.85 3.8-1.6 1.2C8.81 7.75 6 4 6 4l-6 8h22L13 0z",
7949
+ transform: "translate(13 14)",
7950
+ fillRule: "evenodd"
7951
+ }),
7952
+ presentation: /*#__PURE__*/React__default.createElement("path", {
7953
+ d: "M2 4H0v10c0 1.1.9 2 2 2h14v-2H2V4zm16-4H6C4.9 0 4 .9 4 2v8c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V2c0-1.1-.9-2-2-2zm0 10H6V2h12v8z",
7954
+ transform: "matrix(-1 0 0 1 34 12)",
7955
+ fillRule: "evenodd"
7956
+ }),
7957
+ settings: /*#__PURE__*/React__default.createElement("path", {
7958
+ d: "M13.572 8.735c.03-.24.053-.48.053-.735s-.023-.495-.053-.735l1.583-1.237a.378.378 0 0 0 .09-.48l-1.5-2.595a.377.377 0 0 0-.457-.165l-1.868.75a5.48 5.48 0 0 0-1.268-.735L9.868.815A.366.366 0 0 0 9.5.5h-3a.366.366 0 0 0-.367.315l-.285 1.988a5.762 5.762 0 0 0-1.268.735l-1.868-.75a.366.366 0 0 0-.457.165l-1.5 2.595a.37.37 0 0 0 .09.48l1.583 1.237c-.03.24-.053.488-.053.735 0 .248.022.495.053.735L.845 9.973a.378.378 0 0 0-.09.48l1.5 2.595c.09.165.292.225.458.165l1.867-.75c.39.3.81.547 1.268.735l.285 1.987c.022.18.18.315.367.315h3a.366.366 0 0 0 .367-.315l.285-1.988a5.762 5.762 0 0 0 1.268-.734l1.867.75c.173.067.368 0 .458-.165l1.5-2.595a.378.378 0 0 0-.09-.48l-1.582-1.238zM8 10.625A2.628 2.628 0 0 1 5.375 8 2.628 2.628 0 0 1 8 5.375 2.628 2.628 0 0 1 10.625 8 2.628 2.628 0 0 1 8 10.625z",
7959
+ transform: "translate(16 11)",
7960
+ fillRule: "evenodd"
7961
+ }),
7962
+ spreadsheet: /*#__PURE__*/React__default.createElement("path", {
7963
+ d: "M0 8h6V5H0v3zm0 5h6v-3H0v3zM0 3h6V0H0v3zm8 5h12V5H8v3zm0 5h12v-3H8v3zM8 0v3h12V0H8z",
7964
+ transform: "translate(14 14)",
7965
+ fillRule: "evenodd"
7966
+ }),
7967
+ vector: /*#__PURE__*/React__default.createElement("path", {
7968
+ d: "M14.5 2V1a1 1 0 0 0-1-1h-3a1 1 0 0 0-1 1v1H3.937a2 2 0 1 0 0 1h3.936A9 9 0 0 0 3 11v1h2v-1a7.003 7.003 0 0 1 4.594-6.576A1 1 0 0 0 10.5 5h3a1 1 0 0 0 .906-.576A7.003 7.003 0 0 1 19 11v1h2v-1a9 9 0 0 0-4.873-8h3.936a2 2 0 1 0 0-1H14.5zm-1-1h-3v3h3V1zM2 1.5a1 1 0 1 0 0 2 1 1 0 0 0 0-2zm19 1a1 1 0 1 0 2 0 1 1 0 0 0-2 0z",
7969
+ transform: "translate(12 14)",
7970
+ fillRule: "evenodd"
7971
+ }),
7972
+ video: /*#__PURE__*/React__default.createElement("path", {
7973
+ d: "M10.75 3.875V1.25A.752.752 0 0 0 10 .5H1a.752.752 0 0 0-.75.75v7.5c0 .412.338.75.75.75h9c.412 0 .75-.338.75-.75V6.125l3 3V.875l-3 3z",
7974
+ transform: "translate(17 14)"
7975
+ })
7976
+ };
7977
+
7978
+ k([namesPlugin]);
7979
+ var propTypes = {
7980
+ /** Color of icon background */
7981
+ color: PropTypes.string,
7982
+
7983
+ /** Text to display in label */
7984
+ extension: PropTypes.string,
7985
+
7986
+ /** Displays the corner fold */
7987
+ fold: PropTypes.bool,
7988
+
7989
+ /** Color of the corner fold */
7990
+ foldColor: PropTypes.string,
7991
+
7992
+ /** Color of file type icon */
7993
+ glyphColor: PropTypes.string,
7994
+
7995
+ /** Color of page gradient */
7996
+ gradientColor: PropTypes.string,
7997
+
7998
+ /** Opacity of page gradient */
7999
+ gradientOpacity: PropTypes.number,
8000
+
8001
+ /** Color of label */
8002
+ labelColor: PropTypes.string,
8003
+
8004
+ /** Color of label text */
8005
+ labelTextColor: PropTypes.string,
8006
+
8007
+ /** Displays the label in all caps */
8008
+ labelUppercase: PropTypes.bool,
8009
+
8010
+ /** Corner radius of the file icon */
8011
+ radius: PropTypes.number,
8012
+
8013
+ /** Type of glyph icon to display */
8014
+ type: PropTypes.oneOf(['3d', 'acrobat', 'android', 'audio', 'binary', 'code', 'code2', 'compressed', 'document', 'drive', 'font', 'image', 'presentation', 'settings', 'spreadsheet', 'vector', 'video'])
8015
+ };
8016
+ var VIEWBOX = {
8017
+ WIDTH: 40,
8018
+ HEIGHT: 48
8019
+ };
8020
+ var ICON = {
8021
+ WIDTH: VIEWBOX.WIDTH,
8022
+ HEIGHT: VIEWBOX.HEIGHT,
8023
+ X_OFFSET: 0
8024
+ };
8025
+ var FOLD = {
8026
+ HEIGHT: 12
8027
+ };
8028
+ var LABEL_HEIGHT = 14;
8029
+ var FileIcon = function FileIcon(_ref) {
8030
+ var _ref$color = _ref.color,
8031
+ color = _ref$color === void 0 ? 'whitesmoke' : _ref$color,
8032
+ extension = _ref.extension,
8033
+ _ref$fold = _ref.fold,
8034
+ fold = _ref$fold === void 0 ? true : _ref$fold,
8035
+ foldColor = _ref.foldColor,
8036
+ glyphColor = _ref.glyphColor,
8037
+ _ref$gradientColor = _ref.gradientColor,
8038
+ gradientColor = _ref$gradientColor === void 0 ? 'white' : _ref$gradientColor,
8039
+ _ref$gradientOpacity = _ref.gradientOpacity,
8040
+ gradientOpacity = _ref$gradientOpacity === void 0 ? 0.25 : _ref$gradientOpacity,
8041
+ labelColor = _ref.labelColor,
8042
+ _ref$labelTextColor = _ref.labelTextColor,
8043
+ labelTextColor = _ref$labelTextColor === void 0 ? 'white' : _ref$labelTextColor,
8044
+ _ref$labelUppercase = _ref.labelUppercase,
8045
+ labelUppercase = _ref$labelUppercase === void 0 ? false : _ref$labelUppercase,
8046
+ _ref$radius = _ref.radius,
8047
+ radius = _ref$radius === void 0 ? 4 : _ref$radius,
8048
+ type = _ref.type;
8049
+ var UNIQUE_ID = uniqueId$1();
8050
+ return /*#__PURE__*/React__default.createElement("svg", {
8051
+ xmlns: "http://www.w3.org/2000/svg",
8052
+ viewBox: "0 0 " + VIEWBOX.WIDTH + " " + VIEWBOX.HEIGHT,
8053
+ width: "100%",
8054
+ style: {
8055
+ maxWidth: '100%'
8056
+ }
8057
+ }, /*#__PURE__*/React__default.createElement("defs", null, /*#__PURE__*/React__default.createElement("clipPath", {
8058
+ id: "pageRadius" + UNIQUE_ID
8059
+ }, /*#__PURE__*/React__default.createElement("rect", {
8060
+ x: ICON.X_OFFSET,
8061
+ y: "0",
8062
+ rx: radius,
8063
+ ry: radius,
8064
+ width: ICON.WIDTH,
8065
+ height: ICON.HEIGHT
8066
+ })), /*#__PURE__*/React__default.createElement("clipPath", {
8067
+ id: "foldCrop" + UNIQUE_ID
8068
+ }, /*#__PURE__*/React__default.createElement("rect", {
8069
+ width: ICON.WIDTH,
8070
+ height: FOLD.HEIGHT,
8071
+ transform: "rotate(-45 0 " + FOLD.HEIGHT + ")"
8072
+ })), /*#__PURE__*/React__default.createElement("linearGradient", {
8073
+ x1: "100%",
8074
+ y1: "0%",
8075
+ y2: "100%",
8076
+ id: "pageGradient" + UNIQUE_ID
8077
+ }, /*#__PURE__*/React__default.createElement("stop", {
8078
+ stopColor: gradientColor,
8079
+ stopOpacity: gradientOpacity,
8080
+ offset: "0%"
8081
+ }), /*#__PURE__*/React__default.createElement("stop", {
8082
+ stopColor: gradientColor,
8083
+ stopOpacity: "0",
8084
+ offset: "66.67%"
8085
+ }))), /*#__PURE__*/React__default.createElement("g", {
8086
+ id: "file",
8087
+ clipPath: "url(#pageRadius" + UNIQUE_ID + ")"
8088
+ }, fold ? /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement("path", {
8089
+ d: "M" + ICON.X_OFFSET + " 0 h " + (ICON.WIDTH - FOLD.HEIGHT) + " L " + (ICON.WIDTH + ICON.X_OFFSET) + " " + FOLD.HEIGHT + " v " + (ICON.HEIGHT - FOLD.HEIGHT) + " H " + ICON.X_OFFSET + " Z",
8090
+ fill: color
8091
+ }), /*#__PURE__*/React__default.createElement("path", {
8092
+ d: "M" + ICON.X_OFFSET + " 0 h " + (ICON.WIDTH - FOLD.HEIGHT) + " L " + (ICON.WIDTH + ICON.X_OFFSET) + " " + FOLD.HEIGHT + " v " + (ICON.HEIGHT - FOLD.HEIGHT) + " H " + ICON.X_OFFSET + " Z",
8093
+ fill: "url(#pageGradient" + UNIQUE_ID + ")"
8094
+ })) : /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement("rect", {
8095
+ x: ICON.X_OFFSET,
8096
+ y: "0",
8097
+ width: ICON.WIDTH,
8098
+ height: ICON.HEIGHT,
8099
+ fill: color
8100
+ }), /*#__PURE__*/React__default.createElement("rect", {
8101
+ x: ICON.X_OFFSET,
8102
+ y: "0",
8103
+ width: ICON.WIDTH,
8104
+ height: ICON.HEIGHT,
8105
+ fill: "url(#pageGradient" + UNIQUE_ID + ")"
8106
+ }))), fold && /*#__PURE__*/React__default.createElement("g", {
8107
+ transform: "translate(28 " + FOLD.HEIGHT + ") rotate(-90)"
8108
+ }, /*#__PURE__*/React__default.createElement("rect", {
8109
+ width: ICON.WIDTH,
8110
+ height: ICON.HEIGHT,
8111
+ fill: foldColor || w(color).darken(0.1).toHex(),
8112
+ rx: radius,
8113
+ ry: radius,
8114
+ clipPath: "url(#foldCrop" + UNIQUE_ID + ")"
8115
+ })), extension && /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement("g", {
8116
+ id: "label" + UNIQUE_ID
8117
+ }, /*#__PURE__*/React__default.createElement("rect", {
8118
+ fill: labelColor || w(color).darken(0.3).toHex(),
8119
+ x: ICON.X_OFFSET,
8120
+ y: ICON.HEIGHT - LABEL_HEIGHT,
8121
+ width: ICON.WIDTH,
8122
+ height: LABEL_HEIGHT,
8123
+ clipPath: "url(#pageRadius" + UNIQUE_ID + ")"
8124
+ })), /*#__PURE__*/React__default.createElement("g", {
8125
+ id: "labelText" + UNIQUE_ID,
8126
+ transform: "translate(" + ICON.X_OFFSET + " 34)"
8127
+ }, /*#__PURE__*/React__default.createElement("text", {
8128
+ x: ICON.WIDTH / 2,
8129
+ y: "10",
8130
+ fontFamily: "-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif",
8131
+ fontSize: "9",
8132
+ fill: labelTextColor,
8133
+ textAnchor: "middle",
8134
+ style: {
8135
+ fontWeight: 'bold',
8136
+ textAlign: 'center',
8137
+ pointerEvents: 'none',
8138
+ textTransform: labelUppercase ? 'uppercase' : 'none',
8139
+ userSelect: 'none'
8140
+ }
8141
+ }, extension))), type && /*#__PURE__*/React__default.createElement("g", {
8142
+ transform: "translate(-4 " + (!extension ? 6 : 0) + ")",
8143
+ fill: glyphColor || w(color).darken(0.15).toHex()
8144
+ }, glyphs[type]));
8145
+ };
8146
+ FileIcon.propTypes = propTypes;
8147
+
8148
+ var defaultStyles = {
8149
+ '3dm': {
8150
+ labelColor: '#8D1A11',
8151
+ type: '3d'
8152
+ },
8153
+ '3ds': {
8154
+ labelColor: '#5FB9AD',
8155
+ type: '3d'
8156
+ },
8157
+ '3g2': {
8158
+ type: 'video'
8159
+ },
8160
+ '3gp': {
8161
+ type: 'video'
8162
+ },
8163
+ '7zip': {
8164
+ type: 'compressed'
8165
+ },
8166
+ aab: {
8167
+ type: 'android',
8168
+ labelColor: '#3DDC84'
8169
+ },
8170
+ aac: {
8171
+ type: 'audio'
8172
+ },
8173
+ aep: {
8174
+ type: 'video'
8175
+ },
8176
+ ai: {
8177
+ color: '#423325',
8178
+ gradientOpacity: 0,
8179
+ labelColor: '#423325',
8180
+ labelTextColor: '#FF7F18',
8181
+ labelUppercase: true,
8182
+ foldColor: '#FF7F18',
8183
+ radius: 2
8184
+ },
8185
+ aif: {
8186
+ type: 'audio'
8187
+ },
8188
+ aiff: {
8189
+ type: 'audio'
8190
+ },
8191
+ apk: {
8192
+ type: 'android',
8193
+ labelColor: '#3DDC84'
8194
+ },
8195
+ apkm: {
8196
+ type: 'android',
8197
+ labelColor: '#3DDC84'
8198
+ },
8199
+ apks: {
8200
+ type: 'android',
8201
+ labelColor: '#3DDC84'
8202
+ },
8203
+ asf: {
8204
+ type: 'video'
8205
+ },
8206
+ asp: {
8207
+ type: 'code'
8208
+ },
8209
+ aspx: {
8210
+ type: 'code'
8211
+ },
8212
+ avi: {
8213
+ type: 'video'
8214
+ },
8215
+ bin: {
8216
+ type: 'binary'
8217
+ },
8218
+ bmp: {
8219
+ type: 'image'
8220
+ },
8221
+ c: {
8222
+ type: 'code'
8223
+ },
8224
+ cpp: {
8225
+ type: 'code'
8226
+ },
8227
+ cs: {
8228
+ type: 'code'
8229
+ },
8230
+ css: {
8231
+ type: 'code'
8232
+ },
8233
+ csv: {
8234
+ type: 'spreadsheet'
8235
+ },
8236
+ cue: {
8237
+ type: 'document'
8238
+ },
8239
+ dll: {
8240
+ type: 'settings'
8241
+ },
8242
+ dmg: {
8243
+ type: 'drive'
8244
+ },
8245
+ doc: {
8246
+ color: '#2C5898',
8247
+ foldColor: '#254A80',
8248
+ glyphColor: 'rgba(255,255,255,0.4)',
8249
+ labelColor: '#2C5898',
8250
+ labelUppercase: true,
8251
+ type: 'document'
8252
+ },
8253
+ docx: {
8254
+ color: '#2C5898',
8255
+ foldColor: '#254A80',
8256
+ glyphColor: 'rgba(255,255,255,0.4)',
8257
+ labelColor: '#2C5898',
8258
+ labelUppercase: true,
8259
+ type: 'document'
8260
+ },
8261
+ dwg: {
8262
+ type: 'vector'
8263
+ },
8264
+ dxf: {
8265
+ type: 'vector'
8266
+ },
8267
+ eot: {
8268
+ type: 'font'
8269
+ },
8270
+ eps: {
8271
+ type: 'vector'
8272
+ },
8273
+ exe: {
8274
+ type: 'settings'
8275
+ },
8276
+ flac: {
8277
+ type: 'audio'
8278
+ },
8279
+ flv: {
8280
+ type: 'video'
8281
+ },
8282
+ fnt: {
8283
+ type: 'font'
8284
+ },
8285
+ fodp: {
8286
+ type: 'presentation'
8287
+ },
8288
+ fods: {
8289
+ type: 'spreadsheet'
8290
+ },
8291
+ fodt: {
8292
+ type: 'document'
8293
+ },
8294
+ fon: {
8295
+ type: 'font'
8296
+ },
8297
+ gif: {
8298
+ type: 'image'
8299
+ },
8300
+ gz: {
8301
+ type: 'compressed'
8302
+ },
8303
+ htm: {
8304
+ type: 'code'
8305
+ },
8306
+ html: {
8307
+ type: 'code'
8308
+ },
8309
+ indd: {
8310
+ color: '#4B2B36',
8311
+ gradientOpacity: 0,
8312
+ labelColor: '#4B2B36',
8313
+ labelTextColor: '#FF408C',
8314
+ labelUppercase: true,
8315
+ foldColor: '#FF408C',
8316
+ radius: 2
8317
+ },
8318
+ ini: {
8319
+ type: 'settings'
8320
+ },
8321
+ java: {
8322
+ type: 'code'
8323
+ },
8324
+ jpeg: {
8325
+ type: 'image'
8326
+ },
8327
+ jpg: {
8328
+ type: 'image'
8329
+ },
8330
+ js: {
8331
+ labelColor: '#F7DF1E',
8332
+ type: 'code'
8333
+ },
8334
+ json: {
8335
+ type: 'code'
8336
+ },
8337
+ jsx: {
8338
+ labelColor: '#00D8FF',
8339
+ type: 'code'
8340
+ },
8341
+ m4a: {
8342
+ type: 'audio'
8343
+ },
8344
+ m4v: {
8345
+ type: 'video'
8346
+ },
8347
+ max: {
8348
+ labelColor: '#5FB9AD',
8349
+ type: '3d'
8350
+ },
8351
+ md: {
8352
+ type: 'document'
8353
+ },
8354
+ mid: {
8355
+ type: 'audio'
8356
+ },
8357
+ mkv: {
8358
+ type: 'video'
8359
+ },
8360
+ mov: {
8361
+ type: 'video'
8362
+ },
8363
+ mp3: {
8364
+ type: 'audio'
8365
+ },
8366
+ mp4: {
8367
+ type: 'video'
8368
+ },
8369
+ mpeg: {
8370
+ type: 'video'
8371
+ },
8372
+ mpg: {
8373
+ type: 'video'
8374
+ },
8375
+ obj: {
8376
+ type: '3d'
8377
+ },
8378
+ odp: {
8379
+ type: 'presentation'
8380
+ },
8381
+ ods: {
8382
+ type: 'spreadsheet'
8383
+ },
8384
+ odt: {
8385
+ type: 'document'
8386
+ },
8387
+ ogg: {
8388
+ type: 'audio'
8389
+ },
8390
+ ogv: {
8391
+ type: 'video'
8392
+ },
8393
+ otf: {
8394
+ type: 'font'
8395
+ },
8396
+ pdf: {
8397
+ labelColor: '#D93831',
8398
+ type: 'acrobat'
8399
+ },
8400
+ php: {
8401
+ labelColor: '#8892BE',
8402
+ type: 'code'
8403
+ },
8404
+ pkg: {
8405
+ type: '3d'
8406
+ },
8407
+ plist: {
8408
+ type: 'settings'
8409
+ },
8410
+ png: {
8411
+ type: 'image'
8412
+ },
8413
+ ppt: {
8414
+ color: '#D14423',
8415
+ foldColor: '#AB381D',
8416
+ glyphColor: 'rgba(255,255,255,0.4)',
8417
+ labelColor: '#D14423',
8418
+ labelUppercase: true,
8419
+ type: 'presentation'
8420
+ },
8421
+ pptx: {
8422
+ color: '#D14423',
8423
+ foldColor: '#AB381D',
8424
+ glyphColor: 'rgba(255,255,255,0.4)',
8425
+ labelColor: '#D14423',
8426
+ labelUppercase: true,
8427
+ type: 'presentation'
8428
+ },
8429
+ pr: {
8430
+ type: 'video'
8431
+ },
8432
+ ps: {
8433
+ type: 'vector'
8434
+ },
8435
+ psd: {
8436
+ color: '#34364E',
8437
+ gradientOpacity: 0,
8438
+ labelColor: '#34364E',
8439
+ labelTextColor: '#31C5F0',
8440
+ labelUppercase: true,
8441
+ foldColor: '#31C5F0',
8442
+ radius: 2
8443
+ },
8444
+ py: {
8445
+ labelColor: '#FFDE57',
8446
+ type: 'code'
8447
+ },
8448
+ rar: {
8449
+ type: 'compressed'
8450
+ },
8451
+ rb: {
8452
+ labelColor: '#BB271A',
8453
+ type: 'code'
8454
+ },
8455
+ rm: {
8456
+ type: 'video'
8457
+ },
8458
+ rtf: {
8459
+ type: 'document'
8460
+ },
8461
+ scss: {
8462
+ labelColor: '#C16A98',
8463
+ type: 'code'
8464
+ },
8465
+ sitx: {
8466
+ type: 'compressed'
8467
+ },
8468
+ skp: {
8469
+ type: '3d'
8470
+ },
8471
+ svg: {
8472
+ type: 'vector'
8473
+ },
8474
+ swf: {
8475
+ type: 'video'
8476
+ },
8477
+ sys: {
8478
+ type: 'settings'
8479
+ },
8480
+ tar: {
8481
+ type: 'compressed'
8482
+ },
8483
+ tex: {
8484
+ type: 'document'
8485
+ },
8486
+ tif: {
8487
+ type: 'image'
8488
+ },
8489
+ tiff: {
8490
+ type: 'image'
8491
+ },
8492
+ ts: {
8493
+ labelColor: '#3478C7',
8494
+ type: 'code'
8495
+ },
8496
+ ttf: {
8497
+ type: 'font'
8498
+ },
8499
+ txt: {
8500
+ type: 'document'
8501
+ },
8502
+ wav: {
8503
+ type: 'audio'
8504
+ },
8505
+ webm: {
8506
+ type: 'video'
8507
+ },
8508
+ wmv: {
8509
+ type: 'video'
8510
+ },
8511
+ woff: {
8512
+ type: 'font'
8513
+ },
8514
+ wpd: {
8515
+ type: 'document'
8516
+ },
8517
+ wps: {
8518
+ type: 'document'
8519
+ },
8520
+ xapk: {
8521
+ type: 'android',
8522
+ labelColor: '#3DDC84'
8523
+ },
8524
+ xlr: {
8525
+ type: 'spreadsheet'
8526
+ },
8527
+ xls: {
8528
+ color: '#1A754C',
8529
+ foldColor: '#16613F',
8530
+ glyphColor: 'rgba(255,255,255,0.4)',
8531
+ labelColor: '#1A754C',
8532
+ labelUppercase: true,
8533
+ type: 'spreadsheet'
8534
+ },
8535
+ xlsx: {
8536
+ color: '#1A754C',
8537
+ foldColor: '#16613F',
8538
+ glyphColor: 'rgba(255,255,255,0.4)',
8539
+ labelColor: '#1A754C',
8540
+ labelUppercase: true,
8541
+ type: 'spreadsheet'
8542
+ },
8543
+ yml: {
8544
+ type: 'code'
8545
+ },
8546
+ zip: {
8547
+ type: 'compressed'
8548
+ },
8549
+ zipx: {
8550
+ type: 'compressed'
8551
+ }
8552
+ };
8553
+
8554
+ var File = function File(_ref) {
8555
+ var fileName = _ref.fileName,
8556
+ className = _ref.className;
8557
+ var extension = fileName.match(/([^.]+)$/)[1];
8558
+ return /*#__PURE__*/React__default.createElement("div", {
8559
+ className: className
8560
+ }, /*#__PURE__*/React__default.createElement(FileIcon, _extends({
8561
+ extension: extension,
8562
+ labelColor: "#4558f9"
8563
+ }, defaultStyles[extension])));
8564
+ };
8565
+
8566
+ export { ALLOWED_IMAGE_TYPES as A, DirectUpload as D, File as F, PropTypes as P, FileIcon as a, useDropFiles as b, buildImageOptions as c, directUploadsApi as d, ALLOWED_VIDEO_TYPES as e, convertToFileSize as f, DEFAULT_IMAGE_UPLOAD_CONFIG as g, DEFAULT_VIDEO_UPLOAD_CONFIG as h, getTabs as i, commonjsRequire as j, propTypesExports as p, useFileUploader as u };
8567
+ //# sourceMappingURL=chunk-32e353fe.js.map