gather-content-ui
Version:
GatherContent UI Library
174 lines (173 loc) • 25.8 kB
JavaScript
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.PreviewImage = PreviewImage;
var _react = _interopRequireDefault(require("react"));
var _reactImage = require("react-image");
var _classnames = _interopRequireDefault(require("classnames"));
var _Loader = require("../loader/Loader");
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); } // @ts-expect-error TS(2307): Cannot find module 'modules/loader/Loader' or its ... Remove this comment to see the full error message
var PreviewFallback = function PreviewFallback(props) {
return /*#__PURE__*/_react["default"].createElement("svg", _extends({
width: "148",
height: "106",
viewBox: "0 0 148 106",
fill: "none",
xmlns: "http://www.w3.org/2000/svg"
}, props), /*#__PURE__*/_react["default"].createElement("mask", {
id: "a",
maskUnits: "userSpaceOnUse",
x: "18",
y: "103",
width: "111",
height: "4"
}, /*#__PURE__*/_react["default"].createElement("path", {
d: "M18.61 103.103h110.163V106H18.61v-2.897z",
fill: "#fff"
})), /*#__PURE__*/_react["default"].createElement("g", {
mask: "url(#a)"
}, /*#__PURE__*/_react["default"].createElement("path", {
fillRule: "evenodd",
clipRule: "evenodd",
d: "M19.169 105.109c-.536-.192-.866-.751-.141-1.058.778-.22 1.743-.279 2.473-.349 3.787-.362 7.294-.742 11.125-.452 2.861.215 5.766.146 8.653.151a439.32 439.32 0 0 0 8.891-.094c1.24-.024 2.482-.236 3.712-.2 4.973.144 9.942.392 14.917.515 2.325.058 4.66-.085 6.992-.133 1.95-.04 3.9-.112 5.848-.112 6.396.006 12.792.018 19.19.068 3.186.024 6.373.176 9.56.199 1.55.012 3.102-.145 4.654-.219a46.235 46.235 0 0 1 9.748.533c.902.147 1.867.079 2.797.154.411.034.811.179 1.186.53-1.126.122-.708.294-3.145.594-3.312.423-5.142.369-6.945.339-.775-.013-1.552.092-2.329.096-4.292.032-8.583.022-12.873.082-3.112.045-6.222.26-9.33.246-3.812-.019-7.622-.247-11.435-.301-7.872-.111-15.744-.168-23.616-.243a149.154 149.154 0 0 0-3.277 0c-6.936.071-13.871.172-20.808.207-2.408.012-4.818-.168-7.227-.196-1.238-.013-2.61-.154-3.85-.081-1.646.099-3.123.26-4.77-.277",
fill: "#E1E6EB"
})), /*#__PURE__*/_react["default"].createElement("path", {
d: "M119.409 46.375c-29.338 0-88.8.11-91.94.552l-1.12 2.208 8.97 50.24L37 103.239l73.439.552 1.122-1.656 8.969-53-1.121-2.76z",
fill: "#E1E6EB"
}), /*#__PURE__*/_react["default"].createElement("g", {
clipPath: "url(#b)",
fill: "#8599AD"
}, /*#__PURE__*/_react["default"].createElement("path", {
d: "M74.408 77.221L74 82.671c0 .336-.245.672-.652.756-.49.083-.897-.252-.979-.755l-.408-6.877.816-.419c5.87-3.187 7.42-5.367 7.42-8.638 0-3.605-2.528-5.786-6.523-5.786-2.528 0-4.893.839-7.013 2.348-.49.336-1.142.084-1.223-.587l-.082-.251c-.081-.336.082-.587.327-.839 2.12-1.51 4.974-2.683 8.072-2.683 4.974 0 8.644 2.935 8.644 7.715 0 4.612-2.936 7.128-7.584 9.895-.244.084-.407.335-.407.671zM71.88 89.716v-.168c0-.754.652-1.425 1.386-1.425.734 0 1.386.67 1.386 1.425v.168c0 .755-.652 1.426-1.386 1.426-.734 0-1.386-.671-1.386-1.426z"
}), /*#__PURE__*/_react["default"].createElement("path", {
fillRule: "evenodd",
clipRule: "evenodd",
d: "M71.472 89.716V90.388c-.081.083 0 .167.082.335 0 .251 0 .335.244.419.49.42.653.503 1.305.587.326-.084.734-.084 1.06-.335.408-.252.652-.588.734-1.007.163-.168.163-.335.163-.587.082-.084.163-.168 0-.251.082-.084.082-.252.082-.336 0-.084-.082-.168 0-.251-.163-.084-.163-.252-.327-.42-.163-.168-.163-.335-.326-.335-.163-.168-.407-.336-.734-.336-.163-.167-.326-.084-.489-.167-.326.084-.49.167-.734.335-.244 0-.407.335-.57.335 0 .252-.245.336-.164.588-.081.167-.163.251-.163.419-.163.084-.163.251-.163.335h.897c-.081-.419.163-.754.408-.838.081-.252.49-.336.734-.42.081.168.244.168.244.336a.997.997 0 0 1 .408.42v.67c-.163.168-.245.252-.326.42-.163 0-.326.083-.49.083-.08.168-.326.084-.489.252-.081-.084-.244-.084-.326-.084-.081-.084-.081-.168-.163-.252-.081 0-.163-.084-.245-.167.164-.168.082-.336.164-.42h-.816zM74.815 77.22c0-.167.082-.251.245-.335.245-.168.49-.336.734-.42.978-.586 1.386-.838 2.12-1.257.57-.252.897-.587 1.712-1.342 1.06-.839 1.55-1.342 2.12-2.432 1.06-1.845 1.224-3.354 1.224-4.78 0-.67-.082-1.426-.326-2.264-.245-.839-.571-1.761-1.305-2.684-.653-.838-1.713-1.677-3.017-2.264-1.223-.587-2.773-.922-4.322-.922-3.18-.084-6.36 1.174-8.562 2.935-.245.167-.326.419-.408.67V62.798c.082.503.49.922.979 1.006.244 0 .489 0 .734-.084.081 0 .081-.084.163-.084l.081-.084.163-.168c.327-.167.653-.335.897-.587.49-.251 1.387-.503 1.876-.838.652-.084 1.468-.252 2.283-.336.408-.084 1.305-.167 1.305-.084.897-.083 1.794 0 3.261.504.734.251 1.142.67 1.387.922.326.336.57.587.815 1.007.408.503.652 1.257.734 2.18.082.922.082 2.013-.408 3.187-.57.922-1.141 1.845-2.12 2.515-.815.755-1.468 1.258-2.12 1.678-.734.503-1.468.922-2.61 1.593l-.57.252-.326.167v.336c.081 1.593.244 3.102.163 4.109.163.587.163 1.258.244 1.929v.754c0 .084 0 .252.082.42.163.503.734.838 1.223.67.408 0 .734-.335.897-.67.082-.168.082-.42.082-.503v-.42c.081-.503.081-1.09.163-1.593.244-1.09.326-2.18.407-3.355L74 77.137a286.127 286.127 0 0 0-.245 3.27c0 .587-.081 1.09-.081 1.677 0 .252 0 .671-.082.671-.081.084-.163.168-.326.168s-.245-.084-.326-.168c0-.084-.082-.084-.082-.167v-.42c0-.587-.081-1.174-.081-1.677-.082-1.174-.082-2.264-.163-3.354 0-.336-.082-.755-.163-1.342l-.245.42c1.142-.672 2.69-1.51 4.159-2.6 1.468-1.007 2.772-2.349 3.425-3.69.489-.839.652-1.594.815-2.432a8.852 8.852 0 0 0-.082-2.516c-.407-1.426-1.304-2.768-2.69-3.439-1.305-.754-2.773-1.006-4.24-1.006-1.469 0-2.936.336-4.241.839a10.75 10.75 0 0 0-1.957.922c-.326.168-.652.42-.978.587a.507.507 0 0 1-.49 0s0-.084-.081-.167v-.252-.168c0-.167.081-.167.407-.419.571-.336 1.06-.587 1.55-.839 1.06-.503 2.12-1.006 3.588-1.341 1.06-.168 2.283-.252 3.506-.084 1.223.168 2.446.503 3.425 1.006.815.336 1.794 1.006 2.446 2.013.734 1.006 1.06 2.264 1.223 3.27.082 1.09 0 2.852-.49 4.026-.08.251-.244.419-.325.587a1.761 1.761 0 0 1-.326.503c-.245.335-.49.67-.979 1.174-.652.755-1.386 1.425-2.12 2.096-.49.252-1.142.671-1.794 1.007-.326.167-.652.419-1.06.587l-.245.251c-.081 0-.244.168-.326.252-.244.167-.326.503-.408.755l.897.083z"
})), /*#__PURE__*/_react["default"].createElement("path", {
fillRule: "evenodd",
clipRule: "evenodd",
d: "M108.411 104.652a4.388 4.388 0 0 0 2.55-.826 4.31 4.31 0 0 0 1.576-2.149c.191-.634.213-1.054.305-1.538.77-3.669 1.077-5.348 1.697-8.11.569-1.901.709-3.35 1.322-6.92.988-4.19 1.506-6.425 1.95-10.053l2.539-15.085 1.213-7.127.346-2.011c.03-.187.06-.316.091-.556a4.52 4.52 0 0 0-.575-2.94 4.577 4.577 0 0 0-1.638-1.631 4.458 4.458 0 0 0-1.589-.563c-.268-.056-.602-.055-.834-.062l-.663.002c-13.364.414-39.423.072-57.565.456-5.636-.173-9.128-.199-14.43-.046-1.938-.096-5.21-.335-7.228-.08a126.776 126.776 0 0 0-3.759-.183l-2.093-.062-1.097-.024-.561-.012c-.223.01-.493.003-.736.05-.955.054-2.427.862-3.095 2.024-.726 1.128-.711 2.303-.821 2.393.01.275.067.552.116.809l.145.595.263 1.203c.17.814.322 1.655.482 2.568.32 1.828.665 3.94 1.192 6.679 1.09 5.571 1.114 7.374 1.994 10.907.762 4.712 1.902 10.862 3.561 19.487.188 1.877.528 3.757.88 5.705l.519 2.98c.07.438.157 1.18.476 1.804a4.713 4.713 0 0 0 1.316 1.661c.751.522 1.644.807 2.562.818.292.006.451-.009.68-.011l2.424-.058 4.48-.083 10.37-.088c5.896.228 12.174-.086 16.084.255 3.768-.379 8.928-.031 13.522-.379 7.314.061 14.386.213 22.029.201v-1.913c-13.888.09-30.407-.01-44.879-.134-4.78.131-11.45.195-18.282.252l-5.13.045-1.242.007a2.66 2.66 0 0 1-1.367-.418 2.618 2.618 0 0 1-.947-1.06c-.259-.502-.329-1.385-.5-2.143l-.44-2.274c-.29-1.483-.568-2.896-.83-4.216-.748-5.899-1.61-9.977-2.334-15.8a834.36 834.36 0 0 1-2.518-13.475l-1.228-6.936-.61-3.501-.306-1.755-.153-.88-.075-.436c-.006-.106-.03-.21-.03-.314-.014-.418.085-.831.285-1.199.2-.368.494-.677.854-.896a2.46 2.46 0 0 1 1.188-.34l1.781.003 7.216.012a929.5 929.5 0 0 0 14.242-.098c11.256.293 16.324.384 27.284.21 7.525.257 17.247.198 25.71.323 1.829-.082 3.658-.138 5.489-.168l3.171-.054 1.647-.024c.551-.002 1.175-.036 1.446.015.707.096 1.354.593 1.661 1.253.16.327.228.69.206 1.055-.006.146-.052.44-.093.708l-.121.798c-.32 2.116-.601 4.132-.805 5.917-.794 3.742-1.561 9.648-2.22 14.037l-1.853 9.383-1.434 10.065c-.513 1.791-1.048 4.254-1.588 6.874l-.406 1.986-.202 1c-.041.27-.122.533-.241.78-.435.934-1.453 1.464-2.346 1.398v1.913z",
fill: "#A4B3C2"
}), /*#__PURE__*/_react["default"].createElement("path", {
fillRule: "evenodd",
clipRule: "evenodd",
d: "M96.84 29.55c-.327.172-.79.065-.675-.435.186-.485.545-.985.801-1.374 1.326-2.022 2.528-3.915 4.255-5.647 1.29-1.294 2.429-2.746 3.603-4.152a226.67 226.67 0 0 0 3.559-4.388c.488-.615.868-1.322 1.39-1.907l3.185-3.514c.292-.31.477-.543.861-.921a4.335 4.335 0 0 1 1.228-.8 4.226 4.226 0 0 1 2.839-.186 4.7 4.7 0 0 1 1.223.544c.397.27.646.482.951.709l1.778 1.345c.981.76 1.978 1.5 2.938 2.286l9.437 7.755 4.62 3.958c.76.63 1.601 1.163 2.403 1.743a24.918 24.918 0 0 1 4.565 4.243c.408.502.833 1.05.983 1.69a.883.883 0 0 1-.228.844c-.087-.342-.175-.433-.299-.605-.136-.16-.289-.441-.787-.89a3.794 3.794 0 0 0-.53-.37l-.566-.366a20.261 20.261 0 0 1-.943-.667c-.557-.42-.997-.798-1.434-1.17-.377-.319-.811-.57-1.197-.88l-6.391-5.128c-1.555-1.225-3.194-2.35-4.721-3.609-1.873-1.543-3.642-3.207-5.498-4.77l-5.742-4.802c-.76-.613-1.886-.737-2.782-.305a2.498 2.498 0 0 0-.617.402c-.182.147-.348.355-.566.609l-1.215 1.427-1.332 1.6-8.332 10.26c-.972 1.18-2.056 2.272-3.051 3.435-.512.598-1.15 1.2-1.612 1.84-.612.851-1.117 1.65-2.1 2.197z",
fill: "#C2CCD6"
}), /*#__PURE__*/_react["default"].createElement("path", {
fillRule: "evenodd",
clipRule: "evenodd",
d: "M91.852 42.784c-.488.36-1.048.372-.718-.385.416-.762 1.06-1.603 1.53-2.252 2.444-3.364 4.682-6.501 7.538-9.59 2.134-2.309 4.131-4.792 6.155-7.22a668.876 668.876 0 0 0 6.183-7.54c.428-.528.827-1.077 1.231-1.624.43-.629 1.215-1.298 2.058-1.553a4.51 4.51 0 0 1 3.874.49c.179.113.38.275.511.384l.39.333 3.108 2.67 6.23 5.321c1.955 1.647 4.012 3.185 6.021 4.775 1.68 1.328 3.373 2.64 5.032 3.992l4.084 3.334 1.021.834c.303.24.781.631 1.093 1.078.654.891.927 2.036.758 3.119a4.187 4.187 0 0 1-.561 1.538c-.312.503-.61.801-.877 1.142l-1.678 2.026-3.358 4.047-6.775 8.002c-1.085 1.305-2.072 2.695-3.111 4.045a73.462 73.462 0 0 1-7.1 8.002c-.714.694-1.345 1.542-2.037 2.294-.309.335-.67.602-1.138.754.71-1.01.319-.739 1.84-2.944 2.058-3.004 3.365-4.53 4.636-6.041.55-.652 1.029-1.36 1.566-2.02l8.917-10.941c2.141-2.656 4.18-5.392 6.352-8.017l.961-1.162c.218-.284.375-.611.441-.964a2.36 2.36 0 0 0-.555-2.032c-.056-.074-.133-.132-.196-.199l-.288-.25-.597-.51-1.195-1.019-2.404-2.024-19.995-16.528-1.392-1.142-.346-.281c-.101-.066-.191-.15-.3-.205a2.717 2.717 0 0 0-.657-.288 2.782 2.782 0 0 0-2.196.312c-.344.219-.545.426-.859.821l-.902 1.102-3.613 4.415-7.244 8.81c-1.682 2.036-3.478 3.982-5.183 5.999-.878 1.036-1.922 2.126-2.748 3.204-1.097 1.436-2.038 2.758-3.507 3.888z",
fill: "#A4B3C2"
}), /*#__PURE__*/_react["default"].createElement("path", {
fillRule: "evenodd",
clipRule: "evenodd",
d: "M116.99 28.037c.015-.173.238-.537.489-.629.218-.036.385.043.523.087.719.234 1.407.424 1.816 1.043.308.458.759.758 1.171 1.098.424.35.869.672 1.323.987.19.132.47.153.63.317.645.667 1.239 1.393 1.894 2.045.306.306.711.497 1.069.743.299.204.614.39.893.62.917.752 1.828 1.509 2.724 2.285.446.388.831.848 1.277 1.235.218.187.516.279.775.417.549.292.935.768 1.144 1.45.059.192.23.264.327.417.042.067.03.198-.085.444-.22-.06-.243.09-.738-.023-.679-.143-.915-.389-1.16-.617-.105-.099-.267-.129-.382-.216-.631-.485-1.244-.993-1.889-1.46-.467-.34-1.019-.578-1.459-.95-.537-.458-.975-1.035-1.497-1.513-1.078-.986-2.182-1.94-3.275-2.905a7.176 7.176 0 0 0-.472-.383c-1.03-.772-2.075-1.524-3.088-2.316-.352-.275-.611-.66-.944-.958-.171-.154-.303-.395-.515-.498-.283-.137-.574-.216-.551-.719v-.001zm-5.43 6.526c.014-.173.237-.537.489-.629.218-.037.385.043.523.088.719.233 1.406.424 1.816 1.04.307.46.759.76 1.17 1.1.424.35.869.67 1.323.987.19.13.47.153.63.318.645.666 1.239 1.389 1.894 2.044.307.306.711.497 1.069.742.299.203.614.392.894.62.916.753 1.829 1.507 2.724 2.286.445.388.83.848 1.277 1.234.218.188.515.279.775.418.548.292.934.766 1.144 1.45.058.19.23.263.326.416.043.068.031.199-.084.446-.221-.06-.242.088-.738-.024-.68-.144-.916-.388-1.161-.617-.105-.099-.266-.129-.382-.216-.63-.485-1.243-.994-1.889-1.461-.467-.338-1.019-.577-1.458-.95-.538-.457-.976-1.034-1.498-1.512-1.077-.986-2.181-1.94-3.274-2.905a7.194 7.194 0 0 0-.473-.383c-1.029-.772-2.075-1.524-3.087-2.317-.353-.275-.613-.66-.944-.958-.172-.153-.302-.395-.516-.497-.283-.137-.573-.216-.55-.72zm-5.475 6.486c.066-.129.309-.475.477-.637.13-.11.195-.117.255-.138.312-.108.622-.235.638.05.012.213.157.255.266.34.112.088.247.15.387.2.061.022.206-.069.236-.011.127.229.207.521.343.739.064.102.22.084.332.122.094.032.203.046.278.103.245.187.488.38.714.596.11.107.165.288.279.395.054.051.186.002.281.002.199 0 .25.192.134.601-.031.114.036.101.038.174.001.033-.049.132-.194.351-.101.04-.164.156-.395.265-.321.158-.367.072-.422.002-.025-.03-.103.012-.136-.008-.18-.105-.342-.236-.536-.324-.141-.063-.36-.023-.472-.122-.141-.122-.184-.367-.308-.51-.254-.293-.532-.556-.805-.829a.492.492 0 0 0-.127-.093c-.301-.158-.616-.299-.901-.477-.099-.064-.111-.24-.191-.327-.042-.044-.031-.168-.112-.16-.109.013-.24.066-.059-.304z",
fill: "#C2CCD6"
}), /*#__PURE__*/_react["default"].createElement("path", {
fillRule: "evenodd",
clipRule: "evenodd",
d: "M50.789 18.242c-.471-.595-.982-1.152-1.405-1.793l-3.196-4.817c-.832-1.587-2.73-2.105-4.198-1.255a348.832 348.832 0 0 0-10.159 5.382 1390.402 1390.402 0 0 1-21.41 11.557L5.04 30.16l-1.344.71-.66.348c-.41.225-.749.56-.977.965a2.453 2.453 0 0 0-.31 1.33c.019.37.114.725.3 1.063l.715 1.332 1.432 2.664 2.87 5.325 10.018 18.782a154.387 154.387 0 0 1 1.784 3.478l.436.873.218.437c.068.114.117.236.197.338.286.436.712.787 1.207 1 .786.333 1.64.321 2.619.41-.37.355-.739.626-1.224.76-1.38.39-3.122-.214-4.016-1.574-.738-1.177-1.32-2.268-1.956-3.44L2.49 39.087.528 35.435c-.858-1.471-.659-3.517.517-4.79.28-.324.622-.595.988-.813.387-.226.641-.331.968-.503l1.86-.93a162.566 162.566 0 0 0 3.7-1.895L40.951 9.21c.201-.103.354-.193.596-.305a4.148 4.148 0 0 1 2.364-.385 4.155 4.155 0 0 1 2.71 1.52c.34.42.533.876.722 1.228l.585 1.138 1.178 2.272 1.806 3.438-.123.125z",
fill: "#A4B3C2"
}), /*#__PURE__*/_react["default"].createElement("path", {
fillRule: "evenodd",
clipRule: "evenodd",
d: "M32.035 42.69l-2.915-5.414a.837.837 0 0 1 .39-1.162.862.862 0 0 1 .448-.077l9.397.918c.606.06.956.712.668 1.242l-2.7 4.969",
fill: "#E1E6EB"
}), /*#__PURE__*/_react["default"].createElement("path", {
fillRule: "evenodd",
clipRule: "evenodd",
d: "M37.487 43.251c-.012-.204-.077-.432-.033-.612.222-.899.364-1.833.845-2.608.235-.378.46-.764.67-1.156l.305-.594c.092-.193.224-.457.184-.447-.021-.11-.13-.156-.177-.123l-1.413-.07a98.03 98.03 0 0 1-2.84-.212L29.9 36.92c.024-.01.027-.036.018-.064l.534 1.033 1.126 2.216c.271.546.475 1.126.673 1.707.076.223.157.464-.238.89-.182-.032-.364-.037-.483-.09-.672-.305-1.011-.813-1.296-1.355l-1.598-3.032-.2-.38-.108-.216a1.756 1.756 0 0 1-.143-.402 1.692 1.692 0 0 1 .228-1.241c.233-.37.6-.637 1.027-.747.257-.08.654-.048.729-.032l.86.091c.646.069 1.295.125 1.94.215.643.088 1.277.263 1.925.314l4.286.311.281.022a1.671 1.671 0 0 1 1.279.818c.176.3.255.659.219 1.014-.02.176-.067.348-.14.51l-.144.283-.99 1.888c-.375.703-.974 1.287-1.473 1.925l-.572.724-.153-.07v-.001z",
fill: "#C2CCD6"
}), /*#__PURE__*/_react["default"].createElement("path", {
fillRule: "evenodd",
clipRule: "evenodd",
d: "M3.926 39.973l-.672-1.248c.265-.17.489-.334.732-.463 1.623-.86 3.257-1.696 4.87-2.575 4.103-2.23 8.292-4.303 12.42-6.493 5.918-3.133 11.836-6.27 17.755-9.404a3537.47 3537.47 0 0 1 8.982-4.738c.124-.066.262-.103.47-.182l.66 1.222-.954.503c-1.938 1.035-3.878 2.06-5.81 3.106a4538.554 4538.554 0 0 0-11.383 6.171c-3.918 2.131-7.816 4.3-11.753 6.397-2.283 1.217-4.633 2.314-6.94 3.49-1.925.98-3.825 2.008-5.748 2.99-.828.425-1.687.789-2.63 1.222",
fill: "#A4B3C2"
}), /*#__PURE__*/_react["default"].createElement("path", {
fillRule: "evenodd",
clipRule: "evenodd",
d: "M11.35 35.392c-.127 0-.301.023-.371-.01-.353-.16-.781-.282-.884-.581a2.253 2.253 0 0 0-.455-.797c-.9-.987-1.432-2.17-2.053-3.304-.274-.5-.514-1.018-.739-1.543-.082-.192-.097-.421-.105-.651-.004-.089-.007-.185.448-.5.147-.032.301-.079.387-.085.492-.033.642.124.736.312.351.702.708 1.401 1.062 2.102.1.198.212.39.294.598.081.207.085.454.202.642.509.835 1.076 1.64 1.557 2.489.136.238.046.596.058.898.005.117.006.233.01.348l-.148.082zm7.537-3.975c-.125 0-.299.024-.37-.008-.351-.162-.78-.282-.884-.583a2.254 2.254 0 0 0-.454-.796c-.9-.988-1.432-2.17-2.054-3.304a17.375 17.375 0 0 1-.736-1.543c-.085-.192-.097-.422-.107-.652-.003-.088-.007-.184.448-.5.148-.031.3-.078.388-.084.49-.032.641.124.736.311.35.702.707 1.402 1.061 2.102.1.2.212.391.293.598.082.208.088.454.204.644.508.833 1.076 1.638 1.556 2.489.135.238.045.595.057.898.007.115.007.231.01.348-.048.027-.097.055-.148.08zm7.539-3.974c-.125 0-.298.024-.368-.01-.355-.16-.784-.282-.886-.581a2.217 2.217 0 0 0-.456-.797c-.897-.987-1.43-2.17-2.052-3.304-.274-.5-.513-1.018-.738-1.543-.081-.192-.097-.421-.105-.651-.004-.089-.006-.185.448-.5.147-.032.302-.079.387-.085.493-.032.642.125.736.312.352.702.707 1.401 1.063 2.102.1.199.212.39.293.598.08.207.087.454.2.642.512.835 1.078 1.64 1.56 2.49.133.237.044.596.056.899.006.115.006.23.01.347l-.147.081h-.001zm7.54-3.974c-.127-.001-.3.023-.37-.01-.353-.163-.782-.282-.884-.582a2.22 2.22 0 0 0-.456-.796c-.9-.989-1.432-2.17-2.053-3.307a17.692 17.692 0 0 1-.738-1.54c-.082-.193-.096-.422-.106-.653-.004-.087-.007-.183.449-.498.146-.032.303-.08.387-.085.492-.034.642.123.736.311.353.702.707 1.402 1.062 2.102.1.198.212.39.293.598.081.207.087.454.202.642.511.835 1.078 1.64 1.558 2.49.135.238.045.595.057.898.005.115.006.231.01.347l-.148.083h.001zm7.539-3.975c-.126-.002-.3.024-.37-.01-.353-.16-.782-.282-.884-.581a2.232 2.232 0 0 0-.456-.798c-.9-.986-1.432-2.168-2.053-3.304a18.093 18.093 0 0 1-.738-1.543c-.081-.191-.097-.421-.106-.651-.003-.088-.007-.185.448-.499.148-.032.303-.079.388-.086.492-.031.641.125.737.312.351.703.707 1.401 1.06 2.103.1.199.214.39.295.597.08.208.087.455.202.644.508.832 1.077 1.637 1.558 2.49.133.236.045.595.057.898.005.114.006.23.01.347l-.148.081zm21.854 22.977c-.23.016-.601-.22-.58-.551.08-.297.288-.548.432-.75.545-.766 1.045-1.502 1.699-2.12a1.031 1.031 0 0 1 .875-.268l.039.006c.335.057.67.14 1.007.26.917.332 1.886.453 2.84.63.98.18 1.966.326 2.954.462.413.056.851-.024 1.253.074l4.01 1.061-.844.464.376-.787c.33-.702.52-1.464.775-2.198.213-.614.404-1.234.648-1.837l2.43-5.914c.366-.868.803-1.709 1.186-2.571l.015-.036a.68.68 0 0 1 .723-.393l.355.056c.515.077 1.048.03 1.573.042a7.172 7.172 0 0 1 3.194.828c.284.15.612.141.915.24.135.042.252.167.343.445-.388.04-.267.187-1.108.302-1.146.168-1.75.048-2.347-.055-.258-.043-.527 0-.787-.03l-2.347-.288.928-.538-.689 1.819c-.356.974-.588 1.994-.985 2.951-.487 1.174-1.12 2.288-1.63 3.451l-2.177 5.059-.013.03a.714.714 0 0 1-.326.35.725.725 0 0 1-.477.067l-2.334-.472c-.36-.073-.722-.139-1.085-.197l-6.908-1.09c-.605-.103-1.194-.287-1.79-.442l.623-.18-.454.373c-.313.27-.724.503-.992.823-.356.427-.637.85-1.32.924z",
fill: "#A4B3C2"
}), /*#__PURE__*/_react["default"].createElement("path", {
fillRule: "evenodd",
clipRule: "evenodd",
d: "M53.416 17.223c-.051.275-.36.662-.733.328-.327-.395-.463-1.035-.472-1.516a3.985 3.985 0 0 1 .377-1.866 4.03 4.03 0 0 1 1.2-1.486 4.92 4.92 0 0 1 .824-.486l.706-.32c.476-.203.968-.388 1.482-.548 1.537-.479 3.01-1.165 4.494-1.795 1.526-.651 3.042-1.324 4.548-2.018.63-.287 1.204-.706 1.848-.952l7.827-2.919c1.216-.472 2.373-1.082 3.558-1.627.99-.455 1.97-.933 2.973-1.36.408-.162.79-.368 1.38-.526a4.332 4.332 0 0 1 2.886.272c.9.419 1.626 1.135 2.052 2.025.127.256.187.422.282.639l.526 1.224 1.042 2.45 1.982 4.926c.338.792.79 1.536 1.186 2.304a18.993 18.993 0 0 1 1.792 5.12c.097.504.358.973.513 1.47.068.22.056.464-.105.76-.334-.535-.364-.272-1.113-1.424-1.029-1.56-1.396-2.508-1.775-3.435-.163-.399-.409-.763-.584-1.156L89.199 8.78c-.723-1.57-1.561-3.09-2.242-4.676l-.304-.731a2.511 2.511 0 0 0-1.057-1.254 2.446 2.446 0 0 0-2.296-.096L71.08 7.037l-1.687.72-10.641 4.71c-1.213.533-2.574.951-3.73 1.442-.496.222-1.035.62-1.247 1.156-.258.735-.2 1.306-.36 2.158z",
fill: "#C2CCD6"
}), /*#__PURE__*/_react["default"].createElement("path", {
fillRule: "evenodd",
clipRule: "evenodd",
d: "M57.797 42.134c.031.432-.26.83-.693.413-.392-.48-.726-1.139-.997-1.627-1.408-2.543-2.742-4.884-3.708-7.651-.722-2.066-1.659-4.079-2.534-6.1l-.343-.79a4.203 4.203 0 0 1-.284-1.022 4.235 4.235 0 0 1 .218-2.1 4.386 4.386 0 0 1 1.207-1.75 4.49 4.49 0 0 1 .9-.599c.338-.172.54-.249.817-.378.87-.39 1.683-.91 2.566-1.258l10.704-4.147c1.662-.662 3.27-1.465 4.905-2.202 1.365-.616 2.722-1.254 4.101-1.84l3.395-1.444 1.698-.721c.25-.108.653-.277 1.022-.354.379-.079.767-.122 1.155-.097 1.548.065 3.026 1.03 3.66 2.432l1.46 3.39 2.776 6.75c.465 1.089 1.048 2.128 1.573 3.192a35.544 35.544 0 0 1 2.603 6.98c.172.676.514 1.33.744 2.003.103.3.124.62-.006.987-.428-.751-.421-.407-1.373-2.025-1.303-2.192-1.824-3.488-2.353-4.759-.23-.546-.539-1.057-.78-1.6l-3.982-8.985c-.49-1.082-1.01-2.15-1.526-3.222L83.96 12c-.224-.505-.41-.75-.736-1.037a2.437 2.437 0 0 0-2.119-.534c-.133.022-.231.066-.384.114l-.513.199c-1.368.53-2.736 1.056-4.093 1.615L59.34 19.315l-2.318.99-3.661 1.61-.915.402c-.24.108-.464.247-.666.414a2.619 2.619 0 0 0-.825 1.27 2.594 2.594 0 0 0 .02 1.51c.073.211.218.53.356.833l.404.907 1.613 3.627c.743 1.683 1.353 3.422 2.069 5.117.368.871.688 1.873 1.117 2.718.571 1.124 1.134 2.108 1.261 3.42",
fill: "#A4B3C2"
}), /*#__PURE__*/_react["default"].createElement("path", {
fillRule: "evenodd",
clipRule: "evenodd",
d: "M66.618 29.278a4.19 4.19 0 0 1 .822-4.664 4.309 4.309 0 0 1 6.084-.066c.401.394.72.864.936 1.381a4.185 4.185 0 0 1 .012 3.207 4.247 4.247 0 0 1-2.266 2.291c-1.03.44-2.193.461-3.239.059a4.252 4.252 0 0 1-2.349-2.208z",
fill: "#E1E6EB"
}), /*#__PURE__*/_react["default"].createElement("path", {
fillRule: "evenodd",
clipRule: "evenodd",
d: "M66.963 28.998c-.097.158-.45.416-.732.326-.233-.128-.363-.369-.458-.553-.533-.93-.738-2.164-.09-3.154.483-.707.933-1.423 1.604-1.95.68-.536 1.465-.948 2.33-1.138.354-.08.724-.272 1.104-.228 1.531.16 2.862 1.042 3.667 2.185.38.528.786 1.061 1.016 1.694.199.522.312 1.092.286 1.66-.072 1.864-1.285 3.643-3.021 4.355-.855.37-1.816.402-2.7.28-.431-.05-.884-.058-1.332-.161-.938-.24-1.714-1.006-1.898-1.942-.05-.26-.232-.442-.288-.687-.025-.108.027-.248.23-.434.213.188.26.086.737.407.656.386.894.593 1.184.82.125.094.298.101.435.164.758.348 1.646.432 2.426.155.58-.192.987-.651 1.378-1.03.47-.476.956-1.065 1.077-1.802.275-1.5-.676-3.172-2.213-3.71a2.344 2.344 0 0 0-.65-.157c-1.421-.164-2.833.617-3.472 1.797-.225.4-.512.812-.593 1.3-.045.244-.145.53-.07.782.13.335.285.553.043 1.021z",
fill: "#C2CCD6"
}), /*#__PURE__*/_react["default"].createElement("defs", null, /*#__PURE__*/_react["default"].createElement("clipPath", {
id: "b"
}, /*#__PURE__*/_react["default"].createElement("path", {
fill: "#fff",
transform: "translate(65.03 58.52)",
d: "M0 0h17.939v33.125H0z"
}))));
};
function PreviewImage(_ref) {
var src = _ref.src,
altText = _ref.altText,
title = _ref.title,
fallback = _ref.fallback,
children = _ref.children,
loader = _ref.loader,
showLoader = _ref.showLoader,
className = _ref.className;
var image = (0, _reactImage.useImage)({
srcList: src,
useSuspense: false
});
var imageIsLoading = image.isLoading && !image.error;
var imageHasSucceeded = !image.isLoading && !image.error;
var imageHasFailed = image.error && !image.isLoading;
var commonAbsoluteLayoutClasses = "absolute top-0 w-full h-full";
var classNames = (0, _classnames["default"])("gui-preview-image", {
"gui-preview-image-succeeded": imageHasSucceeded,
"gui-preview-image-failed": imageHasFailed,
"gui-preview-image-show-loader": showLoader
}, className);
var previewClassNames = (0, _classnames["default"])("gui-preview-image-img", "".concat(commonAbsoluteLayoutClasses));
return /*#__PURE__*/_react["default"].createElement("div", {
className: classNames
}, /*#__PURE__*/_react["default"].createElement("div", {
className: commonAbsoluteLayoutClasses
}, /*#__PURE__*/_react["default"].createElement("img", {
src: image.src,
alt: altText,
title: title,
className: "invisible"
}), /*#__PURE__*/_react["default"].createElement("div", {
title: title,
className: previewClassNames,
style: {
backgroundImage: "url(\"".concat(image.src, "\")")
},
"aria-hidden": "true"
}), /*#__PURE__*/_react["default"].createElement("div", {
className: "".concat(commonAbsoluteLayoutClasses, " flex items-center justify-center")
}, (imageIsLoading || showLoader) && loader, imageHasFailed && fallback), children));
}
PreviewImage.defaultProps = {
showLoader: false,
fallback: /*#__PURE__*/_react["default"].createElement("div", {
className: "gui-preview-image-fallback w-full h-full"
}, /*#__PURE__*/_react["default"].createElement(PreviewFallback, null)),
loader: /*#__PURE__*/_react["default"].createElement(_Loader.Loader, {
size: "md"
})
};
//# sourceMappingURL=PreviewImage.js.map